RuntimeError: Error(s) in loading state_dict for BNInception: size mismatch
yhc1994 opened this issue · comments
Anyone know how to solve this error?
RuntimeError: Error(s) in loading state_dict for BNInception:
size mismatch for conv1_7x7_s2_bn.weight: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1_7x7_s2_bn.bias: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1_7x7_s2_bn.running_mean: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1_7x7_s2_bn.running_var: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv2_3x3_reduce_bn.weight: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv2_3x3_reduce_bn.bias: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv2_3x3_reduce_bn.running_mean: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv2_3x3_reduce_bn.running_var: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv2_3x3_bn.weight: copying a param with shape torch.Size([1, 192]) from checkpoint, the shape in current model is torch.Size([192]).
size mismatch for conv2_3x3_bn.bias: copying a param with shape torch.Size([1, 192]) from checkpoint, the shape in current model is torch.Size([192]).
size mismatch for conv2_3x3_bn.running_mean: copying a param with shape torch.Size([1, 192]) from checkpoint, the shape in current model is torch.Size([192]).
size mismatch for conv2_3x3_bn.running_var: copying a param with shape torch.Size([1, 192]) from checkpoint, the shape in current model is torch.Size([192]).
size mismatch for inception_3a_1x1_bn.weight: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for inception_3a_1x1_bn.bias: copying a param with shape torch.Size([1, 64]) from checkpoint, the shape in current model is torch.Size([64]).
Can you please explain how you resolved this issue because I am facing the same.
Can you please explain how you resolved this issue because I am facing the same.
Downgrade your pytorch version below 0.4.0