aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/ReduceMeanFixture.h
diff options
context:
space:
mode:
authorMichele Di Giorgio <michele.digiorgio@arm.com>2018-09-13 16:22:01 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:55:45 +0000
commited5a492ba791d8c8b3334749d4ae946b8f11d13d (patch)
tree89c8cd6f705dc88a21c61668164aad079800aff7 /tests/validation/fixtures/ReduceMeanFixture.h
parent7e9391bb14d219cda310bff355669b5964b1f576 (diff)
downloadComputeLibrary-ed5a492ba791d8c8b3334749d4ae946b8f11d13d.tar.gz
COMPMID-1586: Add support for NHWC CLDeconvolutionLayer
COMPMID-1651: Fix QASYMM8 CLDeconvolutionLayer This patch also extends the range of values used for testing Convolution and Deconvolution to cover quantized [-1.0f, 1.0f]. Change-Id: I8b280669db67bb3ec25bf5d411c8f5954f5b0dab Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/149869 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Tested-by: bsgcomp <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/ReduceMeanFixture.h')
-rw-r--r--tests/validation/fixtures/ReduceMeanFixture.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/validation/fixtures/ReduceMeanFixture.h b/tests/validation/fixtures/ReduceMeanFixture.h
index 6debd4a038..8692213641 100644
--- a/tests/validation/fixtures/ReduceMeanFixture.h
+++ b/tests/validation/fixtures/ReduceMeanFixture.h
@@ -32,6 +32,7 @@
#include "tests/IAccessor.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Fixture.h"
+#include "tests/validation/Helpers.h"
#include "tests/validation/reference/ReductionOperation.h"
#include "tests/validation/reference/ReshapeLayer.h"
@@ -63,10 +64,8 @@ protected:
}
else
{
- const QuantizationInfo quant_info = tensor.quantization_info();
- const int min_bound = quant_info.quantize(-1.f, RoundingPolicy::TO_NEAREST_UP);
- const int max_bound = quant_info.quantize(1.f, RoundingPolicy::TO_NEAREST_UP);
- std::uniform_int_distribution<> distribution(min_bound, max_bound);
+ std::pair<int, int> bounds = get_quantized_bounds(tensor.quantization_info(), -1.0f, 1.0f);
+ std::uniform_int_distribution<> distribution(bounds.first, bounds.second);
library->fill(tensor, distribution, 0);
}