RuntimeError: Error(s) in loading state_dict for BNInception:

username: zhunge
cooked: <p>when i train <a href="https://github.com/yjxiong/tsn-pytorch" rel="nofollow noopener">tsn-pytorch</a>,it show:</p>
<pre><code class="lang-auto">RuntimeError: Error(s) in loading state_dict for BNInception:
	size mismatch for conv1_7x7_s2_bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.running_mean: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.running_var: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv2_3x3_reduce_bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv2_3x3_reduce_bn.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv2_3x3_reduce_bn.running_mean: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.

...

size mismatch for inception_5b_pool_proj_bn.running_var: copying a param of torch.Size([128]) from checkpoint, where the shape is torch.Size([1, 128]) in current model.
</code></pre>
<p>How can this happen  and how to solve it?</p>

username: BrianL
cooked: <aside class="quote no-group quote-modified" data-username="zhunge" data-post="1" data-topic="34144">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/z/da6949/48.png" class="avatar"> zhunge:</div>
<blockquote>
<p>when i train <a href="https://www.icloudcentral.com/" rel="noopener nofollow ugc">icloud</a>,it show:</p>
<pre><code class="lang-auto">RuntimeError: Error(s) in loading state_dict for BNInception:
	size mismatch for conv1_7x7_s2_bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.running_mean: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv1_7x7_s2_bn.running_var: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv2_3x3_reduce_bn.weight: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model. 
	size mismatch for conv2_3x3_reduce_bn.bias: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.
	size mismatch for conv2_3x3_reduce_bn.running_mean: copying a param of torch.Size([64]) from checkpoint, where the shape is torch.Size([1, 64]) in current model.

...

size mismatch for  inception_5b_pool_proj_bn.running_var: copying a param of torch.Size([128]) from checkpoint, where the shape is torch.Size([1, 128]) in current model.
</code></pre>
<p>How can this happen <a href="https://gimp.software/" rel="noopener nofollow ugc">gimp</a> and how to solve it?</p>
</blockquote>
</aside>
<p>I also need help with this. Help is appreciated.</p>
<p>Regards,<br>
Brian,</p>

username: Robinxin123
cooked: <p>hello, have you guys solve the problem now ? i got the same question, can you tell me how to solve it ?</p>
<p>many thanks!</p>

username: Jie
cooked: <p>The same question,has it  been solved?How?<br>
I would appreciate it  if  you can help me!<img src="https://discuss.pytorch.org/images/emoji/apple/pray.png?v=9" title=":pray:" class="emoji" alt=":pray:"></p>

username: youyi-jia
cooked: <p>The same question,has it been solved?How?<br>
I would appreciate it if you can help me!<img src="https://discuss.pytorch.org/images/emoji/apple/pray.png?v=9" title=":pray:" class="emoji" alt=":pray:"></p>