From afbc5ffb0b567ae93fa2765066bd136d72be88ff Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 3 Oct 2018 14:18:19 +0100 Subject: COMPMID-1621 Deconvolution wrong output calculation Change-Id: Ida71312bcf6dbd854f2ab1efc65f74910c79e152 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/151510 Tested-by: bsgcomp Reviewed-by: Michele DiGiorgio --- arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arm_compute/runtime/CL/functions') diff --git a/arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h b/arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h index 4dce1e1801..6716cd6fdd 100644 --- a/arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h +++ b/arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h @@ -27,6 +27,8 @@ #include "arm_compute/runtime/CL/functions/CLConvolutionLayer.h" #include "arm_compute/runtime/CL/functions/CLDeconvolutionLayerUpsample.h" +#include "arm_compute/core/CPP/kernels/CPPFlipWeightsKernel.h" + #include "arm_compute/runtime/CL/CLMemoryGroup.h" #include "arm_compute/runtime/CL/CLTensor.h" #include "arm_compute/runtime/IFunction.h" @@ -62,6 +64,14 @@ class CLDeconvolutionLayer : public IFunction public: /** Constructor */ CLDeconvolutionLayer(std::shared_ptr memory_manager = nullptr); + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLDeconvolutionLayer(const CLDeconvolutionLayer &) = delete; + /** Default move constructor */ + CLDeconvolutionLayer(CLDeconvolutionLayer &&) = default; + /** Prevent instances of this class from being copied (As this class contains pointers) */ + CLDeconvolutionLayer &operator=(const CLDeconvolutionLayer &) = delete; + /** Default move assignment operator */ + CLDeconvolutionLayer &operator=(CLDeconvolutionLayer &&) = default; /** Set the input, weights, biases and output tensors. * * @param[in,out] input Input tensor. 3 lower dimensions represent a single input, and an optional 4th dimension for batch of inputs. Data types supported: QASYMM8/F16/F32. @@ -74,7 +84,7 @@ public: * @param[in] weights_info (Optional) Weights information needed for @ref CLConvolutionLayer, specifies if the weights tensor has been reshaped with @ref CLWeightsReshapeKernel. * */ - void configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &info, + void configure(ICLTensor *input, ICLTensor *weights, const ICLTensor *bias, ICLTensor *output, const PadStrideInfo &info, unsigned int inner_border_right, unsigned int inner_border_top, const WeightsInfo &weights_info = WeightsInfo()); /** Static function to check if given info will lead to a valid configuration of @ref CLDeconvolutionLayer * @@ -100,7 +110,10 @@ private: CLMemoryGroup _memory_group; CLDeconvolutionLayerUpsample _scale_f; CLConvolutionLayer _conv_f; + CPPFlipWeightsKernel _flip_weights; CLTensor _scaled_output; + ICLTensor *_weights; + CLTensor _weights_flipped; bool _is_prepared; }; } -- cgit v1.2.1