Skip to content

Commit 6cf8f24

Browse files
authored
Merge pull request #14389 from jacquesqiao/fix_sgd_op_optimize_sparse_table
sgd_op optimize selected rows do not enforce id < height
2 parents 7066b38 + efb5c03 commit 6cf8f24

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

paddle/fluid/operators/sgd_op.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ class SGDOpKernel : public framework::OpKernel<T> {
109109
const auto *grad_data = grad.value().data<T>();
110110
auto *out_data = param_out->mutable_value()->data<T>();
111111
for (size_t i = 0; i < grad.rows().size(); i++) {
112-
PADDLE_ENFORCE(grad.rows()[i] < grad.height(),
113-
"Input rows index should less than height");
114112
int64_t id_index = param_out->AutoGrownIndex(grad.rows()[i], false);
115113
PADDLE_ENFORCE_GE(id_index, static_cast<int64_t>(0),
116114
"id should be in the table");

0 commit comments

Comments
 (0)