PyTorch does not guarantee forward compatibility, so the best approach would be to update PyTorch to the latest or same version.
Even if you could solve this particular issue by manually defining the missing .torch_version attribute, you could still run into more errors.
Alright, I’m just puzzled about why torch.load will call torch.torch_version. I loaded this checkpoint by pytorch1.10 and found that some meta information, including torch_version, was saved in it. Maybe this is the reason why I will meet this strange error .
Anyway, thanks for you reply.