From d004a7a707feab36e51f51cfc9eb2cb70729d5ad Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Thu, 28 May 2020 15:26:41 +0100 Subject: COMPMID-3510 [Interface change] Fix definition of "axis" in NESoftmaxLayer and CLSoftmaxLayer * [Interface change] "axis" argument is renamed to "reduce_end_axis" * Unify the meaning of "axis"(now "reduce_end_axis") to be the last axis of the first n dimensions (inclusive)to reduce. This way the meaning of reduce_end_axis stays the same for both positive and negative values: it selects a dimension before which all dimensions (including the selected dimension) are reduced. Change-Id: I4ab03bd8360b1cd8cac4998df0b1571064a9d4ed Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3278 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- tests/validation/reference/LogSoftmaxLayer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/validation/reference/LogSoftmaxLayer.cpp') diff --git a/tests/validation/reference/LogSoftmaxLayer.cpp b/tests/validation/reference/LogSoftmaxLayer.cpp index edb208e6ae..8dd8d45a86 100644 --- a/tests/validation/reference/LogSoftmaxLayer.cpp +++ b/tests/validation/reference/LogSoftmaxLayer.cpp @@ -35,26 +35,26 @@ namespace validation namespace reference { template ::value, int>::type> -SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis) +SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis) { - return softmax_layer_generic(src, beta, axis, true); + return softmax_layer_generic(src, beta, reduce_end_axis, true); } template < typename T, typename std::enable_if < std::is_same::value || std::is_same::value, int >::type > -SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis) +SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis) { const QuantizationInfo output_quantization_info = arm_compute::get_softmax_output_quantization_info(src.data_type(), true); SimpleTensor src_tmp = convert_from_asymmetric(src); - SimpleTensor dst_tmp = log_softmax_layer(src_tmp, beta, axis); + SimpleTensor dst_tmp = log_softmax_layer(src_tmp, beta, reduce_end_axis); SimpleTensor dst = convert_to_asymmetric(dst_tmp, output_quantization_info); return dst; } -template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis); -template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis); -template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis); -template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t axis); +template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis); +template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis); +template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis); +template SimpleTensor log_softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1