parameters: (self, word_embed_size, vocab, char_embed_size=50, k=5, padding=1, dropout_rate=0.3)
docstring: Init the Embedding layer for one language
          @param word_embed_size (int): Embedding size (dimensionality) for the output word
          @param vocab (VocabEntry): VocabEntry object. See vocab.py for documentation.
  
          Hints: - You may find len(self.vocab.char2id) useful when create the embedding
docstring_summary: Init the Embedding layer for one language
          @param word_embed_size (int): Embedding size (dimensionality) for the output word
          @param vocab (VocabEntry): VocabEntry object. See vocab.py for documentation.
docstring_tokens: Init the Embedding layer for one language @param word_embed_size ( int ) : Embedding size ( dimensionality ) for the output word @param vocab ( VocabEntry ) : VocabEntry object . See vocab . py for documentation .
function: def __init__(self, word_embed_size, vocab, char_embed_size=50, k=5, padding=1, dropout_rate=0.3):
          """
          Init the Embedding layer for one language
          @param word_embed_size (int): Embedding size (dimensionality) for the output word
          @param vocab (VocabEntry): VocabEntry object. See vocab.py for documentation.
  
          Hints: - You may find len(self.vocab.char2id) useful when create the embedding
          """
          super(ModelEmbeddings, self).__init__()
  
          ### YOUR CODE HERE for part 1h
          self.vocab = vocab # VocabEntry object
          self.word_embed_size = word_embed_size
          self.char_embed_size = char_embed_size
          self.k = k
          self.padding = padding
          self.dropout_rate = dropout_rate
          self.num_char_embeddings = len(vocab.char2id)
          self.char_pad = vocab.char_pad
  
  
          ### DEFAULT
          self.char_mbedding = None
          self.cnn = None
          self.highway = None
          self.dropout = None
  
          ### INITIALIZE VARIABLES
          """
          torch.nn.Embedding(num_embeddings, 
                             embedding_dim, 
                             padding_idx=None, 
                             max_norm=None, 
                             norm_type=2.0, 
                             scale_grad_by_freq=False, 
                             sparse=False, 
                             _weight=None)
          
          Input: (*) , LongTensor of arbitrary shape containing the indices to extract
          Output: (*, H), where * is the input shape and H=embedding_dim
          """
          self.char_embedding = nn.Embedding(num_embeddings = self.num_char_embeddings,
                                             embedding_dim = self.char_embed_size,
                                             padding_idx = self.char_pad
                                            )
          self.cnn = CNN(self.word_embed_size, self.char_embed_size, self.k, self.padding)
          self.highway = Highway(self.word_embed_size)
          self.dropout = nn.Dropout(p=self.dropout_rate)
function_tokens: def __init__ ( self , word_embed_size , vocab , char_embed_size = 50 , k = 5 , padding = 1 , dropout_rate = 0.3 ) : super ( ModelEmbeddings , self ) . __init__ ( ) ### YOUR CODE HERE for part 1h self . vocab = vocab # VocabEntry object self . word_embed_size = word_embed_size self . char_embed_size = char_embed_size self . k = k self . padding = padding self . dropout_rate = dropout_rate self . num_char_embeddings = len ( vocab . char2id ) self . char_pad = vocab . char_pad ### DEFAULT self . char_mbedding = None self . cnn = None self . highway = None self . dropout = None ### INITIALIZE VARIABLES """
          torch.nn.Embedding(num_embeddings, 
                             embedding_dim, 
                             padding_idx=None, 
                             max_norm=None, 
                             norm_type=2.0, 
                             scale_grad_by_freq=False, 
                             sparse=False, 
                             _weight=None)
          
          Input: (*) , LongTensor of arbitrary shape containing the indices to extract
          Output: (*, H), where * is the input shape and H=embedding_dim
          """ self . char_embedding = nn . Embedding ( num_embeddings = self . num_char_embeddings , embedding_dim = self . char_embed_size , padding_idx = self . char_pad ) self . cnn = CNN ( self . word_embed_size , self . char_embed_size , self . k , self . padding ) self . highway = Highway ( self . word_embed_size ) self . dropout = nn . Dropout ( p = self . dropout_rate )