def experiment_function(run_config, hparams):
  """An experiment function satisfying the tf.estimator API.

  Args:
    run_config: A learn_running.EstimatorConfig object.
    hparams: Unused set of hyperparams.

  Returns:
    experiment: A tf.contrib.learn.Experiment object.
  """
  del hparams

  train_input_fn = partial(input_function, is_train=True)
  eval_input_fn = partial(input_function, is_train=False)

  estimator = tf_estimator.Estimator(
      model_fn=model_function,
      config=run_config,
      model_dir=run_config.model_dir)

  experiment = tf.contrib.learn.Experiment(
      estimator=estimator,
      train_input_fn=train_input_fn,
      eval_input_fn=eval_input_fn,
      eval_steps=FLAGS.num_eval_steps,
  )

  return experiment
An experiment function satisfying the tf.estimator API.

  Args:
    run_config: A learn_running.EstimatorConfig object.
    hparams: Unused set of hyperparams.

  Returns:
    experiment: A tf.contrib.learn.Experiment object.
  
language/labs/memory/run_models.py