From 4e3fac4129b3e1ee4a03272f9ed72f7d822589a4 Mon Sep 17 00:00:00 2001 From: Kexin Zhao Date: Fri, 4 May 2018 18:07:31 -0700 Subject: [PATCH] fix sign unsigned comparison (#10424) --- paddle/fluid/operators/lookup_sparse_table_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/lookup_sparse_table_op.cc b/paddle/fluid/operators/lookup_sparse_table_op.cc index f1839e456d..66b626ed79 100644 --- a/paddle/fluid/operators/lookup_sparse_table_op.cc +++ b/paddle/fluid/operators/lookup_sparse_table_op.cc @@ -62,7 +62,7 @@ class LookupSparseTableOp : public framework::OperatorBase { auto w_t = w_var->GetMutable(); std::vector keys; keys.resize(ids_t.numel()); - for (size_t i = 0; i < ids_t.numel(); ++i) { + for (int64_t i = 0; i < ids_t.numel(); ++i) { keys[i] = ids_t.data()[i]; } -- GitLab