shaoheshaohe 发表于 2020-5-13 08:36:10

常见错误:RuntimeError: expected type torch.FloatTensor but got torch.cu...

计算中有的参数为cuda型有的参数却是cpu型就会遇到这样的错误。
注意:torch model加载,要先将模型to cuda设备,再加载weights。不然,梯度传播会遇到以上错误

页: [1]
查看完整版本: 常见错误:RuntimeError: expected type torch.FloatTensor but got torch.cu...