wenet-e2e / wetts

Production First and Production Ready End-to-End Text-to-Speech Toolkit
Apache License 2.0
356 stars 56 forks source link

Refactor the code in train.py #212

Closed Shengqiang-Li closed 3 months ago

Shengqiang-Li commented 3 months ago
  1. The initialization consists of seven parts: (1) Get the dataset and data loader; (2) Get the tts model; (3) Dispatch the model from cpu to gpu; (4) Get the optimizer; (5) Load the checkpoint; (6) Get the scheduler; (7) Get the tensorboard summary.
  2. Set the model device via local_rank instead of rank;
  3. Get the global step from the checkpoint directly.