Skip to content

Commit e58f12c

Browse files
committed
Slight error in accelerator
1 parent fd6ba36 commit e58f12c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def main():
128128
with accelerator.accumulate(model):
129129
loss = diffusion(mask, img)
130130
accelerator.log({'loss': loss}) # Log loss to wandb
131-
loss.backward()
131+
accelerator.backward(loss)
132132
optimizer.step()
133133
optimizer.zero_grad()
134134
running_loss += loss.item() * img.size(0)

0 commit comments

Comments
 (0)