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

[SOLVED] _pickle.UnpicklingError: invalid load key, '<'. #14

Open
robot0321 opened this issue Oct 11, 2023 · 0 comments
Open

[SOLVED] _pickle.UnpicklingError: invalid load key, '<'. #14

robot0321 opened this issue Oct 11, 2023 · 0 comments

Comments

@robot0321
Copy link

robot0321 commented Oct 11, 2023

In my case, after running ckpts/download.py, the test command makes an error.

...
  File "/home/chung/anaconda3/envs/magnet/lib/python3.6/site-packages/torch/serialization.py", line 585, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/chung/anaconda3/envs/magnet/lib/python3.6/site-packages/torch/serialization.py", line 755, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.

The problem was the .pt file which was not properly downloaded by the provided code (download.py)
Instead, I recommend using gdown to download the .pt files: for example,

## pip install gdown
gdown 1bbzfboj6XkfFhoJ54Iiqc5Ylj95A015M -O ./ckpts/DNET_scannet.pt

or you can run those codes with python easily

import os 
os.system("gdown 1bbzfboj6XkfFhoJ54Iiqc5Ylj95A015M -O ./ckpts/DNET_scannet.pt")
os.system("gdown 1ugDr67UOanpQZMlPopiM8OihUexhPql4 -O ./ckpts/FNET_scannet.pt")
...

and it works. :)

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

1 participant