Thanks for you kindness !  I certainly like to post my code(a little big somehow)! I remove the penalty calculation and it’s still the same error occurs.
The definition of the Generator is in stylegan2.py, it has two main class: G_mapping and G_synthesis_stylegan2. Thank you very much and if you are interest in fullfill this, it would be great!

  
      github.com
  
  
    tomguluson92/StyleGAN2_PyTorch/blob/master/network/stylegan2.py 10
# -*- coding: utf-8 -*-

"""
    StyleGAN2 pytorch

    @author: samuel ko
    @date:   2019.12.13

    @notice: 1) fused_conv: unsupport
             2) 4x4 upfirdn kernel: (transfer to 3x3 upfirdn kernel)

    @date:   2019.12.18

    @update: 1) fix upfirdn2d [1, 3, 1] to original [1, 3, 3, 1] in D_stylegan2 and Upsample2d.
             2) use_wscale = True (default), gain = 1 (default).
             3) update he_std calculation method to coordinate with the original repo.


    @date:   2019.12.20



  This file has been truncated. show original