mmagic
mmagic copied to clipboard
gca model missing keys
Hello, thank you very much for the framework you provided. When I used the GCA network training in matting, missing keys in source state_dict appeared. The weight of this backbone model is model_best_resnet34_en_nomixup.pth, Could you please give me a look at what might be the cause? Thank you very much!
Please provide the full error log.
If the keys are fc, then it is expected.
@innerlee missing keys: `size mismatch for conv1.conv.weight_orig: copying a param with shape torch.Size([32, 6, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 4, 3, 3]). size mismatch for conv1.conv.weight_v: copying a param with shape torch.Size([54]) from checkpoint, the shape in current model is torch.Size([36]). unexpected key in source state_dict: layer_bottleneck.0.conv1.module.weight_u, layer_bottleneck.0.conv1.module.weight_v, layer_bottleneck.0.conv1.module.weight_bar, layer_bottleneck.0.bn1.weight, layer_bottleneck.0.bn1.bias, layer_bottleneck.0.bn1.running_mean, layer_bottleneck.0.bn1.running_var, layer_bottleneck.0.bn1.num_batches_tracked, layer_bottleneck.0.conv2.module.weight_u, layer_bottleneck.0.conv2.module.weight_v, layer_bottleneck.0.conv2.module.weight_bar, layer_bottleneck.0.bn2.weight, layer_bottleneck.0.bn2.bias, layer_bottleneck.0.bn2.running_mean, layer_bottleneck.0.bn2.running_var, layer_bottleneck.0.bn2.num_batches_tracked, layer_bottleneck.0.downsample.1.module.weight_u, layer_bottleneck.0.downsample.1.module.weight_v, layer_bottleneck.0.downsample.1.module.weight_bar, layer_bottleneck.0.downsample.2.weight, layer_bottleneck.0.downsample.2.bias, layer_bottleneck.0.downsample.2.running_mean, layer_bottleneck.0.downsample.2.running_var, layer_bottleneck.0.downsample.2.num_batches_tracked, layer_bottleneck.1.conv1.module.weight_u, layer_bottleneck.1.conv1.module.weight_v, layer_bottleneck.1.conv1.module.weight_bar, layer_bottleneck.1.bn1.weight, layer_bottleneck.1.bn1.bias, layer_bottleneck.1.bn1.running_mean, layer_bottleneck.1.bn1.running_var, layer_bottleneck.1.bn1.num_batches_tracked, layer_bottleneck.1.conv2.module.weight_u, layer_bottleneck.1.conv2.module.weight_v, layer_bottleneck.1.conv2.module.weight_bar, layer_bottleneck.1.bn2.weight, layer_bottleneck.1.bn2.bias, layer_bottleneck.1.bn2.running_mean, layer_bottleneck.1.bn2.running_var, layer_bottleneck.1.bn2.num_batches_tracked, layer_bottleneck.2.conv1.module.weight_u, layer_bottleneck.2.conv1.module.weight_v, layer_bottleneck.2.conv1.module.weight_bar, layer_bottleneck.2.bn1.weight, layer_bottleneck.2.bn1.bias, layer_bottleneck.2.bn1.running_mean, layer_bottleneck.2.bn1.running_var, layer_bottleneck.2.bn1.num_batches_tracked, layer_bottleneck.2.conv2.module.weight_u, layer_bottleneck.2.conv2.module.weight_v, layer_bottleneck.2.conv2.module.weight_bar, layer_bottleneck.2.bn2.weight, layer_bottleneck.2.bn2.bias, layer_bottleneck.2.bn2.running_mean, layer_bottleneck.2.bn2.running_var, layer_bottleneck.2.bn2.num_batches_tracked, fc.weight, fc.bias, layer3.4.conv1.conv.weight_u, layer3.4.conv1.conv.weight_v, layer3.4.conv1.conv.weight_orig, layer3.4.conv1.bn.weight, layer3.4.conv1.bn.bias, layer3.4.conv1.bn.running_mean, layer3.4.conv1.bn.running_var, layer3.4.conv1.bn.num_batches_tracked, layer3.4.conv2.conv.weight_u, layer3.4.conv2.conv.weight_v, layer3.4.conv2.conv.weight_orig, layer3.4.conv2.bn.weight, layer3.4.conv2.bn.bias, layer3.4.conv2.bn.running_mean, layer3.4.conv2.bn.running_var, layer3.4.conv2.bn.num_batches_tracked, layer3.5.conv1.conv.weight_u, layer3.5.conv1.conv.weight_v, layer3.5.conv1.conv.weight_orig, layer3.5.conv1.bn.weight, layer3.5.conv1.bn.bias, layer3.5.conv1.bn.running_mean, layer3.5.conv1.bn.running_var, layer3.5.conv1.bn.num_batches_tracked, layer3.5.conv2.conv.weight_u, layer3.5.conv2.conv.weight_v, layer3.5.conv2.conv.weight_orig, layer3.5.conv2.bn.weight, layer3.5.conv2.bn.bias, layer3.5.conv2.bn.running_mean, layer3.5.conv2.bn.running_var, layer3.5.conv2.bn.num_batches_tracked
missing keys in source state_dict: layer4.0.conv1.conv.weight_orig, layer4.0.conv1.conv.weight, layer4.0.conv1.conv.weight_u, layer4.0.conv1.conv.weight_orig, layer4.0.conv1.conv.weight_u, layer4.0.conv1.conv.weight_v, layer4.0.conv1.bn.weight, layer4.0.conv1.bn.bias, layer4.0.conv1.bn.running_mean, layer4.0.conv1.bn.running_var, layer4.0.conv2.conv.weight_orig, layer4.0.conv2.conv.weight, layer4.0.conv2.conv.weight_u, layer4.0.conv2.conv.weight_orig, layer4.0.conv2.conv.weight_u, layer4.0.conv2.conv.weight_v, layer4.0.conv2.bn.weight, layer4.0.conv2.bn.bias, layer4.0.conv2.bn.running_mean, layer4.0.conv2.bn.running_var, layer4.0.interpolation.1.conv.weight_orig, layer4.0.interpolation.1.conv.weight, layer4.0.interpolation.1.conv.weight_u, layer4.0.interpolation.1.conv.weight_orig, layer4.0.interpolation.1.conv.weight_u, layer4.0.interpolation.1.conv.weight_v, layer4.0.interpolation.1.bn.weight, layer4.0.interpolation.1.bn.bias, layer4.0.interpolation.1.bn.running_mean, layer4.0.interpolation.1.bn.running_var, layer4.1.conv1.conv.weight_orig, layer4.1.conv1.conv.weight, layer4.1.conv1.conv.weight_u, layer4.1.conv1.conv.weight_orig, layer4.1.conv1.conv.weight_u, layer4.1.conv1.conv.weight_v, layer4.1.conv1.bn.weight, layer4.1.conv1.bn.bias, layer4.1.conv1.bn.running_mean, layer4.1.conv1.bn.running_var, layer4.1.conv2.conv.weight_orig, layer4.1.conv2.conv.weight, layer4.1.conv2.conv.weight_u, layer4.1.conv2.conv.weight_orig, layer4.1.conv2.conv.weight_u, layer4.1.conv2.conv.weight_v, layer4.1.conv2.bn.weight, layer4.1.conv2.bn.bias, layer4.1.conv2.bn.running_mean, layer4.1.conv2.bn.running_var, shortcut.0.0.conv.weight_orig, shortcut.0.0.conv.weight, shortcut.0.0.conv.weight_u, shortcut.0.0.conv.weight_orig, shortcut.0.0.conv.weight_u, shortcut.0.0.conv.weight_v, shortcut.0.0.bn.weight, shortcut.0.0.bn.bias, shortcut.0.0.bn.running_mean, shortcut.0.0.bn.running_var, shortcut.0.1.conv.weight_orig, shortcut.0.1.conv.weight, shortcut.0.1.conv.weight_u, shortcut.0.1.conv.weight_orig, shortcut.0.1.conv.weight_u, shortcut.0.1.conv.weight_v, shortcut.0.1.bn.weight, shortcut.0.1.bn.bias, shortcut.0.1.bn.running_mean, shortcut.0.1.bn.running_var, shortcut.1.0.conv.weight_orig, shortcut.1.0.conv.weight, shortcut.1.0.conv.weight_u, shortcut.1.0.conv.weight_orig, shortcut.1.0.conv.weight_u, shortcut.1.0.conv.weight_v, shortcut.1.0.bn.weight, shortcut.1.0.bn.bias, shortcut.1.0.bn.running_mean, shortcut.1.0.bn.running_var, shortcut.1.1.conv.weight_orig, shortcut.1.1.conv.weight, shortcut.1.1.conv.weight_u, shortcut.1.1.conv.weight_orig, shortcut.1.1.conv.weight_u, shortcut.1.1.conv.weight_v, shortcut.1.1.bn.weight, shortcut.1.1.bn.bias, shortcut.1.1.bn.running_mean, shortcut.1.1.bn.running_var, shortcut.2.0.conv.weight_orig, shortcut.2.0.conv.weight, shortcut.2.0.conv.weight_u, shortcut.2.0.conv.weight_orig, shortcut.2.0.conv.weight_u, shortcut.2.0.conv.weight_v, shortcut.2.0.bn.weight, shortcut.2.0.bn.bias, shortcut.2.0.bn.running_mean, shortcut.2.0.bn.running_var, shortcut.2.1.conv.weight_orig, shortcut.2.1.conv.weight, shortcut.2.1.conv.weight_u, shortcut.2.1.conv.weight_orig, shortcut.2.1.conv.weight_u, shortcut.2.1.conv.weight_v, shortcut.2.1.bn.weight, shortcut.2.1.bn.bias, shortcut.2.1.bn.running_mean, shortcut.2.1.bn.running_var, shortcut.3.0.conv.weight_orig, shortcut.3.0.conv.weight, shortcut.3.0.conv.weight_u, shortcut.3.0.conv.weight_orig, shortcut.3.0.conv.weight_u, shortcut.3.0.conv.weight_v, shortcut.3.0.bn.weight, shortcut.3.0.bn.bias, shortcut.3.0.bn.running_mean, shortcut.3.0.bn.running_var, shortcut.3.1.conv.weight_orig, shortcut.3.1.conv.weight, shortcut.3.1.conv.weight_u, shortcut.3.1.conv.weight_orig, shortcut.3.1.conv.weight_u, shortcut.3.1.conv.weight_v, shortcut.3.1.bn.weight, shortcut.3.1.bn.bias, shortcut.3.1.bn.running_mean, shortcut.3.1.bn.running_var, shortcut.4.0.conv.weight_orig, shortcut.4.0.conv.weight, shortcut.4.0.conv.weight_u, shortcut.4.0.conv.weight_orig, shortcut.4.0.conv.weight_u, shortcut.4.0.conv.weight_v, shortcut.4.0.bn.weight, shortcut.4.0.bn.bias, shortcut.4.0.bn.running_mean, shortcut.4.0.bn.running_var, shortcut.4.1.conv.weight_orig, shortcut.4.1.conv.weight, shortcut.4.1.conv.weight_u, shortcut.4.1.conv.weight_orig, shortcut.4.1.conv.weight_u, shortcut.4.1.conv.weight_v, shortcut.4.1.bn.weight, shortcut.4.1.bn.bias, shortcut.4.1.bn.running_mean, shortcut.4.1.bn.running_var, guidance_head.0.conv.weight_orig, guidance_head.0.conv.weight, guidance_head.0.conv.weight_u, guidance_head.0.conv.weight_orig, guidance_head.0.conv.weight_u, guidance_head.0.conv.weight_v, guidance_head.0.bn.weight, guidance_head.0.bn.bias, guidance_head.0.bn.running_mean, guidance_head.0.bn.running_var, guidance_head.1.conv.weight_orig, guidance_head.1.conv.weight, guidance_head.1.conv.weight_u, guidance_head.1.conv.weight_orig, guidance_head.1.conv.weight_u, guidance_head.1.conv.weight_v, guidance_head.1.bn.weight, guidance_head.1.bn.bias, guidance_head.1.bn.running_mean, guidance_head.1.bn.running_var, guidance_head.2.conv.weight_orig, guidance_head.2.conv.weight, guidance_head.2.conv.weight_u, guidance_head.2.conv.weight_orig, guidance_head.2.conv.weight_u, guidance_head.2.conv.weight_v, guidance_head.2.bn.weight, guidance_head.2.bn.bias, guidance_head.2.bn.running_mean, guidance_head.2.bn.running_var, gca.guidance_conv.weight, gca.guidance_conv.bias, gca.out_conv.conv.weight, gca.out_conv.bn.weight, gca.out_conv.bn.bias, gca.out_conv.bn.running_mean, gca.out_conv.bn.running_var`
Hi, @15122901359. Where is the pretrained weight model_best_resnet34_en_nomixup.pth from?
I've met the same problem, and I download the pretrained model 'model_best_resnet34_en_nomixup.pth' from https://github.com/open-mmlab/mmcv/blob/b4bfeb53c5/mmcv/model_zoo/open_mmlab.json
Thank you @Dinghow for your information! I've checked with the pretrained weight provided by the json file. The pretrained weight file is outdated.
We will update the latest pretrained weight as soon as possible. Thank you!
Thank you for your work @hejm37, how soon will the latest pre-trained weight be updated?
Hi @yuchengtianxia, I am not sure about the exact date, but I guess we will probably update it in the next two weeks.
The pretrained weight is now updated.
Hi @hejm37, Thank you for your work! I trained the GCA network with the updated pretrained weights (https://github.com/open-mmlab/mmcv/blob/b4bfeb53c5/mmcv/model_zoo/open_mmlab.json), but missing keys still appeared. The log shows: WARNING - The model and loaded state dict do not match exactly
size mismatch for layer4.0.conv1.conv.weight_orig: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 256, 3, 3]). size mismatch for layer4.0.conv1.conv.weight_u: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv1.bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv1.bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv1.bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv1.bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv2.conv.weight_orig: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]). size mismatch for layer4.0.conv2.conv.weight_u: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv2.conv.weight_v: copying a param with shape torch.Size([2304]) from checkpoint, the shape in current model is torch.Size([4608]). size mismatch for layer4.0.conv2.bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv2.bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv2.bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.conv2.bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.interpolation.1.conv.weight_orig: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 256, 1, 1]). size mismatch for layer4.0.interpolation.1.conv.weight_u: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.interpolation.1.conv.weight_v: copying a param with shape torch.Size([2304]) from checkpoint, the shape in current model is torch.Size([256]). size mismatch for layer4.0.interpolation.1.bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.interpolation.1.bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.interpolation.1.bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.0.interpolation.1.bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv1.conv.weight_orig: copying a param with shape torch.Size([256, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]). size mismatch for layer4.1.conv1.conv.weight_u: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv1.conv.weight_v: copying a param with shape torch.Size([2304]) from checkpoint, the shape in current model is torch.Size([4608]). size mismatch for layer4.1.conv1.bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv1.bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv1.bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv1.bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]). size mismatch for layer4.1.conv2.conv.weight_orig: copying a param with shape torch.Size([512, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([512, 512, 3, 3]). size mismatch for layer4.1.conv2.conv.weight_v: copying a param with shape torch.Size([2304]) from checkpoint, the shape in current model is torch.Size([4608]). size mismatch for shortcut.0.0.conv.weight_orig: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 6, 3, 3]). size mismatch for shortcut.0.0.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.0.conv.weight_v: copying a param with shape torch.Size([4608]) from checkpoint, the shape in current model is torch.Size([54]). size mismatch for shortcut.0.0.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.0.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.0.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.0.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.1.conv.weight_orig: copying a param with shape torch.Size([512, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([32, 32, 3, 3]). size mismatch for shortcut.0.1.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.1.conv.weight_v: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([288]). size mismatch for shortcut.0.1.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.1.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.1.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.0.1.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.0.conv.weight_orig: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 32, 3, 3]). size mismatch for shortcut.1.0.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.0.conv.weight_v: copying a param with shape torch.Size([4608]) from checkpoint, the shape in current model is torch.Size([288]). size mismatch for shortcut.1.0.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.0.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.0.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.0.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.1.conv.weight_orig: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([32, 32, 3, 3]). size mismatch for shortcut.1.1.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.1.conv.weight_v: copying a param with shape torch.Size([4608]) from checkpoint, the shape in current model is torch.Size([288]). size mismatch for shortcut.1.1.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.1.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.1.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.1.1.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([32]). size mismatch for shortcut.2.0.conv.weight_orig: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]). size mismatch for shortcut.2.0.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.0.conv.weight_v: copying a param with shape torch.Size([4608]) from checkpoint, the shape in current model is torch.Size([576]). size mismatch for shortcut.2.0.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.0.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.0.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.0.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.1.conv.weight_orig: copying a param with shape torch.Size([512, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]). size mismatch for shortcut.2.1.conv.weight_u: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.1.conv.weight_v: copying a param with shape torch.Size([4608]) from checkpoint, the shape in current model is torch.Size([576]). size mismatch for shortcut.2.1.bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.1.bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.1.bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). size mismatch for shortcut.2.1.bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([64]). unexpected key in source state_dict: fc.weight, fc.bias
missing keys in source state_dict: shortcut.3.0.conv.weight_orig, shortcut.3.0.conv.weight, shortcut.3.0.conv.weight_u, shortcut.3.0.conv.weight_orig, shortcut.3.0.conv.weight_u, shortcut.3.0.conv.weight_v, shortcut.3.0.bn.weight, shortcut.3.0.bn.bias, shortcut.3.0.bn.running_mean, shortcut.3.0.bn.running_var, shortcut.3.1.conv.weight_orig, shortcut.3.1.conv.weight, shortcut.3.1.conv.weight_u, shortcut.3.1.conv.weight_orig, shortcut.3.1.conv.weight_u, shortcut.3.1.conv.weight_v, shortcut.3.1.bn.weight, shortcut.3.1.bn.bias, shortcut.3.1.bn.running_mean, shortcut.3.1.bn.running_var, shortcut.4.0.conv.weight_orig, shortcut.4.0.conv.weight, shortcut.4.0.conv.weight_u, shortcut.4.0.conv.weight_orig, shortcut.4.0.conv.weight_u, shortcut.4.0.conv.weight_v, shortcut.4.0.bn.weight, shortcut.4.0.bn.bias, shortcut.4.0.bn.running_mean, shortcut.4.0.bn.running_var, shortcut.4.1.conv.weight_orig, shortcut.4.1.conv.weight, shortcut.4.1.conv.weight_u, shortcut.4.1.conv.weight_orig, shortcut.4.1.conv.weight_u, shortcut.4.1.conv.weight_v, shortcut.4.1.bn.weight, shortcut.4.1.bn.bias, shortcut.4.1.bn.running_mean, shortcut.4.1.bn.running_var, guidance_head.0.conv.weight_orig, guidance_head.0.conv.weight, guidance_head.0.conv.weight_u, guidance_head.0.conv.weight_orig, guidance_head.0.conv.weight_u, guidance_head.0.conv.weight_v, guidance_head.0.bn.weight, guidance_head.0.bn.bias, guidance_head.0.bn.running_mean, guidance_head.0.bn.running_var, guidance_head.1.conv.weight_orig, guidance_head.1.conv.weight, guidance_head.1.conv.weight_u, guidance_head.1.conv.weight_orig, guidance_head.1.conv.weight_u, guidance_head.1.conv.weight_v, guidance_head.1.bn.weight, guidance_head.1.bn.bias, guidance_head.1.bn.running_mean, guidance_head.1.bn.running_var, guidance_head.2.conv.weight_orig, guidance_head.2.conv.weight, guidance_head.2.conv.weight_u, guidance_head.2.conv.weight_orig, guidance_head.2.conv.weight_u, guidance_head.2.conv.weight_v, guidance_head.2.bn.weight, guidance_head.2.bn.bias, guidance_head.2.bn.running_mean, guidance_head.2.bn.running_var, gca.guidance_conv.weight, gca.guidance_conv.bias, gca.out_conv.conv.weight, gca.out_conv.bn.weight, gca.out_conv.bn.bias, gca.out_conv.bn.running_mean, gca.out_conv.bn.running_var
It's normal to have those missing keys since only partial weights of the encoder are from pretrained weights.
But it's abnormal that there are size mismatches. Are you using the default config from https://github.com/open-mmlab/mmediting/blob/master/configs/mattors/gca/gca_r34_4x10_200k_comp1k.py?
@hejm37 I only changed "bg_dir = './data/coco/train2017'" in the default config to "bg_dir = './data/coco/train2014'", and other settings remain unchanged. I think the bg_dir setting has nothing to do with the model structure, but the error of size mismatches still exist.
Hi @hejm37, I also met the problem of mismatch between the model and the pre-trained weight, The log shows: "The model and loaded state dict do not match exactly". The pre-trained weight did not work.
@LeoXing1996 Please check this issue.
Hey @yuchengtianxia , can you provide the URL of the checkpoint you used?
Closing due to inactivity, please reopen if there are any further problems.