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

Can't load model #15

Open
HADJHENNI opened this issue Mar 17, 2022 · 2 comments
Open

Can't load model #15

HADJHENNI opened this issue Mar 17, 2022 · 2 comments

Comments

@HADJHENNI
Copy link

Hello,
I'm trying to run the code, but each time i try to load the model i get this error :
RuntimeError: Error(s) in loading state_dict for ResnetGenerator:
Missing key(s) in state_dict: "model.1.bias", "model.4.bias", "model.7.bias", "model.10.conv_block.1.bias", "model.10.conv_block.6.bias", "model.11.conv_block.1.bias", "model.11.conv_block.6.bias", "model.12.conv_block.1.bias", "model.12.conv_block.6.bias", "model.13.conv_block.1.bias", "model.13.conv_block.6.bias", "model.14.conv_block.1.bias", "model.14.conv_block.6.bias", "model.15.conv_block.1.bias", "model.15.conv_block.6.bias", "model.16.conv_block.1.bias", "model.16.conv_block.6.bias", "model.17.conv_block.1.bias", "model.17.conv_block.6.bias", "model.18.conv_block.1.bias", "model.18.conv_block.6.bias", "model.19.bias", "model.22.bias". .....

any suggestions to solve this issue ?
Thank you

@mtli
Copy link
Owner

mtli commented Mar 17, 2022

Hi, if you are using compatible model definition and checkpoint, then the cause is most likely the inconsistency with the saving and loading of nn.DataParellel and/or weight devices, for which you can check out this post.

@mychina75
Copy link

mychina75 commented Jan 11, 2023

@HADJHENNI Have you solved the issue? met with the same issue...
@mtli Did you train the model using 3 GPU cards?

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

3 participants