code: def test_2d_shape(self):
      expected_shape = (2, 32, 32, 4)
      self._test_nd_output_shape(2, {}, expected_shape)
  
      params = {
          "n_output_chns": 2,
          "kernel_size": 3,
          "upsample_stride": 2,
          "acti_func": "relu",
      }
      expected_shape = (2, 32, 32, 2)
      self._test_nd_output_shape(2, params, expected_shape)
  
      params = {
          "n_output_chns": 1,
          "kernel_size": 3,
          "upsample_stride": 3,
          "acti_func": "prelu",
      }
      expected_shape = (2, 48, 48, 1)
      self._test_nd_output_shape(2, params, expected_shape)
  
      params = {
          "n_output_chns": 1,
          "kernel_size": 3,
          "upsample_stride": (3, 2),
          "acti_func": "prelu",
      }
      expected_shape = (2, 48, 32, 1)
      self._test_nd_output_shape(2, params, expected_shape)
  
      params = {
          "n_output_chns": 1,
          "kernel_size": 3,
          "upsample_stride": (3, 2),
          "acti_func": "prelu",
          "is_residual_upsampling": False,
      }
      expected_shape = (2, 48, 32, 1)
      self._test_nd_output_shape(2, params, expected_shape)
  
file_path: NiftyNet/tests/upsample_res_block_test.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.upsample_res_block import UpBlock
  from tests.niftynet_testcase import NiftyNetTestCase
label_desc: Use image node_id 5 for calling the UpsampleResBlockTest obj's underlying member method code with example usage: obj.test_2d_shape() without return types