def step_end(self, step, output):
    "Callback after training step finished.\n\n    This callback provides access to the tensors/ops evaluated at this step,\n    including the additional tensors for which evaluation was requested in\n    `step_begin`.\n\n    In addition, the callback has the opportunity to stop training by returning\n    `True`. This is useful for early stopping, for example.\n\n    Note that this method is not called if the call to `Session.run()` that\n    followed the last call to `step_begin()` failed.\n\n    Args:\n      step: `int`, the current value of the global step.\n      output: `dict` mapping `string` values representing tensor names to\n        the value resulted from running these tensors. Values may be either\n        scalars, for scalar tensors, or Numpy `array`, for non-scalar tensors.\n\n    Returns:\n      `bool`. True if training should stop.\n\n    Raises:\n      ValueError: if we've not begun a step, or `step` number does not match.\n    "
    if (self._current_step != step):
        raise ValueError('step_end expected %s but got %s.', self._current_step, step)
    self._current_step = None
    return False
Callback after training step finished.

This callback provides access to the tensors/ops evaluated at this step,
including the additional tensors for which evaluation was requested in
`step_begin`.

In addition, the callback has the opportunity to stop training by returning
`True`. This is useful for early stopping, for example.

Note that this method is not called if the call to `Session.run()` that
followed the last call to `step_begin()` failed.

Args:
  step: `int`, the current value of the global step.
  output: `dict` mapping `string` values representing tensor names to
    the value resulted from running these tensors. Values may be either
    scalars, for scalar tensors, or Numpy `array`, for non-scalar tensors.

Returns:
  `bool`. True if training should stop.

Raises:
  ValueError: if we've not begun a step, or `step` number does not match.
def step_end(self, step, output):
    "Callback after training step finished.\n\n    This callback provides access to the tensors/ops evaluated at this step,\n    including the additional tensors for which evaluation was requested in\n    `step_begin`.\n\n    In addition, the callback has the opportunity to stop training by returning\n    `True`. This is useful for early stopping, for example.\n\n    Note that this method is not called if the call to `Session.run()` that\n    followed the last call to `step_begin()` failed.\n\n    Args:\n      step: `int`, the current value of the global step.\n      output: `dict` mapping `string` values representing tensor names to\n        the value resulted from running these tensors. Values may be either\n        scalars, for scalar tensors, or Numpy `array`, for non-scalar tensors.\n\n    Returns:\n      `bool`. True if training should stop.\n\n    Raises:\n      ValueError: if we've not begun a step, or `step` number does not match.\n    "
    if (self._current_step != step):
        raise ValueError('step_end expected %s but got %s.', self._current_step, step)
    self._current_step = None
    return False