From b660dcf2a7b21d02818e0a5f2c38ecd19d39b5c8 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 13 Dec 2017 10:48:06 +0000 Subject: COMPMID-556: Fix NEConvolutionLayer for fully connected convolution. Fixes weights shapes and assembly kernels dispatch parameters in case of fully connected convolution. Change-Id: I872c5934aab1d8ea6ef154d843521b5618fa2dcc Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/113062 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- src/runtime/CL/functions/CLConvolutionLayer.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/runtime/CL/functions/CLConvolutionLayer.cpp') diff --git a/src/runtime/CL/functions/CLConvolutionLayer.cpp b/src/runtime/CL/functions/CLConvolutionLayer.cpp index d628bf93ce..64c31d5191 100644 --- a/src/runtime/CL/functions/CLConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLConvolutionLayer.cpp @@ -190,9 +190,17 @@ void CLConvolutionLayer::configure(const ICLTensor *input, const ICLTensor *weig // Reshape weights if needed if(_are_weights_reshaped) { - mat_weights_cols = weights_info.num_kernels(); - const unsigned int quarter_reshaped_cols = weights->info()->dimension(0) / 4; - mat_weights_rows = quarter_reshaped_cols + bias_element; + if(_is_fully_connected_convolution || _is_quantized) + { + mat_weights_cols = weights->info()->dimension(0); + mat_weights_rows = weights->info()->dimension(1); + } + else + { + mat_weights_cols = weights_info.num_kernels(); + const unsigned int quarter_reshaped_cols = weights->info()->dimension(0) / 4; + mat_weights_rows = quarter_reshaped_cols + bias_element; + } } else { -- cgit v1.2.1