code: def get_netG():
      
      # build the generator
      netG = nn.Sequential()
      with netG.name_scope():
          # input is Z, going into a convolution
          netG.add(nn.Conv2DTranspose(ngf * 8, 4, 1, 0, use_bias=False))
          netG.add(nn.BatchNorm())
          netG.add(nn.Activation('relu'))
          # state size. (ngf*8) x 4 x 4
          netG.add(nn.Conv2DTranspose(ngf * 4, 4, 2, 1, use_bias=False))
          netG.add(nn.BatchNorm())
          netG.add(nn.Activation('relu'))
          # state size. (ngf*4) x 8 x 8
          netG.add(nn.Conv2DTranspose(ngf * 2, 4, 2, 1, use_bias=False))
          netG.add(nn.BatchNorm())
          netG.add(nn.Activation('relu'))
          # state size. (ngf*2) x 16 x 16
          netG.add(nn.Conv2DTranspose(ngf, 4, 2, 1, use_bias=False))
          netG.add(nn.BatchNorm())
          netG.add(nn.Activation('relu'))
          # state size. (ngf) x 32 x 32
          netG.add(nn.Conv2DTranspose(nc, 4, 2, 1, use_bias=False))
          netG.add(nn.Activation('tanh'))
          # state size. (nc) x 64 x 64
  
      return netG
docs: Get net G