Hi refererring to the below peace of code
"Supports 1-Cycle style training"
from ..core import *
from ..callback import *
from ..basic_train import Learner,LearnerCallback
__all__ = ['OneCycleScheduler']
class OneCycleScheduler(LearnerCallback):
"Manage 1-Cycle style training as outlined in Leslie Smith's [paper](https://arxiv.org/pdf/1803.09820.pdf)."
def __init__(self, learn:Learner, lr_max:float, moms:Floats=(0.95,0.85), div_factor:float=25., pct_start:float=0.3,
final_div:float=None, tot_epochs:int=None, start_epoch:int=None):
super().__init__(learn)
self.lr_max,self.div_factor,self.pct_start,self.final_div = lr_max,div_factor,pct_start,final_div
if self.final_div is None: self.final_div = div_factor*1e4
self.moms=tuple(listify(moms,2))
if is_listy(self.lr_max): self.lr_max = np.array(self.lr_max)
self.start_epoch, self.tot_epochs = start_epoch, tot_epochs
def steps(self, *steps_cfg:StartOptEnd):
"Build anneal schedule for all of the parameters."
This file has been truncated. show original
It looks like based on the value of pct_start variation phases of cos anhealer are defined and it takes into account the entire no of epochs .
Is there a way we can have this cycle variation to happen each epoch ?
Is fit one cycle bound to work in this way only so if want cycle variations to happen each epoch we should go with fit ?