Yes, indeed. The documentation does state this, though, so I either didn’t read it properly at the time or misinterpreted it. https://pytorch.org/docs/stable/nn.html#nllloss 36 :

The input given through a forward call is expected to contain log-probabilities of each class.