class_docstr: The class for implementing FCENet head.
  
  FCENet(CVPR2021): `Fourier Contour Embedding for Arbitrary-shaped Text
  Detection <https://arxiv.org/abs/2104.10442>`_
  
  Args:
      in_channels (int): The number of input channels.
      fourier_degree (int) : The maximum Fourier transform degree k. Defaults
          to 5.
      module_loss (dict): Config of loss for FCENet. Defaults to
          ``dict(type='FCEModuleLoss', num_sample=50)``.
      postprocessor (dict): Config of postprocessor for FCENet.
      init_cfg (dict, optional): Initialization configs.
class_docstr_tok: ["The","class","for","implementing","FCENet","head",".","FCENet","(","CVPR2021",")",":","`","Fourier","Contour","Embedding","for","Arbitrary-shaped","Text","Detection","<","https",":","\/\/arxiv.org\/abs\/2104.10442",">","`","_","Args",":","in_channels","(","int",")",":","The","number","of","input","channels",".","fourier_degree","(","int",")",":","The","maximum","Fourier","transform","degree","k.","Defaults","to","5.","module_loss","(","dict",")",":","Config","of","loss","for","FCENet",".","Defaults","to","``","dict","(","type='FCEModuleLoss","'",",","num_sample=50",")","``",".","postprocessor","(","dict",")",":","Config","of","postprocessor","for","FCENet",".","init_cfg","(","dict",",","optional",")",":","Initialization","configs","."]
docstr: Forward function for a single feature level.
  
  Args:
      x (Tensor): The input tensor with the shape of :math:`(N, C_i,
          H_i, W_i)`.
  
  Returns:
      Tensor: The classification and regression result with the shape of
      :math:`(N, C_{cls,i}, H_i, W_i)` and :math:`(N, C_{out,i}, H_i,
      W_i)`.
docstr_tok: ["Forward","function","for","a","single","feature","level",".","Args",":","x","(","Tensor",")",":","The","input","tensor","with","the","shape","of",":","math",":","`","(","N",",","C_i",",","H_i",",","W_i",")","`",".","Returns",":","Tensor",":","The","classification","and","regression","result","with","the","shape","of",":","math",":","`","(","N",",","C_","{","cls",",","i","}",",","H_i",",","W_i",")","`","and",":","math",":","`","(","N",",","C_","{","out",",","i","}",",","H_i",",","W_i",")","`","."]
code: def forward_single(self, x: torch.Tensor) -> torch.Tensor:
      """Forward function for a single feature level.
  
      Args:
          x (Tensor): The input tensor with the shape of :math:`(N, C_i,
              H_i, W_i)`.
  
      Returns:
          Tensor: The classification and regression result with the shape of
          :math:`(N, C_{cls,i}, H_i, W_i)` and :math:`(N, C_{out,i}, H_i,
          W_i)`.
      """
      cls_predict = self.out_conv_cls(x)
      reg_predict = self.out_conv_reg(x)
      return cls_predict, reg_predict
  
file_path: mmocr/mmocr/models/textdet/heads/fce_head.py
imports: from typing import Dict, List, Optional
  import torch
  import torch.nn
  from mmdet.models.utils import multi_apply
  from mmocr.models.textdet.heads import BaseTextDetHead
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 3 for calling the FCEHead obj's underlying member method code with example usage: obj.forward_single(x) and returns: cls_predict,  reg_predict