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

Problems with pth files and pickle #60

Open
Domigome opened this issue Sep 15, 2021 · 0 comments
Open

Problems with pth files and pickle #60

Domigome opened this issue Sep 15, 2021 · 0 comments

Comments

@Domigome
Copy link

Domigome commented Sep 15, 2021

Hellow,

When trying to run the demo.py I run into this issue:

C:\Users\USER\Documents\H_test_3\venv\Scripts\python.exe C:/Users/USER/Documents/H_test_3/demo.py
Traceback (most recent call last):
  File "C:/Users/USER/Documents/H_test_3/demo.py", line 52, in <module>
    state = torch.load(ckpt_dir)
  File "C:\Users\USER\Documents\H_test_3\venv\lib\site-packages\torch\serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\Users\USER\Documents\H_test_3\venv\lib\site-packages\torch\serialization.py", line 777, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
./models/pspnet_resnet101_sgd_lr_0.002_epoch_100_test_iou_0.918.pth

Process finished with exit code 1

Even thought I have installed git fls and made 'git fls fetch' (also tried with deprecated 'git fls clone') the models files stills in .pth forma.

I tried both in the master branch (without models folder) and the tag v0.1.0 (with models folder).

Any way to resolve this?

Ps. master branch removed models folder but the demo.py stills looks for it as default argument.

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