SaveWeights
minnt.callbacks.SaveWeights
Bases: Callback
A callback that saves model weights to a file after each epoch.
Source code in minnt/callbacks/save_weights.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
__init__
Create the SaveWeights callback.
Parameters:
-
path(str) –A path where weights will be saved using the minnt.TrainableModule.save_weights method after each epoch. Note that you can use templates like
{logdir}and{epoch[:formatting]}. -
optimizer_path(str | None, default:None) –An optional path passed to minnt.TrainableModule.save_weights to save also the optimizer state; it is relative to
path.
Source code in minnt/callbacks/save_weights.py
17 18 19 20 21 22 23 24 25 26 27 | |