Hi,
I have two models. ModelA and ModelB both are resnet50 model. I have pre-trained weights from modelA and they looks like.
|module.encoder.conv1.weight | torch.Size([64, 3, 7, 7])|
|module.encoder.bn1.weight | torch.Size([64])|
|module.encoder.bn1.bias | torch.Size([64])|
|module.encoder.bn1.running_mean | torch.Size([64])|
|module.encoder.bn1.running_var | torch.Size([64])|

However, when I define modelB it has model weight in
encoder.conv1.weight   torch.Size([64, 3, 7, 7])
encoder.bn1.weight   torch.Size([64])
encoder.bn1.bias   torch.Size([64])
encoder.bn1.running_mean   torch.Size([64])
encoder.bn1.running_var    torch.Size([64]). 

RuntimeError: Error(s) in loading state_dict for ResNetEncoder:
	Unexpected key(s) in state_dict: "module.encoder.conv1.weight", "module.encoder.bn1.weight", "module.encoder.bn1.bias", "module.encoder.bn1.running_mean", "module.encoder.bn1.running_var", "module.encoder.bn1.num_batches_tracked", 

I am trying to load modelA weights into modelB. However, I am getting error. Please help me.