aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/graph/frontend/Layers.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2018-04-06 12:24:55 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:52:35 +0000
commit88d5b22eb5574d8b564474df2c758d222b3b5547 (patch)
tree92edf8ecc38a9349faf1ef958998abddcf5b9a8c /arm_compute/graph/frontend/Layers.h
parentbcedf513938fca9e33331bdef975f0488288bad4 (diff)
downloadComputeLibrary-88d5b22eb5574d8b564474df2c758d222b3b5547.tar.gz
COMPMID-1035 - Add ResneXt50 as a graph example
Change-Id: I42f0e7dab38e45b5eecfe6858eaecee8939c8585 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129291 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/graph/frontend/Layers.h')
-rw-r--r--arm_compute/graph/frontend/Layers.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h
index d122a7a967..a97684453c 100644
--- a/arm_compute/graph/frontend/Layers.h
+++ b/arm_compute/graph/frontend/Layers.h
@@ -380,6 +380,33 @@ private:
TensorShape _shape;
};
+/** Scale Layer */
+class ScaleLayer final : public ILayer
+{
+public:
+ /** Construct a scale layer.
+ *
+ * @param[in] mul_w Accessor to get mul weight from.
+ * @param[in] add_w Accessor to get add weight from.
+ */
+ ScaleLayer(ITensorAccessorUPtr mul_w,
+ ITensorAccessorUPtr add_w)
+ : _mul_w(std::move(mul_w)), _add_w(std::move(add_w))
+ {
+ }
+
+ NodeID create_layer(IStream &s) override
+ {
+ NodeParams common_params = { name(), s.hints().target_hint };
+ NodeIdxPair input = { s.tail_node(), 0 };
+ return GraphBuilder::add_scale_layer(s.graph(), common_params, input, std::move(_mul_w), std::move(_add_w));
+ }
+
+private:
+ ITensorAccessorUPtr _mul_w;
+ ITensorAccessorUPtr _add_w;
+};
+
/** Softmax Layer */
class SoftmaxLayer final : public ILayer
{