Skip to content

Instantly share code, notes, and snippets.

@peterroelants
Last active August 24, 2017 11:49
Show Gist options
  • Save peterroelants/7f8ebf267c9d7d5698ee8483a1ee645c to your computer and use it in GitHub Desktop.
Save peterroelants/7f8ebf267c9d7d5698ee8483a1ee645c to your computer and use it in GitHub Desktop.
TensorFlow Experiment creation
experiment = tf.contrib.learn.Experiment(
estimator=estimator, # Estimator
train_input_fn=train_input_fn, # First-class function
eval_input_fn=eval_input_fn, # First-class function
train_steps=params.train_steps, # Minibatch steps
min_eval_frequency=params.min_eval_frequency, # Eval frequency
train_monitors=[train_input_hook], # Hooks for training
eval_hooks=[eval_input_hook], # Hooks for evaluation
eval_steps=None # Use evaluation feeder until its empty
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment