Hi,
Sorry I took some time to answer !!
I got this error now, which seems to be appropriate
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [5,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [6,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [7,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [8,0,0] Assertion `t >= 0 && t < n_classes` failed.
/pytorch/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [9,0,0] Assertion `t >= 0 && t < n_classes` failed.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/leo/Venv/test/lib/python3.7/site-packages/torch/tensor.py", line 154, in __repr__
    return torch._tensor_str._str(self)
  File "/home/leo/Venv/test/lib/python3.7/site-packages/torch/_tensor_str.py", line 333, in _str
    tensor_str = _tensor_str(self, indent)
  File "/home/leo/Venv/test/lib/python3.7/site-packages/torch/_tensor_str.py", line 229, in _tensor_str
    formatter = _Formatter(get_summarized_data(self) if summarize else self)
  File "/home/leo/Venv/test/lib/python3.7/site-packages/torch/_tensor_str.py", line 101, in __init__
    nonzero_finite_vals = torch.masked_select(tensor_view, torch.isfinite(tensor_view) & tensor_view.ne(0))
RuntimeError: copy_if failed to synchronize: cudaErrorAssert: device-side assert triggered


Thanks!