From 46a49a0a8206f0efa7afd514940e180a88ffd732 Mon Sep 17 00:00:00 2001 From: giuros01 Date: Mon, 1 Apr 2019 13:50:22 +0100 Subject: COMPMID-1635: Optimize CLDeconvolutionLayer - Part III Change-Id: Id2661e093a669ef3eaf2a5116cd278a80c1d5a89 Signed-off-by: giuros01 Reviewed-on: https://review.mlplatform.org/c/935 Reviewed-by: Gian Marco Iodice Comments-Addressed: Gian Marco Iodice Reviewed-by: Isabella Gottardi Comments-Addressed: Isabella Gottardi Tested-by: Isabella Gottardi Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp') diff --git a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp index 721054dcf3..6e14e26cbd 100644 --- a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp @@ -28,7 +28,6 @@ #include "arm_compute/core/Validate.h" #include "arm_compute/core/utils/misc/ShapeCalculator.h" #include "arm_compute/runtime/CL/CLScheduler.h" -#include "utils/TypePrinter.h" #include #include @@ -161,8 +160,16 @@ void CLDirectDeconvolutionLayer::configure(ICLTensor *input, ICLTensor *weights, _flip_axis.allocator()->allocate(); _flip_axis.map(true); auto axis_data = reinterpret_cast(_flip_axis.buffer()); - axis_data[0] = 0; - axis_data[1] = 1; + if(weights->info()->data_layout() == DataLayout::NHWC) + { + axis_data[0] = 1; + axis_data[1] = 2; + } + else + { + axis_data[0] = 0; + axis_data[1] = 1; + } _flip_axis.unmap(); } -- cgit v1.2.1