| 345 | } |
| 346 | |
| 347 | void TFStats::WriteProfile(const string& filename) { |
| 348 | string content; |
| 349 | SerializeToString(&content); |
| 350 | Status s = WriteStringToFile(Env::Default(), filename, content); |
| 351 | if (!s.ok()) { |
| 352 | fprintf(stderr, "%s\n", s.ToString().c_str()); |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | bool TFStats::Validate(const Options& opts) const { |
| 357 | if (opts.step >= 0 && steps_.find(opts.step) == steps_.end()) { |