code: def test_2d3d_shape(self):
      tf.reset_default_graph()
      I = tf.random_normal(shape=[2, 4, 5, 6, 3])
      U = tf.random_normal(shape=[2, 4, 5, 6, 2])
      crf_layer = CRFAsRNNLayer(T=3)
      crf_layer2 = CRFAsRNNLayer(T=2)
      out1 = crf_layer(I, U)
      out2 = crf_layer2(I[:, :, :, 0, :], out1[:, :, :, 0, :])
  
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
  
          out1, out2 = sess.run([out1, out2])
          U_shape = tuple(U.shape.as_list())
          self.assertAllClose(U_shape, out1.shape)
          U_shape = tuple(U[:, :, :, 0, :].shape.as_list())
          self.assertAllClose(U_shape, out2.shape)
  
file_path: NiftyNet/tests/crf_test.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer.crf import CRFAsRNNLayer
  from niftynet.layer.crf import permutohedral_prepare, permutohedral_compute
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 1 for calling the CRFTest obj's underlying member method code with example usage: obj.test_2d3d_shape() without return types