MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / DumpNode

Function DumpNode

tensorflow/lite/toco/dump_graphviz.cc:641–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

639}
640
641void DumpNode(const Model& model, string* output_file, const string& node_name,
642 Node const& node) {
643 bool not_root = !node_name.empty();
644 if (not_root) {
645 DumpSubgraphHeader(output_file, node, node_name);
646 }
647
648 for (const auto& child : node.children) {
649 if (!child.second->array_id.empty()) {
650 // Dump array if this node posesses one.
651 DumpArray(model, output_file, child.second->array_id);
652 }
653 // Note that it is always possible to have children. Unlike a filesystem,
654 // the existence of array "foo/bar" does _not_ prevent other arrays, such as
655 // and "foo/bar/baz", from being nested beneath it.
656 DumpNode(model, output_file, child.first, *child.second);
657 }
658
659 if (not_root) {
660 // End subgraph
661 AppendF(output_file, " }\n");
662 }
663}
664
665int64 GetArithmeticOpsCount(const Model& model, const string& array_id) {
666 for (const auto& op : model.operators) {

Callers 1

DumpGraphvizFunction · 0.85

Calls 4

DumpSubgraphHeaderFunction · 0.85
DumpArrayFunction · 0.85
AppendFFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected