tabensemb.model.AbstractNN.configure_callbacks#
method
- AbstractNN.configure_callbacks() Sequence[Callback] | Callback#
Configure model-specific callbacks. When the model gets attached, e.g., when
.fit()or.test()gets called, the list or a callback returned here will be merged with the list of callbacks passed to the Trainer’scallbacksargument. If a callback returned here has the same type as one or several callbacks already present in the Trainer’s callbacks list, it will take priority and replace them. In addition, Lightning will make sureModelCheckpointcallbacks run last.- Returns:
A callback or a list of callbacks which will extend the list of callbacks in the Trainer.
Example:
def configure_callbacks(self): early_stop = EarlyStopping(monitor="val_acc", mode="max") checkpoint = ModelCheckpoint(monitor="val_loss") return [early_stop, checkpoint]