| 309 | } |
| 310 | |
| 311 | static bool check_file_exist(const std::string file_name) |
| 312 | { |
| 313 | FILE* fp = fopen(file_name.c_str(), "r"); |
| 314 | if(!fp) |
| 315 | { |
| 316 | std::cerr << "Input file not existed: " << file_name << "\n"; |
| 317 | return false; |
| 318 | } |
| 319 | fclose(fp); |
| 320 | return true; |
| 321 | } |
| 322 | |
| 323 | static bool check_params(const std::string model_format, int& model_fnum, const std::string proto_file, |
| 324 | const std::string model_file, const std::string label_file, const std::string image_file, |