From 303be90ee1f03f75309b421297ba16428ea98ea5 Mon Sep 17 00:00:00 2001 From: Ioan-Cristian Szabo Date: Mon, 27 Nov 2017 16:31:10 +0000 Subject: COMPMID-617: Add validate support for NEON BatchNormalizationLayer. Change-Id: I037ec6df7eee06bdd1381e908677803426fa614c Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110788 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- .../NEON/kernels/NEBatchNormalizationLayerKernel.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h') diff --git a/arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h b/arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h index 1dfe075310..f5f818c083 100644 --- a/arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEBatchNormalizationLayerKernel.h @@ -62,6 +62,24 @@ public: * @param[in] epsilon Small value to avoid division with zero. */ void configure(ITensor *input, ITensor *output, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon); + /** Static function to check if given info will lead to a valid configuration of @ref NEBatchNormalizationLayerKernel + * + * @param[in] input Source tensor info. In case of @p output tensor = nullptr, this tensor will store the result. + * 3 lower dimensions represent a single input with dimensions [width, height, FM]. + * The rest are optional and used for representing batches. Data types supported: QS8/QS16/F16/F32. + * @param[in] output Destination tensor info. Output will have the same number of dimensions as input. Data type supported: same as @p input + * @param[in] mean Mean values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input + * @param[in] var Variance values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input + * @param[in] beta Beta values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input + * @param[in] gamma Gamma values tensor info. 1 dimension with size equal to the feature maps [FM]. Data types supported: Same as @p input + * @param[in] epsilon Small value to avoid division with zero. + * + * @return an error status + */ + static Error validate(const ITensorInfo *input, const ITensorInfo *output, + const ITensorInfo *mean, const ITensorInfo *var, + const ITensorInfo *beta, const ITensorInfo *gamma, + float epsilon); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; -- cgit v1.2.1