parameters: (self, model, callbacks=None, use_samples=False, verbose=0,
                 mode=ModeKeys.TRAIN)
docstring: Provide a scope for the whole training process.
docstring_summary: Provide a scope for the whole training process.
docstring_tokens: Provide a scope for the whole training process .
function: def on_start(self, model, callbacks=None, use_samples=False, verbose=0,
                 mode=ModeKeys.TRAIN):
      """Provide a scope for the whole training process."""
      # TODO(omalleyt): Handle ProgBar as part of Callbacks once hooks are ready.
      progbar = training_utils.get_progbar(
          model, 'samples' if use_samples else 'steps')
      progbar.params = callbacks.params
      progbar.params['verbose'] = verbose
      callbacks.model.stop_training = False
      callbacks._call_begin_hook(mode)
      progbar.on_train_begin()
  
      # Cache those two instance so that it can be used in other functions.
      self.callbacks = callbacks
      self.progbar = progbar
  
      try:
        yield
      finally:
        # End of all epochs
        self.callbacks._call_end_hook(mode)
function_tokens: def on_start ( self , model , callbacks = None , use_samples = False , verbose = 0 , mode = ModeKeys . TRAIN ) : # TODO(omalleyt): Handle ProgBar as part of Callbacks once hooks are ready. progbar = training_utils . get_progbar ( model , 'samples' if use_samples else 'steps' ) progbar . params = callbacks . params progbar . params [ 'verbose' ] = verbose callbacks . model . stop_training = False callbacks . _call_begin_hook ( mode ) progbar . on_train_begin ( ) # Cache those two instance so that it can be used in other functions. self . callbacks = callbacks self . progbar = progbar try : yield finally : # End of all epochs self . callbacks . _call_end_hook ( mode )