code: def __init__(
      self,
      func,
      kernel_size=3,
      stride=2,
      padding="SAME",
      name="pooling",
  ):
      self.func = func.upper()
      self.layer_name = "{}_{}".format(self.func.lower(), name)
      super(DownSampleLayer, self).__init__(name=self.layer_name)
  
      self.padding = padding.upper()
      look_up_operations(self.padding, SUPPORTED_PADDING)
  
      self.kernel_size = kernel_size
      self.stride = stride
  
file_path: NiftyNet/niftynet/layer/downsample.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.base_layer import Layer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 1 to create a new DownSampleLayer object from inherited base classes: Layer with example: obj = DownSampleLayer(func, kernel_size, stride, padding, name)