(self,
                 fai_optimizer,
                 total_step,
                 initial_learning_rate,
                 decay_length,
                 decay_factor,
                 staircase=True)
Args:
            decay_length: must in (0, 1)
Args:
            decay_length: must in (0, 1)
Args : decay_length : must in ( 0 1 )
def __init__(self,
                 fai_optimizer,
                 total_step,
                 initial_learning_rate,
                 decay_length,
                 decay_factor,
                 staircase=True):
        """
        Args:
            decay_length: must in (0, 1)
        """
        assert decay_length > 0
        assert decay_length < 1
        self._decay_steps_unified = decay_length
        self._decay_factor = decay_factor
        self._staircase = staircase
        step = 0
        stage = 1
        lr_phases = []
        if staircase:
            while step <= total_step:
                func = lambda p, _d=initial_learning_rate * stage: _d
                lr_phases.append((step / total_step, func))
                stage *= decay_factor
                step += int(decay_length * total_step)
        else:
            func = lambda p: pow(decay_factor, (p / decay_length))
            lr_phases.append((0, func))
        super().__init__(fai_optimizer, total_step, lr_phases, [])
def __init__ ( self , fai_optimizer , total_step , initial_learning_rate , decay_length , decay_factor , staircase = True ) : assert decay_length > 0 assert decay_length < 1 self . _decay_steps_unified = decay_length self . _decay_factor = decay_factor self . _staircase = staircase step = 0 stage = 1 lr_phases = [ ] if staircase : while step <= total_step : func = lambda p , _d = initial_learning_rate * stage : _d lr_phases . append ( ( step / total_step , func ) ) stage *= decay_factor step += int ( decay_length * total_step ) else : func = lambda p : pow ( decay_factor , ( p / decay_length ) ) lr_phases . append ( ( 0 , func ) ) super ( ) . __init__ ( fai_optimizer , total_step , lr_phases , [ ] )