code: def test_normal_clip(self):
      with self.test_session() as sess:
          # DATA
          M = 12  # batch size during training
          x_ph = tf.placeholder(tf.float32, [M, 1])
  
          # MODEL
          with tf.variable_scope("Gen"):
              theta = tf.Variable(0.0)
              x = Normal(theta, 0.1, sample_shape=[M, 1])
  
          # INFERENCE
          inference = ed.WGANInference(
              data={x: x_ph}, discriminator=discriminative_network
          )
          inference.initialize(penalty=None, clip=0.01, n_iter=500)
          tf.global_variables_initializer().run()
  
          for _ in range(inference.n_iter):
              x_data = next_batch(M).reshape([M, 1])
              for _ in range(5):
                  info_dict_d = inference.update(
                      feed_dict={x_ph: x_data}, variables="Disc"
                  )
  
              inference.update(
                  feed_dict={x_ph: x_data}, variables="Gen"
              )
  
          self.assertAllClose(theta.eval(), 4.0, rtol=1.0, atol=1.0)
  
file_path: edward/tests/inferences/wgan_inference_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import tensorflow
  from edward.models import Normal
  from tensorflow.contrib import slim
label_desc: Use image node_id 1 for calling the test_wgan_class obj's underlying member method code with example usage: obj.test_normal_clip() without return types