class_docstr: Word embedding class.
  
  Parameters
  ----------
  vocab_size : int
      The word vocabulary size.
  emb_size : int
      The word embedding size.
  padding_idx : int, optional
      The padding index, default: ``0``.
  pretrained_word_emb : numpy.ndarray, optional
      The pretrained word embeddings, default: ``None``.
  fix_emb : boolean, optional
      Specify whether to fix pretrained word embeddings, default: ``True``.
  
  Examples
  ----------
  >>> emb_layer = WordEmbedding(500, 300, padding_idx=0, pretrained_word_emb=None, fix_emb=True)
class_docstr_tok: ["Word","embedding","class",".","Parameters","--","--","--","--","--","vocab_size",":","int","The","word","vocabulary","size",".","emb_size",":","int","The","word","embedding","size",".","padding_idx",":","int",",","optional","The","padding","index",",","default",":","``","0","``",".","pretrained_word_emb",":","numpy.ndarray",",","optional","The","pretrained","word","embeddings",",","default",":","``","None","``",".","fix_emb",":","boolean",",","optional","Specify","whether","to","fix","pretrained","word","embeddings",",","default",":","``","True","``",".","Examples","--","--","--","--","--",">",">",">","emb_layer","=","WordEmbedding","(","500",",","300",",","padding_idx=0",",","pretrained_word_emb=None",",","fix_emb=True",")"]
code: def weight(self):
      return self.word_emb_layer.weight
  
imports: import torch
  from torch import nn
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
  from ...data.data import from_batch
  from ..utils.bert_utils import convert_text_to_bert_features, extract_bert_hidden_states
  from ..utils.generic_utils import dropout_fn
  from ..utils.padding_utils import pad_4d_vals
  from ..utils.vocab_utils import Vocab
label_desc: Use image node_id 2 for calling the WordEmbedding obj's underlying member method code with example usage: obj.weight() and returns: self