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

Can't load the pretrained model #60

Open
lychenyoko opened this issue Jul 6, 2021 · 1 comment
Open

Can't load the pretrained model #60

lychenyoko opened this issue Jul 6, 2021 · 1 comment

Comments

@lychenyoko
Copy link

Hi, I am testing the code under the environment of:
pytorch == 1.9.0
torchvision == 0.10.0
python == 3.6.5

When I try torch.load(args.model) it returns an error:

File "/usr/local/cuda/lib/python3.6/site-packages/torch/serialization.py", line 777, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '7'.

Could you help me with this? Thanks!

@AlonZolfi
Copy link

You can unzip the file using 7z software.
the zip file contains .pth file inside, which can be loaded regularly by pytorch.

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