From 09662da0bed9797902db3726737472e11e10dc96 Mon Sep 17 00:00:00 2001 From: chengduoZH Date: Mon, 23 Oct 2017 22:41:41 +0800 Subject: [PATCH] follow comments --- paddle/operators/math/im2col.cc | 2 +- paddle/operators/math/im2col_test.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/paddle/operators/math/im2col.cc b/paddle/operators/math/im2col.cc index d3a736a62d..3b1b0bd71d 100644 --- a/paddle/operators/math/im2col.cc +++ b/paddle/operators/math/im2col.cc @@ -282,7 +282,7 @@ class Col2ImFunctor(input_tmp, *place, *context); + input.CopyFrom(input_tmp, *place, *context); } col2im(*context, input, output_cfo, stride, stride, padding, padding, padding, @@ -138,7 +138,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { in_ptr = input.data(); } else { - input_tmp.CopyFrom(input, paddle::platform::CPUPlace(), *context); + input_tmp.CopyFrom(input, paddle::platform::CPUPlace(), *context); in_ptr = input_tmp.data(); } for (int i = 0; i < 6; ++i) { @@ -150,7 +150,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { input = input_tmp; } else { - input.CopyFrom(input_tmp, *place, *context); + input.CopyFrom(input_tmp, *place, *context); } col2im_ocf(*context, input, output_ocf, stride, stride, padding, padding, @@ -159,7 +159,7 @@ void testIm2col() { if (paddle::platform::is_cpu_place(*place)) { in_ptr = input.data(); } else { - input_tmp.CopyFrom(input, paddle::platform::CPUPlace(), *context); + input_tmp.CopyFrom(input, paddle::platform::CPUPlace(), *context); in_ptr = input_tmp.data(); } for (int i = 0; i < 6; ++i) { -- GitLab