docstr: Args:
      ids (:obj:`torch.Tensor` of shape ``(batch_size, seq_len)``): Indices of input sequence tokens.
      ids (:obj:`torch.Tensor` of shape ``(batch_size)``): Subscript of input sequence tokens.
  Return:
      :obj:`torch.Tensor` of shape ``(batch_size, seq_len, embedding_size)``: The embedding output.
docstr_tok: ["Args",":","ids","(",":","obj",":","`","torch.Tensor","`","of","shape","``","(","batch_size",",","seq_len",")","``",")",":","Indices","of","input","sequence","tokens",".","ids","(",":","obj",":","`","torch.Tensor","`","of","shape","``","(","batch_size",")","``",")",":","Subscript","of","input","sequence","tokens",".","Return",":",":","obj",":","`","torch.Tensor","`","of","shape","``","(","batch_size",",","seq_len",",","embedding_size",")","``",":","The","embedding","output","."]
code: def forward(self, ids: torch.Tensor, ids_sub: torch.Tensor):
      """
      Args:
          ids (:obj:`torch.Tensor` of shape ``(batch_size, seq_len)``): Indices of input sequence tokens.
          ids (:obj:`torch.Tensor` of shape ``(batch_size)``): Subscript of input sequence tokens.
      Return:
          :obj:`torch.Tensor` of shape ``(batch_size, seq_len, embedding_size)``: The embedding output.
      """  # noqa: E501
  
      embeds = F.embedding(ids, self.weight) / math.sqrt(self.dim_model)
      return self.rotary_emb(embeds, ids_sub)
  
file_path: DeepKE/example/llm/CPM-Bee/src/cpm_live/native_layers/embedding.py
imports: import torch
  import math
  import torch.nn.functional
  from .position_embedding import RotaryEmbedding
  from typing import Optional
label_desc: Use image node_id 2 for calling the EmbeddingExt obj's underlying member method code with example usage: obj.forward(ids, ids_sub) and returns: self