muellerzr HF staff commited on
Commit
78fa635
1 Parent(s): f95086b

Remove nbsp

Browse files
Files changed (1) hide show
  1. code_samples/accelerate +1 -1
code_samples/accelerate CHANGED
@@ -7,7 +7,7 @@ train_dataloader, model, optimizer scheduler = accelerator.prepare(
7
 
8
  model.train()
9
  for batch in train_dataloader:
10
-     optimizer.zero_grad()
11
  inputs, targets = batch
12
  outputs = model(inputs)
13
  loss = loss_function(outputs, targets)
 
7
 
8
  model.train()
9
  for batch in train_dataloader:
10
+ optimizer.zero_grad()
11
  inputs, targets = batch
12
  outputs = model(inputs)
13
  loss = loss_function(outputs, targets)