class_docstr: The class for TextSnake head: TextSnake: A Flexible Representation for
  Detecting Text of Arbitrary Shapes.
  
  TextSnake: `A Flexible Representation for Detecting Text of Arbitrary
  Shapes <https://arxiv.org/abs/1807.01544>`_.
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      downsample_ratio (float): Downsample ratio.
      module_loss (dict): Configuration dictionary for loss type.
          Defaults to ``dict(type='TextSnakeModuleLoss')``.
      postprocessor (dict): Config of postprocessor for TextSnake.
      init_cfg (dict or list[dict], optional): Initialization configs.
docstr: Args:
      inputs (torch.Tensor): Shape :math:`(N, C_{in}, H, W)`, where
          :math:`C_{in}` is ``in_channels``. :math:`H` and :math:`W`
          should be the same as the input of backbone.
      data_samples (list[TextDetDataSample], optional): A list of data
          samples. Defaults to None.
  
  Returns:
      Tensor: A tensor of shape :math:`(N, 5, H, W)`, where the five
      channels represent [0]: text score, [1]: center score,
      [2]: sin, [3] cos, [4] radius, respectively.
docstr_tok: ["Args",":","inputs","(","torch.Tensor",")",":","Shape",":","math",":","`","(","N",",","C_","{","in","}",",","H",",","W",")","`",",","where",":","math",":","`","C_","{","in","}","`","is","``","in_channels","``",".",":","math",":","`","H","`","and",":","math",":","`","W","`","should","be","the","same","as","the","input","of","backbone",".","data_samples","(","list","[","TextDetDataSample","]",",","optional",")",":","A","list","of","data","samples",".","Defaults","to","None",".","Returns",":","Tensor",":","A","tensor","of","shape",":","math",":","`","(","N",",","5",",","H",",","W",")","`",",","where","the","five","channels","represent","[","0","]",":","text","score",",","[","1","]",":","center","score",",","[","2","]",":","sin",",","[","3","]","cos",",","[","4","]","radius",",","respectively","."]
code: def forward(
      self,
      inputs: torch.Tensor,
      data_samples: Optional[List[TextDetDataSample]] = None,
  ) -> Dict:
      """
      Args:
          inputs (torch.Tensor): Shape :math:`(N, C_{in}, H, W)`, where
              :math:`C_{in}` is ``in_channels``. :math:`H` and :math:`W`
              should be the same as the input of backbone.
          data_samples (list[TextDetDataSample], optional): A list of data
              samples. Defaults to None.
  
      Returns:
          Tensor: A tensor of shape :math:`(N, 5, H, W)`, where the five
          channels represent [0]: text score, [1]: center score,
          [2]: sin, [3] cos, [4] radius, respectively.
      """
      outputs = self.out_conv(inputs)
      return outputs
  
file_path: mmocr/mmocr/models/textdet/heads/textsnake_head.py
imports: from typing import Dict, List, Optional, Union
  import torch
  import torch.nn
  from mmocr.models.textdet.heads import BaseTextDetHead
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 2 for calling the TextSnakeHead obj's underlying member method code with example usage: obj.forward(inputs, data_samples) and returns: outputs