OREPA_CVPR2022 icon indicating copy to clipboard operation
OREPA_CVPR2022 copied to clipboard

I think there is a minor error

Open skhnha opened this issue 3 years ago • 1 comments
trafficstars

Hi, thanks for making your code public. It is really great work! I ran your code, and i think there is a minor error in your code.

On line 217 in train.py lr_scheduler = WarmupCosineAnnealingLR(optimizer=optimizer, T_cosine_max=args.epochs * IMAGENET_TRAINSET_SIZE // args.batch_size // ngpus_per_node, warmup=args.epochs/24)

I think it makes warm up the learning rate during only 5 steps, not 5 epochs. To warm up the learning rate during 5 epochs, 'args.epochs/24' should be 'args.epochs*len(train_loader)/24'.

Therefore, I modify line 217 as follows, lr_scheduler = WarmupCosineAnnealingLR(optimizer=optimizer, T_cosine_max=args.epochs * len(train_loader), warmup=args.epochs * len(train_loader) / 24)

Thank you!

skhnha avatar Jul 20 '22 06:07 skhnha

I think you are right but I remember having fixed it long ago... Anyway

JUGGHM avatar Jul 20 '22 10:07 JUGGHM