From 0779fecbf897fe85c5e13da52b129e439c4cc75d Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Wed, 13 Nov 2019 17:08:12 +0000 Subject: COMPMID-2763 [CL] add support for QASYMM8_SIGNED to SoftmaxLayer Change-Id: I4556bde3aa51eb874a4e674dbbd575fa4491c088 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/2375 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas --- tests/validation/reference/SoftmaxLayer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/validation/reference/SoftmaxLayer.cpp') diff --git a/tests/validation/reference/SoftmaxLayer.cpp b/tests/validation/reference/SoftmaxLayer.cpp index ef2468df59..0e470260a9 100644 --- a/tests/validation/reference/SoftmaxLayer.cpp +++ b/tests/validation/reference/SoftmaxLayer.cpp @@ -107,21 +107,21 @@ SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axi return softmax_layer_generic(src, beta, axis, false); } -template ::value, int>::type> +template ::value || std::is_same::value, int>::type> SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axis) { - // Note: Output quantization info should always have scale = 1/256 and offset = 0 - const QuantizationInfo output_quantization_info = QuantizationInfo(1.f / 256, 0); + const QuantizationInfo output_quantization_info = arm_compute::get_softmax_output_quantization_info(src.data_type(), false); SimpleTensor src_tmp = convert_from_asymmetric(src); SimpleTensor dst_tmp = softmax_layer(src_tmp, beta, axis); - SimpleTensor dst = convert_to_asymmetric(dst_tmp, output_quantization_info); + SimpleTensor dst = convert_to_asymmetric(dst_tmp, output_quantization_info); return dst; } template SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axis); template SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axis); template SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axis); +template SimpleTensor softmax_layer(const SimpleTensor &src, float beta, size_t axis); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1