RuntimeError: Assertion `cur_target &gt;= 0 &amp;&amp; cur_target &lt; n_classes' failed. at /opt/conda/conda-bld/pytorch-nightly_1542967201177/work/aten/src/THNN/generic/ClassNLLCriterion.c:93

This is what I get if I set my device to “CPU”