luz_callback_model_checkpoint | R Documentation |
This saves checkpoints of the model according to the specified metric and behavior.
luz_callback_model_checkpoint(
path,
monitor = "valid_loss",
save_best_only = FALSE,
mode = "min",
min_delta = 0
)
path |
Path to save the model on disk. The path is interpolated with |
monitor |
A string in the format |
save_best_only |
if |
mode |
Specifies the direction that is considered an improvement. By default 'min' is used. Can also be 'max' (higher is better) and 'zero' (closer to zero is better). |
min_delta |
Minimum difference to consider as improvement. Only used when
|
mode
and min_delta
are only used when save_best_only=TRUE
.
save_best_only
will overwrite the saved models if the path
parameter
don't differentiate by epochs.
Read the checkpointing article in the pkgdown website for more information.
Other luz_callbacks:
luz_callback_auto_resume()
,
luz_callback_csv_logger()
,
luz_callback_early_stopping()
,
luz_callback_interrupt()
,
luz_callback_keep_best_model()
,
luz_callback_lr_scheduler()
,
luz_callback_metrics()
,
luz_callback_mixed_precision()
,
luz_callback_mixup()
,
luz_callback_profile()
,
luz_callback_progress()
,
luz_callback_resume_from_checkpoint()
,
luz_callback_train_valid()
,
luz_callback()
luz_callback_model_checkpoint(path= "path/to/dir")
luz_callback_model_checkpoint(path= "path/to/dir/epoch-{epoch:02d}/model.pt")
luz_callback_model_checkpoint(path= "path/to/dir/epoch-{epoch:02d}/model-{monitor:.2f}.pt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.