2023年11月29日发(作者:)

解决在cuda上安装torch后_available()返回

False

问题: raise RuntimeError('Attempting to deserialize object on a CUDA '

RuntimeError: Attempting to deserialize object on a CUDA device but _available() is False. If you are running on a

CPU-only machine, please use with map_location=('cpu') to map your storages to the CPU.

主要原因:torch下载的是cpu版本的