From 4e1c3f336133319cfe45b037befdb252ffd9b744 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Thu, 20 Sep 2018 17:14:03 +0100 Subject: COMPMID-1595 Add UpsampleLayer to graph API Change-Id: I7427b0fbb222ff9760d47b01a59aee654f2f860f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/149587 Tested-by: bsgcomp Reviewed-by: Georgios Pinitas --- arm_compute/graph/frontend/Layers.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'arm_compute/graph/frontend/Layers.h') diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h index 3a45115d7c..9c1ef1e140 100644 --- a/arm_compute/graph/frontend/Layers.h +++ b/arm_compute/graph/frontend/Layers.h @@ -768,6 +768,32 @@ private: float _beta; }; +/** Upsample Layer */ +class UpsampleLayer final : public ILayer +{ +public: + /** Construct a Upsample layer. + * + * @param[in] info Stride info + * @param[in] upsampling_policy Upsampling policy + */ + UpsampleLayer(Size2D info, InterpolationPolicy upsampling_policy) + : _info(info), _upsampling_policy(upsampling_policy) + { + } + + NodeID create_layer(IStream &s) override + { + NodeParams common_params = { name(), s.hints().target_hint }; + NodeIdxPair input = { s.tail_node(), 0 }; + return GraphBuilder::add_upsample_node(s.graph(), common_params, input, _info, _upsampling_policy); + } + +private: + Size2D _info; + InterpolationPolicy _upsampling_policy; +}; + /** YOLO Layer */ class YOLOLayer final : public ILayer { -- cgit v1.2.1