code: def test_2d_reg_shape(self):
      input_shape = (2, 8, 16, 1)
      x = tf.ones(input_shape)
  
      resnet_instance = SE_ResNet(
          num_classes=160,
          w_regularizer=regularizers.l2_regularizer(0.4),
      )
      out = resnet_instance(x, is_training=True)
      print(resnet_instance.num_trainable_params())
  
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
          out = sess.run(out)
          self.assertAllClose((2, 160), out.shape)
  
file_path: NiftyNet/tests/se_resnet_test.py
imports: from __future__ import absolute_import, print_function
  import unittest
  import tensorflow
  from tensorflow.contrib.layers.python.layers import regularizers
  from niftynet.network.se_resnet import SE_ResNet
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 4 for calling the SeResNet3DTest obj's underlying member method code with example usage: obj.test_2d_reg_shape() without return types