aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2017-06-27 11:41:59 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-09-17 14:15:39 +0100
commit4e288696a2ca8e1c9d6d37d90d237c1a18d6e364 (patch)
tree02c6792d1097fe84bb8c0fcee4c72d120ead6438 /tests
parent3b77e9df5d2d33bda0500235d3f258f3197037de (diff)
downloadComputeLibrary-4e288696a2ca8e1c9d6d37d90d237c1a18d6e364.tar.gz
COMPMID-417 - Adding support for rectangular kernels
Change-Id: I4dde0929bc689c83582b95856dd0253228125df2 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78994 Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/model_objects/AlexNet.h16
-rw-r--r--tests/validation/CL/PoolingLayer.cpp5
-rw-r--r--tests/validation/NEON/ConvolutionLayerDirect.cpp5
-rw-r--r--tests/validation/NEON/PoolingLayer.cpp5
4 files changed, 14 insertions, 17 deletions
diff --git a/tests/model_objects/AlexNet.h b/tests/model_objects/AlexNet.h
index d49ef0645a..8443e9c97e 100644
--- a/tests/model_objects/AlexNet.h
+++ b/tests/model_objects/AlexNet.h
@@ -250,26 +250,26 @@ public:
// Configure Layers
{
// Layer 1
- conv1->configure(&input, w[0].get(), b[0].get(), &conv1_out, PadStrideInfo(4, 4, 0, 0), WeightsInfo(_reshaped_weights, 11U));
+ conv1->configure(&input, w[0].get(), b[0].get(), &conv1_out, PadStrideInfo(4, 4, 0, 0), WeightsInfo(_reshaped_weights, 11U, 11U));
act1->configure(&conv1_out, &act1_out, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU));
norm1->configure(&act1_out, &norm1_out, NormalizationLayerInfo(NormType::CROSS_MAP, 5, 0.0001f, 0.75f));
pool1->configure(&norm1_out, &pool1_out, PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 0)));
// Layer 2
- conv21->configure(pool11_out.get(), w21.get(), b21.get(), conv21_out.get(), PadStrideInfo(1, 1, 2, 2), WeightsInfo(_reshaped_weights, 5U));
- conv22->configure(pool12_out.get(), w22.get(), b22.get(), conv22_out.get(), PadStrideInfo(1, 1, 2, 2), WeightsInfo(_reshaped_weights, 5U));
+ conv21->configure(pool11_out.get(), w21.get(), b21.get(), conv21_out.get(), PadStrideInfo(1, 1, 2, 2), WeightsInfo(_reshaped_weights, 5U, 5U));
+ conv22->configure(pool12_out.get(), w22.get(), b22.get(), conv22_out.get(), PadStrideInfo(1, 1, 2, 2), WeightsInfo(_reshaped_weights, 5U, 5U));
act2->configure(&conv2_out, &act2_out, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU));
norm2->configure(&act2_out, &norm2_out, NormalizationLayerInfo(NormType::CROSS_MAP, 5, 0.0001f, 0.75f));
pool2->configure(&norm2_out, &pool2_out, PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 0)));
// Layer 3
- conv3->configure(&pool2_out, w[2].get(), b[2].get(), &conv3_out, PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U));
+ conv3->configure(&pool2_out, w[2].get(), b[2].get(), &conv3_out, PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U, 3U));
act3->configure(&conv3_out, &act3_out, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU));
// Layer 4
- conv41->configure(act31_out.get(), w41.get(), b41.get(), conv41_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U));
- conv42->configure(act32_out.get(), w42.get(), b42.get(), conv42_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U));
+ conv41->configure(act31_out.get(), w41.get(), b41.get(), conv41_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U, 3U));
+ conv42->configure(act32_out.get(), w42.get(), b42.get(), conv42_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U, 3U));
act4->configure(&conv4_out, &act4_out, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU));
// Layer 5
- conv51->configure(act41_out.get(), w51.get(), b51.get(), conv51_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U));
- conv52->configure(act42_out.get(), w52.get(), b52.get(), conv52_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U));
+ conv51->configure(act41_out.get(), w51.get(), b51.get(), conv51_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U, 3U));
+ conv52->configure(act42_out.get(), w52.get(), b52.get(), conv52_out.get(), PadStrideInfo(1, 1, 1, 1), WeightsInfo(_reshaped_weights, 3U, 3U));
act5->configure(&conv5_out, &act5_out, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU));
pool5->configure(&act5_out, &pool5_out, PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 0)));
// Layer 6
diff --git a/tests/validation/CL/PoolingLayer.cpp b/tests/validation/CL/PoolingLayer.cpp
index 1d0e745088..dabc21eaa8 100644
--- a/tests/validation/CL/PoolingLayer.cpp
+++ b/tests/validation/CL/PoolingLayer.cpp
@@ -82,9 +82,8 @@ TensorShape get_output_shape(TensorShape in_shape, const PoolingLayerInfo &pool_
const std::pair<unsigned int, unsigned int> scaled_dims = arm_compute::scaled_dimensions(in_shape.x(),
in_shape.y(),
pool_info.pool_size(),
- pool_info.pad_stride_info().stride().first, pool_info.pad_stride_info().stride().second,
- pool_info.pad_stride_info().pad().first, pool_info.pad_stride_info().pad().second,
- pool_info.pad_stride_info().round());
+ pool_info.pool_size(),
+ pool_info.pad_stride_info());
out_shape.set(0, scaled_dims.first);
out_shape.set(1, scaled_dims.second);
return out_shape;
diff --git a/tests/validation/NEON/ConvolutionLayerDirect.cpp b/tests/validation/NEON/ConvolutionLayerDirect.cpp
index 4e36e331bd..3ddb010e74 100644
--- a/tests/validation/NEON/ConvolutionLayerDirect.cpp
+++ b/tests/validation/NEON/ConvolutionLayerDirect.cpp
@@ -116,9 +116,8 @@ TensorShape get_output_shape(TensorShape in_shape, TensorShape kernel_shape, con
const std::pair<unsigned int, unsigned int> scaled_dims = arm_compute::scaled_dimensions(in_shape.x(),
in_shape.y(),
kernel_shape.x(),
- conv_info.stride().first, conv_info.stride().second,
- conv_info.pad().first, conv_info.pad().second,
- conv_info.round());
+ kernel_shape.y(),
+ conv_info);
out_shape.set(0, scaled_dims.first);
out_shape.set(1, scaled_dims.second);
out_shape.set(2, kernel_shape[3]);
diff --git a/tests/validation/NEON/PoolingLayer.cpp b/tests/validation/NEON/PoolingLayer.cpp
index 489c5b668b..b29cd3e2e8 100644
--- a/tests/validation/NEON/PoolingLayer.cpp
+++ b/tests/validation/NEON/PoolingLayer.cpp
@@ -99,9 +99,8 @@ TensorShape get_output_shape(TensorShape in_shape, const PoolingLayerInfo &pool_
const std::pair<unsigned int, unsigned int> scaled_dims = arm_compute::scaled_dimensions(in_shape.x(),
in_shape.y(),
pool_info.pool_size(),
- pool_info.pad_stride_info().stride().first, pool_info.pad_stride_info().stride().second,
- pool_info.pad_stride_info().pad().first, pool_info.pad_stride_info().pad().second,
- pool_info.pad_stride_info().round());
+ pool_info.pool_size(),
+ pool_info.pad_stride_info());
out_shape.set(0, scaled_dims.first);
out_shape.set(1, scaled_dims.second);
return out_shape;