Example #1
0
 def load_embeddings(self, dict_loc, embedding_loc):
     # optionally load pretrained word embeddings. takes the dictionary of 
     # words in the training data and the location of the embeddings
     load_word_embeddings(dict_loc, embedding_loc, self.embed.weight.data) 
Example #2
0
 def load_embeddings(self, dict_loc, embedding_loc):
     load_word_embeddings(dict_loc, embedding_loc, self.embed.weight.data)