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,
In my case, after running ckpts/download.py, the test command makes an error.
The problem was the .pt file which was not properly downloaded by the provided code (
download.py
) Instead, I recommend usinggdown
to download the .pt files: for example,or you can run those codes with python easily
and it works. :)