The line that is interesting is this one: /pytorch/torch/lib/THCUNN/ClassNLLCriterion.cu:101: void cunn_ClassNLLCriterion_updateOutput_kernel(Dtype *, Dtype *, Dtype *, long *, Dtype *, int, int, int, int, long) [with Dtype = float, Acctype = float]: block: [0,0,0], thread: [10,0,0] Assertiont >= 0 && t < n_classes failed..
In the ClassNLLCriterion kernel, the Assertion t >= 0 && t < n_classes failed. so I guess one of the elements of target_var is either smaller than 0 or larger than the number of classes (output size)  You might want to check the content of your labels for your dataset, one look like it’s not valid.