Detectron.pytorch icon indicating copy to clipboard operation
Detectron.pytorch copied to clipboard

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

Open guoguotingzhu opened this issue 5 years ago • 2 comments

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.

guoguotingzhu avatar Jun 30 '19 06:06 guoguotingzhu

did you find the solution ?

saadnajib avatar Mar 13 '21 00:03 saadnajib

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

Ankita-020696 avatar May 27 '21 08:05 Ankita-020696