imSitu icon indicating copy to clipboard operation
imSitu copied to clipboard

_pickle.UnpicklingError: invalid load key, ' '.

Open NguyenVanThanhHust opened this issue 4 years ago • 0 comments

I'm trying to run predict and retrain your network.

When i run code to predict, i use command: python3.7 baseline_crf.py --command predict --output_dir . --image_dir ./of500_images_resized --dataset_dir . --weights_file 0.23782721560846543.model --encoding_file ./baseline_models/baseline_encoder --cnn_type resnet_50

It creates error:

command = predict
Traceback (most recent call last):
  File "baseline_crf.py", line 668, in <module>
    encoder = torch.load(args.encoding_file)
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 529, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 692, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, ' '.

Can you give me some advice how to fix it? I tried to use python3.6 + pytorch1.0 anhd python3.7 + pytorch1.5

But none of them work.

NguyenVanThanhHust avatar Oct 01 '20 06:10 NguyenVanThanhHust