We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c25b98 commit cdd12bdCopy full SHA for cdd12bd
docs/source/en/tutorials/basic_training.md
@@ -340,6 +340,7 @@ Now you can wrap all these components together in a training loop with 🤗 Acce
340
... loss = F.mse_loss(noise_pred, noise)
341
... accelerator.backward(loss)
342
343
+... if (step + 1) % config.gradient_accumulation_steps == 0:
344
... accelerator.clip_grad_norm_(model.parameters(), 1.0)
345
... optimizer.step()
346
... lr_scheduler.step()
0 commit comments