aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-07-03 17:10:39 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commitb76346dd20f8d2be49cd796d6e0427fa1a55f612 (patch)
tree271764f116ad91244dbc42b30cef3802e4e6b981 /src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp
parentd8539b2460304799e43e403f15e7723834e35503 (diff)
downloadComputeLibrary-b76346dd20f8d2be49cd796d6e0427fa1a55f612.tar.gz
COMPMID-417: Autoconfigure for BatchNormalization CL/NEON.
Change-Id: I49a410ccd0102699543bfd23a4d9518d781df281 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79563 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp b/src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp
index 309a153b7a..85d8ab7cb4 100644
--- a/src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp
+++ b/src/core/CL/kernels/CLBatchNormalizationLayerKernel.cpp
@@ -43,15 +43,15 @@ void CLBatchNormalizationLayerKernel::configure(const ICLTensor *input, ICLTenso
float epsilon)
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(mean, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(var, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(beta, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(gamma, 1, DataType::F32);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, var);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, beta);
- ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, gamma);
+ ARM_COMPUTE_ERROR_ON_NULLPTR(output);
+
+ // Output tensor auto initialization if not yet initialized
+ auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position());
+
+ ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, mean, var, beta, gamma);
+ ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, output, mean, var, beta, gamma);
ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, output);
+ ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(mean, var, beta, gamma);
ARM_COMPUTE_ERROR_ON(input->info()->dimension(2) != mean->info()->dimension(0));
// Set build options