From 9430bc3207953aaade0417e667300886034db65d Mon Sep 17 00:00:00 2001 From: zchen0211 Date: Fri, 11 Aug 2017 11:57:46 -0700 Subject: [PATCH] fix all bugs --- paddle/operators/scatter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/operators/scatter.h b/paddle/operators/scatter.h index 714c022c02..6b542675c2 100644 --- a/paddle/operators/scatter.h +++ b/paddle/operators/scatter.h @@ -75,12 +75,12 @@ void ScatterUpdate(const platform::Place& place, auto dst_dims = output->dims(); // check src shape and dst shape should match - for (size_t i = 1; i < src_dims.size(); i++) + for (int i = 1; i < src_dims.size(); i++) PADDLE_ENFORCE(src_dims[i] == dst_dims[i]); // slice size size_t slice_size = 1; - for (size_t i = 0; i < src_dims.size(); ++i) slice_size *= src_dims[i]; + for (int i = 0; i < src_dims.size(); ++i) slice_size *= src_dims[i]; if (platform::is_cpu_place(place)) { CPUScatterUpdate(src, index->data(), index_size, output); -- GitLab