class_docstr: -- (act) -- (conv) -- (norm) --
class_docstr_tok: ["--","(","act",")","--","(","conv",")","--","(","norm",")","--"]
docstr: Args:
      in_channel: number of input channels.
      out_channel: number of output channels.
      kernel_size: kernel size to be expanded to 3D.
      padding: padding size to be expanded to 3D.
      mode: mode for the anisotropic kernels:
  
          - 0: ``(k, k, 1)``, ``(1, 1, k)``,
          - 1: ``(k, 1, k)``, ``(1, k, 1)``,
          - 2: ``(1, k, k)``. ``(k, 1, 1)``.
  
      act_name: activation layer type and arguments.
      norm_name: feature normalization type and arguments.
docstr_tok: ["Args",":","in_channel",":","number","of","input","channels",".","out_channel",":","number","of","output","channels",".","kernel_size",":","kernel","size","to","be","expanded","to","3D",".","padding",":","padding","size","to","be","expanded","to","3D",".","mode",":","mode","for","the","anisotropic","kernels",":","-","0",":","``","(","k",",","k",",","1",")","``",",","``","(","1",",","1",",","k",")","``",",","-","1",":","``","(","k",",","1",",","k",")","``",",","``","(","1",",","k",",","1",")","``",",","-","2",":","``","(","1",",","k",",","k",")","``",".","``","(","k",",","1",",","1",")","``",".","act_name",":","activation","layer","type","and","arguments",".","norm_name",":","feature","normalization","type","and","arguments","."]
code: def __init__(
      self,
      in_channel: int,
      out_channel: int,
      kernel_size: int,
      padding: int,
      mode: int = 0,
      act_name: tuple | str = "RELU",
      norm_name: tuple | str = ("INSTANCE", {"affine": True}),
  ):
      """
      Args:
          in_channel: number of input channels.
          out_channel: number of output channels.
          kernel_size: kernel size to be expanded to 3D.
          padding: padding size to be expanded to 3D.
          mode: mode for the anisotropic kernels:
  
              - 0: ``(k, k, 1)``, ``(1, 1, k)``,
              - 1: ``(k, 1, k)``, ``(1, k, 1)``,
              - 2: ``(1, k, k)``. ``(k, 1, 1)``.
  
          act_name: activation layer type and arguments.
          norm_name: feature normalization type and arguments.
      """
      super().__init__()
      self._in_channel = in_channel
      self._out_channel = out_channel
      self._p3dmode = int(mode)
  
      conv_type = Conv[Conv.CONV, 3]
  
      if self._p3dmode == 0:  # (k, k, 1), (1, 1, k)
          kernel_size0 = (kernel_size, kernel_size, 1)
          kernel_size1 = (1, 1, kernel_size)
          padding0 = (padding, padding, 0)
          padding1 = (0, 0, padding)
      elif self._p3dmode == 1:  # (k, 1, k), (1, k, 1)
          kernel_size0 = (kernel_size, 1, kernel_size)
          kernel_size1 = (1, kernel_size, 1)
          padding0 = (padding, 0, padding)
          padding1 = (0, padding, 0)
      elif self._p3dmode == 2:  # (1, k, k), (k, 1, 1)
          kernel_size0 = (1, kernel_size, kernel_size)
          kernel_size1 = (kernel_size, 1, 1)
          padding0 = (0, padding, padding)
          padding1 = (padding, 0, 0)
      else:
          raise ValueError("`mode` must be 0, 1, or 2.")
  
      self.add_module("acti", get_act_layer(name=act_name))
      self.add_module(
          "conv",
          conv_type(
              in_channels=self._in_channel,
              out_channels=self._in_channel,
              kernel_size=kernel_size0,
              stride=1,
              padding=padding0,
              groups=1,
              bias=False,
              dilation=1,
          ),
      )
      self.add_module(
          "conv_1",
          conv_type(
              in_channels=self._in_channel,
              out_channels=self._out_channel,
              kernel_size=kernel_size1,
              stride=1,
              padding=padding1,
              groups=1,
              bias=False,
              dilation=1,
          ),
      )
      self.add_module(
          "norm",
          get_norm_layer(
              name=norm_name, spatial_dims=3, channels=self._out_channel
          ),
      )
  
file_path: MONAI/monai/networks/blocks/dints_block.py
imports: from __future__ import annotations
  import torch
  from monai.networks.layers.factories import Conv
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
label_desc: Use image node_id 1 to create a new P3DActiConvNormBlock object from inherited base classes: torch.nn with example: obj = P3DActiConvNormBlock(in_channel, out_channel, kernel_size, padding, mode, act_name, norm_name)