def epoch_begin(self, epoch):
    "Begin epoch.\n\n    Args:\n      epoch: `int`, the epoch number.\n\n    Raises:\n      ValueError: if we've already begun an epoch, or `epoch` < 0.\n    "
    if (self._current_epoch is not None):
        raise ValueError('epoch_begin called twice without epoch_end.')
    if (epoch < 0):
        raise ValueError(('Invalid epoch %s.' % epoch))
    self._current_epoch = epoch
Begin epoch.

Args:
  epoch: `int`, the epoch number.

Raises:
  ValueError: if we've already begun an epoch, or `epoch` < 0.
def epoch_begin(self, epoch):
    "Begin epoch.\n\n    Args:\n      epoch: `int`, the epoch number.\n\n    Raises:\n      ValueError: if we've already begun an epoch, or `epoch` < 0.\n    "
    if (self._current_epoch is not None):
        raise ValueError('epoch_begin called twice without epoch_end.')
    if (epoch < 0):
        raise ValueError(('Invalid epoch %s.' % epoch))
    self._current_epoch = epoch