class_docstr: ResBlock employs skip connection and two convolution blocks and is used
  in SegResNet based on `3D MRI brain tumor segmentation using autoencoder regularization
  <https://arxiv.org/pdf/1810.11654.pdf>`_.
docstr: Args:
      spatial_dims: number of spatial dimensions, could be 1, 2 or 3.
      in_channels: number of input channels.
      norm: feature normalization type and arguments.
      kernel_size: convolution kernel size, the value should be an odd number. Defaults to 3.
      act: activation type and arguments. Defaults to ``RELU``.
code: def __init__(
      self,
      spatial_dims: int,
      in_channels: int,
      norm: tuple | str,
      kernel_size: int = 3,
      act: tuple | str = ("RELU", {"inplace": True}),
  ) -> None:
      """
      Args:
          spatial_dims: number of spatial dimensions, could be 1, 2 or 3.
          in_channels: number of input channels.
          norm: feature normalization type and arguments.
          kernel_size: convolution kernel size, the value should be an odd number. Defaults to 3.
          act: activation type and arguments. Defaults to ``RELU``.
      """
  
      super().__init__()
  
      if kernel_size % 2 != 1:
          raise AssertionError("kernel_size should be an odd number.")
  
      self.norm1 = get_norm_layer(
          name=norm, spatial_dims=spatial_dims, channels=in_channels
      )
      self.norm2 = get_norm_layer(
          name=norm, spatial_dims=spatial_dims, channels=in_channels
      )
      self.act = get_act_layer(act)
      self.conv1 = get_conv_layer(
          spatial_dims,
          in_channels=in_channels,
          out_channels=in_channels,
          kernel_size=kernel_size,
      )
      self.conv2 = get_conv_layer(
          spatial_dims,
          in_channels=in_channels,
          out_channels=in_channels,
          kernel_size=kernel_size,
      )
  
file_path: MONAI/monai/networks/blocks/segresnet_block.py
imports: from __future__ import annotations
  import torch.nn
  from monai.networks.blocks.convolutions import Convolution
  from monai.networks.blocks.upsample import UpSample
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
  from monai.utils import InterpolateMode, UpsampleMode
label_desc: Use image node_id 1 to create a new ResBlock object from inherited base classes: nn with example: obj = ResBlock(spatial_dims, in_channels, norm, kernel_size, act)