While running
python3 -u /home/raymond/hd3/inference.py
--task=stereo
--data_root=""
--data_list=comb.txt
--encoder=dlaup
--decoder=hda
--batch_size=1
--workers=16
--flow_format=png
--evaluate
--model_path=/home/raymond/hd3/model_zoo/hd3f_chairs_things_sintel-5b4ad51a.pth
--save_folder=/home/raymond/ml_stereo/hd3_predicts
Traceback (most recent call last): File "/home/raymond/hd3/inference.py", line 243, in <module> main() File "/home/raymond/hd3/inference.py", line 129, in main model.load_state_dict(checkpoint['state_dict'], strict=True) File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 777, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.hd3net.Decoder_4.up.0.weight", "module.hd3net.Decoder_4.up.0.bias", "module.hd3net.Decoder_4.up.0.running_mean", "module.hd3net.Decoder_4.up.0.running_var", "module.hd3net.Decoder_4.up.2.weight", "module.hd3net.Decoder_4.up.3.weight", "module.hd3net.Decoder_4.up.3.bias", "module.hd3net.Decoder_4.up.3.running_mean", "module.hd3net.Decoder_4.up.3.running_var", "module.hd3net.cost_bn_5.weight", "module.hd3net.cost_bn_5.bias", "module.hd3net.cost_bn_5.running_mean", "module.hd3net.cost_bn_5.running_var", "module.hd3net.Decoder_5.mapping.block1.conv1.weight", "module.hd3net.Decoder_5.mapping.block1.bn2.weight", "module.hd3net.Decoder_5.mapping.block1.bn2.bias", "module.hd3net.Decoder_5.mapping.block1.bn2.running_mean", "module.hd3net.Decoder_5.mapping.block1.bn2.running_var", "module.hd3net.Decoder_5.mapping.block1.conv2.weight", "module.hd3net.Decoder_5.mapping.block1.shortcut.0.weight", "module.hd3net.Decoder_5.mapping.block2.bn1.weight", "module.hd3net.Decoder_5.mapping.block2.bn1.bias", "module.hd3net.Decoder_5.mapping.block2.bn1.running_mean", "module.hd3net.Decoder_5.mapping.block2.bn1.running_var", "module.hd3net.Decoder_5.mapping.block2.conv1.weight", "module.hd3net.Decoder_5.mapping.block2.bn2.weight", "module.hd3net.Decoder_5.mapping.block2.bn2.bias", "module.hd3net.Decoder_5.mapping.block2.bn2.running_mean", "module.hd3net.Decoder_5.mapping.block2.bn2.running_var", "module.hd3net.Decoder_5.mapping.block2.conv2.weight", "module.hd3net.Decoder_5.mapping.root.0.weight", "module.hd3net.Decoder_5.mapping.root.0.bias", "module.hd3net.Decoder_5.mapping.root.0.running_mean", "module.hd3net.Decoder_5.mapping.root.0.running_var", "module.hd3net.Decoder_5.mapping.root.2.weight", "module.hd3net.Decoder_5.cls.0.weight", "module.hd3net.Decoder_5.cls.0.bias", "module.hd3net.Decoder_5.cls.0.running_mean", "module.hd3net.Decoder_5.cls.0.running_var", "module.hd3net.Decoder_5.cls.2.weight", "module.hd3net.Decoder_5.cls.2.bias". size mismatch for module.hd3net.cost_bn_0.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_0.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_0.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_0.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_0.mapping.block1.conv1.weight: copying a param with shape torch.Size([128, 81, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 9, 3, 3]). size mismatch for module.hd3net.Decoder_0.mapping.block1.shortcut.0.weight: copying a param with shape torch.Size([128, 81, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 9, 1, 1]). size mismatch for module.hd3net.Decoder_0.cls.2.weight: copying a param with shape torch.Size([81, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 128, 1, 1]). size mismatch for module.hd3net.Decoder_0.cls.2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_0.up.2.weight: copying a param with shape torch.Size([128, 81, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 9, 4, 4]). size mismatch for module.hd3net.Decoder_0.up.3.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_0.up.3.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_0.up.3.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_0.up.3.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_1.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_1.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_1.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_1.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_1.mapping.block1.conv1.weight: copying a param with shape torch.Size([128, 676, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 531, 3, 3]). size mismatch for module.hd3net.Decoder_1.mapping.block1.shortcut.0.weight: copying a param with shape torch.Size([128, 676, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 531, 1, 1]). size mismatch for module.hd3net.Decoder_1.cls.2.weight: copying a param with shape torch.Size([81, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 128, 1, 1]). size mismatch for module.hd3net.Decoder_1.cls.2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_1.up.2.weight: copying a param with shape torch.Size([128, 81, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 9, 4, 4]). size mismatch for module.hd3net.Decoder_1.up.3.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_1.up.3.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_1.up.3.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_1.up.3.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_2.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_2.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_2.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_2.mapping.block1.conv1.weight: copying a param with shape torch.Size([128, 420, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 275, 3, 3]). size mismatch for module.hd3net.Decoder_2.mapping.block1.shortcut.0.weight: copying a param with shape torch.Size([128, 420, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 275, 1, 1]). size mismatch for module.hd3net.Decoder_2.cls.2.weight: copying a param with shape torch.Size([81, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 128, 1, 1]). size mismatch for module.hd3net.Decoder_2.cls.2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_2.up.2.weight: copying a param with shape torch.Size([128, 81, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 9, 4, 4]). size mismatch for module.hd3net.Decoder_2.up.3.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_2.up.3.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_2.up.3.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_2.up.3.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_3.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_3.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_3.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_3.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_3.mapping.block1.conv1.weight: copying a param with shape torch.Size([128, 292, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 147, 3, 3]). size mismatch for module.hd3net.Decoder_3.mapping.block1.shortcut.0.weight: copying a param with shape torch.Size([128, 292, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 147, 1, 1]). size mismatch for module.hd3net.Decoder_3.cls.2.weight: copying a param with shape torch.Size([81, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 128, 1, 1]). size mismatch for module.hd3net.Decoder_3.cls.2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_3.up.2.weight: copying a param with shape torch.Size([128, 81, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 9, 4, 4]). size mismatch for module.hd3net.Decoder_3.up.3.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_3.up.3.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_3.up.3.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_3.up.3.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_4.weight: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_4.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_4.running_mean: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.cost_bn_4.running_var: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]). size mismatch for module.hd3net.Decoder_4.mapping.block1.conv1.weight: copying a param with shape torch.Size([128, 228, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 83, 3, 3]). size mismatch for module.hd3net.Decoder_4.mapping.block1.shortcut.0.weight: copying a param with shape torch.Size([128, 228, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 83, 1, 1]). size mismatch for module.hd3net.Decoder_4.cls.2.weight: copying a param with shape torch.Size([81, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 128, 1, 1]). size mismatch for module.hd3net.Decoder_4.cls.2.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([9]).
I saw someone have a similar error like this before, except they had the context flag in, and the -c option in the saved model, which I removed