neuralop.training.callbacks.Callback

class neuralop.training.callbacks.Callback[source]

Base callback class. Each abstract method is called in the trainer’s training loop at the appropriate time.

Callbacks are stateful, meaning they keep track of a state and

update it throughout the lifetime of a Trainer class. Storing the state as a dict enables the Callback to keep track of references to underlying parts of the Trainer’s process, such as models, cost functions and output encoders

Methods

compute_training_loss

compute_val_loss

on_batch_end

on_batch_start

on_before_forward

on_before_loss

on_before_train

on_before_val

on_before_val_loss

on_epoch_end

on_epoch_start

on_init_end

on_init_start

on_load_to_device

on_train_end

on_train_start

on_val_batch_end

on_val_batch_start

on_val_end

on_val_epoch_end

on_val_epoch_start