From c0f54434383f945d95f95549c1c4b0d5f5d2caff Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Fri, 16 Mar 2018 14:02:34 +0000 Subject: COMPMID-808 Add NHWC data format support for NEON direct convolution Change-Id: I5d4cc3d5b0d25f3fe4ed998c0f15b1b8e260a43a Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/125697 Tested-by: Jenkins Reviewed-by: Georgios Pinitas Reviewed-by: Anthony Barbier --- arm_compute/core/utils/misc/ShapeCalculator.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (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 757e423d4f..9543d989b8 100644 --- a/arm_compute/core/utils/misc/ShapeCalculator.h +++ b/arm_compute/core/utils/misc/ShapeCalculator.h @@ -300,19 +300,19 @@ inline TensorShape compute_deep_convolution_shape(const ITensorInfo &input, cons const size_t idx_height = get_data_layout_dimension_index(input.data_layout(), DataLayoutDimension::HEIGHT); const size_t idx_channel = get_data_layout_dimension_index(input.data_layout(), DataLayoutDimension::CHANNEL); - const unsigned int input_width = input_shape[idx_width]; - const unsigned int input_height = input_shape[idx_height]; - const unsigned int weights_width = weights_shape[idx_width]; - const unsigned int weights_height = weights_shape[idx_height]; - const unsigned int weights_channel = weights_shape[idx_channel]; - unsigned int output_width = 0; - unsigned int output_height = 0; + const unsigned int input_width = input_shape[idx_width]; + const unsigned int input_height = input_shape[idx_height]; + const unsigned int weights_width = weights_shape[idx_width]; + const unsigned int weights_height = weights_shape[idx_height]; + const unsigned int weights_out_channel = weights_shape[3]; + unsigned int output_width = 0; + unsigned int output_height = 0; std::tie(output_width, output_height) = scaled_dimensions(input_width, input_height, weights_width, weights_height, conv_info); TensorShape output_shape{ input_shape }; output_shape.set(idx_width, output_width); output_shape.set(idx_height, output_height); - output_shape.set(idx_channel, weights_channel); + output_shape.set(idx_channel, weights_out_channel); return output_shape; } -- cgit v1.2.1