pytorch常见问题

1 Gather function not implemented for CPU tensors

多卡训练时候,net的forward里面存在Tensor变成其它类型的操作,比如变成numpy,list

解决:改成Tensor操作

2 RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

https://blog.csdn.net/weixin_41990278/article/details/90311313

https://blog.csdn.net/wu_xin1/article/details/116502378

Author

Lavine Hu

Posted on

2022-04-12

Updated on

2022-04-12

Licensed under

Comments

:D 一言句子获取中...