ó ùµÈ[c@sNdZddlZddlZdefd„ƒYZdefd„ƒYZdS(sLearning rate scheduler.iÿÿÿÿNtLearningRateSchedulercBs eZdZd„Zd„ZRS(s&Base class of learning rate scheduler.cCs d|_dS(Ng{®Gáz„?(tbase_lr(tself((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyt__init__scCstdƒ‚dS(sœ Call to schedule current learning rate. Parameters ---------- iteration: int Current iteration count. smust override thisN(tNotImplementedError(Rt iteration((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyt__call__s (t__name__t __module__t__doc__RR(((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyRs tFactorSchedulercBs#eZdZdd„Zd„ZRS(sºReduce learning rate in factor. Parameters ---------- step: int Schedule learning rate after every round. factor: float Reduce learning rate factor. gš™™™™™¹?cCsttt|ƒjƒ|dkr.tdƒ‚n|dkrItdƒ‚n||_||_|j|_t|_ dS(Nis3Schedule step must be greater or equal than 1 roundgð?s,Factor must be less than 1 to make lr reduce( tsuperR Rt ValueErrortsteptfactorRtold_lrtFalsetinit(RR R((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyR3s     cCs||js!t|_|j|_n|jtj|jt||jƒƒ}||jkrx||_t j d||ƒn|S(sœ Call to schedule current learning rate. Parameters ---------- iteration: int Current iteration count. s2At Iteration [%d]: Swith to new learning rate %.5f( RtTrueRRtmathtpowRtintR tloggingtinfo(RRtlr((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyR>s  )   (RRR RR(((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyR )s  (R RRtobjectRR (((sJ/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/misc.pyts