class_docstr: SegResNet based on `3D MRI brain tumor segmentation using autoencoder regularization
  <https://arxiv.org/pdf/1810.11654.pdf>`_.
  The module does not include the variational autoencoder (VAE).
  The model supports 2D or 3D inputs.
  
  Args:
      spatial_dims: spatial dimension of the input data. Defaults to 3.
      init_filters: number of output channels for initial convolution layer. Defaults to 8.
      in_channels: number of input channels for the network. Defaults to 1.
      out_channels: number of output channels for the network. Defaults to 2.
      dropout_prob: probability of an element to be zero-ed. Defaults to ``None``.
      act: activation type and arguments. Defaults to ``RELU``.
      norm: feature normalization type and arguments. Defaults to ``GROUP``.
      norm_name: deprecating option for feature normalization type.
      num_groups: deprecating option for group norm. parameters.
      use_conv_final: if add a final convolution block to output. Defaults to ``True``.
      blocks_down: number of down sample blocks in each layer. Defaults to ``[1,2,2,4]``.
      blocks_up: number of up sample blocks in each layer. Defaults to ``[1,1,1]``.
      upsample_mode: [``"deconv"``, ``"nontrainable"``, ``"pixelshuffle"``]
          The mode of upsampling manipulations.
          Using the ``nontrainable`` modes cannot guarantee the model's reproducibility. Defaults to``nontrainable``.
  
          - ``deconv``, uses transposed convolution layers.
          - ``nontrainable``, uses non-trainable `linear` interpolation.
          - ``pixelshuffle``, uses :py:class:`monai.networks.blocks.SubpixelUpsample`.
code: def __init__(
      self,
      spatial_dims: int = 3,
      init_filters: int = 8,
      in_channels: int = 1,
      out_channels: int = 2,
      dropout_prob: float | None = None,
      act: tuple | str = ("RELU", {"inplace": True}),
      norm: tuple | str = ("GROUP", {"num_groups": 8}),
      norm_name: str = "",
      num_groups: int = 8,
      use_conv_final: bool = True,
      blocks_down: tuple = (1, 2, 2, 4),
      blocks_up: tuple = (1, 1, 1),
      upsample_mode: UpsampleMode | str = UpsampleMode.NONTRAINABLE,
  ):
      super().__init__()
  
      if spatial_dims not in (2, 3):
          raise ValueError("`spatial_dims` can only be 2 or 3.")
  
      self.spatial_dims = spatial_dims
      self.init_filters = init_filters
      self.in_channels = in_channels
      self.blocks_down = blocks_down
      self.blocks_up = blocks_up
      self.dropout_prob = dropout_prob
      self.act = act  # input options
      self.act_mod = get_act_layer(act)
      if norm_name:
          if norm_name.lower() != "group":
              raise ValueError(
                  f"Deprecating option 'norm_name={norm_name}', please use 'norm' instead."
              )
          norm = ("group", {"num_groups": num_groups})
      self.norm = norm
      self.upsample_mode = UpsampleMode(upsample_mode)
      self.use_conv_final = use_conv_final
      self.convInit = get_conv_layer(
          spatial_dims, in_channels, init_filters
      )
      self.down_layers = self._make_down_layers()
      self.up_layers, self.up_samples = self._make_up_layers()
      self.conv_final = self._make_final_conv(out_channels)
  
      if dropout_prob is not None:
          self.dropout = Dropout[Dropout.DROPOUT, spatial_dims](
              dropout_prob
          )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from monai.networks.blocks.segresnet_block import ResBlock, get_conv_layer, get_upsample_layer
  from monai.networks.layers.factories import Dropout
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
  from monai.utils import UpsampleMode
label_desc: Use image node_id 1 to create a new SegResNet object from inherited base classes: nn with example: obj = SegResNet(spatial_dims, init_filters, in_channels, out_channels, dropout_prob, act, norm, norm_name, num_groups, use_conv_final, blocks_down, blocks_up, upsample_mode)