From 96209c73b071bb65d4919fb441076f977095a31b Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Fri, 21 Aug 2020 12:28:30 +0100 Subject: COMPMID-3694 COMPMID-3695 COMPMID-3458: Softmax Axis * Properly support "axis" in CL and NEON (and GC) SoftmaxLayer and LogSoftmaxLayer in accord with mainstream frameworks. Axis now defines the dimension on which softmax is performed, and supports the range [-rank, rank) * Extend validation tests to include valid and invalid axes * Remove unnecessary LogSoftmaxLayer fixture, as it is only a specialisation of the SoftmaxLayer fixture * Change the validation fill value range from [-1000, 1000] to [-10, 10], as the former often results in sparse outputs with a single one and zeros elsewhere Change-Id: I8a0040453182b04ed88260de3ba434e98258d863 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3830 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Gian Marco Iodice --- tests/validation/reference/SoftmaxLayer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/validation/reference/SoftmaxLayer.h') diff --git a/tests/validation/reference/SoftmaxLayer.h b/tests/validation/reference/SoftmaxLayer.h index 2af0b6d36a..3362f195c9 100644 --- a/tests/validation/reference/SoftmaxLayer.h +++ b/tests/validation/reference/SoftmaxLayer.h @@ -36,13 +36,13 @@ namespace validation namespace reference { template ::value, int>::type = 0> -SimpleTensor softmax_layer_generic(const SimpleTensor &src, float beta, int32_t reduce_end_axis, bool is_log = false); +SimpleTensor softmax_layer_generic(const SimpleTensor &src, float beta, int32_t axis, bool is_log = false); template ::value, int>::type = 0> -SimpleTensor softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis = 0); +SimpleTensor softmax_layer(const SimpleTensor &src, float beta, int32_t axis = 0, bool is_log = false); template < typename T, typename std::enable_if < std::is_same::value || std::is_same::value, int >::type = 0 > -SimpleTensor softmax_layer(const SimpleTensor &src, float beta, int32_t reduce_end_axis = 0); +SimpleTensor softmax_layer(const SimpleTensor &src, float beta, int32_t axis = 0, bool is_log = false); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1