Problems with pth files and pickle
Domigome opened this issue · comments
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.