ShulinCao / OpenNRE-PyTorch

Neural Relation Extraction implemented in PyTorch
MIT License
219 stars 45 forks source link

about word_embedding #14

Open liyucheng09 opened 5 years ago

liyucheng09 commented 5 years ago

Source code use nn.Embedding to load pretrained word embedding

nn.Embedding(self.config.data_word_vec.shape[0], self.config.data_word_vec.shape[1])
self.word_embedding.weight.data.copy_(torch.from_numpy(self.config.data_word_vec))

actually optimizer will update both Embedding layer. Is that a bug or just on propose?