Skip to content

Commit

Permalink
enable the grad_scale is too small error
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Mar 11, 2024
1 parent 89632bf commit e69b60e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions egs/vctk/TTS/vits/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ def save_bad_model(suffix: str = ""):
if cur_grad_scale < 1.0e-05:
save_bad_model()
logging.warning(f"Grad scale is small: {cur_grad_scale}")
# raise RuntimeError(
# f"grad_scale is too small, exiting: {cur_grad_scale}"
# )
raise RuntimeError(
f"grad_scale is too small, exiting: {cur_grad_scale}"
)

if params.batch_idx_train % params.log_interval == 0:
cur_lr_g = max(scheduler_g.get_last_lr())
Expand Down

0 comments on commit e69b60e

Please sign in to comment.