speechbrain.utils.pretrained 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.utils.pretrained.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
min_key (str) β Key to use for finding best checkpoint (lower is better). By default, passed to
self.checkpointer.recover_if_possible()
.max_key (str) β Key to use for finding best checkpoint (higher is better). By default, passed to
self.checkpointer.recover_if_possible()
.ckpt_predicate (callable) β a filter predicate to locate checkpoints
pretrainer_key (str) β the key under which the pretrainer is stored
checkpointer_key (str) β the key under which the checkpointer is stored
- Returns:
saved β Whether the save was successful
- Return type: