DSKSD / DeepNLP-models-Pytorch

Pytorch implementations of various Deep NLP models in cs-224n(Stanford Univ)
MIT License
2.95k stars 660 forks source link

about pretrained embeddings #12

Open ShellingFord221 opened 5 years ago

ShellingFord221 commented 5 years ago

Hi, I have a little question about file 08.CNN-for-Text-Classification.ipynb, [96], line 4: pretrained.append(model[word2index[key]]). word2index[key] means to find key's index, then you should find its pretrained embedding in GoogleNews-vectors-negative300.bin. But the index in this bin file should be different from the index generated from TREC dataset, i.e. model[key's index] may not be this key's (word's) embedding. Thanks!

DSKSD commented 5 years ago

Hi, Yeah you're right. There are some bugs in this project.. However, I don't have enough time to deal with issues in ad-hoc manner. So I'm preparing version-up of this repo. Thank you