docstr: Args:
      num_features: number of internal channels used for the layer
      in_channels: number of the input channels.
      out_channels: number of the output channels.
      dropout_prob: dropout rate after each dense layer.
      act: activation type and arguments. Defaults to relu.
      norm: feature normalization type and arguments. Defaults to batch norm.
      kernel_size: size of the kernel for >1 convolutions (dependent on mode)
      padding: padding value for >1 convolutions.
docstr_tok: ["Args",":","num_features",":","number","of","internal","channels","used","for","the","layer","in_channels",":","number","of","the","input","channels",".","out_channels",":","number","of","the","output","channels",".","dropout_prob",":","dropout","rate","after","each","dense","layer",".","act",":","activation","type","and","arguments",".","Defaults","to","relu",".","norm",":","feature","normalization","type","and","arguments",".","Defaults","to","batch","norm",".","kernel_size",":","size","of","the","kernel","for",">","1","convolutions","(","dependent","on","mode",")","padding",":","padding","value","for",">","1","convolutions","."]
code: def __init__(
      self,
      num_features: int,
      in_channels: int,
      out_channels: int,
      dropout_prob: float = 0.0,
      act: str | tuple = ("relu", {"inplace": True}),
      norm: str | tuple = "batch",
      kernel_size: int = 3,
      padding: int = 0,
  ) -> None:
      """
      Args:
          num_features: number of internal channels used for the layer
          in_channels: number of the input channels.
          out_channels: number of the output channels.
          dropout_prob: dropout rate after each dense layer.
          act: activation type and arguments. Defaults to relu.
          norm: feature normalization type and arguments. Defaults to batch norm.
          kernel_size: size of the kernel for >1 convolutions (dependent on mode)
          padding: padding value for >1 convolutions.
      """
      super().__init__()
  
      conv_type: Callable = Conv[Conv.CONV, 2]
      dropout_type: Callable = Dropout[Dropout.DROPOUT, 2]
  
      self.layers = nn.Sequential()
  
      self.layers.add_module(
          "preact_bna/bn",
          get_norm_layer(
              name=norm, spatial_dims=2, channels=in_channels
          ),
      )
      self.layers.add_module("preact_bna/relu", get_act_layer(name=act))
      self.layers.add_module(
          "conv1",
          conv_type(
              in_channels, num_features, kernel_size=1, bias=False
          ),
      )
      self.layers.add_module(
          "conv1/norm",
          get_norm_layer(
              name=norm, spatial_dims=2, channels=num_features
          ),
      )
      self.layers.add_module("conv1/relu2", get_act_layer(name=act))
      self.layers.add_module(
          "conv2",
          conv_type(
              num_features,
              out_channels,
              kernel_size=kernel_size,
              padding=padding,
              groups=4,
              bias=False,
          ),
      )
  
      if dropout_prob > 0:
          self.layers.add_module("dropout", dropout_type(dropout_prob))
  
imports: from __future__ import annotations
  import os
  import re
  import warnings
  from collections import OrderedDict
  from collections.abc import Callable, Sequence
  import torch
  import torch.nn
  from monai.apps.utils import download_url
  from monai.networks.blocks import UpSample
  from monai.networks.layers.factories import Conv, Dropout
  from monai.networks.layers.utils import get_act_layer, get_norm_layer
  from monai.utils.enums import HoVerNetBranch, HoVerNetMode, InterpolateMode, UpsampleMode
  from monai.utils.module import export, look_up_option
label_desc: Use image node_id 1 to create a new _DenseLayerDecoder object from inherited base classes: nn with example: obj = _DenseLayerDecoder(num_features, in_channels, out_channels, dropout_prob, act, norm, kernel_size, padding)