From 349609207e0d6b6a2ff1548b8d0773c7857989f0 Mon Sep 17 00:00:00 2001 From: dangqingqing Date: Fri, 15 Dec 2017 16:22:19 +0800 Subject: [PATCH] Fix the error function/GemmConvOp. --- paddle/function/GemmConvOp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/paddle/function/GemmConvOp.cpp b/paddle/function/GemmConvOp.cpp index ffbf366fa..3387cae39 100644 --- a/paddle/function/GemmConvOp.cpp +++ b/paddle/function/GemmConvOp.cpp @@ -126,6 +126,11 @@ public: inputData += inputChannels * inputHeight * inputWidth; outputData += outputChannels * outputHeight * outputWidth; } +#ifdef PADDLE_MOBILE_INFERENCE + if (Device == DEVICE_TYPE_CPU) { + delete memory_; + } +#endif } }; @@ -233,11 +238,6 @@ public: inputGrad += inputChannels * inputHeight * inputWidth; outputGrad += outputChannels * outputHeight * outputWidth; } -#ifdef PADDLE_MOBILE_INFERENCE - if (Device == DEVICE_TYPE_CPU) { - delete memory_; - } -#endif } }; -- GitLab