class_docstr: A down-sample module used in RegUNet to half the spatial size.
  The number of channels is kept same.
  
  Adapted from:
      DeepReg (https://github.com/DeepRegNet/DeepReg)
class_docstr_tok: ["A","down-sample","module","used","in","RegUNet","to","half","the","spatial","size",".","The","number","of","channels","is","kept","same",".","Adapted","from",":","DeepReg","(","https",":","\/\/github.com\/DeepRegNet\/DeepReg",")"]
docstr: Args:
      spatial_dims: number of spatial dimensions.
      channels: channels
      pooling: use MaxPool if True, strided conv if False
docstr_tok: ["Args",":","spatial_dims",":","number","of","spatial","dimensions",".","channels",":","channels","pooling",":","use","MaxPool","if","True",",","strided","conv","if","False"]
code: def __init__(
      self, spatial_dims: int, channels: int, pooling: bool
  ) -> None:
      """
      Args:
          spatial_dims: number of spatial dimensions.
          channels: channels
          pooling: use MaxPool if True, strided conv if False
      """
      super().__init__()
      if pooling:
          self.layer = Pool[Pool.MAX, spatial_dims](kernel_size=2)
      else:
          self.layer = get_conv_block(
              spatial_dims=spatial_dims,
              in_channels=channels,
              out_channels=channels,
              kernel_size=2,
              strides=2,
              padding=0,
          )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  from torch import nn
  from torch.nn import functional
  from monai.networks.blocks import Convolution
  from monai.networks.layers import Conv, Norm, Pool, same_padding
label_desc: Use image node_id 1 to create a new RegistrationDownSampleBlock object from inherited base classes: nn with example: obj = RegistrationDownSampleBlock(spatial_dims, channels, pooling)