From 23e2479c6e29674a1186465eb6e38b73760c8a91 Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Fri, 7 Sep 2018 15:32:14 +0100 Subject: COMPMID-1556 - Add ReorgLayer to graph API Change-Id: I50c13b5808f3cceec36b92e7afc027f47ebbdea4 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/147369 Reviewed-by: Michele DiGiorgio Reviewed-by: Georgios Pinitas Tested-by: Jenkins --- arm_compute/graph/frontend/Layers.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'arm_compute/graph/frontend') diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h index 054410e4ad..9a268d3d29 100644 --- a/arm_compute/graph/frontend/Layers.h +++ b/arm_compute/graph/frontend/Layers.h @@ -589,6 +589,31 @@ private: PoolingLayerInfo _pool_info; }; +/** Reorg Layer */ +class ReorgLayer final : public ILayer +{ +public: + /** Construct a reorg layer. + * + * @param[in] stride Stride value to use for reorganizing the values in the output tensor. + * It defines the spatial distance between 2 consecutive pixels in the x and y direction + */ + ReorgLayer(int stride) + : _stride(stride) + { + } + + NodeID create_layer(IStream &s) override + { + NodeParams common_params = { name(), s.hints().target_hint }; + NodeIdxPair input = { s.tail_node(), 0 }; + return GraphBuilder::add_reorg_node(s.graph(), common_params, input, _stride); + } + +private: + int _stride; +}; + /** Reshape Layer */ class ReshapeLayer final : public ILayer { -- cgit v1.2.1