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

seek help, How can I solve this problem #8

Closed
1hexf1 opened this issue Sep 28, 2021 · 3 comments
Closed

seek help, How can I solve this problem #8

1hexf1 opened this issue Sep 28, 2021 · 3 comments

Comments

@1hexf1
Copy link

1hexf1 commented Sep 28, 2021

Traceback (most recent call last):
File "main.py", line 410, in
image_encoder = CNN_ENCODER(cfg.TEXT.EMBEDDING_DIM)
File "/data01/hxf/text2image/DAMSM.py", line 127, in init
model = models.inception_v3(pretrained=True, transform_input=False)
File "/home/omnisky/hxf/lib/python3.6/site-packages/torchvision/models/inception.py", line 53, in inception_v3
progress=progress)
File "/home/omnisky/hxf/lib/python3.6/site-packages/torch/hub.py", line 557, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "/home/omnisky/hxf/lib/python3.6/site-packages/torch/serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/omnisky/hxf/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, '<'.

@wtliao
Copy link
Owner

wtliao commented Sep 30, 2021

@1hexf1 this problem is mainly caused by the python version. please refe to this issue. Please let me know if you could solve it. Thanks.

@1hexf1
Copy link
Author

1hexf1 commented Oct 9, 2021

I have succeeded in solving the problem. InceptionV3 model loading problem.
It needs to download the model and replace it manually.
Also, I upgraded Pytorch to use Pytorch1.7.

@wtliao
Copy link
Owner

wtliao commented Oct 11, 2021

@1hexf1 thanks a lot for your report!

@wtliao wtliao closed this as completed Oct 11, 2021
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