运行报错:Attempting to deserialize object on a CUDA device but torch.cuda.is_availabel() is False.

此错误一般是torch.load()接口导致的,需要加关键字参数map_location,如map_location='npu’或map_location=‘cpu’