code: def generative_network(z):
      """Generative network to parameterize generative model. It takes
      latent variables as input and outputs the likelihood parameters.
  
      logits = neural_network(z)
      """
      net = tf.reshape(z, [FLAGS.M, 1, 1, FLAGS.d])
      net = tf.layers.conv2d_transpose(net, 128, 3, padding="VALID")
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.conv2d_transpose(net, 64, 5, padding="VALID")
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.conv2d_transpose(
          net, 32, 5, strides=2, padding="SAME"
      )
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.conv2d_transpose(
          net, 1, 5, strides=2, padding="SAME"
      )
      net = tf.reshape(net, [FLAGS.M, -1])
      return net
  
file_path: edward/examples/vae_convolutional.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import os
  import tensorflow
  from edward.models import Bernoulli, Normal
  from edward.util import Progbar
  from observations import mnist
  from scipy.misc import imsave
label_desc: Use image node_id 2 for calling a global function with example usage: generative_network(z) and returns: net