/opt/conda/conda-bld/pytorch_1607370141920/work/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [31,0,0] Assertion t >= 0 && t < n_classes
failed.
这个问题往往是加载图像分类的标签有误。我的是标签差了1,因为往往从0开始,有时不需要减1忘记修改了。