_pickle.UnpicklingError: invalid load key, '='

checkpoint = torch.load(model_path)
File “/home/lab/.conda/envs/lll/lib/python3.6/site-packages/torch/serialization.py”, line 386, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File “/home/lab/.conda/envs/lll/lib/python3.6/site-packages/torch/serialization.py”, line 563, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ‘=’.

@1206089395k Do you have different versions of pickle while saving and loading the model? That might be one of the reasons

No, the version is the same.