pttempted to read a PyTorch file with version 3, but the maximum supported version for reading is 2.
解决:
首先用高版本的torch读入后重新保存。
model = torch.load('model_name.pt')
torch.save(model, 'save_path', _use_new_zipfile_serialization=False)
然后在低版本中读取。
torch.load('model path', map_location='cpu')