docs: def validate(*tf_records):
      """Validate a model's performance on a set of holdout data."""
      if FLAGS.use_tpu:
          def _input_fn(params):
              return preprocessing.get_tpu_input_tensors(
                  params['batch_size'], tf_records, filter_amount=1.0)
      else:
          def _input_fn():
              return preprocessing.get_input_tensors(
                  FLAGS.train_batch_size, tf_records, filter_amount=1.0,
                  shuffle_examples=False)
  
      steps = FLAGS.examples_to_validate // FLAGS.train_batch_size
      if FLAGS.use_tpu:
          steps //= FLAGS.num_tpu_cores
  
      estimator = dual_net.get_estimator()
      with utils.logged_timer("Validating"):
          estimator.evaluate(_input_fn, steps=steps, name=FLAGS.validate_name)