StyleGAN.pytorch icon indicating copy to clipboard operation
StyleGAN.pytorch copied to clipboard

Possible mistake in pretrained weights porting

Open akanimax opened this issue 5 years ago • 5 comments

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

akanimax avatar Jan 07 '20 20:01 akanimax

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

qisikai avatar Mar 13 '20 07:03 qisikai

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

huangzh13 avatar Mar 15 '20 03:03 huangzh13

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!!!!

qisikai avatar Mar 15 '20 08:03 qisikai

@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".

yahyadogan72 avatar Oct 04 '20 14:10 yahyadogan72

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

IssamLaradji avatar Oct 31 '20 10:10 IssamLaradji