| 88 | } |
| 89 | |
| 90 | static 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 | |
| 109 | static TF_Session* LoadGraph(const char* model_file, TF_Graph* graph) |
| 110 | { |