BERT-style fine-tuning warms the learning rate up linearly, then decays it polynomially to an end value.
Implement poly_lr(step, total, warmup, lr_max, lr_end=0.0, power=1.0):
step < warmup: lr_max * step / warmuplr_end + (lr_max - lr_end) * (1 - (step - warmup) / (total - warmup)) ** powertotal stay at lr_end