From 804c7671076eb944e64caa0112f943fb2cb08ece Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Wed, 20 Jun 2018 21:11:54 +0800 Subject: [PATCH] fix concat warning --- paddle/fluid/operators/math/concat.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/math/concat.cc b/paddle/fluid/operators/math/concat.cc index 14964fc62a..55c8a472ac 100644 --- a/paddle/fluid/operators/math/concat.cc +++ b/paddle/fluid/operators/math/concat.cc @@ -93,10 +93,10 @@ class ConcatGradFunctor { auto cpu_place = boost::get(context.GetPlace()); // computation - for (size_t k = 0; k < input_rows; ++k) { + for (int k = 0; k < input_rows; ++k) { const T* src_ptr = input.data() + k * input_cols; int col_idx = 0; - for (int j = 0; j < num; ++j) { + for (size_t j = 0; j < num; ++j) { int col_len = output_cols[j]; auto* out_tensor = outputs->at(j); if (out_tensor != nullptr) {