Skip to content

Commit

Permalink
Merge pull request #192 from mkaic/patch-1
Browse files Browse the repository at this point in the history
Honor the --skip-scheduler flag
  • Loading branch information
rwightman committed Oct 23, 2022
2 parents db338b0 + 503f53f commit 4762fae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/training/train.py
Expand Up @@ -68,7 +68,9 @@ def train_one_epoch(model, data, epoch, optimizer, scaler, scheduler, args, tb_w
end = time.time()
for i, batch in enumerate(dataloader):
step = num_batches_per_epoch * epoch + i
scheduler(step)

if not args.skip_scheduler:
scheduler(step)

images, texts = batch
images = images.to(device=device, non_blocking=True)
Expand Down

0 comments on commit 4762fae

Please sign in to comment.