Checks the permissions of the frozen model file.
| 41 | |
| 42 | // Checks the permissions of the frozen model file. |
| 43 | void CheckFrozenModelPermissions(const Arg<string>& input_file) { |
| 44 | QCHECK(input_file.specified()) << "Missing required flag --input_file.\n"; |
| 45 | QCHECK(port::file::Exists(input_file.value(), port::file::Defaults()).ok()) |
| 46 | << "Specified input_file does not exist: " << input_file.value() << ".\n"; |
| 47 | QCHECK(port::file::Readable(input_file.value(), port::file::Defaults()).ok()) |
| 48 | << "Specified input_file exists, but is not readable: " |
| 49 | << input_file.value() << ".\n"; |
| 50 | } |
| 51 | |
| 52 | // Reads the contents of the GraphDef from either the frozen graph file or the |
| 53 | // SavedModel directory. If it reads the SavedModel directory, it updates the |