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

The structure of the model trained is problematic. #11

Open
zzhanghan opened this issue Jun 14, 2024 · 2 comments
Open

The structure of the model trained is problematic. #11

zzhanghan opened this issue Jun 14, 2024 · 2 comments

Comments

@zzhanghan
Copy link

The dictionary structure of the model trained with the source code you provided looks like this:

odict_keys([
'conv_first.weight', 'conv_first.bias',
'RRDB_trunk.0.RDB1.conv1.weight', 'RRDB_trunk.0.RDB1.conv1.bias',
'RRDB_trunk.0.RDB1.conv2.weight', 'RRDB_trunk.0.RDB1.conv2.bias',
'RRDB_trunk.0.RDB1.conv3.weight', 'RRDB_trunk.0.RDB1.conv3.bias',
'RRDB_trunk.0.RDB1.conv4.weight', 'RRDB_trunk.0.RDB1.conv4.bias',
'RRDB_trunk.0.RDB1.conv5.weight', 'RRDB_trunk.0.RDB1.conv5.bias',
'RRDB_trunk.0.RDB2.conv1.weight', 'RRDB_trunk.0.RDB2.conv1.bias',
'RRDB_trunk.0.RDB2.conv2.weight', 'RRDB_trunk.0.RDB2.conv2.bias',
'RRDB_trunk.0.RDB2.conv3.weight', 'RRDB_trunk.0.RDB2.conv3.bias',
'RRDB_trunk.0.RDB2.conv4.weight', 'RRDB_trunk.0.RDB2.conv4.bias',
'RRDB_trunk.0.RDB2.conv5.weight', 'RRDB_trunk.0.RDB2.conv5.bias',
'RRDB_trunk.0.RDB3.conv1.weight', 'RRDB_trunk.0.RDB3.conv1.bias',
'RRDB_trunk.0.RDB3.conv2.weight', 'RRDB_trunk.0.RDB3.conv2.bias',
'RRDB_trunk.0.RDB3.conv3.weight', 'RRDB_trunk.0.RDB3.conv3.bias',
'RRDB_trunk.0.RDB3.conv4.weight', 'RRDB_trunk.0.RDB3.conv4.bias',
'RRDB_trunk.0.RDB3.conv5.weight', 'RRDB_trunk.0.RDB3.conv5.bias',
'RRDB_trunk.1.RDB1.conv1.weight', 'RRDB_trunk.1.RDB1.conv1.bias',
'RRDB_trunk.1.RDB1.conv2.weight', 'RRDB_trunk.1.RDB1.conv2.bias',
'RRDB_trunk.1.RDB1.conv3.weight', 'RRDB_trunk.1.RDB1.conv3.bias',
'RRDB_trunk.1.RDB1.conv4.weight', 'RRDB_trunk.1.RDB1.conv4.bias',
'RRDB_trunk.1.RDB1.conv5.weight', 'RRDB_trunk.1.RDB1.conv5.bias',
'RRDB_trunk.1.RDB2.conv1.weight', 'RRDB_trunk.1.RDB2.conv1.bias',
'RRDB_trunk.1.RDB2.conv2.weight', 'RRDB_trunk.1.RDB2.conv2.bias',
'RRDB_trunk.1.RDB2.conv3.weight', 'RRDB_trunk.1.RDB2.conv3.bias',
'RRDB_trunk.1.RDB2.conv4.weight', 'RRDB_trunk.1.RDB2.conv4.bias',
'RRDB_trunk.1.RDB2.conv5.weight', 'RRDB_trunk.1.RDB2.conv5.bias',

The test conducted shows the following error:
weight = weight['model']
KeyError: 'model'

But the structure of the model you provided is like this:
dict_keys(['model', 'discriminator'])

Where is the problem?

@zzhanghan zzhanghan changed the title 训练出的模型结构有问题 The structure of the model trained is problematic. Jun 14, 2024
@lbc12345
Copy link
Owner

Hi, sorry for this problem, as for storage space saving purpose, we do not save the weight of discriminator in our final implementation code. Therefore, you can test with your trained model after commenting line 35 in the test.py. We will fix this bug in the future updates.

@Arrebol11
Copy link

Thank you very much for resolving the issue.

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