Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error(s) in loading state_dict for PSMNet: #16

Closed
evgdobr opened this issue Sep 20, 2019 · 2 comments
Closed

Error(s) in loading state_dict for PSMNet: #16

evgdobr opened this issue Sep 20, 2019 · 2 comments

Comments

@evgdobr
Copy link

evgdobr commented Sep 20, 2019

Hi,
i had faced with next issue while running step 2.4. Train the stereo model:

python3 ./psmnet/finetune_3d.py --maxdisp 192 \
>      --model stackhourglass \
>      --datapath ./KITTI/object/training/ \
>      --split_file ./KITTI/object/train.txt \
>      --epochs 300 \
>      --lr_scale 50 \
>      --loadmodel ./pretrained_sceneflow.tar \
>      --savemodel ./psmnet/kitti_3d/  --btrain 12
./psmnet/kitti_3d/training.log
[2019-09-20 15:17:27 finetune_3d.py:77] INFO     load model ./pretrained_sceneflow.tar
Traceback (most recent call last):
  File "./psmnet/finetune_3d.py", line 79, in <module>
    model.load_state_dict(state_dict['state_dict'])
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 845, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for PSMNet:
        Missing key(s) in state_dict: "feature_extraction.firstconv.0.0.weight", "feature_extraction.firstconv.0.1.weight", "feature_extraction.firstconv.0.1.bias", "feature_extraction.firstconv.0.1.running_mean", "feature_extraction.firstconv.0.1.running_var", "feature_extraction.firstconv.2.0.weight", "feature_extraction
@mileyan
Copy link
Owner

mileyan commented Oct 10, 2019

Hi Evgdobr,

You need to use python 2.7 when you run PSMNET code.

@evgdobr
Copy link
Author

evgdobr commented Oct 10, 2019

thanks,
already done it and it works.

@evgdobr evgdobr closed this as completed Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants