MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / add_detection_post_process_node

Method add_detection_post_process_node

src/graph/GraphBuilder.cpp:465–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465NodeID GraphBuilder::add_detection_post_process_node(Graph &g,
466 NodeParams params,
467 NodeIdxPair input_box_encoding,
468 NodeIdxPair input_class_prediction,
469 const DetectionPostProcessLayerInfo &detect_info,
470 ITensorAccessorUPtr anchors_accessor,
471 const QuantizationInfo &anchor_quant_info)
472{
473 check_nodeidx_pair(input_box_encoding, g);
474 check_nodeidx_pair(input_class_prediction, g);
475
476 // Get input tensor descriptor
477 const TensorDescriptor input_box_encoding_tensor_desc =
478 get_tensor_descriptor(g, g.node(input_box_encoding.node_id)->outputs()[0]);
479
480 // Calculate anchor descriptor
481 TensorDescriptor anchor_desc = input_box_encoding_tensor_desc;
482 if (!anchor_quant_info.empty())
483 {
484 anchor_desc.quant_info = anchor_quant_info;
485 }
486
487 // Create anchors nodes
488 auto anchors_nid = add_const_node_with_name(g, params, "Anchors", anchor_desc, std::move(anchors_accessor));
489
490 // Create detection_output node and connect
491 NodeID detect_nid = g.add_node<DetectionPostProcessLayerNode>(detect_info);
492 g.add_connection(input_box_encoding.node_id, input_box_encoding.index, detect_nid, 0);
493 g.add_connection(input_class_prediction.node_id, input_class_prediction.index, detect_nid, 1);
494 g.add_connection(anchors_nid, 0, detect_nid, 2);
495
496 set_node_params(g, detect_nid, params);
497
498 return detect_nid;
499}
500
501NodeID GraphBuilder::add_dummy_node(Graph &g, NodeParams params, NodeIdxPair input, TensorShape shape)
502{

Callers

nothing calls this directly

Calls 7

check_nodeidx_pairFunction · 0.85
get_tensor_descriptorFunction · 0.85
add_const_node_with_nameFunction · 0.85
set_node_paramsFunction · 0.85
nodeMethod · 0.80
add_connectionMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected