Easy-to-use image segmentation library with awesome pre-trained model zoo, supporting wide-range of practical tasks in Semantic Segmentation, Interactive Segmentation, Panoptic Segmentation, Image Matting, 3D Segmentation, etc.
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 [2], but received [0]. #3684
[X] 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.
请提出你的问题 Please ask your question
Error: ../paddle/phi/kernels/gpu/one_hot_kernel.cu:37 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 [2], but received [0].
Error: ../paddle/phi/kernels/gpu/one_hot_kernel.cu:37 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 [2], but received [0].
Traceback (most recent call last):
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/tools/train.py", line 194, in
main(args)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/tools/train.py", line 173, in main
train(
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/core/train.py", line 194, in train
loss_list = loss_computation(
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/core/train.py", line 50, in loss_computation
loss_list.append(losses['coef'][i] loss_i(logits, labels))
File "/root/anaconda3/lib/python3.9/site-packages/paddle/nn/layer/layers.py", line 1254, in call
return self.forward(inputs, *kwargs)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/mixed_loss.py", line 56, in forward
output = loss(logits, labels)
File "/root/anaconda3/lib/python3.9/site-packages/paddle/nn/layer/layers.py", line 1254, in call
return self.forward(inputs, **kwargs)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/lovasz_loss.py", line 52, in forward
vprobas, vlabels = flatten_probas(probas, labels, self.ignore_index)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/lovasz_loss.py", line 218, in flatten_probas
indexs = paddle.nonzero(valid_mask)
File "/root/anaconda3/lib/python3.9/site-packages/paddle/tensor/search.py", line 433, in nonzero
outs = _C_ops.nonzero(x)
OSError: (External) CUDA error(719), unspecified launch failure.
[Hint: 'cudaErrorLaunchFailure'. An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointerand accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases canbe found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work willreturn the same error. To continue using CUDA, the process must be terminated and relaunched.] (at ../paddle/phi/backends/gpu/cuda/cuda_info.cc:260)
问题确认 Search before asking
请提出你的问题 Please ask your question
Error: ../paddle/phi/kernels/gpu/one_hot_kernel.cu:37 Assertion
main(args)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/tools/train.py", line 173, in main
train(
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/core/train.py", line 194, in train
loss_list = loss_computation(
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/core/train.py", line 50, in loss_computation
loss_list.append(losses['coef'][i] loss_i(logits, labels))
File "/root/anaconda3/lib/python3.9/site-packages/paddle/nn/layer/layers.py", line 1254, in call
return self.forward(inputs, *kwargs)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/mixed_loss.py", line 56, in forward
output = loss(logits, labels)
File "/root/anaconda3/lib/python3.9/site-packages/paddle/nn/layer/layers.py", line 1254, in call
return self.forward(inputs, **kwargs)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/lovasz_loss.py", line 52, in forward
vprobas, vlabels = flatten_probas(probas, labels, self.ignore_index)
File "/ssd2/lyg/code/baidu/third-party/paddle-seg/paddleseg/models/losses/lovasz_loss.py", line 218, in flatten_probas
indexs = paddle.nonzero(valid_mask)
File "/root/anaconda3/lib/python3.9/site-packages/paddle/tensor/search.py", line 433, in nonzero
outs = _C_ops.nonzero(x)
OSError: (External) CUDA error(719), unspecified launch failure.
[Hint: 'cudaErrorLaunchFailure'. An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointerand accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases canbe found in the system specific user guide. This leaves the process in an inconsistent state and any further CUDA work willreturn the same error. To continue using CUDA, the process must be terminated and relaunched.] (at ../paddle/phi/backends/gpu/cuda/cuda_info.cc:260)
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 [2], but received [0]. Error: ../paddle/phi/kernels/gpu/one_hot_kernel.cu:37 Assertionp_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 [2], but received [0]. Traceback (most recent call last): File "/ssd2/lyg/code/baidu/third-party/paddle-seg/tools/train.py", line 194, in就是两个类别,标签是0,居然还提示错误。。。