- avalanche.training.checkpoint.save_checkpoint(strategy, fname, exclude=None)
Save the strategy state into a file.
The file can be loaded using maybe_load_checkpoint.
For efficiency, the user can specify some attributes to exclude. For example, if the optimizer is static and doesn’t change during training, it can be safely excluded. These helps to speed up the serialization.
WARNING: the method cannot be used inside the training and evaluation loops of the strategy.
strategy – strategy to serialize.
fname – name of the file.
exclude – List[string] list of attributes to remove before the serialization.