code: def infer_output_dims(input_dims, strides, kernel_sizes, padding):
      """
      infer output dims from list,
      the dim can be different in different directions.
      Note: dilation is not considered here.
      """
      assert len(input_dims) == len(strides)
      assert len(input_dims) == len(kernel_sizes)
      output_dims = []
      for i, dim in enumerate(input_dims):
          if dim is None:
              output_dims.append(None)
              continue
          if padding == "VALID":
              output_dims.append(
                  dim * strides[i]
                  + max(kernel_sizes[i] - strides[i], 0)
              )
          else:
              output_dims.append(dim * strides[i])
      return output_dims
  
file_path: NiftyNet/niftynet/layer/deconvolution.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.activation import ActiLayer
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.bn import BNLayer, InstanceNormLayer
  from niftynet.layer.gn import GNLayer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 3 for calling a global function with example usage: infer_output_dims(input_dims, strides, kernel_sizes, padding) and returns: output_dims