Skip to content

Commit

Permalink
minor fixes to the matcha recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr authored Dec 9, 2024
1 parent 32b7a44 commit 08caa1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion egs/ljspeech/TTS/matcha/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,10 @@ def save_bad_model(suffix: str = ""):

loss = sum(losses.values())

optimizer.zero_grad()
scaler.scale(loss).backward()
scaler.step(optimizer)
scaler.update()
optimizer.zero_grad()

loss_info = MetricsTracker()
loss_info["samples"] = batch_size
Expand Down

0 comments on commit 08caa1e

Please sign in to comment.