diff --git a/paddle/fluid/operators/sum_op.h b/paddle/fluid/operators/sum_op.h index 84b418bd307b7ba458bf340a81e0ee2036113be9..d3c905c0b86906fd6d1ef98f257e057ab8458131 100644 --- a/paddle/fluid/operators/sum_op.h +++ b/paddle/fluid/operators/sum_op.h @@ -100,7 +100,7 @@ class SumKernel : public framework::OpKernel { inputs.push_back(&temp_in0); for (size_t i = 1; i < in_vars.size(); ++i) { auto &in = in_vars[i]->Get(); - if (!in.rows().empty()) { + if (in.rows().size() > 0) { inputs.push_back(&in); } }