From 4e288696a2ca8e1c9d6d37d90d237c1a18d6e364 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Tue, 27 Jun 2017 11:41:59 +0100 Subject: COMPMID-417 - Adding support for rectangular kernels Change-Id: I4dde0929bc689c83582b95856dd0253228125df2 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78994 Reviewed-by: Moritz Pflanzer Tested-by: Kaizen Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NEConvolutionLayer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/runtime/NEON/functions/NEConvolutionLayer.cpp') diff --git a/src/runtime/NEON/functions/NEConvolutionLayer.cpp b/src/runtime/NEON/functions/NEConvolutionLayer.cpp index 82c33d54bb..b38d6617d5 100644 --- a/src/runtime/NEON/functions/NEConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEConvolutionLayer.cpp @@ -131,9 +131,10 @@ void NEConvolutionLayer::configure(const ITensor *input, const ITensor *weights, unsigned int conv_w = 0; unsigned int conv_h = 0; - const unsigned int kernel_width = (_are_weights_reshaped) ? weights_info.kernel_size() : weights->info()->dimension(0); - std::tie(conv_w, conv_h) = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1), kernel_width, - stride_x, stride_y, pad_x, pad_y, conv_info.round()); + const unsigned int kernel_width = (_are_weights_reshaped) ? weights_info.kernel_size().first : weights->info()->dimension(0); + const unsigned int kernel_height = (_are_weights_reshaped) ? weights_info.kernel_size().second : weights->info()->dimension(1); + std::tie(conv_w, conv_h) = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1), kernel_width, kernel_height, + conv_info); ARM_COMPUTE_ERROR_ON_MSG((output->info()->dimension(0) != conv_w) || (output->info()->dimension(1) != conv_h), "Output shape does not match the expected one"); // Check if its a "fully connected" convolution -- cgit v1.2.1