DeepNLP-models-Pytorch icon indicating copy to clipboard operation
DeepNLP-models-Pytorch copied to clipboard

duplicated softmax functions are called in a single model

Open shengyehchen opened this issue 7 years ago • 0 comments

torch.nn.CrossEntropyLoss() combines LogSoftMax and NLLLoss in one single class. Thus, there should be only "return out" instead of return "F.log_softmax(out)" in the forward() function of some classification models.

shengyehchen avatar Nov 17 '17 08:11 shengyehchen