From efb5c03f6045379636977443fc966ce12576ef6a Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Tue, 13 Nov 2018 16:58:03 +0800 Subject: [PATCH] sgd_op optimize selected rows do not enforce id < height test=develop --- paddle/fluid/operators/sgd_op.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/paddle/fluid/operators/sgd_op.h b/paddle/fluid/operators/sgd_op.h index 2e206c963..b27ef27e2 100644 --- a/paddle/fluid/operators/sgd_op.h +++ b/paddle/fluid/operators/sgd_op.h @@ -109,8 +109,6 @@ class SGDOpKernel : public framework::OpKernel { const auto *grad_data = grad.value().data(); auto *out_data = param_out->mutable_value()->data(); for (size_t i = 0; i < grad.rows().size(); i++) { - PADDLE_ENFORCE(grad.rows()[i] < grad.height(), - "Input rows index should less than height"); int64_t id_index = param_out->AutoGrownIndex(grad.rows()[i], false); PADDLE_ENFORCE_GE(id_index, static_cast(0), "id should be in the table"); -- GitLab