diff --git a/paddle/fluid/operators/math/matrix_bit_code.h b/paddle/fluid/operators/math/matrix_bit_code.h index 1e2abd1e697a212772f8f757bd5669263e84832f..39c3b1520b41e0d3a7c441f372de2cd44b3f0b67 100644 --- a/paddle/fluid/operators/math/matrix_bit_code.h +++ b/paddle/fluid/operators/math/matrix_bit_code.h @@ -159,7 +159,7 @@ class CustomCode : public Code { for (int i = 0; i < static_cast(ptable_->dims()[1]); i++) { if (ptable_->data()[index_ * static_cast(ptable_->dims()[1]) + - i] != -1) { + i] >= 0) { length++; } else { return length;