class_docstr: Fixed positional encoding with sine and cosine functions.
code: def __init__(self, d_hid=512, n_position=200, dropout=0):
      super().__init__()
      self.dropout = nn.Dropout(p=dropout)
  
      # Not a parameter
      # Position table of shape (1, n_position, d_hid)
      self.register_buffer(
          "position_table",
          self._get_sinusoid_encoding_table(n_position, d_hid),
      )
  
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from mmocr.registry import MODELS
label_desc: Use image node_id 1 to create a new PositionalEncoding object from inherited base classes: nn with example: obj = PositionalEncoding(d_hid, n_position, dropout)