Skip to content

Commit

Permalink
Fixed global_step in train_cifar10_ddp.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoming-Zhao authored Nov 16, 2024
1 parent 72ae2fd commit 4178ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/images/cifar10/train_cifar10_ddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def train(rank, total_num_gpus, argv):

with trange(steps_per_epoch, dynamic_ncols=True) as step_pbar:
for step in step_pbar:
global_step += step
global_step += 1

optim.zero_grad()
x1 = next(datalooper).to(rank)
Expand Down

0 comments on commit 4178ea5

Please sign in to comment.