docstr: Get the initial token embeddings that considers the token type and positional embeddings
  
  Parameters
  ----------
  inputs
      - layout = 'NT'
          Shape (batch_size, seq_length)
      - layout = 'TN'
          Shape (seq_length, batch_size)
  
  prev_len
      The previous length. It will be a scalar.
  
  Returns
  -------
  embedding
      - layout = 'NT'
          Shape (batch_size, seq_length, C)
      - layout = 'TN'
          Shape (seq_length, batch_size, C)
docstr_tok: ["Get","the","initial","token","embeddings","that","considers","the","token","type","and","positional","embeddings","Parameters","--","--","--","--","--","inputs","-","layout","=","'NT'","Shape","(","batch_size",",","seq_length",")","-","layout","=","'TN'","Shape","(","seq_length",",","batch_size",")","prev_len","The","previous","length",".","It","will","be","a","scalar",".","Returns","--","--","--","-","embedding","-","layout","=","'NT'","Shape","(","batch_size",",","seq_length",",","C",")","-","layout","=","'TN'","Shape","(","seq_length",",","batch_size",",","C",")"]
code: def get_initial_embedding(self, inputs, prev_len):
      """Get the initial token embeddings that considers the token type and positional embeddings
  
      Parameters
      ----------
      inputs
          - layout = 'NT'
              Shape (batch_size, seq_length)
          - layout = 'TN'
              Shape (seq_length, batch_size)
  
      prev_len
          The previous length. It will be a scalar.
  
      Returns
      -------
      embedding
          - layout = 'NT'
              Shape (batch_size, seq_length, C)
          - layout = 'TN'
              Shape (seq_length, batch_size, C)
  
      """
      embedding = self._embed(inputs)
      if self._layout == "NT":
          batch_axis, time_axis = 0, 1
      else:
          batch_axis, time_axis = 1, 0
      if self._pos_embed_type is not None:
          pos = npx.arange_like(inputs, axis=time_axis)
          if prev_len is not None:
              pos = pos + prev_len
          positional_embedding = self._pos_embed(pos)
          positional_embedding = np.expand_dims(
              positional_embedding, axis=batch_axis
          )
          embedding = embedding + positional_embedding
      embedding = self._embed_dropout(embedding)
      return embedding
  
imports: import os
  from typing import Tuple
  import mxnet
  from mxnet import use_np, np, npx
  from mxnet.gluon import HybridBlock, nn
  from .base import BACKBONE_REGISTRY
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..utils.config import CfgNode
  from ..utils.misc import load_checksum_stats, download
  from ..utils.registry import Registry
  from ..initializer import TruncNorm
  from ..attention_cell import MultiHeadAttentionCell
  from ..layers import get_activation, PositionalEmbedding
  from ..data.tokenizers import HuggingFaceByteBPETokenizer
label_desc: Use image node_id 4 for calling the GPT2Model obj's underlying member method code with example usage: obj.get_initial_embedding(inputs, prev_len) and returns: embedding