解决在cuda上安装torch后torch.cuda.is_available()返回
fortunecookie
Fal
问题: rai RuntimeError('Attempting to derialize object on a CUDA '
exeterRuntimeError: Attempting to derialize object on a CUDA device but torch.cuda.is_available() is Fal. If you are running on a CPU-only machine, plea u torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
6350
主要原因:torch下载的是cpu版本的
海伦从零开始学英语image.png
解决办法:重新安装torch_cuda版本din
解决步骤:
1.查看是否安装cuda;在cmd下输⼊ nvcc -V 查看版本,确定已经安装cuda及版本
image.png
2. conda list 查看依赖的包,⽐如python版本zipper
image.png
4.复制链接,在conda下安装 torchvision 和 torch;安装torchvision 是确保版本⼀致,不过可以先安装torch
接电话英文
image.png
sofo
仓木麻衣孙燕姿image.png
furthermore翻译