xinjli / allosaurus

Allosaurus is a pretrained universal phone recognizer for more than 2000 languages
GNU General Public License v3.0
532 stars 85 forks source link

Small bug fixes in trainer.py #8

Closed ajd12342 closed 3 years ago

ajd12342 commented 3 years ago

There were two bugs that I found while reading through the code and have fixed them here.

  1. The best_per was never getting updated in case the current validate_phone_error_rate is less than best_per, so it was staying fixed at 100.0.
  2. The num_no_improvement should be reset to 0 in case improvement does happen.
xinjli commented 3 years ago

Hi, the fix looks good! Thanks for updating it!