code: def test_sSE_3d_excitation_op(self):
      input_shape = (2, 16, 16, 16, 32)
      x = tf.random_uniform(input_shape, seed=0)
      se_layer = SpatialSELayer()
      out_se = se_layer(x)
  
      with tf.Session() as sess:
          sess.run(tf.global_variables_initializer())
          x = sess.run(x)
          x_0_0 = float(x[0, 0, 0, 0, 0])
          x_0_1 = float(x[0, 0, 0, 0, 1])
  
      with tf.Session() as sess:
          sess.run(tf.global_variables_initializer())
          out = sess.run(out_se)
          out_0_0 = float(out[0, 0, 0, 0, 0])
          out_0_1 = float(out[0, 0, 0, 0, 1])
  
      div_0_0 = out_0_0 / x_0_0
      div_0_1 = out_0_1 / x_0_1
  
      with self.cached_session() as sess:
          self.assertAlmostEqual(div_0_0, div_0_1, places=5)
  
file_path: NiftyNet/tests/squeeze_excitation_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.squeeze_excitation import ChannelSELayer
  from niftynet.layer.squeeze_excitation import SpatialSELayer
  from niftynet.layer.squeeze_excitation import ChannelSpatialSELayer
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 8 for calling the SETest obj's underlying member method code with example usage: obj.test_sSE_3d_excitation_op() without return types