runtimeerror: attempting to deserialize object on a cuda device but torch.cuda.is_available() is false. if you are running on a cpu-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the cpu
时间: 2023-04-28 07:03:21 浏览: 80
torch.cuda.is-available()返回False的问题解决
运行时错误:尝试在CUDA设备上反序列化对象,但torch.cuda.is_available()为false。如果您正在运行仅CPU的机器,请使用torch.load并使用map_location = torch.device('cpu')将您的存储映射到CPU。
阅读全文