aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-06-26 17:20:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit13edbff0820c3b41e7dd766db5a9d6ff65fcda2a (patch)
treeb17fbea676fe0a77153b1610f88ebc6faa30e023 /src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
parent238cfc06ed377045df9b76c2047081d27ab9ff66 (diff)
downloadComputeLibrary-13edbff0820c3b41e7dd766db5a9d6ff65fcda2a.tar.gz
COMPMID-432 - Extended Convolution Layer to support rectangular kernels
Change-Id: I99be1efede4de6dd63ce103fb11196c413757621 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79252 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEWeightsReshapeKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEWeightsReshapeKernel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
index e9b76e7967..ac688e1381 100644
--- a/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
+++ b/src/core/NEON/kernels/NEWeightsReshapeKernel.cpp
@@ -97,13 +97,13 @@ void NEWeightsReshapeKernel::configure(const ITensor *input, const ITensor *bias
{
ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QS8, DataType::F16, DataType::F32);
ARM_COMPUTE_ERROR_ON_NULLPTR(output);
- ARM_COMPUTE_ERROR_ON(input->info()->dimension(0) != input->info()->dimension(1));
- const DataType dt = input->info()->data_type();
- const int fixed_point_position = input->info()->fixed_point_position();
-
- TensorShape output_shape{ input->info()->tensor_shape() };
+ const int fixed_point_position = input->info()->fixed_point_position();
+ const DataType dt = input->info()->data_type();
+ const TensorShape &input_shape = input->info()->tensor_shape();
+ TensorShape output_shape{ input_shape };
output_shape.collapse(3);
+
const size_t tmp_dim = output_shape[0];
output_shape.set(0, output_shape[1]);
output_shape.set(1, tmp_dim + (bias != nullptr ? 1 : 0));