class_docstr: Embedding parallelized in the embedding dimension.
  
  This is mainly adapted from torch.nn.Embedding and all the default
  values are kept.
  Arguments:
      num_embeddings: vocabulary size.
      embedding_dim: size of hidden state.
      init_method: method to initialize weights.
class_docstr_tok: ["Embedding","parallelized","in","the","embedding","dimension",".","This","is","mainly","adapted","from","torch.nn.Embedding","and","all","the","default","values","are","kept",".","Arguments",":","num_embeddings",":","vocabulary","size",".","embedding_dim",":","size","of","hidden","state",".","init_method",":","method","to","initialize","weights","."]
code: def forward(self, input_: torch.Tensor) -> torch.Tensor:  # type: ignore
      input_parallel = copy_to_model_parallel_region(input_)
      output_parallel = F.embedding(
          input_parallel,
          self.weight,
          self.padding_idx,
          self.max_norm,
          self.norm_type,
          self.scale_grad_by_freq,
          self.sparse,
      )
      output = gather_from_model_parallel_region(output_parallel)
      return output
  
imports: from typing import Callable, Optional
  import torch
  import torch.nn.functional
  import torch.nn.init
  from torch.nn.parameter import Parameter
  from .initialize import get_model_parallel_rank, get_model_parallel_world_size
  from .mappings import copy_to_model_parallel_region, gather_from_model_parallel_region, reduce_from_model_parallel_region, scatter_to_model_parallel_region
  from .utils import VocabUtility, divide_and_check_no_remainder
label_desc: Use image node_id 2 for calling the ParallelEmbedding obj's underlying member method code with example usage: obj.forward(input_) and returns: output