speechbrain.pretrained.training module
Training utilities for pretrained models
Authors * Artem Ploujnikov 2021
Summary
Functions:
Saves the necessary files for the pretrained model from the best checkpoint found. |
Reference
- speechbrain.pretrained.training.save_for_pretrained(hparams, min_key=None, max_key=None, ckpt_predicate=None, pretrainer_key='pretrainer', checkpointer_key='checkpointer')[source]
Saves the necessary files for the pretrained model from the best checkpoint found. The goal of this function is to export the model for a Pretrainer
- Parameters
hparams (dict) – the hyperparameter file
max_key (str) – Key to use for finding best checkpoint (higher is better). By default, passed to
self.checkpointer.recover_if_possible()
.min_key (str) – Key to use for finding best checkpoint (lower is better). By default, passed to
self.checkpointer.recover_if_possible()
.ckpt_predicate (callable) – a filter predicate to locate checkpoints
checkpointer_key (str) – the key under which the checkpointer is stored
pretrained_key (str) – the key under which the pretrainer is stored