tf.contrib.learn.monitors.EveryN

class tf.contrib.learn.monitors.EveryN

Base class for monitors that execute callbacks every N steps.

This class adds three new callbacks: - every_n_step_begin - every_n_step_end - every_n_post_step

The callbacks are executed every n steps, or optionally every step for the first m steps, where m and n can both be user-specified.

When extending this class, note that if you wish to use any of the BaseMonitor callbacks, you must call their respective super implementation:

def step_begin(self, step): super(ExampleMonitor, self).step_begin(step) return []

Failing to call the super implementation will cause unpredictible behavior.

The every_n_post_step() callback is also called after the last step if it was not already called through the regular conditions. Note that every_n_step_begin() and every_n_step_end() do not receive that special treatment.

doc_TensorFlow
2016-10-14 13:06:10
Comments
Leave a Comment

Please login to continue.