diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2018-10-23 17:00:42 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-11-08 13:43:34 +0000 |
commit | d2048ce58a88853cee6cdd67fe0d6f09c3e212b0 (patch) | |
tree | 4107f577ab792509edd023b00003e7ef85cfacc2 /arm_compute/graph/frontend/Layers.h | |
parent | 0c54a62f334b6cfdca99066d8de3ed6a0b2fa15e (diff) | |
download | ComputeLibrary-d2048ce58a88853cee6cdd67fe0d6f09c3e212b0.tar.gz |
COMPMID-1638 - Add BBoxTransform to the graph API
Change-Id: I67cbbce59d61d907fc4dc4c3997e96b347dfe895
Diffstat (limited to 'arm_compute/graph/frontend/Layers.h')
-rw-r--r-- | arm_compute/graph/frontend/Layers.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/arm_compute/graph/frontend/Layers.h b/arm_compute/graph/frontend/Layers.h index d72f549cf9..fa0656dcdc 100644 --- a/arm_compute/graph/frontend/Layers.h +++ b/arm_compute/graph/frontend/Layers.h @@ -154,6 +154,41 @@ private: float _epsilon; }; +/** Bounding Box Transform Layer */ +class BoundingBoxTransformLayer final : public ILayer +{ +public: + /** Construct a bounding box transform layer. + * + * @param[in] sub_stream_input Graph sub-stream for the input + * @param[in] sub_stream_deltas Graph sub-stream for the deltas + * @param[in] info Contains BoundingBox operation information described in @ref BoundingBoxTransformInfo. + */ + BoundingBoxTransformLayer(SubStream &&sub_stream_input, SubStream &&sub_stream_deltas, BoundingBoxTransformInfo info) + : _ss_input(sub_stream_input), _ss_deltas(sub_stream_deltas), _bbox_info(info) + { + } + + /** Create layer and add to the given stream. + * + * @param[in] s Stream to add layer to. + * + * @return ID of the created node. + */ + NodeID create_layer(IStream &s) override + { + NodeParams common_params = { name(), s.hints().target_hint }; + NodeIdxPair input = { _ss_input.tail_node(), 0 }; + NodeIdxPair deltas = { _ss_deltas.tail_node(), 0 }; + return GraphBuilder::add_bounding_box_transform_node(s.graph(), common_params, input, deltas, _bbox_info); + } + +private: + SubStream _ss_input; + SubStream _ss_deltas; + BoundingBoxTransformInfo _bbox_info; +}; + /** Channel Shuffle Layer */ class ChannelShuffleLayer final : public ILayer { |