From 06b184ac568dc974986bae680957c4477f8ef6ca Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Tue, 29 Aug 2017 16:05:25 +0100 Subject: COMPMID-439 - Refactored NEQuantizationLayer and NEQuantizationLayer in order to support 3D input tensors Change-Id: I03eac2108a30bed56d40dfd52e75577a35d492e0 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/85783 Tested-by: Kaizen Reviewed-by: Michele DiGiorgio Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NEQuantizationLayer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/runtime/NEON/functions/NEQuantizationLayer.cpp') diff --git a/src/runtime/NEON/functions/NEQuantizationLayer.cpp b/src/runtime/NEON/functions/NEQuantizationLayer.cpp index 46b9d7d707..a131c4839b 100644 --- a/src/runtime/NEON/functions/NEQuantizationLayer.cpp +++ b/src/runtime/NEON/functions/NEQuantizationLayer.cpp @@ -30,17 +30,20 @@ using namespace arm_compute; NEQuantizationLayer::NEQuantizationLayer() - : _quantize_kernel(), _min_max_kernel(), _min(0.f), _max(0.f) + : _quantize_kernel(), _min_max_kernel(), _min_max() { } void NEQuantizationLayer::configure(const ITensor *input, ITensor *output) { - // Configure min-max kernel - _min_max_kernel.configure(input, &_min, &_max); + // Configure min-max kernel. _min_max tensor will be auto-configured within the kernel + _min_max_kernel.configure(input, &_min_max); // Configure quantize kernel - _quantize_kernel.configure(input, output, &_min, &_max); + _quantize_kernel.configure(input, output, &_min_max); + + // Allocate min_max tensor + _min_max.allocator()->allocate(); } void NEQuantizationLayer::run() -- cgit v1.2.1