Hi,
I have a softmax output over a list: [10, 11, 12, 13, 14, 15, 16, 17, 18], where each number represents the word token index. The softmax predicts the probability distribution as [1,9] tensor. And the ground truth label is 13.
I want to compute the NLL loss between ground truth label: 13, and the prediction. Since the length of list is 9, it gave me error as:
RuntimeError: Assertion
cur_target >= 0 && cur_target < n_classes’ failed. at …/aten/src/THNN/generic/ClassNLLCriterion.c:94`
I thought the NLLLoss could take ground truth label as it is, is that true?