class_docstr: Decoder module in `SVTR <https://arxiv.org/abs/2205.00159>`_.
  
  Args:
      in_channels (int): The num of input channels.
      dictionary (Union[Dict, Dictionary]): The config for `Dictionary` or
          the instance of `Dictionary`. Defaults to None.
      module_loss (Optional[Dict], optional): Cfg to build module_loss.
          Defaults to None.
      postprocessor (Optional[Dict], optional): Cfg to build postprocessor.
          Defaults to None.
      max_seq_len (int, optional): Maximum output sequence length :math:`T`.
          Defaults to 25.
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to None.
code: def __init__(
      self,
      in_channels: int,
      dictionary: Union[Dict, Dictionary] = None,
      module_loss: Optional[Dict] = None,
      postprocessor: Optional[Dict] = None,
      max_seq_len: int = 25,
      init_cfg: Optional[Union[Dict, List[Dict]]] = None,
  ) -> None:
      super().__init__(
          dictionary=dictionary,
          module_loss=module_loss,
          postprocessor=postprocessor,
          max_seq_len=max_seq_len,
          init_cfg=init_cfg,
      )
  
      self.decoder = nn.Linear(
          in_features=in_channels,
          out_features=self.dictionary.num_classes,
      )
      self.softmax = nn.Softmax(dim=-1)
  
file_path: mmocr/mmocr/models/textrecog/decoders/svtr_decoder.py
imports: from typing import Dict, List, Optional, Sequence, Union
  import torch
  import torch.nn
  from mmocr.models.common.dictionary import Dictionary
  from mmocr.registry import MODELS
  from mmocr.structures import TextRecogDataSample
  from .base import BaseDecoder
label_desc: Use image node_id 1 to create a new SVTRDecoder object from inherited base classes: BaseDecoder with example: obj = SVTRDecoder(in_channels, dictionary, module_loss, postprocessor, max_seq_len, init_cfg)