NAME

AI::MXNet::Callback - A collection of predefined callback functions

module_checkpoint

Callback to checkpoint Module to prefix every epoch.

Parameters ---------- $mod : subclass of AI::MXNet::Module::Base The module to checkpoint. $prefix : str The file prefix to checkpoint to $period=1 : int How many epochs to wait before checkpointing. Default is 1. $save_optimizer_states=0 : Bool Whether to save optimizer states for continue training

Returns ------- $callback : sub ref The callback function that can be passed as iter_end_callback to fit.

log_train_metric

Callback to log the training evaluation result every period.

Parameters ---------- $period : Int The number of batch to log the training evaluation metric. $auto_reset : Bool Reset the metric after each log

Returns ------- $callback : sub ref The callback function that can be passed as iter_epoch_callback to fit.

NAME

AI::MXNet::Speedometer - A callback that logs training speed

DESCRIPTION

Calculate and log training speed periodically.

    Parameters
    ----------
    batch_size: int
        batch_size of data
    frequent: int
        How many batches between calculations.
        Defaults to calculating & logging every 50 batches.

NAME

AI::MXNet::ProgressBar - A callback to show a progress bar.

DESCRIPTION

Show a progress bar.

Parameters ---------- total: Int total batch size, 1 length: Int length or progress bar, 80

NAME

AI::MXNet::LogValidationMetricsCallback - A callback to log the eval metrics at the end of an epoch.