(self, z, y, is_training)
return tf.nn.sigmoid(output)
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, 32, 32, colors] 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, 32, 32, colors] with values in [0, 1].
    """
    ch = 64
    colors = self._image_shape[2]
    batch_size = z.get_shape().as_list()[0]
    magic = [(8, 4), (4, 2), (2, 1)]
    output = ops.linear(z, 6 * 6 * 512, scope="fc_noise")
    output = tf.reshape(output, [batch_size, 6, 6, 512], name="fc_reshaped")
    for block_idx in range(3):
      block = self._resnet_block(
          name="B{}".format(block_idx + 1),
          in_channels=ch * magic[block_idx][0],
          out_channels=ch * magic[block_idx][1],
          scale="up")
      output = block(output, z=z, y=y, is_training=is_training)
    output = self.batch_norm(
        output, z=z, y=y, is_training=is_training, scope="final_norm")
    output = tf.nn.relu(output)
    output = ops.conv2d(output, output_dim=colors, k_h=3, k_w=3, d_h=1, d_w=1,
                        name="final_conv")
    return tf.nn.sigmoid(output)
def apply ( self , z , y , is_training ) : ch = 64 colors = self . _image_shape [ 2 ] batch_size = z . get_shape ( ) . as_list ( ) [ 0 ] magic = [ ( 8 , 4 ) , ( 4 , 2 ) , ( 2 , 1 ) ] output = ops . linear ( z , 6 * 6 * 512 , scope = "fc_noise" ) output = tf . reshape ( output , [ batch_size , 6 , 6 , 512 ] , name = "fc_reshaped" ) for block_idx in range ( 3 ) : block = self . _resnet_block ( name = "B{}" . format ( block_idx + 1 ) , in_channels = ch * magic [ block_idx ] [ 0 ] , out_channels = ch * magic [ block_idx ] [ 1 ] , scale = "up" ) output = block ( output , z = z , y = y , is_training = is_training ) output = self . batch_norm ( output , z = z , y = y , is_training = is_training , scope = "final_norm" ) output = tf . nn . relu ( output ) output = ops . conv2d ( output , output_dim = colors , k_h = 3 , k_w = 3 , d_h = 1 , d_w = 1 , name = "final_conv" ) return tf . nn . sigmoid ( output )