TensorFlow c++ dump graph to pbtxt

it2026-03-26  5

https://github.com/tensorflow/ngraph-bridge ngraph-bridge-0.22.0-rc4\logging\tf_graph_writer.*

 

直接用tensorflow\core\util\dump_graph.h的 方法

string DumpGraphToFile(const string& name, Graph const& graph,                        const FunctionLibraryDefinition* flib_def = nullptr,                        const string& dirname = "");

grep -v tensor_content tf_graph.pbtxt > tf_graph1.pbtxt

用于缩减模型文件大小

 

最新回复(0)