Cadene / pretrained-models.pytorch

Pretrained ConvNets for pytorch: NASNet, ResNeXt, ResNet, InceptionV4, InceptionResnetV2, Xception, DPN, etc.
BSD 3-Clause "New" or "Revised" License
9.04k stars 1.83k forks source link

_pickle.UnpicklingError: invalid load key, '<'. #202

Open DawnChou opened 4 years ago

DawnChou commented 4 years ago

When I load the Xception, there is an error signs: Traceback (most recent call last): File "main.py", line 243, in <module> main(opt) File "main.py", line 216, in main model = TwoStream(opt.num_class, opt.modality, base_model=opt.arch, new_length=opt.sample_duration) File "/home/zouyiping/streams/model.py", line 12, in __init__ self._prepare_base_model(base_model, num_class) File "/home/zouyiping/streams/model.py", line 30, in _prepare_base_model self.base_model = xception() File "/home/zouyiping/streams/models/xception.py", line 216, in xception model.load_state_dict(model_zoo.load_url(settings['url'])) File "/home/zouyiping/software/python3/lib/python3.7/site-packages/torch/hub.py", line 499, in load_state_dict_from_url return torch.load(cached_file, map_location=map_location) File "/home/zouyiping/software/python3/lib/python3.7/site-packages/torch/serialization.py", line 426, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/home/zouyiping/software/python3/lib/python3.7/site-packages/torch/serialization.py", line 603, in _load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.

can anyone tell me how to solve it?

Adenialzz commented 3 years ago

same problem, did you solve it?