(self, z, y, is_training)
return out
Build the generator network for the given inputs.

    Args:
      z: `Tensor` of shape [batch_size, z_dim] with latent code.
      y: `Tensor` of shape [batch_size, num_classes] with one hot encoded
        labels.
      is_training: boolean, are we in train or eval model.

    Returns:
      A tensor of size [batch_size] + self._image_shape with values in [0, 1].
Build the generator network for the given inputs.
Build the generator network for the given inputs .
def apply(self, z, y, is_training):
    """Build the generator network for the given inputs.

    Args:
      z: `Tensor` of shape [batch_size, z_dim] with latent code.
      y: `Tensor` of shape [batch_size, num_classes] with one hot encoded
        labels.
      is_training: boolean, are we in train or eval model.

    Returns:
      A tensor of size [batch_size] + self._image_shape with values in [0, 1].
    """
    del y
    h, w, c = self._image_shape
    bs = z.shape.as_list()[0]
    net = linear(z, 1024, scope="g_fc1")
    net = lrelu(batch_norm(net, is_training=is_training, name="g_bn1"))
    net = linear(net, 128 * (h // 4) * (w // 4), scope="g_fc2")
    net = lrelu(batch_norm(net, is_training=is_training, name="g_bn2"))
    net = tf.reshape(net, [bs, h // 4, w // 4, 128])
    net = deconv2d(net, [bs, h // 2, w // 2, 64], 4, 4, 2, 2, name="g_dc3")
    net = lrelu(batch_norm(net, is_training=is_training, name="g_bn3"))
    net = deconv2d(net, [bs, h, w, c], 4, 4, 2, 2, name="g_dc4")
    out = tf.nn.sigmoid(net)
    return out
def apply ( self , z , y , is_training ) : del y h , w , c = self . _image_shape bs = z . shape . as_list ( ) [ 0 ] net = linear ( z , 1024 , scope = "g_fc1" ) net = lrelu ( batch_norm ( net , is_training = is_training , name = "g_bn1" ) ) net = linear ( net , 128 * ( h // 4 ) * ( w // 4 ) , scope = "g_fc2" ) net = lrelu ( batch_norm ( net , is_training = is_training , name = "g_bn2" ) ) net = tf . reshape ( net , [ bs , h // 4 , w // 4 , 128 ] ) net = deconv2d ( net , [ bs , h // 2 , w // 2 , 64 ] , 4 , 4 , 2 , 2 , name = "g_dc3" ) net = lrelu ( batch_norm ( net , is_training = is_training , name = "g_bn3" ) ) net = deconv2d ( net , [ bs , h , w , c ] , 4 , 4 , 2 , 2 , name = "g_dc4" ) out = tf . nn . sigmoid ( net ) return out