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

error in Window-Classifier-for-NER model #4

Open airship-explorer opened 6 years ago

airship-explorer commented 6 years ago

In the 4th jupyter file named Word Window Classification and Neural Networks, I found something wrong. Specifically, in the class WindowClassifier, you has used self.softmax = nn.LogSoftmax(dim=1)in the output layer, then you don't need use CrossEntropyLoss() loss, you must use torch.nn.NLLLoss loss