问题描述
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.
问题原因:采用的gpu是本机没有的,比如我的机器1个GPU但是我设置的是使用9卡就会导致这个问题
解决办法:这是因为gpu是'9'导致的,改成0就行