Skip to content

Commit b70f16c

Browse files
committed
fix D.optim.zero_grad() typo
1 parent b4754ea commit b70f16c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

train_fns.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def train(x, y):
3333

3434
for step_index in range(config['num_D_steps']):
3535
# If accumulating gradients, loop multiple times before an optimizer step
36+
D.optim.zero_grad()
3637
for accumulation_index in range(config['num_D_accumulations']):
3738
z_.sample_()
3839
y_.sample_()

0 commit comments

Comments
 (0)