From 93c70b8d7c69ddcee58162c2618aa0e898b4bd1e Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Thu, 8 Aug 2019 11:59:14 +0100 Subject: COMPMID-2547: CLSpaceToBatchLayer causes NN Test Failures on QUANT8_ASYMM Data Type Change-Id: I47c9d057e50fa624f9b9e3fd79724e4fa7d0fd82 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/1713 Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- tests/validation/reference/SpaceToBatch.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/validation/reference') diff --git a/tests/validation/reference/SpaceToBatch.cpp b/tests/validation/reference/SpaceToBatch.cpp index c635d4abfd..8c25bb7d91 100644 --- a/tests/validation/reference/SpaceToBatch.cpp +++ b/tests/validation/reference/SpaceToBatch.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,7 +37,7 @@ namespace reference template SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor &block_shape, const SimpleTensor &paddings, const TensorShape &dst_shape) { - SimpleTensor result(dst_shape, src.data_type()); + SimpleTensor result(dst_shape, src.data_type(), 1, src.quantization_info()); const auto width_out = static_cast(dst_shape[0]); const auto height_out = static_cast(dst_shape[1]); @@ -55,6 +55,9 @@ SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor= padding_top + height_in || outW * block_width + shift_w < padding_left || outW * block_width + shift_w >= padding_left + width_in) { - result[out_pos] = 0; + result[out_pos] = pad_value; } else { @@ -90,6 +93,7 @@ SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor &block_shape, const SimpleTensor &paddings, const TensorShape &dst_shape); template SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor &block_shape, const SimpleTensor &paddings, const TensorShape &dst_shape); +template SimpleTensor space_to_batch(const SimpleTensor &src, const SimpleTensor &block_shape, const SimpleTensor &paddings, const TensorShape &dst_shape); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1