pinnx.callbacks module

Contents

pinnx.callbacks module#

This module provides callback functions for monitoring and controlling the training process. Callbacks can be used for model checkpointing, early stopping, logging, visualization, and adaptive training strategies.

Callbacks#

Classes for training monitoring and control.

Callback: Base class for all callbacks.

CallbackList: Container for managing multiple callbacks.

ModelCheckpoint: Saves model checkpoints during training.

EarlyStopping: Stops training when monitored metric stops improving.

Timer: Tracks and reports training time.

DropoutUncertainty: Estimates prediction uncertainty using dropout.

VariableValue: Monitors and logs variable values during training.

OperatorPredictor: Makes predictions with trained operator networks.

MovieDumper: Creates animations of solution evolution.

PDEPointResampler: Adaptively resamples collocation points based on residuals.

Callback

Callback base class.

CallbackList

Container abstracting a list of callbacks.

ModelCheckpoint

Save the trainer after every epoch.

EarlyStopping

Stop training when a monitored quantity (training or testing loss) has stopped improving.

Timer

Stop training when training time reaches the threshold.

DropoutUncertainty

Uncertainty estimation via MC dropout.

VariableValue

Get the variable values.

OperatorPredictor

Generates operator values for the input samples.

MovieDumper

Dump a movie to show the training progress of the function along a line.

PDEPointResampler

Resample the training points for PDE and/or BC losses every given period.