code: def inference_network(x):
      """Inference network to parameterize variational model. It takes
      data as input and outputs the variational parameters.
  
      loc, scale = neural_network(x)
      """
      net = tf.reshape(x, [FLAGS.M, 28, 28, 1])
      net = tf.layers.conv2d(net, 32, 5, strides=2, padding="SAME")
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.conv2d(net, 64, 5, strides=2, padding="SAME")
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.conv2d(net, 128, 5, padding="VALID")
      net = tf.layers.batch_normalization(net)
      net = tf.nn.elu(net)
      net = tf.layers.dropout(net, 0.1)
      net = tf.reshape(net, [FLAGS.M, -1])
      net = tf.layers.dense(net, FLAGS.d * 2, activation=None)
      loc = net[:, : FLAGS.d]
      scale = tf.nn.softplus(net[:, FLAGS.d :])
      return loc, scale
  
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 3 for calling a global function with example usage: inference_network(x) and returns: loc,  scale