def __call__(self): learning_rate = lr.PiecewiseDecay(boundaries=self.boundaries, values=self.values, last_epoch=self.last_epoch) if self.warmup_epoch > 0: learning_rate = lr.LinearWarmup(learning_rate=learning_rate, warmup_steps=self.warmup_epoch, start_lr=0.0, end_lr=self.values[0], last_epoch=self.last_epoch) return learning_rate
def __call__(self): learning_rate = lr.CosineAnnealingDecay( learning_rate=self.learning_rate, T_max=self.T_max, last_epoch=self.last_epoch) if self.warmup_epoch > 0: learning_rate = lr.LinearWarmup(learning_rate=learning_rate, warmup_steps=self.warmup_epoch, start_lr=0.0, end_lr=self.learning_rate, last_epoch=self.last_epoch) return learning_rate
def __call__(self): learning_rate = lr.StepDecay(learning_rate=self.learning_rate, step_size=self.step_size, gamma=self.gamma, last_epoch=self.last_epoch) if self.warmup_epoch > 0: learning_rate = lr.LinearWarmup(learning_rate=learning_rate, warmup_steps=self.warmup_epoch, start_lr=0.0, end_lr=self.learning_rate, last_epoch=self.last_epoch) return learning_rate
def __call__(self): learning_rate = lr.PolynomialDecay(learning_rate=self.learning_rate, decay_steps=self.epochs, end_lr=self.end_lr, power=self.power, last_epoch=self.last_epoch) if self.warmup_epoch > 0: learning_rate = lr.LinearWarmup(learning_rate=learning_rate, warmup_steps=self.warmup_epoch, start_lr=0.0, end_lr=self.learning_rate, last_epoch=self.last_epoch) return learning_rate
def __call__(self): learning_rate = lr.CosineAnnealingDecay( learning_rate=self.learning_rate, T_max=self.T_max, eta_min=self.eta_min, last_epoch=self.last_epoch ) if self.T_max > 0 else self.learning_rate if self.warmup_steps > 0: learning_rate = lr.LinearWarmup(learning_rate=learning_rate, warmup_steps=self.warmup_steps, start_lr=self.warmup_start_lr, end_lr=self.learning_rate, last_epoch=self.last_epoch) return learning_rate