This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'STLR scheduler from https://arxiv.org/abs/1801.06146' | |
class STLR(_LRScheduler): | |
def __init__(self, optimizer, T_max, last_epoch=-1, ratio=32): | |
self.T_max = T_max | |
self.cut = np.floor(T_max*0.1) | |
self.ratio = ratio | |
super(STLR, self).__init__(optimizer, last_epoch) | |
def get_lr(self): |