aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-06-19 13:09:53 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:53:34 +0000
commit19ea419e7f14d02aeb208c2fbd5a4ac55f4cb101 (patch)
treefe04ed9d40ebb8b717f63490f672a28c5b27d01e /src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
parentbb71fe50930f5669a7a325e0fa95fee559856793 (diff)
downloadComputeLibrary-19ea419e7f14d02aeb208c2fbd5a4ac55f4cb101.tar.gz
COMPMID-809: Add NHWC data format on CLGEMMConvolutionLayer.
Change-Id: I50e4f5e7d47e21c300f754bee2c216863075b5cf Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136191 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLLocallyConnectedLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLLocallyConnectedLayer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
index d15e5dfa3d..40bf032d69 100644
--- a/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
+++ b/src/runtime/CL/functions/CLLocallyConnectedLayer.cpp
@@ -48,7 +48,10 @@ void calculate_shapes(const ITensorInfo *input, const ITensorInfo *weights, cons
// Get convolved dimensions
unsigned int conv_w = 0;
unsigned int conv_h = 0;
- std::tie(conv_w, conv_h) = scaled_dimensions(input->dimension(0), input->dimension(1), kernel_width, kernel_height,
+ std::tie(conv_w, conv_h) = scaled_dimensions(input->dimension(0),
+ input->dimension(1),
+ kernel_width,
+ kernel_height,
conv_info);
const size_t mat_weights_cols = weights->dimension(3);
@@ -61,9 +64,12 @@ void calculate_shapes(const ITensorInfo *input, const ITensorInfo *weights, cons
const size_t mat_input_rows = conv_w * conv_h;
shape_im2col = input->tensor_shape();
+ if(shape_im2col.num_dimensions() >= 3)
+ {
+ shape_im2col.remove_dimension(2);
+ }
shape_im2col.set(0, mat_input_cols);
shape_im2col.set(1, mat_input_rows);
- shape_im2col.set(2, 1);
shape_gemm = shape_im2col;
shape_gemm.set(0, mat_weights_cols);