roytseng-tw / Detectron.pytorch

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available.
MIT License
2.82k stars 567 forks source link

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

Open guoguotingzhu opened 5 years ago

guoguotingzhu commented 5 years ago

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 commented 3 years ago

did you find the solution ?

Ankita-020696 commented 3 years ago

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