Swin-Transformer icon indicating copy to clipboard operation
Swin-Transformer copied to clipboard

gradient_accumulation should use “epoch * num_steps + idx” rather than “idx + 1”

Open shantzhou opened this issue 2 years ago • 0 comments

if (idx + 1) % config.TRAIN.ACCUMULATION_STEPS == 0: optimizer.step() optimizer.zero_grad() lr_scheduler.step_update(epoch * num_steps + idx)

shantzhou avatar Mar 21 '22 03:03 shantzhou