SOTA Open Source TTS
Fix grad acc loss
Lengyue2a19adb04552
diff --git a/speech_lm/train.py b/speech_lm/train.pyindex 3f80539..6cc3d9c 100644--- a/speech_lm/train.py+++ b/speech_lm/train.py@@ -111,7 +111,9 @@ def train(outputs = model(**batch)loss = outputs.lossmetrics = getattr(outputs, "metrics", {})- fabric.backward(loss)++ # Need to divide loss by accumulation steps+ fabric.backward(loss / cfg.schedule.gradient_accumulation_steps)# Update trackerstrackers["loss"].append(float(loss))