使用pytorch进行炼丹,出现以下问题。
基础环境:cuda 10.1 pytorch 1.8.1 cpu(本身设备测试无法调用GPU,只能运行于CPU上)
File "D:workspacemypythonTPA-LSTMTPA-LSTM-PyTorch-mastervenvlibsite-packagestorchcuda__init__.py", line 164, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
解决方案: 删除代码中的 .cuda()



