报错解决 | Picodet训练报错

Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Error: C:\home\workspace\Paddle\paddle\phi\kernels\gpu\one_hot_kernel.cu:38 Assertion `p_in_data[idx] >= 0 && p_in_data[idx] < depth` failed. Illegal index value, Input(input) value should be greater than or equal to 0, and less than depth [5], but received [0].
Traceback (most recent call last):
  File "F:\PaddleDetection-release-2.5\tools\train.py", line 172, in <module>
    main()
  File "F:\PaddleDetection-release-2.5\tools\train.py", line 168, in main
    run(FLAGS, cfg)
  File "F:\PaddleDetection-release-2.5\tools\train.py", line 132, in run
    trainer.train(FLAGS.eval)
  File "F:\PaddleDetection-release-2.5\ppdet\engine\trainer.py", line 504, in train
    outputs = model(data)
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in __call__
    return self.forward(*inputs, **kwargs)
  File "F:\PaddleDetection-release-2.5\ppdet\modeling\architectures\meta_arch.py", line 59, in forward
    out = self.get_loss()
  File "F:\PaddleDetection-release-2.5\ppdet\modeling\architectures\picodet.py", line 79, in get_loss
    loss_gfl = self.head.get_loss(head_outs, self.inputs)
  File "F:\PaddleDetection-release-2.5\ppdet\modeling\heads\pico_head.py", line 653, in get_loss
    assigned_labels, assigned_bboxes, assigned_scores = self.static_assigner(
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\paddle\fluid\dygraph\layers.py", line 948, in __call__
    return self.forward(*inputs, **kwargs)
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\paddle\fluid\dygraph\base.py", line 375, in _decorate_function
    return func(*args, **kwargs)
  File "F:\PaddleDetection-release-2.5\ppdet\modeling\assigners\atss_assigner.py", line 201, in forward
    assigned_scores, paddle.to_tensor(ind), axis=-1)
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\paddle\tensor\creation.py", line 546, in to_tensor
    return _to_tensor_non_static(data, dtype, place, stop_gradient)
  File "D:\Anaconda3\envs\pd-2.5\lib\site-packages\paddle\tensor\creation.py", line 405, in _to_tensor_non_static
    return core.eager.Tensor(
OSError: (External) CUDA error(719), unspecified launch failure.
  [Hint: Please search for the error code(719) on website (https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g3f51e3575c2178246db0a94a430e0038) to get Nvidia's official solution and advice about CUDA Error.] (at ..\paddle\phi\backends\gpu\cuda\cuda_info.cc:259)
 

原因1:图像是单通道和三通道混在一起,把图像全部转成三通道再输入

原因2:num_class 里的标签个数没改,核对一下自己的配置文件信息和数据集是否路径对应

  • 10
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值