| 578 | } |
| 579 | |
| 580 | node_t get_graph_output_node(graph_t graph, int idx) |
| 581 | { |
| 582 | GraphExecutor* executor = reinterpret_cast<GraphExecutor*>(graph); |
| 583 | |
| 584 | Graph* real_graph = executor->GetOptimizedGraph(); |
| 585 | |
| 586 | if(idx >= ( int )real_graph->output_nodes.size()) |
| 587 | { |
| 588 | set_tengine_errno(EINVAL); |
| 589 | return nullptr; |
| 590 | } |
| 591 | |
| 592 | Node* node = real_graph->output_nodes[idx]; |
| 593 | |
| 594 | node->SetAttr(ATTR_API_GRAPH, executor); |
| 595 | |
| 596 | return node; |
| 597 | } |
| 598 | |
| 599 | tensor_t get_graph_output_tensor(graph_t graph, int output_node_idx, int tensor_idx) |
| 600 | { |
no test coverage detected