parameters: (argv)
docstring: Validate a model's performance on a set of holdout data.
docstring_summary: Validate a model's performance on a set of holdout data.
docstring_tokens: Validate a model s performance on a set of holdout data .
function: def main(argv):
      """Validate a model's performance on a set of holdout data."""
      _, *validation_paths = argv
      if FLAGS.expand_validation_dirs:
          tf_records = []
          with utils.logged_timer("Building lists of holdout files"):
              dirs = validation_paths
              while dirs:
                  d = dirs.pop()
                  for path, newdirs, files in os.walk(d):
                      tf_records.extend(os.path.join(path, f) for f in files if f.endswith('.zz'))
                      dirs.extend(os.path.join(path, d) for d in newdirs)
  
      else:
          tf_records = validation_paths
  
      if not tf_records:
          print("Validation paths:", validation_paths)
          print(["{}:\n\t{}".format(p, os.listdir(p)) for p in validation_paths])
          raise RuntimeError("Did not find any holdout files for validating!")
      validate(*tf_records)
function_tokens: def main ( argv ) : _ , * validation_paths = argv if FLAGS . expand_validation_dirs : tf_records = [ ] with utils . logged_timer ( "Building lists of holdout files" ) : dirs = validation_paths while dirs : d = dirs . pop ( ) for path , newdirs , files in os . walk ( d ) : tf_records . extend ( os . path . join ( path , f ) for f in files if f . endswith ( '.zz' ) ) dirs . extend ( os . path . join ( path , d ) for d in newdirs ) else : tf_records = validation_paths if not tf_records : print ( "Validation paths:" , validation_paths ) print ( [ "{}:\n\t{}" . format ( p , os . listdir ( p ) ) for p in validation_paths ] ) raise RuntimeError ( "Did not find any holdout files for validating!" ) validate ( * tf_records )