PyTorch LogSoftmax vs Softmax for CrossEntropyLoss Softmax lets you convert the output from a Linear layer into a categorical probability distribution The pytorch documentation says that CrossEntropyLoss combines nn LogSoftmax() and nn NLLLoss() in one single class