Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错求助magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.(困扰我很久了救救孩子吧)) #133

Open
wys2929 opened this issue May 25, 2022 · 2 comments

Comments

@wys2929
Copy link

wys2929 commented May 25, 2022

No description provided.

@wys2929
Copy link
Author

wys2929 commented May 25, 2022

在训练时报的错,具体报错如下
Traceback (most recent call last):
File "main.py", line 307, in
main()
File "main.py", line 41, in main
consensus_type=args.consensus_type, dropout=args.dropout, partial_bn=not args.no_partialbn)
File "/home/usr/project1/tsn-pytorch/models.py", line 39, in init
self._prepare_base_model(base_model)
File "/home/usr/project1/tsn-pytorch/models.py", line 82, in _prepare_base_model
self.base_model = getattr(torchvision.models, base_model)(True)
File "/home/usr/anaconda3/envs/TEST1/lib/python3.7/site-packages/torchvision/models/resnet.py", line 277, in resnet101
**kwargs)
File "/home/usr/anaconda3/envs/TEST1/lib/python3.7/site-packages/torchvision/models/resnet.py", line 227, in _resnet
progress=progress)
File "/home/usr/anaconda3/envs/TEST1/lib/python3.7/site-packages/torch/hub.py", line 495, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/home/usr/anaconda3/envs/TEST1/lib/python3.7/site-packages/torch/serialization.py", line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/usr/anaconda3/envs/TEST1/lib/python3.7/site-packages/torch/serialization.py", line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.

@ck321123
Copy link

ck321123 commented Jan 9, 2024

你好,请问你解决了嘛,我现在也有这个问题,完全不知道怎么解决,您可以帮助我嘛?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants