| 511 | } |
| 512 | |
| 513 | bool MaybeSavedModelDirectory(const string& export_dir) { |
| 514 | const string saved_model_pb_path = |
| 515 | io::JoinPath(export_dir, kSavedModelFilenamePb); |
| 516 | const string saved_model_pbtxt_path = |
| 517 | io::JoinPath(export_dir, kSavedModelFilenamePbTxt); |
| 518 | return Env::Default()->FileExists(saved_model_pb_path).ok() || |
| 519 | Env::Default()->FileExists(saved_model_pbtxt_path).ok(); |
| 520 | } |
| 521 | |
| 522 | } // namespace tensorflow |