Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

_pickle.UnpicklingError: invalid load key, '\x0a'. #225

Open
guoguotingzhu opened this issue Jun 30, 2019 · 2 comments
Open

_pickle.UnpicklingError: invalid load key, '\x0a'. #225

guoguotingzhu opened this issue Jun 30, 2019 · 2 comments

Comments

@guoguotingzhu
Copy link

I followed your guidance and met the problem below when I run the code :
"python /home/liujianguo/jiguo/mask-rcnn.pytorch/tools/train_net_step.py --dataset coco2017 --cfg /home/liujianguo/jiguo/mask-rcnn.pytorch/configs/baselines/e2e_mask_rcnn_R-50-C4_1x.yaml --bs 2 --iter_size 1"

Traceback (most recent call last):
File "/home/liujianguo/jiguo/mask-rcnn.pytorch/tools/train_net_step.py", line 454, in
main()
File "/home/liujianguo/jiguo/mask-rcnn.pytorch/tools/train_net_step.py", line 256, in main
maskRCNN = Generalized_RCNN()
File "/home/liujianguo/jiguo/mask-rcnn.pytorch/lib/modeling/model_builder.py", line 124, in init
self._init_modules()
File "/home/liujianguo/jiguo/mask-rcnn.pytorch/lib/modeling/model_builder.py", line 128, in _init_modules
resnet_utils.load_pretrained_imagenet_weights(self)
File "/home/liujianguo/jiguo/mask-rcnn.pytorch/lib/utils/resnet_weights_helper.py", line 31, in load_pretrained_imagenet_weights
pretrianed_state_dict = convert_state_dict(torch.load(weights_file))
File "/home/liujianguo/anaconda3/envs/PANet/lib/python3.6/site-packages/torch/serialization.py", line 303, in load
return _load(f, map_location, pickle_module)
File "/home/liujianguo/anaconda3/envs/PANet/lib/python3.6/site-packages/torch/serialization.py", line 459, in _load
magic_number = pickle_module.load(f)
_pickle.UnpicklingError: invalid load key, '\x0a'.

my operating environment:
cuda 8.0
cudnn 7.3.0
pytorch0.4.0
python3.6
my GPU is geforce gtx 1070ti
I have no idea how to deal with it and really hope you can give me some suggestions.
I would appreciate it if you could reply to me .Best wishes for you.

@saadnajib
Copy link

did you find the solution ?

@Ankita-020696
Copy link

Ankita-020696 commented May 27, 2021

I am facing similar issue , any solution to fix it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants