labml.ai Profile picture
23 May, 5 tweets, 4 min read
1/4) Simple StyleGAN2 implementation (with notes) in @PyTorch in less than 500 lines of code (including training)

Annotated Code: nn.labml.ai/gan/stylegan/i…

Github: github.com/lab-ml/annotat…

Paper: arxiv.org/abs/1912.04958

@jaakkolehtinen @NVIDIAAI

🧵👇
2/4) StyleGAN2 is based on StyleGAN which is based on ProgressiveGAN (by the same authors). We have briefly discussed these models.

StyleGAN paper: arxiv.org/abs/1812.04948
ProgressiveGAN paper: arxiv.org/abs/1710.10196

👇
3/4) This is a minimalistic Style GAN2 model training code. Only single-GPU training is supported to keep the implementation simple. We managed to shrink it to keep it at 425 lines of code, including the training loop.

We trained it on 128x128 resolution.

👇
3/4) We ran into a lot of subtle bugs while implementing this. Experiments had to run for quite sometime to see if they were working properly by looking at generated images. Monitoring layer outputs/parameters/gradients helped us identify problems early on.

👇
4/4) We included diagrams in the notes to illustrate model structure. It took quite a bit of effort and would love to know if they help you 😊

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with labml.ai

labml.ai Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(