code: def test_3d_shape(self):
      x = tf.random_normal(shape=[2, 4, 5, 6, 4])
      conv1 = ChannelSparseConvolutionalLayer(4)
      conv2 = ChannelSparseConvolutionalLayer(8, kernel_size=[1, 1, 3])
      conv3 = ChannelSparseConvolutionalLayer(4, acti_func="relu")
      conv4 = ChannelSparseConvolutionalLayer(
          8, feature_normalization=None
      )
      conv5 = ChannelSparseConvolutionalLayer(4, with_bias=True)
      x1, mask1 = conv1(x, None, True, 1.0)
      x2, mask2 = conv2(x1, mask1, True, 1.0)
      x3, mask3 = conv3(x2, mask2, True, 0.5)
      x4, mask4 = conv4(x3, mask3, True, 0.75)
      x5, mask5 = conv5(x4, mask4, True, 1.0)
  
      with self.cached_session() as sess:
          sess.run(tf.global_variables_initializer())
          out1, out2, out3, out4, out5 = sess.run([x1, x2, x3, x4, x5])
      self.assertAllClose([2, 4, 5, 6, 4], out1.shape)
      self.assertAllClose([2, 4, 5, 6, 8], out2.shape)
      self.assertAllClose([2, 4, 5, 6, 2], out3.shape)
      self.assertAllClose([2, 4, 5, 6, 6], out4.shape)
      self.assertAllClose([2, 4, 5, 6, 4], out5.shape)
  
file_path: NiftyNet/tests/channel_sparse_convolution_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  import numpy
  from niftynet.layer.channel_sparse_convolution import ChannelSparseConvolutionalLayer
  from tests.niftynet_testcase import NiftyNetTestCase
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
label_desc: Use image node_id 1 for calling the ChannelSparseConvolutionalLayerTest obj's underlying member method code with example usage: obj.test_3d_shape() without return types