RuntimeError: Expected object of backend CUDA but got backend CPU for argument #4 'mat1'

2023-03-15,,

原因:变量没有加cuda

data=data.cuda()

RuntimeError: Expected object of backend CUDA but got backend CPU for argument #4 'mat1'的相关教程结束。

《RuntimeError: Expected object of backend CUDA but got backend CPU for argument #4 'mat1'.doc》

下载本文的Word格式文档,以方便收藏与打印。