RuntimeError: Expected object of backend CUDA but got backend CPU for argument
生活随笔
收集整理的這篇文章主要介紹了
RuntimeError: Expected object of backend CUDA but got backend CPU for argument
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
RuntimeError: Expected object of backend CUDA but got backend CPU for argument #4 'mat1'
?
原因:變量沒有加cuda
?
data=data.cuda()
總結
以上是生活随笔為你收集整理的RuntimeError: Expected object of backend CUDA but got backend CPU for argument的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数学符号1
- 下一篇: 通俗解释指数加权平均