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

Method LoadModel

tengine-module/plugin/serializer/caffe/caffe_serializer.cpp:215–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215bool CaffeSingle::LoadModel(const std::vector<std::string>& file_list, StaticGraph* graph)
216{
217 te_caffe::NetParameter caffe_net;
218
219 if(file_list.size() != GetFileNum())
220 return false;
221
222 if(!LoadBinaryFile(file_list[0].c_str(), caffe_net))
223 return false;
224
225 SetGraphSource(graph, file_list[0]);
226 SetGraphSourceFormat(graph, "caffe");
227 SetGraphConstTensorFile(graph, file_list[0]);
228 SetGraphLayout(graph, TENGINE_LAYOUT_NCHW);
229 SetModelLayout(graph, TENGINE_LAYOUT_NCHW);
230 SetModelFormat(graph, MODEL_FORMAT_CAFFE);
231
232 return LoadGraph(caffe_net, graph);
233}
234
235bool CaffeSingle::LoadNode(StaticGraph* graph, StaticNode* node, const te_caffe::LayerParameter& layer_param,
236 name_map_t& tensor_name_map)

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected