1、解决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=‘cpu’ to map your storages to the CPU.
参考链接:
https://www.cnblogs.com/xiaodai0/p/10413711.html
改为:torch.load(“0.9472_0048.weights”,map_location=‘cpu’)
2、解决RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0])