code: def __init__(
      self,
      inplanes,
      planes,
      kernel_size=(3, 1, 1),
      stride=(1, 1, 1),
      padding=(1, 0, 0),
      bias=False,
      groups=1,
      norm=False,
      activation=False,
      downsample_position="after",
      downsample_scale=(1, 2, 2),
  ):
      super(Downampling, self).__init__()
  
      self.conv = nn.Conv3d(
          inplanes,
          planes,
          kernel_size,
          stride,
          padding,
          bias=bias,
          groups=groups,
      )
      self.norm = nn.BatchNorm3d(planes) if norm else None
      self.relu = nn.ReLU(inplace=True) if activation else None
      assert downsample_position in ["before", "after"]
      self.downsample_position = downsample_position
      self.pool = nn.MaxPool3d(
          downsample_scale, downsample_scale, (0, 0, 0), ceil_mode=True
      )
  
imports: import numpy
  import torch
  import torch.nn
  import torch.utils.checkpoint
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new Downampling object from inherited base classes: nn with example: obj = Downampling(inplanes, planes, kernel_size, stride, padding, bias, groups, norm, activation, downsample_position, downsample_scale)