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 encode(
      self, x: torch.Tensor
  ) -> tuple[torch.Tensor, list[torch.Tensor]]:
      x = self.convInit(x)
      if self.dropout_prob is not None:
          x = self.dropout(x)
  
      down_x = []
  
      for down in self.down_layers:
          x = down(x)
          down_x.append(x)
  
      return x, down_x
  
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 5 for calling the SegResNet obj's underlying member method code with example usage: obj.encode(x) and returns: x,  down_x