COMPMID-1595 Add UpsampleLayer to graph API
Change-Id: I7427b0fbb222ff9760d47b01a59aee654f2f860f
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/149587
Tested-by: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h
index 3a45115..9c1ef1e 100644
--- a/arm_compute/graph/frontend/Layers.h
+++ b/arm_compute/graph/frontend/Layers.h
@@ -768,6 +768,32 @@
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
{