MCPcopy Create free account
hub / github.com/OAID/Tengine / LoadModel

Method LoadModel

tengine-module/plugin/serializer/tensorflow/tf_serializer.cpp:119–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119bool TFSerializer::LoadModel(const std::vector<std::string>& file_list, StaticGraph* graph)
120{
121 tensorflow::GraphDef tf_net;
122
123 if( //! LoadTextFile(file_list[0].c_str(), tf_net) &&
124 !LoadBinaryFile(file_list[0].c_str(), tf_net))
125 return false;
126
127 SetGraphSource(graph, file_list[0]);
128 SetGraphSourceFormat(graph, "tensorflow");
129 SetGraphConstTensorFile(graph, file_list[0]);
130 SetGraphLayout(graph, TENGINE_LAYOUT_NHWC);
131 SetModelLayout(graph, TENGINE_LAYOUT_NHWC);
132 SetModelFormat(graph, MODEL_FORMAT_TENSORFLOW);
133
134 return LoadGraph(tf_net, graph);
135}
136
137bool TFSerializer::LoadTextFile(const char* fname, tensorflow::GraphDef& tf_net)
138{

Callers 1

test_tfserializerFunction · 0.45

Calls 8

SetGraphSourceFunction · 0.85
SetGraphSourceFormatFunction · 0.85
SetGraphConstTensorFileFunction · 0.85
SetGraphLayoutFunction · 0.85
SetModelLayoutFunction · 0.85
SetModelFormatFunction · 0.85
LoadGraphFunction · 0.85
c_strMethod · 0.45

Tested by 1

test_tfserializerFunction · 0.36