Hi @ptrblck
I have a question about  loss. CrossEntropyLoss gives loss of all of classes, but I want to get loss of class 1 ,how can I get loss of each class?
N, C = 5, 4
loss = nn.CrossEntropyLoss()
data = torch.randn(N, 16, 10, 10)
conv = nn.Conv2d(16, C, (3, 3))
target = torch.empty(N, 8, 8, dtype=torch.long).random_(0, C)
pr=conv(data)
output = loss(pr, target)
output.backward()