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

Function DumpGraphviz

tensorflow/lite/toco/dump_graphviz.cc:756–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754} // namespace
755
756void DumpGraphviz(const Model& model, string* output_file,
757 const string& graph_name) {
758 // Start graphviz format
759 AppendF(output_file, kGraphFmt, GetGraphLabel(model, graph_name));
760
761 // Organize arrays into a tree for subgraphing
762 Node tree;
763 BuildArrayTree(model, &tree);
764 DumpNode(model, output_file, "", tree);
765
766 // Dump edges outside all subgraphs (otherwise the referred-to nodes are
767 // implicitly included in that subgraph).
768 for (int op_index = 0; op_index < model.operators.size(); op_index++) {
769 DumpOperatorEdges(model, output_file, op_index);
770 }
771
772 // Dump RNN Backedges
773 for (const auto& rnn_state : model.flags.rnn_states()) {
774 AppendF(output_file, kRNNBackEdgeFmt, rnn_state.back_edge_source_array(),
775 rnn_state.state_array());
776 }
777 // End graphviz format
778 AppendF(output_file, "}\n");
779}
780} // namespace toco

Callers 3

DumpGraphvizVideoFrameFunction · 0.85
LogDumpFunction · 0.85
ExportFunction · 0.85

Calls 6

AppendFFunction · 0.85
GetGraphLabelFunction · 0.85
BuildArrayTreeFunction · 0.85
DumpNodeFunction · 0.85
DumpOperatorEdgesFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected