diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-07-03 16:35:17 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | d8539b2460304799e43e403f15e7723834e35503 (patch) | |
tree | 6f50eb6f00ac2cee03c663e064b7b8e139dab323 /examples/neon_cnn.cpp | |
parent | 09004ca6a259f20e2fe31844ee5a63cc80e56dfd (diff) | |
download | ComputeLibrary-d8539b2460304799e43e403f15e7723834e35503.tar.gz |
COMPMID-417: Fix neon_cnn example.
Add proper stride and paddding info to avoid incorrect tensor shapes.
Change-Id: Ib906e43cf4ef09364acfb03201e765642dbc25af
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79555
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'examples/neon_cnn.cpp')
-rw-r--r-- | examples/neon_cnn.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/neon_cnn.cpp b/examples/neon_cnn.cpp index 952ae4d485..238f0572da 100644 --- a/examples/neon_cnn.cpp +++ b/examples/neon_cnn.cpp @@ -143,22 +143,22 @@ void main_cnn(int argc, const char **argv) /* [Configure functions] */ // in:32x32x1: 5x5 convolution, 8 output features maps (OFM) - conv0.configure(&src, &weights0, &biases0, &out_conv0, PadStrideInfo()); + conv0.configure(&src, &weights0, &biases0, &out_conv0, PadStrideInfo(1 /* stride_x */, 1 /* stride_y */, 2 /* pad_x */, 2 /* pad_y */)); // in:32x32x8, out:32x32x8, Activation function: relu act0.configure(&out_conv0, &out_act0, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)); // in:32x32x8, out:16x16x8 (2x2 pooling), Pool type function: Max - pool0.configure(&out_act0, &out_pool0, PoolingLayerInfo(PoolingType::MAX, 2)); + pool0.configure(&out_act0, &out_pool0, PoolingLayerInfo(PoolingType::MAX, 2, PadStrideInfo(2 /* stride_x */, 2 /* stride_y */))); // in:16x16x8: 3x3 convolution, 16 output features maps (OFM) - conv1.configure(&out_pool0, &weights1, &biases1, &out_conv1, PadStrideInfo()); + conv1.configure(&out_pool0, &weights1, &biases1, &out_conv1, PadStrideInfo(1 /* stride_x */, 1 /* stride_y */, 1 /* pad_x */, 1 /* pad_y */)); // in:16x16x16, out:16x16x16, Activation function: relu act1.configure(&out_conv1, &out_act1, ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)); // in:16x16x16, out:8x8x16 (2x2 pooling), Pool type function: Average - pool1.configure(&out_act1, &out_pool1, PoolingLayerInfo(PoolingType::AVG, 2)); + pool1.configure(&out_act1, &out_pool1, PoolingLayerInfo(PoolingType::AVG, 2, PadStrideInfo(2 /* stride_x */, 2 /* stride_y */))); // in:8x8x16, out:128 fc0.configure(&out_pool1, &weights2, &biases2, &out_fc0); |