Skip to content

_pickle.UnpicklingError: invalid load key, '<' #9

@atzshjh

Description

@atzshjh

(test) jiehu@jiehu-Z490-AORUS-MASTER:/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty$ python test.py --pretrained scannet --architecture BN
loading checkpoint... /media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt
Using cache found in /home/jiehu/.cache/torch/hub/rwightman_gen-efficientnet-pytorch_master
Downloading: "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b5_ap-9e82fae8.pth" to /home/jiehu/.cache/torch/hub/checkpoints/tf_efficientnet_b5_ap-9e82fae8.pth
Loading base model ()...ffff: <_io.BufferedReader name='/home/jiehu/.cache/torch/hub/checkpoints/tf_efficientnet_b5_ap-9e82fae8.pth'>
Done.
Removing last two layers (global_pool & classifier).
fpath: /media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt
ffff: <_io.BufferedReader name='/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/checkpoints/scannet.pt'>
Traceback (most recent call last):
File "test.py", line 97, in
model = utils.load_checkpoint(checkpoint, model)
File "/media/jiehu/hard_disk/work_data_hd/code/open_source/surface_normal_uncertainty/utils/utils.py", line 49, in load_checkpoint
ckpt = torch.load(fpath, map_location='cpu')['model']
File "/home/jiehu/anaconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/jiehu/anaconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.

maybe the checkpoint file is not correct, please help check it, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions