espnet2.main_funcs.average_nbest_models.average_nbest_models
Less than 1 minute
espnet2.main_funcs.average_nbest_models.average_nbest_models
espnet2.main_funcs.average_nbest_models.average_nbest_models(output_dir: Path, reporter: Reporter, best_model_criterion: Sequence[Sequence[str]], nbest: Collection[int] | int, suffix: str | None = None) → None
Generate averaged model from n-best models
- Parameters:
- output_dir – The directory contains the model file for each epoch
- reporter – Reporter instance
- best_model_criterion – Give criterions to decide the best model. e.g. [(“valid”, “loss”, “min”), (“train”, “acc”, “max”)]
- nbest – Number of best model files to be averaged
- suffix – A suffix added to the averaged model file name