DeepNLP-models-Pytorch
DeepNLP-models-Pytorch copied to clipboard
duplicated softmax functions are called in a single model
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.