espnet2.train.uasr_trainer.UASRTrainer
espnet2.train.uasr_trainer.UASRTrainer
class espnet2.train.uasr_trainer.UASRTrainer
Bases: Trainer
Trainer for GAN-based UASR training.
If you’d like to use this trainer, the model must inherit espnet.train.abs_gan_espnet_model.AbsGANESPnetModel.
classmethod add_arguments(parser: ArgumentParser)
Add additional arguments for GAN-trainer.
classmethod build_options(args: Namespace) → TrainerOptions
Build options consumed by train(), eval(), and plot_attention().
classmethod train_one_epoch(model: Module, iterator: Iterable[Tuple[List[str], Dict[str, Tensor]]], optimizers: Sequence[Optimizer], schedulers: Sequence[AbsScheduler | None], scaler: GradScaler | None, reporter: SubReporter, summary_writer, options: UASRTrainerOptions, distributed_option: DistributedOption) → bool
Train one epoch for UASR.
classmethod validate_one_epoch(model: Module, iterator: Iterable[Dict[str, Tensor]], reporter: SubReporter, options: UASRTrainerOptions, distributed_option: DistributedOption) → None
Validate one epoch.