aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
diff options
context:
space:
mode:
authorSanghoon Lee <sanghoon.lee@arm.com>2018-01-23 15:16:47 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:16 +0000
commitf47bfb97fa8bc928a7860b84b7b227f716f65e58 (patch)
tree6623bc798f312e0f1836f5df0fe82d3bde3e2f95 /src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
parentbe1f4a7f12e41f4988d4157f35dcb951cf31b72d (diff)
downloadComputeLibrary-f47bfb97fa8bc928a7860b84b7b227f716f65e58.tar.gz
COMPMID-594: Implement reference and CL/NEON validation for LocallyConnected
Change-Id: I01e7abcf3f1b19458128e277044af850ad9fa224 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/118610 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLLocallyConnectedLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLLocallyConnectedLayer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
index 9120aadf17..d284949323 100644
--- a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
+++ b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
@@ -67,10 +67,13 @@ void CLLocallyConnectedLayer::configure(const ICLTensor *input, const ICLTensor
std::tie(stride_x, stride_y) = conv_info.stride();
std::tie(pad_x, pad_y) = conv_info.pad();
+ const unsigned int kernel_width = weights->info()->dimension(0);
+ const unsigned int kernel_height = weights->info()->dimension(1);
+
// Get convolved dimensions
unsigned int conv_w = 0;
unsigned int conv_h = 0;
- std::tie(conv_w, conv_h) = scaled_dimensions(input->info()->dimension(0), input->info()->dimension(1), weights->info()->dimension(0), 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");
@@ -106,7 +109,7 @@ void CLLocallyConnectedLayer::configure(const ICLTensor *input, const ICLTensor
_memory_group.manage(&_gemm_output);
// Configure kernels
- _input_im2col_kernel.configure(input, &_input_im2col_reshaped, Size2D(conv_w, conv_h), conv_info, _has_bias);
+ _input_im2col_kernel.configure(input, &_input_im2col_reshaped, Size2D(kernel_width, kernel_height), conv_info, _has_bias);
_weights_reshape_kernel.configure(weights, biases, &_weights_reshaped);
_mm_kernel.configure(&_input_im2col_reshaped, &_weights_reshaped, &_gemm_output);
_output_col2im_kernel.configure(&_gemm_output, output, std::make_pair(conv_w, conv_h));