class_docstr: SPTS Encoder.
  
  Args:
      d_backbone (int): Backbone output dimension.
      d_model (int): Model output dimension.
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to None.
code: def __init__(
      self,
      d_backbone: int = 2048,
      d_model: int = 256,
      init_cfg: Optional[Union[Dict, List[Dict]]] = None,
  ) -> None:
      super().__init__(init_cfg=init_cfg)
      self.input_proj = nn.Conv2d(d_backbone, d_model, kernel_size=1)
  
file_path: mmocr/projects/SPTS/spts/model/spts_encoder.py
imports: from typing import Dict, List, Optional, Union
  import torch.nn
  from torch import Tensor
  from mmocr.models.textrecog.encoders import BaseEncoder
  from mmocr.registry import MODELS
  from mmocr.structures import TextSpottingDataSample
label_desc: Use image node_id 1 to create a new SPTSEncoder object from inherited base classes: BaseEncoder with example: obj = SPTSEncoder(d_backbone, d_model, init_cfg)