BUG解决:SpatialClassNLLCriterion.cu:103:void cunn_SpatialClassNLLCriterion_updateOutput_kernel

报错信息:

/opt/conda/conda-bld/pytorch_1556653183467/work/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103:
void cunn_SpatialClassNLLCriterion_updateOutput_kernel
(T *, T *, T *, long *, T *, int, int, int, int, int, long)
[with T = float, AccumT = float]: 
block: [0,0,0], thread: [277,0,0]
Assertion `t >= 0 && t < n_classes` failed.

检查三个地方:

  1. 标签类别数;
  2. 标签中类别的表示,是不是 从 0类别数-1
  3. 网络中输出的类别数

一般如果数据确定没问题,那就是网络输出的问题。

你可能感兴趣的:(深度学习,#,PyTorch)