coslr = WarmupCosineLR(max_iters =500) linlr = WarmupMultiStepLR(milestones=[50,200,400])foriterinrange(500): lr.append(linlr.get_lr(iter)) iters.append(iter) plt.plot(iters,lr) plt.show()
warmup_iters = 1000 base_lr = 0.001 import numpy as np lr = [] iters=[] for iter in range(500): alpha = iter/warmup_iters warmup_factor = warmup_factor*(1-alpha)+alpha lr.append( base_lr * warmup_factor * gamma ** bisect_right(Steps, iter)) iters.append(iter) plt.plot(i...
for iter in range(500): alpha = iter/warmup_iters warmup_factor = warmup_factor*(1-alpha)+alpha lr.append( base_lr * warmup_factor * gamma ** bisect_right(Steps, iter)) iters.append(iter) plt.plot(iters,lr) plt.show() 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13...