class_docstr: Position embedding with learnable embedding weights.
  
  Args:
      num_feats (int): The feature dimension for each position
          along x-axis or y-axis. The final returned dimension for
          each position is 2 times of this value.
      row_num_embed (int, optional): The dictionary size of row embeddings.
          Default 50.
      col_num_embed (int, optional): The dictionary size of col embeddings.
          Default 50.
code: def __init__(self, num_feats, row_num_embed=50, col_num_embed=50):
      super(LearnedPositionalEncoding, self).__init__()
      self.row_embed = nn.Embedding(row_num_embed, num_feats)
      self.col_embed = nn.Embedding(col_num_embed, num_feats)
      self.num_feats = num_feats
      self.row_num_embed = row_num_embed
      self.col_num_embed = col_num_embed
      self.init_weights()
  
file_path: insightface/detection/scrfd/mmdet/models/utils/positional_encoding.py
imports: import math
  import torch
  import torch.nn
  from mmcv.cnn import uniform_init
  from .builder import POSITIONAL_ENCODING
label_desc: Use image node_id 1 to create a new LearnedPositionalEncoding object from inherited base classes: nn with example: obj = LearnedPositionalEncoding(num_feats, row_num_embed, col_num_embed)