Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load + predict using pretrained models #8

Open
w601sxs opened this issue Oct 13, 2021 · 2 comments
Open

How to load + predict using pretrained models #8

w601sxs opened this issue Oct 13, 2021 · 2 comments

Comments

@w601sxs
Copy link

w601sxs commented Oct 13, 2021

Hi,

Thanks for sharing your great work! I am trying to use your pretrained models for prediction with the test airfoils. What I have tried so far is to load the model and state dict like this:

import torch
from train.DfpNet import TurbNetG
netG = TurbNetG()
model = netG.load_state_dict(torch.load('model_data05_exp50.pt'))

What I get is an error like this with missing and mismatched layer sizes:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-0bda212c0edc> in <module>
----> 1 model = netG.load_state_dict(torch.load('model_data05_exp50.pt'))

~/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
   1222         if len(error_msgs) > 0:
   1223             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
-> 1224                                self.__class__.__name__, "\n\t".join(error_msgs)))
   1225         return _IncompatibleKeys(missing_keys, unexpected_keys)
   1226 

RuntimeError: Error(s) in loading state_dict for TurbNetG:
	Missing key(s) in state_dict: "layer2b.layer2b_conv.weight", "layer2b.layer2b_conv.bias", "layer2b.layer2b_bn.weight", "layer2b.layer2b_bn.bias", "layer2b.layer2b_bn.running_mean", "layer2b.layer2b_bn.running_var", "dlayer2b.dlayer2b_tconv.weight", "dlayer2b.dlayer2b_tconv.bias", "dlayer2b.dlayer2b_bn.weight", "dlayer2b.dlayer2b_bn.bias", "dlayer2b.dlayer2b_bn.running_mean", "dlayer2b.dlayer2b_bn.running_var". 
	Unexpected key(s) in state_dict: "layer2x.layer2x_conv.weight", "layer2x.layer2x_conv.bias", "layer2x.layer2x_bn.weight", "layer2x.layer2x_bn.bias", "layer2x.layer2x_bn.running_mean", "layer2x.layer2x_bn.running_var", "layer2x.layer2x_bn.num_batches_tracked", "dlayer2x.dlayer2x_tconv.weight", "dlayer2x.dlayer2x_tconv.bias", "dlayer2x.dlayer2x_bn.weight", "dlayer2x.dlayer2x_bn.bias", "dlayer2x.dlayer2x_bn.running_mean", "dlayer2x.dlayer2x_bn.running_var", "dlayer2x.dlayer2x_bn.num_batches_tracked". 
	size mismatch for layer1.layer1_conv.weight: copying a param with shape torch.Size([32, 3, 4, 4]) from checkpoint, the shape in current model is torch.Size([64, 3, 4, 4]).
	size mismatch for layer1.layer1_conv.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for layer2.layer2_conv.weight: copying a param with shape torch.Size([64, 32, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 64, 4, 4]).
	size mismatch for layer2.layer2_conv.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.weight: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.running_mean: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.running_var: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer3.layer3_conv.weight: copying a param with shape torch.Size([128, 64, 4, 4]) from checkpoint, the shape in current model is torch.Size([256, 128, 4, 4]).
	size mismatch for layer3.layer3_conv.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.weight: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.running_mean: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.running_var: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer4.layer4_conv.weight: copying a param with shape torch.Size([256, 128, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 256, 4, 4]).
	size mismatch for layer4.layer4_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer4.layer4_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.layer4_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.layer4_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.layer4_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 layer5.layer5_conv.weight: copying a param with shape torch.Size([256, 256, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 512, 2, 2]).
	size mismatch for layer5.layer5_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_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 layer5.layer5_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 layer6.layer6_conv.weight: copying a param with shape torch.Size([256, 256, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 512, 2, 2]).
	size mismatch for layer6.layer6_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_tconv.weight: copying a param with shape torch.Size([256, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 1, 1]).
	size mismatch for dlayer6.dlayer6_tconv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_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 dlayer6.dlayer6_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 dlayer5.dlayer5_tconv.weight: copying a param with shape torch.Size([256, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 1024, 1, 1]).
	size mismatch for dlayer5.dlayer5_tconv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_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 dlayer5.dlayer5_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 dlayer4.dlayer4_tconv.weight: copying a param with shape torch.Size([128, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 1024, 3, 3]).
	size mismatch for dlayer4.dlayer4_tconv.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.weight: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.running_mean: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.running_var: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer3.dlayer3_tconv.weight: copying a param with shape torch.Size([64, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 512, 3, 3]).
	size mismatch for dlayer3.dlayer3_tconv.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.weight: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.running_mean: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.running_var: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2.dlayer2_tconv.weight: copying a param with shape torch.Size([32, 128, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 256, 3, 3]).
	size mismatch for dlayer2.dlayer2_tconv.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.weight: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.running_mean: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.running_var: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer1.dlayer1_tconv.weight: copying a param with shape torch.Size([64, 3, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 3, 4, 4]).
@w601sxs
Copy link
Author

w601sxs commented Oct 13, 2021

Similar error with the older commit, and both pretrained models (50 and 70) :

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-2-0ff84af8b555> in <module>
      2 from train.DfpNet import TurbNetG
      3 netG = TurbNetG()
----> 4 model = netG.load_state_dict(torch.load('model_mata10_exp70.pt'))

~/anaconda3/envs/pytorch_latest_p37/lib/python3.7/site-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict)
   1222         if len(error_msgs) > 0:
   1223             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
-> 1224                                self.__class__.__name__, "\n\t".join(error_msgs)))
   1225         return _IncompatibleKeys(missing_keys, unexpected_keys)
   1226 

RuntimeError: Error(s) in loading state_dict for TurbNetG:
	size mismatch for layer1.layer1_conv.weight: copying a param with shape torch.Size([128, 3, 4, 4]) from checkpoint, the shape in current model is torch.Size([64, 3, 4, 4]).
	size mismatch for layer1.layer1_conv.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for layer2.layer2_conv.weight: copying a param with shape torch.Size([256, 128, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 64, 4, 4]).
	size mismatch for layer2.layer2_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2.layer2_bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2x.layer2x_conv.weight: copying a param with shape torch.Size([256, 256, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 128, 4, 4]).
	size mismatch for layer2x.layer2x_conv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2x.layer2x_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2x.layer2x_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2x.layer2x_bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer2x.layer2x_bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for layer3.layer3_conv.weight: copying a param with shape torch.Size([512, 256, 4, 4]) from checkpoint, the shape in current model is torch.Size([256, 128, 4, 4]).
	size mismatch for layer3.layer3_conv.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer3.layer3_bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for layer4.layer4_conv.weight: copying a param with shape torch.Size([1024, 512, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 256, 2, 2]).
	size mismatch for layer4.layer4_conv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer4.layer4_bn.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer4.layer4_bn.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer4.layer4_bn.running_mean: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer4.layer4_bn.running_var: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_conv.weight: copying a param with shape torch.Size([1024, 1024, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 512, 2, 2]).
	size mismatch for layer5.layer5_conv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.running_mean: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer5.layer5_bn.running_var: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for layer6.layer6_conv.weight: copying a param with shape torch.Size([1024, 1024, 2, 2]) from checkpoint, the shape in current model is torch.Size([512, 512, 2, 2]).
	size mismatch for layer6.layer6_conv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_tconv.weight: copying a param with shape torch.Size([1024, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 512, 1, 1]).
	size mismatch for dlayer6.dlayer6_tconv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.running_mean: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer6.dlayer6_bn.running_var: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_tconv.weight: copying a param with shape torch.Size([1024, 2048, 1, 1]) from checkpoint, the shape in current model is torch.Size([512, 1024, 1, 1]).
	size mismatch for dlayer5.dlayer5_tconv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.weight: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.running_mean: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer5.dlayer5_bn.running_var: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([512]).
	size mismatch for dlayer4.dlayer4_tconv.weight: copying a param with shape torch.Size([512, 2048, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 1024, 3, 3]).
	size mismatch for dlayer4.dlayer4_tconv.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.weight: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.bias: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.running_mean: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer4.dlayer4_bn.running_var: copying a param with shape torch.Size([512]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for dlayer3.dlayer3_tconv.weight: copying a param with shape torch.Size([256, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 512, 3, 3]).
	size mismatch for dlayer3.dlayer3_tconv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer3.dlayer3_bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2x.dlayer2x_tconv.weight: copying a param with shape torch.Size([256, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 256, 3, 3]).
	size mismatch for dlayer2x.dlayer2x_tconv.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2x.dlayer2x_bn.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2x.dlayer2x_bn.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2x.dlayer2x_bn.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2x.dlayer2x_bn.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
	size mismatch for dlayer2.dlayer2_tconv.weight: copying a param with shape torch.Size([128, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 256, 3, 3]).
	size mismatch for dlayer2.dlayer2_tconv.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.weight: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.bias: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.running_mean: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer2.dlayer2_bn.running_var: copying a param with shape torch.Size([128]) from checkpoint, the shape in current model is torch.Size([64]).
	size mismatch for dlayer1.dlayer1_tconv.weight: copying a param with shape torch.Size([256, 3, 4, 4]) from checkpoint, the shape in current model is torch.Size([128, 3, 4, 4]).

@thunil
Copy link
Owner

thunil commented Jun 1, 2022

Have you tried using commit 8a5efa4 ? With that one it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants