parameters: (self, epoch)
docstring: Begin epoch.
  
      Args:
        epoch: `int`, the epoch number.
  
      Raises:
        ValueError: if we've already begun an epoch, or `epoch` < 0.
docstring_summary: Begin epoch.
docstring_tokens: Begin epoch .
function: def epoch_begin(self, epoch):
      """Begin epoch.
  
      Args:
        epoch: `int`, the epoch number.
  
      Raises:
        ValueError: if we've already begun an epoch, or `epoch` < 0.
      """
      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
function_tokens: def epoch_begin ( self , epoch ) : 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