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

Fix BigGAN-Deep generator; Support 512x512 generator #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shawwn
Copy link

@shawwn shawwn commented Oct 2, 2020

The BigGAN-Deep generator in BigGANdeep.py deviates from the official biggan-deep-512 tfhub module in several important ways. After reverse engineering the Tensorflow graph, the following fixes were ascertained:

  • Specnorm the conv layers: which_conv=layers.SNConv2d (was which_conv=nn.Conv2d)
  • Swap the label concatenation: z = torch.cat([z, y], 1) (was z = torch.cat([y, z], 1)
  • The final layer outputs 128 channels rather than 3, and the first 3 channels are returned via slicing

Additionally, this PR implements the following non-crucial changes. These can be dropped from the PR if you'd prefer:

  • Support 512x512 resolution for the BigGAN-Deep generator
  • Some minor reshuffling of the upscaling operation to match the Tensorflow graph
  • The Generator's default arguments now correspond to biggan-deep-512

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

Successfully merging this pull request may close these issues.

1 participant