mileyan / pseudo_lidar

(CVPR 2019) Pseudo-LiDAR from Visual Depth Estimation: Bridging the Gap in 3D Object Detection for Autonomous Driving
https://mileyan.github.io/pseudo_lidar/
MIT License
976 stars 216 forks source link

finetune_300.tar not loading, but pretrained_model_KITTI2015.tar works #38

Closed jarvis-huang closed 4 years ago

jarvis-huang commented 4 years ago

Hi, I got runtime error while running PSMNet using the included pretrained finetune_300.tar, however, there was no error with the official PSMNet release pretrained_model_KITTI2015.tar. I'm wondering why could cause that?

My system is Python 2.7, Pytorch 0.4, torchvision 0.2. Thanks.

Error message:

File "./psmnet/submission.py", line 69, in <module>
    model.load_state_dict(state_dict['state_dict'])
  File "/home/jhuang/.virtualenvs/psmnet/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
        Unexpected key(s) in state_dict: "module.feature_extraction.firstconv.0.1.num_batches_tracked", xxx
xiazhiyi99 commented 4 years ago

Torch 0.4.1 added "num_batches_tracked". You can throw away parameters ended with "num_batches_tracked", or just install pytorch0.4.1.

jarvis-huang commented 4 years ago

Thanks. It works now.

stanny880913 commented 1 year ago

Hi , may I ask how to solve it? I can't fixed it!!!