From 4178ea500fd0a7e7e85efdc0e92bf1554f66c0ec Mon Sep 17 00:00:00 2001 From: Xiaoming Zhao Date: Sat, 16 Nov 2024 15:39:48 -0600 Subject: [PATCH] Fixed global_step in train_cifar10_ddp.py --- examples/images/cifar10/train_cifar10_ddp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/images/cifar10/train_cifar10_ddp.py b/examples/images/cifar10/train_cifar10_ddp.py index 851f28c..2932443 100644 --- a/examples/images/cifar10/train_cifar10_ddp.py +++ b/examples/images/cifar10/train_cifar10_ddp.py @@ -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)