From 4b5c588ed5bbf635bfb4d20b662db417caa4558f Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Tue, 14 May 2019 10:38:30 +0100 Subject: COMPMID-2248 L2NormalizeLayer: negative axis Change-Id: Ic164d7a9ddf1615a2e3b0e10430c34194a70f221 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/1127 Tested-by: Arm Jenkins Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins --- arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h | 12 ++++++------ arm_compute/core/NEON/kernels/NEL2NormalizeLayerKernel.h | 12 ++++++------ arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h | 10 +++++----- arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h b/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h index 8dd4609250..ec192bed42 100644 --- a/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLL2NormalizeLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -55,10 +55,10 @@ public: * Sum will have the same number of dimensions as input. * @param[out] output Destination tensor. Data types and data layouts supported: Same as @p input. * Output will have the same number of dimensions as input. - * @param[in] axis Axis along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon Lower bound value for the normalization. */ - void configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, unsigned int axis, float epsilon); + void configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, int axis, float epsilon); /** Static function to check if given info will lead to a valid configuration of @ref CLL2NormalizeLayerKernel. * @@ -67,12 +67,12 @@ public: * Sum will have the same number of dimensions as input. * @param[in] output Destination tensor info. Data types and data layouts supported: Same as @p input. * Output will have the same number of dimensions as input. - * @param[in] axis Axis along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon Lower bound value for the normalization. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, unsigned int axis, float epsilon); + static Status validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, int axis, float epsilon); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; @@ -81,7 +81,7 @@ private: const ICLTensor *_input; const ICLTensor *_sum; ICLTensor *_output; - unsigned int _axis; + unsigned int _actual_axis; float _epsilon; }; } // namespace arm_compute diff --git a/arm_compute/core/NEON/kernels/NEL2NormalizeLayerKernel.h b/arm_compute/core/NEON/kernels/NEL2NormalizeLayerKernel.h index f893c4ae6b..ab5e040885 100644 --- a/arm_compute/core/NEON/kernels/NEL2NormalizeLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEL2NormalizeLayerKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -57,10 +57,10 @@ public: * Sum will have the same number of dimensions as input. * @param[out] output Destination tensor. Data types and data layouts supported: same as @p input. * Output will have the same number of dimensions as input. - * @param[in] axis Dimension along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon Lower bound value for the normalization. */ - void configure(const ITensor *input, const ITensor *sum, ITensor *output, unsigned int axis, float epsilon); + void configure(const ITensor *input, const ITensor *sum, ITensor *output, int axis, float epsilon); /** Static function to check if given info will lead to a valid configuration of @ref NEL2NormalizeLayerKernel. * @@ -69,12 +69,12 @@ public: * Sum will have the same number of dimensions as input. * @param[in] output Destination tensor info. Data types and data layouts supported: same as @p input. * Output will have the same number of dimensions as input. - * @param[in] axis Dimension along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon Lower bound value for the normalization. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, unsigned int axis, float epsilon); + static Status validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output, int axis, float epsilon); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; @@ -83,7 +83,7 @@ private: const ITensor *_input; const ITensor *_sum; ITensor *_output; - unsigned int _axis; + unsigned int _actual_axis; float _epsilon; }; } // namespace arm_compute diff --git a/arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h b/arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h index 2cabaee5de..15dcc58310 100644 --- a/arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h +++ b/arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -55,21 +55,21 @@ public: * * @param[in] input Source tensor. Data types supported: F16/F32. Data layouts supported: NCHW/NHWC. * @param[out] output Destination tensor. Data types and data layouts supported: Same as @p input. - * @param[in] axis Axis along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon (Optional) Lower bound value for the normalization. */ - void configure(ICLTensor *input, ICLTensor *output, unsigned int axis, float epsilon = 1e-12f); + void configure(ICLTensor *input, ICLTensor *output, int axis, float epsilon = 1e-12f); /** Static function to check if given info will lead to a valid configuration of @ref CLL2NormalizeLayer. * * @param[in] input Source tensor info. Data types supported: F16/F32. Data layouts supported: NCHW/NHWC. * @param[in] output Destination tensor info. Data types and data layouts supported: Same as @p input. - * @param[in] axis Axis along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon (Optional) Lower bound value for the normalization. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, unsigned int axis, float epsilon = 1e-12f); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, int axis, float epsilon = 1e-12f); // Inherited methods overridden: void run() override; diff --git a/arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h b/arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h index ba506fa9ab..e778f96e22 100644 --- a/arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h +++ b/arm_compute/runtime/NEON/functions/NEL2NormalizeLayer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -52,21 +52,21 @@ public: * * @param[in, out] input Source tensor. Data types supported: F16/F32. (Written to only for border_size != 0) * @param[out] output Destination tensor. Data types and data layouts supported: same as @p input. - * @param[in] axis Dimension along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon (Optional) Lower bound value for the normalization. */ - void configure(ITensor *input, ITensor *output, unsigned int axis, float epsilon = 1e-12f); + void configure(ITensor *input, ITensor *output, int axis, float epsilon = 1e-12f); /** Static function to check if given info will lead to a valid configuration of @ref NEL2NormalizeLayer. * * @param[in] input Source tensor info. Data types supported: F16/F32. (Written to only for border_size != 0) * @param[in] output Destination tensor info. Data types and data layouts supported: same as @p input. - * @param[in] axis Dimension along which to reduce. Supported reduction axis : 0, 1, 2 + * @param[in] axis Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 * @param[in] epsilon (Optional) Lower bound value for the normalization. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *output, unsigned int axis, float epsilon = 1e-12f); + static Status validate(const ITensorInfo *input, const ITensorInfo *output, int axis, float epsilon = 1e-12f); // Inherited methods overridden: void run() override; -- cgit v1.2.1