Skip to content

callback

Callback class

dlf.core.callback.Callback(*args, **kwargs)

Base class for a callback


on_evaluation method

Callback.on_evaluation(step, losses, metrics, target)

Called at every N evaluation step.

Args

  • step: int. Current step
  • losses: dict[str, float]. A dictionary containing loss name as key and the loss value as float
  • metrics: dict[str, tf.keras.metrics.Metric]. A list of all available metrics
  • target: dlf.core.experiment.ExperimentTarget. Target of this callback

on_train_begin method

Callback.on_train_begin()

Called at the beginning of a training.


on_train_end method

Callback.on_train_end()

Called at the end of a training.


set_experiment method

Callback.set_experiment(experiment)

Sets a reference to the current experiment.

Args

  • experiment: Experiment. Current experiment