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

Function ReadLabelsFile

examples/tensorflow_wrapper/label_image/label_image.cpp:90–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static int ReadLabelsFile(const char* labels_file, vector<string>* result)
91{
92 ifstream fs(labels_file);
93 if(!fs)
94 {
95 cout << labels_file << " does not exist" << endl;
96 return -1;
97 }
98
99 result->clear();
100 string line;
101 while(getline(fs, line))
102 {
103 result->push_back(line);
104 }
105
106 return 0;
107}
108
109static TF_Session* LoadGraph(const char* model_file, TF_Graph* graph)
110{

Callers 1

PrintTopLabelsFunction · 0.85

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected