From 7234ed8c3d07c76963eb3bce9530994421ad7e67 Mon Sep 17 00:00:00 2001 From: Isabella Gottardi Date: Tue, 27 Nov 2018 08:51:10 +0000 Subject: 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 Reviewed-by: Pablo Marquez Reviewed-by: Georgios Pinitas --- src/graph/GraphBuilder.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/graph/GraphBuilder.cpp') 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(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) { -- cgit v1.2.1