tips:gpu上跑完的模型放到cpu上跑,fine_tuning,需要在state_dict里面改一下map_location的值 state_dict = torch.load(ckpt_path, map_location='cpu')https://blog.csdn.net/qq_19592705/article/details/109119149