paddlespeech.vector.exps.ge2e.train module
- class paddlespeech.vector.exps.ge2e.train.Ge2eExperiment(config, args)[source]
Bases:
ExperimentBase- Attributes
parallelA flag indicating whether the experiment should run with multiprocessing.
Methods
close()Close visualizer to avoid hanging after training
dump_config()Save the configuration used for this experiment.
init_parallel()Init environment for multiprocess training.
new_epoch()Reset the train loader and increment
epoch.read_batch()Read a batch from the train_loader.
resume_or_load()Resume from latest checkpoint at checkpoints in the output directory or load a specified checkpoint.
run()The routine of the experiment after setup.
save()Save checkpoint (model parameters and optimizer states).
setup()Setup the experiment.
setup_checkpointer()Create a directory used to save checkpoints into.
Setup training dataloader and validation dataloader.
setup_logger()Initialize a text logger to log the experiment.
Setup model, criterion and optimizer, etc.
setup_output_dir()Create a directory used for output.
setup_visualizer()Initialize a visualizer to log the experiment.
train()The training process.
The training loop.
valid()The validation.
- setup_dataloader()[source]
Setup training dataloader and validation dataloader. A subclass should implement this method.