- 博客(1)
- 收藏
- 关注
原创 RuntimeError: Tensor for ‘out‘ is on CPU, Tensor for argument #1 ‘self‘ is on CPU, but expected them
RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm 产生这类错误的原因,模型和数据未在相同设备上 解决方法: 将其放在同一设备上,模型和数据都放在GPU上 net .to(“cuda”) data.to(“cuda”) 最后如果还出现相同错误,请检查网络模
2022-03-13 15:45:01 3918
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人