after changing

y to y-1

in dataset class, with

loss = criterion(outputs, labels.squeeze())

the error is:

RuntimeError: Assertion `cur_target >= 0 && cur_target < n_classes’ failed.  at /Users/administrator/nightlies/pytorch-1.0.0/wheel_build_dirs/conda_3.7/conda/conda-bld/pytorch_1544144746443/work/aten/src/THNN/generic/ClassNLLCriterion.c:93

and with

loss = criterion(outputs, labels)

, the error is:

RuntimeError: multi-target not supported at /Users/administrator/nightlies/pytorch-1.0.0/wheel_build_dirs/conda_3.7/conda/conda-bld/pytorch_1544144746443/work/aten/src/THNN/generic/ClassNLLCriterion.c:21