XingangPan / GAN2Shape

Code for GAN2Shape (ICLR2021 oral)
https://arxiv.org/abs/2011.00844
MIT License
571 stars 104 forks source link

What does compile StyleGAN2 do? #8

Open FrancisYu2020 opened 3 years ago

FrancisYu2020 commented 3 years ago

Hi, I am trying to familiarize myself with your code and could you please explain why there is an optional step that compiles StyleGAN2 to make the training faster?

XingangPan commented 3 years ago

@FrancisYu2020 Authors of StyleGAN2 have implemented a fused bias+activation operation (those under gan2shape/stylegan2/stylegan2-pytorch/op), which is used in StyleGAN2 and is faster than using the original Pytorch's implementation. So compiling this part would make the training faster.