[903821]: / utils / __pycache__ / ramps.cpython-36.pyc

Download this file

11 lines (10 with data), 1.2 kB

3

„ï­_'ã@s(dZddlZdd„Zdd„Zdd„ZdS)	z¼Functions for ramping hyperparameters up or down

Each function takes the current training step or epoch, and the
ramp length in the same format, and returns a multiplier between
0 and 1.
éNcCs@|dkrdStj|d|ƒ}d||}ttjd||ƒƒSdS)z8Exponential rampup from https://arxiv.org/abs/1610.02242rgð?gg@NgÀ)ÚnpÚclipÚfloatÚexp)ÚcurrentÚ
rampup_lengthZphase©rú;/data/omnisky/postgraduate/Yb/RainsGit/LASeg/utils/ramps.pyÚsigmoid_rampups
r
cCs,|dkr|dkst‚||kr dS||SdS)z
Linear rampuprgð?N)ÚAssertionError)rrrrr	Ú
linear_rampupsrcCs<d|ko|knst‚tdtjtj||ƒdƒS)z5Cosine rampdown from https://arxiv.org/abs/1608.03983rgà?é)rrrÚcosÚpi)rZrampdown_lengthrrr	Úcosine_rampdown&sr)Ú__doc__Únumpyrr
rrrrrr	Ú<module>
s