We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0af5e7 commit 8d16de7Copy full SHA for 8d16de7
paddle/fluid/operators/sequence_slice_op.h
@@ -75,11 +75,11 @@ class SequenceSliceOpKernel : public framework::OpKernel<T> {
75
}
76
77
for (size_t i = 0; i < n; ++i) {
78
- PADDLE_ENFORCE_LT(0, offset_data[i],
+ PADDLE_ENFORCE_LE(0, offset_data[i],
79
"The offset[%d] must greater than zero.", i);
80
PADDLE_ENFORCE_LT(0, length_data[i],
81
"The length[%d] must greater than zero.", i);
82
- PADDLE_ENFORCE_LT(lod[0][i] + offset_data[i] + length_data[i],
+ PADDLE_ENFORCE_LE(lod[0][i] + offset_data[i] + length_data[i],
83
lod[0][i + 1], "The target tensor's length overflow.");
84
85
0 commit comments