From aea14c63e2efeda9d5f7492099389d439c65204f Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 3 Jan 2019 11:10:25 +0000 Subject: COMPMID-1764 NEON: Implement ArgMax/ArgMin Change-Id: Ibe23aa90b36ffd8553d1d1c35fada5d300fab829 Reviewed-on: https://review.mlplatform.org/475 Reviewed-by: Isabella Gottardi Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini --- arm_compute/core/utils/misc/ShapeCalculator.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arm_compute/core/utils') diff --git a/arm_compute/core/utils/misc/ShapeCalculator.h b/arm_compute/core/utils/misc/ShapeCalculator.h index 70727424b3..619234d306 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -1033,6 +1033,21 @@ inline TensorShape compute_tiled_shape(const TensorShape &input_shape, const Mul return tiled_shape; } +/** Calculate the reduced shape of a tensor given an axis + * + * @param[in] input Input tensor info + * @param[in] axis Axis on which to perform reduction + * + * @return the calculated shape + */ +inline TensorShape compute_reduced_shape(const TensorShape &input, unsigned int axis) +{ + TensorShape output_shape{ input }; + output_shape.set(axis, 1); + + return output_shape; +} + /** Calculate the upsampled shape of a tensor * * @param[in] input Input tensor info -- cgit v1.2.1