当前位置: 代码迷 >> 综合 >> cuda的报的错误调试技巧
  详细解决方案

cuda的报的错误调试技巧

热度:51   发布时间:2024-02-21 20:05:50.0

报错cuda divice error,

实际上是target中有有负数

 

模型换到cpu上跑,一般真正的错误就能显示出来了了,或者距离真正错误更近了/。

    ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
IndexError: Target -1 is out of bounds.

 

  相关解决方案