(self, val: float)
Set beta (or alpha as makes sense for given optimizer).
Set beta (or alpha as makes sense for given optimizer).
Set beta ( or alpha as makes sense for given optimizer ) .
def beta(self, val: float) -> None:
        "Set beta (or alpha as makes sense for given optimizer)."
        if val is None: return
        if 'betas' in self.opt_keys:
            self.set_val('betas', (self._mom, listify(val, self._beta)))
        elif 'alpha' in self.opt_keys:
            self.set_val('alpha', listify(val, self._beta))
        self._beta = listify(val, self._beta)
def beta ( self , val : float ) -> None : if val is None : return if 'betas' in self . opt_keys : self . set_val ( 'betas' , ( self . _mom , listify ( val , self . _beta ) ) ) elif 'alpha' in self . opt_keys : self . set_val ( 'alpha' , listify ( val , self . _beta ) ) self . _beta = listify ( val , self . _beta )