PointSeg icon indicating copy to clipboard operation
PointSeg copied to clipboard

Errors in Loading State-Dict for PointSegNet Using the Pretrained Model

Open xijia-tao opened this issue 5 years ago • 1 comments

Thanks a lot for the amazing repo, but I came across a problem when trying to evaluate the pretrained model.

I used python eval.py --csv-path ImageSet/csv/ --data-path lidar_2d/ -c ./config.yaml -j 4 -b 16 --device cuda -m checkpoints/checkpoint_30_20200502_190744.tar --ds-type=train

but I got this error message RuntimeError: Error(s) in loading state_dict for PointSegNet: Missing key(s) in state_dict: "fire2.squeeze.weight", "fire2.squeeze.bias", "fire2.squeeze_bn.weight", ... Unexpected key(s) in state_dict: "fire23.1.squeeze.weight", "fire23.1.squeeze.bias", ...

I think there may be something wrong with the checkpoint file. Could you please check it for me? Thanks in advance!

xijia-tao avatar Jan 03 '21 06:01 xijia-tao

RuntimeError: Error(s) in loading state_dict for PointSegNet: Missing key(s) in state_dict: "fire2.squeeze.weight", "fire2.squeeze.bias", "fire2.squeeze_bn.weight", ... Unexpected key(s) in state_dict: "fire23.1.squeeze.weight", "fire23.1.squeeze.bias", ...

The problem was solved instantly by adding strict=False when calling load_state_dict in eval.py. :)

xijia-tao avatar Jan 03 '21 09:01 xijia-tao