未验证 提交 71b6bdb5 编写于 作者: S Siddharth Goyal 提交者: GitHub

Fix signed-unsigned comparison warning (#11167)

上级 c7002f5b
......@@ -114,7 +114,7 @@ class SGDOpKernel : public framework::OpKernel<T> {
int64_t id_index = param.Index(grad.rows()[i]);
PADDLE_ENFORCE_GE(id_index, static_cast<int64_t>(0),
"id should be in the table");
for (size_t j = 0; j < grad_row_width; j++) {
for (int64_t j = 0; j < grad_row_width; j++) {
out_data[id_index * grad_row_width + j] -=
lr[0] * grad_data[i * grad_row_width + j];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册