code: def test_2d_shape(self):
      # input_shape = (2, 572, 572, 3)
      input_shape = (2, 180, 180, 3)
      x = tf.ones(input_shape)
  
      unet_instance = UNet2D(num_classes=2)
      out = unet_instance(x, is_training=True)
      print(unet_instance.num_trainable_params())
  
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
          out = sess.run(out)
          # self.assertAllClose((2, 388, 388, 2), out.shape)
          self.assertAllClose((2, 4, 4, 2), out.shape)
  
file_path: NiftyNet/tests/unet_2d_test.py
imports: from __future__ import absolute_import, print_function
  import os
  import unittest
  import tensorflow
  from tensorflow.contrib.layers.python.layers import regularizers
  from niftynet.network.unet_2d import UNet2D
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the UNet3DTest obj's underlying member method code with example usage: obj.test_2d_shape() without return types