class_docstr: A Keras callback to save the model weights at the best epoch.
  
  Args:
      objective: An `Objective` instance.
      filepath: String. The file path to save the model weights.
class_docstr_tok: ["A","Keras","callback","to","save","the","model","weights","at","the","best","epoch",".","Args",":","objective",":","An","`","Objective","`","instance",".","filepath",":","String",".","The","file","path","to","save","the","model","weights","."]
code: def on_epoch_end(self, epoch, logs=None):
      if not self.objective.has_value(logs):
          # Save on every epoch if metric value is not in the logs. Either no
          # objective is specified, or objective is computed and returned
          # after `fit()`.
          self._save_model()
          return
      current_value = self.objective.get_value(logs)
      if self.objective.better_than(current_value, self.best_value):
          self.best_value = current_value
          self._save_model()
  
imports: import collections
  import statistics
  import numpy
  from keras_tuner import backend
  from keras_tuner import errors
  from keras_tuner.backend import config
  from keras_tuner.backend import keras
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import objective
label_desc: Use image node_id 2 for calling the SaveBestEpoch obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types