diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2017-08-29 16:05:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 06b184ac568dc974986bae680957c4477f8ef6ca (patch) | |
tree | fa97d020f81f9a17edb6b50394f2bdf46f810ce9 /src/runtime/NEON/functions/NEQuantizationLayer.cpp | |
parent | 351c20a361521101307d365a4f91ad883fa272ea (diff) | |
download | ComputeLibrary-06b184ac568dc974986bae680957c4477f8ef6ca.tar.gz |
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 <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEQuantizationLayer.cpp')
-rw-r--r-- | src/runtime/NEON/functions/NEQuantizationLayer.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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() |