diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2018-11-27 08:51:10 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2018-12-13 11:21:59 +0000 |
commit | 7234ed8c3d07c76963eb3bce9530994421ad7e67 (patch) | |
tree | 6834d5fc3cc23eb47bcfad3a4191d91c87c8f9e0 /src/graph/GraphBuilder.cpp | |
parent | 0e7210de821a7d1164017b8b9e11b53805185b25 (diff) | |
download | ComputeLibrary-7234ed8c3d07c76963eb3bce9530994421ad7e67.tar.gz |
COMPMID-1808: Add Detection Output Layer to the GraphAPI
COMPMID-1710: Integrate Detection ouput in MobilenetSSD graph example
Change-Id: I384d1eb492ef14ece58f2023ad7bbc16f834450b
Reviewed-on: https://review.mlplatform.org/356
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Marquez <pablo.tello@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/graph/GraphBuilder.cpp')
-rw-r--r-- | src/graph/GraphBuilder.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/graph/GraphBuilder.cpp b/src/graph/GraphBuilder.cpp index 3fc258d8bd..d09002d69b 100644 --- a/src/graph/GraphBuilder.cpp +++ b/src/graph/GraphBuilder.cpp @@ -362,6 +362,22 @@ NodeID GraphBuilder::add_depthwise_convolution_node(Graph &g, NodeParams params, return conv_nid; } +NodeID GraphBuilder::add_detection_output_node(Graph &g, NodeParams params, NodeIdxPair input_loc, NodeIdxPair input_conf, NodeIdxPair input_priorbox, DetectionOutputLayerInfo detect_info) +{ + CHECK_NODEIDX_PAIR(input_loc, g); + CHECK_NODEIDX_PAIR(input_conf, g); + CHECK_NODEIDX_PAIR(input_priorbox, g); + + // Create detection_output node and connect + NodeID detect_nid = g.add_node<DetectionOutputLayerNode>(detect_info); + g.add_connection(input_loc.node_id, input_loc.index, detect_nid, 0); + g.add_connection(input_conf.node_id, input_conf.index, detect_nid, 1); + g.add_connection(input_priorbox.node_id, input_priorbox.index, detect_nid, 2); + + set_node_params(g, detect_nid, params); + + return detect_nid; +} NodeID GraphBuilder::add_dummy_node(Graph &g, NodeParams params, NodeIdxPair input, TensorShape shape) { |