Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Possible mistake in pretrained weights porting #3

Open
akanimax opened this issue Jan 7, 2020 · 5 comments
Open

Possible mistake in pretrained weights porting #3

akanimax opened this issue Jan 7, 2020 · 5 comments

Comments

@akanimax
Copy link

akanimax commented Jan 7, 2020

Hello, @huangzh13,

Firstly, great job on the code. It's quite good.
I just wanted to point out that there could be a possible mistake in porting the official tensorflow pretrained weights. The samples that you display on the README have very peculiar (and visible) artifacts.

Here is a sample image generated using the original tensorflow stylegan code:
image

Could you please check the weights porting?
The best possible test would be to check the fid score of your pytorch ported weights. If there is a drop in performance, then it would confirm the conjecture.

Please let me know if anything is unclear.

Best regards,
@akanimax

@qisikai
Copy link

qisikai commented Mar 13, 2020

same problem

I Got:
Unexpected key(s) in state_dict: "g_synthesis.blocks.0.conv0_up.intermediate.kernel", "g_synthesis.blocks.1.conv0_up.intermediate.kernel", "g_synthesis.blocks.2.conv0_up.intermediate.kernel", "g_synthesis.blocks.3.conv0_up.intermediate.kernel", "g_synthesis.blocks.4.conv0_up.intermediate.kernel", "g_synthesis.blocks.5.conv0_up.intermediate.kernel", "g_synthesis.blocks.6.conv0_up.intermediate.kernel", "g_synthesis.blocks.7.conv0_up.intermediate.kernel".

and I Can only get noise pics rather than faces

@huangzh13
Copy link
Owner

This error means that your network lacks the definition of the intermediate layer. Please double check the definition of BlurLayer at g_synthesis.

Best regards,
@huangzh13

@qisikai
Copy link

qisikai commented Mar 15, 2020

This error means that your network lacks the definition of the intermediate layer. Please double check the definition of BlurLayer at g_synthesis.

Best regards,
@huangzh13

Sovled! Thank you very much!!!!

@yahyadogan72
Copy link

yahyadogan72 commented Oct 4, 2020

@qisikai How did you solve this problem? I am getting the following error.

RuntimeError: Error(s) in loading state_dict for Generator:
Missing key(s) in state_dict: "g_synthesis.blocks.0.conv0_up.intermediate.kernel", "g_synthesis.blocks.1.conv0_up.intermediate.kernel", "g_synthesis.blocks.2.conv0_up.intermediate.kernel", "g_synthesis.blocks.3.conv0_up.intermediate.kernel", "g_synthesis.blocks.4.conv0_up.intermediate.kernel", "truncation.avg_latent".

@IssamLaradji
Copy link

I am getting the same issue. @huangzh13 is there an easy way to solve this?

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

No branches or pull requests

5 participants