I was a bit confused when testing the nn.NLLLoss() today. For example, let’s say  I have
loss = nn.NLLLoss()
y_hat = torch.FloatTensor([[0.7,0.1,0.2]])
y=torch.LongTensor([0])

Then, loss(y_hat,y) returns -0.7. Isn’t it true that by definition, the NLL in this case should be -log(0.7) = 0.35.
Is there something that I am missing? Any help would be much appreciated