aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/frontend
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-09-07 15:32:14 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit23e2479c6e29674a1186465eb6e38b73760c8a91 (patch)
treeddc1c4bc82c7411ea4d7d170ee85d47f42499c7c /arm_compute/graph/frontend
parentfd7e8531b1eddf28d4f80d1423ca506ed1b7fa06 (diff)
downloadComputeLibrary-23e2479c6e29674a1186465eb6e38b73760c8a91.tar.gz
COMPMID-1556 - Add ReorgLayer to graph API
Change-Id: I50c13b5808f3cceec36b92e7afc027f47ebbdea4 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/147369 Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/graph/frontend')
-rw-r--r--arm_compute/graph/frontend/Layers.h25
1 files changed, 25 insertions, 0 deletions
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
{