class_docstr: Split to two transformer header at the last layer.
  Cls_layer is used to structure token classification.
  Bbox_layer is used to regress bbox coord.
code: def __init__(
      self,
      in_channels,
      out_channels=30,
      headers=8,
      d_ff=2048,
      dropout=0,
      max_text_length=500,
      loc_reg_num=4,
      **kwargs,
  ):
      super(TableMasterHead, self).__init__()
      hidden_size = in_channels[-1]
      self.layers = clones(
          DecoderLayer(headers, hidden_size, dropout, d_ff), 2
      )
      self.cls_layer = clones(
          DecoderLayer(headers, hidden_size, dropout, d_ff), 1
      )
      self.bbox_layer = clones(
          DecoderLayer(headers, hidden_size, dropout, d_ff), 1
      )
      self.cls_fc = nn.Linear(hidden_size, out_channels)
      self.bbox_fc = nn.Sequential(
          # nn.Linear(hidden_size, hidden_size),
          nn.Linear(hidden_size, loc_reg_num),
          nn.Sigmoid(),
      )
      self.norm = nn.LayerNorm(hidden_size)
      self.embedding = Embeddings(
          d_model=hidden_size, vocab=out_channels
      )
      self.positional_encoding = PositionalEncoding(d_model=hidden_size)
  
      self.SOS = out_channels - 3
      self.PAD = out_channels - 1
      self.out_channels = out_channels
      self.loc_reg_num = loc_reg_num
      self.max_text_length = max_text_length
  
imports: import copy
  import math
  import paddle
  from paddle import nn
  from paddle.nn import functional
label_desc: Use image node_id 1 to create a new TableMasterHead object from inherited base classes: nn with example: obj = TableMasterHead(in_channels, out_channels, headers, d_ff, dropout, max_text_length, loc_reg_num)