index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
listlengths
768
768
715,443
pytorch_optimizer.optimizer.adan
Adan
Adaptive Nesterov Momentum Algorithm for Faster Optimizing Deep Models. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. decoupled weight decay. :param max_grad_norm: float. max gradient norm to clip. :param use_gc: bool. use gradient centralization. :param r: float. EMA factor. between 0.9 ~ 0.99 is preferred. :param adanorm: bool. whether to use the AdaNorm variant. :param eps: float. term added to the denominator to improve numerical stability.
class Adan(Optimizer, BaseOptimizer): r"""Adaptive Nesterov Momentum Algorithm for Faster Optimizing Deep Models. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. decoupled weight decay. :param max_grad_norm: float. max gradient norm to clip. :param use_gc: bool. use gradient centralization. :param r: float. EMA factor. between 0.9 ~ 0.99 is preferred. :param adanorm: bool. whether to use the AdaNorm variant. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, max_grad_norm: float = 0.0, use_gc: bool = False, r: float = 0.95, adanorm: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(max_grad_norm, 'max_grad_norm') self.validate_non_negative(eps, 'eps') self.max_grad_norm = max_grad_norm self.use_gc = use_gc defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'max_grad_norm': max_grad_norm, 'adanorm': adanorm, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults) def __str__(self) -> str: return 'Adan' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['exp_avg_diff'] = torch.zeros_like(p) state['previous_grad'] = torch.zeros_like(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=p.dtype, device=p.device) @torch.no_grad() def get_global_gradient_norm(self) -> Union[torch.Tensor, float]: if self.defaults['max_grad_norm'] == 0.0: return 1.0 global_grad_norm = get_global_gradient_norm(self.param_groups, self.param_groups[0]['params'][0].device) global_grad_norm.sqrt_().add_(self.defaults['eps']) return torch.clamp(self.defaults['max_grad_norm'] / global_grad_norm, max=1.0) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() clip_global_grad_norm = self.get_global_gradient_norm() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2, beta3 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2: float = 1.0 - beta2 ** group['step'] bias_correction3_sq: float = math.sqrt(1.0 - beta3 ** group['step']) for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['exp_avg_diff'] = torch.zeros_like(p) state['previous_grad'] = grad.clone().mul_(-clip_global_grad_norm) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) grad.mul_(clip_global_grad_norm) if self.use_gc: centralize_gradient(grad, gc_conv_only=False) grad_diff = state['previous_grad'] grad_diff.add_(grad) s_grad = self.get_adanorm_gradient( grad=grad, adanorm=group['adanorm'], exp_grad_norm=state.get('exp_grad_norm', None), r=group.get('r', None), ) exp_avg, exp_avg_sq, exp_avg_diff = state['exp_avg'], state['exp_avg_sq'], state['exp_avg_diff'] exp_avg.mul_(beta1).add_(s_grad, alpha=1.0 - beta1) exp_avg_diff.mul_(beta2).add_(grad_diff, alpha=1.0 - beta2) grad_diff.mul_(beta2).add_(grad) exp_avg_sq.mul_(beta3).addcmul_(grad_diff, grad_diff, value=1.0 - beta3) de_nom = exp_avg_sq.sqrt().div_(bias_correction3_sq).add_(group['eps']) if group['weight_decouple']: p.mul_(1.0 - group['lr'] * group['weight_decay']) p.addcdiv_(exp_avg, de_nom, value=-group['lr'] / bias_correction1) p.addcdiv_(exp_avg_diff, de_nom, value=-group['lr'] * beta2 / bias_correction2) if not group['weight_decouple']: p.div_(1.0 + group['lr'] * group['weight_decay']) state['previous_grad'].copy_(-grad) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, max_grad_norm: float = 0.0, use_gc: bool = False, r: float = 0.95, adanorm: bool = False, eps: float = 1e-08)
[ -0.02317623607814312, -0.017708029597997665, 0.007947738282382488, 0.04582296311855316, 0.02344099059700966, -0.0002521853893995285, -0.06671823561191559, -0.06871407479047775, -0.046719055622816086, 0.0036862026900053024, -0.02755487523972988, 0.020345395430922508, 0.024642571806907654, 0.07038407027721405, -0.031220711767673492, 0.036882393062114716, -0.01292207557708025, 0.07062845677137375, 0.014072741381824017, -0.029306329786777496, -0.05637242645025253, -0.0845586434006691, -0.04675978794693947, 0.02162843756377697, -0.04325687512755394, -0.0075913374312222, 0.03172985464334488, -0.014144021086394787, -0.054865360260009766, 0.013237744569778442, 0.0017094510840252042, -0.07820452004671097, 0.01617041416466236, -0.000672706519253552, 0.028858283534646034, -0.08142231404781342, 0.022707823663949966, 0.021445145830512047, -0.1291189193725586, -0.04675978794693947, 0.01926600933074951, -0.053358294069767, 0.043216146528720856, -0.0005851974128745496, 0.010172697715461254, 0.007973195053637028, -0.011486289091408253, 0.035314228385686874, -0.043053217232227325, -0.029184136539697647, 0.014938285574316978, -0.06732920557260513, 0.06341897696256638, 0.02625146694481373, -0.007555697578936815, 0.056290965527296066, 0.0638262927532196, -0.0012397656682878733, 0.03818580135703087, -0.07327600568532944, 0.0393059179186821, -0.07604575157165527, 0.02893974632024765, -0.03737117350101471, -0.023665014654397964, 0.009470079094171524, -0.07567916810512543, -0.01664900965988636, 0.018084796145558357, 0.030650470405817032, -0.0004311813390813768, -0.027982555329799652, 0.046841248869895935, -0.005559852812439203, -0.01609913446009159, -0.02291148155927658, -0.03948920965194702, -0.013543231412768364, -0.013258110731840134, -0.02977474220097065, 0.015569624491035938, 0.014683714136481285, -0.0007236209348775446, 0.0012639500200748444, 0.040690790861845016, -0.07600501924753189, -0.03704531863331795, -0.020111188292503357, 0.009296969510614872, -0.05873485654592514, 0.041790541261434555, -0.02783999592065811, 0.056413158774375916, 0.03612885996699333, 0.030569007620215416, 0.03889860212802887, -0.02893974632024765, -0.03775811940431595, 0.017025776207447052, -0.024907326325774193, -0.0023356983438134193, 0.031546562910079956, 0.03232046216726303, 0.03274814411997795, 0.019327107816934586, -0.05225854367017746, -0.03806360810995102, -0.03853201866149902, 0.04386784881353378, -0.03871531039476395, -0.06545555591583252, -0.009251146577298641, -0.010529098100960255, -0.015070662833750248, -0.01250457763671875, -0.009179866872727871, -0.007626977749168873, 0.0202435664832592, -0.03950957581400871, 0.05278805270791054, 0.0635819062590599, 0.039265185594558716, -0.05576145276427269, 0.0003093050036113709, 0.01645553484559059, -0.010804036632180214, 0.04492687061429024, 0.0015796193620190024, 0.0007408045348711312, -0.05307317525148392, -0.021282220259308815, 0.014602250419557095, -0.007535331416875124, 0.0037803943268954754, 0.032096438109874725, -0.017280347645282745, 0.011822324246168137, 0.02360391803085804, -0.046556130051612854, 0.0040909722447395325, 0.027066096663475037, 0.041220299899578094, 0.024113060906529427, -0.025660859420895576, 0.024764765053987503, -0.0036505626048892736, 0.020752711221575737, 0.014968834817409515, -0.017534920945763588, -0.01960204541683197, 0.014225483871996403, -0.01867540366947651, 0.015294686891138554, 0.025884881615638733, 0.02134331688284874, 0.0004152705951128155, -0.030955957248806953, 0.024968422949314117, -0.039122626185417175, 0.001626715180464089, -0.04704490676522255, -0.03735080733895302, -0.017046142369508743, 0.012524942867457867, 0.019754787907004356, -0.017280347645282745, 0.012270371429622173, 0.02043704129755497, -0.04160724952816963, 0.021322952583432198, 0.008986392058432102, -0.07148382067680359, -0.012962806969881058, 0.03706568479537964, -0.05673900991678238, 0.10166587680578232, 0.010264343582093716, 0.029550720006227493, -0.02175063267350197, -0.011272449046373367, 0.04635247215628624, 0.006308294367045164, -0.016414804384112358, -0.07038407027721405, -0.02063051611185074, 0.02315586991608143, 0.007815361022949219, 0.0009088221122510731, -0.019683508202433586, 0.02077307552099228, 0.01292207557708025, -0.019500216469168663, 0.02669951319694519, -0.031159615144133568, -0.019988995045423508, 0.00699054729193449, -0.0017858226783573627, 0.005605675745755434, 0.10663512349128723, 0.038572750985622406, -0.01828845404088497, 0.012056530453264713, 0.021017465740442276, -0.020406492054462433, 0.0018367370357736945, -0.008151396177709103, -0.03936701640486717, 0.028328774496912956, -0.002576268743723631, 0.010997511446475983, -0.042238589376211166, 0.01657772995531559, 0.04354199767112732, 0.05783876031637192, 0.02698463387787342, -0.050018310546875, 0.058938514441251755, 0.049366604536771774, 0.06085289269685745, -0.0025037156883627176, -0.01335993967950344, -0.06476312130689621, 0.020050091668963432, -0.01951039955019951, 0.07176893949508667, -0.025620127096772194, 0.03423484414815903, 0.018135709688067436, -0.010905864648520947, -0.018899425864219666, 0.03162802755832672, -0.04268663376569748, -0.022952212020754814, 0.004831776954233646, 0.07563843578100204, 0.019785337150096893, -0.014887371100485325, -0.003930591978132725, -0.014632799662649632, -0.02376684360206127, -0.022381970658898354, -0.01617041416466236, -0.022687457501888275, 0.028267676010727882, -0.005890796426683664, 0.0037880316376686096, 0.05580218508839607, 0.028471333906054497, -0.028328774496912956, -0.003474907949566841, -0.03987615928053856, -0.01622132956981659, -0.028430603444576263, 0.04227932170033455, -0.08781716227531433, -0.008156487718224525, 0.04472321271896362, 0.06415214389562607, 0.019561313092708588, -0.0666775032877922, 0.018084796145558357, -0.0440715067088604, -0.05910144001245499, 0.051891960203647614, -0.010946596972644329, 0.044438090175390244, 0.07543478161096573, -0.03568081185221672, 0.015539076179265976, 0.022117216140031815, 0.0562095008790493, 0.08496595174074173, -0.06753286719322205, -0.019520582631230354, 0.001339048845693469, 0.05229927599430084, 0.016873033717274666, -0.002927578054368496, -0.02162843756377697, 0.02048795484006405, 0.05270658805966377, -0.05111806094646454, -0.05999753251671791, 0.01067165844142437, -0.03327765315771103, 0.04016128182411194, -0.02796218916773796, 0.008090298622846603, 0.031505830585956573, 0.02779926359653473, 0.0471671037375927, -0.002802837872877717, 0.08708399534225464, -0.0011952156201004982, 0.05918290093541145, 0.0024604385253041983, 0.022992944344878197, 0.02853243052959442, -0.042645905166864395, 0.0026628233026713133, 0.0333387516438961, 0.004480467643588781, 0.05132171884179115, 0.009449712932109833, -0.03260558471083641, -0.013594145886600018, -0.011598301120102406, 0.021445145830512047, 0.07319454848766327, -0.012127811089158058, -0.008589259348809719, -0.011058608070015907, 0.01445969007909298, 0.04272736608982086, -0.010131966322660446, -0.08423278480768204, 0.004533927422016859, -0.04154615104198456, 0.03979469835758209, 0.06064923480153084, -0.0440715067088604, 0.04989611357450485, 0.017321079969406128, -0.013716340065002441, -0.019327107816934586, -0.05258439481258392, 0.06891773641109467, 0.033949725329875946, -0.01617041416466236, -0.021119294688105583, -0.05580218508839607, -0.03718787804245949, 0.016404621303081512, 0.014082923531532288, -0.03060973808169365, -0.015630722045898438, 0.02217831462621689, -0.0020034818444401026, 0.018441196531057358, -0.04476394131779671, 0.03468289226293564, 0.07038407027721405, -0.03792104870080948, 0.05804241821169853, -0.00021209030819591135, -0.06003826484084129, 0.04663759469985962, 0.024500010535120964, 0.0033679876942187548, 0.001834191381931305, -0.014225483871996403, 0.011068791151046753, -0.020874904468655586, 0.10484293848276138, 0.07290942221879959, 0.022850383073091507, -0.016679558902978897, -0.010310166515409946, 0.032503753900527954, -0.0652519017457962, -0.023644648492336273, 0.013176647014915943, -0.03877640888094902, 0.055028285831213, 0.0676550567150116, 0.010081051848828793, -0.01622132956981659, -0.04256444051861763, 0.04904075339436531, -0.06211557239294052, 0.02276892028748989, -0.07596428692340851, 0.006333751603960991, -0.004574659280478954, -0.03555861860513687, -0.01636388897895813, -0.03769702464342117, -0.00025870880926959217, 0.045008331537246704, 0.04020201414823532, 0.024907326325774193, 0.0075913374312222, 0.008288864977657795, 0.040120549499988556, 0.04297175630927086, -0.018756866455078125, 0.029021209105849266, -0.010895682498812675, 0.021526608616113663, -0.05209561809897423, 0.04480467364192009, 0.00797828659415245, -0.008589259348809719, 0.003189787268638611, -0.08895764499902725, 0.05490609258413315, 0.029448891058564186, 0.045293454080820084, -0.08626936376094818, -0.03678056597709656, -0.020162103697657585, -0.006221740040928125, 0.018522659316658974, 0.009760291315615177, -0.029754377901554108, -0.06464092433452606, 0.04032420739531517, 0.06056777387857437, -0.007087284699082375, 0.08928349614143372, -0.03234082832932472, 0.000553694146219641, -0.025742322206497192, 0.04761514812707901, -0.008660539984703064, -0.011679763905704021, -0.017097055912017822, -0.03005986288189888, -0.0054783895611763, -0.0019067444372922182, 0.041240666061639786, -0.0017972784116864204, 0.020263932645320892, 0.030100595206022263, 0.019540946930646896, -0.02598671056330204, -0.07612721621990204, -0.00803938414901495, -0.08936496078968048, -0.04020201414823532, 0.017158154398202896, -0.008803100325167179, -0.016822118312120438, -0.032076071947813034, -0.013085001148283482, 0.022402336820960045, 0.00011837598867714405, 0.04211639240384102, 0.047574419528245926, -0.029448891058564186, 0.010086143389344215, -0.021139660850167274, 0.027921458706259727, -0.001962750218808651, -0.02853243052959442, -0.027188291773200035, 0.05352121964097023, -0.02262636087834835, -0.05576145276427269, -0.020111188292503357, 0.030711567029356956, -0.00020604422024916857, 0.06007899343967438, 0.006557775195688009, -0.001577073591761291, -0.012626771815121174, 0.005442749708890915, -0.017066508531570435, 0.001647080876864493, 0.034764353185892105, 0.0011245718924328685, 0.023257698863744736, -0.0383487269282341, 0.03653617575764656, -0.02851206623017788, 0.05592437833547592, 0.09164592623710632, -0.006038448307663202, -0.01634352281689644, 0.02484622783958912, -0.0019003801280632615, -0.020854540169239044, 0.006690152455121279, -0.025457201525568962, -0.04415297135710716, -0.02329843118786812, 0.010223612189292908, -0.00498451991006732, -0.007942646741867065, -0.009877393953502178, 0.03682129457592964, -0.06411141902208328, 0.0190521702170372, 0.03761555999517441, 0.019418753683567047, 0.03973359987139702, 0.010437452234327793, 0.0043684556148946285, 0.019041987136006355, 0.023237332701683044, -0.05734998360276222, -0.05327682942152023, 0.06855115294456482, 0.012840612791478634, -0.08341816067695618, -0.04908148571848869, 0.002521535847336054, -0.005519121419638395, 0.0690806582570076, -0.03871531039476395, 0.02810475043952465, -0.025884881615638733, -0.07172820717096329, -0.014418958686292171, 0.03961140662431717, -0.016465717926621437, -0.0674106702208519, 0.016231510788202286, -0.032788876444101334, 0.034764353185892105, -0.023563185706734657, -0.004236078355461359, 0.020762894302606583, 0.0160787682980299, 0.012891526333987713, -0.012270371429622173, 0.015304869040846825, 0.030243154615163803, 0.03578264266252518, -0.03928555175662041, 0.012199090793728828, 0.050344161689281464, -0.03973359987139702, -0.04014091566205025, 0.030569007620215416, 0.06024192273616791, -0.015213223174214363, 0.007693166378885508, 0.022381970658898354, -0.002161316340789199, -0.0014472418697550893, -0.01901143789291382, 0.029571084305644035, 0.06085289269685745, -0.006125002633780241, -0.016964679583907127, 0.008176852948963642, -0.03445886820554733, -0.11608483642339706, -0.0046230279840528965, -0.020976733416318893, -0.011435374617576599, 0.0024349812883883715, -0.049936845898628235, -0.004284447059035301, 0.049651727080345154, 0.005768601782619953, 0.025192447006702423, -0.015620538964867592, -0.012586040422320366, -0.013950546272099018, 0.009663553908467293, -0.02671987935900688, 0.043623458594083786, 0.04058896005153656, 0.017086872830986977, -0.05437658354640007, 0.008619808591902256, 0.013726523146033287, 0.002205866388976574, -0.032524120062589645, -0.0612194761633873, -0.009408981539309025, -0.029672913253307343, -0.000879546336364001, 0.027982555329799652, 0.004658667836338282, -0.008665631525218487, -0.054743167012929916, 0.02429635263979435, -0.04089444875717163, -0.028165847063064575, -0.02093600295484066, -0.022524531930685043, -0.05258439481258392, 0.027432680130004883, -0.00435827299952507, -0.011506655253469944, 0.018970705568790436, -0.017188701778650284, 0.061341673135757446, -0.043053217232227325, -0.03003949671983719, -0.018756866455078125, 0.021526608616113663, 0.046556130051612854, -0.054865360260009766, 0.05356195196509361, 0.019001254811882973, -0.01778949238359928, -0.03380716219544411, 0.02291148155927658, -0.021445145830512047, -0.04313468188047409, -0.02586451731622219, 0.04117956757545471, -0.05523194372653961, 0.03018205799162388, 0.03979469835758209, 0.016048219054937363, -0.03468289226293564, -0.0033094361424446106, 0.02824730984866619, -0.01567145250737667, 0.013716340065002441, 0.00044327351497486234, -0.00020286208018660545, 0.0004999157972633839, 0.024968422949314117, -0.051891960203647614, -0.03614922612905502, -0.012412931770086288, -0.030833762139081955, -0.027330851182341576, -0.026516221463680267, -0.042482975870370865, -0.024540742859244347, 0.03246302157640457, 0.07950793206691742, 0.043786387890577316, -0.004152069333940744, 0.021302586421370506, -0.01674065552651882, 0.011140071786940098, -0.0059264362789690495, -0.03678056597709656, 0.03759519383311272, -0.08292938023805618, -0.008767460472881794, -0.0045568388886749744, -0.00667996983975172, 0.015620538964867592, -0.00507362000644207, -0.02105819620192051, 0.02236160635948181, 0.005788967479020357, 0.053032442927360535, 0.016445351764559746, -0.012718417681753635, -0.04089444875717163, 0.008497613482177258, 0.016679558902978897, -0.024948056787252426, 0.003894951893016696, -0.004518653266131878, -0.0014472418697550893, -0.005442749708890915, 0.011506655253469944, 0.03105778619647026, 0.023848306387662888, -0.012524942867457867, 0.05339902639389038, -0.038307998329401016, -0.012087078765034676, -0.002566085895523429, -0.005356195382773876, 0.001068565994501114, 0.07282796502113342, 0.012565674260258675, -0.032259367406368256, 0.00519326888024807, -0.017209067940711975, -0.00022275051742326468, -0.00790700688958168, -0.026475489139556885, 0.016374072059988976, -0.022931847721338272, 0.040385305881500244, 0.010518915951251984, 0.027167925611138344, -0.08944642543792725, -0.03806360810995102, -0.02386867254972458, 0.010926230810582638, 0.03570117801427841, 0.009668645448982716, 0.0435827299952507, -0.03769702464342117, -0.016323156654834747, -0.0031719673424959183, 0.031974244862794876, 0.05722779035568237, 0.013848717324435711, 0.007352039683610201, 0.015335418283939362, -0.018257904797792435, 0.0017489097081124783, 0.009877393953502178, 0.03496801108121872, -0.010905864648520947, -0.06003826484084129, -0.017524737864732742, 0.027147559449076653, -0.019092900678515434, 0.05592437833547592, -0.06374483555555344, -0.042197857052087784, -0.0031745131127536297, -0.018858695402741432, -0.07319454848766327, 0.006058814004063606, -0.019642775878310204, -0.05221781134605408, -0.004274263978004456, 0.02291148155927658, 0.05734998360276222, 0.03319619223475456, 0.024642571806907654, 0.005962076596915722, -0.02022320032119751, 0.010488366708159447, 0.041220299899578094, 0.0006593415164388716, 0.006705427076667547, 0.03985579311847687, -0.002886846661567688, 0.06370410323143005, -0.005636224523186684, -0.036454711109399796, 0.056698277592659, -0.02246343530714512, 0.01986679993569851, 0.0419127382338047, 0.011781592853367329, -0.032096438109874725, -0.058368273079395294, -0.0026119088288396597, -0.03244265913963318, 0.029102671891450882, -0.04708563908934593, 0.037452634423971176, 0.04508979618549347, 0.011557569727301598, 0.008360144682228565, -0.04419369995594025, 0.012015799060463905, 0.06728847324848175, 0.008879471570253372, -0.02682170830667019, 0.03170948848128319, -0.00558531004935503, 0.03299253433942795, -0.02741231396794319, -0.023502089083194733, 0.007479325868189335, 0.024907326325774193, -0.03315545991063118, -0.04423443228006363, 0.023359527811408043, -0.041077740490436554, 0.05722779035568237, 0.002655185991898179, 0.022137582302093506, 0.05054781958460808, 0.06040484830737114, -0.036027032881975174, 0.02207648567855358, -0.05124025419354439, -0.05673900991678238, -0.10549464076757431, 0.025620127096772194, -0.06521116942167282, 0.0466783232986927, -0.005727870389819145, -0.00803938414901495, 0.006028265226632357, 0.00989776011556387, 0.005753327626734972 ]
715,445
pytorch_optimizer.optimizer.adan
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, max_grad_norm: float = 0.0, use_gc: bool = False, r: float = 0.95, adanorm: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(max_grad_norm, 'max_grad_norm') self.validate_non_negative(eps, 'eps') self.max_grad_norm = max_grad_norm self.use_gc = use_gc defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'max_grad_norm': max_grad_norm, 'adanorm': adanorm, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, max_grad_norm: float = 0.0, use_gc: bool = False, r: float = 0.95, adanorm: bool = False, eps: float = 1e-08)
[ -0.004409777000546455, -0.04509245604276657, -0.02633551135659218, 0.009563201107084751, -0.029670080170035362, -0.010316320694983006, -0.09041227400302887, -0.045585066080093384, -0.04846492037177086, 0.005792865063995123, -0.014891878701746464, 0.054035164415836334, 0.0169854573905468, 0.07874128222465515, -0.06434201449155807, 0.04475142061710358, 0.006650190334767103, 0.030105846002697945, -0.012817246839404106, -0.015204494819045067, -0.018880099058151245, -0.014266647398471832, -0.03378145024180412, 0.09715719521045685, 0.016994930803775787, 0.030030060559511185, 0.005120267625898123, 0.011746774427592754, -0.03527821600437164, 0.023436710238456726, 0.017686475068330765, -0.027870170772075653, 0.0045021409168839455, 0.050700593739748, 0.03470982611179352, -0.022622015327215195, -0.0032114165369421244, 0.025899743661284447, -0.09268584102392197, 0.027036529034376144, 0.053277306258678436, -0.031602613627910614, 0.07154164463281631, -0.04149264097213745, -0.01959058828651905, -0.02768070623278618, 0.03770335763692856, 0.03740021586418152, -0.0259376373142004, -0.03849910572171211, 0.028817491605877876, -0.03154577314853668, 0.03344041481614113, -0.014664522372186184, -0.04247785359621048, 0.0445619598031044, 0.03542978689074516, 0.07711189240217209, 0.04084846004843712, 0.004130317363888025, 0.021333659067749977, -0.047366026788949966, 0.011112069711089134, -0.018681161105632782, 0.0020154244266450405, 0.0027803857810795307, -0.09101855754852295, -0.016938092187047005, 0.024213513359427452, 0.03971167653799057, 0.09996126592159271, 0.012466738000512123, -0.00020589420455507934, 0.020916838198900223, -0.017980143427848816, 0.001341642695479095, -0.07521725445985794, -0.04031796380877495, -0.0438041016459465, -0.01756332255899906, 0.056346625089645386, 0.054186735302209854, -0.01136784628033638, -0.05259523540735245, 0.013290907256305218, -0.05793812498450279, -0.04838913306593895, -0.06172740459442139, 0.017553849145770073, -0.0016755731776356697, -0.04823756217956543, -0.03482350334525108, 0.02065158821642399, -0.023304086178541183, 0.056043483316898346, 0.010960498824715614, 0.03042793646454811, -0.044524066150188446, 0.030181633308529854, -0.005939699709415436, -0.02781333029270172, -0.002278305822983384, -0.049336452037096024, 0.003962168004363775, 0.025975529104471207, -0.028021741658449173, -0.05539930611848831, -0.04134107008576393, 0.04494088515639305, -0.056346625089645386, -0.027055473998188972, 0.06544090062379837, 0.0031924701761454344, 0.04046953469514847, -0.056346625089645386, 0.01244779210537672, -0.002657234203070402, -0.002913010772317648, -0.004291362129151821, 0.01621812768280506, 0.05289837718009949, 0.029518507421016693, -0.03512664511799812, 0.04062110558152199, 0.0391811765730381, 0.0020426600240170956, 0.0014588736230507493, 0.003831911599263549, 0.006034431979060173, -0.025179779157042503, 0.0312805250287056, -0.010439472272992134, -0.027017582207918167, -0.035713985562324524, 0.0391811765730381, -0.01743069849908352, -0.004310308489948511, 0.0414547473192215, -0.030598454177379608, 0.013707728125154972, 0.06544090062379837, 0.020386338233947754, 0.04081057012081146, -0.024497708305716515, -0.0016814939444884658, 0.023000942543148994, -0.010079490952193737, -0.020140035077929497, -0.011149962432682514, 0.028988009318709373, 0.03647183999419212, 0.007445939350873232, 0.0010509337298572063, 0.04209892451763153, -0.002377774566411972, -0.04016638919711113, 0.013290907256305218, -0.02661970630288124, -0.013357219286262989, 0.016047609969973564, -0.02968902513384819, 0.009842660278081894, 0.016957037150859833, -0.037267591804265976, 0.0036566571798175573, 0.013489844277501106, -0.019022196531295776, -0.0009106118814088404, -0.02237571030855179, -0.009638986550271511, -0.012353059835731983, -0.10034019500017166, -0.0391811765730381, 0.026562867686152458, -0.03914328292012215, 0.06862390041351318, 0.018681161105632782, 0.0031711554620414972, -0.027112314477562904, -0.013461424969136715, 0.07131429016590118, -0.01436137966811657, 0.006006012205034494, -0.08692613244056702, 0.025160834193229675, 0.009515834972262383, -0.03065529279410839, 0.03580871596932411, -0.02415667288005352, 0.025596601888537407, 0.0495259165763855, 0.0095016248524189, 0.00840746983885765, 0.017553849145770073, -0.007289631757885218, 0.015384485945105553, 0.03902960568666458, -0.018283287063241005, 0.010591044090688229, 0.0633946880698204, 0.06854811310768127, 0.031147899106144905, 0.005409200210124254, -0.024440869688987732, 0.02032949961721897, 0.0037277063820511103, -0.014683468267321587, 0.00452582398429513, 0.011547837406396866, -0.017184395343065262, -0.004407408647239208, -0.028988009318709373, 0.04300835356116295, 0.038764357566833496, -0.012400425970554352, -0.042591530829668045, 0.005233945790678263, 0.03711601719260216, 0.02214835397899151, 0.0165212694555521, 0.08973020315170288, -0.020064249634742737, -0.0004360634775366634, -0.025975529104471207, 0.03914328292012215, 0.005257628858089447, 0.008966389112174511, -0.04763127863407135, -0.071806900203228, 0.005200789775699377, -0.007644876837730408, -0.04895752668380737, -0.018747473135590553, 0.006995962001383305, 0.01989373192191124, 0.002110156463459134, -0.02229992486536503, 0.05240577086806297, -0.08897234499454498, -0.03417932614684105, 0.03686971589922905, 0.046039778739213943, -0.010960498824715614, -0.011746774427592754, 0.01922113448381424, -0.0016518902266398072, 0.03760862722992897, 0.018662214279174805, -0.06036326661705971, -0.04403145983815193, -0.059643302112817764, -0.013811933808028698, -0.0033369367010891438, 0.04441038519144058, -0.062030550092458725, 0.005186580121517181, 0.048578597605228424, 0.006394413765519857, 0.030977381393313408, -0.006422833073884249, -0.0014387430856004357, -0.007583301048725843, -0.012533050961792469, 0.07540671527385712, 0.02085999771952629, 0.012902505695819855, 0.00860640686005354, -0.0051155309192836285, 0.019723214209079742, 0.007360680494457483, 0.10860082507133484, 0.050814274698495865, -0.009624776430428028, 0.0015228177653625607, -0.0025980265345424414, -0.015621315687894821, -0.006787551566958427, -0.03222784399986267, -0.0014044026611372828, 0.05600558966398239, 0.03292886167764664, -0.03815807029604912, 0.005129740573465824, 0.02222413942217827, -0.00008540686394553632, 0.007578564342111349, -0.022697800770401955, 0.0059491731226444244, -0.00901375524699688, 0.015517110005021095, 0.011415212415158749, -0.005953909829258919, 0.0667671486735344, 0.023209353908896446, 0.10920710861682892, -0.026790224015712738, 0.053049951791763306, -0.01651179790496826, 0.042364176362752914, -0.019031669944524765, 0.05183738097548485, -0.03243625536561012, 0.06475882977247238, 0.0021148931700736284, -0.04308413714170456, -0.04657027870416641, 0.036377109587192535, 0.0027614394202828407, 0.025539761409163475, 0.042061030864715576, 0.021485229954123497, 0.027794385328888893, 0.06866179406642914, 0.02588079683482647, 0.03933274745941162, -0.0737394317984581, -0.0029769549146294594, -0.07620246708393097, 0.022470442578196526, 0.03635816276073456, -0.021485229954123497, 0.03148893639445305, 0.014010870829224586, -0.029632186517119408, -0.06369782984256744, -0.05384569987654686, 0.019306393340229988, 0.041682105511426926, -0.03476666286587715, -0.004558979999274015, -0.042894672602415085, -0.014569790102541447, 0.0171938668936491, -0.02237571030855179, -0.04592610150575638, 0.001101852161809802, 0.022015729919075966, 0.045130349695682526, 0.00279459566809237, -0.03423616290092468, 0.07949914038181305, -0.010827873833477497, -0.01518554799258709, 0.0633946880698204, -0.022337818518280983, -0.03537295013666153, 0.026127099990844727, -0.028912222012877464, 0.038461215794086456, -0.014484531246125698, -0.007081220857799053, 0.017070716246962547, -0.019495856016874313, 0.09662669152021408, 0.01690967194736004, -0.0032114165369421244, -0.028230153024196625, 0.019173767417669296, 0.032872021198272705, -0.04065899923443794, -0.029139580205082893, 0.0024346138816326857, -0.04293256625533104, 0.0445619598031044, 0.014304540120065212, -0.0005426370189525187, -0.016322333365678787, -0.025141887366771698, 0.028684865683317184, -0.007635403424501419, 0.03095843456685543, -0.06926807761192322, -0.009842660278081894, -0.0083458935841918, 0.01773384027183056, -0.012694095261394978, -0.04118949547410011, -0.0006222711526788771, 0.059112802147865295, -0.010969972237944603, -0.009065857157111168, 0.012438318692147732, 0.06635033339262009, 0.01779067888855934, 0.010998391546308994, -0.028988009318709373, 0.006114954128861427, 0.01885167881846428, 0.05138266459107399, -0.016436010599136353, -0.014209807850420475, -0.00407821498811245, 0.021219979971647263, -0.012826720252633095, -0.07275421917438507, 0.03686971589922905, 0.047517597675323486, 0.0438041016459465, -0.04763127863407135, -0.035259269177913666, -0.01579183340072632, -0.027945956215262413, -0.0027590710669755936, 0.028286991640925407, -0.020670535042881966, -0.007862760685384274, 0.02370196022093296, 0.03283413127064705, 0.01706124283373356, 0.07480043172836304, -0.007071747910231352, -0.0035713983234018087, -0.03402775526046753, 0.011263641528785229, -0.04319781810045242, -0.03317516669631004, 0.010932078585028648, -0.01846327818930149, 0.02743440307676792, -0.00314984074793756, 0.021428391337394714, 0.011803613975644112, 0.06237158551812172, 0.03582766279578209, 0.06229579821228981, 0.053732022643089294, -0.02438403107225895, 0.0007738424465060234, -0.01312038954347372, -0.05130688101053238, -0.05035955831408501, -0.00463713426142931, -0.03095843456685543, -0.020841052755713463, 0.023076727986335754, 0.010628936812281609, -0.010363686829805374, 0.01959058828651905, 0.007649613544344902, -0.01646443083882332, 0.022773586213588715, -0.06426622718572617, -0.008360103704035282, -0.047669168561697006, -0.07165532559156418, -0.02931009791791439, 0.015441324561834335, -0.010306847281754017, -0.035713985562324524, -0.020878944545984268, 0.03730548173189163, 0.03209521993994713, 0.05270891636610031, -0.00841694325208664, -0.03582766279578209, -0.02243255078792572, 0.004596872720867395, -0.02722599171102047, 0.04323570802807808, -0.007706452626734972, 0.03829069808125496, -0.011633096262812614, -0.022470442578196526, 0.002823015209287405, -0.04622924327850342, 0.02953745424747467, 0.08101484924554825, -0.023209353908896446, -0.012836193665862083, -0.00018576363800093532, 0.0036684987135231495, 0.00540446350350976, 0.03745705261826515, -0.030011115595698357, -0.04554717242717743, 0.009975285269320011, -0.014910825528204441, -0.015204494819045067, -0.018709581345319748, -0.02012108825147152, -0.00236593303270638, -0.03650973364710808, 0.006015485618263483, 0.08472835272550583, 0.019969517365098, 0.006688083056360483, -0.050700593739748, 0.019173767417669296, 0.02334197796881199, 0.05017009750008583, -0.08253056555986404, -0.027396509423851967, 0.026809170842170715, 0.05778655409812927, -0.043122030794620514, -0.00804275181144476, 0.029329044744372368, 0.015725521370768547, 0.032341524958610535, 0.011007864959537983, 0.02176942676305771, -0.04990484565496445, -0.03925696387887001, -0.023455657064914703, 0.026202885434031487, -0.05623294785618782, -0.08510727435350418, 0.004587399773299694, -0.016113921999931335, 0.00825589895248413, -0.027718599885702133, 0.0005426370189525187, -0.02715020626783371, 0.011832033284008503, -0.027396509423851967, -0.023455657064914703, -0.04592610150575638, 0.04675974324345589, -0.021428391337394714, -0.04334938898682594, 0.04096214100718498, 0.06843443214893341, 0.03154577314853668, -0.03192470222711563, 0.01636969856917858, 0.053049951791763306, 0.029878489673137665, -0.03378145024180412, 0.09010913223028183, 0.018984302878379822, 0.0034885078202933073, -0.058961231261491776, -0.047290243208408356, 0.030333204194903374, -0.0014494004426524043, 0.037419162690639496, 0.017591742798686028, -0.015384485945105553, -0.0587717667222023, -0.047593384981155396, 0.024876637384295464, 0.017089663073420525, 0.03408459201455116, -0.04395567253232002, -0.014408745802938938, -0.006347047630697489, -0.004807651974260807, 0.03213311359286308, -0.03357303887605667, -0.03635816276073456, 0.04126528277993202, -0.020083194598555565, -0.05251945182681084, 0.024781905114650726, 0.022622015327215195, -0.009842660278081894, -0.010827873833477497, -0.017459116876125336, 0.0556645542383194, 0.011974131688475609, -0.019050616770982742, -0.01196465827524662, -0.012893032282590866, 0.011282587423920631, -0.0249713696539402, 0.025748172774910927, 0.017629634588956833, -0.03412248566746712, -0.06369782984256744, 0.005333414766937494, -0.011822560802102089, 0.005532351788133383, -0.007076484616845846, 0.0013369061052799225, -0.02841961570084095, 0.02199678309261799, -0.002300804713740945, 0.025482922792434692, -0.04084846004843712, -0.03512664511799812, 0.01319617498666048, -0.04285678267478943, -0.09382262825965881, -0.08397049456834793, 0.014948718249797821, 0.004926066845655441, -0.0602874793112278, 0.02326619252562523, 0.0034719298128038645, 0.0047460757195949554, 0.0046513439156115055, 0.045585066080093384, -0.018112769350409508, -0.0460776723921299, -0.04369042441248894, 0.02438403107225895, -0.026373403146862984, -0.00898059830069542, 0.035107698291540146, 0.0549066998064518, -0.08192428201436996, -0.015744468197226524, 0.025103993713855743, 0.01848222315311432, -0.015289753675460815, -0.02550186961889267, -0.017184395343065262, 0.04429670795798302, 0.03143209591507912, -0.05361834168434143, 0.006413360126316547, -0.03323200345039368, -0.0058781239204108715, -0.017629634588956833, -0.004916593432426453, -0.06695661693811417, -0.05384569987654686, 0.03558135777711868, 0.09495940804481506, 0.024497708305716515, 0.005830757785588503, -0.02175047993659973, -0.01455084327608347, 0.04471353068947792, -0.07013960927724838, -0.019306393340229988, 0.016767574474215508, -0.12337902933359146, 0.004869227763265371, -0.014077182859182358, 0.0158486720174551, -0.04418303072452545, -0.00855904072523117, -0.04945013299584389, 0.006929649971425533, 0.013016183860599995, 0.032644666731357574, 0.03605502098798752, 0.027548082172870636, -0.01704229600727558, 0.018425384536385536, 0.049033310264348984, -0.017231760546565056, 0.003576135030016303, -0.016436010599136353, -0.012087809853255749, -0.024440869688987732, -0.0070670112036168575, 0.05274680629372597, 0.03423616290092468, -0.026127099990844727, 0.05744551867246628, -0.0380064994096756, -0.016767574474215508, -0.014673994854092598, 0.0067686052061617374, 0.018207501620054245, 0.0339709147810936, 0.047896526753902435, -0.01690967194736004, -0.01675810106098652, -0.019344285130500793, 0.05278469994664192, 0.006868073716759682, -0.013016183860599995, -0.0016021558549255133, -0.04399356618523598, 0.014276120811700821, -0.028097527101635933, -0.019107455387711525, -0.05998433753848076, -0.009042174555361271, -0.03755178675055504, 0.008554304018616676, 0.014086656272411346, 0.025520814582705498, -0.0533909872174263, -0.06131058558821678, 0.025558708235621452, -0.009132170118391514, 0.0464944913983345, 0.05763498321175575, -0.0033819342497736216, -0.03899171203374863, 0.01446558441966772, -0.0031664189882576466, -0.061348479241132736, 0.039976928383111954, 0.0015737361973151565, -0.029063794761896133, -0.0710490420460701, -0.00497343298047781, 0.027131259441375732, -0.004367147572338581, 0.036528680473566055, -0.03198154270648956, -0.06267472356557846, -0.0668429359793663, 0.016398118808865547, -0.015242387540638447, -0.010894185863435268, -0.016767574474215508, -0.056877125054597855, 0.07025329023599625, -0.03393302112817764, 0.022318871691823006, 0.028609080240130424, 0.011822560802102089, 0.014190861955285072, -0.05077638104557991, 0.03292886167764664, 0.05536141246557236, 0.03347830846905708, -0.06384940445423126, -0.01376456767320633, 0.03558135777711868, 0.04645659774541855, -0.0013890087138861418, -0.04653238505125046, -0.0003815925447270274, -0.02968902513384819, 0.006929649971425533, 0.032493095844984055, 0.0030077428091317415, 0.025160834193229675, -0.08078749477863312, -0.022868318483233452, 0.016038136556744576, 0.03057950735092163, -0.04084846004843712, 0.04509245604276657, 0.025312405079603195, -0.023739852011203766, 0.0004499772621784359, -0.014531897380948067, -0.0290069542825222, 0.053732022643089294, 0.01316775567829609, 0.03412248566746712, 0.07510357350111008, 0.006015485618263483, 0.04126528277993202, -0.05577823519706726, -0.021428391337394714, 0.004940276499837637, 0.05161002278327942, -0.012779354117810726, -0.010041597299277782, 0.061045337468385696, -0.007919599302113056, 0.021030515432357788, -0.02116314135491848, 0.022906210273504257, 0.05331519991159439, 0.048048097640275955, -0.04346306622028351, 0.019230607897043228, -0.02887433022260666, -0.07324682176113129, -0.10253797471523285, -0.0015571581898257136, -0.05983276665210724, 0.04668395593762398, 0.017108608037233353, 0.009871079586446285, 0.0161423422396183, 0.03641500324010849, -0.003386670956388116 ]
715,448
pytorch_optimizer.optimizer.adan
__str__
null
def __str__(self) -> str: return 'Adan'
(self) -> str
[ -0.017287319526076317, -0.018094977363944054, 0.053820960223674774, -0.019796214997768402, 0.00970908161252737, -0.0631348043680191, 0.020896004512906075, 0.012819424271583557, 0.08550865203142166, -0.07430454343557358, -0.05715469643473625, 0.00905608106404543, -0.025363901630043983, 0.02995208650827408, 0.009416949935257435, -0.008708100765943527, -0.0005246555665507913, -0.030072376132011414, -0.004379826597869396, 0.027580665424466133, 0.005374363157898188, 0.020483583211898804, 0.03725537657737732, -0.006130468565970659, -0.03053634986281395, 0.06921801716089249, -0.005163856316357851, -0.02610282227396965, -0.008102357387542725, 0.023903243243694305, 0.0013307026820257306, -0.059560488909482956, 0.010112910531461239, -0.00035791497793979943, -0.02586224302649498, 0.010972120799124241, -0.049765486270189285, 0.024951480329036713, -0.04165453463792801, -0.012638989835977554, 0.005120895802974701, 0.02166929468512535, -0.020122716203331947, -0.013627082109451294, -0.035777535289525986, -0.026807375252246857, 0.00402540247887373, 0.04158579930663109, -0.016660096123814583, 0.004375530872493982, 0.004152135923504829, 0.010164462961256504, -0.028061822056770325, -0.008042212575674057, -0.022253558039665222, 0.0010836794972419739, 0.04100153595209122, -0.0038492640014737844, -0.010087134316563606, 0.04241064190864563, -0.03656800836324692, -0.04186074808239937, 0.0552644357085228, -0.05643296241760254, -0.03029577061533928, 0.008604995906352997, -0.0010713284136727452, 0.03818332403898239, 0.039833009243011475, 0.04158579930663109, 0.0426512211561203, -0.04316674917936325, 0.009872331283986568, 0.03918001055717468, 0.036155588924884796, -0.015328319743275642, -0.09073265641927719, 0.015328319743275642, 0.017596635967493057, -0.035090167075395584, 0.04316674917936325, -0.02436721697449684, -0.04131085053086281, 0.012209384702146053, -0.028646085411310196, -0.08000970631837845, -0.044163431972265244, -0.07203622907400131, -0.017527898773550987, 0.02129124291241169, -0.016393741592764854, 0.0020846601109951735, -0.0138161089271307, 0.05694848671555519, -0.054095908999443054, -0.009193554520606995, 0.02350800484418869, -0.05055595934391022, 0.045125748962163925, 0.04694727435708046, 0.010619844309985638, 0.025363901630043983, 0.0034153626766055822, 0.017175622284412384, -0.06055717170238495, -0.02921316586434841, -0.029556849971413612, 0.025398269295692444, 0.0057524158619344234, 0.02288937382400036, -0.05540191009640694, -0.0018107866635546088, 0.016969412565231323, 0.008338640443980694, 0.014555029571056366, -0.0610726997256279, -0.0055547975935041904, -0.01506196428090334, 0.022683164104819298, -0.010499555617570877, 0.039867378771305084, 0.011556384153664112, -0.044713325798511505, -0.029453743249177933, 0.03399037569761276, 0.08248423039913177, -0.0552644357085228, -0.05148390680551529, 0.04711911827325821, -0.029195981100201607, 0.045160114765167236, 0.011393134482204914, -0.05657043308019638, -0.013618489727377892, 0.09231360256671906, 0.008282791823148727, 0.034677743911743164, 0.029539665207266808, 0.03914564102888107, 0.1367863565683365, -0.0034690634347498417, 0.006203501485288143, 0.07616043835878372, 0.026910480111837387, 0.0030867145396769047, -0.021377163007855415, -0.012853792868554592, 0.06949296593666077, -0.022030163556337357, -0.0064097121357917786, 0.0368429571390152, 0.033045243471860886, 0.02981461212038994, 0.009520054794847965, -0.018094977363944054, 0.016677280887961388, -0.024212557822465897, -0.035468220710754395, 0.026154374703764915, -0.03357795625925064, -0.010164462961256504, -0.04698164388537407, -0.01052533183246851, 0.01607583276927471, 0.014297266490757465, 0.033010877668857574, -0.002663553226739168, 0.03201419115066528, 0.022665979340672493, -0.002135138725861907, -0.04320111498236656, -0.06110706925392151, -0.08997654914855957, 0.06169133260846138, -0.0009494278347119689, 0.026996402069926262, 0.014666726812720299, 0.09251981228590012, 0.03441998362541199, -0.039351850748062134, 0.0047772116959095, -0.0015498013235628605, -0.033320192247629166, 0.02043203078210354, 0.07705401629209518, -0.04825327545404434, 0.025192059576511383, 0.04165453463792801, 0.039936114102602005, -0.01218360848724842, -0.005082231480628252, 0.017648188397288322, -0.045331958681344986, 0.0016292784130200744, -0.03167050704360008, -0.049421802163124084, -0.0069510149769485, -0.06138201430439949, 0.005327106453478336, 0.004459303803741932, -0.013936398550868034, 0.05292738229036331, -0.01917758397758007, 0.017321689054369926, 0.06471575051546097, 0.01709829457104206, 0.012939713895320892, -0.008531962521374226, 0.009837962687015533, -0.05196506530046463, 0.0371866412460804, 0.015852438285946846, 0.006938126869499683, 0.012733503244817257, 0.03918001055717468, -0.0685650184750557, 0.01828400418162346, -0.029385007917881012, -0.004330422263592482, 0.026652716100215912, 0.06148511916399002, -0.0033272935543209314, 0.015070556662976742, -0.02876637503504753, -0.00965752825140953, -0.009408357553184032, 0.019057294353842735, -0.02921316586434841, -0.01818089932203293, -0.016806162893772125, 0.0029707211069762707, -0.07389212399721146, -0.03350921720266342, 0.017905952408909798, 0.012492923997342587, 0.020964741706848145, -0.035158902406692505, -0.025003032758831978, -0.08083454519510269, -0.035158902406692505, -0.00010914661106653512, 0.014116832055151463, 0.0024637868627905846, 0.026291849091649055, 0.0341278500854969, -0.034574639052152634, -0.021652109920978546, 0.021342795342206955, -0.025329532101750374, -0.045366328209638596, 0.04701600968837738, -0.04832201078534126, -0.022837821394205093, -0.014529253356158733, -0.013910621404647827, -0.05588306486606598, -0.02825084887444973, 0.023250242695212364, 0.016350779682397842, -0.0024014939554035664, -0.07561054825782776, 0.003793415380641818, -0.035468220710754395, 0.03395600989460945, -0.0007630865438841283, 0.020311741158366203, -0.02330179512500763, 0.03739285096526146, 0.048665694892406464, -0.012570252642035484, 0.0870208665728569, 0.008102357387542725, -0.05213690921664238, 0.0320657454431057, -0.0347980335354805, -0.00823983084410429, -0.008892831392586231, 0.040829695761203766, -0.10688581317663193, -0.039729904383420944, -0.020174268633127213, -0.040829695761203766, -0.009846555069088936, 0.014030911028385162, -0.009786410257220268, -0.053305432200431824, 0.0327531136572361, -0.010379265993833542, 0.005928554106503725, 0.029161611571907997, 0.08131570369005203, -0.0015154329594224691, -0.008613587357103825, 0.006267942488193512, 0.011607936583459377, 0.005550501402467489, 0.03914564102888107, 0.036052484065294266, -0.018009057268500328, -0.022030163556337357, -0.027340086176991463, -0.017734110355377197, 0.011479055508971214, -0.025106137618422508, -0.04873443394899368, -0.029230348765850067, -0.03197982534766197, -0.0031382672023028135, 0.006654587108641863, -0.0027816947549581528, -0.017579451203346252, 0.017244359478354454, 0.03431687504053116, 0.09808749705553055, 0.009322436526417732, 0.06334101408720016, -0.011229883879423141, -0.01021601539105177, 0.02565603330731392, 0.07093644142150879, -0.05134643241763115, 0.013249029405415058, -0.049146853387355804, 0.004845948424190283, 0.014864346012473106, -0.011186923831701279, -0.022425400093197823, 0.08337780833244324, 0.023456452414393425, 0.039454955607652664, -0.0463973805308342, -0.048940643668174744, 0.027099506929516792, -0.026876112446188927, -0.04155142977833748, 0.01955563575029373, 0.01924632117152214, -0.010233200155198574, -0.02818211168050766, -0.026910480111837387, 0.07313601672649384, 0.008183982223272324, -0.031344007700681686, 0.030381690710783005, 0.020517952740192413, 0.04141395911574364, -0.04646611586213112, 0.01269054226577282, 0.022683164104819298, 0.009966844692826271, -0.022769084200263023, -0.022373847663402557, 0.022098900750279427, 0.010619844309985638, 0.011290028691291809, 0.0006315198843367398, -0.002092178212478757, 0.07024907320737839, -0.02429847978055477, -0.009683305397629738, -0.018610505387187004, -0.07533559948205948, 0.01185710821300745, 0.02869763784110546, -0.018077794462442398, 0.0028203593101352453, -0.0023542374838143587, -0.008557738736271858, 0.059594858437776566, -0.05712033063173294, -0.004755731206387281, 0.01623908244073391, -0.033045243471860886, -0.025982532650232315, -0.022940926253795624, 0.044747695326805115, 0.045091379433870316, 0.04406032711267471, -0.039798639714717865, 0.01151342410594225, 0.058907486498355865, 0.00048115800018422306, 0.022923743352293968, 0.07031780481338501, 0.002025589346885681, -0.012518700212240219, 0.030278585851192474, 0.013592713512480259, -0.003002941608428955, -0.003969553392380476, -0.016093017533421516, -0.030965954065322876, -0.027580665424466133, -0.007183001842349768, -0.05193069577217102, -0.0726548582315445, -0.027082322165369987, -0.03454027324914932, -0.07327349483966827, 0.040932800620794296, 0.017321689054369926, -0.015070556662976742, -0.0020288112573325634, -0.004502264317125082, -0.05251495912671089, 0.07000849395990372, 0.029436560347676277, -0.0037955634761601686, -0.045606907457113266, 0.005705159157514572, 0.008132429793477058, -0.01274209562689066, -0.04797832667827606, -0.05086527392268181, 0.09203865379095078, 0.017871582880616188, -0.010654212906956673, -0.004910389427095652, -0.0037547508254647255, -0.026962032541632652, -0.044129062443971634, 0.03227195516228676, 0.014984635636210442, 0.07203622907400131, 0.014546438120305538, 0.030931586399674416, 0.01028475258499384, 0.044507116079330444, 0.05196506530046463, -0.024710901081562042, -0.018747977912425995, -0.007183001842349768, -0.01955563575029373, -0.03632742911577225, 0.0371866412460804, -0.01866205781698227, 0.007204481866210699, -0.0433385893702507, -0.027099506929516792, 0.021875504404306412, 0.00572234345600009, -0.04278869554400444, 0.00017305041546933353, 0.04217006266117096, 0.007762969005852938, -0.04564127326011658, -0.0389050617814064, 0.00006564907380379736, 0.058082643896341324, -0.009013121016323566, 0.010104318149387836, 0.03067382238805294, 0.013867661356925964, -0.04089843109250069, 0.04210132732987404, -0.0290069542825222, -0.008841278031468391, -0.040417272597551346, 0.01628204435110092, 0.035983745008707047, -0.06055717170238495, 0.0562954880297184, -0.03409348055720329, 0.027133874595165253, 0.01061125285923481, 0.021755216643214226, -0.00865225214511156, 0.05306485667824745, -0.04715348407626152, 0.0011932288762181997, 0.029264718294143677, -0.0235423743724823, -0.02790716476738453, -0.01883389987051487, -0.013291990384459496, 0.03500424697995186, -0.049731116741895676, -0.040417272597551346, -0.022116083651781082, -0.006422600243240595, -0.04330421984195709, -0.01838710904121399, -0.013068594969809055, 0.06234433129429817, -0.004721363075077534, 0.002929908689111471, 0.004407750908285379, 0.043991588056087494, -0.040382903069257736, 0.012432779185473919, 0.024332847446203232, 0.01818089932203293, -0.04646611586213112, -0.03197982534766197, -0.03735848143696785, 0.048906274139881134, -0.03156740218400955, -0.027391638606786728, -0.10152433812618256, 0.013730187900364399, 0.007646975573152304, -0.028336770832538605, -0.011556384153664112, -0.0010423300554975867, 0.0470847487449646, -0.006770580541342497, 0.01557749044150114, 0.007432173006236553, -0.008708100765943527, -0.02981461212038994, 0.0015981319593265653, -0.020346110686659813, 0.022614426910877228, -0.003466915339231491, 0.03063945472240448, 0.001578799681738019, 0.0034647672437131405, 0.0028053231071680784, -0.022906558588147163, 0.028233664110302925, -0.00068897963501513, -0.035296376794576645, -0.05278990790247917, -0.034780848771333694, -0.006074619945138693, 0.04330421984195709, -0.02070697955787182, 0.03364669159054756, -0.0281477440148592, 0.08489002287387848, -0.00535717885941267, 0.04223879799246788, 0.019263504073023796, 0.054267749190330505, -0.006255054380744696, 0.0729985460639, -0.09808749705553055, 0.020208636298775673, 0.02514050528407097, 0.05292738229036331, 0.010568291880190372, -0.03863011300563812, -0.007195889949798584, -0.040932800620794296, 0.00807228498160839, -0.03873322159051895, -0.02412663772702217, 0.011298621073365211, 0.015611859038472176, 0.01883389987051487, -0.001542283222079277, -0.04217006266117096, -0.0281477440148592, -0.016900675371289253, 0.0054817646741867065, 0.039626799523830414, -0.023456452414393425, 0.009932476095855236, 0.05069343373179436, 0.034780848771333694, -0.02340489998459816, -0.003265000879764557, 0.06076338142156601, 0.03708353638648987, 0.04598495736718178, 0.04701600968837738, -0.00527125783264637, 0.02385169081389904, 0.006826429162174463, -0.048768799751996994, -0.0045194486156105995, -0.05602053925395012, 0.006877982057631016, 0.053683485835790634, -0.09863739460706711, 0.07939106971025467, 0.034574639052152634, 0.029848981648683548, -0.025948164984583855, 0.05203380063176155, -0.054164644330739975, 0.05495511740446091, -0.01610160991549492, -0.025192059576511383, -0.02890384942293167, -0.0024229742120951414, -0.02067261002957821, -0.015199437737464905, 0.01606724038720131, -0.058701276779174805, -0.05519569665193558, 0.004317534156143665, -0.03952369466423988, -0.025776322931051254, 0.04718785360455513, -0.06375343352556229, -0.012329674325883389, -0.025329532101750374, 0.021995794028043747, -0.014787016436457634, 0.03182516619563103, 0.012570252642035484, 0.007114265114068985, 0.04581311717629433, 0.09217612445354462, 0.07162380963563919, 0.010422226041555405, 0.0037096424493938684, -0.029041321948170662, 0.022442584857344627, -0.0423075370490551, 0.013850477524101734, -0.001633574371226132, -0.022631611675024033, -0.018438661471009254, -0.03002082370221615, 0.05241185426712036, -0.023697031661868095, -0.03660237789154053, 0.034677743911743164, 0.010911975987255573, 0.07512938976287842, -0.033217087388038635, 0.0624474361538887, -0.04089843109250069, -0.0069467187859117985, 0.008695212192833424, -0.01506196428090334, 0.043751008808612823, -0.06543748825788498, 0.013773147948086262, 0.011582160368561745, -0.022597242146730423, -0.06461264938116074, -0.04732532799243927, 0.0012233012821525335, 0.03390445560216904, 0.022116083651781082, -0.0064827450551092625, 0.0231986902654171, -0.016161754727363586, -0.008678028360009193, -0.03653363883495331, 0.04698164388537407, -0.045057009905576706, 0.02295811101794243, -0.06949296593666077, -0.06694970279932022, -0.029900534078478813, -0.06512817740440369, -0.0375303253531456, 0.029797429218888283, -0.023628294467926025, 0.032598454505205154, -0.005473172292113304, -0.025467006489634514, 0.005305626429617405, 0.04656922072172165, -0.03265000879764557, -0.02759784832596779, 0.012260937131941319, -0.058323223143815994, -0.005992995109409094, -0.06299733370542526, 0.0771227553486824, 0.035227641463279724, -0.02409226819872856, -0.01948689855635166, -0.015946950763463974, -0.03742722049355507, -0.009932476095855236, 0.0436822734773159, 0.004708474967628717, -0.07176128029823303, -0.0024122342001646757, 0.0032392244320362806, 0.02624029666185379, -0.0005595610127784312, 0.05708596110343933, -0.05574559420347214, 0.01055969949811697, -0.014984635636210442, 0.001020312774926424, -0.05990417301654816, 0.020311741158366203, 0.07066149264574051, -0.04643174633383751, -0.008484706282615662, 0.04701600968837738, -0.06870248913764954, -0.06320354342460632, -0.043991588056087494, -0.034574639052152634, 0.016806162893772125, 0.09183244407176971, 0.03234069049358368, -0.0020051831379532814, -0.020827267318964005, -0.0347980335354805, -0.0016904971562325954, 0.029333453625440598, 0.04715348407626152, -0.001401587505824864, -0.015740741044282913, 0.011204107664525509, -0.029161611571907997, -0.010722950100898743, 0.024745268747210503, 0.031103428453207016, -0.025432636961340904, 0.06921801716089249, 0.06340975314378738, -0.04687853902578354, -0.008759653195738792, 0.0231986902654171, -0.07134886085987091, 0.015534530393779278, 0.044404011219739914, -0.0026699972804635763, 0.05574559420347214, -0.003954517189413309, -0.013360726647078991, -0.004349754191935062, -0.003628017380833626, 0.0508309081196785, 0.0426512211561203, -0.029367823153734207, -0.04179200902581215, -0.07444202154874802, -0.014924490824341774, 0.014099648222327232, 0.03663674741983414, -0.013532568700611591, 0.04409469664096832, 0.008798317983746529, 0.01426289789378643, 0.043991588056087494, 0.009107633493840694, 0.07547307014465332, 0.045847486704587936, 0.02787279710173607, 0.02818211168050766, 0.014718280173838139, -0.009674713015556335, -0.006761988624930382, 0.028680454939603806, 0.04165453463792801, 0.017768478021025658, -0.039833009243011475, 0.029831796884536743, 0.04113901033997536, 0.05100274831056595, -0.013566937297582626, 0.046053696423769, 0.013704411685466766, -0.029350638389587402, -0.008824094198644161, 0.015946950763463974, 0.004953349940478802, -0.010929160751402378, -0.0064097121357917786, -0.022322295233607292, 0.022665979340672493, -0.016935043036937714, -0.005009198561310768, 0.03026140294969082, 0.0052154092118144035, 0.019675925374031067 ]
715,460
pytorch_optimizer.optimizer.adan
get_global_gradient_norm
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() clip_global_grad_norm = self.get_global_gradient_norm() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2, beta3 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2: float = 1.0 - beta2 ** group['step'] bias_correction3_sq: float = math.sqrt(1.0 - beta3 ** group['step']) for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['exp_avg_diff'] = torch.zeros_like(p) state['previous_grad'] = grad.clone().mul_(-clip_global_grad_norm) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) grad.mul_(clip_global_grad_norm) if self.use_gc: centralize_gradient(grad, gc_conv_only=False) grad_diff = state['previous_grad'] grad_diff.add_(grad) s_grad = self.get_adanorm_gradient( grad=grad, adanorm=group['adanorm'], exp_grad_norm=state.get('exp_grad_norm', None), r=group.get('r', None), ) exp_avg, exp_avg_sq, exp_avg_diff = state['exp_avg'], state['exp_avg_sq'], state['exp_avg_diff'] exp_avg.mul_(beta1).add_(s_grad, alpha=1.0 - beta1) exp_avg_diff.mul_(beta2).add_(grad_diff, alpha=1.0 - beta2) grad_diff.mul_(beta2).add_(grad) exp_avg_sq.mul_(beta3).addcmul_(grad_diff, grad_diff, value=1.0 - beta3) de_nom = exp_avg_sq.sqrt().div_(bias_correction3_sq).add_(group['eps']) if group['weight_decouple']: p.mul_(1.0 - group['lr'] * group['weight_decay']) p.addcdiv_(exp_avg, de_nom, value=-group['lr'] / bias_correction1) p.addcdiv_(exp_avg_diff, de_nom, value=-group['lr'] * beta2 / bias_correction2) if not group['weight_decouple']: p.div_(1.0 + group['lr'] * group['weight_decay']) state['previous_grad'].copy_(-grad) return loss
(self) -> Union[torch.Tensor, float]
[ -0.018504025414586067, -0.023752015084028244, -0.020778154954314232, 0.06507507711648941, 0.0010216573718935251, 0.004123074002563953, -0.0337037593126297, -0.0552399568259716, -0.024160193279385567, 0.005039042327553034, -0.02307172119617462, 0.012886731885373592, 0.013644774444401264, 0.0773981362581253, -0.03527815639972687, 0.041206441819667816, -0.0005090064951218665, 0.05317963659763336, 0.030788209289312363, -0.02804759331047535, -0.03644437715411186, -0.07296650111675262, -0.026123329997062683, 0.05119705945253372, -0.057183656841516495, -0.011011061258614063, 0.03947655111551285, -0.006851542741060257, -0.013498997315764427, 0.01109852734953165, -0.01216756273061037, -0.08093567192554474, 0.0223136767745018, -0.0036954598035663366, 0.030632713809609413, -0.06480295956134796, 0.021788878366351128, 0.010816691443324089, -0.07627079635858536, -0.041089821606874466, -0.018698394298553467, -0.023946385830640793, 0.0024842917919158936, 0.000574302626773715, 0.012507710605859756, 0.003452497301623225, -0.03584183007478714, 0.03488941863179207, -0.015083112753927708, -0.011108246631920338, 0.014723528176546097, -0.052557650953531265, 0.0564061775803566, -0.009917729534208775, 0.020428288727998734, 0.07242226600646973, 0.06348124891519547, -0.04711529240012169, 0.0280864667147398, -0.05135255679488182, 0.054928965866565704, -0.06892360746860504, 0.016191022470593452, -0.0061955442652106285, 0.009441522881388664, -0.011730230413377285, -0.06270376592874527, -0.02388807386159897, 0.02666756510734558, 0.03970979526638985, 0.005437501240521669, 0.014888742938637733, 0.02227480337023735, -0.02540416084229946, -0.04730965942144394, -0.02903888002038002, -0.027464482933282852, -0.05349062755703926, 0.0220804326236248, -0.03298459202051163, 0.004161947872489691, 0.004667310044169426, -0.016987938433885574, 0.022488610818982124, 0.020953087136149406, -0.04870912432670593, -0.026492632925510406, -0.03181837126612663, 0.005233412608504295, -0.019038543105125427, 0.03034115955233574, -0.006870979908853769, 0.022702418267726898, 0.031546253710985184, 0.04699866846203804, 0.046337809413671494, -0.031624000519514084, -0.015219171531498432, -0.016987938433885574, -0.0336260125041008, 0.016453420743346214, 0.04058445990085602, 0.018484588712453842, 0.04280027747154236, 0.03924330696463585, -0.045987945050001144, -0.013946047984063625, -0.036055635660886765, 0.050264086574316025, -0.06247052177786827, -0.022702418267726898, -0.012886731885373592, -0.02002011053264141, -0.009320042096078396, -0.034325744956731796, -0.018018100410699844, -0.019349534064531326, 0.012138407677412033, -0.03939880058169365, 0.029621990397572517, 0.050030842423439026, -0.009256871417164803, -0.05076944828033447, 0.008236429654061794, 0.014956772327423096, 0.027600541710853577, 0.059282854199409485, 0.029136065393686295, 0.01906769908964634, -0.06507507711648941, -0.006973023992031813, -0.001941270544193685, -0.006093499716371298, -0.025345848873257637, 0.0336260125041008, -0.013440686278045177, -0.008717495016753674, 0.017396116629242897, -0.009276309050619602, 0.00399430375546217, 0.0037148967385292053, 0.01830965466797352, -0.016725540161132812, 0.011710792779922485, 0.026570379734039307, 0.04031233862042427, 0.0454825833439827, 0.047892771661281586, -0.007721348665654659, -0.015753690153360367, 0.024179629981517792, 0.019514748826622963, 0.013703085482120514, 0.0223136767745018, 0.00748810451477766, 0.014645780436694622, -0.019213475286960602, 0.030729899182915688, -0.0170462504029274, -0.026376010850071907, -0.015491290017962456, -0.020000673830509186, -0.02151676081120968, 0.0055298269726336, 0.026434320956468582, 0.005316019989550114, 0.003044320270419121, 0.03523928299546242, -0.04765952751040459, 0.02215818129479885, -0.00953384954482317, -0.031390756368637085, 0.0447051040828228, 0.03836863860487938, -0.04629893600940704, 0.1369142383337021, 0.0031244978308677673, 0.012391088530421257, -0.04073995351791382, -0.001411612262018025, 0.00918884202837944, -0.008425939828157425, -0.00578736700117588, -0.043500009924173355, -0.0032362607307732105, 0.027678290382027626, 0.0141598554328084, -0.011030497960746288, 0.028494643047451973, 0.0008807391277514398, -0.008362770080566406, -0.014295914210379124, 0.04734853655099869, -0.014198729768395424, -0.002959283534437418, 0.02140013873577118, 0.027717163786292076, 0.007735926657915115, 0.10184988379478455, 0.0030321720987558365, -0.013168568722903728, -0.014344506897032261, 0.02709518000483513, -0.005835959687829018, -0.04073995351791382, -0.012983916327357292, -0.030885394662618637, 0.05889411270618439, 0.0037902151234447956, 0.015141423791646957, -0.0558619424700737, 0.006423928774893284, 0.03026341088116169, 0.07339411973953247, 0.03640550374984741, -0.05800001323223114, 0.01627848856151104, 0.025345848873257637, 0.06379223614931107, 0.0047037540934979916, -0.03860188275575638, -0.07899197190999985, 0.031040890142321587, -0.01556903775781393, 0.052324406802654266, -0.022974535822868347, 0.028980568051338196, -0.031118638813495636, -0.007944874465465546, -0.010544572956860065, 0.012925606220960617, -0.03399531543254852, 0.01333378255367279, -0.013498997315764427, 0.043655503541231155, 0.015481571666896343, -0.0563284307718277, -0.012711798772215843, 0.015452415682375431, 0.003382038092240691, -0.038388077169656754, -0.03661930933594704, -0.022993972525000572, 0.052829768508672714, -0.005437501240521669, 0.041517432779073715, 0.06596918404102325, 0.018387403339147568, -0.014023796655237675, 0.03098258003592491, -0.041672930121421814, -0.02239142544567585, -0.033295582979917526, 0.03469504788517952, -0.0565616749227047, -0.022022122517228127, 0.07774800807237625, 0.04894236847758293, 0.05092494189739227, -0.0555509477853775, 0.02987467125058174, -0.05399598926305771, -0.0397486686706543, 0.050497330725193024, -0.0447828508913517, 0.009908011183142662, 0.05590081587433815, -0.04241153597831726, 0.04750403016805649, 0.043538883328437805, 0.06072119250893593, 0.09804023057222366, -0.0553954541683197, -0.02942761965095997, 0.010243299417197704, 0.027406170964241028, 0.014888742938637733, 0.007342327386140823, 0.001510012079961598, -0.0280864667147398, 0.07191690802574158, -0.05111931264400482, -0.07129491865634918, 0.0023433733731508255, -0.05512333661317825, 0.03191555663943291, -0.019709119573235512, -0.013897456228733063, 0.057183656841516495, -0.0018999668536707759, 0.04419974237680435, -0.00877094641327858, 0.09734050184488297, 0.0068418243899941444, 0.08256838470697403, 0.0013593753101304173, -0.007570711895823479, 0.0055298269726336, -0.04272252693772316, 0.016589481383562088, 0.0662413015961647, -0.013372656889259815, 0.011837134137749672, 0.001776056014932692, -0.025248665362596512, -0.015481571666896343, 0.011147120036184788, -0.005874833557754755, 0.021905500441789627, -0.02800871804356575, -0.009115953929722309, -0.004798509646207094, 0.009854559786617756, 0.01871783286333084, -0.00796431116759777, -0.09360859543085098, -0.003948140889406204, -0.06289813667535782, 0.031507380306720734, 0.05368499830365181, -0.026356574147939682, 0.03022453747689724, 0.028747323900461197, 0.03247923031449318, -0.023965822532773018, -0.024082444608211517, 0.07389947772026062, 0.02934987097978592, -0.022721854969859123, -0.02108914591372013, -0.08373460173606873, -0.011302616447210312, 0.0454825833439827, 0.03469504788517952, -0.025248665362596512, -0.02915550209581852, 0.041245315223932266, -0.010097522288560867, 0.027367297559976578, -0.06188741326332092, 0.059049610048532486, 0.04000134766101837, -0.028980568051338196, 0.03109920211136341, 0.01451944001019001, -0.031468503177165985, 0.041439685970544815, 0.024471184238791466, 0.0220026858150959, 0.011079090647399426, -0.00963103398680687, -0.010214144363999367, -0.0220804326236248, 0.0684182420372963, 0.028475206345319748, 0.0456380769610405, -0.00675435783341527, -0.025501346215605736, 0.045676954090595245, -0.07250001281499863, 0.02029222995042801, 0.017318367958068848, -0.048126015812158585, 0.09555229544639587, 0.09819573163986206, 0.002879105741158128, -0.03661930933594704, -0.02800871804356575, 0.03893231227993965, -0.030282847583293915, 0.025209790095686913, -0.04058445990085602, 0.01068063173443079, 0.02136126346886158, -0.04186730086803436, -0.032226547598838806, -0.041206441819667816, -0.02728954888880253, 0.0667077898979187, 0.0443163625895977, 0.028611265122890472, -0.033567700535058975, -0.024976545944809914, 0.030963143333792686, 0.038912877440452576, -0.027211802080273628, 0.017328087240457535, -0.048126015812158585, 0.027406170964241028, -0.06017695739865303, 0.06523057818412781, 0.020428288727998734, 0.011399800889194012, 0.0015464563621208072, -0.06421985477209091, 0.04085657745599747, 0.041206441819667816, 0.03797990083694458, -0.031274136155843735, -0.017639078199863434, -0.027522793039679527, 0.006540550850331783, 0.00849882885813713, 0.008975035510957241, -0.016093837097287178, -0.07292763143777847, -0.002328795613721013, 0.04276140406727791, 0.02369370497763157, 0.05730028077960014, -0.018018100410699844, 0.005952581763267517, -0.03527815639972687, 0.008372488431632519, 0.010282173752784729, -0.04039008915424347, -0.018824735656380653, -0.021147457882761955, -0.009747656062245369, 0.006006033159792423, 0.04280027747154236, 0.007181971799582243, 0.03492829203605652, 0.04000134766101837, -0.03520040959119797, -0.04011797159910202, -0.045676954090595245, -0.0192523505538702, -0.04933110997080803, 0.0010301610454916954, -0.02728954888880253, -0.04715416580438614, -0.017988944426178932, -0.014091826044023037, -0.030516091734170914, 0.008955597877502441, -0.013498997315764427, 0.05986596271395683, 0.05115818604826927, 0.007240282837301493, -0.001480856561101973, 0.0003756808000616729, -0.004161947872489691, -0.020233917981386185, -0.022877350449562073, -0.021944373846054077, 0.057222530245780945, -0.0395154245197773, -0.09578554332256317, 0.013110257685184479, 0.00914996862411499, 0.00905764289200306, 0.04979759827256203, 0.010437669232487679, 0.032459791749715805, 0.006846683565527201, -0.05205228924751282, -0.030710462480783463, -0.010777817107737064, 0.025617968291044235, 0.004647872876375914, 0.028475206345319748, -0.031390756368637085, 0.0227801650762558, -0.015685660764575005, -0.005554123315960169, 0.08365685492753983, 0.037882715463638306, -0.016793569549918175, 0.009757374413311481, -0.005957440938800573, -0.02865014038980007, 0.023207779973745346, -0.018523462116718292, -0.025967832654714584, -0.022294240072369576, -0.03282909467816353, -0.005665885750204325, 0.028028156608343124, -0.04077882692217827, 0.002105270279571414, -0.05317963659763336, 0.015675941482186317, 0.030904831364750862, -0.011127683334052563, 0.043733254075050354, 0.005442360416054726, 0.02151676081120968, 0.04905899241566658, 0.05314075946807861, -0.0556286983191967, -0.06037132441997528, 0.04948660358786583, 0.03121582418680191, -0.05827213078737259, -0.05290751904249191, 0.03502547740936279, 0.0005184212932363153, 0.0890992134809494, -0.038465823978185654, 0.026997994631528854, 0.03551140055060387, -0.059127356857061386, -0.001281627221032977, 0.009650470688939095, -0.039379365742206573, -0.057144783437252045, 0.011905163526535034, -0.039262741804122925, 0.014208448119461536, -0.005486093461513519, -0.019738275557756424, 0.014198729768395424, 0.0063850549049675465, -0.016842162236571312, -0.04676542431116104, 0.03628887981176376, 0.06414210051298141, 0.048437006771564484, -0.039379365742206573, 0.016288207843899727, 0.01503452006727457, -0.0221193078905344, -0.015287201851606369, 0.0005812878371216357, 0.050613950937986374, 0.003440349129959941, -0.009951744228601456, -0.009052783250808716, -0.003345593810081482, -0.032148800790309906, 0.007697052322328091, 0.05321851000189781, 0.06239277496933937, -0.02048659883439541, -0.04882574826478958, -0.007366623263806105, -0.07836998999118805, -0.1379249542951584, -0.04703754186630249, 0.003386897500604391, -0.008970175869762897, 0.0341702476143837, -0.020953087136149406, -0.0220804326236248, 0.030243974179029465, 0.024471184238791466, 0.013664212077856064, -0.02888338454067707, 0.00010956091136904433, -0.020233917981386185, 0.02880563586950302, -0.032576415687799454, 0.027445046231150627, 0.02713405340909958, 0.025967832654714584, -0.03965148329734802, 0.03306233882904053, 0.010078084655106068, -0.0023433733731508255, -0.05123593658208847, -0.05768901854753494, 0.0018270780565217137, -0.03916555643081665, -0.0034306307788938284, 0.025734590366482735, 0.025812337175011635, -0.029835795983672142, -0.05457909777760506, 0.011613608337938786, -0.03343164175748825, -0.0010253018699586391, -0.0017262486508116126, -0.012245310470461845, -0.0340925008058548, 0.004455932416021824, 0.02559852972626686, -0.04039008915424347, 0.007381201256066561, -0.029213812202215195, 0.05380161851644516, -0.05321851000189781, -0.004166807048022747, -0.021691692993044853, 0.013188005425035954, 0.06939009577035904, -0.10410457849502563, 0.052479904145002365, 0.0018768854206427932, 0.0013678789837285876, -0.02919437550008297, 0.02250804752111435, -0.07051744312047958, -0.08404559642076492, 0.004579843487590551, 0.023635393008589745, -0.04664880409836769, 0.017211465165019035, 0.01133177150040865, 0.022799601778388023, -0.048475880175828934, 0.0065454100258648396, 0.0450938418507576, 0.004108496010303497, -0.022799601778388023, -0.0012974197743460536, -0.009320042096078396, 0.029758049175143242, 0.022644106298685074, -0.03743566572666168, -0.0449383482336998, -0.03591957688331604, -0.009771952405571938, -0.0139266112819314, -0.06468634307384491, -0.03442293033003807, -0.03189611807465553, 0.002323936438187957, 0.0689624771475792, 0.020991960540413857, -0.029602553695440292, -0.00138002703897655, -0.03743566572666168, -0.00348165282048285, 0.02384920045733452, -0.020642096176743507, 0.05119705945253372, -0.0770094022154808, -0.02934987097978592, -0.02036997675895691, -0.048475880175828934, 0.031429629772901535, 0.027231238782405853, -0.03683311864733696, 0.05426810681819916, 0.012507710605859756, 0.06390886008739471, 0.0283197108656168, -0.027794912457466125, -0.07292763143777847, -0.02262466959655285, 0.04307239502668381, -0.017318367958068848, -0.017357241362333298, -0.013022790662944317, 0.0027187506202608347, -0.018358247354626656, 0.03667762130498886, 0.052829768508672714, 0.00380236329510808, -0.015316356904804707, 0.06072119250893593, -0.03294571861624718, 0.016531169414520264, 0.0111762760207057, -0.002879105741158128, 0.028825072571635246, 0.039379365742206573, 0.025034857913851738, -0.0337815098464489, -0.004694035742431879, -0.018581772223114967, -0.013975203968584538, -0.011671919375658035, -0.03193499147891998, -0.00426156260073185, 0.000720383832231164, -0.014917897991836071, -0.009937167167663574, -0.01975771225988865, -0.08731100708246231, -0.03869906812906265, -0.06445309519767761, 0.0048179468140006065, 0.026006707921624184, -0.0170073751360178, 0.03656100109219551, -0.03867963328957558, -0.026434320956468582, 0.016132710501551628, 0.038990624248981476, 0.05216890946030617, -0.018562335520982742, 0.041089821606874466, 0.04711529240012169, -0.014597187750041485, 0.006501676980406046, 0.0225857961922884, 0.024393435567617416, 0.01457775104790926, -0.05329625681042671, -0.005743633955717087, 0.02036997675895691, 0.021633382886648178, 0.03191555663943291, -0.06666891276836395, -0.037163544446229935, -0.02204155921936035, 0.006511395331472158, -0.06196516007184982, 0.017950071021914482, -0.03520040959119797, -0.03041890636086464, 0.008421081118285656, 0.03310121223330498, 0.030963143333792686, 0.0443163625895977, -0.02369370497763157, 0.010981905274093151, 0.017522456124424934, 0.002362810540944338, 0.02250804752111435, -0.02999129332602024, 0.0111568383872509, -0.0010702498257160187, -0.009869137778878212, -0.01174966711550951, -0.03382038325071335, -0.05885523930191994, 0.037804968655109406, -0.007808815222233534, -0.014295914210379124, 0.028980568051338196, 0.0026750173419713974, -0.0338592566549778, -0.026803623884916306, 0.0344812385737896, -0.020564347505569458, 0.012109251692891121, 0.0025389583315700293, 0.024937672540545464, 0.0170462504029274, -0.0040307482704520226, 0.012391088530421257, -0.022294240072369576, 0.0013022790662944317, 0.06083781272172928, 0.016744976863265038, -0.0451715923845768, 0.0064628031104803085, 0.010602883994579315, 0.019816022366285324, 0.007784518878906965, -0.03280965983867645, 0.01643398404121399, 0.043811000883579254, -0.017716826871037483, -0.034636735916137695, 0.029058316722512245, -0.06659116595983505, 0.07082843035459518, 0.04559920355677605, 0.030749335885047913, 0.03558914735913277, 0.06958446651697159, -0.0455603301525116, 0.016404829919338226, -0.06713540107011795, -0.06546381860971451, -0.07117829471826553, -0.009937167167663574, -0.03189611807465553, 0.07082843035459518, 0.03018566220998764, 0.02373257838189602, 0.020953087136149406, 0.041323065757751465, 0.020622657611966133 ]
715,485
pytorch_optimizer.optimizer.aggmo
AggMo
Aggregated Momentum: Stability Through Passive Damping. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay.
class AggMo(Optimizer, BaseOptimizer): r"""Aggregated Momentum: Stability Through Passive Damping. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.0, 0.9, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, } super().__init__(params, defaults) def __str__(self) -> str: return 'AggMo' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['momentum_buffer'] = {beta: torch.zeros_like(p) for beta in group['betas']} @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 betas = group['betas'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['momentum_buffer'] = {beta: torch.zeros_like(p) for beta in betas} self.apply_weight_decay( p=p, grad=grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) for beta in betas: buf = state['momentum_buffer'][beta] buf.mul_(beta).add_(grad) p.add_(buf, alpha=-group['lr'] / len(betas)) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.0, 0.9, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.010257570073008537, -0.013627914711833, -0.02461816929280758, 0.016705185174942017, 0.016363266855478287, -0.018463626503944397, -0.06201434135437012, -0.025204315781593323, -0.022410348057746887, 0.018268244341015816, -0.045016080141067505, 0.03395744413137436, 0.02643522433936596, 0.06502322852611542, -0.049158185720443726, 0.06557029485702515, -0.004694059491157532, 0.015454739332199097, 0.03182777389883995, -0.002128445776179433, 0.008679858408868313, -0.08284208923578262, -0.03503204509615898, 0.040873974561691284, -0.033175911754369736, -0.002730467589572072, 0.002461816882714629, -0.012875692918896675, -0.061545420438051224, -0.01598227210342884, -0.0012211393332108855, -0.09784745424985886, 0.01033572293817997, -0.00872870348393917, 0.030303793027997017, -0.07018131762742996, 0.020026685670018196, 0.031222090125083923, -0.13465747237205505, -0.034738972783088684, 0.0664299800992012, -0.0333908349275589, 0.03372298181056976, -0.005343705881386995, 0.008870355784893036, -0.020690985023975372, 0.0002712455752771348, 0.11847982555627823, -0.016255807131528854, -0.022703422233462334, 0.033293142914772034, -0.07088469713926315, 0.028838425874710083, 0.003480246989056468, -0.027666132897138596, 0.07033762335777283, 0.06459338217973709, -0.0024141925387084484, 0.048220351338386536, -0.020651908591389656, 0.00599823659285903, -0.07068931311368942, 0.03907645866274834, -0.03335175663232803, -0.009485810063779354, -0.03514927253127098, -0.06408539414405823, -0.007287759333848953, 0.02174604870378971, 0.029248729348182678, 0.026474300771951675, -0.02518477663397789, 0.029151037335395813, 0.037435248494148254, -0.04747789725661278, -0.035051584243774414, -0.04829850420355797, -0.042007192969322205, -0.004466927610337734, -0.014028448611497879, 0.027646593749523163, 0.0017108161700889468, -0.036106646060943604, -0.02750982716679573, 0.021824201568961143, -0.07334651052951813, -0.026474300771951675, -0.034856200218200684, -0.02756844088435173, -0.09159521758556366, 0.01564035192131996, -0.012426313944160938, 0.05337844043970108, 0.033918365836143494, 0.0397016815841198, 0.037181250751018524, -0.059982363134622574, -0.026845527812838554, -0.010843717493116856, -0.007531987503170967, -0.008347708731889725, 0.04466439038515091, 0.01609950140118599, 0.05501965433359146, 0.028408585116267204, -0.018063092604279518, -0.03757201507687569, -0.062053415924310684, 0.022976957261562347, -0.05271414294838905, -0.046579137444496155, 0.03083132579922676, -0.030772710219025612, -0.03069455735385418, -0.008362362161278725, 0.01265100296586752, 0.013432532548904419, 0.02750982716679573, 0.0019000928150489926, 0.05619194731116295, 0.041499197483062744, 0.020632369443774223, 0.0013933199224993587, -0.005162977147847414, 0.035559576004743576, -0.01331530325114727, 0.03143700957298279, -0.022468963637948036, 0.006242464296519756, -0.035794034600257874, -0.05201076716184616, 0.012582619674503803, 0.006579498760402203, -0.024461863562464714, 0.018238937482237816, -0.011048868298530579, -0.016079962253570557, -0.0036707448307424784, 0.007107031065970659, 0.0366341806948185, 0.017867710441350937, 0.0288775023072958, -0.023778025060892105, -0.02143343724310398, 0.006740689277648926, -0.00540232053026557, 0.05802854150533676, 0.015474277548491955, -0.005001786630600691, -0.035930804908275604, -0.01009149570018053, -0.004916307050734758, 0.01641211286187172, 0.036692794412374496, 0.011566631495952606, 0.03901784494519234, -0.0423588827252388, 0.06779765337705612, -0.06181895732879639, 0.007121684495359659, -0.03829493001103401, 0.00034375072573311627, -0.010277108289301395, 0.025770924985408783, 0.0031822891905903816, -0.011332172900438309, 0.029991181567311287, 0.04368748143315315, -0.045328691601753235, 0.019977839663624763, -0.0002616290876176208, -0.041499197483062744, 0.04001429304480553, 0.002833043225109577, 0.021882817149162292, 0.1306716799736023, -0.01181085966527462, 0.006735804490745068, 0.020905904471874237, -0.011048868298530579, 0.029463648796081543, -0.017877480015158653, -0.02807643450796604, -0.06682074069976807, -0.04349209740757942, 0.014145677909255028, 0.002625449560582638, -0.02637660875916481, -0.02506754733622074, 0.007531987503170967, 0.026767374947667122, -0.030186563730239868, 0.02112082578241825, -0.029307343065738678, -0.017936093732714653, 0.03120255284011364, 0.024520477280020714, -0.012699848972260952, 0.05900545045733452, 0.03704448416829109, 0.006579498760402203, -0.022351734340190887, 0.020769137889146805, 0.023133262991905212, 0.039115533232688904, -0.022273581475019455, -0.01114655937999487, 0.026923680678009987, -0.024774475023150444, -0.010325954295694828, -0.052909523248672485, 0.0008322064531967044, 0.055723030120134354, 0.055097807198762894, 0.040248751640319824, -0.04134289175271988, 0.020026685670018196, 0.04587576165795326, 0.052596911787986755, -0.0046378872357308865, -0.0076003712601959705, -0.0635383203625679, 0.009549309499561787, 0.039310917258262634, 0.08417069166898727, -0.0022017143201082945, 0.03850984945893288, 0.0003072691906709224, -0.007297528441995382, 0.003932068590074778, 0.04208534583449364, -0.04458623751997948, -0.009134122170507908, -0.018248705193400383, 0.035168811678886414, 0.01271938718855381, -0.009158545173704624, 0.0056612021289765835, -0.0228597279638052, -0.021452976390719414, -0.005895660724490881, -0.036751408129930496, -0.03069455735385418, 0.05650455877184868, -0.011361480690538883, -0.018717624247074127, 0.059435293078422546, 0.008748241700232029, -0.03069455735385418, 0.05079939588904381, -0.04114751145243645, 0.011928088963031769, -0.026591530069708824, 0.03850984945893288, -0.06811026483774185, -0.048532962799072266, 0.016822414472699165, 0.02487216517329216, -0.013754913583397865, -0.06439800560474396, -0.0016155673656612635, -0.061115581542253494, -0.06893087178468704, 0.05458981171250343, -0.0012870808131992817, 0.03284376487135887, 0.036067571491003036, -0.015513353981077671, 0.002084484789520502, 0.0425933413207531, 0.10488121211528778, 0.01592365652322769, -0.04818127304315567, -0.032667919993400574, -0.020007146522402763, 0.028095973655581474, 0.004584156908094883, 0.006452500354498625, -0.02229311875998974, -0.0023384818341583014, 0.0016351055819541216, -0.04857203736901283, -0.02825227938592434, -0.02348495088517666, -0.06381185352802277, 0.06482784450054169, -0.023445874452590942, -0.0012846385361626744, 0.036184798926115036, 0.047712355852127075, 0.03428959101438522, -0.01683218404650688, 0.07080654054880142, 0.024520477280020714, 0.07698062062263489, 0.0019428327213972807, 0.01341299433261156, 0.046266525983810425, -0.004120124038308859, -0.021726511418819427, 0.09057923406362534, 0.014731824398040771, -0.0050750551745295525, 0.009944958612322807, -0.03258976712822914, -0.007790869101881981, 0.019499152898788452, -0.011644784361124039, 0.06189711019396782, 0.019342847168445587, 0.009959612041711807, -0.017994709312915802, -0.01700802892446518, 0.019665228202939034, 0.007663870230317116, -0.04048321023583412, -0.0018683432135730982, -0.0241883285343647, 0.027802899479866028, 0.044703468680381775, -0.0010794871486723423, 0.024520477280020714, 0.02211727574467659, -0.00772248487919569, -0.04384378716349602, -0.027841975912451744, 0.017418330535292625, 0.02963949367403984, -0.04700898006558418, -0.02200004644691944, -0.073268361389637, -0.0045157731510698795, 0.018844621255993843, 0.03915461152791977, -0.061740804463624954, -0.01080464106053114, 0.043765634298324585, 0.0028086204547435045, 0.014712286181747913, -0.04063951596617699, 0.06392908841371536, 0.034797586500644684, -0.021394360810518265, 0.0607638917863369, 0.010296646505594254, -0.034856200218200684, 0.038119085133075714, 0.037122637033462524, 0.016177654266357422, 0.002465480240061879, 0.016138577833771706, 0.020749598741531372, 0.007932521402835846, 0.06732873618602753, 0.04603206738829613, 0.018434319645166397, -0.005734470207244158, -0.010111033916473389, 0.024715859442949295, -0.03032333217561245, -0.03202315792441368, 0.023289568722248077, -0.006940955761820078, 0.05470704287290573, 0.04587576165795326, 0.007790869101881981, -0.010765564627945423, -0.01683218404650688, 0.042827799916267395, -0.06455431133508682, 0.012397006154060364, -0.04528961703181267, -0.004567061085253954, 0.03227715566754341, -0.060177747160196304, -0.001438502105884254, -0.026669682934880257, -0.014204292558133602, 0.03446543589234352, 0.030147487297654152, 0.04509423300623894, -0.006672305054962635, 0.027490288019180298, 0.020026685670018196, 0.04286687448620796, 0.004381448030471802, 0.04306225851178169, -0.048532962799072266, 0.027666132897138596, -0.051620002835989, 0.03890061378479004, -0.0258100014179945, -0.013784220442175865, -0.00047868661931715906, -0.11269650608301163, 0.02969810925424099, 0.04888464882969856, 0.02530200593173504, -0.07459695637226105, -0.037493862211704254, 0.003914972767233849, -0.03188639134168625, -0.022468963637948036, 0.023465413600206375, -0.04462531581521034, -0.07717600464820862, 0.010316184721887112, 0.07596463710069656, -0.008152326568961143, 0.08276394009590149, -0.02901427075266838, 0.02538016065955162, -0.04173365607857704, 0.016206961125135422, 0.013989372178912163, -0.05287044867873192, -0.016675878316164017, -0.059552524238824844, 0.0031798467971384525, 0.05501965433359146, 0.034621741622686386, 0.015884580090641975, 0.0397016815841198, -0.0012248026905581355, 0.023016033694148064, -0.03933045640587807, -0.06408539414405823, -0.018160784617066383, -0.06830564886331558, -0.03126116842031479, 0.00316275074146688, -0.016206961125135422, -0.027040909975767136, -0.021159902215003967, -0.00802044291049242, -0.010394337587058544, -0.014174985699355602, 0.01253377366811037, 0.035051584243774414, -0.007566179148852825, 0.0016351055819541216, 0.002295742044225335, 0.018190091475844383, 0.0024532689712941647, 0.0048210578970611095, -0.03813862428069115, 0.04665729030966759, -0.014389906078577042, -0.0661955177783966, 0.014018679037690163, 0.017682097852230072, 0.026474300771951675, 0.028037358075380325, 0.005871237721294165, 0.037005405873060226, -0.0049456143751740456, 0.010706949979066849, -0.023856177926063538, -0.011693630367517471, -0.019655458629131317, 0.0008627349161542952, 0.02381710149347782, -0.016206961125135422, 0.007785984314978123, -0.036380182951688766, 0.03389882668852806, 0.09128260612487793, -0.008245132863521576, -0.02348495088517666, 0.03471943363547325, -0.005602587014436722, -0.013549761846661568, 0.017398793250322342, -0.05107293277978897, -0.04360932856798172, -0.01729133352637291, -0.043570250272750854, -0.00017859162471722811, 0.036810025572776794, -0.00740987341850996, 0.05029140040278435, -0.05224522575736046, 0.045211464166641235, 0.04173365607857704, 0.003853915724903345, 0.06709428131580353, 0.019215848296880722, -0.029151037335395813, 0.04153827577829361, 0.015278895385563374, -0.06431984901428223, -0.03083132579922676, 0.059435293078422546, 0.03534465655684471, -0.03901784494519234, -0.009095045737922192, 0.012885462492704391, 0.025712309405207634, 0.08909432590007782, -0.005548857152462006, 0.016480496153235435, 0.012211393564939499, -0.0822950229048729, -0.03415282443165779, 0.010071957483887672, -0.05302675440907478, -0.0484938845038414, -0.009251351468265057, -0.06471061706542969, 0.009261121042072773, -0.01609950140118599, -0.01560127642005682, -0.021628819406032562, 0.023641256615519524, 0.007869021967053413, -0.05240153148770332, -0.0073268357664346695, 0.023582642897963524, 0.043765634298324585, -0.05838022753596306, 0.038060471415519714, 0.011302866041660309, -0.03839262202382088, -0.009534656070172787, 0.0034973430447280407, 0.022605732083320618, -0.01271938718855381, -0.023348184302449226, 0.035676807165145874, -0.006208272185176611, 0.02506754733622074, 0.007253567688167095, -0.006823726464062929, 0.09581547975540161, 0.006301078945398331, -0.05458981171250343, 0.009373465552926064, -0.058614686131477356, -0.11519739776849747, -0.011332172900438309, -0.021843740716576576, -0.0028476968873292208, 0.020651908591389656, -0.019372154027223587, -0.016206961125135422, 0.07526125758886337, 0.01916700229048729, 0.030655480921268463, -0.01922561787068844, -0.006120350211858749, -0.05236245319247246, 0.03395744413137436, -0.0762772485613823, 0.07299482077360153, 0.018619932234287262, -0.02813505008816719, -0.05376920849084854, 0.005060401279479265, 0.014106601476669312, 0.022605732083320618, -0.018786007538437843, -0.02350449003279209, 0.004183623474091291, 0.013833066448569298, -0.016285113990306854, 0.03188639134168625, 0.0041933925822377205, 0.013989372178912163, -0.04114751145243645, 0.0873749628663063, 0.004593926016241312, -0.04556315019726753, -0.02198050729930401, -0.04130381718277931, -0.01541566289961338, 0.02625937946140766, -0.0057002785615623, 0.00989611353725195, -0.004134777933359146, -0.028799349442124367, 0.011341942474246025, -0.04243703559041023, -0.011693630367517471, -0.008665204979479313, 0.03151516243815422, 0.028975194320082664, -0.07854367792606354, 0.029991181567311287, 0.030030257999897003, 0.03057732805609703, -0.022586192935705185, 0.05396458879113197, 0.007844598963856697, -0.053534749895334244, -0.002360462211072445, 0.03933045640587807, -0.07182253152132034, 0.004908979870378971, 0.017779788002371788, 0.04095212742686272, -0.01040410716086626, -0.026142150163650513, 0.036438796669244766, 0.001690056873485446, -0.01717410422861576, -0.0007100925431586802, -0.015718504786491394, 0.021140364930033684, 0.049588024616241455, -0.038490310311317444, -0.06936071068048477, -0.02381710149347782, -0.016392573714256287, 0.013852604664862156, -0.04329671710729599, -0.03751340135931969, -0.024833088740706444, 0.014604826457798481, 0.09417426586151123, -0.01162524614483118, 0.00989611353725195, -0.027978744357824326, -0.033293142914772034, 0.0035681691952049732, 0.009700730443000793, -0.033859752118587494, 0.010472490452229977, -0.09565916657447815, -0.030401485040783882, -0.019381923601031303, -0.020632369443774223, -0.007092377170920372, 0.023270031437277794, -0.0396430678665638, 0.03290237858891487, -0.0029673685785382986, 0.009324619546532631, 0.014761132188141346, -0.02612261287868023, -0.06490600109100342, 0.0030015604570508003, 0.02405156008899212, -0.0062620025128126144, -0.019938763231039047, -0.0452505387365818, -0.016871260479092598, -0.0022090410348027945, 0.04829850420355797, 0.03372298181056976, 0.02731444500386715, 0.011586169712245464, 0.005353474989533424, -0.03227715566754341, 0.0009286764543503523, 0.024168789386749268, -0.014047986827790737, 0.036556027829647064, 0.03833400458097458, 0.03094855509698391, -0.04622745141386986, 0.005343705881386995, -0.0025643925182521343, 0.01093163900077343, 0.014243368990719318, -0.041069358587265015, -0.04704805463552475, -0.035110197961330414, -0.019557766616344452, 0.01114655937999487, 0.018219398334622383, -0.05204984173178673, -0.030186563730239868, -0.060920197516679764, 0.00011028414883185178, -0.008083942346274853, 0.01683218404650688, 0.04317948594689369, -0.002001447370275855, -0.042007192969322205, -0.01331530325114727, 0.09823821485042572, 0.03434820845723152, 0.0020832635927945375, 0.006950724869966507, 0.02750982716679573, -0.017584405839443207, -0.02944411151111126, 0.018805544823408127, -0.000918296747840941, -0.027861515060067177, -0.029522264376282692, -0.014165216125547886, 0.018434319645166397, 0.007522218395024538, 0.038881074637174606, -0.03225761651992798, -0.049158185720443726, 0.00709726195782423, 0.00215775310061872, -0.05314398184418678, 0.007058185525238514, 0.005724701099097729, -0.044508084654808044, 0.002001447370275855, 0.01171316858381033, 0.036438796669244766, 0.020319757983088493, 0.00820605643093586, 0.009876575320959091, -0.01899115927517414, 0.009944958612322807, 0.05646548420190811, 0.006423193030059338, 0.005602587014436722, 0.07877814024686813, -0.013080844655632973, 0.00720472214743495, -0.00025903419009409845, -0.015249587595462799, 0.03415282443165779, -0.04067859426140785, 0.011879242956638336, 0.01751602254807949, 0.013793990015983582, -0.016959182918071747, -0.07272128760814667, 0.017056874930858612, -0.0031163475941866636, 0.022195428609848022, -0.04005337134003639, 0.036927253007888794, 0.02381710149347782, 0.012055087834596634, 0.004261776339262724, 0.028291355818510056, 0.022722961381077766, 0.01814124546945095, 0.008860587142407894, 0.007546640932559967, 0.07701969891786575, -0.03421143814921379, 0.036126185208559036, 0.004845480900257826, -0.019294001162052155, 0.01403821725398302, 0.02030022069811821, -0.02024160511791706, 0.0033483640290796757, 0.011947627179324627, -0.030596867203712463, 0.0515027716755867, -0.040444135665893555, 0.0198508407920599, 0.020534679293632507, 0.07901260256767273, -0.04028782993555069, -0.01479043997824192, -0.053417518734931946, -0.06392908841371536, -0.10198955982923508, -0.015435201115906239, -0.04611022025346756, 0.08714050054550171, -0.0014470501337200403, -0.03051871433854103, 0.002482576295733452, 0.024540016427636147, 0.025419237092137337 ]
715,487
pytorch_optimizer.optimizer.aggmo
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.0, 0.9, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.0, 0.9, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.009997730143368244, -0.034081872552633286, -0.023769628256559372, -0.014029227197170258, -0.05478260666131973, -0.0193664338439703, -0.08310791850090027, -0.022568756714463234, -0.021386947482824326, 0.03749387338757515, -0.033891256898641586, 0.052495233714580536, 0.004262616857886314, 0.059814829379320145, -0.047767993062734604, 0.03787510097026825, 0.035206496715545654, 0.021101025864481926, -0.00034816929837688804, 0.0009923867182806134, 0.003087954828515649, -0.014715439639985561, -0.04448942467570305, 0.1150549128651619, 0.011675138026475906, 0.040372151881456375, -0.014381864108145237, 0.010988925583660603, -0.028306253254413605, 0.014991830103099346, 0.01598302647471428, -0.01632613129913807, -0.014772623777389526, 0.06427521258592606, 0.035378050059080124, -0.021901605650782585, -0.0121802669018507, 0.01799400895833969, -0.06572388112545013, 0.04269764944911003, 0.08249795436859131, -0.034310609102249146, 0.07106108218431473, -0.03722701221704483, -0.034081872552633286, -0.007219524122774601, 0.023216845467686653, 0.045671235769987106, -0.013419261202216148, -0.03324316814541817, 0.035149313509464264, -0.03227103501558304, 0.03560679033398628, -0.01976672373712063, -0.03926658630371094, 0.029735861346125603, 0.041897065937519073, 0.05840428173542023, 0.041248977184295654, 0.017831986770033836, 0.007205227855592966, -0.04185894504189491, 0.014562947675585747, -0.02569483406841755, -0.001362893613986671, -0.01653580740094185, -0.08341290801763535, -0.015191975980997086, 0.034787144511938095, 0.03183262050151825, 0.09988199919462204, -0.00021503698371816427, -0.035454295575618744, 0.03084142692387104, -0.0188898965716362, -0.013285830616950989, -0.06820186972618103, -0.047119904309511185, -0.06320776790380478, -0.0015642301877960563, 0.05646001547574997, 0.017441226169466972, -0.03143233060836792, -0.0496741384267807, 0.01873740553855896, -0.04468004032969475, -0.034024689346551895, -0.06336025893688202, 0.03057456575334072, 0.026171371340751648, -0.06961241364479065, -0.026914767920970917, 0.021749114617705345, -0.021768175065517426, 0.07662703096866608, 0.007062267046421766, 0.016450030729174614, -0.059738583862781525, 0.020967595279216766, -0.0033834073692560196, -0.021101025864481926, -0.01247571874409914, -0.04506126791238785, 0.00033178835292346776, 0.012637740932404995, -0.04208768159151077, -0.05504946783185005, -0.041477713733911514, 0.03941907733678818, -0.06534264981746674, -0.028172822669148445, 0.04311699792742729, -0.029850231483578682, 0.03795134648680687, -0.059814829379320145, 0.035206496715545654, 0.026781337335705757, 0.026876645162701607, 0.01279023289680481, 0.01999546028673649, 0.03945720195770264, 0.034729961305856705, -0.026133248582482338, 0.03991467505693436, 0.05070345848798752, 0.0013462149072438478, -0.00033446887391619384, 0.022416265681385994, 0.03612144663929939, -0.005708904471248388, 0.03840882331132889, -0.0024351002648472786, -0.046738676726818085, -0.028439683839678764, 0.012485249899327755, -0.014115003868937492, 0.007648407015949488, 0.06145411357283592, -0.023407461121678352, 0.016697829589247704, 0.06587637215852737, 0.017460288479924202, 0.04521375894546509, -0.02483706921339035, -0.010598165914416313, 0.028935281559824944, -0.012027774937450886, -0.027219749987125397, -0.016430970281362534, 0.047844238579273224, 0.029335571452975273, 0.02538985200226307, -0.028115639463067055, 0.034272488206624985, 0.0069002448581159115, -0.046204954385757446, 0.008048697374761105, -0.009516429156064987, -0.0016345193143934011, 0.015620858408510685, -0.01655486971139908, 0.034005627036094666, 0.02569483406841755, -0.033776890486478806, -0.007419669535011053, 0.027734410017728806, -0.03831351548433304, 0.019976399838924408, 0.004091063514351845, -0.011656076647341251, 0.001146665308624506, -0.08623399585485458, -0.03615957126021385, 0.02615230903029442, 0.013209585100412369, 0.03766542673110962, 0.021977851167321205, -0.017889169976115227, 0.0006683421088382602, -0.019128164276480675, 0.07083234935998917, -0.009168557822704315, -0.022721247747540474, -0.06400834769010544, 0.033815011382102966, 0.00802963599562645, -0.041820820420980453, 0.059052370488643646, -0.053295813500881195, 0.023312153294682503, 0.04235454276204109, 0.027524733915925026, 0.017317326739430428, 0.012599618174135685, -0.017336389049887657, 0.015477897599339485, 0.04532812908291817, -0.023922119289636612, -0.015649450942873955, 0.05077970400452614, 0.08021058142185211, 0.013123808428645134, 0.015153852291405201, -0.030059905722737312, 0.027696287259459496, -0.008706317283213139, -0.014934645965695381, -0.01225651241838932, -0.028801850974559784, -0.03694108873605728, 0.0017977330135181546, -0.010950802825391293, 0.05097031593322754, 0.018384767696261406, -0.006066306494176388, -0.04765362665057182, -0.014315148815512657, 0.014029227197170258, 0.007400608155876398, -0.0029211672954261303, 0.1023981124162674, -0.02615230903029442, -0.010188344866037369, 0.0011401129886507988, 0.05051284283399582, 0.021158209070563316, 0.045976217836141586, -0.054058272391557693, -0.08257420361042023, 0.041058361530303955, -0.026533538475632668, -0.04548062011599541, -0.040562763810157776, -0.006347463000565767, 0.014153126627206802, 0.005666016135364771, -0.03097485564649105, 0.027334120124578476, -0.07868566364049911, -0.0317373126745224, 0.06050104275345802, 0.03316692262887955, -0.0004860669723711908, -0.023216845467686653, 0.01780339516699314, 0.00922574196010828, 0.039647817611694336, 0.00619973661378026, -0.07037487626075745, -0.03213760629296303, -0.03105110116302967, -0.013571752235293388, 0.0012133803684264421, 0.0485304519534111, -0.052266497164964676, 0.019452210515737534, 0.0252182986587286, -0.011598892509937286, 0.009854769334197044, -0.008882635273039341, -0.012304166331887245, 0.0007189740426838398, -0.022587819024920464, 0.07494962215423584, 0.009125669486820698, 0.02594263292849064, 0.004569982644170523, -0.012532902881503105, 0.019862031564116478, 0.00012449509813450277, 0.13068529963493347, 0.01919488050043583, -0.0028210945893079042, -0.0006927645881660283, -0.006528546568006277, -0.023922119289636612, 0.006013887468725443, -0.021386947482824326, 0.00001971296478586737, 0.045823726803064346, 0.035530541092157364, -0.04292638599872589, 0.015191975980997086, 0.0004452635475900024, 0.01276164036244154, -0.00033000134862959385, -0.013314423151314259, 0.016764545813202858, -0.005399155896157026, 0.014153126627206802, 0.01837523840367794, 0.005032222718000412, 0.0840228721499443, 0.027791593223810196, 0.07700825482606888, -0.026819460093975067, 0.05531632900238037, -0.000006315035989246098, 0.07258599996566772, -0.005608831532299519, 0.040562763810157776, -0.03655986115336418, 0.053943902254104614, -0.005889988038688898, -0.03884723410010338, -0.05077970400452614, 0.03774167224764824, 0.011770444922149181, 0.03833257406949997, 0.05070345848798752, 0.03837069869041443, 0.01847054436802864, 0.040219660848379135, 0.01239947322756052, 0.041439592838287354, -0.06393210589885712, 0.01225651241838932, -0.05508758872747421, 0.029278386384248734, 0.04429880902171135, 0.0030545974150300026, 0.01864209771156311, -0.009464009664952755, -0.009249568916857243, -0.08043932169675827, -0.046166833490133286, 0.027543794363737106, 0.02479894645512104, -0.05260960012674332, 0.0005995421670377254, -0.04517563804984093, 0.0024065079633146524, 0.01923300325870514, -0.035778339952230453, -0.05127530172467232, 0.013343014754354954, 0.010779249481856823, 0.053943902254104614, -0.00407200213521719, -0.01883271336555481, 0.08722519129514694, -0.030193336308002472, -0.0032952481415122747, 0.03722701221704483, -0.007238585501909256, -0.035073067992925644, 0.0032666560728102922, -0.004774893168359995, 0.04239266365766525, 0.008377507328987122, -0.01780339516699314, -0.006137786898761988, -0.0005244876956567168, 0.08387038111686707, 0.020776979625225067, -0.0307842418551445, -0.014801216311752796, 0.0012366115115582943, 0.03675047680735588, -0.05070345848798752, -0.047501131892204285, -0.007910502143204212, -0.04391758143901825, 0.05699373409152031, 0.023845873773097992, -0.005160887725651264, 0.017145773395895958, -0.03898066654801369, 0.027848778292536736, 0.011608422733843327, 0.027429426088929176, -0.059166740626096725, -0.02481800690293312, -0.008973177522420883, 0.021005718037486076, -0.008163065649569035, -0.0317373126745224, 0.010350367054343224, 0.06179722025990486, -0.004955977201461792, -0.00002289607800776139, -0.007338658440858126, 0.06107288599014282, 0.03650267794728279, 0.009025597013533115, -0.027410365641117096, -0.009049423038959503, 0.01632613129913807, 0.06583824753761292, -0.007205227855592966, 0.01286647841334343, -0.0014832190936431289, 0.01988109201192856, -0.03181355819106102, -0.06858309358358383, 0.03690296784043312, 0.04361259564757347, 0.03631206229329109, -0.03331941366195679, -0.034177180379629135, -0.014467640779912472, -0.0491022951900959, -0.014505763538181782, 0.03558772802352905, -0.01786057837307453, 0.012551965191960335, 0.0038146725855767727, 0.05672687664628029, 0.012161205522716045, 0.059586092829704285, -0.023083416745066643, -0.008801624178886414, -0.022263772785663605, -0.0038289688527584076, -0.021939728409051895, -0.030078968033194542, 0.008577652275562286, -0.0013223880669102073, 0.021939728409051895, -0.011779976077377796, 0.03556866571307182, 0.004002904519438744, 0.06900244951248169, 0.01604020968079567, 0.07041299343109131, 0.06389398127794266, -0.023960242047905922, 0.003771784482523799, 0.004048175644129515, -0.045899972319602966, -0.04208768159151077, -0.01267586462199688, -0.05428700894117355, -0.04460379108786583, 0.02504674531519413, 0.017050467431545258, 0.0019323545275256038, -0.0007416095468215644, 0.0004932149895466864, -0.022911863401532173, 0.011751383543014526, -0.06549514085054398, 0.014048288576304913, -0.022359080612659454, -0.053905781358480453, -0.023693382740020752, 0.021386947482824326, -0.00778660224750638, -0.0373985655605793, -0.023655259981751442, 0.015201506204903126, 0.0006492806132882833, 0.03572115674614906, 0.0020419578067958355, -0.03188980743288994, -0.029011527076363564, -0.023617137223482132, -0.023121539503335953, 0.047386765480041504, -0.022397203370928764, 0.0506272092461586, -0.022721247747540474, -0.014953707344830036, -0.011560769751667976, -0.06236906349658966, 0.02386493608355522, 0.06400834769010544, -0.020967595279216766, -0.008396568708121777, 0.013724244199693203, 0.002914019161835313, 0.0042673819698393345, 0.03680766001343727, -0.03291912376880646, -0.04391758143901825, 0.0247417613863945, 0.00968321692198515, -0.02594263292849064, -0.01561132725328207, -0.016106925904750824, 0.0008351297583431005, -0.039724063128232956, -0.002325496869161725, 0.06621947884559631, 0.011265316978096962, -0.014639193192124367, -0.07982935011386871, 0.011551238596439362, 0.00997866876423359, 0.04487065225839615, -0.08608150482177734, -0.008997004479169846, 0.034215301275253296, 0.05607878416776657, -0.034596532583236694, -0.010131160728633404, 0.028058454394340515, 0.022606879472732544, 0.04414631798863411, 0.028611237183213234, 0.005651719868183136, -0.034825269132852554, -0.0375891774892807, -0.021444130688905716, 0.013724244199693203, -0.04578560218214989, -0.09233366698026657, 0.007162339985370636, -0.029621493071317673, -0.004584278911352158, -0.01837523840367794, 0.010131160728633404, -0.02415085770189762, 0.006457066163420677, -0.03349096700549126, -0.03183262050151825, -0.040867749601602554, 0.05630752444267273, 0.003464418463408947, -0.03137514740228653, 0.05726059526205063, 0.05436325445771217, 0.03831351548433304, -0.04330761358141899, 0.027963146567344666, 0.03850412741303444, 0.026514476165175438, -0.053524550050497055, 0.07998184114694595, 0.020643550902605057, 0.006957429461181164, -0.05463011562824249, -0.045899972319602966, 0.05028410628437996, -0.0014105472946539521, 0.029678678140044212, 0.020319506525993347, -0.026762275025248528, -0.05428700894117355, -0.03036488965153694, 0.01609739474952221, 0.02409367263317108, 0.015115729533135891, -0.03999092057347298, -0.00904465839266777, 0.0013819551095366478, -0.041210856288671494, 0.0757502019405365, -0.058709267526865005, -0.01649768464267254, 0.007867613807320595, -0.020224198698997498, -0.041820820420980453, 0.021596623584628105, 0.012304166331887245, -0.018308522179722786, -0.0005274660652503371, 0.0003267251595389098, 0.0638558566570282, 0.03063175082206726, -0.01845148392021656, -0.022740310057997704, -0.009106608107686043, 0.010073976591229439, -0.004360306542366743, -0.0019716687966138124, 0.007157574407756329, -0.023960242047905922, -0.059814829379320145, 0.0193664338439703, 0.005413451697677374, -0.00609013345092535, 0.010140690952539444, 0.008234546519815922, -0.028839973732829094, 0.013238176703453064, -0.010264590382575989, 0.01929018646478653, -0.0489116795361042, -0.04201143607497215, 0.0008720613550394773, -0.02559952810406685, -0.11345375329256058, -0.07944812625646591, 0.035530541092157364, -0.007615049369633198, -0.05478260666131973, 0.0056803119368851185, -0.013476445339620113, 0.02397930435836315, -0.006547607947140932, 0.046052463352680206, -0.0250276830047369, -0.01919488050043583, -0.047501131892204285, 0.023502767086029053, -0.04380321130156517, -0.020319506525993347, 0.03688390552997589, 0.059586092829704285, -0.06766814738512039, -0.011656076647341251, 0.023407461121678352, 0.01896614208817482, 0.005885222461074591, -0.0011228385847061872, -0.014029227197170258, 0.04407007247209549, 0.020796041935682297, -0.05501134321093559, 0.008649133145809174, -0.017946355044841766, 0.0004726643965113908, -0.013676590286195278, -0.011541708372533321, -0.04193519055843353, -0.03722701221704483, 0.01909957267343998, 0.07521647959947586, -0.016068803146481514, -0.005203776061534882, -0.034882452338933945, -0.004913088865578175, 0.05154215916991234, -0.07167105376720428, -0.016974221915006638, 0.00994054600596428, -0.11375873535871506, -0.0014760710764676332, -0.03617863357067108, 0.047996729612350464, -0.017241081222891808, -0.003993373829871416, -0.05569755658507347, -0.0032309158705174923, 0.021901605650782585, 0.01892801932990551, 0.00979758519679308, 0.03169919177889824, -0.02565671131014824, 0.01763184182345867, 0.05013161152601242, -0.004782041069120169, -0.004043410066515207, -0.016240354627370834, -0.040905870497226715, -0.02409367263317108, -0.006728691980242729, 0.03596895560622215, 0.03623581677675247, -0.03541617467999458, 0.034043747931718826, -0.052495233714580536, 0.00017572274373378605, 0.0053515019826591015, -0.005599300842732191, 0.027276935055851936, 0.027315057814121246, 0.0613778680562973, -0.03076517954468727, -0.03713170439004898, -0.020376689732074738, 0.047119904309511185, 0.021615684032440186, -0.0026924298144876957, 0.004765362478792667, -0.033205047249794006, -0.01864209771156311, -0.023540889844298363, -0.029164018109440804, -0.05661250650882721, -0.01251384150236845, -0.04487065225839615, -0.0016118838684633374, 0.029812106862664223, 0.014191249385476112, -0.0727003663778305, -0.022435326129198074, 0.016602523624897003, -0.028115639463067055, 0.06275029480457306, 0.03270944952964783, -0.004491354338824749, -0.047767993062734604, 0.021672869101166725, -0.008005809038877487, -0.0749877467751503, 0.0506272092461586, -0.016840791329741478, -0.022035036236047745, -0.05211400240659714, -0.01980484649538994, 0.021958790719509125, -0.0009614118607714772, 0.01963329315185547, -0.04811109974980354, -0.06362711638212204, -0.06362711638212204, 0.01276164036244154, -0.021749114617705345, -0.008615775033831596, -0.003226150292903185, -0.058823633939027786, 0.06919306516647339, -0.021958790719509125, 0.026991013437509537, 0.013400198891758919, -0.012551965191960335, 0.018308522179722786, -0.053067076951265335, 0.03122265450656414, 0.03823726996779442, 0.03118453174829483, -0.07967685908079147, -0.019452210515737534, 0.03919034078717232, 0.034367796033620834, -0.013219115324318409, -0.054096393287181854, 0.009025597013533115, -0.03116547130048275, -0.0031975582242012024, 0.023617137223482132, -0.006995552219450474, 0.013028500601649284, -0.07700825482606888, -0.026438230648636818, 0.020719796419143677, 0.030231459066271782, -0.022035036236047745, 0.05710810422897339, 0.013085685670375824, -0.027658164501190186, -0.004410342779010534, 0.01824180781841278, -0.0186039749532938, 0.03945720195770264, 0.0009721339447423816, 0.06568575650453568, 0.06107288599014282, 0.015582735650241375, 0.03124171681702137, -0.04586184769868851, -0.007372015621513128, -0.0004717708798125386, 0.06027230620384216, -0.014639193192124367, -0.020452935248613358, 0.07197603583335876, -0.021196331828832626, -0.013724244199693203, -0.01282835565507412, 0.013686121441423893, 0.022854678332805634, 0.06610510498285294, -0.03804665431380272, 0.020681673660874367, -0.033452846109867096, -0.07796133309602737, -0.09164745360612869, 0.00230881804600358, -0.04544249549508095, 0.07838068157434464, 0.014057819731533527, 0.023693382740020752, 0.011007986962795258, 0.03999092057347298, 0.014629662968218327 ]
715,490
pytorch_optimizer.optimizer.aggmo
__str__
null
def __str__(self) -> str: return 'AggMo'
(self) -> str
[ 0.011799871921539307, -0.02398996241390705, 0.017967022955417633, 0.01446353830397129, 0.007897686213254929, -0.07872236520051956, 0.006769444793462753, -0.00907682441174984, 0.07933314144611359, -0.056836191564798355, -0.028468994423747063, 0.003900065552443266, 0.02152988873422146, 0.008470289409160614, 0.01335226371884346, 0.0053739892318844795, -0.012444580905139446, -0.09087004512548447, 0.04058273881673813, 0.03813963010907173, 0.009085307829082012, 0.02193707413971424, -0.00279939454048872, -0.04261866211891174, -0.003637092188000679, 0.0542573556303978, -0.018034886568784714, -0.024668604135513306, -0.04251686483621597, -0.016253454610705376, -0.033219482749700546, -0.07817945629358292, -0.020070809870958328, -0.02253088541328907, -0.028248436748981476, -0.010909155942499638, -0.01331833191215992, 0.005463060922920704, -0.06565852463245392, -0.007036659866571426, 0.007655919995158911, -0.008279421366751194, -0.013606754131615162, -0.01290266402065754, -0.006201083306223154, -0.045740410685539246, -0.0031387151684612036, 0.08503372967243195, 0.025924090296030045, -0.02646700292825699, -0.02222549542784691, 0.021020907908678055, -0.05663260072469711, 0.02030833438038826, -0.05619148164987564, 0.04095599055290222, 0.0337284617125988, 0.00010491102148080245, -0.005687860772013664, 0.05099987983703613, -0.05866852402687073, -0.006264705676585436, 0.07356469333171844, -0.03936118260025978, -0.001766587607562542, 0.025618702173233032, -0.01888318918645382, 0.06257070600986481, 0.026025885716080666, 0.037087734788656235, 0.02729833871126175, -0.04092205688357353, -0.00013678859977517277, 0.03289712592959404, 0.004126986023038626, -0.02673845924437046, -0.07397188246250153, -0.002731530461460352, 0.03194703161716461, -0.03031829185783863, 0.028774382546544075, 0.01444657240062952, -0.02020653896033764, -0.011418136768043041, 0.005726034287363291, -0.09799577295780182, -0.026229478418827057, -0.029843242838978767, -0.06185813620686531, -0.017135687172412872, -0.031624674797058105, 0.005437612067908049, -0.015133696608245373, 0.06616751104593277, -0.05866852402687073, -0.012105260975658894, -0.03566259145736694, -0.015006450936198235, -0.016465529799461365, 0.00019590460578911006, 0.012181608006358147, 0.0007958127534948289, -0.015235492959618568, 0.010298378765583038, -0.02896100841462612, -0.037053804844617844, -0.0052297781221568584, 0.013589788228273392, -0.002153625013306737, 0.011732008308172226, -0.05188211053609848, 0.04893002286553383, 0.03491608425974846, -0.035764385014772415, 0.03471249341964722, -0.014056353829801083, -0.018102752044796944, 0.0011282408377155662, 0.0319979265332222, 0.002971175592392683, -0.005077083595097065, 0.012554860673844814, -0.014438089914619923, 0.02441411279141903, 0.03394902125000954, 0.08496586978435516, -0.024193555116653442, -0.022870205342769623, 0.029062805697321892, -0.04183822497725487, 0.059652552008628845, -0.014743478037416935, -0.02955481968820095, -0.03766458109021187, 0.08272635191679001, -0.013131705112755299, 0.049914054572582245, -0.008046139031648636, 0.06131522357463837, 0.13796773552894592, -0.03260870650410652, 0.006671890150755644, 0.01905284821987152, 0.022123700007796288, -0.0003854469396173954, 0.007974033243954182, -0.004881974309682846, 0.06911959499120712, -0.035696521401405334, -0.02858775667846203, -0.0019903271459043026, 0.011299374513328075, 0.02336221933364868, -0.0210378747433424, 0.010213548317551613, 0.018017921596765518, -0.011774423532187939, 0.015048866160213947, 0.007006969302892685, -0.024872196838259697, 0.012181608006358147, 0.004298767074942589, 0.018374208360910416, 0.012792385183274746, 0.007286909036338329, 0.03640909492969513, 0.027790352702140808, 0.003842805279418826, -0.011333306320011616, -0.002858775667846203, -0.04061666876077652, -0.06803376972675323, -0.04930327460169792, 0.0021631685085594654, -0.00690093170851469, 0.059856146574020386, -0.01766163483262062, 0.11285801231861115, 0.03495001792907715, 0.01752590574324131, -0.00922951940447092, -0.009577322751283646, -0.045604683458805084, 0.02607678435742855, 0.017576804384589195, -0.05473240464925766, 0.02823146991431713, -0.006417399737983942, 0.026399139314889908, -0.035900115966796875, 0.04217754304409027, 0.0017114480724558234, -0.04363662376999855, -0.024566808715462685, 0.013038392178714275, -0.04947293549776077, -0.0027272889856249094, -0.05439308285713196, -0.01288569811731577, 0.03610370680689812, -0.041464973241090775, 0.038682542741298676, -0.03783424198627472, 0.0434669628739357, 0.06688007712364197, -0.004619000945240259, 0.05239109322428703, 0.010544385761022568, 0.009195586666464806, -0.024990959092974663, 0.0354589968919754, 0.02336221933364868, -0.015905650332570076, 0.0361715704202652, 0.039904095232486725, -0.03640909492969513, -0.004644450265914202, 0.020630689337849617, -0.024804333224892616, 0.023175593465566635, 0.01593109965324402, -0.044518858194351196, -0.009136205539107323, -0.019799353554844856, -0.009051376022398472, 0.010026922449469566, 0.01985025219619274, -0.006387709174305201, -0.00794434268027544, -0.031455013900995255, 0.004792902618646622, -0.059415027499198914, -0.024159623309969902, 0.016228005290031433, -0.012020430527627468, 0.05863459035754204, -0.02378637157380581, 0.01961272768676281, -0.08306567370891571, -0.025466008111834526, 0.0006494807312265038, 0.009806363843381405, -0.016507944092154503, 0.02941909246146679, 0.0180857852101326, -0.06402979046106339, -0.0070324186235666275, 0.003919152542948723, -0.0057684495113790035, 0.018000954762101173, 0.04913361743092537, -0.016703054308891296, -0.015973515808582306, -0.01762770302593708, -0.005454577971249819, -0.05639507621526718, -0.057005852460861206, 0.02402389422059059, 0.017933091148734093, -0.04234720394015312, -0.02802787721157074, -0.009416145272552967, -0.022242462262511253, 0.06409765034914017, 0.003253235714510083, 0.026517901569604874, -0.02733227051794529, 0.026059817522764206, 0.03939511626958847, -0.0017623461317270994, 0.0823870301246643, 0.01185925304889679, -0.0486924983561039, -0.001690240460447967, -0.03566259145736694, 0.001156870974227786, -0.02051192708313465, 0.047233421355485916, -0.12541288137435913, -0.03187916427850723, -0.020291369408369064, -0.03925938904285431, 0.0016011688858270645, 0.01592261716723442, -0.04098992422223091, -0.026891153305768967, 0.037189532071352005, -0.022140666842460632, 0.011961049400269985, 0.023480981588363647, 0.05062662810087204, 0.029605718329548836, -0.04231327399611473, 0.01884925737977028, 0.03416958078742027, 0.0027336510829627514, 0.10138898342847824, 0.011672627180814743, -0.02441411279141903, 0.03776637837290764, 0.00022996919869910926, -0.020494962111115456, 0.019137678667902946, -0.03610370680689812, -0.051305267959833145, 0.028316300362348557, 0.020579790696501732, -0.034644629806280136, 0.04112565144896507, 0.018476003780961037, -0.04750487580895424, 0.04204181581735611, 0.02743406593799591, 0.062367118895053864, -0.01290266402065754, 0.09670636057853699, -0.0029839000198990107, 0.01742411032319069, 0.035764385014772415, 0.03742705658078194, -0.02524544857442379, 0.007023935206234455, -0.027094746008515358, -0.016906647011637688, 0.026772391051054, -0.020427096635103226, -0.06386012583971024, 0.03688414394855499, 0.037359192967414856, 0.0035734695848077536, -0.058125611394643784, -0.027043847367167473, 0.026551833376288414, 0.0017899159574881196, -0.022734476253390312, -0.009568839333951473, 0.03125142306089401, -0.03330431133508682, -0.023447049781680107, -0.03678234666585922, 0.07431120425462723, -0.01659277454018593, -0.03620550408959389, 0.05178031697869301, 0.02514365315437317, 0.03752885386347771, -0.025601735338568687, -0.014505953527987003, 0.013165637850761414, 0.00796554982662201, 0.002330708084627986, -0.008181867189705372, 0.032048825174570084, 0.006646441295742989, 0.04078632965683937, 0.03401688486337662, -0.02117360197007656, 0.03405081853270531, -0.03366059809923172, 0.03549293056130409, 0.020885180681943893, -0.02229336090385914, 0.01944306679069996, 0.011816837824881077, 0.00045755255268886685, 0.02166561782360077, 0.005492751486599445, 0.03218455612659454, 0.049880120903253555, -0.048217449337244034, -0.029334262013435364, 0.03942904993891716, 0.004784419666975737, 0.016957543790340424, -0.047165557742118835, 0.10376422107219696, 0.029792344197630882, -0.0005068600876256824, -0.06392799317836761, -0.03276139870285988, 0.035866182297468185, -0.004822593182325363, -0.017576804384589195, 0.04227934032678604, 0.00015441735740751028, 0.007880719378590584, 0.016355250030755997, -0.007893444038927555, -0.00558182317763567, -0.024889161810278893, 0.007244493812322617, -0.044315263628959656, -0.006065354682505131, -0.007668644655495882, -0.06508167833089828, -0.08252275735139847, -0.004784419666975737, -0.03449193388223648, -0.062333185225725174, 0.010485004633665085, 0.018594766035676003, -0.03556079417467117, -0.025126686319708824, -0.007308116182684898, -0.05619148164987564, 0.0010370484087616205, -0.023073798045516014, -0.02812967449426651, -0.0180857852101326, -0.03028436005115509, 0.009976023808121681, -0.0026148890610784292, -0.06810163706541061, -0.051033809781074524, 0.03240511193871498, -0.028977975249290466, -0.03416958078742027, -0.0688481405377388, -0.014997968450188637, 0.002144081750884652, -0.04166856408119202, 0.06935711950063705, 0.04455278813838959, 0.03135322034358978, 0.03327038139104843, 0.007706818170845509, 0.0326935350894928, 0.045808274298906326, 0.04482424631714821, 0.005662411917001009, -0.043025847524404526, 0.044247400015592575, -0.02577139623463154, -0.01822151429951191, 0.031217491254210472, -0.03973443806171417, -0.014531402848660946, -0.03902186453342438, -0.019561829045414925, -0.0001444763329345733, 0.008253972046077251, -0.04316157475113869, 0.007333565503358841, -0.004788661375641823, 0.010205065831542015, -0.05059269443154335, -0.056971918791532516, -0.01396304089576006, 0.005433370359241962, -0.0038555297069251537, 0.0006547826342284679, 0.0737004205584526, -0.005738758947700262, -0.06253677606582642, 0.11564044654369354, -0.03352487087249756, 0.006417399737983942, -0.05619148164987564, 0.022123700007796288, -0.008754470385611057, -0.06022939831018448, 0.061247359961271286, -0.026755426079034805, 0.01227492094039917, 0.018034886568784714, 0.007244493812322617, 0.03135322034358978, 0.0319979265332222, -0.027552828192710876, 0.010035404935479164, 0.026280377060174942, -0.004031552467495203, -0.03525540605187416, -0.04384021461009979, -0.025160618126392365, 0.04037914425134659, -0.05032123625278473, 0.010476522147655487, 0.04635118693113327, -0.012817833572626114, -0.000806946714874357, -0.035628657788038254, 0.02176741324365139, 0.056904055178165436, -0.00884778331965208, 0.06379226595163345, 0.008542395196855068, -0.020494962111115456, -0.04244900122284889, -0.018696563318371773, 0.010222031734883785, 0.03661268576979637, -0.06701581180095673, 0.011621728539466858, -0.000389423337765038, 0.06307969242334366, 0.025669598951935768, -0.010646182112395763, -0.08632314950227737, 0.03064064495265484, 0.023379186168313026, 0.011969532817602158, -0.04075239971280098, -0.026178579777479172, 0.01706782355904579, -0.04923541098833084, 0.027909114956855774, -0.004568102769553661, -0.037189532071352005, -0.05592002719640732, -0.012385199777781963, -0.07254673540592194, 0.008453323505818844, 0.02375243790447712, 0.003817356191575527, -0.04645298421382904, 0.003100541653111577, -0.00635377736762166, -0.028248436748981476, 0.03742705658078194, 0.009636703878641129, -0.044383127242326736, -0.059686485677957535, -0.029368193820118904, -0.039938028901815414, 0.030199529603123665, -0.022412123158574104, 0.030555816367268562, -0.04604579880833626, 0.08130120486021042, 0.0210378747433424, 0.030606713145971298, 0.004716555587947369, 0.07994392514228821, -0.003388964105397463, 0.07634712755680084, -0.09575626254081726, 0.010739495046436787, 0.016244972124695778, 0.03525540605187416, -0.03634123131632805, -0.04065060243010521, 0.0232943557202816, -0.03265960142016411, 0.02806180901825428, 0.02438018098473549, 0.024736467748880386, 0.033813294023275375, 0.06029726192355156, -0.0010518936906009912, -0.0015852631768211722, -0.010612250305712223, -0.047165557742118835, -0.04509570077061653, 0.017508940771222115, 0.06704974174499512, -0.005891453009098768, -0.00741415424272418, 0.04597793519496918, 0.002175892936065793, -0.02587319165468216, 0.0023879683576524258, 0.0761435329914093, 0.0758042111992836, -0.011740490794181824, 0.03973443806171417, -0.03097996674478054, 0.07125731557607651, -0.019561829045414925, -0.03505181148648262, 0.0057599665597081184, -0.09046285599470139, 0.00949249230325222, 0.022259429097175598, -0.06996789574623108, 0.05778628960251808, 0.035934045910835266, 0.03939511626958847, -0.04238113760948181, 0.03691807761788368, -0.0518142469227314, 0.0605008527636528, 0.016465529799461365, -0.008584810420870781, 0.0021281761582940817, 0.010688597336411476, -0.012486996129155159, -0.01884925737977028, 0.03820749372243881, -0.033219482749700546, -0.04811565577983856, 0.01968059130012989, -0.01008630357682705, 0.0006150184781290591, 0.03742705658078194, -0.041295312345027924, -0.011799871921539307, -0.009161654859781265, -0.02051192708313465, -0.006990003399550915, 0.04214361310005188, 0.03369453176856041, 0.017084790393710136, 0.036035843193531036, 0.05364657938480377, 0.02527938038110733, 0.02611071616411209, 0.04641905054450035, -0.011672627180814743, 0.04251686483621597, -0.0417364276945591, 0.00992512609809637, -0.011952565982937813, 0.029537854716181755, -0.010001473128795624, -0.04183822497725487, 0.010773427784442902, -0.04774240031838417, -0.004890457261353731, 0.01818758249282837, 0.005734517239034176, 0.06145095080137253, -0.055716436356306076, 0.045706477016210556, -0.0051025329157710075, 0.02382030338048935, -0.016669122502207756, -0.05038910359144211, 0.03793603926897049, -0.08089402318000793, 0.002979658544063568, -0.005221295170485973, 0.0003411762008909136, -0.08089402318000793, -0.027841251343488693, -0.0007454448495991528, 0.0001927234698086977, 0.05432521924376488, -0.022751443088054657, 0.009365247562527657, -0.027909114956855774, 0.021716514602303505, -0.012147676199674606, 0.019341271370649338, -0.044518858194351196, 0.025126686319708824, -0.10193189233541489, -0.027722489088773727, -0.017576804384589195, -0.05347691848874092, -0.00580662302672863, -0.015099764801561832, 0.008262455463409424, 0.02090214565396309, -0.003056005807593465, -0.004319974686950445, -0.0014081803383305669, -0.015133696608245373, -0.021122705191373825, -0.019341271370649338, -0.016991477459669113, -0.0333721749484539, -0.0018121837638318539, -0.04316157475113869, 0.06840702146291733, -0.018306342884898186, -0.0090428926050663, -0.031624674797058105, -0.029079770669341087, -0.007880719378590584, -0.00032580073457211256, 0.02130933105945587, 0.02315862849354744, -0.04804778844118118, -0.04092205688357353, 0.04353482648730278, 0.05642900615930557, 0.028842246159911156, 0.07492198050022125, -0.03318554908037186, 0.06372439861297607, -0.012495479546487331, 0.002279809908941388, -0.03953084349632263, 0.02836719900369644, 0.07383615523576736, -0.08788402378559113, 0.0072487350553274155, 0.006879724096506834, -0.047131624072790146, -0.034237444400787354, -0.02405782788991928, -0.0354589968919754, -0.0040866918861866, 0.07064653933048248, 0.04061666876077652, -0.029792344197630882, -0.025550836697220802, -0.02368457429111004, 0.019527897238731384, 0.021614719182252884, 0.04109171777963638, 0.004050638992339373, -0.003955204971134663, 0.008584810420870781, -0.024872196838259697, 0.0013519803760573268, 0.00665916595607996, 0.006315603852272034, -0.008326077833771706, 0.05880425125360489, 0.09602771699428558, -0.0573791041970253, 0.021190568804740906, 0.048590704798698425, -0.07254673540592194, -0.031030863523483276, 0.06318148970603943, -0.019137678667902946, 0.02051192708313465, -0.011706558987498283, 0.004852283746004105, 0.0009967541554942727, 0.001348799210973084, 0.045604683458805084, 0.05636114254593849, -0.000042050563934026286, -0.003422896144911647, -0.030301325023174286, -0.045502886176109314, -0.009967541322112083, 0.02994503825902939, -0.026195546612143517, 0.021580787375569344, 0.02792608179152012, 0.02047799527645111, -0.008648432791233063, 0.0020422856323421, 0.05290007218718529, 0.025584770366549492, -0.009534907527267933, 0.0018524781335145235, 0.043975941836833954, -0.008890198543667793, 0.0016457047313451767, 0.003923393785953522, 0.03001290187239647, 0.051373131573200226, -0.05188211053609848, 0.0389540009200573, 0.04967653006315231, 0.038682542741298676, 0.03250690922141075, 0.009085307829082012, -0.009416145272552967, -0.010111752897500992, -0.010646182112395763, 0.03240511193871498, 0.003931876737624407, -0.004050638992339373, 0.0031726472079753876, -0.02461770549416542, -0.00022161874221637845, -0.01439567469060421, -0.008215798996388912, 0.04804778844118118, 0.016109243035316467, -0.019222509115934372 ]
715,526
pytorch_optimizer.optimizer.alig
AliG
Adaptive Learning Rates for Interpolation with Gradients. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param max_lr: Optional[float]. max learning rate. :param projection_fn: Callable. projection function to enforce constraints. :param momentum: float. momentum. :param adjusted_momentum: bool. if True, use pytorch-like momentum, instead of standard Nesterov momentum.
class AliG(Optimizer, BaseOptimizer): r"""Adaptive Learning Rates for Interpolation with Gradients. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param max_lr: Optional[float]. max learning rate. :param projection_fn: Callable. projection function to enforce constraints. :param momentum: float. momentum. :param adjusted_momentum: bool. if True, use pytorch-like momentum, instead of standard Nesterov momentum. """ def __init__( self, params: PARAMETERS, max_lr: Optional[float] = None, projection_fn: Optional[Callable] = None, momentum: float = 0.0, adjusted_momentum: bool = False, ): self.validate_learning_rate(max_lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.projection_fn = projection_fn defaults: DEFAULTS = {'max_lr': max_lr, 'adjusted_momentum': adjusted_momentum, 'momentum': momentum} super().__init__(params, defaults) if self.projection_fn is not None: self.projection_fn() def __str__(self) -> str: return 'AliG' @torch.no_grad() def reset(self): for group in self.param_groups: for p in group['params']: state = self.state[p] if group['momentum'] > 0.0: state['momentum_buffer'] = torch.zeros_like(p) @torch.no_grad() def compute_step_size(self, loss: float) -> float: r"""Compute step_size.""" global_grad_norm = get_global_gradient_norm(self.param_groups, torch.device('cpu')) global_grad_norm.add_(1e-6) return loss / global_grad_norm.item() @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: if closure is None: raise NoClosureError('AliG', '(e.g. `optimizer.step(lambda: float(loss))`).') loss = closure() un_clipped_step_size: float = self.compute_step_size(loss) for group in self.param_groups: step_size = group['step_size'] = ( min(un_clipped_step_size, group['max_lr']) if group['max_lr'] is not None else un_clipped_step_size ) momentum = group['momentum'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0 and momentum > 0.0: state['momentum_buffer'] = torch.zeros_like(p) p.add_(grad, alpha=-step_size) if momentum > 0.0: buffer = state['momentum_buffer'] if group['adjusted_momentum']: buffer.mul_(momentum).sub_(grad) p.add_(buffer, alpha=step_size * momentum) else: buffer.mul_(momentum).add_(grad, alpha=-step_size) p.add_(buffer, alpha=momentum) if self.projection_fn is not None: self.projection_fn() return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], max_lr: Optional[float] = None, projection_fn: Optional[Callable] = None, momentum: float = 0.0, adjusted_momentum: bool = False)
[ -0.01589781977236271, -0.04877540469169617, -0.031210800632834435, 0.02282813750207424, 0.010761001147329807, 0.025810806080698967, -0.047410786151885986, -0.042810067534446716, -0.021210089325904846, -0.0032434086315333843, -0.025264957919716835, 0.01472814567387104, 0.026161707937717438, 0.053181178867816925, -0.043823786079883575, 0.06409813463687897, -0.022360268980264664, 0.023198533803224564, 0.015517675317823887, -0.019650522619485855, -0.008080498315393925, -0.08523024618625641, -0.00920143537223339, 0.05746998265385628, -0.03725411742925644, -0.017564604058861732, 0.03861873596906662, -0.013724175281822681, -0.04269310086965561, -0.015751609578728676, -0.018090957775712013, -0.06593062728643417, -0.0014840238727629185, 0.019104676321148872, 0.029124882072210312, -0.0374295674264431, -0.005468226037919521, 0.02226279489696026, -0.10472480952739716, -0.035324156284332275, -0.0011050982866436243, -0.029885170981287956, 0.017535362392663956, -0.015049805864691734, 0.012671468779444695, 0.0006670797010883689, -0.01607326976954937, 0.02738986723124981, -0.007310462649911642, 0.0009174630395136774, 0.04803461208939552, -0.06140788644552231, -0.003628426231443882, 0.015839336439967155, -0.02622019313275814, 0.06916671991348267, 0.08289089798927307, -0.01864655315876007, 0.042615123093128204, -0.0765746608376503, 0.017155218869447708, -0.09162446111440659, 0.019786985591053963, -0.017447637394070625, -0.0011763753136619925, -0.011696740053594112, -0.04869742691516876, -0.021385539323091507, 0.027857735753059387, 0.024738606065511703, -0.000050602109695319086, -0.006428333465009928, 0.040782634168863297, -0.0015498180873692036, -0.019192401319742203, -0.019777238368988037, -0.047371797263622284, -0.03873570263385773, -0.0010612354381009936, -0.06113496050238609, 0.013295294716954231, 0.004474002867937088, -0.0052147964015603065, -0.007870931178331375, -0.006481943652033806, -0.08421652764081955, -0.01053681317716837, -0.04218624159693718, 0.01840287074446678, -0.08413854986429214, 0.025635356083512306, 0.0014413795433938503, 0.04495447129011154, 0.03470033034682274, 0.04530537500977516, 0.03596747666597366, -0.0527912862598896, -0.03620140999555588, 0.014114066027104855, -0.04234220087528229, 0.0059458427131175995, 0.031210800632834435, 0.018159188330173492, 0.03333570808172226, 0.06441004574298859, -0.02567434497177601, -0.015888072550296783, -0.0442526675760746, 0.031210800632834435, -0.03452487662434578, -0.04105555638670921, 0.01924113743007183, -0.04819056764245033, -0.01990395225584507, -0.023685898631811142, 0.033940039575099945, -0.0045422338880598545, 0.011180134490132332, -0.014572188258171082, 0.026083730161190033, 0.014289517886936665, 0.04148443788290024, -0.029124882072210312, 0.004318046383559704, 0.028286617249250412, -0.025128496810793877, 0.02840358391404152, 0.021034637466073036, -0.000915026233997196, -0.06074507161974907, -0.02364690974354744, 0.02005990967154503, -0.013880131766200066, -0.007047285791486502, 0.027994198724627495, -0.023919833824038506, -0.019016949459910393, 0.03298480808734894, -0.02263319119811058, 0.03766350448131561, 0.0053171431645751, 0.03111332841217518, -0.004454508423805237, 0.015858830884099007, 0.05127071216702461, 0.023257018998265266, 0.05493569001555443, 0.0545068085193634, 0.002060332102701068, -0.027838241308927536, 0.003750267205759883, 0.01633644662797451, 0.03278985992074013, 0.022496730089187622, 0.006862087640911341, -0.004364346154034138, -0.03286784142255783, 0.02247723564505577, -0.049594178795814514, -0.008543494157493114, -0.03559707850217819, -0.034134987741708755, -0.025752322748303413, -0.02179492637515068, -0.007929415442049503, -0.027682285755872726, 0.031893111765384674, 0.016814064234495163, -0.04511042684316635, 0.05766492709517479, -0.0033286972902715206, -0.09614720195531845, 0.010449088178575039, 0.02263319119811058, 0.002768228529021144, 0.12679266929626465, 0.022769654169678688, 0.02703896351158619, 0.006486817263066769, -0.005755770951509476, 0.04748876392841339, -0.015293487347662449, -0.038170360028743744, -0.1037110984325409, -0.027935713529586792, 0.06023821234703064, -0.009683925658464432, -0.02043030597269535, -0.020527778193354607, 0.030411524698138237, 0.02791621908545494, 0.005468226037919521, 0.029183367267251015, -0.018880488350987434, -0.010848726145923138, 0.010868220590054989, 0.019738249480724335, 0.02452416531741619, 0.06596961617469788, 0.03501224145293236, 0.014757387340068817, 0.009683925658464432, 0.02397831715643406, 0.02025485411286354, -0.023588426411151886, -0.030508996918797493, -0.029202861711382866, 0.02959275245666504, 0.002619582461193204, 0.026259182021021843, -0.04709887504577637, 0.004169400315731764, 0.03212704509496689, 0.06374723464250565, 0.007753964047878981, 0.0027779757510870695, 0.011111903004348278, 0.04838551580905914, 0.06721726804971695, 0.0004791399114765227, 0.016394929960370064, -0.06885480880737305, 0.013548724353313446, -0.03302379697561264, 0.08733566105365753, -0.03569455072283745, 0.05462377518415451, -0.030372535809874535, 0.0028705750592052937, -0.016677601262927055, 0.025986257940530777, -0.0885833129286766, 0.004042685963213444, 0.004405772313475609, 0.06359127908945084, -0.0042083896696567535, -0.010429592803120613, 0.015186267904937267, -0.01276894100010395, -0.012232840992510319, -0.04234220087528229, -0.025245463475584984, -0.05719706043601036, 0.05388298258185387, -0.017116229981184006, -0.003562632016837597, 0.03333570808172226, 0.03711765632033348, -0.015400707721710205, 0.03528516739606857, -0.034817297011613846, -0.020157381892204285, -0.06039416790008545, 0.044174689799547195, -0.06651546061038971, 0.002049366245046258, 0.004949183203279972, 0.01887074112892151, 0.005258659366518259, -0.05536457151174545, -0.023510446771979332, -0.04546133056282997, -0.0901428759098053, 0.08795948326587677, -0.0004782260803040117, 0.024758100509643555, 0.054428830742836, -0.020995648577809334, -0.005799633450806141, 0.026259182021021843, 0.09131255000829697, 0.06671040505170822, -0.06526780873537064, -0.01301262341439724, 0.02177543193101883, 0.049087319523096085, 0.0036186790093779564, 0.006501438096165657, -0.004817594774067402, -0.017574351280927658, 0.07306563854217529, -0.030586974695324898, -0.036532819271087646, -0.018938971683382988, -0.029729213565587997, 0.06324037164449692, -0.03647433593869209, -0.017584098502993584, 0.02740936167538166, 0.02345196343958378, 0.06569668650627136, -0.009820387698709965, 0.0663205161690712, 0.01200865302234888, 0.11267859488725662, 0.04015880823135376, -0.013782658614218235, 0.05875662341713905, -0.013860637322068214, -0.03797541558742523, 0.0800836831331253, -0.014932838268578053, 0.01589781977236271, -0.008972374722361565, -0.01605377532541752, -0.03553859516978264, -0.026434632018208504, 0.00802688766270876, 0.02074221894145012, 0.0017971553606912494, -0.0066184052266180515, -0.02485557273030281, 0.008650713600218296, -0.0064332070760428905, -0.010848726145923138, -0.07053134590387344, -0.007091148756444454, -0.030216578394174576, 0.029202861711382866, 0.022087344899773598, -0.02805268205702305, 0.04164039343595505, -0.004079238045960665, -0.025927774608135223, -0.032438959926366806, -0.015439696609973907, 0.012573995627462864, 0.04986710101366043, -0.05361006036400795, -0.017798539251089096, -0.029222356155514717, -0.013811900280416012, 0.003569942433387041, 0.013246558606624603, -0.03505123034119606, -0.010566054843366146, 0.06503387540578842, 0.03996386379003525, 0.03577252849936485, -0.04218624159693718, 0.042771078646183014, 0.03945700451731682, -0.02959275245666504, 0.06366925686597824, -0.012271829880774021, -0.03290683031082153, 0.023607920855283737, 0.004456945229321718, 0.024602143093943596, -0.05255735293030739, -0.02855953946709633, -0.004417956341058016, -0.032750871032476425, 0.07630173116922379, 0.054038938134908676, 0.032575421035289764, -0.011482300236821175, -0.014650166966021061, 0.056768178939819336, -0.043628841638565063, -0.030528491362929344, 0.0028437699656933546, -0.02499203383922577, 0.052323415875434875, 0.06659343838691711, 0.007856310345232487, -0.010488077066838741, -0.026454126462340355, 0.014182297512888908, -0.05325915664434433, -0.002646387554705143, -0.07271473109722137, 0.01845160685479641, -0.005234291311353445, -0.06710030138492584, -0.023607920855283737, -0.012057389132678509, -0.020274348556995392, 0.004169400315731764, 0.02432921901345253, 0.06421510130167007, -0.0039062239229679108, 0.034134987741708755, 0.032750871032476425, 0.0527522973716259, -0.01887074112892151, 0.034797802567481995, -0.03627938777208328, 0.032068561762571335, -0.07263675332069397, 0.018773267045617104, -0.01710648275911808, 0.00957670621573925, 0.01370468083769083, -0.076613649725914, 0.02095665968954563, 0.036162421107292175, 0.060979004949331284, -0.06554073095321655, -0.025245463475584984, -0.016745833680033684, -0.05567648261785507, -0.004581223241984844, -0.009898366406559944, -0.009011363610625267, -0.07220787554979324, 0.07579487562179565, 0.0850742906332016, 0.0017179587157443166, 0.0867118313908577, -0.01827615685760975, -0.016794569790363312, -0.031074339523911476, 0.03452487662434578, 0.011180134490132332, -0.005853243637830019, -0.01635594107210636, -0.012973634526133537, -0.006174903828650713, 0.060979004949331284, 0.04690392687916756, 0.00799277238547802, 0.014747640118002892, 0.04729381948709488, 0.021736441180109978, -0.02758481167256832, -0.0612129382789135, -0.016170743852853775, -0.05696312338113785, -0.02584979496896267, -0.005882485304027796, -0.009459738619625568, 0.00030399340903386474, -0.02124907821416855, -0.030489502474665642, -0.013100349344313145, -0.00025175404152832925, 0.03674725815653801, 0.02754582278430462, -0.004042685963213444, 0.052674319595098495, -0.03306278586387634, 0.004576349630951881, 0.0050880820490419865, -0.004661638289690018, -0.041289493441581726, 0.023783370852470398, 0.005414615850895643, -0.05528659000992775, -0.00408898526802659, 0.014572188258171082, 0.010117679834365845, 0.011686992831528187, 0.0062187667936086655, 0.03029455617070198, -0.016346193850040436, -0.006813351064920425, -0.012076884508132935, -0.033784084022045135, 0.008056129328906536, -0.010029954835772514, 0.06335734575986862, -0.0014864606782793999, 0.008831039071083069, -0.018022727221250534, 0.025128496810793877, 0.07790029048919678, -0.027311887592077255, -0.056222330778837204, 0.011258112266659737, -0.0039476496167480946, -0.00570703437551856, 0.017954496666789055, -0.050101038068532944, -0.037332095205783844, -0.018666047602891922, -0.035831015557050705, 0.03249744325876236, 0.007446924690157175, -0.02214582823216915, 0.04444761201739311, -0.04452558979392052, 0.02992415986955166, 0.07072629034519196, 0.011618762277066708, 0.05875662341713905, -0.008855407126247883, 0.014523452147841454, -0.005078334826976061, 0.014523452147841454, -0.05314218997955322, -0.039729926735162735, 0.04339490458369255, 0.034641847014427185, -0.045851219445466995, -0.010488077066838741, 0.03271188214421272, -0.00782706867903471, 0.0783681571483612, 0.01653139293193817, 0.03115231730043888, -0.008241328410804272, -0.07123314589262009, 0.01582958735525608, 0.06869885325431824, -0.036142926663160324, -0.04164039343595505, 0.024426693096756935, -0.06612557172775269, 0.041094545274972916, -0.026668567210435867, 0.012788435444235802, 0.01422128640115261, 0.021405033767223358, -0.007573639042675495, -0.04191331937909126, -0.01768157258629799, 0.009220929816365242, 0.033628128468990326, -0.05123172327876091, 0.0032945817802101374, 0.032244011759757996, -0.03875519707798958, -0.03113282285630703, 0.017564604058861732, 0.04035375267267227, 0.00359674752689898, -0.014757387340068817, 0.04292703792452812, -0.020001426339149475, -0.0009491417440585792, 0.019358104094862938, 0.013607207685709, 0.0748591348528862, 0.00518555473536253, -0.017535362392663956, 0.015800345689058304, -0.07158404588699341, -0.08912915736436844, -0.025576870888471603, -0.01172598171979189, 0.02859853021800518, 0.022223806008696556, -0.006886455696076155, 0.0026756292209029198, 0.0195530503988266, 0.0018203051295131445, 0.031249791383743286, -0.0032312243711203337, 0.0008534964872524142, -0.06409813463687897, 0.022087344899773598, -0.05290825292468071, 0.030041126534342766, 0.013402515091001987, 0.015098541975021362, -0.04748876392841339, 0.019007202237844467, 0.005365879740566015, 0.024602143093943596, -0.042459167540073395, -0.03097686730325222, -0.0035870003048330545, -0.015790598466992378, -0.03314076364040375, 0.04265411198139191, 0.016541140154004097, 0.006530679762363434, -0.013139338232576847, 0.05329814553260803, 0.005395121406763792, -0.04183534160256386, -0.009211182594299316, -0.03992487117648125, -0.047761689871549606, 0.0049759880639612675, 0.022594202309846878, -0.028169648721814156, -0.0008870027959346771, -0.04319996014237404, 0.04140646010637283, -0.02994365431368351, 0.008967501111328602, -0.007159379776567221, 0.0012470430228859186, 0.05372702702879906, -0.07965479791164398, 0.06094001606106758, 0.012369303032755852, -0.004283931106328964, 0.011589519679546356, 0.024251241236925125, 0.024465681985020638, -0.06355229020118713, -0.03165917471051216, 0.031191306188702583, -0.07220787554979324, -0.009337897412478924, 0.04409670829772949, 0.017272185534238815, -0.06405914574861526, 0.013841142877936363, -0.003721025539562106, -0.008329053409397602, -0.015790598466992378, -0.015196015127003193, -0.008265696465969086, 0.006998549681156874, 0.023919833824038506, -0.048931363970041275, -0.0391061007976532, -0.0023271639365702868, -0.011014429852366447, -0.038716208189725876, -0.03368661180138588, -0.013470745645463467, -0.0212685726583004, 0.051114752888679504, 0.0902208536863327, -0.022769654169678688, -0.026668567210435867, -0.006106673274189234, -0.026844019070267677, 0.005585193168371916, -0.0053512584418058395, -0.030567480251193047, 0.0323219932615757, -0.10191759467124939, -0.02247723564505577, -0.016433920711278915, -0.030372535809874535, -0.03013860061764717, 0.00011453057959442958, -0.020371822640299797, 0.04557829722762108, -0.028033187612891197, 0.02620069868862629, 0.036337871104478836, -0.05329814553260803, -0.05025699362158775, -0.006155409384518862, 0.015527422539889812, -0.016716590151190758, -0.008694577030837536, -0.028637519106268883, -0.026064235717058182, 0.005170933902263641, 0.04140646010637283, 0.059653375297784805, 0.019007202237844467, -0.0037356463726609945, 0.05665121227502823, -0.0021054132375866175, 0.004539797082543373, -0.00786118395626545, 0.0019726064056158066, 0.00723248440772295, 0.060667090117931366, 0.034446898847818375, -0.03302379697561264, 0.002639076905325055, 0.010585550218820572, 0.0059458427131175995, 0.05497467890381813, -0.04557829722762108, -0.00786118395626545, -0.03926205635070801, -0.008216960355639458, 0.03947649896144867, 0.014377242885529995, -0.08374866098165512, -0.007115516811609268, -0.0238418560475111, 0.028676507994532585, 0.018510092049837112, 0.012057389132678509, 0.03672776371240616, -0.03577252849936485, -0.021366044878959656, -0.0017069929745048285, 0.010683022439479828, 0.030742932111024857, -0.015507928095757961, 0.019738249480724335, 0.012915150262415409, -0.029300333932042122, -0.025245463475584984, 0.000258455314906314, 0.058093808591365814, 0.015166772529482841, -0.0391840785741806, 0.015254498459398746, 0.02516748569905758, 0.009021110832691193, 0.07267574220895767, -0.06936167180538177, -0.06893278658390045, -0.01750612072646618, 0.0011392137967050076, -0.07033639401197433, 0.015020563267171383, -0.0033993651159107685, -0.05481872335076332, 0.004488624166697264, 0.026746544986963272, 0.07064831256866455, 0.011248365044593811, -0.0004639097605831921, -0.024680120870471, -0.014698903076350689, 0.012427786365151405, 0.008099992759525776, -0.008402158506214619, 0.01855882816016674, 0.0476837120950222, -0.02056676708161831, 0.05977034196257591, -0.01581009291112423, -0.025147991254925728, 0.02996314875781536, -0.004339978098869324, 0.006257756147533655, 0.02193138748407364, 0.013977603986859322, -0.03167867287993431, -0.015254498459398746, 0.03238047659397125, -0.03723462298512459, 0.0007493224111385643, -0.017535362392663956, 0.037527039647102356, 0.051660601049661636, 0.009586453437805176, -0.0005525491433218122, 0.02095665968954563, 0.005663171876221895, 0.05396096035838127, 0.030684448778629303, -0.04062667861580849, 0.036825235933065414, 0.0048395260237157345, 0.04947721213102341, -0.02278914861381054, -0.019601786509156227, -0.025576870888471603, 0.03183462843298912, -0.03372560068964958, -0.043277937918901443, 0.020683735609054565, -0.012145115062594414, 0.06690535694360733, -0.011141144670546055, 0.015254498459398746, 0.021697452291846275, 0.055871427059173584, -0.06550174206495285, 0.0041304114274680614, -0.040080830454826355, -0.05314218997955322, -0.08632194250822067, -0.03167867287993431, -0.05021800473332405, 0.09661507606506348, 0.0002356101176701486, -0.013129591010510921, 0.0003646093246061355, -0.0005568135529756546, 0.012437533587217331 ]
715,528
pytorch_optimizer.optimizer.alig
__init__
null
def __init__( self, params: PARAMETERS, max_lr: Optional[float] = None, projection_fn: Optional[Callable] = None, momentum: float = 0.0, adjusted_momentum: bool = False, ): self.validate_learning_rate(max_lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.projection_fn = projection_fn defaults: DEFAULTS = {'max_lr': max_lr, 'adjusted_momentum': adjusted_momentum, 'momentum': momentum} super().__init__(params, defaults) if self.projection_fn is not None: self.projection_fn()
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], max_lr: Optional[float] = None, projection_fn: Optional[Callable] = None, momentum: float = 0.0, adjusted_momentum: bool = False)
[ 0.012499446049332619, -0.022808268666267395, -0.021979881450533867, 0.01657695323228836, -0.027299968525767326, 0.0206912774592638, -0.050365958362817764, -0.033430036157369614, -0.02864379808306694, 0.015656523406505585, -0.01888723485171795, 0.03654108941555023, 0.04071984440088272, 0.05990161746740341, -0.0071103256195783615, 0.06538738310337067, 0.0016130544245243073, 0.017285684123635292, -0.03510522097349167, 0.012517854571342468, 0.01956835202872753, -0.021961471065878868, -0.010410069487988949, 0.07591710984706879, 0.002349398797377944, 0.022053515538573265, -0.006097852252423763, -0.003302044468000531, -0.03168121725320816, 0.0036310984287410975, 0.004763227887451649, 0.017460566014051437, -0.020912181586027145, 0.07878885418176651, 0.014073382131755352, 0.014874156564474106, -0.010078714229166508, 0.0414193719625473, -0.09491479396820068, -0.003037420567125082, -0.00885914359241724, -0.015122673474252224, 0.021004224196076393, 0.013309424743056297, -0.02185101993381977, -0.02332370914518833, 0.016742631793022156, 0.01303329598158598, 0.016061512753367424, -0.0015118070878088474, -0.020488783717155457, 0.013373855501413345, 0.010456090793013573, -0.013760436326265335, -0.039357610046863556, 0.038694899529218674, 0.04259752482175827, 0.02382074110209942, 0.054084498435258865, -0.040867116302251816, -0.019089728593826294, -0.04557972028851509, -0.016089124605059624, -0.009006412699818611, 0.019549943506717682, -0.014073382131755352, -0.07411306351423264, -0.019844481721520424, 0.02148284763097763, 0.06222110241651535, 0.051470473408699036, 0.006709938403218985, 0.026563623920083046, 0.020654460415244102, 0.026508398354053497, 0.007952519692480564, -0.07264037430286407, -0.04300251230597496, -0.023655064404010773, -0.011229252442717552, 0.015325168147683144, 0.00943441316485405, -0.03177326172590256, -0.012232521548867226, -0.0073174224235117435, -0.09491479396820068, -0.017653856426477432, -0.07356080412864685, 0.027023838832974434, -0.01849144883453846, -0.055225830525159836, 0.022053515538573265, -0.019770847633481026, -0.0018742266111075878, 0.016475705429911613, 0.007915702648460865, -0.010354842990636826, 0.009535660035908222, -0.003094947664067149, -0.030006034299731255, -0.000018094009647029452, 0.0073956591077148914, -0.02113308385014534, 0.02306598797440529, 0.05158092454075813, -0.01076903659850359, -0.03221506625413895, -0.028183581307530403, 0.00029827700927853584, -0.008960391394793987, -0.058318477123975754, 0.0943993553519249, -0.052538175135850906, 0.033393219113349915, -0.04638969898223877, 0.05688260495662689, 0.006001207046210766, -0.013815661892294884, 0.027042249217629433, -0.0014358715852722526, 0.01766306161880493, 0.06365697085857391, -0.024004828184843063, 0.01626400649547577, 0.014450758695602417, -0.02974831312894821, 0.01585901714861393, 0.015536867082118988, 0.01666899584233761, -0.06457740813493729, 0.021979881450533867, -0.009867015294730663, -0.03725902736186981, -0.03895261883735657, 0.021593300625681877, -0.058686647564172745, 0.020267879590392113, 0.01626400649547577, -0.0755489394068718, 0.045800622552633286, 0.015269942581653595, 0.06737551093101501, 0.04031485691666603, 0.005283270962536335, -0.016843877732753754, 0.039099887013435364, 0.00027037644758820534, 0.02796267904341221, -0.007800648454576731, 0.006166884209960699, 0.019494717940688133, -0.013981339521706104, 0.0035551628097891808, 0.011937983334064484, 0.010897897183895111, -0.028017904609441757, 0.04937189072370529, -0.0415298230946064, 0.02746564708650112, 0.031165776774287224, -0.010041897185146809, 0.022053515538573265, 0.004599851556122303, -0.02599295787513256, -0.01927381567656994, -0.02231123484671116, -0.024741172790527344, -0.06627099961042404, -0.026324313133955002, 0.037921737879514694, 0.02306598797440529, -0.08548958599567413, -0.009848606772720814, -0.00012670301657635719, 0.01697273924946785, 0.07400261610746384, 0.057140324264764786, 0.029656270518898964, -0.037498340010643005, 0.017957599833607674, 0.10787445306777954, -0.030245346948504448, -0.004123528487980366, -0.08011426776647568, 0.007450885139405727, 0.0716463103890419, -0.06376742571592331, 0.037884920835494995, -0.03928397595882416, 0.014312694780528545, 0.05242772027850151, 0.006120862904936075, -0.007243787869811058, -0.024667536839842796, -0.04635288193821907, -0.029601044952869415, 0.04215571656823158, 0.004655077122151852, 0.025551151484251022, 0.028754249215126038, 0.054857660084962845, 0.034571368247270584, -0.0071333362720906734, -0.014625640586018562, -0.04664741829037666, -0.009231917560100555, -0.028846291825175285, 0.012950457632541656, -0.003193893935531378, -0.009149079211056232, 0.01056654192507267, -0.03622814640402794, 0.04097756743431091, 0.04027803987264633, -0.01846383512020111, -0.046242427080869675, 0.00245524849742651, 0.01814168505370617, 0.062037017196416855, 0.022789860144257545, 0.09697655588388443, -0.0282388087362051, 0.009600089862942696, -0.04384930804371834, 0.04491700977087021, -0.002768194768577814, 0.02858857251703739, -0.05566763877868652, -0.037461522966623306, -0.01768147014081478, -0.02523820474743843, -0.08828769624233246, -0.0681118592619896, -0.016291620209813118, 0.0338534340262413, -0.02833085134625435, 0.008003143593668938, 0.03497635945677757, -0.11192435026168823, -0.01923699676990509, 0.026968613266944885, 0.03287777677178383, -0.001741914777085185, 0.021703751757740974, -0.006258927285671234, 0.009107659570872784, 0.015555275604128838, 0.03136827051639557, -0.018795190379023552, 0.01850065402686596, -0.005573206581175327, -0.012508650310337543, -0.027797000482678413, 0.07451805472373962, -0.03440569341182709, 0.008730283007025719, -0.03497635945677757, 0.02676611952483654, 0.03020852990448475, 0.0170187596231699, -0.03243597224354744, -0.04797283932566643, -0.035639069974422455, 0.07952519506216049, 0.04182436317205429, -0.0031087540555745363, -0.05312724784016609, -0.03096328303217888, 0.043517954647541046, -0.014404737390577793, 0.10699084401130676, 0.04451201856136322, 0.003302044468000531, -0.009443617425858974, 0.01586822234094143, -0.05095503479242325, -0.03313549980521202, -0.07116768509149551, -0.008716477081179619, 0.04786238819360733, 0.09255848824977875, -0.06292062997817993, -0.010980735532939434, 0.0073496378026902676, 0.016448093578219414, 0.018316566944122314, -0.012315359897911549, 0.027355194091796875, 0.004675786942243576, -0.018703147768974304, -0.0015877425903454423, 0.012591489590704441, 0.05404767766594887, 0.04598470777273178, 0.11081983149051666, -0.0038243888411670923, 0.034921132028102875, 0.011560606770217419, 0.01227854285389185, -0.026858162134885788, 0.054452668875455856, -0.04646333307027817, 0.05404767766594887, -0.015426415018737316, -0.026158634573221207, -0.01999174989759922, -0.014496780931949615, 0.004415765404701233, 0.027263151481747627, 0.03157076612114906, 0.04499064385890961, 0.015021425671875477, -0.005136002320796251, -0.022163966670632362, -0.0031133561860769987, -0.02941695973277092, -0.007128734141588211, -0.06266290694475174, 0.051102302968502045, 0.005402927286922932, -0.014257468283176422, 0.009664520621299744, 0.00245524849742651, -0.029177647083997726, -0.03950487822294235, -0.08202876895666122, -0.0006316454382613301, 0.036338597536087036, -0.03273050859570503, 0.020985815674066544, -0.02111467532813549, -0.005343099124729633, 0.016107533127069473, -0.00888215471059084, -0.060527510941028595, -0.04974006488919258, 0.020893773064017296, 0.027981087565422058, 0.06071159616112709, -0.015122673474252224, 0.04668423533439636, -0.012508650310337543, -0.026140226051211357, 0.05474720522761345, -0.019899707287549973, -0.003127162577584386, 0.004560733214020729, -0.02899356186389923, 0.0340559296309948, -0.1018364280462265, -0.029895583167672157, 0.0048874858766794205, -0.028054721653461456, 0.06067477911710739, 0.00005371575025492348, 0.02899356186389923, -0.00828847661614418, -0.03700130805373192, 0.0017488179728388786, -0.03348526358604431, 0.0005908013554289937, -0.017589427530765533, -0.03709334880113602, 0.023250075057148933, 0.04819374158978462, 0.0026807538233697414, -0.012913639657199383, -0.01617196388542652, 0.058649830520153046, -0.011560606770217419, -0.017819534987211227, -0.06527692824602127, -0.004496302921324968, 0.010456090793013573, -0.02115149237215519, -0.0011229251977056265, -0.019918115809559822, 0.008780906908214092, -0.008527788333594799, -0.011845940724015236, 0.02409687079489231, -0.02597454935312271, 0.053753141313791275, 0.0030167109798640013, 0.00013554777251556516, -0.016374459490180016, 0.0377008318901062, -0.005379916168749332, 0.032988227903842926, -0.02415209636092186, -0.01073221955448389, 0.0034792274236679077, 0.02225600928068161, -0.013539533130824566, -0.02527502179145813, 0.036393821239471436, 0.03355889767408371, 0.03587838262319565, -0.009673724882304668, -0.0018868825864046812, -0.009471230208873749, -0.038658082485198975, 0.019421083852648735, 0.028109947219491005, 0.01742374897003174, -0.05161774158477783, 0.05883391946554184, 0.028846291825175285, 0.010465295054018497, 0.06605008989572525, 0.0069952718913555145, -0.052574992179870605, -0.048083290457725525, 0.0376640148460865, -0.017248867079615593, 0.0032007971312850714, 0.007004476152360439, -0.05202273279428482, 0.008826928213238716, -0.010152348317205906, 0.037884920835494995, 0.02527502179145813, 0.04642651602625847, 0.03628337010741234, 0.07819977402687073, -0.000640274491161108, -0.0028763453010469675, 0.007059702184051275, 0.001960516907274723, -0.017966803163290024, -0.06225791946053505, 0.014082586392760277, -0.020912181586027145, -0.012858414091169834, 0.03201257437467575, 0.014966200105845928, -0.013502715155482292, 0.03435046598315239, -0.008458755910396576, -0.0023701086174696684, 0.0642828643321991, -0.027704957872629166, 0.014864952303469181, -0.04454883560538292, -0.03471864014863968, -0.0067651644349098206, 0.00014331391139421612, 0.03206779807806015, -0.05320088192820549, -0.0017131512286141515, 0.0282388087362051, 0.039836231619119644, 0.007575143128633499, -0.00022004041238687932, 0.031202593818306923, -0.05758213251829147, -0.024446634575724602, 0.011496176943182945, 0.02608500048518181, -0.040609393268823624, 0.012149682268500328, 0.015131877735257149, 0.015509254299104214, -0.03133145347237587, -0.03843717649579048, 0.036044057458639145, 0.05397404357790947, -0.011394930072128773, -0.05931254103779793, -0.042082082480192184, 0.006074841134250164, 0.025164570659399033, 0.020157428458333015, -0.06465104222297668, -0.002586409682407975, 0.006268131546676159, -0.03431364893913269, -0.02407846227288246, 0.024593902751803398, -0.0023022268433123827, 0.0011706725927069783, -0.008702670224010944, 0.031221002340316772, 0.05327451601624489, -0.00794331543147564, 0.015177899040281773, -0.034865908324718475, -0.007561336737126112, -0.027778591960668564, 0.004098217003047466, -0.06619736552238464, 0.04178754612803459, 0.0453219972550869, 0.05007141828536987, -0.03365093842148781, 0.00021860224660485983, 0.05581490695476532, 0.015122673474252224, 0.07628528028726578, 0.038694899529218674, 0.029932400211691856, 0.0021066353656351566, -0.027355194091796875, -0.00012627156684175134, 0.02904878742992878, -0.019697213545441628, -0.11140891164541245, -0.0027060657739639282, -0.05250135436654091, 0.020102202892303467, -0.0060334219597280025, -0.0029568830505013466, -0.025146162137389183, 0.02269781567156315, -0.04786238819360733, -0.006001207046210766, -0.04340750351548195, 0.01738693192601204, -0.0074646915309131145, -0.017202846705913544, -0.0018201513448730111, 0.05706669017672539, 0.010419273748993874, -0.05518901348114014, 0.01627321168780327, 0.05121275410056114, 0.0009514950215816498, -0.02306598797440529, 0.061705660074949265, 0.010676993988454342, -0.0034378080163151026, -0.053311336785554886, -0.019476309418678284, 0.05055004358291626, -0.024409817531704903, 0.0643564984202385, -0.010630972683429718, -0.03436887636780739, -0.028404485434293747, -0.008730283007025719, -0.017635447904467583, 0.03806900605559349, 0.019292224198579788, -0.012876822613179684, 0.01472688838839531, -0.03201257437467575, -0.0072575947269797325, 0.04819374158978462, 0.03504999354481697, 0.031202593818306923, 0.019476309418678284, -0.013079317286610603, -0.04270797595381737, 0.00753372348845005, 0.013208177872002125, 0.053789958357810974, 0.013659188523888588, -0.016116738319396973, 0.020267879590392113, 0.011514585465192795, -0.02415209636092186, 0.005218841135501862, 0.01580379158258438, 0.0414193719625473, -0.05555718392133713, 0.02039673924446106, 0.01150538120418787, 0.00920890737324953, -0.029932400211691856, 0.01411940436810255, 0.028036313131451607, -0.012177295982837677, -0.03125781938433647, -0.014073382131755352, -0.03584156557917595, -0.006544260773807764, 0.01654013618826866, -0.0013265705201774836, -0.012895231135189533, -0.041713912039995193, 0.0169819425791502, -0.030355798080563545, 0.012315359897911549, -0.08762498199939728, -0.035639069974422455, 0.04462246969342232, -0.08114515244960785, 0.013852478936314583, 0.023673472926020622, -0.034921132028102875, 0.025532742962241173, 0.03466341271996498, -0.0008887907024472952, -0.038989435881376266, -0.05968071520328522, 0.0069032288156449795, -0.07974609732627869, -0.015177899040281773, 0.07665345072746277, 0.0023609043564647436, -0.10595995932817459, 0.03551020845770836, -0.03212302550673485, 0.005421335808932781, -0.014818930998444557, -0.05574127286672592, -0.02597454935312271, 0.06608691066503525, 0.004553829785436392, -0.006461421959102154, -0.028036313131451607, 0.0033986896742135286, -0.019089728593826294, -0.05592535808682442, 0.01920017972588539, -0.05876028537750244, -0.046168792992830276, 0.05176501348614693, 0.06881138682365417, -0.027778591960668564, -0.022863494232296944, 0.023121213540434837, -0.029582636430859566, 0.03836354240775108, -0.062442004680633545, -0.007437078282237053, 0.031460314989089966, -0.13011205196380615, 0.025790462270379066, -0.022458504885435104, -0.00480464706197381, -0.01962357759475708, -0.0489300861954689, -0.0643564984202385, 0.02525661326944828, -0.017966803163290024, 0.004818453919142485, 0.020948998630046844, 0.005932174623012543, -0.027778591960668564, -0.021335579454898834, 0.03171803429722786, 0.017073985189199448, -0.03092646598815918, -0.02231123484671116, -0.007524519227445126, -0.04797283932566643, 0.03354048728942871, 0.08983401954174042, 0.007266798987984657, -0.010437682271003723, 0.022771451622247696, 0.015610501170158386, 0.04219253361225128, -0.004611356649547815, -0.04083029553294182, -0.033835023641586304, 0.01809566468000412, 0.08718317747116089, -0.025882506743073463, -0.03851081430912018, -0.024409817531704903, 0.012876822613179684, 0.01851906254887581, 0.00006791770283598453, -0.04454883560538292, -0.06888502091169357, -0.02785222791135311, -0.03556543588638306, 0.02562478557229042, -0.04841464385390282, -0.029729904606938362, 0.010557337664067745, 0.041713912039995193, 0.028919925913214684, 0.011348907835781574, -0.020507192239165306, -0.022532138973474503, 0.038694899529218674, 0.02266099862754345, 0.03136827051639557, 0.017460566014051437, -0.03203098103404045, -0.002121592406183481, -0.016291620209813118, 0.002949979854747653, -0.08386962860822678, 0.04083029553294182, 0.05610944330692291, 0.028165172785520554, -0.028054721653461456, 0.009383789263665676, 0.0014910973841324449, 0.00203069974668324, 0.02306598797440529, -0.025164570659399033, -0.11523789912462234, -0.0528695285320282, -0.015500050038099289, 0.015555275604128838, 0.003856603754684329, 0.04046212509274483, -0.05533628165721893, 0.05474720522761345, -0.013981339521706104, 0.031110551208257675, 0.010281208902597427, 0.013281811960041523, -0.0007622315315529704, -0.04418066516518593, 0.03821627423167229, 0.031221002340316772, 0.035215672105550766, -0.0489300861954689, 0.020433558151125908, 0.03254642337560654, 0.07113087177276611, 0.022918719798326492, -0.04488019272685051, -0.03597042337059975, 0.016494113951921463, -0.04646333307027817, 0.016751835122704506, -0.0025772054214030504, 0.03619132936000824, -0.03365093842148781, -0.012306155636906624, 0.006194497458636761, 0.040204405784606934, -0.03313549980521202, 0.031055325642228127, 0.07024725526571274, -0.025827279314398766, -0.029232872650027275, 0.0018776782089844346, -0.03350367024540901, 0.024980483576655388, 0.022845085710287094, -0.02372869849205017, 0.01354873739182949, -0.004010776057839394, 0.038584448397159576, -0.037148576229810715, -0.009664520621299744, -0.023618247359991074, 0.0755489394068718, -0.029122421517968178, -0.07087314873933792, 0.06638144701719284, -0.0036955284886062145, 0.003269829321652651, 0.011799919418990612, 0.06671280413866043, 0.03355889767408371, -0.009383789263665676, -0.04988733306527138, 0.025348655879497528, 0.004413464106619358, -0.02864379808306694, -0.07009998708963394, -0.048120107501745224, -0.025477517396211624, 0.06597645580768585, -0.009802584536373615, 0.02457549422979355, 0.05217000097036362, 0.03836354240775108, -0.001706248032860458 ]
715,531
pytorch_optimizer.optimizer.alig
__str__
null
def __str__(self) -> str: return 'AliG'
(self) -> str
[ 0.0008905997965484858, -0.04813120514154434, 0.03234624117612839, 0.005425542593002319, 0.004241670481860638, -0.06917782872915268, 0.010048898868262768, 0.007008352316915989, 0.10343896597623825, -0.06324336677789688, -0.03496844321489334, 0.0005978663684800267, -0.019649263471364975, 0.03027608059346676, 0.007254183758050203, -0.002680425066500902, -0.026377281174063683, -0.06845326721668243, 0.01722545176744461, 0.018527926877141, -0.0020335002336651087, 0.02620476856827736, 0.03753888979554176, -0.009212208911776543, -0.01949400082230568, 0.06324336677789688, -0.007232619449496269, -0.017924129962921143, -0.00476136663928628, -0.0039591798558831215, -0.006055216304957867, -0.08177129924297333, 0.0010005770018324256, 0.006844464689493179, -0.019839027896523476, 0.01029041688889265, -0.04278329387307167, 0.011618769727647305, -0.03412312641739845, -0.006309673190116882, -0.00666332570835948, 0.012541715987026691, -0.03103514015674591, -0.028999483212828636, -0.02064983919262886, -0.01768261194229126, 0.005865451414138079, 0.03833245113492012, 0.00406268797814846, -0.013766559772193432, 0.01323176920413971, 0.003006044076755643, -0.04316282272338867, -0.011541138403117657, -0.02479015849530697, 0.021115625277161598, 0.036676324903964996, -0.01065269485116005, -0.010790705680847168, 0.032035715878009796, -0.038953498005867004, -0.03167343884706497, 0.06189776584506035, -0.03127665817737579, -0.014473864808678627, 0.028171420097351074, -0.009453727863729, 0.04685460776090622, 0.03477867692708969, 0.043335337191820145, 0.04737214744091034, -0.049338798969984055, -0.005559240467846394, 0.01813114620745182, 0.015646954998373985, -0.00514952139928937, -0.09481330215930939, 0.011886165477335453, 0.023789580911397934, -0.05506623908877373, 0.0285336971282959, 0.0009579878533259034, -0.01464637741446495, -0.004159726668149233, -0.015112163498997688, -0.08722271770238876, -0.035330720245838165, -0.05879252776503563, -0.018234653398394585, 0.01506903488188982, -0.017855124548077583, -0.01004027295857668, -0.023392802104353905, 0.06600358337163925, -0.035002946853637695, -0.0005741457571275532, 0.009013819508254528, -0.061656247824430466, 0.04906277731060982, 0.010885587893426418, 0.011782657355070114, 0.028688959777355194, -0.010980470106005669, 0.020874107256531715, -0.049131784588098526, -0.04499146342277527, -0.029120242223143578, 0.022047197446227074, 0.009143204428255558, 0.016820045188069344, -0.056756868958473206, 0.010575064457952976, 0.03664182126522064, -0.0018394228536635637, 0.02161591500043869, -0.05899954214692116, -0.007763097528368235, -0.0004485345270950347, 0.04616455361247063, -0.02213345468044281, 0.01619899645447731, 0.013594047166407108, -0.057274408638477325, -0.005869764368981123, 0.04330083355307579, 0.07466375082731247, -0.051857493817806244, -0.026756810024380684, 0.020149551331996918, -0.061345722526311874, 0.040816642343997955, 0.022357720881700516, -0.05444519221782684, -0.006874654442071915, 0.08073621988296509, 0.0029262565076351166, 0.029258253052830696, 0.015379559248685837, 0.05479021742939949, 0.14656728506088257, -0.026636051014065742, 0.0026717993896454573, 0.05161597579717636, 0.027067333459854126, 0.01439623348414898, 0.012438207864761353, 0.0032346241641789675, 0.05948258191347122, -0.017147820442914963, -0.02801615744829178, 0.03105239011347294, 0.04457743093371391, 0.04067863151431084, -0.001692786579951644, -0.02027031034231186, -0.004189916420727968, -0.012817736715078354, -0.021201882511377335, 0.027377858757972717, -0.02639453299343586, -0.006753894966095686, -0.0467165969312191, -0.012101806700229645, -0.0018760819220915437, -0.002096036449074745, 0.02787814661860466, 0.0018361882539466023, 0.05013236030936241, 0.021702170372009277, -0.0038901744410395622, -0.04654408246278763, -0.07576783746480942, -0.09543434530496597, 0.04143768921494484, 0.005166772753000259, 0.045854032039642334, 0.011722277849912643, 0.09888461232185364, 0.03722836822271347, -0.013249020092189312, -0.014016704633831978, -0.00768115371465683, -0.05392765253782272, 0.014111586846411228, 0.08391045778989792, -0.049131784588098526, 0.03833245113492012, 0.04016109183430672, 0.028171420097351074, -0.026498040184378624, 0.0037737281527370214, 0.025704478845000267, -0.05444519221782684, 0.003126803319901228, 0.0028141229413449764, -0.03284652903676033, 0.012826362624764442, -0.0578264519572258, -0.024410629644989967, 0.012662474997341633, -0.016621654853224754, 0.0459575392305851, -0.03331231325864792, 0.029154743999242783, 0.04019559547305107, 0.002727866405621171, 0.023116780444979668, -0.014180592261254787, 0.02406560257077217, -0.049787335097789764, 0.031190400943160057, 0.021201882511377335, -0.022495731711387634, 0.01902821473777294, 0.03567574545741081, -0.04678560420870781, -0.010333545506000519, 0.00009663439413998276, -0.016095489263534546, 0.03712485730648041, 0.04454293102025986, -0.013732057064771652, -0.0069565982557833195, -0.042231250554323196, -0.017768867313861847, 0.013223143294453621, 0.02335829846560955, -0.006693515460938215, -0.011385876685380936, -0.021512405946850777, 0.0037823538295924664, -0.08363443613052368, -0.008121063001453876, 0.028602702543139458, 0.012136309407651424, 0.04561251029372215, -0.03660731762647629, -0.0038750795647501945, -0.07590584456920624, -0.031069641932845116, -0.011152983643114567, 0.00719811674207449, -0.007374942768365145, 0.02284075878560543, 0.03289828449487686, -0.04554350674152374, -0.013283522799611092, 0.029396263882517815, -0.018424417823553085, -0.03815993666648865, 0.04944230616092682, -0.051926497370004654, -0.01696668192744255, -0.011584267020225525, -0.007909733802080154, -0.04885576292872429, -0.03257050737738609, 0.019217979162931442, 0.034364644438028336, -0.004364585969597101, -0.07852804660797119, 0.017242703586816788, -0.03950554132461548, 0.06500300765037537, -0.004379680845886469, 0.023151282221078873, -0.01633700728416443, 0.033208806067705154, 0.02955152466893196, -0.027774639427661896, 0.10330095142126083, 0.025393955409526825, -0.058896034955978394, 0.03550323471426964, -0.021443400532007217, -0.004006620962172747, -0.015086286701261997, 0.041782718151807785, -0.11033949255943298, -0.06348488479852676, -0.000404867110773921, -0.03167343884706497, 0.001396279432810843, 0.015336430631577969, -0.012895368039608002, -0.05085691437125206, 0.03319155424833298, -0.012084555812180042, 0.02033931575715542, 0.00980737991631031, 0.06941934674978256, 0.00948823057115078, -0.03715936094522476, 0.012075929902493954, 0.04619905725121498, 0.01497415266931057, 0.045854032039642334, 0.05399665609002113, -0.021374395117163658, -0.011765405535697937, 0.0002645652857609093, -0.02064983919262886, 0.002113287802785635, -0.02691207267343998, -0.037435382604599, 0.004366742447018623, -0.020149551331996918, -0.01358542125672102, 0.011480758897960186, 0.008466089144349098, -0.029706787317991257, 0.028740713372826576, 0.021891934797167778, 0.07908008992671967, 0.0032324676867574453, 0.06917782872915268, 0.005602369084954262, 0.008259073831140995, 0.022495731711387634, 0.05651535093784332, -0.03353658318519592, 0.01716507226228714, -0.048614244908094406, -0.007978739216923714, 0.015957478433847427, -0.008509217761456966, -0.03698684647679329, 0.07273159921169281, 0.026618799194693565, 0.01039392501115799, -0.04012658819556236, -0.05665336176753044, 0.0337090939283371, -0.020356567576527596, -0.02813691645860672, 0.00935884565114975, 0.03557223826646805, -0.01323176920413971, -0.022047197446227074, -0.03864297643303871, 0.06662462651729584, 0.007620774209499359, -0.035002946853637695, 0.04454293102025986, 0.022029945626854897, 0.04098915681242943, -0.04937330260872841, -0.028171420097351074, 0.010945967398583889, 0.014732634648680687, -0.014913773164153099, -0.028430189937353134, 0.0348476842045784, 0.00035823462530970573, 0.03912601247429848, 0.016181746497750282, -0.015370933338999748, 0.06462347507476807, -0.010143781080842018, 0.034882184118032455, -0.008345330134034157, -0.08639465272426605, 0.011273742653429508, 0.016302505508065224, -0.018734943121671677, -0.011368625797331333, 0.01782062277197838, -0.0026847380213439465, 0.05606681853532791, -0.036503810435533524, -0.005503173917531967, 0.012075929902493954, -0.04254177585244179, -0.01506903488188982, -0.02453138865530491, 0.06976436823606491, 0.03653831407427788, 0.025721730664372444, -0.05106393247842789, -0.01645776815712452, 0.05627383291721344, 0.006749582011252642, 0.010143781080842018, 0.05654985457658768, 0.025186939164996147, -0.01575046218931675, 0.03709035739302635, 0.022875260561704636, -0.00046335990191437304, -0.006719392258673906, -0.01864868588745594, -0.03878098726272583, 0.008668792434036732, -0.02104661986231804, -0.03633129596710205, -0.0792871043086052, -0.03096613474190235, -0.023599816486239433, -0.075629822909832, 0.0339333638548851, -0.001118101761676371, -0.03588276356458664, -0.01048880722373724, -0.008293576538562775, -0.03341582417488098, 0.041644707322120667, 0.01857968047261238, 0.010057524777948856, -0.0396435521543026, -0.004310675896704197, -0.007491389289498329, -0.014482489787042141, -0.06244980916380882, -0.05710189789533615, 0.06703866273164749, 0.00977287720888853, -0.018234653398394585, -0.018355414271354675, -0.01349053904414177, 0.00952273327857256, -0.05886153131723404, 0.04851073399186134, 0.014836142770946026, 0.08032218366861343, 0.005986210890114307, 0.02354806289076805, 0.022547485306859016, 0.035140953958034515, 0.06976436823606491, -0.00019326878827996552, -0.04323183000087738, 0.006244980730116367, -0.01994253508746624, -0.03194946050643921, 0.026360029354691505, -0.02993105538189411, -0.0064174942672252655, -0.047406651079654694, -0.040954653173685074, 0.021391646936535835, 0.025462960824370384, -0.05537676438689232, -0.002531632548198104, 0.04271429032087326, 0.03341582417488098, -0.04916628450155258, -0.06872928887605667, 0.011429005302488804, 0.06976436823606491, 0.002020561834797263, 0.008530781604349613, 0.04951131343841553, -0.008517843671143055, -0.043714866042137146, 0.07645788788795471, -0.024807410314679146, 0.005231465213000774, -0.04409439489245415, 0.0007148518925532699, 0.007607835810631514, -0.07997715473175049, 0.06631410866975784, -0.0337090939283371, 0.01438760757446289, 0.024738404899835587, 0.022047197446227074, 0.006244980730116367, 0.04102366045117378, -0.055790796875953674, 0.0045198481529951096, 0.0300173107534647, -0.03091438114643097, -0.027067333459854126, -0.024703901261091232, -0.0101955346763134, 0.03291553631424904, -0.04751015827059746, -0.006344175897538662, 0.004030341748148203, -0.03096613474190235, -0.04112716764211655, -0.031155899167060852, -0.007374942768365145, 0.06496850401163101, 0.00017399582429789007, 0.02052908018231392, 0.007694092579185963, 0.01390457060188055, -0.050442885607481, -0.002231890568509698, 0.024703901261091232, 0.036158785223960876, -0.07107546925544739, -0.0165095217525959, -0.007443948183208704, 0.0626223236322403, -0.01439623348414898, -0.02453138865530491, -0.11068452149629593, 0.018251905217766762, 0.014344479888677597, -0.01826915703713894, -0.007228306494653225, -0.012826362624764442, 0.05879252776503563, -0.029965557157993317, 0.027791889384388924, 0.0014350948622450233, -0.017259953543543816, -0.022668246179819107, 0.002919787308201194, -0.043335337191820145, 0.05064989998936653, -0.008241822011768818, 0.012964373454451561, -0.003993682563304901, -0.00031968866824172437, -0.0025337887927889824, -0.019597509875893593, 0.03878098726272583, -0.0051236446015536785, -0.043921880424022675, -0.049649324268102646, -0.036158785223960876, -0.016440516337752342, 0.03722836822271347, -0.0038880181964486837, 0.03571024909615517, -0.04054062068462372, 0.08315140008926392, -0.011782657355070114, 0.04626806080341339, 0.010678572580218315, 0.058896034955978394, -0.010695823468267918, 0.07355966418981552, -0.07735495269298553, 0.014672255143523216, 0.030310584232211113, 0.028171420097351074, 0.006322612054646015, -0.0356067419052124, -0.008815429173409939, -0.049856338649988174, 0.023220287635922432, -0.03936753049492836, -0.00677545927464962, 0.011730902828276157, 0.02879246696829796, 0.015974730253219604, -0.011239239946007729, -0.03815993666648865, -0.031397417187690735, -0.04092014953494072, 0.016630280762910843, 0.05723990872502327, -0.010307668708264828, 0.024186361581087112, 0.028568198904395103, 0.026239270344376564, -0.0330190435051918, -0.00502013647928834, 0.04902827367186546, 0.03070736490190029, 0.004237357527017593, 0.04923529177904129, -0.0190972201526165, 0.04661308974027634, 0.01820015162229538, -0.04357685521245003, 0.004826059099286795, -0.05948258191347122, 0.030948882922530174, 0.027464114129543304, -0.10267990827560425, 0.05717090144753456, 0.03657281771302223, 0.03284652903676033, -0.013464661315083504, 0.017337584868073463, -0.04157570004463196, 0.05644634738564491, -0.0007741533336229622, -0.009013819508254528, -0.018234653398394585, -0.003916051704436541, -0.001590356812812388, 0.009298466145992279, 0.0015245861141011119, -0.05213351547718048, -0.030759118497371674, -0.010868337005376816, -0.02349630929529667, -0.018890203908085823, 0.03774590790271759, -0.07618186622858047, 0.007612148765474558, -0.02768838219344616, 0.009246711619198322, -0.014344479888677597, 0.04478444904088974, 0.03467516973614693, 0.0013650113251060247, 0.034882184118032455, 0.08184029906988144, 0.05879252776503563, 0.02582523785531521, 0.02032206393778324, -0.03110414557158947, 0.015707334503531456, -0.02432437241077423, 0.023220287635922432, -0.012248443439602852, -0.024445131421089172, -0.024565892294049263, -0.011342748068273067, 0.041334182024002075, -0.015250174328684807, -0.0339333638548851, 0.023203035816550255, -0.0050589521415531635, 0.06055216118693352, -0.0433698408305645, 0.05071890354156494, -0.022495731711387634, -0.00738788116723299, 0.013240394182503223, -0.01345603633671999, 0.04602654278278351, -0.06976436823606491, 0.019131723791360855, -0.008517843671143055, -0.02975854091346264, -0.06883279979228973, -0.03327781334519386, -0.008099498227238655, 0.00738788116723299, 0.03709035739302635, -0.038194440305233, 0.03257050737738609, -0.02698107808828354, 0.02453138865530491, -0.040230099111795425, 0.049131784588098526, -0.03510645404458046, 0.02290976420044899, -0.08425548672676086, -0.05813697725534439, -0.02639453299343586, -0.07252458482980728, -0.02387583814561367, 0.02510068193078041, -0.0031375852413475513, 0.02303052321076393, -0.025066180154681206, -0.00445084273815155, 0.0006577068706974387, 0.027567623183131218, -0.029016735032200813, -0.01678554154932499, -0.007875231094658375, -0.030862625688314438, 0.005184024106711149, -0.02529044821858406, 0.0785970538854599, 0.030103567987680435, 0.0016539711505174637, -0.04499146342277527, -0.008293576538562775, -0.03224273398518562, -0.020563583821058273, 0.033139802515506744, 0.00891031138598919, -0.063760906457901, -0.012567592784762383, 0.014413484372198582, 0.03698684647679329, 0.007573333103209734, 0.07052343338727951, -0.03691784292459488, 0.02008054591715336, -0.010531935840845108, -0.0028960667550563812, -0.06434745341539383, 0.02368607372045517, 0.06541703641414642, -0.05161597579717636, 0.00426107831299305, 0.04788968712091446, -0.05975859984755516, -0.08211632072925568, -0.039712559431791306, -0.03922951966524124, 0.018165647983551025, 0.11613593995571136, 0.020149551331996918, -0.006119908764958382, -0.035779256373643875, -0.018148398026823997, -0.010023022070527077, 0.03327781334519386, 0.0437493696808815, -0.018165647983551025, 0.0013272740179672837, 0.031449172645807266, -0.012472710572183132, -0.017389338463544846, 0.008759361691772938, -0.008979316800832748, -0.029862049967050552, 0.058689020574092865, 0.0526510551571846, -0.06417494267225266, 0.0053392862901091576, 0.03660731762647629, -0.06690064817667007, -0.0007062262739054859, 0.03898800164461136, -0.012722854502499104, 0.043404340744018555, -0.001284145750105381, -0.0021984660997986794, -0.0037823538295924664, -0.0005444950656965375, 0.031966712325811386, 0.06131122261285782, -0.021391646936535835, -0.033519331365823746, -0.06244980916380882, -0.010281791910529137, -0.00004326309863245115, 0.037814911454916, -0.029724039137363434, 0.020943112671375275, 0.0006339863175526261, -0.008655853569507599, 0.018441669642925262, 0.00445084273815155, 0.056239329278469086, 0.02974129095673561, 0.0327947735786438, 0.017786119133234024, 0.0044982838444411755, -0.02303052321076393, -0.007771723438054323, 0.035399727523326874, 0.03750438615679741, 0.024358876049518585, -0.04692361131310463, 0.0356067419052124, 0.060690172016620636, 0.061207711696624756, 0.000609726645052433, 0.0339333638548851, 0.01851067505776882, -0.03246700018644333, 0.007167926989495754, 0.035399727523326874, 0.009470979683101177, -0.0017251328099519014, -0.020684342831373215, -0.04136868566274643, 0.038228943943977356, -0.016802793368697166, -0.022029945626854897, 0.040368109941482544, -0.007633712608367205, 0.008573910221457481 ]
715,568
pytorch_optimizer.optimizer.amos
Amos
An Adam-style Optimizer with Adaptive Weight Decay towards Model-Oriented Scale. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta: float. A float slightly < 1. We recommend setting `1 - beta` to the same order of magnitude as the learning rate. similarity with beta2 in Adam. :param momentum: float. Exponential decay rate for optional moving average of updates. :param extra_l2: float. Additional L2 regularization. :param c_coef: float. Coefficient for decay_factor_c. :param d_coef: float. Coefficient for decay_factor_d. :param eps: float. term added to the denominator to improve numerical stability.
class Amos(Optimizer, BaseOptimizer): r"""An Adam-style Optimizer with Adaptive Weight Decay towards Model-Oriented Scale. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta: float. A float slightly < 1. We recommend setting `1 - beta` to the same order of magnitude as the learning rate. similarity with beta2 in Adam. :param momentum: float. Exponential decay rate for optional moving average of updates. :param extra_l2: float. Additional L2 regularization. :param c_coef: float. Coefficient for decay_factor_c. :param d_coef: float. Coefficient for decay_factor_d. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, beta: float = 0.999, momentum: float = 0.0, extra_l2: float = 0.0, c_coef: float = 0.25, d_coef: float = 0.25, eps: float = 1e-18, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[)') self.validate_non_negative(extra_l2, 'extra_l2') self.validate_non_negative(eps, 'eps') self.c_coef = c_coef self.d_coef = d_coef defaults: DEFAULTS = { 'lr': lr, 'beta': beta, 'momentum': momentum, 'extra_l2': extra_l2, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'Amos' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['exp_avg_sq'] = torch.zeros((1,), dtype=p.dtype, device=p.device) state['decay'] = torch.zeros((1,), dtype=p.dtype, device=p.device) if group['momentum'] > 0.0: state['exp_avg'] = torch.zeros_like(p) @staticmethod def get_scale(p: torch.Tensor) -> float: r"""Get expected scale for model weights.""" if len(p.shape) == 1: # expected 'bias' return 0.5 if len(p.shape) == 2: # expected Embedding, Linear, ... return math.sqrt(2 / p.size(1)) return math.sqrt(1 / p.size(1)) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 momentum, beta = group['momentum'], group['beta'] lr_sq: float = math.sqrt(group['lr']) bias_correction: float = 1.0 - beta ** group['step'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg_sq'] = torch.zeros((1,), dtype=p.dtype, device=p.device) state['decay'] = torch.zeros((1,), dtype=p.dtype, device=p.device) if group['momentum'] > 0.0: state['exp_avg'] = torch.zeros_like(p) g2 = grad.pow(2).mean() init_lr: float = group['lr'] * self.get_scale(p) exp_avg_sq = state['exp_avg_sq'] exp_avg_sq.mul_(beta).add_(g2, alpha=1.0 - beta) r_v_hat = bias_correction / (exp_avg_sq + group['eps']) b = state['decay'] decay_factor_c = torch.rsqrt(1.0 + self.c_coef * lr_sq * b) decay_factor_d = torch.reciprocal(1.0 + self.d_coef * math.sqrt(init_lr) * b) gamma = decay_factor_c * (group['lr'] ** 2) * r_v_hat * g2 update = p.clone() update.mul_((gamma - group['extra_l2']) / 2.0) update.add_(r_v_hat.sqrt() * grad, alpha=init_lr) update.mul_(decay_factor_d) b.mul_(1.0 + gamma).add_(gamma) if momentum > 0.0: exp_avg = state['exp_avg'] exp_avg.mul_(momentum).add_(update, alpha=1.0 - momentum) update.copy_(exp_avg) p.add_(-update) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, beta: float = 0.999, momentum: float = 0.0, extra_l2: float = 0.0, c_coef: float = 0.25, d_coef: float = 0.25, eps: float = 1e-18)
[ -0.004527000710368156, -0.03451267629861832, -0.022285213693976402, 0.022264935076236725, 0.018523696810007095, -0.013768571428954601, -0.05917038396000862, -0.055723171681165695, -0.032951295375823975, 0.03556711971759796, -0.03842627629637718, 0.01632356457412243, 0.04323209822177887, 0.09181751310825348, -0.028368528932332993, 0.057385943830013275, 0.010194622911512852, 0.015968704596161842, 0.026624646037817, -0.017094116657972336, -0.016313424333930016, -0.07016091048717499, -0.018310779705643654, 0.04882874712347984, -0.0481393039226532, 0.006737272255122662, 0.02423187531530857, -0.005763941910117865, -0.053614288568496704, -0.017023146152496338, -0.0094088613986969, -0.054709285497665405, 0.021048272028565407, 0.030193524435162544, 0.04817986115813255, -0.052884291857481, 0.01876702904701233, -0.002841415349394083, -0.1064174696803093, -0.032302405685186386, 0.020551469177007675, -0.02004452608525753, 0.056655947118997574, -0.025874368846416473, 0.012480936013162136, 0.020713690668344498, -0.021271327510476112, 0.052519291639328, 0.00027644235524348915, -0.027618253603577614, 0.022528545930981636, -0.06253648549318314, 0.05693983659148216, 0.008547058328986168, -0.006549703422933817, 0.0506942979991436, 0.06797091662883759, -0.007061715703457594, 0.04866652563214302, -0.0763658881187439, 0.02173771522939205, -0.0861397534608841, 0.020348690450191498, -0.025955481454730034, -0.0074216453358531, -0.021778270602226257, -0.05568261817097664, -0.018523696810007095, -0.004037800710648298, 0.026624646037817, 0.01590787060558796, -0.04943707957863808, 0.006848799530416727, -0.018158698454499245, -0.04063655063509941, -0.013464405201375484, -0.050369855016469955, -0.02922019362449646, -0.020216885954141617, -0.05122151970863342, 0.01313996221870184, 0.015583427622914314, -0.01835133507847786, -0.015968704596161842, 0.03232268616557121, -0.07048535346984863, 0.012693852186203003, -0.02032841369509697, -0.0018287968123331666, -0.03228212893009186, 0.02727353200316429, -0.011781354434788227, 0.04651708900928497, 0.04412431642413139, 0.0378585010766983, 0.03441128879785538, -0.038852110505104065, -0.0601031593978405, 0.020713690668344498, -0.02388715371489525, -0.01013885997235775, 0.04546264559030533, 0.029240470379590988, 0.05243818089365959, 0.013109545223414898, -0.04980207979679108, -0.04339431971311569, -0.027537142857909203, 0.03197796270251274, -0.04550320282578468, -0.057467054575681686, 0.019882304593920708, -0.055439285933971405, -0.0327485166490078, -0.03270795941352844, 0.004848909564316273, -0.006630814168602228, 0.023562708869576454, -0.02488076128065586, 0.03944016247987747, 0.031085742637515068, 0.03795988857746124, -0.03901433199644089, 0.002775512868538499, 0.022913822904229164, -0.024961872026324272, 0.022244658321142197, 0.01082830224186182, -0.016526341438293457, -0.05625039339065552, -0.03927794098854065, 0.001823727390728891, -0.00910976529121399, 0.009256779216229916, 0.04720652848482132, -0.02561075985431671, 0.0015385719016194344, 0.04081904888153076, -0.033417683094739914, 0.028449639678001404, 0.02526603825390339, 0.039399608969688416, -0.0006793036009185016, -0.03161296248435974, -0.0009137646993622184, -0.005606789141893387, 0.060995377600193024, 0.005013666115701199, -0.019091472029685974, 0.0021583097986876965, -0.011010801419615746, 0.005393873434513807, 0.03321490436792374, 0.0003922471369151026, 0.03631739690899849, -0.028165752068161964, -0.03512100875377655, 0.012511353008449078, -0.027415476739406586, 0.01106149610131979, -0.04554375633597374, -0.015928149223327637, -0.025002427399158478, -0.024475207552313805, -0.003447212278842926, -0.002212806139141321, -0.022711046040058136, 0.014194403775036335, -0.033316291868686676, 0.028591584414243698, 0.01397134829312563, -0.06772758066654205, 0.017175227403640747, 0.007837338373064995, -0.03702711686491966, 0.11452855914831161, 0.01643509231507778, 0.009439278393983841, 0.0007895636954344809, -0.029605470597743988, 0.025468815118074417, -0.0024548713117837906, -0.027983251959085464, -0.03583072870969772, -0.02352215349674225, 0.04031210392713547, -0.00786268524825573, 0.006321578752249479, -0.04854486137628555, 0.019101612269878387, 0.02636103518307209, -0.030619356781244278, 0.028064362704753876, -0.03601323068141937, -0.05162707343697548, 0.02323826588690281, 0.031126299872994423, -0.0020252373069524765, 0.1049574762582779, 0.041609879583120346, -0.0054242899641394615, 0.002805929398164153, 0.024353541433811188, 0.0029833593871444464, 0.008273309096693993, -0.020602162927389145, -0.012683713808655739, 0.013930792920291424, -0.0240696519613266, 0.00921622384339571, -0.06634869426488876, 0.02903769351541996, 0.03218074142932892, 0.035344064235687256, 0.03647961840033531, -0.019142167642712593, 0.03808155655860901, 0.04757152870297432, 0.06436148285865784, 0.009231431409716606, -0.0004812789848074317, -0.03528323024511337, -0.01304871216416359, 0.01598898135125637, 0.06630814075469971, -0.01235926989465952, 0.04951819032430649, 0.0024219201877713203, -0.007710602600127459, -0.010838440619409084, 0.014214681461453438, -0.06038704887032509, -0.016901478171348572, -0.007239145692437887, 0.04655764251947403, 0.04258320853114128, -0.01580648124217987, 0.008942474611103535, -0.029909634962677956, -0.030071858316659927, -0.007913379929959774, -0.02433326281607151, -0.02469826117157936, 0.04085960239171982, -0.02295437827706337, -0.005089707672595978, 0.07125590741634369, 0.026523256674408913, -0.038203224539756775, 0.01811814121901989, -0.01064580213278532, -0.0183817520737648, -0.0021038134582340717, 0.05418206751346588, -0.06728146970272064, -0.006417897995561361, 0.028794361278414726, 0.0416504368185997, 0.0009549538372084498, -0.07344590127468109, -0.017560504376888275, -0.04343487322330475, -0.06837646663188934, 0.060508713126182556, 0.00564227532595396, 0.02627992443740368, 0.05430373176932335, -0.027050476521253586, 0.026502979919314384, 0.0376354455947876, 0.07198590040206909, 0.0757170021533966, -0.07725811004638672, 0.005921094212681055, 0.004630924202501774, 0.05077540874481201, -0.011690105311572552, -0.0040200576186180115, -0.00817698985338211, 0.008258101530373096, 0.04878819361329079, -0.02958519198000431, -0.04102182760834694, -0.011862466111779213, -0.007279701065272093, 0.023197710514068604, -0.031389910727739334, -0.008689003065228462, 0.057750944048166275, 0.03106546588242054, 0.0416504368185997, 0.015451622195541859, 0.07385145127773285, -0.0011862465180456638, 0.07101257145404816, -0.00041822795174084604, -0.0004461098287720233, 0.03666211664676666, -0.018868418410420418, -0.011477189138531685, 0.06322592496871948, -0.004423077683895826, 0.04193432256579399, 0.012805379927158356, -0.015421205200254917, -0.011862466111779213, 0.007122548762708902, 0.013241350650787354, 0.07028257846832275, -0.009246639907360077, 0.0023560174740850925, -0.001723606139421463, -0.04408376291394234, 0.02220410294830799, -0.002396572846919298, -0.07648755609989166, -0.006732202600687742, -0.034979064017534256, 0.026158258318901062, 0.05568261817097664, -0.03289046138525009, 0.04773375019431114, 0.012115937657654285, -0.018604807555675507, -0.02958519198000431, -0.060711491852998734, 0.042542655020952225, 0.04509764909744263, -0.017448976635932922, -0.041528768837451935, -0.041244879364967346, -0.03132907673716545, 0.015461760573089123, 0.00656998110935092, -0.04440820589661598, -0.05835927650332451, 0.017063701525330544, 0.029564915224909782, 0.020622439682483673, -0.025975758209824562, 0.0662270337343216, 0.054993174970149994, -0.04114349186420441, 0.04156932607293129, 0.005551025737076998, -0.04716597497463226, 0.07324311882257462, 0.006706855725497007, -0.007573727983981371, -0.0023420765064656734, -0.02173771522939205, 0.001576592680066824, -0.003203879576176405, 0.08719418942928314, 0.05430373176932335, 0.007274631876498461, -0.03972405195236206, -0.03463434427976608, 0.036276839673519135, -0.07068812847137451, -0.010726913809776306, 0.0394604429602623, -0.06286092847585678, 0.06269870698451996, 0.06261759996414185, 0.011223717592656612, -0.011031079106032848, -0.06359092891216278, 0.0474093072116375, -0.05134318396449089, 0.015015651471912861, -0.09384528547525406, -0.005348248407244682, 0.0071985903196036816, -0.03199823945760727, 0.0025068330578505993, -0.030903244391083717, -0.0000302581593132345, 0.06355037540197372, 0.03966321796178818, 0.06809258460998535, -0.017398282885551453, 0.005317831877619028, 0.022609656676650047, 0.05604761466383934, -0.015046067535877228, 0.033336568623781204, -0.01229843683540821, 0.03216046094894409, -0.056453172117471695, 0.02849019505083561, 0.025002427399158478, 0.004336897283792496, -0.009043863043189049, -0.07843422144651413, 0.05649372562766075, 0.03708794713020325, 0.04270487651228905, -0.09311528503894806, -0.03181574121117592, -0.014792595990002155, 0.0032925945706665516, 0.020886050537228584, -0.0012280694209039211, -0.022001326084136963, -0.0840308666229248, 0.039947107434272766, 0.08228698372840881, -0.013555655255913734, 0.12450519949197769, -0.021129382774233818, 0.012176770716905594, -0.03911571949720383, 0.023177433758974075, -0.02386687509715557, -0.0409204363822937, 0.010676219128072262, -0.03412740305066109, -0.005708178039640188, 0.028591584414243698, 0.0334785133600235, 0.029544636607170105, 0.04424598440527916, 0.036276839673519135, 0.041974879801273346, -0.027861585840582848, -0.07514923065900803, -0.0052772765047848225, -0.05118096247315407, -0.04306987673044205, 0.006747411098331213, -0.005870399530977011, -0.025489093735814095, -0.037473224103450775, -0.013535377569496632, 0.010098304599523544, 0.011183162219822407, 0.01718536764383316, 0.01939563825726509, -0.01160899456590414, 0.017013005912303925, -0.04205599054694176, 0.0037488434463739395, 0.017073839902877808, 0.007046507205814123, -0.027131589129567146, 0.0387304425239563, -0.010022263042628765, -0.058318719267845154, 0.0048641180619597435, 0.02589464746415615, 0.00725942337885499, 0.05049151927232742, 0.0007135222549550235, 0.038203224539756775, -0.01668856292963028, -0.0014422527747228742, -0.007664978038519621, -0.0036347811110317707, -0.023643821477890015, 0.004293806850910187, 0.02885519526898861, -0.024840205907821655, 0.003416795749217272, -0.010554553009569645, 0.08459864556789398, 0.07936698943376541, -0.0016386931529268622, -0.002909852657467127, 0.0342085137963295, 0.009768791496753693, -0.02032841369509697, 0.013271767646074295, -0.024353541433811188, -0.04550320282578468, -0.01939563825726509, -0.015836898237466812, -0.0006447681225836277, 0.011730660684406757, -0.005829844158142805, 0.06464537233114243, -0.06423981487751007, 0.02490103989839554, 0.04266432300209999, 0.019121889024972916, 0.042258765548467636, 0.01871633529663086, 0.015279261395335197, 0.02303548902273178, 0.0363985076546669, -0.05823760852217674, -0.024130485951900482, 0.07036368548870087, 0.012409964576363564, -0.08524753153324127, -0.06606481224298477, 0.020541328936815262, 0.006823452655225992, 0.08354420214891434, -0.02433326281607151, 0.038568221032619476, -0.014214681461453438, -0.0695120245218277, -0.018685918301343918, 0.028145473450422287, -0.01824994757771492, -0.09206084161996841, 0.022264935076236725, -0.051667626947164536, 0.026604367420077324, -0.02370465360581875, -0.008754905313253403, 0.023542432114481926, 0.003982037305831909, -0.0071985903196036816, -0.019892442971467972, -0.011690105311572552, 0.065213143825531, 0.05085651949048042, -0.05454706400632858, 0.019294248893857002, 0.029179638251662254, -0.03579017519950867, -0.02709103375673294, 0.00889177992939949, 0.04598986729979515, -0.027232976630330086, -0.00865858606994152, 0.04473264887928963, 0.011963854543864727, 0.008481156080961227, -0.005571303423494101, 0.003997245337814093, 0.07900199294090271, -0.011973992921411991, -0.012643157504498959, -0.00266145053319633, -0.043191540986299515, -0.08265198022127151, -0.02542825974524021, -0.0015829293988645077, 0.013586072251200676, 0.010676219128072262, -0.0383654460310936, -0.0305990781635046, 0.053411513566970825, 0.00010455698793521151, 0.04130571335554123, -0.04037293791770935, -0.01245051994919777, -0.0353035107254982, 0.0035080453380942345, -0.010889135301113129, 0.043921541422605515, 0.03293101489543915, -0.006864008028060198, -0.029057972133159637, -0.006149218417704105, -0.0028287419117987156, 0.008536919951438904, -0.034593790769577026, -0.039602383971214294, 0.021433549001812935, -0.021230772137641907, 0.014549263752996922, 0.04396209493279457, 0.006088385358452797, 0.01220718678086996, -0.02690853364765644, 0.025691870599985123, -0.012166631408035755, -0.05320873484015465, -0.00841018371284008, -0.0188177227973938, -0.05568261817097664, 0.01871633529663086, 0.01572537049651146, -0.0242521520704031, 0.0028008599765598774, -0.01245051994919777, 0.07247256487607956, -0.04801763966679573, -0.014539124444127083, -0.022427156567573547, 0.03171435371041298, 0.014549263752996922, -0.06306370347738266, 0.04554375633597374, 0.004058078397065401, 0.029281025752425194, -0.029463525861501694, 0.04785541817545891, -0.04619264602661133, -0.051951516419649124, -0.020713690668344498, 0.00995635986328125, -0.04505709186196327, 0.020967161282896996, 0.039054885506629944, 0.03098435513675213, -0.045665424317121506, -0.006118801888078451, 0.05381706729531288, -0.01778355985879898, -0.01999383047223091, -0.032302405685186386, 0.019567998126149178, 0.014995373785495758, 0.03512100875377655, -0.0423804335296154, -0.04736875370144844, -0.019020501524209976, -0.03686489537358284, -0.03136963024735451, -0.01663786917924881, -0.039217110723257065, -0.0210077166557312, 0.028875472024083138, 0.10998634994029999, 0.00019992563466075808, -0.022285213693976402, 0.002608221722766757, -0.018462862819433212, 0.016242453828454018, -0.018189113587141037, -0.028591584414243698, 0.03177518770098686, -0.08662641793489456, -0.01731717213988304, -0.052316516637802124, 0.01299801841378212, 0.016627728939056396, 0.00948997214436531, -0.02997046895325184, 0.02709103375673294, -0.00032634453964419663, 0.0322415716946125, 0.023907430469989777, -0.01923341676592827, -0.021616049110889435, 0.03199823945760727, 0.020389245823025703, -0.008121226914227009, -0.005163214169442654, -0.01934494450688362, 0.005535817239433527, -0.0031962755601853132, 0.01235926989465952, 0.04736875370144844, 0.03643906116485596, -0.004232973791658878, 0.020115496590733528, -0.04461098089814186, -0.0034066569060087204, -0.0014194403775036335, 0.013058851473033428, 0.0367635041475296, 0.04177210107445717, 0.031085742637515068, -0.04221821203827858, -0.011243995279073715, -0.00895768217742443, -0.0024206526577472687, 0.019202999770641327, -0.017063701525330544, -0.017094116657972336, -0.020987439900636673, 0.010554553009569645, 0.013383294455707073, 0.03013269044458866, -0.07904254645109177, -0.044570427387952805, -0.053249292075634, 0.006042760331183672, 0.0000907744761207141, 0.004423077683895826, 0.0427454337477684, -0.054628174751996994, -0.025489093735814095, -0.019101612269878387, 0.038304612040519714, 0.03643906116485596, -0.002902248641476035, -0.0007306315819732845, 0.03879127651453018, -0.026056868955492973, -0.015613843686878681, 0.022994933649897575, 0.01359621062874794, -0.02102799527347088, -0.04282654449343681, -0.016982588917016983, -0.0012743278639391065, -0.024556318297982216, 0.055439285933971405, -0.07835310697555542, -0.057750944048166275, -0.02617853507399559, -0.001937789493240416, -0.05957593768835068, 0.0021126847714185715, 0.004937624558806419, -0.05620983615517616, -0.0025233086198568344, 0.032403796911239624, 0.05426317825913429, -0.005454706493765116, -0.0015398393152281642, 0.006838660687208176, -0.03098435513675213, 0.020186468958854675, 0.04728764295578003, 0.009261848405003548, -0.014792595990002155, 0.0746220052242279, 0.010939829051494598, 0.03451267629861832, -0.022528545930981636, -0.03818294405937195, 0.07267534732818604, -0.02986907958984375, 0.008744766004383564, 0.012278159148991108, -0.004392661154270172, -0.047895971685647964, -0.06436148285865784, -0.013200795277953148, -0.021251048892736435, 0.05401984229683876, -0.02794269658625126, 0.019172582775354385, 0.020490635186433792, 0.02042980119585991, -0.002694401890039444, -0.01978091523051262, -0.00509477686136961, 0.020439941436052322, -0.01671897992491722, 0.004344501532614231, 0.03447212278842926, -0.0014954818179830909, 0.03879127651453018, -0.012166631408035755, -0.01475204061716795, -0.008587613701820374, 0.038122113794088364, -0.024171041324734688, -0.02323826588690281, 0.04331320896744728, -0.025286315008997917, 0.053979288786649704, -0.009535597637295723, 0.015471899881958961, 0.039825439453125, 0.05669650435447693, -0.060427602380514145, 0.008770113810896873, -0.05020763352513313, -0.06221204251050949, -0.09327750653028488, 0.0126735744997859, -0.0637531504034996, 0.06995812803506851, 0.02477937377989292, -0.004184814170002937, 0.006767688784748316, 0.03173463046550751, 0.017976198345422745 ]
715,570
pytorch_optimizer.optimizer.amos
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, beta: float = 0.999, momentum: float = 0.0, extra_l2: float = 0.0, c_coef: float = 0.25, d_coef: float = 0.25, eps: float = 1e-18, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[)') self.validate_non_negative(extra_l2, 'extra_l2') self.validate_non_negative(eps, 'eps') self.c_coef = c_coef self.d_coef = d_coef defaults: DEFAULTS = { 'lr': lr, 'beta': beta, 'momentum': momentum, 'extra_l2': extra_l2, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, beta: float = 0.999, momentum: float = 0.0, extra_l2: float = 0.0, c_coef: float = 0.25, d_coef: float = 0.25, eps: float = 1e-18)
[ 0.0039574624970555305, -0.001465122913941741, -0.02590169757604599, 0.023702848702669144, -0.02823098562657833, -0.02428051084280014, -0.06663630902767181, -0.041442714631557465, -0.055642060935497284, 0.008823348209261894, -0.016519319266080856, 0.03508841246366501, 0.0008280623587779701, 0.06428838521242142, -0.03356039896607399, 0.025473108515143394, 0.01365895289927721, 0.006694377399981022, -0.03492070361971855, -0.019994620233774185, -0.015811216086149216, 0.012503624893724918, -0.020199596881866455, 0.11747071892023087, -0.0010382806649431586, 0.02210029773414135, -0.006969233509153128, 0.006093421019613743, -0.02295747585594654, -0.006941282190382481, 0.01614663377404213, 0.012438405305147171, -0.022845668718218803, 0.06682264804840088, -0.005096484906971455, -0.005618245806545019, -0.008124561049044132, -0.0076214345172047615, -0.09824010729789734, 0.05251149833202362, 0.01773986779153347, -0.021261753514409065, 0.04617583006620407, -0.030690716579556465, 0.015578286722302437, -0.006480082869529724, 0.01868090033531189, 0.029013628140091896, -0.004362758714705706, -0.0444987416267395, 0.01951012760400772, -0.008692908100783825, 0.01838275045156479, -0.06522010266780853, -0.035405196249485016, 0.04882190376520157, 0.07886041700839996, 0.04759204015135765, 0.036169204860925674, 0.016668394207954407, -0.018364116549491882, -0.02392645925283432, -0.011627811938524246, -0.0020602564327418804, -0.01888587698340416, -0.028771381825208664, -0.05914531275629997, -0.03492070361971855, 0.011348297819495201, 0.058921702206134796, 0.09279888868331909, -0.025938965380191803, 0.0018075285479426384, -0.0048868488520383835, 0.02336743101477623, -0.012484990991652012, -0.07233840972185135, -0.05027538165450096, -0.04352976009249687, 0.0017108629690483212, 0.019174709916114807, 0.03091432712972164, -0.009596671909093857, -0.02483954094350338, 0.018038015812635422, -0.04338068515062332, -0.04815106838941574, -0.05992795526981354, 0.012708602473139763, 0.05519483983516693, -0.05176612362265587, -0.02245434932410717, -0.02336743101477623, -0.019547395408153534, 0.04606402665376663, 0.008571784943342209, 0.023740116506814957, -0.015466480515897274, 0.024299146607518196, -0.012484990991652012, -0.01965920254588127, 0.000528166361618787, -0.06935691833496094, 0.003468311857432127, 0.025007249787449837, -0.04926912859082222, -0.05780364200472832, -0.02336743101477623, 0.0506853349506855, -0.03411943092942238, -0.033429961651563644, 0.054822154343128204, -0.033429961651563644, 0.02934904582798481, -0.06827612966299057, 0.03762267902493477, 0.003021088195964694, 0.014674522913992405, -0.00957803800702095, -0.007290675304830074, 0.015475798398256302, 0.03205101937055588, -0.04408878833055496, 0.05765456706285477, 0.026702972128987312, -0.02148536406457424, 0.005702100228518248, 0.011776886880397797, 0.0032819686457514763, -0.04897097870707512, 0.026088040322065353, -0.01224274467676878, 0.0037268628366291523, -0.027094293385744095, 0.03842395544052124, -0.04766657575964928, 0.007523604203015566, 0.018215041607618332, -0.03777175396680832, 0.01490745134651661, 0.0633566677570343, 0.03739906847476959, 0.031063402071595192, -0.022230736911296844, -0.014627937227487564, 0.026572532951831818, -0.008036048151552677, -0.009331133216619492, -0.02849186584353447, 0.03508841246366501, -0.009349767118692398, 0.012997434474527836, 0.018587728962302208, -0.00470749381929636, 0.018485240638256073, -0.04844921827316284, 0.027057023718953133, -0.05683466047048569, 0.013714855536818504, 0.012345233000814915, -0.01965920254588127, 0.011543957516551018, 0.009857552126049995, -0.03408215939998627, -0.008520539849996567, 0.014870182611048222, -0.04602675512433052, -0.04054826870560646, -0.03173423558473587, -0.006657108664512634, -0.012913580052554607, -0.07699698954820633, 0.008832665160298347, 0.02210029773414135, -0.027895567938685417, 0.0503871850669384, 0.023032013326883316, -0.012783139944076538, -0.021280387416481972, -0.002302502514794469, 0.08005301654338837, 0.015531701035797596, -0.013584415428340435, -0.03056027553975582, 0.02245434932410717, 0.011096734553575516, -0.055232107639312744, 0.030373932793736458, -0.031212477013468742, 0.02260342426598072, 0.07554350793361664, 0.007584165781736374, 0.004167098551988602, 0.033784013241529465, -0.0254917424172163, 0.029982611536979675, 0.07640068978071213, 0.002969843801110983, 0.043567027896642685, 0.052846916019916534, 0.07237567752599716, 0.038647569715976715, 0.007980145514011383, -0.01730196177959442, 0.0033797987271100283, 0.005427244119346142, -0.018047332763671875, 0.005105802323669195, -0.033075906336307526, -0.036374181509017944, 0.004465247504413128, -0.01241977047175169, 0.025678085163235664, 0.022491617128252983, 0.0008175805560313165, -0.021317655220627785, -0.00978301465511322, 0.01564350724220276, 0.023796020075678825, -0.00864632148295641, 0.10465031117200851, -0.016426147893071175, -0.0035521662794053555, -0.02437368407845497, 0.022789767012000084, 0.013416706584393978, 0.033485863357782364, -0.048896439373493195, -0.0707358568906784, 0.04550499469041824, -0.018131187185645103, -0.06823886185884476, 0.004302197135984898, -0.0029372337739914656, 0.02463456429541111, 0.03016895428299904, -0.02316245250403881, 0.04379063844680786, -0.08862479776144028, -0.031007498502731323, 0.01292289700359106, 0.021317655220627785, 0.011553274467587471, -0.009652574546635151, 0.023330161347985268, 0.005949005018919706, 0.03492070361971855, 0.04945547133684158, -0.032721854746341705, -0.009661892428994179, -0.04181540012359619, -0.005273511167615652, 0.008529857732355595, 0.07107127457857132, -0.043827906250953674, 0.008702225051820278, 0.05866082012653351, 0.0007372200489044189, 0.02808191254734993, 0.00020293933630455285, -0.030001245439052582, -0.00675493897870183, -0.00039859962998889387, 0.07804051041603088, 0.003654654836282134, -0.0037012407556176186, 0.003983084578067064, -0.0065918886102736, 0.03309454396367073, 0.002457400318235159, 0.12753324210643768, 0.03674686700105667, -0.004043646156787872, 0.008446003310382366, 0.006396228447556496, -0.043716102838516235, -0.00838544126600027, -0.05415131896734238, 0.021727610379457474, 0.03736180067062378, 0.026125308126211166, -0.027243368327617645, 0.018187090754508972, -0.006200568284839392, -0.0021301349624991417, -0.013901198282837868, -0.02823098562657833, -0.005669489968568087, -0.024522757157683372, 0.0057812961749732494, -0.031603798270225525, -0.013901198282837868, 0.0763261541724205, 0.04192720726132393, 0.11508552730083466, -0.007043770980089903, 0.026647070422768593, -0.009643257595598698, 0.05079714208841324, -0.0015955631388351321, 0.034548018127679825, -0.03898298740386963, 0.029535388574004173, -0.012186842039227486, -0.051430705934762955, -0.046660322695970535, 0.052027005702257156, 0.015363992191851139, 0.012345233000814915, 0.048076532781124115, 0.03458528593182564, 0.0562756285071373, 0.021317655220627785, 0.04408878833055496, 0.016137316823005676, -0.05169158801436424, -0.0033658230677247047, -0.05936892703175545, 0.04535591974854469, 0.029684463515877724, 0.018699534237384796, 0.020367305725812912, 0.013090605847537518, -0.01850387454032898, -0.04755476862192154, -0.05884716659784317, 0.028659574687480927, 0.03579651936888695, -0.0031864678021520376, -0.019025634974241257, -0.025007249787449837, -0.034492116421461105, 0.0021534280385822058, -0.03769721835851669, -0.0031049426179379225, -0.046213097870349884, -0.000759930640924722, 0.03493934124708176, 0.02109404467046261, -0.02148536406457424, 0.08459978550672531, -0.006922647822648287, -0.03141745552420616, 0.027690591290593147, -0.011078099720180035, -0.058772627264261246, 0.053704094141721725, -0.03954201564192772, 0.018718168139457703, -0.00345899467356503, -0.029926709830760956, 0.026293016970157623, -0.003915535286068916, 0.07300924509763718, 0.020236864686012268, -0.01691064052283764, -0.025510376319289207, -0.008390099741518497, 0.03620647266507149, -0.04241169989109039, -0.013314217329025269, 0.016892006620764732, -0.0235724076628685, 0.043827906250953674, 0.034436214715242386, -0.021876685321331024, -0.018289579078555107, -0.03268458694219589, 0.024000996723771095, -0.008641663007438183, 0.00690867193043232, -0.06514555960893631, -0.01336080301553011, -0.010248872451484203, 0.018075285479426384, -0.02042320929467678, -0.03816307708621025, 0.010146384127438068, 0.026497995480895042, -0.010929025709629059, -0.001665441901423037, -0.019640566781163216, 0.036970481276512146, -0.006559278815984726, -0.006726987659931183, -0.005972297862172127, 0.002653060480952263, 0.020143693313002586, 0.038647569715976715, 0.01720878854393959, -0.01676156558096409, 0.016286389902234077, 0.011646446771919727, -0.007970827631652355, -0.05515757203102112, 0.03980289399623871, 0.03894571587443352, 0.019808275625109673, -0.05064806714653969, -0.040324658155441284, -0.01641683094203472, -0.04561680182814598, 0.006205226760357618, 0.033784013241529465, 0.01069609634578228, -0.012475673109292984, 0.023535139858722687, 0.026553897187113762, -0.00011741073831217363, 0.08020208775997162, -0.006573254242539406, -0.026293016970157623, -0.001406890689395368, 0.0037105579394847155, -0.034343041479587555, -0.03538656234741211, 0.033131811767816544, -0.04345522075891495, 0.02823098562657833, 0.011665080673992634, 0.02148536406457424, -0.00799877941608429, 0.07502175122499466, 0.04572860896587372, 0.044685084372758865, 0.044983234256505966, -0.003931840416043997, 0.007928900420665741, -0.0051430705934762955, -0.0686488151550293, -0.0654064416885376, 0.02483954094350338, -0.04856102168560028, -0.031957849860191345, 0.010463167913258076, -0.008329538628458977, -0.0006772408378310502, 0.02200712449848652, 0.009256595745682716, 0.0035638127010315657, 0.01492608617991209, -0.046399444341659546, 0.020907700061798096, -0.012484990991652012, -0.05042445659637451, -0.015326723456382751, 0.005949005018919706, 0.007733240257948637, -0.04673486202955246, -0.010071846656501293, 0.046809397637844086, 0.023851921781897545, 0.04062280431389809, -0.01594165526330471, -0.007001843769103289, -0.03046710416674614, -0.017749184742569923, -0.028510501608252525, 0.057617299258708954, -0.03797673434019089, 0.025324033573269844, 0.00362437404692173, 0.01697586104273796, -0.01761874370276928, -0.04516957700252533, 0.051169827580451965, 0.054524004459381104, -0.0185597762465477, -0.013146508485078812, 0.014357739128172398, 0.008394758217036724, 0.020087791606783867, 0.023292893543839455, -0.03680277243256569, -0.05351775139570236, 0.028957724571228027, -0.02418733946979046, -0.026889314875006676, 0.010686779394745827, -0.028808649629354477, 0.016780199483036995, -0.05962980538606644, 0.026032136753201485, 0.0766243040561676, 0.021858051419258118, 0.0035638127010315657, -0.034641191363334656, 0.010807902552187443, 0.01115263719111681, 0.03395172208547592, -0.08914656192064285, 0.01246635615825653, 0.021708976477384567, 0.015354675240814686, -0.02767195738852024, -0.025286763906478882, 0.017041079699993134, 0.012540893629193306, 0.04692120477557182, 0.020553648471832275, 0.007612117566168308, -0.03082115575671196, -0.014385690912604332, -0.028268255293369293, 0.026702972128987312, -0.053107794374227524, -0.1054702177643776, 0.027616053819656372, -0.023907825350761414, -0.0026973169296979904, -0.035964228212833405, 0.01679883524775505, 0.003861961653456092, 0.02539857104420662, -0.06443745642900467, -0.018159139901399612, -0.05802725628018379, 0.08415256440639496, -0.002408485161140561, -0.02849186584353447, 0.036728233098983765, 0.05042445659637451, 0.05336867645382881, -0.06290944665670395, 0.009219327010214329, 0.05079714208841324, -0.021634439006447792, -0.05813905969262123, 0.0509834848344326, 0.03031802922487259, -0.019677836447954178, -0.036467354744672775, -0.047107547521591187, 0.031603798270225525, -0.04598948732018471, 0.02174624428153038, 0.03503251075744629, -0.028808649629354477, -0.03715682402253151, -0.036430083215236664, 0.03169696778059006, 0.03255414590239525, 0.08064931631088257, -0.014255250804126263, -0.03361630439758301, -0.00360573991201818, -0.024112801998853683, 0.06700899451971054, -0.06823886185884476, 0.005627562757581472, 0.03592695668339729, -0.05020084232091904, -0.07464906573295593, -0.0070158191956579685, 0.01401300448924303, 0.0023199720308184624, 0.020609552040696144, -0.020814528688788414, 0.05090894550085068, 0.026628434658050537, -0.014208665117621422, 0.00548780569806695, 0.0012659687781706452, 0.008883909322321415, -0.012000498361885548, 0.02469046600162983, -0.0010848664678633213, -0.037585411220788956, -0.09384240955114365, 0.00391087681055069, 0.010202286764979362, -0.018550459295511246, -0.02265932597219944, 0.013798709958791733, -0.04315707087516785, 0.032926835119724274, 0.01971510425209999, 0.03410079702734947, -0.046399444341659546, -0.021839415654540062, 0.016342293471097946, -0.018084602430462837, -0.05463581159710884, -0.10487391799688339, 0.02737380750477314, -0.0006923812325112522, -0.058325402438640594, 0.00925193727016449, -0.005534391384571791, 0.0050079720094799995, 0.026274383068084717, 0.05034991726279259, -0.043007995933294296, -0.06268583238124847, -0.04170359671115875, 0.030783887952566147, -0.040958222001791, -0.01224274467676878, 0.041889939457178116, 0.04699574038386345, -0.08735766261816025, -0.009540769271552563, 0.01705971546471119, 0.008348172530531883, -0.02068408951163292, -0.039765626192092896, 0.0024131436366587877, 0.04263531044125557, 0.02148536406457424, -0.06999048590660095, 0.005450536962598562, -0.027057023718953133, -0.0251935925334692, -0.04237443208694458, 0.011115368455648422, -0.042858924716711044, -0.04617583006620407, 0.010919707827270031, 0.09794195741415024, 0.0009742252295836806, -0.018969731405377388, -0.02510042116045952, -0.0019251576159149408, 0.04248623549938202, -0.07833866029977798, 0.008543833158910275, -0.014124810695648193, -0.10807902365922928, 0.013985052704811096, -0.020460477098822594, 0.018792705610394478, 0.007062405347824097, -0.03395172208547592, -0.04606402665376663, 0.017749184742569923, -0.0003138717438559979, 0.022845668718218803, -0.007239431142807007, 0.03998924046754837, 0.029069529846310616, 0.002811452141031623, 0.05936892703175545, -0.013873247429728508, -0.010155701078474522, -0.02905089594423771, 0.005115119274705648, -0.04051100090146065, 0.005110460799187422, 0.09667482227087021, 0.03279639407992363, -0.017096983268857002, 0.05307052657008171, -0.02964719384908676, 0.018373433500528336, -0.03523748740553856, -0.006307715550065041, 0.0315292589366436, 0.023125184699892998, 0.061977729201316833, -0.012531576678156853, -0.0216530729085207, -0.015261503867805004, 0.06756802648305893, 0.012950848788022995, 0.013016068376600742, 0.0009823777945712209, -0.04110729694366455, -0.015224235132336617, -0.0031468698289245367, -0.01947285793721676, -0.02817508392035961, -0.03670959919691086, -0.015578286722302437, 0.041889939457178116, 0.0012368526076897979, 0.005883784964680672, -0.04453601315617561, -0.052548766136169434, 0.042560774832963943, 0.01838275045156479, 0.062014997005462646, 0.05124436318874359, 0.008133878000080585, -0.04915732145309448, 0.011106051504611969, -0.011273760348558426, -0.038088537752628326, 0.04021285101771355, -0.002974502509459853, -0.02696385234594345, -0.045095041394233704, 0.010099798440933228, 0.0021569218952208757, -0.0063543012365698814, 0.028603672981262207, -0.014693156816065311, -0.07751874625682831, -0.06410203874111176, 0.020348671823740005, -0.01800074800848961, -0.033224981278181076, 0.01100356224924326, -0.06969233602285385, 0.10904800891876221, 0.0009346273145638406, 0.0380140021443367, 0.013444657437503338, -0.021149946376681328, 0.005268852226436138, -0.07982940226793289, 0.05001449957489967, 0.04956727474927902, 0.03605739772319794, -0.08549423515796661, 0.011693032458424568, 0.030448470264673233, 0.046809397637844086, -0.035200219601392746, -0.013081288896501064, 0.012988117523491383, -0.015121745876967907, -0.028752747923135757, 0.012335916049778461, 0.009531451389193535, 0.011851424351334572, -0.045542266219854355, -0.03663506358861923, -0.0023129843175411224, 0.0344734825193882, -0.027970105409622192, 0.018643630668520927, 0.028007375076413155, -0.028603672981262207, -0.007570190355181694, 0.014059590175747871, -0.054561272263526917, 0.009550086222589016, 0.021764880046248436, 0.045542266219854355, 0.06164231151342392, -0.008832665160298347, 0.026647070422768593, -0.03754814341664314, 0.015326723456382751, -0.022696595638990402, 0.08124560862779617, -0.019808275625109673, -0.019044268876314163, 0.07509628683328629, 0.008767444640398026, -0.0038782667834311724, -0.055381182581186295, 0.008576443418860435, 0.029274508357048035, 0.010835853405296803, -0.043827906250953674, 0.0043744053691625595, -0.03046710416674614, -0.05571660026907921, -0.06026337295770645, -0.003882925258949399, -0.05605201795697212, 0.08713405579328537, 0.03719409182667732, 0.0009532616240903735, 0.0418526716530323, 0.033075906336307526, 0.013025385327637196 ]
715,573
pytorch_optimizer.optimizer.amos
__str__
null
def __str__(self) -> str: return 'Amos'
(self) -> str
[ 0.004491108935326338, -0.028111495077610016, 0.030234094709157944, -0.008671593852341175, 0.023037966340780258, -0.08096939325332642, 0.006743134930729866, 0.01547081395983696, 0.08939076215028763, -0.017774609848856926, -0.044626351445913315, 0.0026618773117661476, -0.0022671257611364126, 0.024849940091371536, 0.029578331857919693, 0.0034341237042099237, -0.006031287834048271, -0.0725480243563652, 0.038068730384111404, 0.032166868448257446, 0.026765456423163414, 0.05584333837032318, 0.025988897308707237, -0.027973439544439316, -0.018499400466680527, 0.06367797404527664, -0.01004351768642664, -0.0045471941120922565, -0.038206782191991806, -0.019931722432374954, -0.009232442826032639, -0.05967437103390694, 0.029405763372778893, 0.01987995207309723, -0.008106430061161518, 0.022416718304157257, -0.016920393332839012, 0.01970738358795643, -0.06015756353735924, -0.023296819999814034, -0.002101027872413397, 0.019327731803059578, -0.010216087102890015, -0.02514330856502056, -0.029405763372778893, -0.02723139338195324, 0.00014344800729304552, 0.05290966480970383, 0.0032572404015809298, -0.00990546215325594, -0.00294014485552907, 0.007334183901548386, -0.03183898702263832, 0.013192902319133282, -0.018637455999851227, 0.024263206869363785, 0.029129652306437492, -0.0007932782755233347, -0.006721563637256622, 0.04020858556032181, -0.03251200541853905, -0.03225315362215042, 0.052530013024806976, -0.0735834389925003, 0.0008989768102765083, 0.017541641369462013, 0.005604179576039314, 0.05263355374336243, 0.0370333157479763, 0.052426472306251526, 0.024918967857956886, -0.03159739077091217, 0.0011195415863767266, 0.026144208386540413, 0.01375375222414732, -0.018861794844269753, -0.07744897902011871, 0.01706707663834095, 0.023641956970095634, -0.05653361603617668, 0.011933148838579655, 0.0009388834005221725, -0.0360669270157814, 0.0026381490752100945, -0.028680972754955292, -0.09387755393981934, -0.02167467027902603, -0.031165966764092445, -0.034496549516916275, 0.015686525031924248, -0.02164015732705593, 0.02293442375957966, -0.026558374986052513, 0.0723409354686737, -0.07517106831073761, -0.012916792184114456, 0.0037663192488253117, -0.04752551019191742, 0.04348739609122276, 0.026799971237778664, -0.008870048448443413, 0.03975990414619446, -0.0025712784845381975, 0.03637755289673805, -0.05021758750081062, -0.03101065568625927, -0.034979742020368576, 0.027662815526127815, 0.009094388224184513, 0.016592511907219887, -0.045592740178108215, 0.01578143797814846, 0.005815576296299696, -0.014694252982735634, 0.022554771974682808, -0.07758703827857971, -0.007985631935298443, -0.0008272528066299856, 0.020414916798472404, -0.0359288714826107, 0.009568952955305576, 0.002456951653584838, -0.038137756288051605, -0.006121886428445578, 0.058086737990379333, 0.06412665545940399, -0.04013955593109131, -0.027559274807572365, 0.0019381659803912044, -0.052046820521354675, 0.028353091329336166, 0.01654074154794216, -0.04876800999045372, -0.014573454856872559, 0.08545618504285812, -0.0035333510022610426, 0.044005103409290314, 0.018257804214954376, 0.03209783881902695, 0.1301170438528061, -0.03416866809129715, 0.003224883694201708, 0.016661539673805237, 0.011527611874043941, -0.01189863495528698, -0.0011173845268785954, 0.00594931747764349, 0.04124400019645691, -0.031925272196531296, -0.007273784838616848, 0.018637455999851227, 0.028111495077610016, 0.044660866260528564, -0.02521233633160591, -0.027386706322431564, -0.02438400499522686, -0.018326831981539726, -0.029146909713745117, 0.04100240394473076, -0.01994897983968258, 0.001513214665465057, -0.014003977179527283, -0.00273521919734776, -0.015255102887749672, -0.007640494033694267, 0.03478991612792015, -0.021847238764166832, 0.004456595052033663, 0.01674782484769821, -0.009146158583462238, -0.02983718551695347, -0.05328931659460068, -0.08297119289636612, 0.01415066048502922, 0.014176545664668083, 0.022917168214917183, -0.0019165948033332825, 0.09180672466754913, 0.038517408072948456, -0.02657563053071499, -0.02455657348036766, 0.0002139586431439966, -0.04269357770681381, 0.044591836631298065, 0.05708583444356918, -0.04041566699743271, 0.02486719749867916, 0.04127851128578186, 0.027214135974645615, -0.02771458588540554, 0.0006697835633531213, 0.027731843292713165, -0.044488295912742615, -0.011648409999907017, 0.0003367792523931712, -0.051667168736457825, 0.02029411867260933, -0.09153061360120773, 0.006523109506815672, 0.015427671372890472, -0.03280537202954292, 0.0343412384390831, -0.03644657880067825, 0.04617947340011597, 0.0684753954410553, -0.00714435800909996, 0.03975990414619446, 0.004130871035158634, -0.0029142594430595636, -0.02850840426981449, 0.005668892525136471, 0.028007954359054565, -0.0176883265376091, 0.00019791511294897646, 0.052737098187208176, -0.07413565367460251, 0.02043217420578003, -0.012252401560544968, -0.002054650103673339, 0.04176170751452446, 0.03273634612560272, -0.011751950718462467, -0.007627551443874836, -0.009646608494222164, -0.03416866809129715, 0.016954908147454262, 0.001426930190064013, -0.005190013442188501, -0.0008434311603195965, -0.028836285695433617, -0.02736944891512394, -0.06671518832445145, -0.037447478622198105, 0.03349564969539642, -0.00990546215325594, 0.04331482574343681, -0.02521233633160591, -0.0030436862725764513, -0.08317827433347702, -0.05277160927653313, -0.01647171378135681, -0.0018583527998998761, -0.00031197245698422194, 0.02768007293343544, 0.026627400889992714, -0.059605345129966736, -0.017774609848856926, 0.005962260067462921, -0.023883555084466934, -0.03204606845974922, 0.0696488618850708, -0.03924219682812691, 0.01689450815320015, -0.006950217764824629, 0.005910489242523909, -0.06164165958762169, -0.05598139390349388, 0.021519359201192856, 0.00397987337782979, -0.03478991612792015, -0.05546368658542633, -0.022848140448331833, -0.009387755766510963, 0.0697869136929512, -0.009525810368359089, 0.012079832144081593, -0.030337635427713394, 0.04721488803625107, 0.031027913093566895, -0.006212485022842884, 0.10436975210905075, 0.018602941185235977, -0.05646458640694618, 0.015652012079954147, -0.013210159726440907, -0.005535151809453964, -0.01761929877102375, 0.01963835582137108, -0.10892557352781296, -0.037930674850940704, -0.029198680073022842, -0.033461134880781174, 0.015211960300803185, 0.016186974942684174, 0.00773540697991848, -0.0684753954410553, 0.04089885950088501, -0.009456782601773739, 0.01258891075849533, 0.024332232773303986, 0.0735144093632698, 0.021795468404889107, -0.04721488803625107, 0.001531550195068121, 0.016601141542196274, 0.0002755711611825973, 0.02712785266339779, 0.04417767375707626, -0.034013357013463974, -0.02778361365199089, 0.0015326287830248475, -0.02157112956047058, 0.021985294297337532, -0.03416866809129715, -0.04338385537266731, 0.01063025277107954, -0.019465787336230278, -0.015790065750479698, 0.03114871121942997, -0.011242872104048729, -0.015634754672646523, 0.0347554050385952, 0.009594838134944439, 0.08635354787111282, -0.006199542433023453, 0.08014106005430222, -0.007843262515962124, 0.00022905842342879623, 0.0330987423658371, 0.06329832226037979, -0.038172271102666855, 0.018637455999851227, -0.04828481376171112, -0.019793668761849403, 0.0359288714826107, -0.030234094709157944, -0.04745648428797722, 0.045558225363492966, 0.03306422755122185, 0.033426620066165924, -0.04831932857632637, -0.02726590633392334, 0.022520259022712708, -0.0003383970761206001, -0.034496549516916275, -0.037999700754880905, 0.008382541127502918, -0.026627400889992714, -0.02012155018746853, -0.022175120189785957, 0.08234994113445282, -0.00015490766963921487, -0.02365921437740326, 0.02348664589226246, 0.029595589265227318, 0.04393607750535011, -0.008524910546839237, -0.03301245719194412, 0.0021279919892549515, 0.005103729199618101, -0.005806948058307171, -0.006885504350066185, 0.028042467311024666, 0.002513036597520113, 0.026489347219467163, 0.019793668761849403, -0.024884454905986786, 0.04949279874563217, -0.030648259446024895, 0.01599714905023575, -0.011113445274531841, -0.04017407074570656, 0.006268570199608803, 0.02740396186709404, -0.019086135551333427, 0.0010456604650244117, 0.009180672466754913, -0.009767407551407814, 0.08863145858049393, -0.0694417804479599, -0.018085233867168427, 0.024642858654260635, -0.021484844386577606, -0.017187876626849174, -0.013348214328289032, 0.08759604394435883, 0.05018307641148567, 0.010086660273373127, -0.029198680073022842, -0.01406437624245882, 0.058397360146045685, 0.008650022558867931, 0.012761480174958706, 0.0368952602148056, 0.012217887677252293, -0.011286014690995216, 0.016566626727581024, 0.019155163317918777, -0.02383178286254406, -0.023037966340780258, -0.014029862359166145, -0.020207833498716354, -0.016290517523884773, -0.0081884004175663, -0.043832533061504364, -0.08863145858049393, -0.022002551704645157, -0.03049294836819172, -0.07420468330383301, 0.02167467027902603, 0.03913865610957146, -0.024401260539889336, -0.00033597034052945673, -0.012381828390061855, -0.06212485209107399, 0.02455657348036766, 0.005276298150420189, -0.029561076313257217, -0.02788715623319149, 0.02001800760626793, 0.02661014534533024, -0.008503339253365993, -0.06091686710715294, -0.06429921835660934, 0.07037365436553955, -0.007299670018255711, 0.0028905312065035105, -0.03237394988536835, -0.0022908539976924658, -0.016773710027337074, -0.04759453982114792, 0.0673019215464592, 0.0325465202331543, 0.07002851366996765, 0.04034664109349251, 0.015936750918626785, 0.029819928109645844, 0.030786314979195595, 0.06630102545022964, -0.02146758697926998, -0.02452206052839756, 0.004676620941609144, -0.01643720082938671, -0.039345741271972656, 0.026730943471193314, -0.02517782151699066, 0.004534251522272825, -0.06485144048929214, -0.059087637811899185, 0.006954532116651535, 0.03180447220802307, -0.0713745504617691, -0.02050120197236538, 0.04814676195383072, 0.015306873247027397, -0.04718037322163582, -0.04034664109349251, -0.011441326700150967, 0.06616296619176865, 0.0067258779890835285, -0.029112396761775017, 0.051391057670116425, -0.009836435317993164, -0.05404862016439438, 0.09063325822353363, -0.045420169830322266, 0.006298769731074572, -0.032166868448257446, 0.010362770408391953, -0.026109695434570312, -0.04942377284169197, 0.04176170751452446, -0.02334859035909176, -0.0016933336155489087, 0.05408313497900963, 0.0343412384390831, 0.006523109506815672, 0.059743400663137436, -0.02314150705933571, -0.019017107784748077, 0.05425570532679558, -0.019034365192055702, -0.014003977179527283, -0.020035265013575554, -0.003869860665872693, 0.028146009892225266, -0.04735294356942177, 0.008598252199590206, 0.010837335139513016, -0.019086135551333427, -0.018361344933509827, -0.019275961443781853, -0.005932060535997152, 0.034013357013463974, -0.01004351768642664, 0.0348244309425354, -0.002832289319485426, 0.001513214665465057, -0.015928121283650398, -0.0024289090652018785, 0.0362049825489521, 0.024332232773303986, -0.0673709511756897, -0.0009750150493346155, -0.030234094709157944, 0.04573079198598862, 0.003623949596658349, -0.016014406457543373, -0.08290216326713562, 0.011113445274531841, 0.021726440638303757, -0.01643720082938671, -0.025453932583332062, -0.01664428412914276, 0.02136404626071453, -0.0324774906039238, 0.01258891075849533, -0.017524385824799538, -0.02077731117606163, -0.04331482574343681, -0.002269282704219222, -0.05014856159687042, 0.028525661677122116, 0.0047629051841795444, 0.025229591876268387, 0.012839135713875294, -0.006100315134972334, 0.02098439447581768, -0.0065748803317546844, 0.03087260015308857, -0.023400360718369484, -0.04990696534514427, -0.03375450149178505, -0.010138430632650852, -0.04169267788529396, 0.051874250173568726, -0.04811224713921547, 0.0355837345123291, -0.0368952602148056, 0.10657863318920135, 0.01685999520123005, 0.026368549093604088, -0.0009421190479770303, 0.06440276652574539, -0.010889106430113316, 0.08593937754631042, -0.09125450253486633, 0.002020136220380664, 0.06433373689651489, 0.04110594466328621, 0.01657525636255741, -0.04076080396771431, 0.0006363483262248337, -0.044212184846401215, -0.004650735296308994, -0.03032037988305092, 0.01636817306280136, 0.036550119519233704, 0.04038115218281746, 0.018292317166924477, 0.010742422193288803, -0.029716387391090393, -0.03195978328585625, -0.03142482042312622, 0.01191589143127203, 0.04776711016893387, -0.01792992278933525, -0.011139331385493279, 0.018326831981539726, 0.009922719560563564, -0.022244147956371307, -0.0081021161749959, 0.06885504722595215, 0.06457532942295074, 0.02500525303184986, 0.057741597294807434, -0.027352191507816315, 0.046110447496175766, 0.03237394988536835, -0.043728992342948914, 0.019724640995264053, -0.09270408749580383, 0.02122599072754383, 0.03917317092418671, -0.08442077040672302, 0.06409213691949844, 0.04120948538184166, 0.01212297473102808, -0.03900060057640076, 0.03382353112101555, -0.024332232773303986, 0.03271908685564995, -0.00017149047926068306, -0.01633365824818611, -0.012709708884358406, -0.0348934568464756, -0.012537140399217606, -0.012701081112027168, 0.03114871121942997, -0.045627251267433167, -0.04759453982114792, 0.0343412384390831, -0.029854442924261093, -0.011242872104048729, 0.03297794237732887, -0.07807023078203201, 0.028974341228604317, -0.034393008798360825, 0.006523109506815672, 0.006570565979927778, 0.03958733752369881, 0.044626351445913315, 0.006678421515971422, 0.02692076936364174, 0.06809574365615845, 0.037861645221710205, 0.03225315362215042, 0.019655613228678703, -0.018706483766436577, 0.02816326543688774, -0.03259829059243202, 0.00997448991984129, -0.025661015883088112, -0.011631152592599392, -0.011268758215010166, -0.02538490481674671, 0.028007954359054565, -0.037965185940265656, -0.0007371933315880597, 0.024194179102778435, 0.017153361812233925, 0.059467289596796036, -0.037343937903642654, 0.038413867354393005, -0.02743847668170929, 0.013943578116595745, -0.002746004844084382, -0.0355837345123291, 0.02029411867260933, -0.09442977607250214, 0.0330987423658371, 0.0006870404467917979, -0.010397284291684628, -0.06312575191259384, -0.04027761146426201, -0.000054568216000916436, 0.009896834380924702, 0.044281214475631714, -0.02393532544374466, 0.008511967957019806, -0.014547569677233696, -0.002426752122119069, -0.008632766082882881, 0.05349640175700188, -0.030061526224017143, 0.04300420358777046, -0.08297119289636612, -0.04055372253060341, -0.02778361365199089, -0.045144058763980865, -0.03000975400209427, -0.015807323157787323, -0.020414916798472404, 0.03194252774119377, 0.015867723152041435, -0.005146871320903301, 0.010759679600596428, -0.007131415419280529, -0.037896160036325455, -0.010069402866065502, -0.010319627821445465, -0.05425570532679558, -0.0028150323778390884, -0.03623949736356735, 0.08552521467208862, -0.010595738887786865, -0.0028064039070159197, -0.024194179102778435, -0.017360445111989975, -0.005802633706480265, -0.0021517202258110046, 0.05056272819638252, 0.006402310915291309, -0.07530912756919861, 0.0022002551704645157, 0.035048771649599075, 0.0360669270157814, 0.002456951653584838, 0.072962187230587, -0.04010504484176636, 0.017429472878575325, -0.024297719821333885, -0.0177228394895792, -0.051218487322330475, 0.045144058763980865, 0.08890756219625473, -0.066473588347435, 0.01717061921954155, 0.030786314979195595, -0.05691326782107353, -0.06057173013687134, -0.03028586506843567, -0.051563628017902374, 0.022968938574194908, 0.09097839146852493, 0.04245198145508766, -0.01435774378478527, -0.009776035323739052, -0.018637455999851227, 0.01442677155137062, 0.03589436039328575, 0.05377250909805298, 0.0004680934944190085, -0.006596451159566641, 0.01517744641751051, -0.04155462235212326, -0.010725165717303753, 0.023469388484954834, 0.004081257618963718, -0.01203669048845768, 0.06567977368831635, 0.08283313363790512, -0.06215936690568924, -0.015203331597149372, 0.03672268986701965, -0.07744897902011871, -0.00021732912864536047, 0.04649009928107262, -0.022054322063922882, 0.04134754091501236, -0.013201531022787094, -0.0069027612917125225, -0.004251669626682997, -0.026126950979232788, 0.05480792373418808, 0.04334934055805206, -0.032063327729701996, -0.02507428079843521, -0.03277086094021797, -0.017705582082271576, 0.007109844125807285, 0.029077881947159767, -0.02005252242088318, 0.0353766530752182, 0.004460909403860569, 0.01585046574473381, 0.024918967857956886, -0.012010804377496243, 0.06423019617795944, 0.024228692054748535, 0.026834484189748764, 0.024573830887675285, 0.024263206869363785, -0.013874550350010395, 0.0010343356989324093, 0.01643720082938671, 0.038103241473436356, 0.04683523625135422, -0.04666266590356827, 0.051874250173568726, 0.04155462235212326, 0.028974341228604317, 0.008348027244210243, 0.04673169553279877, -0.015798695385456085, -0.028836285695433617, 0.006346226204186678, 0.019534815102815628, 0.0324774906039238, -0.016221489757299423, 0.0045860218815505505, -0.026661915704607964, 0.010095288045704365, 0.0034966799430549145, -0.00590617535635829, 0.04662815108895302, -0.006234056316316128, -0.0032011554576456547 ]
715,586
pytorch_optimizer.optimizer.amos
get_scale
Get expected scale for model weights.
@staticmethod def get_scale(p: torch.Tensor) -> float: r"""Get expected scale for model weights.""" if len(p.shape) == 1: # expected 'bias' return 0.5 if len(p.shape) == 2: # expected Embedding, Linear, ... return math.sqrt(2 / p.size(1)) return math.sqrt(1 / p.size(1))
(p: torch.Tensor) -> float
[ 0.015694236382842064, -0.05763861536979675, 0.005119709298014641, 0.0332874171435833, 0.009867075830698013, 0.007377035450190306, 0.029340587556362152, -0.03704807907342911, 0.020478837192058563, 0.06225566565990448, 0.020776711404323578, 0.022824594751000404, 0.022731509059667587, 0.02317832037806511, -0.02710653282701969, 0.03177943080663681, 0.03410657122731209, -0.010155641473829746, 0.03220762684941292, 0.030550701543688774, 0.007595786824822426, 0.003153275465592742, 0.025821952149271965, 0.048069413751363754, -0.023643748834729195, 0.024332581087946892, -0.003900287440046668, -0.025486843660473824, 0.07886213809251785, 0.0026994829531759024, -0.049000270664691925, 0.009531967341899872, 0.048665162175893784, 0.08809623122215271, 0.02813047543168068, 0.021428309381008148, 0.01523811649531126, -0.01314368937164545, -0.08668132871389389, -0.06013331189751625, -0.021372457966208458, 0.008847787976264954, 0.0701865553855896, 0.009997395798563957, 0.003099751193076372, 0.0074142697267234325, 0.013841832056641579, 0.034534767270088196, -0.0676918625831604, 0.004272629972547293, 0.02275012619793415, 0.008345126174390316, 0.02595227211713791, 0.02088841423392296, -0.06296311318874359, 0.02148416079580784, 0.016476154327392578, 0.028446966782212257, 0.0001222475984832272, -0.020590540021657944, 0.03166772797703743, -0.019994791597127914, -0.00926667358726263, -0.06527163833379745, 0.0061296881176531315, -0.03704807907342911, -0.016336526721715927, 0.02068362571299076, -0.021521395072340965, 0.025877803564071655, 0.003288249485194683, -0.045574720948934555, -0.0250400323420763, 0.043117258697748184, -0.019734151661396027, -0.0070419274270534515, 0.04695238918066025, -0.0004220851114951074, -0.0011240089079365134, -0.027851218357682228, 0.035893816500902176, 0.020143728703260422, 0.038072019815444946, -0.024630455300211906, 0.01782589592039585, -0.09896863251924515, 0.030066655948758125, 0.020702242851257324, 0.013637043535709381, -0.005738728679716587, -0.030234210193157196, 0.02410917542874813, 0.060207780450582504, 0.05704287067055702, -0.002601743210107088, 0.05011729896068573, -0.03667573630809784, -0.046877920627593994, -0.0012764366110786796, -0.009708830155432224, -0.03853744640946388, 0.1274900734424591, 0.013478797860443592, 0.029694313183426857, 0.014577208086848259, 0.03198422119021416, 0.011254051700234413, -0.04680345207452774, -0.030383147299289703, 0.007912278175354004, -0.04505344107747078, 0.03548423945903778, -0.047697070986032486, 0.03155602514743805, -0.03198422119021416, -0.03965447470545769, -0.02057192288339138, -0.008717468939721584, -0.01901739276945591, 0.03559594228863716, -0.000018762570107355714, 0.05473434552550316, -0.0414789542555809, -0.06300035119056702, 0.02241501770913601, 0.04006405174732208, 0.04006405174732208, -0.028484201058745384, -0.03341773897409439, 0.03766244277358055, -0.022489486262202263, -0.022433634847402573, 0.006143650971353054, 0.039095960557460785, 0.036210305988788605, -0.01172878872603178, 0.03522359952330589, 0.044271521270275116, 0.036266159266233444, 0.04483003541827202, 0.029396438971161842, 0.0828089714050293, 0.04512790963053703, -0.017332542687654495, 0.008591802790760994, 0.02790706977248192, 0.05212794989347458, -0.011468148790299892, 0.03684328868985176, 0.005366385914385319, 0.0023643746972084045, -0.0046822065487504005, 0.043005555868148804, -0.026957595720887184, 0.047585368156433105, -0.03146294131875038, 0.028484201058745384, -0.09330902993679047, 0.0034534765873104334, -0.010006704367697239, -0.0455002523958683, -0.005580483004450798, -0.03170496225357056, -0.057005636394023895, -0.0434151329100132, 0.007665601093322039, 0.017137063667178154, 0.019492128863930702, -0.009643670171499252, 0.03803478553891182, -0.006990730296820402, -0.015861790627241135, -0.03075549006462097, 0.006525302305817604, 0.036377862095832825, 0.04974495619535446, 0.008056560531258583, -0.0034208965953439474, 0.0006097108125686646, 0.011663628742098808, 0.030681021511554718, -0.04125554859638214, 0.02204267494380474, 0.00612037954851985, 0.01096548605710268, 0.03984064608812332, -0.02530067227780819, 0.04825558513402939, -0.08705367147922516, -0.0054687801748514175, 0.021744800731539726, -0.013720820657908916, -0.033827316015958786, -0.017220839858055115, -0.038984257727861404, 0.029899101704359055, 0.032356563955545425, -0.035186365246772766, 0.011160966008901596, -0.0237182155251503, -0.0024784046690911055, -0.022601189091801643, 0.008279966190457344, 0.05782478675246239, -0.025058649480342865, -0.04233534261584282, -0.002140969270840287, 0.04445769265294075, -0.03304539620876312, -0.01952936314046383, -0.06210672855377197, 0.01697881706058979, -0.005496705882251263, 0.024295346811413765, 0.025728866457939148, -0.02742302417755127, -0.02356928028166294, -0.028167709708213806, 0.004998697899281979, 0.041330017149448395, 0.05246305465698242, -0.0108537832275033, 0.031146449968218803, 0.05968650057911873, 0.032561350613832474, 0.003125349758192897, 0.016960199922323227, 0.0026901743840426207, 0.004770637955516577, -0.017788661643862724, 0.016038652509450912, -0.032784756273031235, 0.017844513058662415, 0.013832523487508297, 0.027609195560216904, 0.0064461794681847095, -0.020720859989523888, -0.011375063098967075, 0.0026575943920761347, -0.03444167971611023, -0.01602003537118435, -0.027125149965286255, -0.03377146273851395, 0.03984064608812332, -0.017984142526984215, -0.031220916658639908, 0.02051607146859169, 0.0008354434394277632, -0.04069703444838524, -0.012361770495772362, -0.04330343008041382, -0.022899063304066658, 0.022843211889266968, 0.010937560349702835, 0.05045240744948387, -0.0041841985657811165, -0.00867557991296053, 0.012855124659836292, 0.021670332178473473, -0.024351198226213455, -0.0686599537730217, -0.01700674369931221, 0.013888374902307987, 0.051718372851610184, -0.007912278175354004, -0.03823957219719887, -0.02813047543168068, 0.0615854486823082, -0.007093124557286501, 0.031034747138619423, 0.13113902509212494, 0.03797893226146698, -0.02368098311126232, -0.035074662417173386, 0.010267344303429127, -0.049111973494291306, 0.004684533923864365, 0.06523440033197403, 0.005417583044618368, 0.043340664356946945, -0.01011840719729662, -0.04408534988760948, -0.02643631584942341, 0.023364491760730743, 0.0028158400673419237, 0.00434477161616087, 0.020609157159924507, -0.05521839112043381, 0.02204267494380474, 0.033268801867961884, -0.015601149760186672, 0.0016592511674389243, -0.0056596058420836926, -0.015601149760186672, -0.06687270849943161, -0.05108539015054703, 0.03987788036465645, -0.02416502684354782, 0.05376625433564186, -0.032617200165987015, -0.007316529750823975, -0.016941582784056664, 0.007977438159286976, 0.04270768165588379, 0.014325877651572227, 0.03777414560317993, 0.006469450891017914, -0.025989506393671036, 0.03879808634519577, -0.00826134905219078, -0.0319097526371479, 0.014465505257248878, -0.036917757242918015, 0.0656067430973053, 0.05946309491991997, 0.018077228218317032, 0.016718177124857903, 0.013599809259176254, -0.013776672072708607, 0.0665748342871666, 0.01028596144169569, 0.052649226039648056, 0.004039916209876537, 0.03140708804130554, -0.0615854486823082, -0.08318131417036057, -0.01284581609070301, 0.007628366816788912, 0.006269316654652357, -0.02062777429819107, -0.013916300609707832, 0.007279295474290848, 0.06690994650125504, -0.01463305950164795, -0.10358568280935287, -0.026324613019824028, 0.06333545595407486, 0.055702436715364456, 0.018123770132660866, -0.025877803564071655, 0.053244974464178085, -0.03144432231783867, -0.01728600077331066, 0.048181116580963135, 0.037364568561315536, 0.03189113363623619, 0.02224746346473694, -0.02589642070233822, 0.033101245760917664, -0.040399160236120224, -0.022396400570869446, -0.035837963223457336, 0.011896342039108276, 0.009262019768357277, -0.005869048647582531, -0.01240831334143877, -0.04669174924492836, -0.025375140830874443, 0.003092769766226411, 0.0403619259595871, -0.0030950969085097313, -0.02693897858262062, -0.02377406693994999, -0.004882340785115957, 0.03166772797703743, 0.014847156591713428, 0.014325877651572227, -0.022135760635137558, 0.04088320583105087, 0.04728749766945839, 0.005943516734987497, -0.05845776945352554, -0.053617317229509354, -0.010974794626235962, -0.004326154477894306, 0.03712254762649536, -0.07774510979652405, 0.011170274578034878, 0.026138443499803543, 0.04602153226733208, -0.006637004669755697, -0.016234131529927254, 0.015191573649644852, 0.001929199555888772, 0.046058766543865204, -0.027944304049015045, 0.003646629163995385, -0.018542656674981117, -0.03449753299355507, -0.020441602915525436, -0.012724804691970348, -0.007265332620590925, 0.009885692968964577, -0.03500019386410713, -0.07491530478000641, 0.024611838161945343, -0.00809379480779171, 0.03379008173942566, -0.032356563955545425, 0.015033327974379063, -0.047697070986032486, 0.006148305255919695, -0.031146449968218803, 0.023606514558196068, -0.04080873727798462, 0.016941582784056664, -0.03902149200439453, 0.1120750904083252, -0.013320552185177803, 0.06985145062208176, -0.007204826921224594, 0.022657040506601334, 0.013013370335102081, -0.007367726881057024, -0.027087915688753128, -0.006492722313851118, 0.041330017149448395, -0.037252865731716156, -0.025989506393671036, -0.007130358833819628, 0.026305995881557465, 0.01480061374604702, 0.05648435652256012, 0.01890568993985653, 0.0250400323420763, -0.0325985848903656, -0.004426221363246441, 0.007083815988153219, 0.03950553759932518, 0.012194216251373291, -0.050638578832149506, -0.046393875032663345, -0.015778012573719025, -0.0581226609647274, 0.05093645304441452, -0.00047648203326389194, -0.010593144223093987, 0.028614521026611328, -0.0651971697807312, -0.014884390868246555, 0.06370779871940613, 0.005585137289017439, -0.007246715482324362, 0.0013590500457212329, 0.04825558513402939, -0.04363853856921196, -0.003809529123827815, 0.014847156591713428, -0.04159065708518028, -0.05920245498418808, 0.004735731054097414, -0.043117258697748184, 0.09018135070800781, -0.024462901055812836, 0.048404522240161896, -0.03198422119021416, -0.04870239645242691, -0.06542057543992996, 0.022340549156069756, -0.020646391436457634, 0.007600441109389067, 0.04337789863348007, -0.03542838618159294, -0.04803217947483063, 0.01458651665598154, 0.002307359827682376, 0.03905872628092766, -0.0023213226813822985, 0.04211193695664406, 0.021242137998342514, 0.08437281101942062, 0.015005402266979218, 0.039207663387060165, -0.03868638351559639, 0.01711844652891159, -0.008549914695322514, 0.0015615113079547882, 0.03244964778423309, 0.02410917542874813, 0.002915907185524702, 0.0325985848903656, -0.02356928028166294, 0.002179367234930396, 0.06132480874657631, -0.05380348861217499, -0.015256733633577824, -0.06471312791109085, 0.0550694540143013, 0.045798126608133316, 0.008815208449959755, -0.03511189669370651, 0.04456939548254013, 0.06724505126476288, 0.003581469412893057, -0.07063336670398712, -0.09479839354753494, 0.04229810833930969, 0.018579890951514244, 0.023811301216483116, 0.0036489563062787056, 0.021502777934074402, -0.012315227650105953, -0.0005145889590494335, -0.013227466493844986, 0.010863091796636581, 0.023643748834729195, -0.07592063397169113, 0.028856541961431503, 0.001284581609070301, 0.006744053214788437, 0.006073836702853441, 0.0338459312915802, -0.04058533161878586, -0.0031718926038593054, 0.03133261948823929, -0.007451504003256559, -0.022657040506601334, 0.03732733428478241, 0.06415461003780365, -0.030923044309020042, 0.021502777934074402, 0.014903008006513119, -0.03293369337916374, -0.03607998788356781, 0.007018656004220247, -0.01385114062577486, -0.04479280114173889, -0.03647094592452049, 0.038984257727861404, 0.04583536088466644, 0.029079947620630264, -0.002339939819648862, 0.008214806206524372, 0.04873963072896004, -0.009243402630090714, 0.004405276849865913, -0.04672898352146149, -0.0550694540143013, -0.011514691635966301, -0.02405332401394844, -0.04211193695664406, -0.039580006152391434, 0.029359204694628716, -0.0010140514932572842, 0.03879808634519577, 0.044159818440675735, -0.0434151329100132, 0.04996836185455322, -0.0332874171435833, -0.0027599886525422335, -0.053244974464178085, 0.01828201673924923, -0.010034630075097084, -0.033268801867961884, 0.03946830332279205, 0.0006876700208522379, -0.004281938541680574, -0.01779797114431858, -0.006576498970389366, -0.012436239048838615, -0.02710653282701969, -0.0990431010723114, 0.10723463445901871, 0.043936412781476974, -0.043117258697748184, 0.007423578295856714, -0.053468380123376846, 0.03358529135584831, -0.005166252143681049, -0.02388576976954937, -0.03423689305782318, 0.01734185218811035, 0.08370259404182434, 0.013934917747974396, 0.011551925912499428, -0.031034747138619423, 0.013348477892577648, -0.04553748667240143, -0.007772649638354778, -0.00542689161375165, 0.01749078743159771, -0.03187251836061478, 0.0175466388463974, 0.03263581916689873, 0.009434227831661701, -0.00575269153341651, -0.031853899359703064, 0.005552557297050953, -0.05056411027908325, 0.06098970025777817, -0.04792047664523125, -0.016792645677924156, -0.016057269647717476, -0.018970848992466927, 0.014149014838039875, -0.06430354714393616, -0.02513311803340912, -0.015359127894043922, 0.030923044309020042, 0.024388432502746582, -0.031220916658639908, 0.0029415057506412268, 0.03170496225357056, 0.008438211865723133, -0.005101092159748077, -0.08258556574583054, 0.02088841423392296, -0.000682433950714767, 0.015480139292776585, -0.040622565895318985, -0.0388353206217289, 0.005250029265880585, -0.03928213194012642, -0.05060134455561638, -0.00542689161375165, -0.04844175651669502, -0.05045240744948387, -0.00915497075766325, 0.0919685959815979, -0.0403619259595871, -0.027795366942882538, 0.02442566677927971, 0.006036602426320314, -0.004619373939931393, -0.018077228218317032, 0.005263992119580507, 0.01368358638137579, -0.07960682362318039, -0.06437801569700241, -0.10366015136241913, 0.02654801867902279, -0.015368436463177204, 0.021670332178473473, -0.08333025127649307, 0.004649627022445202, 0.04367577284574509, 0.010676920413970947, -0.020962882786989212, -0.01646684668958187, 0.03673158586025238, 0.056521590799093246, 0.024630455300211906, -0.010565218515694141, -0.005152289289981127, 0.040510863065719604, -0.006148305255919695, -0.022377783432602882, -0.024407049641013145, 0.02306661754846573, -0.015145030803978443, -0.02705068141222, 0.008414939977228642, 0.04572365805506706, -0.013395020738244057, 0.09018135070800781, -0.000650435802526772, 0.02840973250567913, 0.016308600082993507, -0.009671595878899097, -0.08012810349464417, -0.04967048764228821, -0.01746286265552044, -0.011924267746508121, 0.06858548521995544, 0.018747443333268166, -0.025989506393671036, -0.05238858610391617, -0.01737908646464348, -0.062181197106838226, -0.05294710025191307, 0.01134713739156723, 0.04572365805506706, -0.059276923537254333, -0.03987788036465645, 0.016960199922323227, 0.035502854734659195, 0.011952193453907967, -0.029470907524228096, -0.027944304049015045, -0.02023681439459324, 0.021670332178473473, -0.018542656674981117, -0.044755566865205765, 0.03379008173942566, 0.07148975878953934, -0.041441719979047775, -0.0344044454395771, 0.017583873122930527, 0.011663628742098808, 0.021558629348874092, -0.06635142862796783, -0.08340471982955933, -0.0011123731965199113, 0.03157464414834976, 0.030997512862086296, -0.05034070461988449, -0.0575641468167305, 0.0319097526371479, 0.01714637130498886, 0.0184495709836483, 0.006702164653688669, -0.02563578076660633, -0.08787282556295395, -0.019734151661396027, 0.00921082217246294, -0.003874689107760787, -0.04360130429267883, 0.012538633309304714, 0.011412297375500202, -0.005710802972316742, 0.006609078962355852, 0.0252448208630085, 0.033212948590517044, -0.05473434552550316, 0.010388355702161789, 0.05871840938925743, -0.023159703239798546, 0.05175560712814331, -0.03222624212503433, 0.0052872635424137115, -0.03585658222436905, -0.025486843660473824, 0.04151618853211403, -0.00471245963126421, -0.056521590799093246, -0.004966117907315493, -0.00414696428924799, -0.0013218158856034279, -0.012780656106770039, 0.01240831334143877, -0.008326509036123753, -0.01864505000412464, -0.023792684078216553, -0.006734744645655155, -0.022731509059667587, 0.025915037840604782, 0.012361770495772362, -0.04069703444838524, 0.0009174751467071474, -0.07104294747114182, 0.04337789863348007, 0.0016266712918877602, 0.019082551822066307, -0.010751388967037201, 0.0341251902282238, 0.026380464434623718, 0.00018253509188070893, -0.005901628639549017, 0.0280187726020813, -0.049596019089221954, 0.049819424748420715, 0.0002292233402840793, -0.019734151661396027, -0.04814388230443001, 0.049111973494291306, -0.08884091675281525, 0.0615854486823082, -0.0560375452041626, -0.06292588263750076, -0.022899063304066658, -0.004172563087195158, -0.046170469373464584, 0.036210305988788605, 0.05149496719241142, 0.0012903994647786021, -0.010351121425628662, 0.041441719979047775, 0.02051607146859169 ]
715,595
pytorch_optimizer.optimizer.amos
reset
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 momentum, beta = group['momentum'], group['beta'] lr_sq: float = math.sqrt(group['lr']) bias_correction: float = 1.0 - beta ** group['step'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg_sq'] = torch.zeros((1,), dtype=p.dtype, device=p.device) state['decay'] = torch.zeros((1,), dtype=p.dtype, device=p.device) if group['momentum'] > 0.0: state['exp_avg'] = torch.zeros_like(p) g2 = grad.pow(2).mean() init_lr: float = group['lr'] * self.get_scale(p) exp_avg_sq = state['exp_avg_sq'] exp_avg_sq.mul_(beta).add_(g2, alpha=1.0 - beta) r_v_hat = bias_correction / (exp_avg_sq + group['eps']) b = state['decay'] decay_factor_c = torch.rsqrt(1.0 + self.c_coef * lr_sq * b) decay_factor_d = torch.reciprocal(1.0 + self.d_coef * math.sqrt(init_lr) * b) gamma = decay_factor_c * (group['lr'] ** 2) * r_v_hat * g2 update = p.clone() update.mul_((gamma - group['extra_l2']) / 2.0) update.add_(r_v_hat.sqrt() * grad, alpha=init_lr) update.mul_(decay_factor_d) b.mul_(1.0 + gamma).add_(gamma) if momentum > 0.0: exp_avg = state['exp_avg'] exp_avg.mul_(momentum).add_(update, alpha=1.0 - momentum) update.copy_(exp_avg) p.add_(-update) return loss
(self)
[ -0.006079103797674179, -0.018682824447751045, -0.036905765533447266, 0.066031813621521, 0.004455135203897953, 0.0057341898791491985, -0.025236185640096664, -0.05353827029466629, -0.01808880642056465, 0.011861198581755161, -0.028052980080246925, 0.0007958164787851274, 0.031176365911960602, 0.08891108632087708, -0.03274763748049736, 0.050280749797821045, 0.010376153513789177, 0.042194440960884094, 0.02287927456200123, -0.00963842123746872, -0.01599058136343956, -0.06442221254110336, -0.014294756576418877, 0.05710237845778465, -0.0685228556394577, -0.012876777909696102, 0.048977743834257126, -0.000791025988291949, -0.024699652567505836, 0.002229962730780244, -0.018404977396130562, -0.05231190845370293, 0.018596597015857697, 0.012254017405211926, 0.03347579017281532, -0.04805797338485718, 0.0024694863241165876, 0.009149793535470963, -0.07151210308074951, -0.03726984187960625, -0.028723645955324173, -0.007099473383277655, -0.011746227741241455, 0.004529387224465609, 0.017446884885430336, -0.0006724619306623936, -0.029317663982510567, 0.0441872775554657, 0.008814460597932339, -0.006649169605225325, 0.0038994408678263426, -0.03709738329052925, 0.04709988087415695, -0.022170284762978554, 0.022381065413355827, 0.07591933757066727, 0.06526533514261246, -0.05365324020385742, 0.03594767302274704, -0.04123634845018387, 0.05756226181983948, -0.06825459003448486, 0.013854033313691616, 0.005686285439878702, 0.01527201198041439, -0.01905648224055767, -0.05499457195401192, -0.029241016134619713, 0.018404977396130562, 0.040661491453647614, 0.01783970184624195, 0.007003664039075375, 0.009087517857551575, -0.017581017687916756, -0.03928183764219284, -0.019353490322828293, -0.04648670181632042, -0.06898273527622223, 0.023799045011401176, -0.041427966207265854, 0.007458758540451527, 0.005437180865556002, -0.019679242745041847, 0.023684073239564896, -0.00361440796405077, -0.04008663445711136, -0.0004739569267258048, -0.042424384504556656, -0.00880488008260727, -0.00899649877101183, 0.02222777158021927, 0.0010437231976538897, 0.010347411036491394, 0.032958418130874634, 0.051928672939538956, 0.04740647226572037, -0.04016328230500221, -0.022936759516596794, -0.03759559243917465, -0.04353577271103859, 0.028302084654569626, 0.03792134299874306, 0.012656415812671185, 0.04361242055892944, 0.04434056952595711, -0.0395117811858654, -0.00761205330491066, -0.027248181402683258, 0.0403549000620842, -0.05327000468969345, -0.01797383651137352, 0.006912645418196917, -0.04391900822520256, -0.010347411036491394, -0.04181120544672012, -0.011794132180511951, -0.011027657426893711, 0.0012563002528622746, -0.032057810574769974, 0.03604348003864288, 0.04131299629807472, -0.01623968593776226, -0.04736814647912979, 0.004062316846102476, 0.00523119093850255, 0.029624253511428833, 0.0451836921274662, 0.025197861716151237, 0.022285256534814835, -0.0646904781460762, -0.017216941341757774, -0.007990500889718533, -0.005786885041743517, -0.021480457857251167, 0.03257518261671066, -0.028589513152837753, -0.014294756576418877, 0.013643252663314342, 0.0007395285065285861, 0.004059921484440565, -0.008541404269635677, 0.01950678601861, -0.010500705800950527, 0.015454049222171307, 0.036005157977342606, 0.029605092480778694, 0.052848443388938904, 0.0641922727227211, 0.0030275757890194654, 0.0016778614372015, 0.020234936848282814, 0.025006242096424103, 0.04150461405515671, 0.022955922409892082, 0.00982045941054821, 0.028321245685219765, -0.0190085768699646, 0.020464878529310226, -0.03443388268351555, -0.01722652278840542, -0.023684073239564896, -0.023549940437078476, -0.032824285328388214, -0.01554027758538723, 0.019813375547528267, 0.0014335474697872996, -0.004263516515493393, 0.037557270377874374, -0.04579687491059303, 0.02606014534831047, 0.002912604482844472, -0.033724892884492874, 0.05254185199737549, 0.029355987906455994, -0.023339159786701202, 0.14126132428646088, 0.009604888036847115, 0.01014621090143919, -0.029490120708942413, -0.006687493063509464, 0.005691075697541237, -0.01503248792141676, -0.012483959086239338, -0.04928433522582054, 0.004052735865116119, 0.034338075667619705, 0.003935369197279215, -0.001273066853173077, 0.023396644741296768, 0.007224025670439005, -0.0036838697269558907, -0.019621755927801132, 0.04357409477233887, -0.012972586788237095, -0.021997828036546707, 0.031272172927856445, 0.02529367059469223, 0.022534361109137535, 0.09795548766851425, 0.008234814740717411, -0.006620426662266254, -0.014591765590012074, 0.025236185640096664, 0.003920997958630323, -0.045375313609838486, -0.013154624961316586, -0.016881609335541725, 0.05783052742481232, 0.009777344763278961, 0.012244435958564281, -0.06212278828024864, 0.01007914450019598, 0.03355243802070618, 0.06675995886325836, 0.03686743974685669, -0.06304255872964859, -0.010816876776516438, 0.02169123850762844, 0.06538030505180359, -0.0031233851332217455, -0.03874530643224716, -0.07009412348270416, 0.027957171201705933, -0.003532970091328025, 0.04878612607717514, -0.021480457857251167, 0.023070894181728363, -0.05878862366080284, -0.020503202453255653, -0.0064910841174423695, 0.007109054364264011, -0.04188785329461098, 0.0069413878954946995, -0.013643252663314342, 0.036675821989774704, 0.018548691645264626, -0.04560525342822075, -0.009671954438090324, -0.0033293752931058407, -0.0005230592214502394, -0.03905189409852028, -0.03700157254934311, -0.028838617727160454, 0.04763641208410263, -0.009168955497443676, 0.03426142781972885, 0.06610845774412155, 0.024948757141828537, -0.0304290521889925, 0.046026814728975296, -0.03299674391746521, -0.0356794036924839, -0.026884106919169426, 0.04173455759882927, -0.035871025174856186, -0.028972750529646873, 0.06461383402347565, 0.03939680755138397, 0.050932254642248154, -0.0451836921274662, 0.013566604815423489, -0.05112387239933014, -0.055032894015312195, 0.04832623898983002, -0.035257842391729355, -0.000020041372408741154, 0.036407556384801865, -0.03341830521821976, 0.052733469754457474, 0.04725317656993866, 0.06871446967124939, 0.08576853573322296, -0.05993833392858505, -0.026290088891983032, 0.003029970917850733, 0.03207697346806526, 0.00162995676510036, 0.012301921844482422, 0.001983253750950098, -0.03765307739377022, 0.07151210308074951, -0.04621843621134758, -0.07465465366840363, 0.000509586010593921, -0.05859700217843056, 0.0333416573703289, -0.02414395846426487, -0.017264846712350845, 0.058213766664266586, 0.004304235335439444, 0.03224942833185196, 0.0015916329575702548, 0.0875314325094223, 0.014036071486771107, 0.09902855008840561, 0.004661125130951405, -0.024297254160046577, 0.01677621901035309, -0.02489127218723297, 0.018711566925048828, 0.0846954733133316, -0.024105634540319443, -0.004100640770047903, 0.0001860797347035259, -0.017954673618078232, -0.018404977396130562, 0.010663582012057304, 0.0013042049249634147, 0.016048068180680275, -0.022036151960492134, 0.0005296461167745292, -0.0007509058341383934, -0.006189284380525351, 0.02542780339717865, -0.0003862314624711871, -0.09358657896518707, -0.017130713909864426, -0.06315752863883972, 0.022630169987678528, 0.06051319092512131, -0.022400228306651115, 0.024680491536855698, 0.029758386313915253, 0.0391860269010067, -0.03016078658401966, -0.02540864236652851, 0.06357908993959427, 0.03623509779572487, -0.033839866518974304, -0.02322418801486492, -0.06587851792573929, -0.009259974583983421, 0.054764628410339355, 0.030620671808719635, -0.04549028351902962, -0.026098469272255898, 0.040508195757865906, -0.0016227710293605924, 0.03004581481218338, -0.05292509123682976, 0.0717037245631218, 0.03276680037379265, -0.036273423582315445, 0.02027326077222824, 0.011861198581755161, -0.025619423016905785, 0.04299924150109291, 0.018979834392666817, 0.03824709728360176, 0.005336581263691187, -0.014716317877173424, -0.01770556904375553, -0.02029242180287838, 0.05852035805583, 0.016948675736784935, 0.036005157977342606, -0.0061317989602684975, -0.028091304004192352, 0.02416311949491501, -0.07821875810623169, 0.02387569285929203, 0.025121213868260384, -0.05510954186320305, 0.0930500477552414, 0.09849201887845993, 0.005796466022729874, -0.046678319573402405, -0.028302084654569626, 0.04832623898983002, -0.019832536578178406, 0.010194115340709686, -0.04832623898983002, 0.006376112811267376, 0.02450803481042385, -0.043075889348983765, -0.026021821424365044, -0.049629248678684235, -0.01599058136343956, 0.07247019559144974, 0.036905765533447266, 0.04740647226572037, -0.05081728473305702, -0.02954760566353798, 0.02711404860019684, 0.033973999321460724, -0.026884106919169426, 0.022304419428110123, -0.05131549388170242, 0.033973999321460724, -0.06457550823688507, 0.052465204149484634, 0.015827706083655357, 0.013164205476641655, 0.012445636093616486, -0.05710237845778465, 0.03544946387410164, 0.04813462123274803, 0.028436217457056046, -0.042194440960884094, -0.026922428980469704, -0.020694822072982788, 0.009298298507928848, 0.0006886297487653792, 0.012244435958564281, -0.008527033030986786, -0.0875314325094223, 0.009935430251061916, 0.054113127291202545, 0.013662414625287056, 0.06614678353071213, -0.006960549857467413, 0.004977296106517315, -0.043190859258174896, 0.00201319414190948, 0.008230024017393589, -0.05051069334149361, -0.01979421265423298, -0.027267344295978546, -0.0076695391908288, 0.01400732807815075, 0.040776461362838745, 0.01445763185620308, 0.031272172927856445, 0.03855368494987488, -0.04100640490651131, -0.03809380158782005, -0.02929850108921528, -0.010050402022898197, -0.04315253347158432, 0.00989710632711649, -0.037538107484579086, -0.041657909750938416, -0.012282759882509708, -0.018778635188937187, -0.029087720438838005, 0.008871946483850479, -0.0032431466970592737, 0.04633340612053871, 0.03309255093336105, 0.02222777158021927, -0.0008413259056396782, 0.012618092820048332, -0.013863613829016685, -0.01957385241985321, 0.0029796711169183254, -0.014141460880637169, 0.048709478229284286, -0.03795966878533363, -0.10339745879173279, 0.02565774694085121, -0.004517411347478628, 0.0102132773026824, 0.05441971495747566, -0.0008682723273523152, 0.0306781567633152, 0.004419206641614437, -0.06020659953355789, -0.03148295357823372, -0.016565438359975815, 0.006433598231524229, 0.00824439525604248, 0.022036151960492134, -0.031387146562337875, 0.01619178242981434, -0.009331831708550453, -0.011324666440486908, 0.070707306265831, 0.04575854912400246, -0.016680410131812096, -0.00010561484668869525, 0.0007455165614373982, -0.020963087677955627, 0.030352404341101646, -0.021767886355519295, -0.02606014534831047, -0.02450803481042385, -0.04188785329461098, -0.0014239666052162647, 0.026884106919169426, -0.05545445531606674, -0.0013916309690102935, -0.062467701733112335, 0.02630924992263317, 0.03056318499147892, -0.004390463698655367, 0.042462706565856934, 0.012934263795614243, 0.023990662768483162, 0.04188785329461098, 0.05970839038491249, -0.0565275214612484, -0.06154793128371239, 0.04020160809159279, 0.03426142781972885, -0.04338247701525688, -0.05959342047572136, 0.02709488570690155, 0.015645667910575867, 0.09672912955284119, -0.026155954226851463, 0.022189447656273842, 0.03943513333797455, -0.04560525342822075, -0.0067210267297923565, 0.005719818640500307, -0.019966671243309975, -0.05683411285281181, 0.020062480121850967, -0.05120052024722099, 0.023339159786701202, 0.010548610240221024, -0.014304337091743946, 0.0023377484176307917, 0.001486242632381618, -0.02427809126675129, -0.046026814728975296, 0.036541689187288284, 0.07764390110969543, 0.05380653589963913, -0.052963413298130035, 0.02464216761291027, 0.00805277656763792, -0.014476793818175793, -0.004455135203897953, -0.015942677855491638, 0.05415144935250282, -0.015291173942387104, -0.01577022112905979, -0.000027769743610406294, 0.00007440195622621104, -0.02491043321788311, 0.014879193156957626, 0.04709988087415695, 0.06771805137395859, -0.013049234636127949, -0.04445554316043854, -0.020752307027578354, -0.07189534604549408, -0.1388852447271347, -0.04698491096496582, 0.0015904353931546211, -0.0044719018042087555, 0.035257842391729355, -0.0010443220380693674, -0.03380154073238373, 0.03443388268351555, 0.020828954875469208, 0.011477961204946041, -0.03508538752794266, -0.011209694668650627, -0.042194440960884094, 0.03481712192296982, -0.023166703060269356, 0.016498371958732605, 0.015444468706846237, 0.014112718403339386, -0.02941347286105156, 0.016632504761219025, 0.010385734029114246, 0.0019257680978626013, -0.0403549000620842, -0.0523502342402935, 0.020828954875469208, -0.029815873131155968, 0.003331770421937108, 0.03163624927401543, 0.024757137522101402, -0.028340408578515053, -0.03763391450047493, 0.025082889944314957, -0.013173786923289299, 0.0068120453506708145, -0.008871946483850479, -0.010107886977493763, -0.023339159786701202, -0.004991667810827494, 0.03723151609301567, -0.033207524567842484, -0.0033269799314439297, -0.028302084654569626, 0.04196449741721153, -0.055684398859739304, 0.005537780933082104, -0.02013912796974182, -0.006414436735212803, 0.058482032269239426, -0.10186450928449631, 0.0498591884970665, 0.0008892306359484792, 0.03360992297530174, -0.028033819049596786, 0.028091304004192352, -0.08868113905191422, -0.07956009358167648, 0.016153458505868912, -0.00032934467890299857, -0.038323745131492615, 0.013125882484018803, 0.015559439547359943, 0.029068559408187866, -0.05530116334557533, -0.0033988370560109615, 0.047713059931993484, 0.014141460880637169, -0.03958842530846596, -0.010864781215786934, -0.01934390887618065, 0.04855618253350258, 0.021365486085414886, -0.026884106919169426, -0.04955260083079338, -0.0361776128411293, 0.0022694841027259827, -0.004225192591547966, -0.055646076798439026, -0.023703236132860184, -0.019736727699637413, 0.0015604948857799172, 0.0646904781460762, -0.0004422200727276504, -0.04395733401179314, 0.0034826702903956175, -0.043075889348983765, -0.011152209714055061, 0.013892357237637043, -0.02567690797150135, 0.05365324020385742, -0.06978753954172134, -0.02491043321788311, -0.04043154790997505, -0.04955260083079338, 0.03223026916384697, 0.015607344917953014, -0.036809954792261124, 0.06204614043235779, 0.008014452643692493, 0.04391900822520256, 0.032306917011737823, -0.02952844463288784, -0.052196938544511795, -0.011276761069893837, 0.04932265728712082, -0.011861198581755161, -0.02454635687172413, -0.02130800113081932, 0.005077896174043417, -0.021787047386169434, 0.04533698782324791, 0.051813699305057526, 0.011238438077270985, -0.014984583482146263, 0.055914342403411865, -0.02604098431766033, 0.028225436806678772, 0.01457260362803936, 0.0025102051440626383, 0.03891776129603386, 0.021001411601901054, 0.03106139414012432, -0.042041145265102386, -0.013384567573666573, -0.018232520669698715, -0.023856529965996742, -0.005647961515933275, -0.0290110744535923, -0.012368988245725632, -0.0048311869613826275, -0.023971501737833023, -0.03004581481218338, -0.01977505162358284, -0.08385235071182251, -0.04598849266767502, -0.0661851018667221, 0.003844350576400757, 0.013422891497612, -0.030084138736128807, 0.026673326268792152, -0.04276929795742035, -0.026749972254037857, 0.02232358045876026, 0.034989576786756516, 0.035391975194215775, -0.026749972254037857, 0.0441872775554657, 0.03508538752794266, -0.008584518916904926, 0.0034946464002132416, 0.022170284762978554, 0.0008221640600822866, 0.002180860610678792, -0.04748311638832092, -0.00886236596852541, 0.008790508843958378, 0.024048149585723877, 0.018778635188937187, -0.0755360946059227, -0.04265432804822922, -0.02824459969997406, 0.02157626673579216, -0.05967006832361221, 0.016862446442246437, -0.02567690797150135, -0.020982248708605766, 0.000563179375603795, 0.032172784209251404, 0.03353327512741089, 0.03650336712598801, -0.031176365911960602, 0.008392900228500366, 0.025006242096424103, 0.017427721992135048, 0.02236190438270569, -0.029720062389969826, 0.005274305120110512, 0.008565356954932213, -0.0050587342120707035, -0.028187112882733345, -0.039109379053115845, -0.05599099025130272, 0.04909271374344826, -0.009001289494335651, -0.030218271538615227, 0.02891526371240616, 0.015051649883389473, -0.03726984187960625, -0.01612471416592598, 0.04414895176887512, -0.0022275676019489765, 0.01979421265423298, 0.008282719179987907, 0.019046900793910027, 0.01580854505300522, -0.00003048309554287698, -0.0034706939477473497, -0.010740228928625584, -0.00219882489182055, 0.03815128654241562, 0.0318470299243927, -0.03393567353487015, 0.016230104491114616, 0.010040820576250553, 0.03682911768555641, 0.013049234636127949, -0.03623509779572487, 0.027152372524142265, 0.044762130826711655, -0.020503202453255653, -0.02454635687172413, 0.03558359667658806, -0.0688677653670311, 0.0773756355047226, 0.042692650109529495, 0.02310921810567379, 0.035257842391729355, 0.057485613971948624, -0.05921018496155739, 0.007018035743385553, -0.056450873613357544, -0.06461383402347565, -0.06534197926521301, -0.016460048034787178, -0.035756051540374756, 0.07227858155965805, 0.046678319573402405, 0.017216941341757774, 0.029183531180024147, 0.06308088451623917, 0.021001411601901054 ]
715,610
pytorch_optimizer.optimizer.apollo
Apollo
An Adaptive Parameter-wise Diagonal Quasi-Newton Method for Nonconvex Stochastic Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param init_lr: Optional[float]. initial learning rate (default lr / 1000). :param beta: float. coefficient used for computing running averages of gradient. :param rebound: str. rectified bound for diagonal hessian. (constant, belief). :param weight_decay: float. weight decay (L2 penalty). :param weight_decay_type: str. type of weight decay. (l2, decoupled, stable). :param warmup_steps: int. number of warmup steps. :param eps: float. term added to the denominator to improve numerical stability.
class Apollo(Optimizer, BaseOptimizer): r"""An Adaptive Parameter-wise Diagonal Quasi-Newton Method for Nonconvex Stochastic Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param init_lr: Optional[float]. initial learning rate (default lr / 1000). :param beta: float. coefficient used for computing running averages of gradient. :param rebound: str. rectified bound for diagonal hessian. (constant, belief). :param weight_decay: float. weight decay (L2 penalty). :param weight_decay_type: str. type of weight decay. (l2, decoupled, stable). :param warmup_steps: int. number of warmup steps. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, init_lr: Optional[float] = None, beta: float = 0.9, rebound: str = 'constant', weight_decay: float = 0.0, weight_decay_type: str = 'l2', warmup_steps: int = 500, eps: float = 1e-4, ): self.validate_learning_rate(lr) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') self.validate_options(rebound, 'rebound', ['constant', 'belief']) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_options(weight_decay_type, 'weight_decay_type', ['l2', 'decoupled', 'stable']) self.validate_non_negative(eps, 'eps') self.lr = lr self.warmup_steps = warmup_steps self.init_lr: float = init_lr if init_lr is not None else lr / 1000.0 defaults: DEFAULTS = { 'lr': lr, 'init_lr': self.init_lr, 'beta': beta, 'rebound': rebound, 'weight_decay': weight_decay, 'weight_decay_type': weight_decay_type, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'Apollo' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['exp_avg_grad'] = torch.zeros_like(p) state['approx_hessian'] = torch.zeros_like(p) state['update'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 current_lr: float = ( group['lr'] if group['step'] >= self.warmup_steps else (self.lr - group['init_lr']) * group['step'] / self.warmup_steps + group['init_lr'] ) weight_decay, eps = group['weight_decay'], group['eps'] bias_correction: float = 1.0 - group['beta'] ** group['step'] alpha: float = (1.0 - group['beta']) / bias_correction for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg_grad'] = torch.zeros_like(p) state['approx_hessian'] = torch.zeros_like(p) state['update'] = torch.zeros_like(p) if weight_decay > 0.0 and group['weight_decay_type'] == 'l2': grad.add_(p, alpha=weight_decay) exp_avg_grad, b, d_p = state['exp_avg_grad'], state['approx_hessian'], state['update'] delta_grad = grad - exp_avg_grad if group['rebound'] == 'belief': rebound = delta_grad.norm(p=np.inf) else: rebound = 1e-2 eps /= rebound exp_avg_grad.add_(delta_grad, alpha=alpha) de_nom = d_p.norm(p=4).add_(eps) d_p.div_(de_nom) v_sq = d_p.mul(d_p) delta = delta_grad.div_(de_nom).mul_(d_p).sum().mul(-alpha) - b.mul(v_sq).sum() b.addcmul_(v_sq, delta) de_nom = b.abs().clamp_(min=rebound) if group['rebound'] == 'belief': de_nom.add_(eps / alpha) d_p.copy_(exp_avg_grad.div(de_nom)) if weight_decay > 0.0 and group['weight_decay_type'] != 'l2': if group['weight_decay_type'] == 'stable': weight_decay /= de_nom.mean().item() d_p.add_(p, alpha=weight_decay) p.add_(d_p, alpha=-current_lr) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, init_lr: Optional[float] = None, beta: float = 0.9, rebound: str = 'constant', weight_decay: float = 0.0, weight_decay_type: str = 'l2', warmup_steps: int = 500, eps: float = 0.0001)
[ -0.024289855733513832, -0.04539889842271805, -0.0014638975262641907, -0.003550016088411212, 0.0009694771142676473, -0.01782495342195034, -0.047175195068120956, -0.05064517632126808, -0.0408342219889164, 0.010255028493702412, -0.03624889254570007, 0.01700909622013569, 0.04180498793721199, 0.06836685538291931, -0.057006802409887314, 0.0665905550122261, -0.003482888452708721, 0.019425688311457634, -0.004608566407114267, -0.028420783579349518, -0.03166356310248375, -0.0856754407286644, -0.011442669667303562, 0.07493503391742706, -0.03866548463702202, -0.03187010809779167, 0.015945380553603172, -0.008349637500941753, -0.05927881598472595, -0.02070627547800541, -0.003668780205771327, -0.036455437541007996, -0.009294587187469006, 0.005197223741561174, 0.04275510460138321, -0.04304426908493042, 0.03156028687953949, 0.004156745970249176, -0.07662871479988098, -0.01996270939707756, 0.014819703996181488, -0.04424223676323891, 0.01679222099483013, -0.04353997856378555, 0.014964286237955093, 0.01914685033261776, -0.005099114030599594, 0.07291087508201599, -0.037591442465782166, -0.01313635054975748, 0.03903726860880852, -0.05337158590555191, 0.04473794996738434, 0.019425688311457634, -0.0029200497083365917, 0.04614246264100075, 0.07968559861183167, -0.01474741194397211, 0.06559913605451584, -0.08988898992538452, 0.03145701438188553, -0.05675894767045975, 0.010884994640946388, -0.01740153320133686, 0.0028735767118632793, -0.020819876343011856, -0.052297547459602356, -0.03564990684390068, 0.006862503942102194, 0.03424539044499397, 0.02052038349211216, -0.013694025576114655, 0.009712844155728817, -0.014200064353644848, -0.0165546927601099, -0.022885339334607124, -0.008380619809031487, -0.046596866101026535, -0.031167849898338318, -0.058824412524700165, 0.0020577183458954096, 0.027553288266062737, -0.021191660314798355, -0.018465247005224228, 0.008747239597141743, -0.05423908308148384, 0.02804899960756302, -0.017577098682522774, 0.026210736483335495, -0.04132993146777153, -0.011008922941982746, -0.007497633807361126, 0.04370521754026413, 0.03763275220990181, 0.06609484553337097, 0.022967958822846413, -0.025281278416514397, -0.06002238020300865, 0.020117618143558502, -0.04353997856378555, -0.014282682910561562, 0.031622253358364105, 0.016306838020682335, 0.06229439005255699, 0.018227718770503998, -0.06646662950515747, -0.025756334885954857, -0.008205055259168148, 0.026995614171028137, -0.08889756351709366, -0.03887202963232994, 0.018950631842017174, -0.03414211794734001, -0.006872831378132105, -0.011700852774083614, 0.01579047180712223, -0.04048309102654457, 0.014293010346591473, -0.0031214323826134205, 0.026396628469228745, 0.024021346122026443, 0.039760179817676544, -0.07348920404911041, -0.01972518116235733, 0.02608680911362171, 0.005509625189006329, 0.030465593561530113, 0.00013264150766190141, 0.012971113435924053, -0.050190772861242294, -0.020850857719779015, 0.03982214257121086, -0.0369718037545681, 0.025570442900061607, 0.005979517940431833, -0.024764912202954292, -0.00328408763743937, 0.03618692606687546, -0.01758742518723011, 0.02109871432185173, 0.04651424661278725, 0.018289683386683464, -0.007451161276549101, 0.004500129725784063, 0.03025904670357704, -0.001432915567420423, 0.03581514582037926, 0.0024333747569471598, -0.015697525814175606, 0.014148428104817867, 0.00870076660066843, -0.008416765369474888, 0.011050231754779816, -0.004582748282700777, 0.01492297649383545, -0.04258986562490463, -0.023835454136133194, -0.003312487853690982, -0.00625835545361042, -0.029412206262350082, -0.043168194591999054, -0.04116469621658325, 0.0017608079360798001, -0.004843513015657663, -0.010120772756636143, 0.023257123306393623, 0.017762988805770874, 0.0012876876862719655, -0.015831781551241875, 0.037405550479888916, 0.0119900181889534, -0.09121088683605194, -0.005457988474518061, 0.03182879835367203, -0.053784679621458054, 0.08988898992538452, 0.03438997268676758, 0.014375628903508186, 0.005031986627727747, -0.037219658493995667, 0.046225082129240036, -0.009475315921008587, -0.039099231362342834, -0.06535127758979797, -0.001312860520556569, 0.04510973021388054, -0.0021609915420413017, -0.00261410279199481, -0.023071231320500374, 0.03657936677336693, -0.01862015761435032, -0.04531627893447876, 0.03612496331334114, -0.007745489478111267, -0.011979690752923489, 0.02881322242319584, 0.03197338059544563, 0.014189736917614937, 0.08889756351709366, 0.03703376650810242, 0.006831522099673748, 0.021356897428631783, 0.022616829723119736, -0.008592329919338226, -0.007136177737265825, 0.004149000626057386, -0.031436361372470856, 0.02070627547800541, -0.007662870921194553, 0.013859262689948082, -0.043292123824357986, 0.005406351760029793, 0.018103791400790215, 0.04182564467191696, 0.009728334844112396, -0.02569437026977539, 0.0322212353348732, 0.043746527284383774, 0.05960929021239281, 0.0028322674334049225, 0.009439170360565186, -0.049240659922361374, -0.0032918332144618034, 0.004479474853724241, 0.07253909111022949, -0.02598353661596775, 0.033894263207912445, 0.00544766103848815, -0.004768639802932739, -0.03211796283721924, 0.028565365821123123, -0.0479600727558136, 0.020788894966244698, -0.010440920479595661, 0.04824923723936081, 0.029618753120303154, -0.052338857203722, 0.019663216546177864, -0.03195272758603096, -0.013239623978734016, -0.02901976741850376, -0.03158094361424446, -0.030279701575636864, 0.01217591017484665, -0.026499902829527855, 0.016492730006575584, 0.05993976444005966, 0.04548151418566704, 0.0027005940210074186, 0.014768066816031933, -0.03765340894460678, -0.026582520455121994, -0.036455437541007996, 0.010595830157399178, -0.061674751341342926, -0.009650880470871925, 0.021119369193911552, 0.04808399826288223, 0.017133023589849472, -0.07262171059846878, -0.005834935698658228, -0.039388395845890045, -0.057874299585819244, 0.06795376539230347, -0.003960527013987303, 0.02720215916633606, 0.05374336987733841, -0.03137439861893654, 0.019818125292658806, 0.026665139943361282, 0.06155082583427429, 0.07588514685630798, -0.06663186848163605, 0.005798790138214827, -0.007022577337920666, 0.0435812883079052, -0.0024901749566197395, -0.014840357936918736, 0.008354801684617996, 0.0023107377346605062, 0.04362259805202484, -0.04866233095526695, -0.024517057463526726, 0.014788721688091755, -0.029907917603850365, 0.059857144951820374, -0.021501479670405388, -0.001288333092816174, 0.06022892892360687, 0.01851688325405121, 0.041577789932489395, 0.0038211082573980093, 0.07212600111961365, -0.003916636109352112, 0.09608538448810577, 0.03145701438188553, 0.020881840959191322, 0.027697870507836342, -0.023484325036406517, -0.028420783579349518, 0.055519670248031616, -0.012919477187097073, 0.02466163970530033, -0.00245919288136065, -0.023546287789940834, -0.03752947971224785, 0.02530193328857422, 0.01875441148877144, 0.05680025741457939, -0.021976536139845848, -0.00588140869513154, 0.0029923408292233944, -0.0044407472014427185, 0.027450015768408775, 0.008168909698724747, -0.08009868860244751, 0.003524197731167078, -0.06051809340715408, 0.025157351046800613, 0.06915172934532166, -0.053247660398483276, 0.05031470209360123, 0.02099543996155262, -0.002247483003884554, -0.062955342233181, -0.059196196496486664, 0.039594944566488266, 0.01948765106499195, -0.011432343162596226, -0.05130612477660179, -0.051636599004268646, -0.02294730395078659, 0.026603175327181816, 0.0022500648628920317, -0.023071231320500374, -0.0024746840354055166, 0.043168194591999054, 0.04453140124678612, 0.006867667660117149, -0.06650793552398682, 0.07010184228420258, 0.07237385213375092, -0.037880606949329376, 0.05056255683302879, -0.009180987253785133, -0.05936143174767494, 0.019797472283244133, 0.01383860781788826, 0.016647638753056526, 0.013353223912417889, -0.014200064353644848, -0.01679222099483013, -0.00623253732919693, 0.09972059726715088, 0.08142058551311493, 0.007673198357224464, -0.028482748195528984, 0.0024630657862871885, 0.04589460790157318, -0.049901608377695084, -0.0043219830840826035, 0.007316906005144119, -0.07129981368780136, 0.08191629499197006, 0.038149118423461914, -0.02075791172683239, 0.008112109266221523, -0.03847959265112877, 0.012165582738816738, -0.05242147296667099, 0.011442669667303562, -0.08939328044652939, -0.007771308068186045, -0.012630311772227287, -0.041577789932489395, 0.01721564121544361, -0.02210046350955963, -0.002590866293758154, 0.03546401485800743, 0.02302992343902588, 0.07336527854204178, -0.02131558768451214, 0.01743251457810402, 0.029061077162623405, 0.022885339334607124, -0.027160851284861565, 0.037302277982234955, -0.011876417323946953, 0.05386729910969734, -0.04713388532400131, 0.02627270109951496, 0.018496230244636536, 0.00535987876355648, 0.018558192998170853, -0.054652176797389984, 0.04457271099090576, 0.0658469870686531, 0.04977767914533615, -0.06716888397932053, -0.020778566598892212, 0.007864253595471382, -0.03457586467266083, 0.015759490430355072, 0.009351387619972229, -0.009232623502612114, -0.08146189898252487, 0.04771221801638603, 0.08551020920276642, 0.003692016704007983, 0.09269802272319794, -0.004727330524474382, -0.007239451166242361, -0.03589776158332825, 0.03443128243088722, -0.02067529410123825, -0.02400069124996662, 0.004652457311749458, 0.020778566598892212, 0.00423936452716589, 0.03005249984562397, 0.04977767914533615, -0.00310335960239172, 0.05725466087460518, 0.03564990684390068, 0.019642561674118042, 0.00042180647142231464, -0.08427092432975769, -0.022823376581072807, -0.044614020735025406, -0.02654121071100235, -0.015253450721502304, -0.03023839183151722, -0.009940044954419136, -0.03213861957192421, -0.03300611302256584, -0.0018847357714548707, 0.007048395462334156, 0.053330279886722565, 0.028028344735503197, -0.012485729530453682, 0.02720215916633606, -0.047836143523454666, 0.011029576882719994, -0.0033279787749052048, -0.013301587663590908, -0.028895840048789978, 0.03916119411587715, -0.03164290636777878, -0.05514788627624512, 0.001116641447879374, 0.040730949491262436, 0.012434092350304127, 0.04132993146777153, 0.017886918038129807, 0.0015568434027954936, -0.016833530738949776, -0.006692103110253811, -0.009718007408082485, -0.006340974010527134, 0.008762730285525322, 0.013043404556810856, 0.04767090827226639, -0.021728679537773132, 0.010332482866942883, -0.021377552300691605, 0.03156028687953949, 0.09013684839010239, -0.032097309827804565, -0.016203563660383224, 0.0045027113519608974, 0.002535356907173991, -0.001657534739933908, 0.003519034245982766, -0.030837375670671463, -0.03244843706488609, -0.004350383300334215, -0.023670217022299767, 0.016616657376289368, 0.016947131603956223, -0.026871684938669205, 0.0479600727558136, -0.050975650548934937, 0.011659543961286545, 0.049364589154720306, 0.012909149751067162, -0.001904099597595632, 0.01251671090722084, 0.021584097295999527, 0.013187986798584461, 0.033708371222019196, -0.04655555635690689, -0.03874810412526131, 0.06861471384763718, 0.02094380371272564, -0.06419461965560913, -0.030589520931243896, 0.01994205452501774, -0.021036749705672264, 0.07472848147153854, -0.036063000559806824, 0.028957804664969444, -0.0016381710302084684, -0.06634270399808884, 0.004789294674992561, 0.05060386657714844, -0.0380871556699276, -0.042424630373716354, 0.03657936677336693, -0.05155397951602936, 0.02321581356227398, -0.028007689863443375, -0.03885137662291527, 0.032551709562540054, 0.0075234523974359035, -0.0035809981636703014, -0.01695745810866356, -0.010043318383395672, 0.06741674244403839, 0.02464098483324051, -0.06431854516267776, 0.02532258816063404, 0.058163464069366455, -0.017071058973670006, -0.011008922941982746, 0.008638802915811539, 0.060807257890701294, -0.01953928917646408, -0.03013511933386326, 0.04705126956105232, 0.010306664742529392, 0.002580538857728243, -0.015418687835335732, 0.019797472283244133, 0.05217361822724342, -0.0003333787899464369, -0.003113686805590987, -0.013456497341394424, -0.06336843222379684, -0.08245331794023514, -0.04457271099090576, 0.005834935698658228, 0.013921226374804974, -0.00312917772680521, -0.05242147296667099, -0.018186409026384354, 0.03135374188423157, 0.006454574875533581, 0.04903411492705345, -0.05998107045888901, -0.021212315186858177, -0.02228635549545288, -0.008328983560204506, -0.01506755966693163, 0.04238332062959671, 0.03536074236035347, 0.007301414851099253, -0.031622253358364105, 0.0196735430508852, -0.0011805417016148567, 0.033605098724365234, -0.056552402675151825, -0.05973321571946144, 0.013921226374804974, -0.027718525379896164, -0.01113285031169653, 0.03951232507824898, 0.015707852318882942, 0.009351387619972229, -0.043168194591999054, 0.00891247671097517, -0.005556097719818354, -0.02835881896317005, -0.011731835082173347, -0.0059485360980033875, -0.06766460090875626, 0.006599157117307186, 0.03438997268676758, -0.040710292756557465, 0.007595743518322706, -0.01065779384225607, 0.057006802409887314, -0.031704872846603394, -0.040441785007715225, -0.02740870602428913, 0.03523681312799454, 0.059857144951820374, -0.05477610230445862, 0.06002238020300865, 0.00725494185462594, 0.00014538929099217057, -0.014799049124121666, 0.03564990684390068, 0.01094695832580328, -0.06778852641582489, -0.021171005442738533, 0.02823489159345627, -0.03639347478747368, 0.004174818750470877, 0.05556097999215126, 0.041082076728343964, -0.06708626449108124, 0.009831608273088932, 0.0428377203643322, -0.03071344830095768, 0.017886918038129807, -0.0177423357963562, 0.009702516719698906, 0.024785567075014114, 0.019363723695278168, -0.06142689660191536, -0.009955535642802715, -0.02806965447962284, 0.015501306392252445, -0.02986660785973072, -0.03963625058531761, -0.013725007884204388, -0.03724031522870064, 0.020603002980351448, 0.09129350632429123, -0.006970940623432398, -0.018702775239944458, 0.00800367258489132, 0.008793712593615055, 0.033419206738471985, -0.01882670447230339, -0.019270777702331543, 0.03220058232545853, -0.12351474165916443, -0.01554261613637209, -0.00998135469853878, -0.004365874454379082, 0.0026851030997931957, -0.013002095744013786, 0.0003840471908915788, 0.013218969106674194, 0.0024127201177179813, 0.04932327941060066, 0.023050576448440552, -0.01821739226579666, -0.04207349941134453, -0.02094380371272564, 0.011422015726566315, 0.009392697364091873, -0.017804298549890518, 0.01026019174605608, 0.004058636724948883, 0.006490720435976982, -0.018392955884337425, 0.03984279930591583, 0.011163832619786263, -0.006031154654920101, 0.034555211663246155, -0.06898649781942368, -0.008230873383581638, -0.00825152825564146, -0.003932126797735691, 0.009909062646329403, 0.049447204917669296, 0.020355146378278732, -0.0178559347987175, 0.013859262689948082, -0.019208814948797226, 0.013002095744013786, 0.01804182678461075, -0.031518980860710144, 0.03013511933386326, -0.01700909622013569, 0.018155427649617195, 0.02028285525739193, -0.006227373611181974, -0.07749620825052261, -0.016100291162729263, -0.047918763011693954, 0.005143004935234785, -0.0020293183624744415, 0.005819444544613361, 0.005328896921128035, -0.043168194591999054, -0.034926995635032654, -0.004523365758359432, 0.06345105171203613, 0.06179868057370186, -0.0013967700069770217, -0.009273933246731758, 0.06126166135072708, -0.008442583493888378, -0.0214188601821661, 0.014344646595418453, 0.019766489043831825, -0.03577383607625961, -0.06027023866772652, -0.01360107958316803, 0.01731891557574272, -0.0033821971155703068, 0.0739436075091362, -0.0871625766158104, -0.051636599004268646, -0.06551651656627655, 0.023257123306393623, -0.0746871754527092, -0.007993345148861408, -0.004931295290589333, -0.05089303106069565, 0.025859607383608818, 0.03577383607625961, 0.06588830053806305, 0.0006409392808564007, -0.002811612794175744, 0.01156659796833992, -0.024868184700608253, -0.0031627416610717773, 0.022678794339299202, -0.010812703520059586, -0.0354846715927124, 0.05680025741457939, 0.002380447229370475, 0.038149118423461914, -0.03657936677336693, -0.026128118857741356, 0.04919935017824173, -0.013652716763317585, -0.002299119485542178, 0.02445509284734726, -0.0019363723695278168, -0.042052846401929855, -0.04510973021388054, 0.0022281191777437925, -0.055313125252723694, 0.004820276517421007, -0.03649674728512764, 0.018682120367884636, 0.021831953898072243, -0.012217218987643719, 0.01589374430477619, 0.018547866493463516, -0.01607963629066944, 0.056263238191604614, 0.024496402591466904, -0.019694197922945023, 0.044035691767930984, 0.00932040624320507, 0.026789067313075066, -0.026582520455121994, -0.01804182678461075, 0.0027909581549465656, 0.04132993146777153, -0.015191487036645412, -0.02274075709283352, 0.028833875432610512, -0.02920565940439701, 0.052669331431388855, -0.004533693194389343, 0.009459824301302433, 0.04655555635690689, 0.06365759670734406, -0.06039416417479515, 0.0072239600121974945, -0.0354846715927124, -0.09856393933296204, -0.11508765071630478, -0.005989845376461744, -0.019704526290297508, 0.07700049132108688, 0.03668263927102089, -0.009940044954419136, 0.011979690752923489, 0.017256950959563255, 0.01862015761435032 ]
715,612
pytorch_optimizer.optimizer.apollo
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, init_lr: Optional[float] = None, beta: float = 0.9, rebound: str = 'constant', weight_decay: float = 0.0, weight_decay_type: str = 'l2', warmup_steps: int = 500, eps: float = 1e-4, ): self.validate_learning_rate(lr) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') self.validate_options(rebound, 'rebound', ['constant', 'belief']) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_options(weight_decay_type, 'weight_decay_type', ['l2', 'decoupled', 'stable']) self.validate_non_negative(eps, 'eps') self.lr = lr self.warmup_steps = warmup_steps self.init_lr: float = init_lr if init_lr is not None else lr / 1000.0 defaults: DEFAULTS = { 'lr': lr, 'init_lr': self.init_lr, 'beta': beta, 'rebound': rebound, 'weight_decay': weight_decay, 'weight_decay_type': weight_decay_type, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, init_lr: Optional[float] = None, beta: float = 0.9, rebound: str = 'constant', weight_decay: float = 0.0, weight_decay_type: str = 'l2', warmup_steps: int = 500, eps: float = 0.0001)
[ 0.006789263337850571, -0.034502021968364716, -0.02949584648013115, -0.009780405089259148, -0.03869638592004776, -0.017714904621243477, -0.050757598131895065, -0.035797055810689926, -0.036318935453891754, 0.012186848558485508, -0.035004571080207825, 0.061311155557632446, 0.038522426038980484, 0.08728914707899094, -0.03817450627684593, 0.059532903134822845, 0.0059339613653719425, 0.014313023537397385, -0.019609132781624794, -0.022962691262364388, 0.00035849004052579403, -0.016526179388165474, -0.01801450178027153, 0.12285426259040833, 0.010466580279171467, 0.024818262085318565, -0.01676778867840767, 0.009084566496312618, -0.042407527565956116, 0.010775841772556305, 0.017444299533963203, -0.0237165167927742, 0.007108189631253481, 0.0536569282412529, 0.03127410262823105, -0.027389001101255417, -0.005054498091340065, 0.001131342607550323, -0.08365532010793686, 0.033187661319971085, 0.04078390449285507, -0.04453370347619057, 0.0303849745541811, -0.056053705513477325, 0.002292886609211564, 0.003822282887995243, 0.02329128049314022, 0.02110712043941021, -0.01891329325735569, -0.052922431379556656, -0.0018289937870576978, 0.0005104028386995196, 0.034482695162296295, -0.013075976632535458, -0.03200859948992729, 0.042407527565956116, 0.03610631823539734, 0.040204036980867386, 0.03639625012874603, -0.0026963765267282724, -0.011297721415758133, -0.058218538761138916, -0.013539869338274002, -0.013385238125920296, 0.025398127734661102, -0.01896161586046219, -0.10097398608922958, -0.02951517514884472, 0.025688059628009796, 0.03040430322289467, 0.08945398032665253, -0.009099062532186508, -0.015666045248508453, 0.016110608354210854, -0.013868460431694984, -0.019947387278079987, -0.05230390653014183, -0.05504860356450081, -0.034115444868803024, -0.03069423697888851, 0.04302605241537094, 0.06281881034374237, -0.023851817473769188, -0.05307706072926521, -0.000529429642483592, -0.06185236573219299, -0.05369558557868004, -0.0630507543683052, 0.020991146564483643, -0.0045205382630229, -0.06575679779052734, -0.020913830026984215, 0.004585773218423128, -0.013365909457206726, 0.056942835450172424, 0.006088592112064362, 0.004303088411688805, -0.05013907328248024, 0.019812086597085, -0.02462497353553772, -0.03867705538868904, 0.005097988061606884, -0.05419813469052315, 0.027099067345261574, 0.02862604707479477, -0.01716403104364872, -0.051608067005872726, -0.013588191010057926, 0.005189800169318914, -0.058721087872982025, -0.01848805882036686, 0.030037054792046547, -0.04047464206814766, 0.03254980593919754, -0.053888872265815735, 0.06792163103818893, 0.0031385242473334074, 0.003819866804406047, 0.0207012128084898, -0.003991410601884127, 0.031467389315366745, 0.01669047400355339, -0.05976484715938568, 0.0302883293479681, 0.017666582018136978, 0.005523222964257002, 0.002292886609211564, 0.017753561958670616, -0.0026238933205604553, -0.021435709670186043, 0.019551146775484085, 0.004187115002423525, -0.07515062391757965, 0.006484834011644125, 0.03338094800710678, -0.028819335624575615, 0.008886445313692093, 0.050718940794467926, -0.03249182179570198, 0.0341927595436573, 0.06506095826625824, 0.029689135029911995, 0.042871419340372086, -0.005943625699728727, -0.001189329195767641, 0.011346043087542057, -0.027891550213098526, -0.003947920631617308, 0.021725643426179886, 0.036280278116464615, 0.007837854325771332, -0.006876243278384209, 0.01410040631890297, 0.04546148702502251, 0.02159034088253975, -0.03129342943429947, 0.008432216942310333, -0.030926182866096497, 0.014680271968245506, -0.007248323876410723, -0.027543630450963974, 0.01799517311155796, 0.013220942579209805, -0.06080860644578934, -0.017251010984182358, 0.01851705089211464, -0.018806984648108482, -0.014380674809217453, -0.0004436578310560435, 0.008949263952672482, -0.01078550610691309, -0.1268746703863144, -0.012070875614881516, 0.010717854835093021, -0.025166181847453117, 0.07901639491319656, 0.017415307462215424, 0.009229532442986965, -0.02236349508166313, 0.002361745573580265, 0.06656860560178757, -0.018140139058232307, -0.040629271417856216, -0.07020243257284164, 0.0101283248513937, 0.022943362593650818, -0.05551249906420708, 0.05180135741829872, -0.041982293128967285, 0.03997208923101425, 0.05964887514710426, -0.005677853710949421, 0.0019365105545148253, 0.01319194957613945, -0.023523228242993355, 0.021319737657904625, 0.051646724343299866, 0.01843007281422615, 0.028877323493361473, 0.057754646986722946, 0.05288377031683922, 0.04820618778467178, -0.006789263337850571, -0.000012731756214634515, 0.011945238336920738, -0.0030539606232196093, -0.014970204792916775, 0.015695037320256233, -0.012853695079684258, -0.030868196859955788, -0.01627490296959877, -0.010012351907789707, 0.03307168558239937, 0.027041081339120865, -0.0101283248513937, -0.037053432315588, -0.0412091389298439, 0.029611820355057716, 0.024702288210392, -0.006803760305047035, 0.08999519050121307, -0.018575038760900497, -0.009732083417475224, -0.016593830659985542, 0.03734336420893669, 0.03660886734724045, 0.021744972094893456, -0.04615732654929161, -0.05767732858657837, 0.0422915555536747, -0.026963764801621437, -0.04519088566303253, 0.028703363612294197, 0.0010038928594440222, 0.026132624596357346, 0.01887463591992855, -0.025881348177790642, 0.05068028345704079, -0.08411921560764313, -0.014428997412323952, 0.03295571357011795, 0.044649675488471985, -0.007794364355504513, -0.035449136048555374, -0.006306041963398457, 0.0223828237503767, 0.035855043679475784, 0.04348994418978691, -0.038116518408060074, -0.025282153859734535, -0.03651222586631775, -0.0000029115988127159653, -0.009335841052234173, 0.04708511382341385, -0.028722692281007767, 0.029766451567411423, 0.032298531383275986, -0.026461215689778328, 0.021203763782978058, -0.00788617692887783, 0.005368592217564583, -0.002631141571328044, -0.018787655979394913, 0.08056270331144333, -0.003377719083800912, 0.014245373196899891, -0.002587651601061225, -0.003380135167390108, 0.023136651143431664, 0.013781480491161346, 0.15447628498077393, 0.02501155063509941, -0.001589799067005515, 0.014110070653259754, 0.004779061768203974, -0.029379872605204582, -0.01537611149251461, -0.04739437624812126, 0.005349263083189726, 0.02155168354511261, 0.03962417319417, -0.0219382606446743, 0.026654504239559174, 0.018604030832648277, 0.000659597513731569, -0.004305504262447357, -0.01319194957613945, 0.03305235877633095, 0.002602148335427046, 0.0037836250849068165, 0.008693156763911247, -0.0032569135073572397, 0.08651599287986755, 0.03740135207772255, 0.10051009058952332, -0.005697182845324278, 0.03372886776924133, -0.0031699337996542454, 0.02982443757355213, -0.017743896692991257, 0.034057457000017166, -0.05396618694067001, 0.02064322680234909, -0.003259329590946436, -0.034482695162296295, -0.04700779914855957, 0.028896652162075043, 0.02688645012676716, 0.03388349711894989, 0.03861907124519348, 0.016149265691637993, 0.03129342943429947, 0.03465665504336357, 0.0010497989133000374, 0.030887525528669357, -0.0659114271402359, 0.013520540669560432, -0.06397853791713715, 0.02418040856719017, 0.03749799728393555, -0.011829264461994171, 0.025320811197161674, 0.015221480280160904, -0.018169132992625237, -0.06552484631538391, -0.07198069244623184, 0.023561885580420494, 0.03649289533495903, -0.021648326888680458, -0.020527252927422523, -0.04696913808584213, -0.006030605640262365, 0.0293992031365633, -0.023020677268505096, -0.027833564206957817, -0.0049264440312981606, 0.020797858014702797, 0.052999746054410934, -0.0009912083623930812, -0.04696913808584213, 0.07847518473863602, 0.0034381216391921043, -0.023426583036780357, 0.043683234602212906, -0.0051269810646772385, -0.025378799065947533, 0.01848805882036686, -0.044185783714056015, 0.04538417235016823, -0.009765908122062683, -0.006755438167601824, -0.024914905428886414, -0.006364028435200453, 0.06757371127605438, 0.03390282765030861, -0.03212457150220871, -0.031448062509298325, -0.02072054147720337, 0.033651553094387054, -0.038503095507621765, -0.027021752670407295, 0.015637051314115524, -0.06695518642663956, 0.05241987854242325, 0.03413477540016174, -0.0055183907970786095, -0.006088592112064362, -0.019928058609366417, 0.009480807930231094, -0.004622014705091715, 0.017444299533963203, -0.08659330755472183, -0.025262825191020966, 0.00876563973724842, 0.004281343426555395, -0.006537988316267729, -0.0180821530520916, -0.02104913257062435, 0.047239743173122406, -0.002505504060536623, -0.006837585475295782, 0.016390876844525337, 0.03738202154636383, 0.0101283248513937, 0.007291813846677542, -0.02992108091711998, -0.005068994592875242, 0.02286604605615139, 0.0643264576792717, -0.002488591242581606, 0.012631412595510483, 0.010051009245216846, 0.017685910686850548, 0.00004141360113862902, -0.047239743173122406, 0.041943635791540146, 0.0368601456284523, 0.029109269380569458, -0.005160806700587273, -0.03384483978152275, -0.0058469814248383045, -0.03287839889526367, -0.022653428837656975, 0.04391517862677574, 0.02062389813363552, 0.005204296670854092, 0.028432758525013924, 0.05377290025353432, 0.013472218066453934, 0.04758766293525696, 0.00794416293501854, -0.02116510644555092, -0.031873296946287155, -0.012003224343061447, -0.03655088320374489, -0.042407527565956116, 0.025668730959296227, -0.012244835495948792, 0.012776379473507404, -0.004762148950248957, 0.044688332825899124, 0.020372623577713966, 0.09834525734186172, 0.027504973113536835, 0.054739344865083694, 0.0465439036488533, -0.002217987086623907, 0.005624699406325817, -0.00540241738781333, -0.05095088481903076, -0.06529290229082108, 0.019174233078956604, -0.036744169890880585, -0.027099067345261574, 0.002103222068399191, 0.008277585729956627, -0.004061477724462748, 0.03135141730308533, 0.011500674299895763, -0.009848056361079216, 0.03077155165374279, -0.07422284036874771, 0.01191624440252781, -0.013133963569998741, -0.0449589379131794, -0.021377723664045334, 0.008432216942310333, 0.005470068659633398, -0.030462289229035378, -0.0018918125424534082, 0.020430609583854675, 0.0016489936970174313, 0.027930209413170815, -0.004034900572150946, -0.00945181492716074, -0.016922419890761375, -0.03253047913312912, -0.007291813846677542, 0.029631149023771286, -0.038464438170194626, 0.02642255648970604, 0.011577989906072617, 0.005866310093551874, -0.01580134592950344, -0.05021638795733452, 0.057870618999004364, 0.06328269839286804, -0.014612621627748013, -0.010157317854464054, 0.007833022624254227, -0.005571545101702213, 0.0263838991522789, 0.05597639083862305, -0.027814235538244247, -0.027157053351402283, 0.017714904621243477, -0.018748998641967773, -0.0026528865564614534, 0.013346580788493156, -0.03649289533495903, 0.01938685029745102, -0.023001348599791527, 0.015018527396023273, 0.0803307592868805, -0.0214936975389719, -0.00876563973724842, -0.05756135657429695, 0.029283229261636734, 0.012360808439552784, 0.06065397709608078, -0.08806230127811432, 0.019908729940652847, 0.03906363248825073, 0.0483221597969532, -0.03950819745659828, -0.014438661746680737, 0.03471463918685913, 0.02377450279891491, 0.0589916929602623, 0.01590765453875065, 0.012921345420181751, -0.016381211578845978, -0.0180821530520916, 0.0020995978266000748, 0.02383248880505562, -0.042523499578237534, -0.11682365089654922, 0.011384701356291771, -0.03376752510666847, 0.0007653022184967995, -0.005358927417546511, -0.0005270135588943958, -0.007746042218059301, 0.006243223324418068, -0.05547384172677994, -0.016864433884620667, -0.045036252588033676, 0.07777935266494751, -0.024702288210392, -0.034946586936712265, 0.0302883293479681, 0.07700619101524353, 0.0341927595436573, -0.06625934690237045, 0.015318124555051327, 0.027041081339120865, 0.026577187702059746, -0.053424980491399765, 0.06424914300441742, 0.01759893074631691, -0.01941584423184395, -0.03218255937099457, -0.030153028666973114, 0.02023732103407383, -0.0140810776501894, 0.03869638592004776, 0.010186311788856983, -0.027562960982322693, -0.028703363612294197, -0.05481665953993797, 0.01811114512383938, 0.018391413614153862, 0.04128645360469818, -0.029611820355057716, -0.019966715946793556, 0.008707653731107712, -0.021377723664045334, 0.05667223036289215, -0.07074364274740219, -0.011964567005634308, 0.006296377629041672, -0.03703410178422928, -0.047239743173122406, 0.008519196882843971, -0.010824163444340229, -0.008267921395599842, 0.030211014673113823, -0.0024547658395022154, 0.05551249906420708, 0.03861907124519348, -0.03809719160199165, 0.004646175540983677, 0.003546846564859152, 0.008209935389459133, -0.012399466708302498, 0.02060456946492195, -0.009765908122062683, -0.013597856275737286, -0.06486766785383224, -0.0015124835772439837, 0.026093967258930206, -0.020044032484292984, -0.0014617453562095761, 0.011152754537761211, -0.05582175776362419, 0.023020677268505096, 0.01669047400355339, 0.00517530320212245, -0.01665181666612625, -0.03571974113583565, 0.03769128397107124, -0.0032834908924996853, -0.06374659389257431, -0.09223733842372894, -0.00047869139234535396, 0.0003563759382814169, -0.04364457353949547, 0.020778529345989227, -0.04662121832370758, 0.004160537850111723, 0.007137183099985123, 0.06745773553848267, -0.025765376165509224, -0.04619598388671875, -0.030520277097821236, -0.0037425511982291937, -0.016593830659985542, -0.020933160558342934, 0.04086121916770935, 0.05725209414958954, -0.0598808191716671, -0.0179855078458786, 0.025243496522307396, 0.022537454962730408, -0.006228726357221603, -0.030230343341827393, -0.038406454026699066, 0.05102819949388504, 0.021802958101034164, -0.04163437336683273, 0.0006819464615546167, -0.04132511094212532, 0.008596512489020824, -0.019000273197889328, -0.0007447652751579881, -0.055241893976926804, -0.06908135861158371, 0.02381316013634205, 0.10522633790969849, -0.013810473494231701, -0.01973477005958557, -0.03869638592004776, 0.006624968256801367, 0.04538417235016823, -0.07344968616962433, -0.018227118998765945, 0.0008540941635146737, -0.13159090280532837, 0.016439199447631836, -0.028877323493361473, 0.013549533672630787, -0.01721235364675522, -0.01296966802328825, -0.06339867413043976, 0.026093967258930206, 0.05408216267824173, 0.03662819787859917, 0.03515920415520668, 0.04430175572633743, -0.00747060589492321, 0.01014765352010727, 0.02982443757355213, 0.009746579453349113, -0.020971817895770073, -0.00813261978328228, -0.009746579453349113, -0.00986255332827568, 0.010505237616598606, 0.05064162239432335, 0.012844029814004898, -0.022692086175084114, 0.03645423799753189, -0.027389001101255417, 0.028800006955862045, -0.023561885580420494, -0.0058469814248383045, 0.031873296946287155, 0.019522152841091156, 0.05504860356450081, -0.02110712043941021, -0.025610744953155518, -0.010911143384873867, 0.053424980491399765, 0.0028655040077865124, -0.008253425359725952, 0.0027060408610850573, -0.033612895756959915, -0.0220349058508873, -0.028239469975233078, -0.014612621627748013, -0.032704439014196396, -0.030984168872237206, -0.02505020797252655, 0.03239517658948898, 0.0017673829570412636, 0.023851817473769188, -0.06479035317897797, -0.05288377031683922, 0.01843007281422615, -0.004708994645625353, 0.033612895756959915, 0.04751034826040268, -0.044185783714056015, -0.037208061665296555, 0.046853166073560715, -0.009277855046093464, -0.06281881034374237, 0.042446184903383255, -0.002491007326170802, -0.022054234519600868, -0.03243383392691612, -0.006537988316267729, 0.012902016751468182, 0.01010899618268013, 0.017473293468356133, -0.040281351655721664, -0.08125854283571243, -0.10862821340560913, 0.02282738871872425, -0.032337188720703125, -0.0021116784773766994, -0.0000706334103597328, -0.06482900679111481, 0.045886725187301636, 0.0001235990202985704, 0.03071356564760208, -0.008944432251155376, -0.0037425511982291937, 0.029379872605204582, -0.04364457353949547, 0.039856117218732834, 0.04913397133350372, 0.026635175570845604, -0.07545988261699677, 0.006552484817802906, 0.00967892911285162, 0.030153028666973114, -0.021203763782978058, -0.06111786887049675, -0.007644565775990486, -0.0018712755991145968, -0.02731168456375599, 0.013288593851029873, -0.014032755047082901, 0.0229240320622921, -0.05663357302546501, -0.03786524385213852, 0.012882688082754612, 0.007209666073322296, -0.03767195716500282, 0.024528328329324722, 0.003807786153629422, -0.04089987650513649, -0.018101481720805168, 0.028915980830788612, -0.04117048159241676, 0.02064322680234909, 0.011491009965538979, 0.04089987650513649, 0.052110616117715836, 0.012931009754538536, 0.03378685563802719, -0.041982293128967285, 0.006745773367583752, -0.009099062532186508, 0.06718713045120239, -0.005817987956106663, -0.05021638795733452, 0.07762471586465836, -0.019232219085097313, 0.010321613401174545, -0.02242148295044899, 0.02151302620768547, 0.03693746030330658, 0.04484296590089798, -0.06888806819915771, 0.008533693850040436, -0.018391413614153862, -0.09208270907402039, -0.0694679394364357, 0.011539331637322903, -0.06842418015003204, 0.08373264223337173, 0.006900404579937458, 0.014448326081037521, 0.04441773146390915, 0.03867705538868904, -0.013916782103478909 ]
715,615
pytorch_optimizer.optimizer.apollo
__str__
null
def __str__(self) -> str: return 'Apollo'
(self) -> str
[ -0.024931350722908974, -0.03916539251804352, -0.004621272440999746, -0.016263741999864578, 0.011028333567082882, -0.06777285039424896, 0.013929150998592377, -0.00076004903530702, 0.06777285039424896, -0.031151121482253075, -0.03805036097764969, -0.015653960406780243, -0.01717841438949108, 0.04278923571109772, -0.006202348507940769, 0.0036260217893868685, -0.03547185659408569, -0.05167462304234505, 0.015087734907865524, 0.010784420184791088, 0.0030009958427399397, 0.017439749091863632, 0.00152009807061404, -0.008462895639240742, 0.009033476933836937, 0.02761438861489296, -0.015131291002035141, -0.002399925608187914, -0.06975899636745453, -0.027109140530228615, 0.0030293071176856756, -0.0696893110871315, -0.007639690302312374, 0.015758495777845383, -0.0512913316488266, 0.011585847474634647, -0.01365039311349392, 0.019251670688390732, -0.037318624556064606, -0.030976897105574608, -0.011707804165780544, 0.026795540004968643, -0.027806034311652184, -0.03325922414660454, -0.013188702054321766, -0.037736762315034866, -0.0034169538412243128, 0.024217035621404648, -0.029164975509047508, 0.0051047420129179955, -0.007038620300590992, 0.014808977954089642, -0.03021031618118286, 0.037701915949583054, -0.012848966754972935, 0.020244743674993515, 0.03676110878586769, 0.03043680638074875, 0.0006751151522621512, 0.04355581849813461, -0.02836354821920395, -0.027248520404100418, 0.028711995109915733, -0.025663087144494057, 0.02160368487238884, 0.02266644686460495, 0.01968722976744175, 0.01846766658127308, 0.022492224350571632, 0.027527276426553726, 0.017962418496608734, -0.021690797060728073, 0.00608039228245616, 0.01257892046123743, 0.03453105315566063, -0.022213466465473175, -0.04867798089981079, 0.015767205506563187, 0.024391258135437965, -0.03867756575345993, 0.009991704486310482, -0.019269093871116638, -0.015061601996421814, -0.015131291002035141, -0.007543867453932762, -0.10760029405355453, -0.029164975509047508, -0.06355664879083633, -0.02575019933283329, -0.007247688248753548, -0.047005437314510345, -0.008262538351118565, -0.028764262795448303, 0.08070021867752075, -0.044183023273944855, -0.000501980830449611, 0.02580246701836586, -0.07219812273979187, 0.018659312278032303, 0.0090683214366436, -0.00027154330746270716, 0.01652507670223713, -0.033172111958265305, 0.009198988787829876, -0.014660888351500034, -0.03209192678332329, -0.00981748104095459, 0.025715354830026627, 0.006298171356320381, 0.006707596126943827, -0.04355581849813461, 0.004041980020701885, 0.008253827691078186, 0.0318654365837574, 0.017082592472434044, -0.03515825793147087, -0.015627827495336533, 0.002963973442092538, 0.03305015340447426, 0.003558510448783636, -0.003236197168007493, 0.026516782119870186, -0.04805077984929085, -0.004677894990891218, 0.05118679627776146, 0.09073548018932343, -0.045193515717983246, -0.037423159927129745, -0.016133075580000877, -0.03805036097764969, 0.03867756575345993, 0.03559381514787674, -0.07853984832763672, -0.03224872797727585, 0.0862753614783287, 0.014669599942862988, 0.0386078767478466, 0.02223088964819908, 0.04251047968864441, 0.14049364626407623, -0.02419961243867874, -0.0038089563604444265, 0.040245577692985535, 0.0037893562112003565, -0.005431410390883684, -0.002199568785727024, -0.02266644686460495, 0.0380852073431015, -0.017300371080636978, -0.013397770002484322, 0.04724935069680214, 0.017039036378264427, 0.04446177929639816, -0.01216078456491232, -0.012639898806810379, -0.03400838375091553, -0.019878875464200974, -0.05826026201248169, 0.042580168694257736, -0.019913719967007637, 0.007204132154583931, -0.04334675148129463, 0.010392418131232262, 0.01569751650094986, -0.007626623846590519, 0.01797984167933464, 0.027910567820072174, 0.002987929154187441, -0.010287884622812271, -0.0044209156185388565, -0.02595926821231842, -0.0870419442653656, -0.08892355859279633, 0.036691419780254364, 0.005488032940775156, 0.0370398685336113, 0.004738872870802879, 0.10279173403978348, 0.043277062475681305, -0.03975775092840195, -0.0021875910460948944, 0.003318953327834606, -0.05251089483499527, 0.008519518189132214, 0.06536857038736343, -0.05460157245397568, 0.04383457452058792, 0.02202182076871395, 0.027178829535841942, -0.00043446928611956537, -0.010688597336411476, 0.004956651944667101, -0.03249264135956764, -0.007112665101885796, -0.010322729125618935, -0.05794665962457657, 0.009800058789551258, -0.06031609699130058, -0.0163247212767601, 0.005148297641426325, -0.011402913369238377, 0.04421786591410637, -0.010235616937279701, 0.04501929506659508, 0.04996723309159279, 0.04101215675473213, 0.023746632039546967, -0.010627619922161102, 0.009538724087178707, -0.06794707477092743, 0.01634214259684086, 0.015575560741126537, -0.01919940486550331, 0.022196045145392418, 0.012448253110051155, -0.0429983027279377, -0.019878875464200974, -0.007892314344644547, 0.004126913845539093, 0.03582030534744263, 0.05979342758655548, -0.040245577692985535, 0.016385698691010475, -0.004205314442515373, 0.00457336101680994, -0.011132867075502872, 0.021952131763100624, -0.0000497489127155859, -0.02372920885682106, -0.02808479219675064, 0.004015846643596888, -0.06428838521242142, -0.006777285132557154, 0.009730369783937931, -0.02404281124472618, 0.02973991259932518, -0.029914135113358498, 0.02808479219675064, -0.06338242441415787, -0.03805036097764969, -0.0032057082280516624, -0.024913927540183067, -0.02696976251900196, 0.006359149236232042, 0.002471792744472623, -0.019774341955780983, -0.021429462358355522, 0.00843240600079298, 0.0076614683493971825, -0.029983825981616974, 0.02888621762394905, -0.03298046439886093, -0.021952131763100624, -0.01748330518603325, 0.027109140530228615, -0.07749450951814651, -0.053974371403455734, -0.0021211684215813875, 0.020976481959223747, -0.0342000275850296, -0.08850542455911636, 0.016899656504392624, -0.04000166431069374, 0.06913179159164429, 0.010078816674649715, -0.009660680778324604, -0.009948148392140865, 0.023328496143221855, 0.0445663146674633, -0.018659312278032303, 0.0953349769115448, 0.04198781028389931, -0.04453146830201149, 0.03075040690600872, -0.0027853946667164564, -0.0171000137925148, -0.007012486923485994, 0.04707512632012367, -0.07428880035877228, -0.05090804025530815, -0.008963786996901035, -0.034931767731904984, -0.007243332453072071, 0.0500020794570446, -0.02064545825123787, -0.042580168694257736, 0.04543742910027504, -0.006263326853513718, 0.013275813311338425, 0.02437383495271206, 0.07282532751560211, 0.029217243194580078, -0.017039036378264427, 0.015950141474604607, 0.02575019933283329, 0.03379931300878525, 0.08390592783689499, 0.058539018034935, -0.03193512558937073, -0.037318624556064606, 0.01013108342885971, -0.027579544112086296, 0.057249765843153, -0.02543659694492817, -0.03555896878242493, -0.005087319761514664, -0.008245116099715233, -0.005335587542504072, 0.03662173077464104, -0.009521301835775375, -0.029025597497820854, 0.043067991733551025, 0.010784420184791088, 0.0790276750922203, 0.009042187593877316, 0.08690256625413895, -0.01135935727506876, -0.0193039383739233, 0.029408888891339302, 0.04414817690849304, -0.05895715579390526, 0.009460323490202427, -0.015131291002035141, -0.015383915044367313, -0.025401752442121506, -0.026534203439950943, -0.02533206343650818, 0.02820674702525139, 0.04369519650936127, -0.029286932200193405, -0.0417090505361557, -0.026830384507775307, 0.022840671241283417, -0.0009206610848195851, -0.0321267731487751, -0.007739868946373463, 0.018746424466371536, -0.006258971057832241, 0.012256607413291931, -0.03357282280921936, 0.08836604654788971, 0.005048119463026524, -0.018415400758385658, 0.0471448190510273, 0.012134650722146034, 0.04697059467434883, -0.05292902886867523, -0.026046378538012505, 0.026429669931530952, 0.006838263478130102, -0.028921063989400864, -0.02298004925251007, 0.023485297337174416, 0.024600325152277946, 0.02245737984776497, 0.009956859983503819, -0.0007257488323375583, 0.06665782630443573, -0.032266151160001755, 0.025088151916861534, -0.012064961716532707, -0.07380098104476929, 0.011010910384356976, 0.047005437314510345, -0.040942467749118805, 0.004296781495213509, 0.05223213881254196, -0.013362924568355083, 0.047911398112773895, -0.04669183865189552, -0.005087319761514664, -0.005418343935161829, -0.016150496900081635, 0.006916664075106382, -0.0471448190510273, 0.09115361422300339, 0.06920148432254791, 0.018101798370480537, -0.04383457452058792, -0.023816321045160294, 0.06076907739043236, 0.014460531994700432, 0.025785043835639954, 0.05331232026219368, -0.006568217184394598, -0.010540507733821869, 0.035036299377679825, 0.011716514825820923, -0.009016054682433605, -0.008811341598629951, -0.0022006577346473932, -0.040036506950855255, 0.008541296236217022, -0.019547851756215096, -0.06498528271913528, -0.06292944401502609, -0.01143775787204504, -0.04425271227955818, -0.05167462304234505, 0.021237816661596298, 0.05143070966005325, -0.04944456368684769, 0.0193039383739233, -0.02080225944519043, -0.04240594431757927, 0.030088359490036964, 0.020837103947997093, 0.023014893755316734, -0.03477496653795242, -0.005296387244015932, 0.02228315733373165, -0.02404281124472618, -0.05613473802804947, -0.05017630383372307, 0.032213881611824036, 0.007439333945512772, -0.0016943212831392884, -0.014782845042645931, -0.02223088964819908, -0.0105579299852252, -0.03644751012325287, 0.03888663277029991, 0.056204427033662796, 0.07888829708099365, 0.01348488125950098, 0.03491434454917908, 0.014460531994700432, 0.02388601005077362, 0.05968889221549034, -0.019460739567875862, -0.030837519094347954, -0.020819680765271187, -0.00710395397618413, -0.07833078503608704, 0.023903433233499527, -0.02181275375187397, 0.003475754288956523, -0.02505330741405487, -0.04278923571109772, 0.027788611128926277, 0.0536259226500988, -0.052371516823768616, -0.006637906655669212, 0.04400879889726639, 0.012064961716532707, -0.051256485283374786, -0.05383498966693878, -0.0034017094876617193, 0.044078487902879715, -0.020976481959223747, -0.02362467534840107, 0.05219729244709015, -0.0011161178117617965, -0.021307505667209625, 0.06038578599691391, -0.047702331095933914, -0.02020989917218685, -0.03181317076086998, 0.015314226038753986, 0.008462895639240742, -0.05742399021983147, 0.05160493403673172, 0.0020885015837848186, 0.01077570952475071, 0.042162030935287476, 0.005261542741209269, -0.001611565239727497, 0.015592982992529869, -0.053869836032390594, -0.008345294743776321, 0.029164975509047508, -0.011185133829712868, -0.026133490726351738, -0.012727010063827038, -0.015087734907865524, 0.03336375579237938, -0.03559381514787674, 0.003859045449644327, -0.010627619922161102, -0.02766665630042553, -0.03162152320146561, -0.023746632039546967, -0.030454227700829506, 0.0722678154706955, 0.01242211926728487, 0.03531505912542343, 0.003031485015526414, 0.015218403190374374, -0.01446924265474081, -0.008062181994318962, 0.015436181798577309, 0.041151538491249084, -0.03310242295265198, -0.02144688554108143, -0.006167504005134106, 0.06007218360900879, 0.0010475174058228731, -0.020140210166573524, -0.07296470552682877, 0.005396565888077021, 0.04139544814825058, -0.016411831602454185, -0.02914755418896675, -0.012692165561020374, 0.0665881335735321, -0.0321267731487751, 0.0375625379383564, -0.001391608384437859, -0.0357506163418293, -0.021690797060728073, -0.02575019933283329, -0.053591080009937286, 0.0684000551700592, 0.0035301989410072565, 0.017317792400717735, 0.028067369014024734, 0.011063178069889545, 0.028224170207977295, -0.05533331260085106, 0.02277098223567009, -0.00852387398481369, -0.02388601005077362, -0.020192477852106094, -0.01973949745297432, -0.03202223777770996, 0.03693533316254616, -0.04111669212579727, 0.013676526956260204, -0.056587718427181244, 0.06585639715194702, 0.020941637456417084, 0.03360766917467117, -0.0020863236859440804, 0.06498528271913528, 0.020140210166573524, 0.08188493549823761, -0.1018160805106163, 0.005740656983107328, 0.044670846313238144, 0.04411333426833153, 0.0030205959919840097, -0.02660389430820942, -0.008937654085457325, -0.03839880973100662, 0.013232257217168808, -0.04669183865189552, -0.000298901810310781, 0.046413078904151917, 0.02792799100279808, 0.019513007253408432, 0.021412041038274765, -0.020558346062898636, -0.030611028894782066, -0.022196045145392418, -0.004555938765406609, 0.051639776676893234, -0.031098853796720505, 0.007265110500156879, 0.03298046439886093, 0.02766665630042553, -0.007905380800366402, -0.008719874545931816, 0.05150039866566658, 0.06651844829320908, 0.018816113471984863, 0.052057914435863495, -0.025994112715125084, 0.0582951083779335, 0.01824117638170719, -0.03129050135612488, 0.037109557539224625, -0.09282615780830383, 0.024408681318163872, 0.030036091804504395, -0.08000332862138748, 0.0440436415374279, 0.04839922487735748, -0.0006468038773164153, -0.018380554392933846, 0.04292861372232437, -0.057911816984415054, 0.053765300661325455, -0.027736345306038857, -0.01069730892777443, 0.0027505499310791492, 0.03043680638074875, 0.011132867075502872, 0.018554778769612312, 0.09205957502126694, -0.050838351249694824, -0.045611653476953506, 0.013711371459066868, 0.024617748335003853, -0.015810761600732803, 0.03975775092840195, -0.06913179159164429, -0.004002779722213745, -0.04087277874350548, -0.007561290170997381, -0.00909445434808731, 0.02473970502614975, 0.041151538491249084, 0.0025218818336725235, 0.03308499976992607, 0.0779823362827301, 0.045298051089048386, 0.006219770759344101, 0.02782345749437809, -0.03920023515820503, 0.018450245261192322, -0.04233625531196594, -0.003791533876210451, -0.018049530684947968, -0.03951383754611015, -0.0051918537355959415, -0.02116812765598297, 0.023067161440849304, 0.007739868946373463, -0.010470818728208542, 0.007901025004684925, -0.0009408056503161788, 0.04940972104668617, -0.02432156912982464, 0.07484631985425949, -0.03829427435994148, 0.014251464046537876, 0.013693949207663536, -0.07387066632509232, 0.023398185148835182, -0.05718007683753967, 0.02846808359026909, -0.004251047968864441, -0.049130961298942566, -0.08293027430772781, -0.027422742918133736, 0.0018631001003086567, 0.024966195225715637, 0.02473970502614975, -0.00965196918696165, 0.012544075958430767, -0.044183023273944855, 0.003336375579237938, -0.006045547313988209, 0.041151538491249084, -0.010993488132953644, 0.042963460087776184, -0.09603186696767807, -0.044984448701143265, -0.0055490112863481045, -0.04627370089292526, -0.013389058411121368, 0.01404239609837532, 0.013868172653019428, 0.035611238330602646, 0.026150913909077644, 0.0006419038400053978, -0.017779484391212463, 0.01851993426680565, -0.03174348175525665, -0.010270461440086365, 0.02207408845424652, -0.045994944870471954, 0.018607044592499733, 0.008332228288054466, 0.04463600367307663, 0.015383915044367313, -0.021934710443019867, -0.04341644048690796, -0.00045679163304157555, -0.0069079529494047165, -0.010949932970106602, 0.04177873954176903, 0.015157424844801426, -0.04596009850502014, -0.015148713253438473, 0.02606380172073841, 0.027840878814458847, 0.008153649047017097, 0.026133490726351738, -0.033485714346170425, -0.017605261877179146, -0.004664828069508076, -0.014530221000313759, -0.0634869635105133, 0.036900490522384644, 0.07923674583435059, -0.07742482423782349, 0.031464722007513046, 0.04048948734998703, -0.08035176992416382, -0.06714564561843872, -0.009608413092792034, -0.057005856186151505, 0.016289876773953438, 0.11233916878700256, -0.0018620112678036094, -0.026778116822242737, -0.05878293141722679, 0.01257892046123743, 0.028694573789834976, 0.0489567406475544, 0.025454020127654076, -0.012178206816315651, -0.006964575499296188, 0.022753559052944183, 0.0032775753643363714, -0.0024609037209302187, 0.017039036378264427, -0.024913927540183067, -0.029617955908179283, 0.04055917635560036, 0.05251089483499527, -0.06745924800634384, -0.020976481959223747, 0.04965363070368767, -0.06634422391653061, -0.0036173106636852026, 0.04986270144581795, -0.01348488125950098, 0.017317792400717735, -0.004843406844884157, -0.006062970031052828, -0.0006179481861181557, -0.0023890365846455097, 0.07212843745946884, 0.044670846313238144, -0.023258807137608528, -0.05097772926092148, -0.06362634152173996, -0.03196997195482254, 0.001443875371478498, 0.026359980925917625, -0.056308962404727936, 0.011263534426689148, 0.029199820011854172, 0.018711579963564873, 0.03217903897166252, 0.017779484391212463, 0.06975899636745453, 0.007826980203390121, 0.029670223593711853, -0.0019687230233103037, -0.006433194503188133, -0.046099476516246796, -0.009878459386527538, 0.022840671241283417, 0.02878168411552906, 0.016925791278481483, -0.08007301390171051, 0.06049032136797905, 0.050733815878629684, 0.058120884001255035, 0.0025458375457674265, 0.04906127229332924, 0.0012968744849786162, -0.0500020794570446, 0.01404239609837532, 0.05132617428898811, -0.013101589865982533, -0.020715147256851196, -0.0163247212767601, -0.0061762151308357716, 0.026847805827856064, -0.03958352655172348, -0.0018108331132680178, 0.006576928310096264, -0.015200980938971043, -0.0035301989410072565 ]
715,636
pytorch_optimizer.optimizer.apollo
reset
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 current_lr: float = ( group['lr'] if group['step'] >= self.warmup_steps else (self.lr - group['init_lr']) * group['step'] / self.warmup_steps + group['init_lr'] ) weight_decay, eps = group['weight_decay'], group['eps'] bias_correction: float = 1.0 - group['beta'] ** group['step'] alpha: float = (1.0 - group['beta']) / bias_correction for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg_grad'] = torch.zeros_like(p) state['approx_hessian'] = torch.zeros_like(p) state['update'] = torch.zeros_like(p) if weight_decay > 0.0 and group['weight_decay_type'] == 'l2': grad.add_(p, alpha=weight_decay) exp_avg_grad, b, d_p = state['exp_avg_grad'], state['approx_hessian'], state['update'] delta_grad = grad - exp_avg_grad if group['rebound'] == 'belief': rebound = delta_grad.norm(p=np.inf) else: rebound = 1e-2 eps /= rebound exp_avg_grad.add_(delta_grad, alpha=alpha) de_nom = d_p.norm(p=4).add_(eps) d_p.div_(de_nom) v_sq = d_p.mul(d_p) delta = delta_grad.div_(de_nom).mul_(d_p).sum().mul(-alpha) - b.mul(v_sq).sum() b.addcmul_(v_sq, delta) de_nom = b.abs().clamp_(min=rebound) if group['rebound'] == 'belief': de_nom.add_(eps / alpha) d_p.copy_(exp_avg_grad.div(de_nom)) if weight_decay > 0.0 and group['weight_decay_type'] != 'l2': if group['weight_decay_type'] == 'stable': weight_decay /= de_nom.mean().item() d_p.add_(p, alpha=weight_decay) p.add_(d_p, alpha=-current_lr) return loss
(self)
[ -0.0023942780680954456, -0.037030208855867386, -0.01954156905412674, 0.03782426565885544, -0.0019161486998200417, 0.004360055085271597, -0.017779149115085602, -0.039005670696496964, -0.021245889365673065, 0.006202366203069687, -0.03648792579770088, 0.01567780040204525, 0.030716480687260628, 0.07956071943044662, -0.027462780475616455, 0.04868930205702782, 0.000026705642085289583, 0.04923158511519432, 0.01824396289885044, -0.023957304656505585, -0.010274333879351616, -0.07204622030258179, -0.003955763764679432, 0.07065177708864212, -0.059341296553611755, -0.029128365218639374, 0.031588006764650345, -0.007306300103664398, -0.010419587604701519, 0.013653920963406563, -0.02387983724474907, -0.05670734867453575, 0.016278184950351715, 0.0012976067373529077, 0.041097335517406464, -0.0391799733042717, 0.009446382522583008, 0.018476368859410286, -0.05864407494664192, -0.04404115676879883, -0.016065144911408424, -0.03790173679590225, -0.015484127216041088, -0.0003803851723205298, 0.02142019383609295, 0.015968309715390205, -0.023744266480207443, 0.04849562793970108, 0.0016788997454568744, -0.000698431977070868, 0.013014801777899265, -0.030852051451802254, 0.04578421264886856, 0.0021872904617339373, 0.014070317149162292, 0.05945749953389168, 0.060232192277908325, -0.04830195754766464, 0.03819224610924721, -0.050354886800050735, 0.06108434870839119, -0.06240132451057434, 0.02393793873488903, -0.004154277965426445, 0.013276259414851665, -0.02142019383609295, -0.06441552191972733, -0.029283303767442703, 0.00917039904743433, 0.028663551434874535, 0.02779202349483967, 0.0061394227668643, 0.004139752592891455, 0.01063262764364481, -0.04799208045005798, -0.03199471905827522, -0.017808198928833008, -0.06720440834760666, 0.018563522025942802, -0.03677843511104584, 0.008933150209486485, 0.007959945127367973, -0.01735306903719902, 0.006512242369353771, -0.004892655182629824, -0.04725612327456474, 0.006793067790567875, -0.0279663298279047, 0.005631031934171915, -0.018273012712597847, 0.012104540131986141, 0.022039946168661118, 0.023163247853517532, 0.03778553009033203, 0.06542261689901352, 0.04163961857557297, -0.04268544912338257, -0.012792077846825123, -0.02074234001338482, -0.03255636990070343, 0.013992847874760628, 0.0428403876721859, 0.016007043421268463, 0.04299532622098923, 0.04113606736063957, -0.04322773218154907, -0.006081320811063051, -0.023318186402320862, 0.018834663555026054, -0.0747576355934143, -0.008739477954804897, -0.01593925803899765, -0.04160088300704956, -0.0016946356045082211, -0.02837304212152958, -0.008918625302612782, -0.01167846005409956, -0.002621843246743083, -0.018621623516082764, 0.03406701609492302, 0.03668159618973732, -0.0025879505556076765, -0.06414438039064407, -0.023027677088975906, 0.008904099464416504, 0.03784363344311714, 0.050974637269973755, 0.015861788764595985, 0.03673969954252243, -0.050199948251247406, -0.02190437540411949, 0.011852765455842018, -0.024364018812775612, -0.007209463976323605, 0.010177496820688248, -0.03596501052379608, -0.01468038558959961, 0.02058740146458149, 0.007621018216013908, 0.00998382456600666, 0.008976726792752743, 0.019008969888091087, -0.0006088583613745868, 0.03193661943078041, 0.040942396968603134, 0.019619038328528404, 0.03662349656224251, 0.0517493300139904, 0.012443467043340206, 0.0043770014308393, 0.03220776095986366, 0.015426025725901127, 0.024015408009290695, 0.01692698895931244, 0.0041494364850223064, 0.012007704004645348, -0.023434389382600784, 0.019628722220659256, -0.032788779586553574, -0.04291785508394241, -0.015203301794826984, -0.02864418365061283, -0.013528034090995789, -0.008434443734586239, -0.000642145867459476, 0.014564182609319687, 0.01215295772999525, 0.03662349656224251, -0.024731995537877083, 0.04016770422458649, 0.0025806878693401814, -0.0480695478618145, 0.039528585970401764, 0.03706894442439079, -0.022272353991866112, 0.13681034743785858, 0.022640330716967583, 0.0018084183102473617, -0.023027677088975906, -0.0004463549121282995, 0.01249188557267189, -0.015542229637503624, -0.015028996393084526, -0.0590701550245285, 0.00804709829390049, 0.03214965760707855, 0.004466575104743242, -0.00015266850823536515, 0.020141953602433205, 0.027133537456393242, -0.00919460877776146, -0.026881761848926544, 0.03888946771621704, -0.0067833843640983105, -0.014225255697965622, 0.03455119952559471, 0.02513870783150196, 0.010603576898574829, 0.09590668976306915, 0.005480935797095299, -0.008632957935333252, -0.022504759952425957, 0.019241375848650932, 0.008845997974276543, -0.05085843428969383, -0.012298212386667728, -0.02994178980588913, 0.06120055541396141, -0.002924456959590316, 0.0080955158919096, -0.050974637269973755, 0.002764676930382848, 0.034357525408267975, 0.06863757967948914, 0.03819224610924721, -0.06987708806991577, -0.015396974980831146, 0.022930840030312538, 0.05480935797095299, -0.0017587896436452866, -0.046752575784921646, -0.05887648090720177, 0.02858608216047287, 0.00486118346452713, 0.05101337283849716, -0.02837304212152958, 0.024945035576820374, -0.054848089814186096, -0.006081320811063051, -0.01126206386834383, 0.010419587604701519, -0.03778553009033203, 0.029438240453600883, -0.0076694367453455925, 0.05089716985821724, 0.01709160953760147, -0.059186358004808426, -0.010284016840159893, -0.007122311275452375, 0.004437524359673262, -0.03799857199192047, -0.0386570580303669, -0.02659125253558159, 0.023976672440767288, -0.00998382456600666, 0.036139313131570816, 0.0726272389292717, 0.018273012712597847, -0.012608088552951813, 0.04028390720486641, -0.03720451518893242, -0.031955987215042114, -0.03046470694243908, 0.025642257183790207, -0.03565513342618942, -0.02320198155939579, 0.059806112200021744, 0.0339508131146431, 0.036546025425195694, -0.04981260374188423, 0.006425089668482542, -0.05616506561636925, -0.04609408974647522, 0.05632000416517258, -0.036662232130765915, 0.008710427209734917, 0.041097335517406464, -0.03701084107160568, 0.03482234105467796, 0.03611994907259941, 0.08761750161647797, 0.06910239905118942, -0.053221240639686584, -0.021613866090774536, -0.012917964719235897, 0.022814637050032616, 0.0080955158919096, -0.0012195324525237083, 0.004117964301258326, -0.031433068215847015, 0.07425408810377121, -0.0517493300139904, -0.06472539901733398, 0.002029931405559182, -0.050935905426740646, 0.050083745270967484, -0.021400826051831245, 0.0012927649077028036, 0.05356985330581665, -0.0003976341395173222, 0.03701084107160568, -0.007911527529358864, 0.08459620922803879, -0.0022913895081728697, 0.08172985166311264, 0.010129079222679138, -0.00948511715978384, 0.00371609372086823, -0.02785012498497963, 0.0027307842392474413, 0.0820397287607193, -0.04667510464787483, -0.008608749136328697, 0.005616506561636925, -0.016278184950351715, -0.011068391613662243, 0.022872738540172577, 0.0038565064314752817, 0.0009695736225694418, -0.02759835124015808, -0.003965447191148996, -0.012017386965453625, 0.005577771924436092, 0.02027752622961998, -0.010603576898574829, -0.10435082018375397, -0.010254966095089912, -0.05047108978033066, 0.012675873935222626, 0.06015472114086151, -0.03877326101064682, 0.034357525408267975, 0.019270427525043488, 0.03737881779670715, -0.04551307111978531, -0.024731995537877083, 0.06553882360458374, 0.02382173389196396, -0.030348502099514008, -0.027733922004699707, -0.07072924822568893, -0.009272078052163124, 0.05376352369785309, 0.03224649280309677, -0.05345364660024643, -0.005359890405088663, 0.05325997620820999, 0.013760440982878208, 0.015009629540145397, -0.06852138042449951, 0.07018696516752243, 0.04175582155585289, -0.03842465206980705, 0.03637172281742096, 0.01530982181429863, -0.025835929438471794, 0.022194884717464447, 0.0271722711622715, 0.04469964653253555, 0.006492875050753355, -0.0008491334738209844, -0.025739094242453575, -0.02424781396985054, 0.06697199493646622, 0.04036137834191322, 0.026223275810480118, -0.008226245641708374, -0.019367264583706856, 0.031065091490745544, -0.057559508830308914, 0.019677139818668365, 0.003580522956326604, -0.056087594479322433, 0.10148446261882782, 0.08707521855831146, -0.005684291943907738, -0.029767485335469246, -0.01824396289885044, 0.029263935983181, -0.023318186402320862, 0.011039340868592262, -0.056203801184892654, -0.012559670954942703, 0.016742998734116554, -0.037030208855867386, -0.038792628794908524, -0.04590041562914848, -0.012046437710523605, 0.06999329477548599, 0.05213667452335358, 0.034938544034957886, -0.03464803472161293, -0.025158075615763664, 0.024325283244252205, 0.038114774972200394, -0.03668159618973732, 0.026165174320340157, -0.06120055541396141, 0.031123192980885506, -0.06886999309062958, 0.055003028362989426, 0.016946356743574142, -0.004936231300234795, 0.010458322241902351, -0.049309052526950836, 0.038966935127973557, 0.05422833934426308, 0.038792628794908524, -0.03947048261761665, -0.016220083460211754, -0.001532434718683362, -0.012385365553200245, -0.015271087177097797, 0.011039340868592262, -0.01037117000669241, -0.08351164311170578, 0.008507071062922478, 0.06546135246753693, 0.023085778579115868, 0.05976737663149834, 0.0022429712116718292, 0.005219477694481611, -0.04822448641061783, -0.0004872077261097729, 0.007529024034738541, -0.046636372804641724, -0.012404732406139374, -0.0008297662134282291, -0.014254306443035603, 0.005621348507702351, 0.06135549396276474, 0.006667180452495813, 0.04822448641061783, 0.026668721809983253, -0.03685590252280235, -0.04311152920126915, -0.045125726610422134, -0.017440220341086388, -0.02953507751226425, 0.019773976877331734, -0.04148468002676964, -0.06193650886416435, -0.009243026375770569, -0.00932533759623766, -0.022659698501229286, 0.006265310104936361, -0.004812764935195446, 0.04880550503730774, 0.03747565671801567, 0.0039000827819108963, 0.0036943056620657444, -0.009107455611228943, -0.00628467695787549, -0.01295669935643673, 0.00041185697773471475, -0.028469877317547798, 0.04593915119767189, -0.041523415595293045, -0.07816627621650696, 0.014012215659022331, 0.00859422329813242, -0.0046190922148525715, 0.05213667452335358, 0.0172465480864048, 0.018040606752038002, 0.009209133684635162, -0.0548868253827095, -0.02502250485122204, -0.01760484278202057, 0.014438294805586338, 0.019367264583706856, 0.02320198155939579, -0.03507411479949951, 0.017914719879627228, -0.005965117365121841, -0.019677139818668365, 0.06991582363843918, 0.027307841926813126, -0.013508666306734085, -0.0005096011445857584, 0.0001503989042248577, -0.02043246291577816, 0.026048969477415085, -0.034996647387742996, -0.02000638283789158, -0.015571280382573605, -0.044815849512815475, 0.009625529870390892, 0.04028390720486641, -0.04628776013851166, 0.015125833451747894, -0.050664763897657394, 0.023318186402320862, 0.032478902488946915, -0.013276259414851665, 0.011562256142497063, 0.005175901111215353, 0.023841101676225662, 0.04404115676879883, 0.0637570321559906, -0.042298104614019394, -0.06600363552570343, 0.057094693183898926, 0.030290400609374046, -0.04628776013851166, -0.043305203318595886, 0.03550019487738609, 0.0032101240940392017, 0.10892149060964584, -0.028237471356987953, 0.015968309715390205, 0.03714641183614731, -0.03821161016821861, -0.006439615041017532, 0.006797909736633301, -0.025739094242453575, -0.03888946771621704, 0.025642257183790207, -0.04144594445824623, 0.03646855801343918, 0.013111637905240059, -0.020877910777926445, -0.0039848145097494125, 0.0066236043348908424, -0.015367924235761166, -0.047062452882528305, 0.027675820514559746, 0.08606812357902527, 0.05182679742574692, -0.059806112200021744, 0.03329232707619667, 0.03431878983974457, -0.016471857205033302, -0.012462833896279335, -0.020258158445358276, 0.05744330585002899, 0.004084071610122919, -0.02711416967213154, 0.004471417050808668, 0.013460248708724976, -0.01610388047993183, 0.00719978054985404, 0.04958019405603409, 0.05372479185461998, -0.007311142049729824, -0.047062452882528305, -0.02732720971107483, -0.07777893543243408, -0.1375075727701187, -0.058295466005802155, 0.014690069481730461, -0.014263990335166454, 0.028450511395931244, -0.01870877668261528, -0.0169850904494524, 0.039586685597896576, 0.00932533759623766, 0.014719120226800442, -0.05310503765940666, -0.01186244934797287, -0.045745477080345154, 0.020045118406414986, -0.03573260083794594, 0.021439561620354652, 0.04086492583155632, 0.010438955388963223, -0.022640330716967583, 0.03505474701523781, 0.0014912793412804604, 0.023473123088479042, -0.05945749953389168, -0.07274344563484192, 0.022504759952425957, -0.030193563550710678, -0.007621018216013908, 0.03218839317560196, 0.016181349754333496, -0.018476368859410286, -0.04814701899886131, 0.012365997768938541, -0.012685557827353477, 0.021923743188381195, -0.006178157404065132, -0.0031738104298710823, -0.024848200380802155, -0.00761617673560977, 0.03794046863913536, -0.04679131135344505, 0.012472517788410187, -0.027888860553503036, 0.03414448723196983, -0.04729485884308815, 0.006933480501174927, -0.017217498272657394, 0.004507730714976788, 0.07588093727827072, -0.09699125587940216, 0.06193650886416435, -0.011397634632885456, 0.029709381982684135, -0.029709381982684135, 0.007243356667459011, -0.05480935797095299, -0.07487384229898453, 0.01528077106922865, 0.004401210695505142, -0.03067774698138237, 0.00237127928994596, 0.03354410082101822, 0.04593915119767189, -0.05864407494664192, 0.005200110375881195, 0.04566800966858864, -0.006144264247268438, -0.02277590148150921, -0.00864748377352953, -0.015038680285215378, 0.04268544912338257, 0.014796589501202106, -0.04384748637676239, -0.035093482583761215, -0.030135462060570717, 0.009281761012971401, -0.02064550295472145, -0.06592616438865662, -0.02356996014714241, -0.028198735788464546, -0.0064589823596179485, 0.06511273980140686, -0.011203962378203869, -0.02513870783150196, -0.009635213762521744, -0.023376287892460823, -0.006318569649010897, 0.01996764913201332, -0.028992794454097748, 0.04299532622098923, -0.07495131343603134, -0.03218839317560196, -0.027675820514559746, -0.04369254782795906, 0.01797282136976719, 0.016442807391285896, -0.028237471356987953, 0.05333744361996651, 0.02258222922682762, 0.056474942713975906, 0.026629988104104996, -0.03594564273953438, -0.07041937112808228, -0.021284623071551323, 0.04500951990485191, 0.002936561359092593, -0.0386570580303669, -0.013673288747668266, 0.00017294361896347255, -0.012201376259326935, 0.027559615671634674, 0.0465201660990715, 0.001609903760254383, -0.015145200304687023, 0.04822448641061783, -0.03677843511104584, 0.02320198155939579, 0.01980302669107914, -0.0013992848107591271, 0.032323963940143585, 0.030968254432082176, 0.021497663110494614, -0.049928806722164154, -0.012617772445082664, -0.01147510390728712, -0.01468038558959961, -0.010351802222430706, -0.018147125840187073, 0.008264980278909206, -0.010700413025915623, -0.019948281347751617, -0.012888913974165916, -0.03515158221125603, -0.08792737871408463, -0.020761707797646523, -0.08219467103481293, 0.008962200954556465, 0.013101954013109207, -0.033059921115636826, 0.003737882012501359, -0.03691400587558746, -0.027288474142551422, 0.012375681661069393, 0.05786938592791557, 0.02785012498497963, -0.02535174787044525, 0.05670734867453575, 0.05558404698967934, 0.003958184737712145, -0.008565172553062439, 0.011116809211671352, 0.006173315457999706, 0.01398316491395235, -0.04469964653253555, -0.03255636990070343, 0.014089684933423996, 0.03317612409591675, 0.03594564273953438, -0.08219467103481293, -0.03724324703216553, -0.042569246143102646, 0.024441486224532127, -0.07076798379421234, 0.006483191624283791, -0.018883083015680313, -0.024209080263972282, -0.00530663039535284, 0.028411775827407837, 0.036604128777980804, 0.02529364638030529, -0.02194310910999775, 0.009165558032691479, 0.023647429421544075, -0.0028978269547224045, 0.026881761848926544, -0.039586685597896576, 0.0008085832814686, 0.0022623385302722454, -0.010119395330548286, -0.027269108220934868, -0.04535813257098198, -0.058179259300231934, 0.03484170883893967, -0.015145200304687023, -0.021768804639577866, 0.016210399568080902, 0.011194278486073017, -0.04845689609646797, -0.027404678985476494, 0.03573260083794594, -0.025487318634986877, 0.00461182976141572, 0.010012875311076641, 0.01709160953760147, 0.00938343908637762, -0.012133590877056122, 0.005945750046521425, 0.0054373592138290405, 0.0026678405702114105, 0.06294360756874084, 0.040051501244306564, -0.03966415673494339, 0.014486713334918022, 0.017914719879627228, 0.03677843511104584, 0.005335681140422821, -0.022504759952425957, 0.026939863339066505, 0.04659763723611832, -0.00964005570858717, -0.03265320882201195, 0.026203908026218414, -0.07247230410575867, 0.0747189074754715, 0.05143945291638374, 0.01970619149506092, 0.0313556008040905, 0.0736730694770813, -0.0611230842769146, 0.02194310910999775, -0.05922509357333183, -0.07487384229898453, -0.07677183300256729, -0.020722972229123116, -0.026145806536078453, 0.08126503974199295, 0.047527264803647995, 0.02393793873488903, 0.03362157195806503, 0.051090843975543976, 0.01964809000492096 ]
715,651
pytorch_optimizer.optimizer.avagrad
AvaGrad
Domain-independent Dominance of Adaptive Methods. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param adam_debias: bool. Only correct the denominator to avoid inflating step sizes early in training. :param eps: float. term added to the denominator to improve numerical stability.
class AvaGrad(Optimizer, BaseOptimizer): r"""Domain-independent Dominance of Adaptive Methods. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param adam_debias: bool. Only correct the denominator to avoid inflating step sizes early in training. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-1, betas: BETAS = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, adam_debias: bool = False, eps: float = 1e-1, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'adam_debias': adam_debias, 'gamma': None, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'AvaGrad' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** group['step']) prev_bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** (group['step'] - 1)) squared_norm: float = 0.0 num_params: float = 0.0 for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) self.apply_weight_decay( p=p, grad=p.grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) exp_avg = state['exp_avg'] exp_avg.mul_(beta1).add_(grad, alpha=1.0 - beta1) exp_avg_sq = state['exp_avg_sq'] sqrt_exp_avg_sq = exp_avg_sq.sqrt() if group['step'] > 1: de_nom = sqrt_exp_avg_sq.div(prev_bias_correction2_sq).add_(group['eps']) step_size: float = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=group['gamma'] * group['lr'], bias_correction1=bias_correction1, ) p.addcdiv_(exp_avg, de_nom, value=-step_size) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) param_wise_lr = sqrt_exp_avg_sq.div_(bias_correction2_sq).add_(group['eps']) squared_norm += param_wise_lr.norm(-2) ** -2 num_params += param_wise_lr.numel() group['gamma'] = 0.0 if num_params == 0.0 else 1.0 / math.sqrt(squared_norm / num_params) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.1, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, adam_debias: bool = False, eps: float = 0.1)
[ -0.01746418885886669, -0.035185787826776505, -0.02182033658027649, 0.024869639426469803, -0.012543722987174988, -0.008301429450511932, -0.06736186891794205, -0.09536001831293106, -0.02178073488175869, 0.03593821078538895, -0.03399774804711342, -0.009821130894124508, 0.030770236626267433, 0.0707675889134407, -0.044749509543180466, 0.046571169048547745, 0.007682659197598696, 0.05769914388656616, 0.01306844037026167, -0.011593290604650974, -0.06359974294900894, -0.07829184085130692, -0.046214759349823, 0.029938610270619392, -0.03673023730516434, -0.006925283465534449, 0.04419508948922157, -0.013296148739755154, -0.05171934515237808, -0.008242027834057808, 0.0026978410314768553, -0.06930233538150787, 0.0003830191562883556, 0.009345915168523788, 0.05457064136862755, -0.06090685352683067, 0.024038011208176613, -0.0017375085735693574, -0.10145862400531769, -0.0028686216101050377, 0.011157676577568054, -0.04094778001308441, 0.025087445974349976, -0.03841329365968704, 0.00453187758103013, 0.007484652567654848, -0.013593158684670925, 0.05928320065140724, -0.050689708441495895, -0.008499437011778355, 0.018929438665509224, -0.07159921526908875, 0.06411456316709518, 0.01047455333173275, 0.0010636671213433146, 0.052471768110990524, 0.052352964878082275, -0.005960001144558191, 0.057342734187841415, -0.054847847670316696, 0.04768000915646553, -0.08926141262054443, 0.025265652686357498, -0.03096824325621128, -0.002155797788873315, -0.0026037876959890127, -0.06847070902585983, -0.02760213054716587, 0.008276678621768951, 0.02960199862718582, 0.007702459581196308, -0.027404123917222023, 0.013810965232551098, -0.00038735056295990944, -0.01419707853347063, -0.000113157722807955, -0.03728465735912323, -0.030077213421463966, -0.02340438961982727, -0.057342734187841415, 0.03863110393285751, -0.000020052042600582354, -0.01105867326259613, -0.024632031098008156, 0.04082897678017616, -0.049026452004909515, -0.023641997948288918, -0.022929172962903976, 0.04035376012325287, -0.040710173547267914, 0.041462596505880356, -0.032017678022384644, 0.043997082859277725, 0.0417398065328598, 0.04526432603597641, 0.03429475799202919, -0.02140452153980732, -0.05975841358304024, 0.0049625420942902565, -0.024137014523148537, 0.009880533441901207, 0.03748266398906708, 0.019691763445734978, 0.048313628882169724, 0.007336147129535675, -0.053184594959020615, -0.041541799902915955, -0.032314687967300415, 0.0460563525557518, -0.05544186756014824, -0.05702592432498932, 0.02178073488175869, -0.00400963518768549, -0.006841130554676056, -0.040749773383140564, 0.005761994048953056, -0.003935382701456547, 0.033443327993154526, -0.03538379445672035, 0.04775920882821083, 0.04110618680715561, 0.0506105050444603, -0.049026452004909515, 0.028334755450487137, 0.030493028461933136, -0.01912744529545307, 0.028314955532550812, 0.03009701520204544, -0.0013637710362672806, -0.04593754932284355, -0.006435216870158911, 0.003205233020707965, -0.023127179592847824, -0.018483923748135567, 0.05793675407767296, -0.030116815119981766, 0.007920267060399055, 0.026592297479510307, -0.03914592042565346, 0.014949504286050797, 0.019464056938886642, 0.020067976787686348, -0.0007518065976910293, -0.031403858214616776, 0.023622196167707443, 0.012543722987174988, 0.035423394292593, -0.00175112159922719, -0.030790038406848907, -0.0003066009667236358, 0.00564319035038352, 0.012246713042259216, 0.006068904418498278, -0.002816644962877035, 0.015444520860910416, -0.03663123399019241, -0.03948253020644188, 0.0019986298866569996, -0.025503259152173996, -0.012147709727287292, -0.04760080575942993, -0.0251072458922863, -0.007687609177082777, -0.0019577909260988235, 0.005549137014895678, -0.0015939536970108747, -0.003316611750051379, 0.03956173360347748, -0.02847336046397686, 0.01787010207772255, 0.006568871438503265, -0.07353968173265457, -0.014810899272561073, 0.0314236581325531, -0.0458187460899353, 0.10193383693695068, 0.02015708014369011, 0.020176880061626434, 0.015850434079766273, -0.0230677779763937, 0.04090818017721176, -0.0003836379328276962, -0.03504718095064163, -0.05619429424405098, -0.016147444024682045, 0.027998143807053566, -0.005940200295299292, 0.009276612661778927, -0.014088175259530544, 0.0197907667607069, -0.011197277344763279, -0.03017621673643589, 0.03807668387889862, -0.03625502064824104, -0.010256745852530003, 0.010801264084875584, 0.010514154098927975, 0.008509336970746517, 0.07441090792417526, 0.039046917110681534, 0.024077611044049263, -0.000660228484775871, 0.019068043678998947, -0.008058872073888779, -0.016394952312111855, 0.005410532467067242, -0.02556266263127327, 0.01629594899713993, -0.0020221432205289602, -0.0010760425357148051, -0.050570905208587646, 0.021107511594891548, 0.02859216369688511, 0.02419641613960266, 0.026077479124069214, -0.043086253106594086, 0.054808247834444046, 0.03603721410036087, 0.05920399725437164, 0.015444520860910416, 0.0023018275387585163, -0.0791630670428276, 0.008776646107435226, -0.018810633569955826, 0.07710380107164383, -0.029582196846604347, 0.04514552280306816, 0.003106229705736041, -0.010326048359274864, -0.028334755450487137, 0.03096824325621128, -0.056511104106903076, -0.0022052994463592768, 0.000010383748303866014, 0.07064878195524216, 0.041660603135824203, -0.034809574484825134, 0.008430134505033493, -0.01259322464466095, -0.008786546066403389, -0.01525641418993473, -0.016484055668115616, -0.027067512273788452, 0.056629911065101624, -0.02257276140153408, 0.0034873925615102053, 0.056709110736846924, 0.03459176793694496, -0.01754339225590229, 0.001040153787471354, -0.0415814034640789, -0.031403858214616776, -0.024295419454574585, 0.04950166866183281, -0.07650978118181229, 0.013375351205468178, 0.04779881238937378, 0.05425382778048515, 0.0231073796749115, -0.06712426245212555, 0.004452675115317106, -0.0357402041554451, -0.07635137438774109, 0.056709110736846924, -0.010840865783393383, 0.05805555731058121, 0.08862778544425964, -0.03372053802013397, 0.03465116769075394, 0.03706685081124306, 0.03706685081124306, 0.0917166918516159, -0.06383734941482544, -0.00885584857314825, 0.012147709727287292, 0.04946206882596016, -0.006301562301814556, 0.003121080342680216, 0.0026730902027338743, 0.008984552696347237, 0.05041249841451645, -0.040551766753196716, -0.043917879462242126, 0.014127776026725769, -0.025820070877671242, 0.03225528821349144, -0.016187045723199844, 0.009647875092923641, 0.04855123534798622, 0.03300771117210388, 0.04716518893837929, 0.0013798590516671538, 0.08712293952703476, 0.004596230108290911, 0.07841064035892487, 0.03403734788298607, 0.0229489728808403, 0.044907912611961365, -0.03710645064711571, -0.01103887241333723, 0.05140253156423569, 0.016513757407665253, 0.026592297479510307, 0.012108108028769493, -0.03437395766377449, -0.032275088131427765, 0.016107842326164246, 0.013266447000205517, 0.06886672228574753, -0.01049435418099165, -0.022671764716506004, -0.020335284993052483, -0.005083821248263121, 0.03783907741308212, -0.01153388898819685, -0.10232985019683838, -0.004400698468089104, -0.05857037380337715, 0.040710173547267914, 0.056550707668066025, -0.04419508948922157, 0.06827270239591599, 0.023424189537763596, -0.0251864492893219, -0.030611831694841385, -0.03043362684547901, 0.05136293172836304, 0.03512638434767723, -0.021721333265304565, -0.019018542021512985, -0.053144991397857666, -0.013959470205008984, 0.037423260509967804, 0.02772093378007412, -0.04031416028738022, -0.03320571780204773, 0.03995774686336517, 0.02318658120930195, 0.010316147468984127, -0.04185860976576805, 0.03403734788298607, 0.054966654628515244, -0.03678964078426361, 0.03154246509075165, 0.009430067613720894, -0.0667678490281105, 0.019483856856822968, 0.020830301567912102, 0.00777176208794117, 0.017949305474758148, -0.0018377494998276234, -0.00982608087360859, -0.00031928575481288135, 0.10225065052509308, 0.058332767337560654, 0.007281695492565632, -0.007370798382908106, -0.022869771346449852, 0.04078937694430351, -0.054095424711704254, -0.010316147468984127, 0.030037613585591316, -0.06609462946653366, 0.06185728684067726, 0.08252917975187302, 0.0014070849865674973, -0.023245984688401222, -0.062411703169345856, 0.049105655401945114, -0.04122499004006386, 0.020137278363108635, -0.0625305101275444, -0.005865947809070349, -0.01920664682984352, -0.036552030593156815, -0.015771232545375824, -0.004390798043459654, -0.014315882697701454, 0.04779881238937378, 0.040373560041189194, 0.0421358197927475, -0.015701929107308388, 0.01595933735370636, 0.045581135898828506, 0.041541799902915955, -0.0188304353505373, 0.0337403379380703, -0.007855914533138275, 0.05033329874277115, -0.04510591924190521, 0.038967713713645935, 0.01862252876162529, -0.009133057668805122, 0.0008823672542348504, -0.07326246798038483, 0.03298791125416756, 0.03271070122718811, 0.040710173547267914, -0.06197609007358551, -0.046214759349823, -0.03067123331129551, -0.00589069863781333, 0.017642395570874214, 0.01608804240822792, -0.015008905902504921, -0.09314233809709549, 0.03508678451180458, 0.061738479882478714, 0.0014095599763095379, 0.10423071682453156, -0.01746418885886669, 0.009286513552069664, -0.03916572034358978, 0.05009568855166435, -0.002181786112487316, -0.015454420819878578, -0.023760801181197166, -0.009657775983214378, 0.005999602377414703, 0.02801794558763504, 0.037146054208278656, 0.012266513891518116, 0.024711232632398605, 0.03263150155544281, 0.02065209671854973, -0.0038586549926549196, -0.07801462709903717, -0.007459901738911867, -0.061580076813697815, -0.0417398065328598, 0.026612097397446632, -0.010197344236075878, -0.02851296216249466, -0.022473758086562157, -0.0272655189037323, 0.0026681399904191494, -0.013236746191978455, 0.05263017490506172, 0.05025409534573555, -0.01621674746274948, 0.009474619291722775, -0.02639429084956646, 0.020256083458662033, -0.007925217039883137, -0.010167642496526241, -0.03455216437578201, 0.04431389272212982, -0.030532630160450935, -0.07310406118631363, -0.023800402879714966, 0.021265916526317596, -0.0007041612407192588, 0.046491969376802444, 0.0044328742660582066, -0.0025221100077033043, -0.0009733265615068376, -0.0021681732032448053, -0.03275030478835106, 0.023344988003373146, 0.014305982738733292, 0.020691698417067528, 0.02219654805958271, -0.04098738357424736, 0.015157410874962807, -0.024453824386000633, 0.05171934515237808, 0.08545967936515808, -0.011484387330710888, -0.005821396131068468, 0.01829581707715988, 0.0009566197404637933, -0.0063164131715893745, 0.01198930386453867, -0.04962047189474106, -0.052392564713954926, 0.006356014404445887, -0.013276347890496254, -0.008370731957256794, 0.01649395562708378, -0.002851296216249466, 0.03546299412846565, -0.0629265233874321, 0.020374886691570282, 0.05631309747695923, 0.026235884055495262, 0.029859406873583794, 0.0046308813616633415, 0.030691035091876984, 0.005806545726954937, 0.028988176956772804, -0.04023495689034462, -0.06379774957895279, 0.041422996670007706, 0.038215287029743195, -0.05773874744772911, -0.06272851675748825, 0.03403734788298607, -0.009296413511037827, 0.07357928156852722, -0.03437395766377449, 0.019642261788249016, -0.01566232740879059, -0.07353968173265457, -0.014127776026725769, 0.04855123534798622, -0.037383660674095154, -0.05524386093020439, 0.031819671392440796, -0.04447229951620102, 0.015820734202861786, -0.03807668387889862, -0.01230611465871334, 0.017177078872919083, 0.004103688523173332, 0.015890035778284073, -0.023166781291365623, -0.000539877568371594, 0.04269023984670639, 0.03506698086857796, -0.0312652550637722, 0.01398917194455862, 0.029859406873583794, -0.02419641613960266, -0.006895582657307386, 0.01803840883076191, 0.054966654628515244, -0.017800800502300262, -0.010187443345785141, 0.0336611345410347, -0.0030988045036792755, 0.0036185719072818756, -0.0293445885181427, 0.03528479114174843, 0.06938154250383377, -0.010128041729331017, -0.014523789286613464, 0.008524187840521336, -0.05560027435421944, -0.09623124450445175, -0.011108174920082092, 0.005672891158610582, 0.008974652737379074, -0.008524187840521336, -0.035601601004600525, -0.015434619970619678, 0.037344060838222504, 0.00537093123421073, 0.035106584429740906, -0.031443461775779724, -0.01625634729862213, -0.016355350613594055, 0.012919935397803783, -0.0009881770238280296, 0.0395815335214138, 0.03263150155544281, 0.010642859153449535, -0.058174360543489456, 0.025206249207258224, 0.01338525116443634, 0.0038141035474836826, -0.04617515578866005, -0.06023363023996353, 0.0051828245632350445, -0.03799748048186302, -0.008138074539601803, 0.0293445885181427, 0.013702061958611012, -0.01737508550286293, -0.03071083500981331, 0.022770768031477928, -0.023840004578232765, -0.05358060821890831, -0.021008508279919624, -0.001376146450638771, -0.05286778137087822, 0.02669130079448223, 0.005316479131579399, -0.021562926471233368, -0.01899874024093151, -0.04086857661604881, 0.04870964214205742, -0.04926406219601631, -0.03686884418129921, -0.02863176539540291, 0.025721067562699318, 0.040591370314359665, -0.04791761562228203, 0.049897681921720505, 0.029819805175065994, 0.0030270270071923733, -0.03770047053694725, 0.049778878688812256, -0.033265121281147, -0.05765954405069351, -0.03882911056280136, 0.041660603135824203, -0.04280904307961464, 0.016781065613031387, 0.021127311512827873, 0.019642261788249016, -0.05730313062667847, 0.0019738790579140186, 0.07227243483066559, -0.013533756136894226, 0.002260988811030984, 0.0036086717154830694, 0.008039071224629879, 0.013375351205468178, 0.03876970708370209, -0.06023363023996353, -0.022513359785079956, -0.0018426995957270265, -0.013741663657128811, -0.01187050063163042, -0.04007655009627342, -0.013820866122841835, -0.022176748141646385, 0.019068043678998947, 0.07662858068943024, 0.030453426763415337, -0.017137477174401283, -0.005628339946269989, -0.00864794198423624, 0.015850434079766273, -0.019879870116710663, -0.03762126713991165, 0.04688798263669014, -0.09607283771038055, -0.0041086385026574135, -0.014315882697701454, 0.00041859850171022117, 0.02609727904200554, -0.00725199468433857, -0.019691763445734978, 0.028196150436997414, -0.009296413511037827, 0.03831429034471512, 0.012543722987174988, -0.03645302727818489, -0.04045276343822479, -0.003420565277338028, 0.026117080822587013, -0.013830766081809998, 0.02178073488175869, 0.0009293938637711108, -0.010959669947624207, -0.01292983628809452, 0.01284073293209076, 0.04542273283004761, 0.026572495698928833, -0.005356080364435911, 0.01629594899713993, -0.05758034065365791, -0.016523657366633415, -0.004140814766287804, 0.013167443685233593, 0.026988310739398003, 0.06209489330649376, 0.013167443685233593, -0.022097544744610786, 0.00912315770983696, -0.018761131912469864, 0.0026829903945326805, -0.006128306500613689, -0.03243349492549896, 0.02041448839008808, -0.008133124560117722, 0.029483193531632423, 0.015721730887889862, 0.00534122996032238, -0.07959868013858795, -0.021127311512827873, -0.0589267872273922, 0.014395085163414478, 0.008509336970746517, -0.014602992683649063, 0.034472960978746414, -0.037423260509967804, -0.031740471720695496, -0.012296214699745178, 0.03952213376760483, 0.05033329874277115, 0.01874133199453354, -0.014612892642617226, 0.029403991997241974, -0.04114578664302826, -0.019058141857385635, 0.0046308813616633415, 0.018672030419111252, -0.02124611660838127, -0.07310406118631363, -0.023701399564743042, 0.017988907173275948, -0.018107710406184196, 0.06565901637077332, -0.08110353350639343, -0.02609727904200554, -0.030196018517017365, -0.00430169515311718, -0.057342734187841415, -0.0009114494896493852, -0.023721199482679367, -0.04134379327297211, 0.04098738357424736, 0.030770236626267433, 0.07421290129423141, 0.026235884055495262, 0.007420300040394068, 0.004521977622061968, -0.014701995998620987, 0.01728598214685917, 0.007910367101430893, -0.001910764374770224, -0.0042794193141162395, 0.0586099773645401, 0.019384853541851044, 0.028671367093920708, -0.03528479114174843, -0.03376013785600662, 0.06371854990720749, -0.02681010402739048, 0.013573357835412025, 0.020186780020594597, -0.004071512259542942, -0.03706685081124306, -0.05259057134389877, 0.002690415596589446, -0.025206249207258224, 0.033106714487075806, -0.02639429084956646, 0.043165456503629684, 0.030235620215535164, -0.003660648362711072, -0.001985016977414489, -0.033067114651203156, -0.004796711727976799, 0.028037745505571365, 0.0017721597105264664, -0.020335284993052483, 0.03611641749739647, -0.01187050063163042, 0.032195884734392166, -0.0315028615295887, -0.03286910802125931, 0.0006787916645407677, 0.03237409144639969, -0.020968906581401825, -0.027483327314257622, 0.03863110393285751, -0.056431904435157776, 0.04874924197793007, 0.015771232545375824, 0.01945415511727333, 0.046214759349823, 0.0671638622879982, -0.059005990624427795, 0.0357402041554451, -0.05880798399448395, -0.062451306730508804, -0.11112134903669357, 0.012692227959632874, -0.03532439097762108, 0.05920399725437164, 0.017780998721718788, 0.004994718357920647, 0.0003025789628736675, 0.019176946952939034, 0.011890300549566746 ]
715,653
pytorch_optimizer.optimizer.avagrad
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-1, betas: BETAS = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, adam_debias: bool = False, eps: float = 1e-1, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'adam_debias': adam_debias, 'gamma': None, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.1, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, adam_debias: bool = False, eps: float = 0.1)
[ 0.012395516969263554, -0.029428618028759956, -0.022710800170898438, -0.006856180727481842, -0.05297914519906044, -0.024791033938527107, -0.08664456754922867, -0.03647087514400482, -0.017023557797074318, 0.03566931560635567, -0.03652812913060188, 0.0363563671708107, 0.015792595222592354, 0.07500289380550385, -0.05137602984905243, 0.03736785426735878, 0.028684314340353012, 0.029943903908133507, -0.0019215913489460945, 0.003525899490341544, 0.00021485204342752695, -0.0166323222219944, -0.04519258439540863, 0.11359217017889023, 0.012128330767154694, 0.03160427510738373, -0.0035092004109174013, 0.014284903183579445, -0.032940201461315155, 0.01454254612326622, 0.025115473195910454, -0.015334561467170715, -0.004468206781893969, 0.05927709862589836, 0.03927632421255112, -0.015048290602862835, -0.010181690566241741, 0.01009580958634615, -0.07862898707389832, 0.03591741621494293, 0.07710221409797668, -0.031337086111307144, 0.06805606186389923, -0.04683386906981468, -0.02232910692691803, -0.013683734461665154, 0.03958168253302574, 0.04889501631259918, -0.02236727625131607, -0.02189015783369541, 0.02334059588611126, -0.037062499672174454, 0.04091760888695717, -0.018330860882997513, -0.05336083844304085, 0.042864251881837845, 0.04843698441982269, 0.05332266911864281, 0.038627445697784424, 0.017557930201292038, 0.009313336573541164, -0.04000154510140419, 0.028741568326950073, -0.026680419221520424, -0.0008916135993786156, -0.009403988718986511, -0.0864918902516365, -0.023569611832499504, 0.025306319817900658, 0.038207583129405975, 0.09702664613723755, -0.005873318295925856, -0.02862706035375595, 0.030363768339157104, -0.01036299578845501, -0.0014909927267581224, -0.07752207666635513, -0.04813162982463837, -0.0682087391614914, -0.010935536585748196, 0.05729229003190994, 0.03360816836357117, -0.02908509224653244, -0.05129969120025635, 0.020420635119080544, -0.046910207718610764, -0.0312989167869091, -0.05023094639182091, 0.03637545183300972, 0.01918967254459858, -0.06286502629518509, -0.03181420639157295, 0.023760460317134857, -0.016794541850686073, 0.06847592443227768, 0.011345857754349709, 0.015983441844582558, -0.05652889981865883, 0.025287235155701637, -0.011069130152463913, -0.01508646085858345, -0.007156765088438988, -0.03773046284914017, 0.00035604904405772686, 0.012166500091552734, -0.03778772056102753, -0.05145236849784851, -0.039238154888153076, 0.04927671328186989, -0.06790338456630707, -0.03337915241718292, 0.06191078945994377, -0.0232833418995142, 0.0320432223379612, -0.050536300987005234, 0.02433300018310547, 0.03263484686613083, 0.023569611832499504, 0.003972004633396864, 0.020401550456881523, 0.02650865726172924, 0.030936308205127716, -0.02654682658612728, 0.048055291175842285, 0.05152870714664459, -0.008349559269845486, 0.01192794181406498, 0.008134855888783932, 0.025210896506905556, -0.01710943877696991, 0.04454370588064194, -0.004124682396650314, -0.037596870213747025, -0.0259552001953125, 0.025191811844706535, -0.028283534571528435, 0.011364942416548729, 0.057979337871074677, -0.03225315362215042, 0.010277114808559418, 0.0593152679502964, 0.007371468003839254, 0.028913330286741257, -0.022252768278121948, -0.016508271917700768, 0.01040116511285305, -0.008974582888185978, -0.044963568449020386, -0.013197074644267559, 0.04351313039660454, 0.03574565425515175, 0.009489870630204678, -0.025630760937929153, 0.040230561047792435, 0.0031298918183892965, -0.04939122125506401, 0.017309829592704773, -0.012824922800064087, -0.0007800873718224466, 0.020477889105677605, -0.02074507623910904, 0.029371364042162895, 0.02492462657392025, -0.0228634774684906, -0.011851602233946323, 0.015792595222592354, -0.04122296720743179, 0.017386168241500854, 0.0006995737785473466, -0.017529303207993507, 0.0065985373221337795, -0.08672090619802475, -0.03273027017712593, 0.021718395873904228, 0.003251556772738695, 0.04462004452943802, 0.02961946465075016, -0.006803697906434536, 0.005343717988580465, -0.015344103798270226, 0.06576589494943619, -0.0014444737462326884, -0.026890350505709648, -0.06114739924669266, 0.02645140327513218, 0.008182567544281483, -0.043856654316186905, 0.0572541207075119, -0.04832247644662857, 0.018569419160485268, 0.047024715691804886, 0.021145854145288467, 0.018817519769072533, 0.022977987304329872, -0.01706172712147236, 0.018035046756267548, 0.03790222853422165, -0.019533196464180946, -0.0055011664517223835, 0.06255966424942017, 0.0683995857834816, 0.024199407547712326, 0.01321615930646658, -0.020974092185497284, 0.028378957882523537, -0.007595713250339031, -0.016451016068458557, -0.0003697661741171032, -0.027825502678751945, -0.03889463096857071, -0.005377116147428751, -0.01713806577026844, 0.04733007028698921, 0.020477889105677605, -0.006631935480982065, -0.05362802371382713, -0.006531741004437208, 0.02439025416970253, 0.012042449787259102, -0.0006560367764905095, 0.08786598592996597, -0.03110807202756405, -0.0077436198480427265, -0.005873318295925856, 0.05309365317225456, 0.01867438480257988, 0.04435285925865173, -0.03942900523543358, -0.07954505831003189, 0.03633728250861168, -0.02072599157691002, -0.04431468993425369, -0.041299305856227875, -0.012214211747050285, 0.02383679896593094, 0.003096493659541011, -0.033054713159799576, 0.030764546245336533, -0.08351467549800873, -0.04202452301979065, 0.05717778205871582, 0.029772141948342323, -0.0030583241023123264, -0.011460366658866405, 0.016527356579899788, 0.003411391284316778, 0.030287429690361023, 0.012109246104955673, -0.06370475143194199, -0.028875160962343216, -0.04255889356136322, -0.014943324960768223, 0.006837096065282822, 0.04526892304420471, -0.057941168546676636, 0.018025504425168037, 0.030230175703763962, 0.0015315476339310408, 0.02282530814409256, -0.008869617246091366, -0.004107982851564884, 0.002640846185386181, -0.020420635119080544, 0.08687358349561691, 0.014456665143370628, 0.032921116799116135, 0.011803890578448772, -0.01008626725524664, 0.027806418016552925, 0.00022081601491663605, 0.1318371593952179, 0.031318001449108124, -0.0098381657153368, -0.005458225961774588, -0.0019359049620106816, -0.018473995849490166, -0.0024034802336245775, -0.026260556653141975, -0.009046151302754879, 0.050078269094228745, 0.030325599014759064, -0.049658406525850296, 0.012118788436055183, 0.008936413563787937, 0.005276921205222607, 0.0032277009449899197, -0.014447122812271118, 0.03255850821733475, -0.0003700643719639629, 0.01480018999427557, 0.013922293670475483, 0.013387921266257763, 0.0749647244811058, 0.02133670262992382, 0.09183561056852341, -0.018817519769072533, 0.05038362368941307, 0.0009512533433735371, 0.0560326986014843, -0.006560367997735739, 0.05049813166260719, -0.04118479788303375, 0.06068936735391617, -0.007595713250339031, -0.05301731452345848, -0.03339823707938194, 0.039123646914958954, 0.023894052952528, 0.043360453099012375, 0.0498492531478405, 0.030535530298948288, 0.02185198850929737, 0.05149053782224655, 0.02433300018310547, 0.03253942355513573, -0.0685904324054718, 0.019122876226902008, -0.06023133173584938, 0.032978374511003494, 0.03931449353694916, -0.004601799882948399, 0.03593650087714195, -0.0006124997744336724, -0.025363575667142868, -0.0759953036904335, -0.054811276495456696, 0.027749164029955864, 0.02021070383489132, -0.03309288248419762, -0.008492694236338139, -0.0467575304210186, 0.0037382168229669333, 0.019017910584807396, -0.025726184248924255, -0.055345647037029266, 0.0010019470937550068, 0.005296005867421627, 0.05030728504061699, -0.008106228895485401, -0.036585383117198944, 0.08824767917394638, -0.031413428485393524, -0.012013822793960571, 0.03647087514400482, -0.006192987319082022, -0.041261136531829834, -0.003733445657417178, -0.022004665806889534, 0.03524945303797722, 0.006121419370174408, -0.006713045295327902, 0.009475557133555412, 0.003459102939814329, 0.0935150608420372, 0.03315013647079468, -0.020496975630521774, -0.01662277989089489, -0.00013597853831015527, 0.03160427510738373, -0.040268730372190475, -0.027195706963539124, 0.0065126558765769005, -0.04771176725625992, 0.05610903725028038, 0.024103984236717224, -0.01294897310435772, 0.007409637328237295, -0.04252072423696518, 0.040306899696588516, 0.004184321966022253, 0.03586016222834587, -0.055307477712631226, -0.02811177261173725, -0.015477697364985943, 0.01759609952569008, -0.0077054500579833984, -0.030363768339157104, 0.00878850743174553, 0.049162205308675766, 0.00206949794664979, 0.005229209549725056, -0.005224438384175301, 0.05759764462709427, 0.029256854206323624, 0.00784381479024887, -0.034600574523210526, 0.00440856721252203, 0.018397657200694084, 0.0708424299955368, -0.0020766546949744225, 0.0021840061526745558, -0.006574681494385004, 0.024485677480697632, -0.01929463818669319, -0.05920075997710228, 0.03208139166235924, 0.0372915156185627, 0.038646530359983444, -0.04710105434060097, -0.040268730372190475, -0.0166323222219944, -0.04683386906981468, -0.013760073110461235, 0.03418070822954178, -0.015353646129369736, -0.004539774730801582, 0.008702626451849937, 0.03568840026855469, 0.01757701486349106, 0.07527007907629013, -0.005443912465125322, -0.003626094199717045, -0.03059278428554535, -0.004826045129448175, -0.03324555978178978, -0.024638356640934944, -0.0021553789265453815, -0.01067789364606142, 0.028703399002552032, -0.015401357784867287, 0.026699503883719444, 0.010563384741544724, 0.06713999807834625, 0.012452770955860615, 0.07057524472475052, 0.061490923166275024, -0.02803543396294117, 0.004661439452320337, -0.007576628588140011, -0.059009913355112076, -0.04744458198547363, -0.011317230761051178, -0.034543316811323166, -0.041299305856227875, 0.02234819158911705, 0.01668003387749195, -0.008607202209532261, -0.004499219357967377, 0.00440856721252203, -0.025153642520308495, 0.01564945839345455, -0.07095693796873093, 0.011784805916249752, -0.024275746196508408, -0.056338053196668625, -0.030287429690361023, 0.02858889102935791, -0.004787875805050135, -0.038627445697784424, -0.011803890578448772, 0.021699311211705208, 0.006708274129778147, 0.0426352359354496, -0.016737287864089012, -0.01720486208796501, -0.0354212149977684, -0.015954814851284027, -0.023207003250718117, 0.041871845722198486, -0.00725218839943409, 0.05675791576504707, -0.022214598953723907, -0.018015962094068527, -0.015353646129369736, -0.050536300987005234, 0.024752864614129066, 0.0675598606467247, -0.011727551929652691, -0.005787437316030264, 0.005567963235080242, 0.0036881195846945047, 0.011488993652164936, 0.03734876960515976, -0.02916143089532852, -0.05675791576504707, 0.012643617577850819, -0.0033684507943689823, -0.021718395873904228, -0.012366889975965023, -0.014475749805569649, 0.010830570943653584, -0.0436658076941967, 0.01568762958049774, 0.07023172080516815, 0.013798242434859276, -0.002143451012670994, -0.05717778205871582, 0.006818011403083801, 0.01612657681107521, 0.045917805284261703, -0.0832093209028244, -0.022653546184301376, 0.03015383705496788, 0.0601549930870533, -0.03108898736536503, -0.020058026537299156, 0.03431430086493492, 0.022214598953723907, 0.03225315362215042, 0.016346050426363945, 0.004277359694242477, -0.03677622973918915, -0.04622315987944603, -0.028951499611139297, 0.02704302966594696, -0.05576551333069801, -0.08832401782274246, -0.0034090057015419006, -0.027691908180713654, -0.00338037870824337, -0.02952404133975506, -0.00807760190218687, -0.02120310813188553, 0.005720640532672405, -0.03137525916099548, -0.024791033938527107, -0.04328411445021629, 0.05240660533308983, -0.0018428670009598136, -0.02652774192392826, 0.04836064577102661, 0.05099433660507202, 0.04305509850382805, -0.0323294922709465, 0.002292550401762128, 0.04580329358577728, 0.02397039160132408, -0.0405740849673748, 0.07527007907629013, 0.017968250438570976, 0.0014325458323583007, -0.06183444708585739, -0.04240621626377106, 0.04836064577102661, -0.002669473411515355, 0.027291130274534225, 0.022138260304927826, -0.02643231861293316, -0.0446963831782341, -0.03110807202756405, 0.01982901059091091, 0.027710992842912674, 0.009456472471356392, -0.04274974390864372, -0.011775263585150242, 0.003759687067940831, -0.031432513147592545, 0.07939238101243973, -0.05244477465748787, -0.023684119805693626, 0.015554036013782024, -0.022081004455685616, -0.051108844578266144, 0.022081004455685616, 0.020420635119080544, -0.013063482008874416, 0.006569910328835249, 0.0019418689189478755, 0.05813201516866684, 0.01977175660431385, -0.020420635119080544, -0.01876026578247547, -0.012576821260154247, 0.006178673822432756, -0.008416355587542057, -0.009361048229038715, 0.0029843710362911224, -0.028684314340353012, -0.05824652314186096, 0.023226087912917137, 0.0032682560849934816, -0.020382465794682503, 0.007094739470630884, 0.011469908989965916, -0.04091760888695717, 0.013187532313168049, -0.016231542453169823, 0.026069708168506622, -0.05507846176624298, -0.04191001504659653, 0.006297952961176634, -0.02753923088312149, -0.12183676660060883, -0.07259822636842728, 0.034028030931949615, -0.00390997901558876, -0.05080348998308182, 0.0025454226415604353, -0.008106228895485401, 0.021642057225108147, -0.005787437316030264, 0.05019277706742287, -0.021031346172094345, -0.02133670262992382, -0.05381887033581734, 0.01425627525895834, -0.025268150493502617, -0.020115280523896217, 0.02851255051791668, 0.06007865443825722, -0.07427767664194107, -0.011784805916249752, 0.0290469229221344, 0.011126384139060974, 0.009532811120152473, -0.0011283832136541605, -0.015859391540288925, 0.04816979914903641, 0.027768248692154884, -0.060536690056324005, -0.0018488309578970075, -0.02387496829032898, -0.004353698808699846, -0.011899314820766449, -0.01618383079767227, -0.039734359830617905, -0.03576473891735077, 0.016727745532989502, 0.07962139695882797, -0.008564261719584465, -0.0048570577055215836, -0.041833676397800446, -0.009442158043384552, 0.04431468993425369, -0.06469715386629105, -0.024123068898916245, 0.007834271527826786, -0.12420327216386795, 0.0041819363832473755, -0.026852181181311607, 0.04771176725625992, -0.0088553037494421, -0.011822975240647793, -0.04622315987944603, -0.0011343472870066762, 0.01963816210627556, 0.01872209645807743, 0.018941571936011314, 0.02690943516790867, -0.018989283591508865, 0.008134855888783932, 0.056872423738241196, -0.016403304412961006, -0.0013919908087700605, -0.002240067347884178, -0.03700524568557739, -0.019084706902503967, -0.006274097133427858, 0.046452175825834274, 0.03694799169898033, -0.02694760635495186, 0.042291708290576935, -0.050612639635801315, -0.009279938414692879, -0.007691136561334133, -0.0028913330752402544, 0.01605023816227913, 0.032863862812519073, 0.04866600036621094, -0.029275938868522644, -0.026604080572724342, -0.02706211432814598, 0.04152832180261612, 0.010859197936952114, -0.00504313362762332, 0.0013407006626948714, -0.035592976957559586, -0.01190885715186596, -0.02587886154651642, -0.015888018533587456, -0.06641478091478348, -0.008273220621049404, -0.04378031566739082, -0.0039529199711978436, 0.019418688490986824, 0.02599336951971054, -0.05538381636142731, -0.027329299598932266, 0.018884316086769104, -0.015773510560393333, 0.052101247012615204, 0.042864251881837845, -0.0009971759282052517, -0.0486278310418129, 0.009971759282052517, -0.012032907456159592, -0.0772167220711708, 0.04435285925865173, -0.01616474613547325, -0.02916143089532852, -0.055841851979494095, -0.010248487815260887, 0.028875160962343216, 0.007209247909486294, 0.02549716830253601, -0.03526853770017624, -0.06233065202832222, -0.0698118582367897, 0.015220053493976593, -0.022691715508699417, -0.011880230158567429, -0.003807398956269026, -0.05759764462709427, 0.06828507781028748, -0.023474188521504402, 0.028722483664751053, 0.00738578150048852, 0.0033088109921664, 0.014227648265659809, -0.04255889356136322, 0.031031733378767967, 0.045421600341796875, 0.028951499611139297, -0.08069013804197311, -0.013034854084253311, 0.043360453099012375, 0.04149015247821808, -0.02021070383489132, -0.050116438418626785, 0.014218105934560299, -0.03696707636117935, -0.004823659546673298, 0.027405638247728348, -0.009127261117100716, 0.005544107407331467, -0.08191155642271042, -0.03700524568557739, 0.010315284132957458, 0.043856654316186905, -0.028226280584931374, 0.05240660533308983, 0.026814011856913567, -0.03624185919761658, -0.0021172096021473408, -0.0009864408057183027, -0.03179512172937393, 0.04660485312342644, 0.0071090529672801495, 0.06740718334913254, 0.07034622877836227, 0.011498535983264446, 0.034390639513731, -0.04328411445021629, -0.004599414300173521, 0.0016496343305334449, 0.04412383958697319, -0.015210511162877083, -0.009236997924745083, 0.07038439810276031, -0.01706172712147236, -0.012319178320467472, -0.020019857212901115, 0.016737287864089012, 0.03734876960515976, 0.06870494037866592, -0.04297875985503197, 0.021031346172094345, -0.027424722909927368, -0.06744535267353058, -0.10366812348365784, -0.010572927072644234, -0.04816979914903641, 0.07427767664194107, 0.014275360852479935, 0.012433686293661594, 0.010792401619255543, 0.04191001504659653, 0.009380132891237736 ]
715,656
pytorch_optimizer.optimizer.avagrad
__str__
null
def __str__(self) -> str: return 'AvaGrad'
(self) -> str
[ 0.009474015794694424, -0.03453926369547844, 0.024605177342891693, 0.010828663595020771, 0.006994754541665316, -0.05643514171242714, -0.0019233444472774863, -0.021708445623517036, 0.07708713412284851, -0.030722392722964287, -0.028779879212379456, -0.00870723370462656, 0.010530470870435238, 0.015914982184767723, 0.006360029336065054, -0.005013901274651289, 0.01066678762435913, -0.04546164348721504, 0.01123761385679245, 0.02390655316412449, -0.0044558546505868435, 0.012864895164966583, -0.01985112950205803, -0.024758534505963326, -0.01104165893048048, 0.04750639572739601, 0.02857540361583233, -0.030023768544197083, -0.029001392424106598, -0.015165240503847599, -0.007876553572714329, -0.04965338483452797, -0.01050491165369749, 0.02020896226167679, -0.02642841450870037, -0.005963858682662249, -0.031438056379556656, -0.008749832399189472, -0.040452003479003906, -0.006568764336407185, 0.004958522506058216, 0.013750954531133175, -0.04304201900959015, -0.018181249499320984, -0.03237523138523102, -0.041849248111248016, -0.03435182571411133, 0.0243836622685194, -0.0109479408711195, -0.017252590507268906, -0.0025239901151508093, -0.0028733019717037678, -0.03912291303277016, 0.015778666362166405, -0.008860589936375618, 0.043894000351428986, 0.030756471678614616, -0.013682795688509941, -0.011382450349628925, 0.03803237900137901, -0.007335546426475048, -0.03142101690173149, 0.05957042798399925, -0.0311995018273592, -0.0051033589988946915, 0.047335997223854065, -0.017584864050149918, 0.053913284093141556, 0.030995026230812073, 0.04283754527568817, 0.023139771074056625, -0.027774542570114136, -0.007535761687904596, 0.0052396757528185844, 0.03537420183420181, -0.01604278013110161, -0.09037801623344421, -0.01590646244585514, 0.00522263627499342, -0.05493566021323204, 0.03827093541622162, -0.014994844794273376, -0.0101981982588768, -0.016664724797010422, 0.0021203646901994944, -0.09235461056232452, -0.033261291682720184, -0.05820726230740547, -0.026547690853476524, 0.002151248976588249, -0.008051209151744843, -0.009235461242496967, -0.04423479363322258, 0.04266715049743652, -0.02624097838997841, -0.01107573788613081, 0.007416484411805868, -0.05912739783525467, 0.0014270661631599069, 0.016494330018758774, 0.025116365402936935, 0.021060941740870476, -0.02221963368356228, 0.017976773902773857, -0.019987447187304497, -0.06049056723713875, -0.03177884593605995, 0.025832029059529305, 0.034811895340681076, 0.0015804225113242865, -0.03009192645549774, 0.002171483589336276, 0.039191070944070816, 0.006849917583167553, -0.019118426367640495, -0.0396341010928154, 0.009150262922048569, -0.0020032175816595554, 0.02244114875793457, -0.005546388681977987, 0.037896063178777695, 0.01504596322774887, -0.04740415886044502, 0.041849248111248016, 0.05684409290552139, 0.0895601212978363, -0.040520161390304565, 0.019152507185935974, 0.01355499867349863, -0.0561625100672245, 0.0659773200750351, 0.00476682698354125, -0.06638626754283905, -0.03353392705321312, 0.08022242039442062, 0.0008583696908317506, 0.06417112052440643, 0.013870231807231903, 0.05241379886865616, 0.12854671478271484, -0.00551230926066637, -0.002276916056871414, 0.017789337784051895, 0.011552846059203148, 0.0032140938565135, 0.030057847499847412, -0.044677820056676865, 0.06543204933404922, -0.02007264457643032, 0.013495360501110554, 0.02857540361583233, 0.04249675199389458, 0.023327207192778587, -0.03557867556810379, 0.007672078441828489, -0.02792789787054062, -0.0008285503718070686, -0.039191070944070816, 0.027450790628790855, -0.01867539808154106, 0.003963836003094912, -0.02370207943022251, 0.015318596735596657, 0.017252590507268906, 0.02121429704129696, 0.026632890105247498, 0.006828618235886097, 0.03441998362541199, -0.02085646614432335, -0.011825479567050934, -0.032511550933122635, -0.10809919983148575, -0.08587956428527832, 0.049960095435380936, -0.00269225612282753, 0.020651990547776222, 0.004104412626475096, 0.09842070937156677, 0.043280575424432755, -0.03292050212621689, -0.0016805301420390606, 0.018862832337617874, -0.0709528774023056, 0.007007534150034189, 0.055992115288972855, -0.07197525352239609, -0.006662482395768166, 0.033619124442338943, 0.04478006064891815, -0.04031568393111229, 0.0028136633336544037, 0.006087395828217268, -0.03334648907184601, -0.011842519976198673, 0.012004395946860313, -0.06233084201812744, -0.009789247997105122, -0.054049599915742874, 0.020481595769524574, 0.006939375773072243, 0.00791489239782095, 0.022390030324459076, -0.016221696510910988, 0.05115287005901337, 0.04239451512694359, 0.007906372658908367, 0.035817231982946396, -0.019663693383336067, 0.007173669990152121, -0.04069055616855621, 0.02394063211977482, 0.0369759239256382, -0.016571007668972015, 0.038577646017074585, 0.03820277377963066, -0.051357343792915344, 0.05255011469125748, -0.0038658585399389267, -0.035783153027296066, 0.043246496468782425, 0.033193133771419525, -0.05043720453977585, 0.012703019194304943, -0.0311995018273592, 0.008179006166756153, -0.013001211918890476, 0.027007760480046272, -0.017584864050149918, -0.041951484978199005, -0.016528408974409103, 0.0016869200626388192, -0.09399041533470154, -0.030347520485520363, 0.02915474958717823, -0.00609591556712985, 0.08390296995639801, -0.035306043922901154, 0.020243041217327118, -0.07626923173666, -0.027672303840517998, -0.008702973835170269, 0.020634951069951057, -0.016571007668972015, 0.048017583787441254, 0.05343617498874664, -0.04648401960730553, -0.0029308106750249863, 0.012242949567735195, -0.04212188348174095, -0.019629614427685738, 0.03574907407164574, -0.037896063178777695, -0.007246088236570358, 0.00609591556712985, -0.008596476167440414, -0.021742524579167366, -0.017329270020127296, 0.022526346147060394, 0.02688848227262497, -0.019084347411990166, -0.04648401960730553, -0.024281425401568413, -0.030500877648591995, 0.05612843111157417, -0.003350410610437393, 0.02100982330739498, 0.014006548561155796, 0.02218555472791195, 0.02908659167587757, -0.016238735988736153, 0.07286131381988525, 0.035101570188999176, -0.05582171678543091, 0.0177382193505764, 0.0074463034979999065, -0.01459441427141428, -0.00259001855738461, 0.05043720453977585, -0.0662158727645874, -0.039940815418958664, 0.0051629976369440556, -0.04897179827094078, -0.017925655469298363, 0.05888884514570236, -0.03830501437187195, -0.04478006064891815, 0.0390547551214695, -0.03090982884168625, 0.030603114515542984, 0.028200531378388405, 0.07524685561656952, 0.03155733272433281, 0.002443052129819989, 0.012183311395347118, 0.07402000576257706, 0.052618272602558136, 0.08737905323505402, 0.04300794005393982, -0.03690776601433754, 0.020021526142954826, 0.035987626761198044, -0.0322389155626297, 0.012166271917521954, -0.04031568393111229, -0.0603201724588871, -0.02659880928695202, 0.0149352066218853, -0.028319809585809708, 0.027979018166661263, -0.000750807230360806, -0.04443926736712456, 0.029614819213747978, 0.034164391458034515, 0.09249092638492584, -0.035237886011600494, 0.03399399667978287, -0.0008328102994710207, -0.027092957869172096, 0.03608986362814903, 0.03314201533794403, -0.03615802526473999, 0.01737186871469021, -0.010113000869750977, -0.027058878913521767, 0.01605129987001419, -0.013248286210000515, -0.03980449587106705, 0.03557867556810379, 0.022202594205737114, 0.026632890105247498, -0.08001794666051865, -0.054663024842739105, 0.06962379068136215, -0.010334515012800694, -0.04443926736712456, 0.007936191745102406, 0.037180397659540176, -0.012507063336670399, -0.03305681794881821, -0.028558364138007164, 0.06706785410642624, -0.01459441427141428, -0.03758934885263443, 0.05159589648246765, 0.01881171390414238, 0.02717815712094307, -0.041338060051202774, -0.041303981095552444, 0.0387139618396759, 0.022168515250086784, -0.037282638251781464, -0.012617820873856544, 0.013282365165650845, 0.0363965779542923, 0.035885389894247055, 0.025286760181188583, -0.005410071928054094, 0.02354872226715088, -0.01037711463868618, -0.006994754541665316, -0.021060941740870476, -0.04689297080039978, -0.006394108757376671, 0.04539348557591438, -0.014867047779262066, -0.0018967200303450227, -0.01323124673217535, -0.017653021961450577, 0.06253531575202942, -0.02549123577773571, -0.004617730621248484, 0.018965071067214012, -0.015966102480888367, -0.021163178607821465, -0.03602170571684837, 0.05646922439336777, 0.04433703050017357, 0.003829649183899164, -0.0005271625122986734, -0.0322389155626297, 0.02746783010661602, -0.006590064149349928, 0.003733801655471325, 0.07170262187719345, 0.013580557890236378, -0.006662482395768166, 0.000675194023642689, 0.00012094120029360056, 0.019646653905510902, -0.010930901393294334, -0.008570916950702667, -0.03338056802749634, 0.0005702939815819263, -0.01748262532055378, -0.04839245229959488, -0.07947267591953278, -0.008238645270466805, -0.007156630512326956, -0.05578763782978058, 0.012370746582746506, -0.0005362147931009531, -0.028916195034980774, -0.023105692118406296, -0.009917045012116432, -0.041303981095552444, 0.00022337846166919917, 0.014117306098341942, 0.0061342548578977585, -0.02257746458053589, 0.0072077494114637375, 0.0068200984969735146, -0.011791400611400604, -0.05541276931762695, -0.014151385053992271, 0.05496973916888237, 0.008392001502215862, -0.06158110126852989, -0.04621138423681259, -0.02918882854282856, -0.004881844390183687, -0.02254338562488556, 0.051391422748565674, 0.030040808022022247, 0.07422447949647903, -0.003199184313416481, 0.03632842004299164, 0.02133357524871826, 0.05957042798399925, 0.06222860515117645, -0.0002920693368650973, -0.031472135335206985, 0.027876779437065125, -0.007288687396794558, -0.038577646017074585, -0.005810502450913191, -0.04777902737259865, -0.03162549063563347, -0.017789337784051895, -0.02896731346845627, 0.0052183764055371284, 0.05633290484547615, -0.06042240932583809, 0.014534776099026203, 0.04205372557044029, 0.007237568497657776, -0.048631008714437485, -0.05905923992395401, -0.025678671896457672, 0.012242949567735195, -0.023497603833675385, -0.027007760480046272, 0.06038833037018776, -0.01209811307489872, -0.02124837599694729, 0.0727931559085846, -0.015710508450865746, -0.029648898169398308, -0.07040761411190033, 0.03837317228317261, 0.0031885344069451094, -0.032255955040454865, 0.029137710109353065, -0.05704857036471367, 0.03404511511325836, 0.035987626761198044, -0.008081028237938881, 0.027024799957871437, 0.029393304139375687, -0.05149365961551666, -0.017209991812705994, 0.016571007668972015, -0.035169728100299835, -0.005516569130122662, -0.046552177518606186, -0.015454914420843124, 0.05902516096830368, -0.04978970065712929, -0.004549572244286537, 0.027808621525764465, -0.017116274684667587, -0.02688848227262497, -0.0502668097615242, -0.006662482395768166, 0.0978754386305809, -0.003007488790899515, 0.060695040971040726, -0.05309538170695305, 0.0054356311447918415, -0.031148381531238556, -0.006837137974798679, 0.022270752117037773, -0.02053271420300007, -0.060013458132743835, 0.018590198829770088, -0.039872653782367706, 0.041883327066898346, 0.02078830823302269, -0.034590382128953934, -0.09951124340295792, 0.04842653125524521, 0.023531682789325714, -0.010939421132206917, -0.02649657242000103, -0.00593403959646821, 0.05718488618731499, -0.04174701124429703, -0.0012385656591504812, 0.001239630626514554, -0.007821174338459969, -0.04266715049743652, -0.01874355599284172, -0.031506214290857315, 0.05520829185843468, 0.04017936810851097, 0.03259674832224846, -0.00497130211442709, 0.014952246099710464, 0.027450790628790855, -0.004074593540281057, 0.025832029059529305, -0.04307609796524048, -0.032477471977472305, -0.04293978214263916, -0.04368952661752701, -0.036498814821243286, 0.056639619171619415, -0.019118426367640495, 0.01903322897851467, -0.03377247974276543, 0.09337698668241501, 0.022850098088383675, 0.03673737123608589, 0.018470922484993935, 0.07449711859226227, -0.02107798121869564, 0.07204341143369675, -0.05503789708018303, 0.00007847532833693549, 0.0422922782599926, 0.012140712700784206, 0.003482467494904995, -0.017789337784051895, 0.01339312270283699, -0.01421954296529293, 0.03443702310323715, -0.018607240170240402, 0.006726380903273821, 0.01702255755662918, 0.03486301377415657, -0.019067307934165, 0.006671002134680748, 0.006479306612163782, -0.03953186422586441, -0.04167885333299637, 0.008817991241812706, 0.09358146041631699, -0.007054392714053392, 0.017891576513648033, 0.056775934994220734, -0.00335680041462183, -0.036601051688194275, -0.04174701124429703, 0.08233533054590225, 0.03317609429359436, -0.013520919717848301, 0.02908659167587757, -0.023633919656276703, 0.035919468849897385, 0.0072077494114637375, -0.06175149604678154, 0.006458007264882326, -0.09187750518321991, 0.020924624055624008, 0.033329449594020844, -0.07292947173118591, 0.054049599915742874, 0.051186949014663696, 0.01751670427620411, -0.03341464698314667, 0.018470922484993935, -0.029001392424106598, 0.034164391458034515, -0.007889333181083202, -0.049926016479730606, -0.021265415474772453, 0.016434689983725548, -0.0013045941013842821, 0.006342989858239889, 0.03735079616308212, -0.05108470842242241, -0.060695040971040726, 0.015812745317816734, -0.025712750852108, -0.024264385923743248, 0.012430385686457157, -0.053879205137491226, -0.01731223054230213, -0.022032197564840317, 0.00013345465413294733, -0.005916999652981758, 0.0077998754568398, 0.02344648540019989, 0.009857406839728355, 0.030398640781641006, 0.048562850803136826, 0.07115735113620758, 0.03741895407438278, 0.028013097122311592, -0.029648898169398308, -0.011791400611400604, 0.000922268140129745, 0.013512399978935719, -0.022679703310132027, -0.01731223054230213, -0.005444150883704424, -0.0027902338188141584, 0.026377296075224876, -0.010113000869750977, -0.036601051688194275, 0.06955563277006149, -0.006317430175840855, 0.030500877648591995, -0.0502668097615242, 0.04355320706963539, -0.020277120172977448, 0.018982110545039177, 0.01120353490114212, -0.030960947275161743, 0.031864047050476074, -0.08410745114088058, 0.010726425796747208, 0.01310344971716404, -0.023173851892352104, -0.09596700966358185, -0.022901218384504318, 0.006458007264882326, 0.01694587804377079, 0.04293978214263916, -0.019152507185935974, 0.006104435306042433, -0.042598992586135864, 0.03551051765680313, -0.030603114515542984, 0.060115694999694824, -0.028882116079330444, 0.0224752277135849, -0.10373706370592117, -0.0402134470641613, -0.010521951131522655, -0.02714407630264759, -0.02760414592921734, 0.015301557257771492, -0.0025303801521658897, 0.013546478934586048, -0.006321690045297146, -0.011126856319606304, -0.004979821853339672, 0.0016901149647310376, -0.03878211975097656, -0.00978072825819254, -0.014142865315079689, -0.032290033996105194, 0.016323933377861977, -0.00680305901914835, 0.08049505203962326, 0.03302273899316788, 0.003948926459997892, -0.005853101145476103, 0.00036475385422818363, -0.037896063178777695, -0.031829964369535446, 0.04750639572739601, 0.0224752277135849, -0.033295370638370514, -0.004379176069051027, 0.0243836622685194, 0.05043720453977585, 0.009797767736017704, 0.08812879025936127, -0.038509488105773926, 0.013043810613453388, -0.0017848977586254478, 0.011186495423316956, -0.04750639572739601, 0.021640287712216377, 0.05793462693691254, -0.0914003923535347, 0.0011246133362874389, 0.012387786991894245, -0.02889915555715561, -0.10128336399793625, -0.04488229751586914, -0.027450790628790855, -0.014994844794273376, 0.08144927024841309, -0.0015229139244183898, -0.020481595769524574, -0.00526949530467391, -0.02419622614979744, -0.011748801916837692, 0.023974712938070297, 0.027024799957871437, -0.016323933377861977, 0.035817231982946396, 0.00863481592386961, -0.00804268941283226, 0.015310076996684074, -0.006849917583167553, -0.02354872226715088, -0.05793462693691254, 0.0709528774023056, 0.0354764387011528, -0.05810502544045448, 0.03453926369547844, 0.05357249081134796, -0.0576619952917099, -0.01376799400895834, 0.01558271050453186, -0.01634097285568714, 0.013035290874540806, -0.010308955796062946, 0.01884579285979271, -0.011680643074214458, 0.0032716025598347187, 0.030466798692941666, 0.03447110205888748, -0.02150397002696991, -0.019646653905510902, -0.041167665272951126, -0.024605177342891693, 0.018181249499320984, 0.026547690853476524, -0.023991752415895462, 0.018862832337617874, -0.003808349836617708, 0.02814941294491291, 0.028422046452760696, 0.02584906853735447, 0.07272499799728394, 0.043144259601831436, 0.028285730630159378, 0.026513611897826195, -0.01389579102396965, -0.02692256309092045, -0.01855611987411976, 0.03745303303003311, 0.011663603596389294, 0.014245102182030678, -0.045257169753313065, 0.0316595695912838, 0.07565581053495407, 0.054594866931438446, -0.010820143856108189, 0.04375768452882767, 0.02555939555168152, -0.0576619952917099, 0.028132373467087746, 0.0034334787633270025, 0.015778666362166405, -0.023616880178451538, 0.027348551899194717, -0.028302770107984543, 0.010121520608663559, -0.0019478388130664825, -0.007399444933980703, 0.04205372557044029, -0.03435182571411133, -0.014671092852950096 ]
715,677
pytorch_optimizer.optimizer.avagrad
reset
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** group['step']) prev_bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** (group['step'] - 1)) squared_norm: float = 0.0 num_params: float = 0.0 for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) self.apply_weight_decay( p=p, grad=p.grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) exp_avg = state['exp_avg'] exp_avg.mul_(beta1).add_(grad, alpha=1.0 - beta1) exp_avg_sq = state['exp_avg_sq'] sqrt_exp_avg_sq = exp_avg_sq.sqrt() if group['step'] > 1: de_nom = sqrt_exp_avg_sq.div(prev_bias_correction2_sq).add_(group['eps']) step_size: float = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=group['gamma'] * group['lr'], bias_correction1=bias_correction1, ) p.addcdiv_(exp_avg, de_nom, value=-step_size) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) param_wise_lr = sqrt_exp_avg_sq.div_(bias_correction2_sq).add_(group['eps']) squared_norm += param_wise_lr.norm(-2) ** -2 num_params += param_wise_lr.numel() group['gamma'] = 0.0 if num_params == 0.0 else 1.0 / math.sqrt(squared_norm / num_params) return loss
(self)
[ -0.012092211283743382, -0.020644299685955048, -0.03534350544214249, 0.05737306922674179, -0.01225574966520071, -0.005045636091381311, -0.03359268233180046, -0.04529047757387161, -0.020086346194148064, 0.021817928180098534, -0.02687799371778965, -0.00003904325785697438, 0.011341859586536884, 0.08904176950454712, -0.031168468296527863, 0.04136556014418602, 0.015497654676437378, 0.04059596732258797, 0.030052559450268745, -0.010572267696261406, -0.024761617183685303, -0.057450029999017715, -0.023972785100340843, 0.05264008045196533, -0.06352980434894562, -0.008730056695640087, 0.050793059170246124, -0.0003499237645883113, -0.01926865428686142, 0.004959057085216045, -0.019855469465255737, -0.07407321035861969, 0.0212599728256464, 0.005180314648896456, 0.03286157175898552, -0.05529516935348511, 0.010043173097074032, 0.00860499870032072, -0.07418864965438843, -0.03742140159010887, -0.018239324912428856, -0.01654622331261635, 0.0020682779140770435, 0.00024230117560364306, 0.006094205193221569, 0.0012145120417699218, -0.041557956486940384, 0.045906152576208115, -0.020702019333839417, -0.0043289540335536, 0.0006992463022470474, -0.05117785558104515, 0.06345284730195999, -0.012602065689861774, 0.021125294268131256, 0.07111028581857681, 0.05898921191692352, -0.06276021152734756, 0.03228437528014183, -0.036671049892902374, 0.06210605800151825, -0.07034069299697876, 0.027589866891503334, -0.00020427251001819968, 0.00999507401138544, -0.019287895411252975, -0.0641070008277893, -0.023587988689541817, 0.02289535664021969, 0.05175504833459854, 0.015199437737464905, 0.01585359126329422, 0.008282732218503952, -0.0051706950180232525, -0.0513317734003067, -0.014112389646470547, -0.03994181379675865, -0.05302487686276436, 0.0271858312189579, -0.03280385211110115, 0.015083999373018742, -0.0013179259840399027, -0.019201315939426422, 0.004348193760961294, 0.011168700642883778, -0.037248242646455765, -0.01659432239830494, -0.035247303545475006, 0.000694436370395124, -0.018354764208197594, 0.017258096486330032, -0.0067724077962338924, 0.027705304324626923, 0.03049507550895214, 0.05621867999434471, 0.04659878462553024, -0.04167339578270912, -0.034458473324775696, -0.03720976412296295, -0.037498362362384796, 0.028474897146224976, 0.03967245668172836, 0.029783202335238457, 0.044328488409519196, 0.04213515296578407, -0.04725293815135956, -0.01070694625377655, -0.03720976412296295, 0.03601689636707306, -0.05321727320551872, -0.025954483076930046, -0.012477006763219833, -0.039403099566698074, -0.01367949414998293, -0.036824967712163925, -0.01441060658544302, -0.010274050757288933, 0.014343267306685448, -0.030725952237844467, 0.04679118096828461, 0.0455598346889019, -0.009037894196808338, -0.04213515296578407, 0.006301032844930887, 0.01041834894567728, 0.037305962294340134, 0.05056218057870865, 0.02347254939377308, 0.02566588670015335, -0.0656077042222023, 0.0031192516908049583, -0.009797865524888039, -0.010957063175737858, -0.020221024751663208, 0.033361803740262985, -0.01626724749803543, -0.00824425183236599, 0.022914595901966095, 0.011976772919297218, 0.006060535553842783, -0.00439869798719883, 0.008494369685649872, -0.0076718684285879135, 0.0013034960720688105, 0.022972315549850464, 0.03318864479660988, 0.04975410923361778, 0.04267386719584465, -0.0009667996782809496, -0.006445331498980522, 0.023530269041657448, 0.022125763818621635, 0.028417177498340607, 0.02268371917307377, 0.0014381746295839548, 0.02462693862617016, -0.018383624032139778, 0.02639699913561344, -0.01952839270234108, -0.020798219367861748, -0.0200478658080101, -0.02089441753923893, -0.023857345804572105, -0.000006876723546156427, 0.02372266724705696, 0.004603120964020491, -0.004651220515370369, 0.05233224108815193, -0.0446363240480423, 0.014660723507404327, -0.00029761556652374566, -0.0212599728256464, 0.05206288397312164, 0.02693571336567402, -0.02545424923300743, 0.140912264585495, 0.006907086353749037, 0.010966682806611061, -0.02135617285966873, -0.009966214187443256, 0.0024590862449258566, -0.0141989691182971, -0.015362976118922234, -0.040865324437618256, 0.004470847547054291, 0.03407367691397667, 0.013746833428740501, 0.004384268540889025, 0.02541576884686947, 0.00031535225571133196, -0.006089395377784967, -0.011765134520828724, 0.049908027052879333, -0.00853284914046526, -0.013669874519109726, 0.02745518833398819, 0.028474897146224976, 0.022183483466506004, 0.09004224091768265, 0.007046574726700783, -0.012505866587162018, -0.011120601557195187, 0.024068983271718025, 0.004533376544713974, -0.03305396810173988, -0.020509621128439903, -0.020278744399547577, 0.061028629541397095, -0.004672865383327007, 0.0020310007967054844, -0.061913661658763885, 0.00913409236818552, 0.03386203944683075, 0.05898921191692352, 0.04151947796344757, -0.06718536466360092, 0.0034511382691562176, 0.016825200989842415, 0.05883529409766197, 0.0052572740241885185, -0.03205350041389465, -0.08134585618972778, 0.023126233369112015, -0.0047402046620845795, 0.05748850852251053, -0.01879728026688099, 0.041750356554985046, -0.04548287391662598, -0.017392775043845177, -0.0035545520950108767, 0.00720530329272151, -0.03517034649848938, 0.008383740670979023, -0.01236156839877367, 0.03243829309940338, 0.016988739371299744, -0.05221680551767349, -0.025839045643806458, -0.0033236746676266193, -0.005795988254249096, -0.03324636444449425, -0.041711874306201935, -0.027070391923189163, 0.05260159820318222, -0.014141249470412731, 0.03605537489056587, 0.06533834338188171, 0.01485312171280384, -0.01795072853565216, 0.04405913129448891, -0.029648523777723312, -0.0265701562166214, -0.026493197306990623, 0.042289070785045624, -0.04809948801994324, -0.02274143695831299, 0.06291413307189941, 0.038133274763822556, 0.050677619874477386, -0.04571375250816345, 0.022664478048682213, -0.049523234367370605, -0.058604415506124496, 0.052255284041166306, -0.03747912123799324, 0.01706569828093052, 0.04205819219350815, -0.03490098938345909, 0.057142190635204315, 0.045598313212394714, 0.07345753908157349, 0.08704083412885666, -0.054564058780670166, -0.02970624342560768, 0.0047137499786913395, 0.027782263234257698, 0.009783435612916946, 0.015882451087236404, -0.004629575647413731, -0.03928766027092934, 0.07749789208173752, -0.05025434494018555, -0.07618958503007889, -0.006604059599339962, -0.05433318018913269, 0.0337081216275692, -0.018393244594335556, -0.007330361753702164, 0.06137494742870331, 0.005632449872791767, 0.03274613246321678, -0.0043914830312132835, 0.09642985463142395, 0.01654622331261635, 0.0841163843870163, 0.005916236899793148, -0.018354764208197594, 0.016045989468693733, -0.029513845220208168, 0.02120225504040718, 0.06553073972463608, -0.007315932307392359, -0.0050793057307600975, 0.0030855820514261723, -0.012784844264388084, -0.018277805298566818, 0.012553966604173183, -0.005132215563207865, 0.01925903558731079, -0.01695987954735756, -0.003689230652526021, -0.013929612003266811, 0.0019107521511614323, 0.01769099198281765, -0.0001271630171686411, -0.09589114040136337, -0.0013407731894403696, -0.05248616263270378, 0.02341482974588871, 0.0637606829404831, -0.01644040457904339, 0.024068983271718025, 0.023741906508803368, 0.038344912230968475, -0.027686065062880516, -0.02997560054063797, 0.07191835343837738, 0.031841859221458435, -0.02939840778708458, -0.028801973909139633, -0.0728803426027298, -0.0016882920172065496, 0.05852745845913887, 0.03759456053376198, -0.03753684088587761, -0.01774871163070202, 0.03774847835302353, -0.005690169520676136, 0.029956361278891563, -0.05864289402961731, 0.0661848932504654, 0.02451149933040142, -0.027435947209596634, 0.012929142452776432, 0.019874708727002144, -0.027166590094566345, 0.026974191889166832, 0.024107463657855988, 0.026550916954874992, 0.015555374324321747, -0.0036844208370894194, -0.025435009971261024, -0.012765604071319103, 0.05487189441919327, 0.022702958434820175, 0.039557017385959625, -0.0034318985417485237, -0.02687799371778965, 0.029379166662693024, -0.07815204560756683, 0.025261851027607918, 0.02347254939377308, -0.05144721269607544, 0.10158611834049225, 0.10620366781949997, 0.01231346931308508, -0.04225058853626251, -0.03270765021443367, 0.04332801699638367, -0.020124826580286026, 0.019614970311522484, -0.03513186424970627, 0.0031577313784509897, 0.021221494302153587, -0.04163491725921631, -0.021644769236445427, -0.03911450505256653, -0.012111451476812363, 0.06937870383262634, 0.04125012084841728, 0.03626701235771179, -0.04629094526171684, -0.03282308951020241, 0.02949460595846176, 0.03880666568875313, -0.025858284905552864, 0.010899343527853489, -0.05364054813981056, 0.0364401713013649, -0.06641577184200287, 0.06476114690303802, 0.022125763818621635, 0.011774754151701927, 0.0010413539130240679, -0.06079775094985962, 0.03747912123799324, 0.03686344623565674, 0.028359457850456238, -0.044597845524549484, -0.020221024751663208, -0.031168468296527863, -0.00010822384501807392, 0.0035545520950108767, 0.014247068203985691, -0.015372596681118011, -0.07618958503007889, -0.0042447797022759914, 0.053525108844041824, 0.014574144966900349, 0.06737776100635529, -0.026166120544075966, 0.004494897089898586, -0.043597374111413956, 0.006382802035659552, 0.011062881909310818, -0.03963397815823555, -0.021740969270467758, -0.022241203114390373, -0.006604059599339962, 0.004865263123065233, 0.042596906423568726, 0.013246598653495312, 0.03634397312998772, 0.031514786183834076, -0.031726423650979996, -0.0391722247004509, -0.042019713670015335, -0.017806431278586388, -0.04871516302227974, -0.006522290408611298, -0.030687473714351654, -0.041019242256879807, -0.024068983271718025, -0.021817928180098534, -0.03453543037176132, 0.011688175611197948, -0.012448147870600224, 0.04613702744245529, 0.052255284041166306, 0.014420226216316223, -0.0072678327560424805, 0.0086579080671072, -0.012698264792561531, -0.01569967344403267, -0.010158611461520195, -0.028417177498340607, 0.0598357617855072, -0.040288131684064865, -0.09904646873474121, 0.01979774981737137, -0.0003201622166670859, 0.011110981926321983, 0.05029282346367836, -0.0034848079085350037, 0.030802911147475243, 0.004555021412670612, -0.05937400832772255, -0.034035198390483856, -0.012832943350076675, 0.017238857224583626, 0.01325621921569109, 0.022164244204759598, -0.028147820383310318, 0.0255119688808918, -0.012188410386443138, -0.012005631811916828, 0.08011450618505478, 0.04440544545650482, -0.00999507401138544, 0.005598780233412981, -0.004230349790304899, -0.02887893281877041, 0.03270765021443367, -0.01769099198281765, -0.025973724201321602, -0.019047396257519722, -0.040865324437618256, -0.012804083526134491, 0.031264666467905045, -0.03963397815823555, -0.005112975370138884, -0.05006194859743118, 0.024761617183685303, 0.03501642867922783, -0.01081276498734951, 0.035574380308389664, 0.004518947098404169, 0.012736744247376919, 0.04467480257153511, 0.06022055819630623, -0.049792591482400894, -0.060335997492074966, 0.04659878462553024, 0.03847958892583847, -0.05302487686276436, -0.058142662048339844, 0.036978885531425476, 0.01530525740236044, 0.08342374861240387, -0.030091039836406708, 0.014612624421715736, 0.049215395003557205, -0.05113937705755234, -0.019653450697660446, 0.0016305726021528244, -0.02997560054063797, -0.058296579867601395, 0.004665650427341461, -0.059027690440416336, 0.020567340776324272, -0.002253460930660367, -0.027205070480704308, 0.004076431505382061, -0.00112853420432657, -0.016305726021528244, -0.046021588146686554, 0.04786860942840576, 0.0698404535651207, 0.04640638455748558, -0.040865324437618256, 0.03318864479660988, 0.0014501995174214244, -0.011591976508498192, -0.011717035435140133, -0.00170272181276232, 0.03532426431775093, -0.0017604412278160453, -0.01585359126329422, 0.0023676971904933453, -0.008383740670979023, -0.02289535664021969, 0.012178790755569935, 0.044905681163072586, 0.0695711001753807, -0.01152463722974062, -0.04579071328043938, -0.021086815744638443, -0.06780103594064713, -0.13083060085773468, -0.04121164232492447, 0.0023592798970639706, -0.011996012181043625, 0.02341482974588871, -0.004944627173244953, -0.03884514793753624, 0.03534350544214249, 0.023530269041657448, 0.024011263623833656, -0.03499718755483627, -0.004136555828154087, -0.040442049503326416, 0.03280385211110115, -0.019287895411252975, 0.02104833535850048, 0.023337870836257935, 0.01805654726922512, -0.03397747874259949, 0.024011263623833656, 0.014737683348357677, 0.004268829710781574, -0.04667574167251587, -0.05087001994252205, 0.007686298340559006, -0.037709999829530716, 0.0031096318271011114, 0.025762084871530533, 0.027916941791772842, -0.020086346194148064, -0.045867670327425, 0.023010794073343277, -0.022337401285767555, 0.004478062503039837, -0.006820507347583771, -0.013236979022622108, -0.03486250713467598, 0.00009710084123071283, 0.02231816202402115, -0.03039887547492981, -0.007763257250189781, -0.029629284515976906, 0.04429000988602638, -0.04394369199872017, -0.004836403299123049, -0.011168700642883778, -0.001479059224948287, 0.05387142673134804, -0.11259128153324127, 0.035516660660505295, -0.00008935982623370364, 0.032111216336488724, -0.03615157678723335, 0.027474427595734596, -0.0859634056687355, -0.08234632015228271, 0.008200963027775288, 0.008354880847036839, -0.04521351680159569, 0.011399578303098679, 0.008782966062426567, 0.024280620738863945, -0.04429000988602638, -0.00742656085640192, 0.057873304933309555, 0.018383624032139778, -0.015391835942864418, 0.007657438516616821, -0.024242142215371132, 0.03584373742341995, 0.016757860779762268, -0.022221963852643967, -0.05491037666797638, -0.028109339997172356, 0.0007070624851621687, -0.012736744247376919, -0.078960120677948, -0.01764289289712906, -0.019133975729346275, -0.007421751040965319, 0.06837823241949081, 0.0026671166997402906, -0.04352041706442833, -0.0009722108952701092, -0.03846035152673721, -0.0020237858407199383, 0.0200478658080101, -0.02639699913561344, 0.04679118096828461, -0.07395777106285095, -0.021490851417183876, -0.03222665563225746, -0.0419042743742466, 0.04121164232492447, 0.03495870903134346, -0.04875364154577255, 0.06660816818475723, 0.014256687834858894, 0.042596906423568726, 0.030956830829381943, -0.027897702530026436, -0.05841201916337013, -0.009191812016069889, 0.0513317734003067, -0.020336464047431946, -0.011043642647564411, -0.01638268493115902, -0.010697325691580772, -0.02210652455687523, 0.04248146712779999, 0.05533365160226822, -0.0009144915384240448, -0.0149589404463768, 0.05090849846601486, -0.02682027406990528, 0.019778508692979813, 0.02304927445948124, -0.009235101751983166, 0.03441999480128288, 0.03270765021443367, 0.01843172311782837, -0.0476762130856514, 0.00006121411570347846, -0.026435477659106255, -0.02052886225283146, -0.0034415184054523706, -0.041711874306201935, -0.006661779247224331, 0.00643090158700943, -0.02882121317088604, -0.018085407093167305, -0.025704367086291313, -0.09365931898355484, -0.04017269238829613, -0.06749320030212402, -0.0038816286250948906, 0.01386227272450924, -0.02341482974588871, 0.024954013526439667, -0.03249601274728775, -0.042173631489276886, 0.022760678082704544, 0.02372266724705696, 0.03678648918867111, -0.02845565788447857, 0.042442988604307175, 0.04656030237674713, -0.005238034296780825, -0.006474190857261419, 0.028532616794109344, -0.002934068674221635, 0.00658962968736887, -0.05025434494018555, -0.00826349202543497, 0.015449555590748787, 0.028725014999508858, 0.022818397730588913, -0.06960958242416382, -0.030091039836406708, -0.02682027406990528, 0.007070624735206366, -0.053563591092824936, 0.01648850366473198, -0.0332656055688858, -0.02268371917307377, 0.00109546585008502, 0.03365040197968483, 0.03836414963006973, 0.035516660660505295, -0.022760678082704544, 0.012977241538465023, 0.025954483076930046, 0.0008693982381373644, 0.017623651772737503, -0.02645471878349781, 0.015209058299660683, -0.005512201227247715, -0.00008439957309747115, -0.02714735083281994, -0.027916941791772842, -0.06056687608361244, 0.046483345329761505, -0.015103239566087723, -0.02183716744184494, 0.031784143298864365, -0.0027801503892987967, -0.045021120458841324, -0.017123417928814888, 0.04078836739063263, -0.01805654726922512, 0.023664947599172592, 0.0020418232306838036, 0.026897232979536057, 0.008715626783668995, -0.013612154871225357, 0.01018747128546238, -0.009730526246130466, -0.005949906539171934, 0.042750824242830276, 0.012630925513803959, -0.024492260068655014, -0.0009740146342664957, 0.0202017854899168, 0.03247677534818649, 0.01580549217760563, -0.04063444584608078, 0.02724354900419712, 0.045636795461177826, -0.015892071649432182, -0.020567340776324272, 0.038922104984521866, -0.0756123960018158, 0.06768559664487839, 0.04629094526171684, 0.035728298127651215, 0.04140403866767883, 0.07341905683279037, -0.05290943756699562, 0.014112389646470547, -0.0680319145321846, -0.07057157158851624, -0.07211074978113174, -0.010399109683930874, -0.020855937153100967, 0.08219240605831146, 0.03397747874259949, 0.03101455047726631, 0.01717151701450348, 0.059604886919260025, 0.027839982882142067 ]
715,692
pytorch_optimizer.loss.focal
BCEFocalLoss
BCEFocal loss function w/ probability input. :param alpha: float. alpha. :param gamma: float. gamma. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param eps: float. epsilon. :param reduction: str. type of reduction.
class BCEFocalLoss(nn.Module): r"""BCEFocal loss function w/ probability input. :param alpha: float. alpha. :param gamma: float. gamma. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param eps: float. epsilon. :param reduction: str. type of reduction. """ def __init__( self, alpha: float = 0.25, gamma: float = 2.0, label_smooth: float = 0.0, eps: float = 1e-6, reduction: str = 'mean', ): super().__init__() self.alpha = alpha self.gamma = gamma self.reduction = reduction self.bce = BCELoss(label_smooth=label_smooth, eps=eps, reduction='none') def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: bce_loss = self.bce(y_pred, y_true) focal_loss = ( y_true * self.alpha * (1.0 - y_pred) ** self.gamma * bce_loss + (1.0 - y_true) ** self.gamma * bce_loss ) # fmt: skip return focal_loss.mean() if self.reduction == 'mean' else focal_loss.sum()
(alpha: float = 0.25, gamma: float = 2.0, label_smooth: float = 0.0, eps: float = 1e-06, reduction: str = 'mean')
[ -0.06590764969587326, -0.06042148172855377, -0.02801995538175106, 0.07419212907552719, 0.030063461512327194, -0.029492752626538277, -0.042747922241687775, 0.0005669691599905491, 0.07117290049791336, -0.060200560837984085, -0.011837602593004704, -0.01075141504406929, 0.03295382484793663, 0.030928729102015495, -0.01727774553000927, 0.04561987519264221, 0.024963902309536934, 0.005499974824488163, -0.002545176772400737, -0.016872726380825043, 0.003928224556148052, -0.024227503687143326, -0.016329633072018623, 0.04197470471262932, -0.04072282835841179, 0.0002829092845786363, 0.005012110807001591, 0.011082794517278671, -0.030045051127672195, -0.03582577779889107, -0.010815850459039211, -0.03208855539560318, 0.011929652653634548, 0.033911142498254776, 0.022294459864497185, 0.005035123322159052, 0.05198971927165985, 0.03258562460541725, -0.1322571337223053, -0.027927905321121216, -0.028682714328169823, -0.06763818860054016, 0.021079402416944504, 0.028296105563640594, -0.004335545003414154, -0.009324643760919571, 0.0002399047662038356, 0.02536892145872116, -0.00898405909538269, 0.0022264542058110237, -0.040980566293001175, -0.03591782599687576, 0.028848404064774513, 0.017885273322463036, 0.02575553022325039, 0.06712270528078079, 0.026528749614953995, 0.02165011130273342, -0.026381470263004303, 0.00155218958389014, -0.018548032268881798, -0.07470761239528656, 0.04683493450284004, -0.0370040163397789, 0.013927132822573185, 0.02361997589468956, -0.03404001146554947, 0.014120437204837799, -0.002547477837651968, -0.006586162373423576, 0.016697831451892853, -0.02871953509747982, 0.03829271346330643, 0.05522987246513367, -0.012914585880935192, -0.029897771775722504, -0.016117917373776436, -0.009375271387398243, 0.03573372960090637, -0.025700300931930542, 0.022791527211666107, -0.035181429237127304, -0.0027177699375897646, -0.0009469622164033353, 0.050885122269392014, -0.14573322236537933, 0.0002413430338492617, -0.016955571249127388, 0.02588440105319023, 0.03936048969626427, -0.07146745920181274, 0.002041204134002328, -0.004643911961466074, 0.029198193922638893, 0.06200473755598068, 0.040980566293001175, -0.029658442363142967, 0.02041664347052574, 0.022883577272295952, -0.011506224051117897, 0.03512619808316231, 0.08225569128990173, 0.025148002430796623, 0.06808002293109894, 0.032677676528692245, -0.0021217477042227983, -0.00695436168462038, 0.012610821053385735, -0.011837602593004704, -0.04812363162636757, -0.05692359060049057, -0.01567607931792736, 0.008510002866387367, -0.03243834525346756, 0.003744125133380294, -0.05751270800828934, 0.00889200996607542, 0.0011138024274259806, -0.03424252197146416, 0.03858727216720581, 0.008178623393177986, -0.04031780734658241, -0.05762316659092903, -0.02803836576640606, 0.03100236877799034, 0.0387345515191555, 0.023730436339974403, -0.032530397176742554, 0.045362137258052826, -0.059869181364774704, -0.003909814637154341, -0.011248484253883362, -0.01191124226897955, -0.010410831309854984, 0.04849182814359665, -0.034997329115867615, 0.04595125466585159, 0.03599146753549576, 0.03194127604365349, 0.03485004976391792, 0.01990116387605667, 0.03236470744013786, 0.042011525481939316, 0.038881830871105194, 0.024614114314317703, 0.001380746834911406, 0.0387345515191555, -0.00942589808255434, 0.044147077947854996, -0.01692795567214489, -0.00471294904127717, -0.005320477765053511, 0.002959400648251176, 0.027596527710556984, 0.006862311623990536, 0.009389078244566917, -0.004144541919231415, -0.017314564436674118, -0.022147178649902344, 0.033947963267564774, -0.010953924618661404, 0.004434498492628336, -0.04068600758910179, -0.031830817461013794, -0.004305629059672356, -0.0370040163397789, 0.04278474301099777, -0.022957216948270798, -0.0033206960652023554, 0.048933666199445724, 0.0018490501679480076, -0.06130515784025192, 0.04315293952822685, 0.06483986973762512, 0.007695362437516451, 0.07183565199375153, 0.01137735415250063, -0.025626661255955696, -0.0158693827688694, 0.01799573376774788, 0.04341068118810654, -0.012546386569738388, -0.0351998396217823, -0.044147077947854996, 0.03135215863585472, 0.027780625969171524, 0.017673559486865997, 0.02787267602980137, 0.019477736204862595, -0.015132985077798367, 0.005707086995244026, -0.008486990816891193, 0.034095242619514465, 0.0008986360626295209, 0.02431955374777317, -0.013807468116283417, 0.003730317810550332, 0.016679421067237854, 0.06148925796151161, -0.021263500675559044, -0.05898550525307655, 0.05180562287569046, 0.02218399941921234, 0.020527102053165436, -0.01990116387605667, 0.0005520110717043281, 0.015915408730506897, 0.10162296891212463, -0.0793100968003273, -0.0846121683716774, -0.00678406935185194, 0.04020734876394272, 0.00458407960832119, 0.0317755863070488, 0.03332202509045601, -0.060200560837984085, 0.0058865840546786785, 0.02378566563129425, 0.009030084125697613, 0.022294459864497185, -0.023012448102235794, -0.02518482320010662, -0.026050090789794922, 0.016983186826109886, 0.04447845742106438, 0.0015752019826322794, 0.026197370141744614, 0.01832711324095726, 0.06936872005462646, 0.0025612853933125734, -0.0032171402126550674, 0.022441739216446877, -0.0616733580827713, -0.0020630660001188517, 0.07710090279579163, 0.04075964540243149, -0.03256721422076225, 0.023509515449404716, -0.05784408748149872, -0.015372314490377903, -0.025958040729165077, -0.04676129296422005, -0.007078628987073898, 0.04330022260546684, 0.03243834525346756, -0.05036964640021324, 0.056150373071432114, 0.033211562782526016, -0.05924324318766594, 0.0546039342880249, -0.03582577779889107, -0.01956978440284729, 0.0032608637120574713, 0.019496144726872444, -0.02855384536087513, -0.07463397085666656, -0.06601811200380325, -0.03976551070809364, 0.02715468779206276, -0.011073589324951172, -0.021576469764113426, -0.0238224845379591, -0.0529102198779583, 0.06907416135072708, -0.0005013836780562997, -0.006553945131599903, -0.024724572896957397, -0.015961432829499245, 0.03459231182932854, 0.026399878785014153, 0.05353615805506706, 0.009274016134440899, -0.022644247859716415, -0.03777723386883736, -0.02468775399029255, -0.02538733184337616, -0.00845477357506752, 0.04676129296422005, -0.023307006806135178, -0.013439268805086613, 0.029161373153328896, -0.08196113258600235, -0.0721302181482315, -0.007824231870472431, 0.016504528000950813, 0.017691969871520996, -0.003138897707685828, -0.04031780734658241, 0.04771861061453819, -0.0037947525270283222, 0.04561987519264221, -0.02964003197848797, 0.06819048523902893, 0.044699378311634064, 0.01164429821074009, -0.0062041557393968105, 0.019348865374922752, -0.010097862221300602, -0.00361065287142992, -0.0317755863070488, 0.004745166748762131, -0.027007408440113068, -0.001857104478403926, -0.04436799883842468, -0.03976551070809364, -0.06734362244606018, 0.025608250871300697, 0.022441739216446877, -0.02236809954047203, -0.011257689446210861, 0.018630877137184143, -0.036414895206689835, 0.016799086704850197, 0.05920642614364624, -0.01270287111401558, -0.030947139486670494, 0.028977273032069206, -0.007957704365253448, 0.02767016738653183, 0.04797634854912758, -0.006112106144428253, 0.013384039513766766, 0.002793711144477129, 0.10199116915464401, -0.032162196934223175, -0.049449145793914795, 0.042747922241687775, 0.0440366193652153, 0.012500361539423466, -0.029897771775722504, -0.05265247821807861, -0.002292039804160595, 0.014958091080188751, 0.014958091080188751, -0.07982558012008667, 0.013393244706094265, 0.03983914852142334, 0.024816622957587242, 0.04793953150510788, -0.05979554355144501, 0.022423328831791878, 0.009471923112869263, -0.051916081458330154, 0.0739343911409378, 0.0028328322805464268, -0.033598173409700394, 0.00014684817870147526, 0.0021769774612039328, 0.05563489347696304, -0.010953924618661404, 0.0037487277295440435, -0.012942200526595116, 0.0038430786225944757, 0.049080949276685715, 0.07500217109918594, 0.02783585712313652, -0.0317755863070488, 0.003111282829195261, 0.012601615861058235, -0.056334469467401505, 0.002103337785229087, -0.042563822120428085, -0.037814054638147354, 0.018216652795672417, -0.0123530812561512, 0.05872776731848717, -0.0008422555983997881, 0.011957267299294472, 0.02448524348437786, -0.014773990958929062, -0.03612033650279045, -0.02767016738653183, 0.013071070425212383, -0.009978197515010834, -0.040096886456012726, -0.02505595237016678, -0.009007072076201439, -0.011763962917029858, 0.015593234449625015, 0.034831639379262924, 0.04197470471262932, -0.023712025955319405, -0.11126978695392609, -0.011552248150110245, 0.01065936591476202, 0.0036543766036629677, -0.02588440105319023, -0.03380068391561508, 0.023307006806135178, -0.021373961120843887, 0.0072351135313510895, -0.036378078162670135, 0.015648463740944862, -0.007152268663048744, -0.07352937012910843, -0.009094519540667534, 0.04878638684749603, 0.03385591134428978, -0.017664354294538498, -0.047350410372018814, 0.0076493374072015285, -0.014930475503206253, 0.02135555073618889, 0.03505256026983261, -0.03562326729297638, 0.014479432255029678, 0.02660238929092884, 0.05924324318766594, 0.009204979054629803, 0.08365485072135925, -0.03332202509045601, 0.05169516056776047, -0.07036285847425461, 0.028130415827035904, -0.02487185224890709, 0.0011678816517814994, -0.06495033204555511, -0.10081292688846588, -0.038182251155376434, -0.023159727454185486, 0.023491106927394867, 0.025663482025265694, 0.05850684642791748, -0.02468775399029255, -0.04639309272170067, 0.004791191313415766, 0.015399930067360401, 0.02452206425368786, 0.00039696472231298685, 0.014571481384336948, -0.07540718466043472, -0.04330022260546684, -0.039213210344314575, -0.06929507851600647, -0.00390291097573936, -0.03203332796692848, -0.011506224051117897, -0.0040732030756771564, 0.01870451681315899, 0.012205801904201508, -0.022699477151036263, 0.04701903089880943, 0.03512619808316231, 0.040244169533252716, -0.008675692602992058, -0.014157257974147797, -0.004082408268004656, -0.02732037752866745, -0.05412527546286583, 0.004427595064043999, -0.006121310871094465, -0.012813330627977848, 0.02323336713016033, 0.03652535751461983, 0.00665059732273221, 0.0007519317441619933, -0.09006151556968689, -0.024779804050922394, 0.02765175700187683, -0.0031688138842582703, -0.04311612248420715, 0.0688164234161377, -0.02061915211379528, -0.0010643256828188896, -0.007133858744055033, 0.019256815314292908, 0.07960465550422668, -0.014138847589492798, -0.05158470198512077, 0.029142962768673897, 0.010898695327341557, -0.05530351400375366, 0.032530397176742554, -0.028277695178985596, -0.024945493787527084, 0.005651857238262892, -0.016292812302708626, 0.011331329122185707, 0.07997285574674606, -0.04123830422759056, 0.03597305715084076, 0.010788234882056713, -0.007566492538899183, -0.03247516602277756, 0.011524633504450321, 0.04672447219491005, 0.005872776731848717, 0.01472796592861414, 0.03538393974304199, -0.0022091949358582497, -0.03030279092490673, 0.029032504186034203, -0.007769002113491297, 0.016357246786355972, -0.07165155559778214, -0.05777044594287872, 0.02185261994600296, 0.022957216948270798, 0.04473619908094406, -0.026933768764138222, 0.0022333581000566483, 0.03230947628617287, -0.06653358787298203, -0.05022236332297325, 0.01851121336221695, -0.025479381904006004, -0.035881008952856064, 0.011598273180425167, -0.005210018251091242, 0.012555590830743313, 0.01400997769087553, 0.0050765457563102245, 0.013439268805086613, 0.021263500675559044, -0.01993798464536667, -0.028277695178985596, 0.026694439351558685, 0.06546580791473389, 0.014304537326097488, -0.02840656414628029, 0.036414895206689835, 0.037114474922418594, 0.01534469984471798, 0.04561987519264221, -0.01973547413945198, 0.04311612248420715, -0.012647640891373158, -0.020490283146500587, 0.02312290668487549, 0.013393244706094265, -0.01198488287627697, 0.016799086704850197, 0.018732132390141487, 0.03473959118127823, -0.025608250871300697, -0.0167714711278677, -0.03936048969626427, -0.03385591134428978, -0.0758490264415741, -0.022883577272295952, -0.013098685070872307, 0.04322658106684685, 0.04197470471262932, 0.012481951154768467, -0.0015936120180413127, 0.003831572365015745, 0.0017167285550385714, 0.06299887597560883, -0.035144608467817307, 0.00488324137404561, -0.05835956707596779, -0.009978197515010834, -0.021373961120843887, -0.027946315705776215, 0.039581410586833954, 0.046098534017801285, -0.019146356731653214, 0.017489459365606308, -0.02150283008813858, 0.027596527710556984, -0.04304248094558716, -0.06918462365865707, 0.08733683824539185, 0.037961333990097046, -0.035273477435112, 0.047497689723968506, 0.03186763823032379, 0.019993213936686516, -0.026399878785014153, -0.004961483646184206, -0.027743807062506676, 0.022809937596321106, -0.017931299284100533, 0.019091125577688217, -0.04812363162636757, -0.01003342680633068, 0.02487185224890709, -0.05165834352374077, 0.05412527546286583, -0.025810761377215385, -0.01092630997300148, -0.08704227954149246, 0.0511428639292717, -0.011460199020802975, -0.01618235372006893, 0.024890262633562088, -0.02501913346350193, 0.03118646889925003, 0.024982312694191933, 0.01197567768394947, -0.0011828397400677204, -0.018041757866740227, -0.00800833199173212, -0.04547259584069252, 0.030045051127672195, -0.02131873182952404, -0.10802963376045227, 0.042895201593637466, 0.03807179257273674, 0.0511060431599617, -0.03599146753549576, -0.007161473389714956, 0.016090303659439087, -0.02522164210677147, -0.011340534314513206, -0.006682814564555883, -0.02043505385518074, 0.009913762100040913, 0.0070602186024188995, -0.023178137838840485, -0.07028921693563461, 0.011441788636147976, -0.027209917083382607, 0.02468775399029255, -0.030192330479621887, -0.021539650857448578, 0.0027223725337535143, -0.023343825712800026, 0.01991957426071167, 0.05022236332297325, -0.0018340920796617866, 0.02628942020237446, -0.021797390654683113, 0.046945393085479736, 0.014948885887861252, -0.0016154737677425146, 0.030413249507546425, -0.055598072707653046, -0.009204979054629803, 0.03221742436289787, -0.025111181661486626, 0.05835956707596779, -0.022828347980976105, 0.01672544702887535, -0.015722103416919708, 0.019293636083602905, 0.03716970607638359, 0.049080949276685715, -0.0022114962339401245, -0.053867537528276443, -0.028609074652194977, 0.004938471131026745, -0.024061815813183784, 0.00944430846720934, -0.03159148618578911, 0.025129592046141624, -0.02678648941218853, 0.002892664633691311, 0.05025918409228325, -0.049117766320705414, 0.00024723997921682894, 0.02240491844713688, 0.06244657561182976, 0.03508938103914261, 0.01313550490885973, -0.010180707089602947, 0.03731698542833328, 0.04315293952822685, 0.04676129296422005, -0.047497689723968506, -0.010364806279540062, -0.04624581336975098, 0.045767154544591904, 0.02875635400414467, -0.010705390013754368, -0.008206238970160484, 0.03591782599687576, -0.05898550525307655, -0.055413972586393356, -0.014773990958929062, -0.029860951006412506, -0.006880721542984247, -0.06395619362592697, -0.044110257178545, -0.0016430887626484036, -0.01955137588083744, 0.025497792288661003, 0.02448524348437786, 0.003136596642434597, 0.00251295929774642, 0.0863795205950737, 0.03256721422076225, -0.03737221285700798, -0.021742159500718117, 0.07194611430168152, 0.023159727454185486, -0.06255703419446945, 0.04260064288973808, -0.043815698474645615, -0.06296205520629883, -0.037814054638147354, 0.011763962917029858, 0.0370592437684536, -0.008339710533618927, 0.017710380256175995, -0.03153625875711441, -0.06564991176128387, 0.007004988845437765, -0.016283607110381126, -0.01832711324095726, -0.026583978906273842, 0.024945493787527084, -0.03950776904821396, -0.025276871398091316, -0.0032470563892275095, 0.03490528091788292, -0.020361414179205894, -0.04179060459136963, -0.01672544702887535, 0.014810810796916485, 0.007340970914810896, 0.05239474028348923, -0.0075895050540566444, -0.01135894376784563, -0.0019215393112972379, 0.03030279092490673, -0.03050529956817627, -0.0021459106355905533, -0.050848305225372314, 0.03573372960090637, -0.015252649784088135, 0.03149943798780441, 0.070583775639534, 0.046614013612270355, -0.009922967292368412, -0.06719634681940079, 0.02063756249845028, -0.060200560837984085, -0.023730436339974403, 0.01816142350435257, 0.04683493450284004, 0.025092773139476776, -0.042416542768478394, 0.02183420956134796, -0.0011028714943677187, -0.012500361539423466, 0.033763863146305084, -0.00873552542179823, -0.011248484253883362, -0.00942589808255434, 0.006185745820403099, -0.028332924470305443, 0.04322658106684685, 0.031978096812963486, 0.027412427589297295, 0.038881830871105194, -0.018612466752529144, 0.013273579999804497, 0.02978731133043766, -0.01462671160697937, 0.041496045887470245, 0.048749569803476334, 0.008905816823244095, 0.0050673410296440125, 0.09889829158782959, -0.07441304624080658, -0.01180078275501728, -0.02275470830500126, -0.06255703419446945, -0.09565813839435577, -0.037298575043678284, -0.002127500716596842, 0.024742983281612396, 0.010355601087212563, 0.0007093586609698832, 0.037445854395627975, 0.013098685070872307, 0.04156968370079994 ]
715,698
pytorch_optimizer.loss.focal
__init__
null
def __init__( self, alpha: float = 0.25, gamma: float = 2.0, label_smooth: float = 0.0, eps: float = 1e-6, reduction: str = 'mean', ): super().__init__() self.alpha = alpha self.gamma = gamma self.reduction = reduction self.bce = BCELoss(label_smooth=label_smooth, eps=eps, reduction='none')
(self, alpha: float = 0.25, gamma: float = 2.0, label_smooth: float = 0.0, eps: float = 1e-06, reduction: str = 'mean')
[ -0.005655707325786352, -0.036346372216939926, -0.02956683374941349, 0.016062574461102486, -0.038411300629377365, -0.039324983954429626, -0.053395725786685944, -0.04473399743437767, 0.06362899392843246, -0.012608847580850124, -0.016418911516666412, 0.0033372328616678715, 0.026752684265375137, 0.04279698431491852, -0.02437710389494896, 0.01530421618372202, 0.014162111096084118, -0.00867543462663889, -0.001386516378261149, 0.01964421756565571, 0.008931267075240612, -0.03800927847623825, -0.019388386979699135, 0.06187472119927406, 0.0008531529456377029, 0.04495328292250633, -0.0017405691323801875, 0.026752684265375137, -0.006834360770881176, -0.02161777764558792, -0.006848066113889217, -0.04919277876615524, -0.026752684265375137, 0.04890039935708046, 0.03217997029423714, -0.012544889003038406, 0.04060414433479309, 0.0038991488981992006, -0.09626580774784088, -0.011156088672578335, 0.0067795393988490105, -0.016382364556193352, 0.022513188421726227, 0.018703123554587364, 0.014893058687448502, -0.026021737605333328, 0.024230914190411568, 0.004504465032368898, -0.011905309744179249, -0.026825780048966408, -0.07082882523536682, -0.03177794814109802, 0.030316054821014404, 0.0030882537830621004, 0.005285665392875671, 0.045903511345386505, 0.041554372757673264, 0.02315276674926281, -0.032106876373291016, 0.028178032487630844, -0.025473525747656822, -0.061947815120220184, 0.020265523344278336, -0.026789231225848198, -0.029347548261284828, 0.006596802733838558, -0.0893218070268631, 0.020429987460374832, 0.01312051061540842, 0.03320329636335373, 0.06150924414396286, -0.03219824284315109, -0.009557140991091728, 0.027118157595396042, -0.049338966608047485, -0.013029142282903194, -0.05482107400894165, -0.0043285805732011795, -0.01715899631381035, -0.008844466879963875, 0.01833765022456646, 0.019735585898160934, -0.008725687861442566, -0.02108784019947052, 0.06125341355800629, -0.10883810371160507, -0.01556918490678072, -0.010059666819870472, 0.01514889020472765, 0.04564768075942993, -0.0644330382347107, -0.0028392747044563293, -0.008565792813897133, 0.024541568011045456, 0.07199834287166595, 0.03689458221197128, -0.0011900741374120116, 0.002498927293345332, 0.04367412254214287, -0.005747076123952866, 0.03563369810581207, 0.0015281374799087644, 0.01845642924308777, 0.022568009793758392, -0.004111580550670624, -0.03327639400959015, -0.003003738122060895, 0.00187419552821666, 0.004856233485043049, -0.06300769001245499, 0.004815117921680212, 0.04528220742940903, 0.012426109984517097, -0.0007566450512968004, -0.040202122181653976, -0.01642804779112339, -0.0018799060489982367, -0.003241295926272869, -0.01092766784131527, 0.015139752998948097, -0.023591335862874985, -0.009621098637580872, -0.056794632226228714, 0.04462435469031334, 0.055296190083026886, 0.020265523344278336, 0.027721190825104713, 0.011475877836346626, 0.03579816222190857, -0.07115775346755981, 0.03124801255762577, -0.030736349523067474, -0.01499356422573328, -0.03568851947784424, 0.0490465871989727, -0.06183817237615585, 0.025912094861268997, 0.05039884150028229, 0.005760781466960907, 0.035396140068769455, 0.04579387232661247, 0.02028379775583744, 0.0011718004243448377, -0.01430830080062151, 0.0035382434725761414, -0.01476514246314764, 0.012444383464753628, -0.07258310168981552, 0.0273191686719656, 0.01894981786608696, 0.02066754549741745, 0.03548751026391983, -0.024468472227454185, 0.011695162393152714, 0.012088047340512276, -0.023627882823348045, 0.011119541712105274, -0.030955633148550987, 0.033185023814439774, 0.050983600318431854, 0.012215962633490562, 0.018767081201076508, 0.015642279759049416, -0.058658551424741745, 0.018858449533581734, 0.008131792768836021, -0.030535338446497917, 0.012645394541323185, -0.004714612383395433, -0.011676888912916183, -0.012928636744618416, -0.10744930803775787, -0.004490759689360857, 0.043308649212121964, 0.017816849052906036, 0.06892836093902588, 0.055223096162080765, 0.03166830912232399, 0.008798782713711262, 0.04042140394449234, 0.03899605944752693, 0.013915415853261948, -0.028835885226726532, 0.0017188690835610032, 0.024578114971518517, -0.021142661571502686, 0.014819963835179806, 0.052664779126644135, -0.011905309744179249, -0.04162747040390968, 0.04743850231170654, -0.005144044291228056, 0.014445353299379349, 0.010132761672139168, 0.00738257123157382, -0.0016023743664845824, 0.04919277876615524, -0.013513394631445408, 0.02921963296830654, 0.057635221630334854, -0.04619589075446129, 0.03563369810581207, 0.02903689630329609, -0.0001804526982596144, 0.04707302898168564, 0.003442306537181139, 0.010425141081213951, 0.02781255915760994, -0.039178796112537384, -0.06278840452432632, -0.016830069944262505, 0.022147713229060173, 0.013284973800182343, 0.06428685039281845, 0.045209113508462906, -0.05120288208127022, 0.01350425835698843, 0.027849106118083, 0.019498029723763466, 0.03192413970828056, 0.012234236113727093, -0.04363757371902466, -0.009621098637580872, 0.004264622926712036, 0.03172312676906586, 0.004440506920218468, 0.05895092710852623, -0.008908424526453018, 0.03221651911735535, -0.00020086784206796438, -0.048608019948005676, -0.028671421110630035, -0.04287008196115494, -0.002434969414025545, 0.05039884150028229, 0.02914653718471527, -0.01776202768087387, 0.011256594210863113, -0.08807919174432755, -0.06004735082387924, 0.0283790435642004, -0.031156644225120544, -0.026387210935354233, 0.024687757715582848, 0.037077318876981735, -0.011338825337588787, 0.050106462091207504, 0.0609610341489315, -0.056794632226228714, 0.019973143935203552, -0.015477816574275494, -0.008296255953609943, 0.017816849052906036, 0.021416766569018364, -0.053578462451696396, -0.04045795276761055, -0.02788565307855606, -0.03740624710917473, 0.039946287870407104, 0.0013202741974964738, -0.051824189722537994, 0.009200803935527802, -0.05142216756939888, 0.10277123749256134, 0.04626898840069771, 0.026113105937838554, -0.002590295858681202, -0.02318931370973587, 0.023043125867843628, 0.028817610815167427, 0.09414605796337128, 0.020722366869449615, 0.02017415501177311, 0.020448260009288788, -0.023810619488358498, -0.0388864167034626, -0.04287008196115494, 0.001083287294022739, -0.013376342132687569, -0.0007406555814668536, 0.05913366749882698, -0.0550038106739521, -0.04908313602209091, -0.014810826629400253, -0.022714197635650635, -0.023883715271949768, 0.015039248391985893, -0.04988717660307884, 0.03148556873202324, -0.01711331121623516, -0.016254449263215065, 0.039251890033483505, 0.06571219116449356, 0.0508008636534214, 0.06669897586107254, -0.03260026499629021, 0.0644330382347107, 0.015359037555754185, -0.011375373229384422, 0.004778570495545864, 0.049302421510219574, -0.05299370363354683, -0.007629266008734703, -0.017058491706848145, -0.05716010555624962, -0.03234443441033363, 0.05544238165020943, 0.02735571563243866, 0.015560048632323742, 0.026368936523795128, 0.028671421110630035, 0.02746535837650299, -0.0035108330193907022, 0.05222621187567711, -0.04334519803524017, -0.0395808145403862, 0.05215311422944069, -0.03261853754520416, 0.014034194871783257, 0.04999681934714317, -0.0013899427140131593, -0.017926491796970367, -0.018063543364405632, -0.01543213240802288, -0.05244549363851547, -0.034098707139492035, 0.06987859308719635, 0.036583930253982544, 0.041773658245801926, -0.03523167595267296, -0.05821998044848442, -0.020009692758321762, 0.04871766269207001, -0.012490068562328815, -0.0973622277379036, -0.020685818046331406, 0.021562956273555756, 0.03135765343904495, 0.0052948021329939365, -0.06637004762887955, 0.05376119911670685, 0.002766180085018277, -0.0497409887611866, 0.062057457864284515, -0.015505227260291576, -0.04911968111991882, -0.020539628341794014, -0.06337316334247589, 0.034555550664663315, -0.008031287230551243, -0.023134494200348854, -0.015212847851216793, 0.019424933940172195, 0.05726974830031395, 0.07660331577062607, 0.023006577044725418, -0.029164811596274376, 0.005226275883615017, 0.033404309302568436, -0.06567564606666565, -0.013732679188251495, -0.006852634251117706, -0.03899605944752693, 0.032527171075344086, 0.011585520580410957, 0.023134494200348854, 0.02704506367444992, 0.000045006105210632086, 0.04396650195121765, 0.003433169797062874, 0.016994532197713852, -0.024651210755109787, 0.00024269746791105717, -0.0213619451969862, -0.0343179926276207, -0.021270576864480972, -0.04743850231170654, -0.03473828732967377, 0.050947051495313644, 0.04195639491081238, 0.040640689432621, -0.026113105937838554, -0.046013154089450836, 0.018730534240603447, 0.01176825724542141, 0.002158579882234335, 0.006190212909132242, 0.00922364555299282, 0.09611961990594864, -0.013814910314977169, 0.02161777764558792, -0.021727418527007103, 0.04615934565663338, -0.023463420569896698, -0.02815975807607174, 0.007300339639186859, 0.048534926027059555, 0.0031270855106413364, -0.03678493946790695, -0.0011438188375905156, -0.05164145305752754, 0.034939296543598175, 0.038411300629377365, 0.030663253739476204, -0.02013760805130005, -0.011887036263942719, -0.011686026118695736, 0.050106462091207504, 0.023244135081768036, 0.0634097084403038, -0.03221651911735535, -0.006665328983217478, -0.04992372542619705, 0.011658615432679653, -0.04568422958254814, -0.016565101221203804, -0.028817610815167427, -0.09721603989601135, -0.026990242302417755, -0.06998823583126068, -0.034445907920598984, 0.035505782812833786, 0.0388864167034626, -0.026679590344429016, -0.005742507521063089, 0.026368936523795128, -0.0189132709056139, -0.0013271268690004945, 0.024779126048088074, -0.04524565860629082, -0.10635288804769516, -0.032417528331279755, -0.03811892122030258, -0.05120288208127022, 0.007757182233035564, -0.02245836704969406, -0.031576938927173615, 0.0009867793414741755, 0.0371321402490139, -0.029311001300811768, -0.0378265418112278, -0.026113105937838554, 0.04542839527130127, 0.008734824135899544, -0.032527171075344086, -0.01700367033481598, 0.011841352097690105, 0.010087077505886555, -0.03961736336350441, -0.025199420750141144, 0.03649256378412247, 0.015039248391985893, 0.012124594300985336, 0.006733855232596397, 0.0213619451969862, -0.03026123344898224, -0.07207144051790237, -0.03943462669849396, 0.03576161339879036, 0.007816571742296219, -0.03965391218662262, 0.009639372117817402, -0.03387942537665367, 0.019242197275161743, -0.027520179748535156, 0.019041186198592186, 0.09538867324590683, 0.03950772061944008, 0.008616045117378235, 0.01573364809155464, -0.03303883597254753, -0.01937011256814003, 0.0336235910654068, -0.017012806609272957, -0.05577130615711212, 0.03002367541193962, -0.002670243149623275, -0.03166830912232399, 0.062020909041166306, -0.007113034371286631, 0.0479867123067379, -0.016473732888698578, 0.018090954050421715, -0.00769779272377491, 0.02392026223242283, 0.054492149502038956, -0.00749678211286664, -0.016263585537672043, 0.0472923144698143, 0.019571123644709587, -0.08025805652141571, 0.024815673008561134, -0.017031081020832062, 0.05025264993309975, -0.03289264440536499, -0.0057836235500872135, 0.014399669133126736, 0.03228961303830147, 0.011740846559405327, -0.009260193444788456, -0.0033852013293653727, 0.010571330785751343, -0.05734284222126007, -0.0550038106739521, 0.006994255352765322, -0.056904274970293045, -0.09436534345149994, 0.01940665952861309, -0.01573364809155464, 0.008931267075240612, 0.03822856396436691, -0.015258532017469406, 0.00876680389046669, 0.026186199858784676, -0.0058658551424741745, -0.03768035024404526, -0.036657024174928665, 0.0371321402490139, 0.0007263792213052511, 0.0232989564538002, 0.04981408268213272, 0.058658551424741745, 0.04367412254214287, -0.031686581671237946, -0.0007475081947632134, 0.03808237239718437, 0.022641103714704514, -0.031339380890131, 0.04992372542619705, 0.043418291956186295, -0.019260471686720848, -0.03870368003845215, -0.011813941411674023, 0.07653021812438965, -0.025418704375624657, -0.00809981394559145, -0.00836478266865015, -0.02101474441587925, -0.030498791486024857, -0.057050466537475586, 0.0011523846769705415, 0.021983250975608826, 0.07623784244060516, 0.00696227652952075, -0.023006577044725418, 0.03800927847623825, -0.027026789262890816, 0.08354731649160385, -0.0665527880191803, -0.018767081201076508, -0.005628297105431557, -0.008291687816381454, -0.08237779885530472, -0.028214579448103905, 0.021489860489964485, 0.014207795262336731, -0.010827162303030491, 0.024431925266981125, 0.002697653602808714, 0.017021942883729935, -0.03950772061944008, -0.02984093874692917, 0.02830594778060913, 0.023280682042241096, 0.0008206029306165874, 0.006350107956677675, -0.010881983675062656, 0.02196497656404972, -0.04191984981298447, -0.012289057485759258, -0.019278744235634804, -0.006505434401333332, 0.006889181677252054, 0.03366013988852501, -0.05547892674803734, 0.014107289724051952, 0.014125563204288483, -0.00751505559310317, -0.008163771592080593, -0.02995057962834835, 0.0010701530845835805, -0.0322347916662693, -0.040129028260707855, -0.0033486539032310247, 0.020101061090826988, 0.012764173559844494, -0.044222332537174225, -0.009095730260014534, -0.01098248828202486, -0.03139420226216316, 0.025309063494205475, 0.03197896108031273, -0.01092766784131527, -0.034135255962610245, -0.04206603765487671, -0.017506197094917297, -0.06063210964202881, -0.0005205146735534072, 0.0023550218902528286, 0.04305281862616539, -0.044222332537174225, 0.00776631897315383, 0.01863916590809822, 0.03181449696421623, 0.01639150083065033, 0.00020672113168984652, 0.003003738122060895, 0.03075462207198143, -0.002441822085529566, -0.01178653072565794, -0.039178796112537384, -0.005153181031346321, -0.0308277178555727, -0.0116494782269001, -0.031997233629226685, -0.010288088582456112, 0.008373918943107128, -0.0156696904450655, -0.0013454005820676684, 0.017963038757443428, 0.008223161101341248, -0.0035062646493315697, -0.012179415673017502, 0.09838555753231049, -0.01259057316929102, 0.0035884962417185307, 0.013705268502235413, -0.0945846289396286, -0.021142661571502686, 0.0006395792006514966, -0.010013982653617859, 0.05405357852578163, -0.02858005277812481, -0.03778999298810959, 0.006601370871067047, 0.0402752161026001, 0.021654324606060982, 0.05295715853571892, 0.01964421756565571, -0.017222953960299492, -0.041737113147974014, 0.04184675216674805, 0.008620614185929298, 0.01863916590809822, -0.03146729618310928, -0.0023036273196339607, -0.03426317125558853, 0.009849519468843937, 0.04279698431491852, -0.02108784019947052, 0.015523500740528107, 0.020302072167396545, 0.023627882823348045, 0.022220809012651443, -0.022787293419241905, 0.0006167370593175292, 0.006103413179516792, 0.019918324425816536, 0.059389498084783554, -0.04725576564669609, -0.025491800159215927, -0.008711982518434525, 0.07199834287166595, 0.05891438201069832, 0.004008790943771601, 0.0036707278341054916, -0.0007515055476687849, -0.08654420077800751, -0.044843640178442, 0.006665328983217478, -0.08588635176420212, -0.012325605377554893, -0.07302167266607285, -0.03519513085484505, -0.024267463013529778, 0.012617983855307102, 0.019625945016741753, -0.0010872846469283104, 0.04495328292250633, 0.018520386889576912, 0.06541981548070908, 0.03939807787537575, 0.0013910847483202815, -0.039361532777547836, 0.047621238976716995, 0.008264277130365372, -0.09655818343162537, 0.06311733275651932, -0.0020123901776969433, -0.045099470764398575, -0.04268734157085419, 0.026332389563322067, 0.008775940164923668, -0.015084932558238506, -0.007752613630145788, -0.027666369453072548, -0.07631093263626099, -0.06362899392843246, 0.025126324966549873, -0.01723209023475647, -0.015797605738043785, 0.013833184726536274, -0.07291202992200851, -0.00987693015486002, 0.0248704943805933, 0.03950772061944008, -0.037534162402153015, -0.04356447979807854, -0.022970030084252357, -0.046926841139793396, 0.015614869073033333, 0.02490704134106636, 0.001092424150556326, -0.034482456743717194, -0.0024463904555886984, 0.041700564324855804, -0.025912094861268997, -0.02910999022424221, -0.08018495887517929, 0.044149238616228104, -0.015715375542640686, 0.00825057178735733, 0.061070676892995834, 0.023847168311476707, 0.005628297105431557, -0.03177794814109802, -0.022184262052178383, -0.022147713229060173, 0.04714612290263176, -0.017085902392864227, 0.05332263186573982, 0.030663253739476204, -0.07192525267601013, 0.023171041160821915, -0.0232989564538002, -0.03234443441033363, 0.009685056284070015, -0.0076384032145142555, 0.056831181049346924, 0.013549942523241043, 0.028287675231695175, -0.05631951615214348, 0.008163771592080593, 0.03106527589261532, -0.0294206440448761, 0.05383429676294327, 0.007528760936111212, 0.012234236113727093, 0.025345610454678535, -0.005080086179077625, -0.009639372117817402, 0.011475877836346626, 0.0423949658870697, 0.04276043921709061, 0.07521451264619827, -0.09356129914522171, 0.014353984966874123, -0.008999792858958244, -0.041737113147974014, -0.08098900318145752, -0.012179415673017502, -0.05039884150028229, 0.042614247649908066, -0.0232989564538002, 0.025071505457162857, 0.03778999298810959, 0.08712895959615707, 0.03219824284315109 ]
715,728
pytorch_optimizer.loss.focal
forward
null
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: bce_loss = self.bce(y_pred, y_true) focal_loss = ( y_true * self.alpha * (1.0 - y_pred) ** self.gamma * bce_loss + (1.0 - y_true) ** self.gamma * bce_loss ) # fmt: skip return focal_loss.mean() if self.reduction == 'mean' else focal_loss.sum()
(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor
[ -0.038594163954257965, -0.033173032104969025, -0.003854928771033883, 0.056185923516750336, 0.06070952117443085, -0.005860927980393171, -0.034914255142211914, 0.00043530628317967057, 0.07151588797569275, 0.02513108402490616, 0.017573809251189232, -0.07079785317182541, 0.024646414443850517, 0.010994849726557732, 0.024323299527168274, 0.06692048907279968, -0.002187750767916441, -0.01551844459027052, 0.01340922899544239, -0.008948461152613163, 0.01690065488219261, -0.06020689755678177, -0.03794793784618378, 0.01847134716808796, -0.002827246906235814, -0.02116396278142929, -0.01933298446238041, -0.008616372011601925, -0.03444753587245941, 0.00029815113521181047, -0.02017667144536972, -0.013938776217401028, 0.027267226949334145, -0.003998535219579935, 0.0634380355477333, 0.0056589818559587, 0.019979212433099747, -0.013077138923108578, -0.04046104475855827, -0.035147618502378464, -0.04379988834261894, -0.06587934494018555, 0.020122818648815155, 0.059740178287029266, -0.01599414087831974, 0.018668806180357933, -0.04247153177857399, 0.010932021774351597, 0.05155462399125099, 0.015922337770462036, -0.04372808709740639, -0.04814397916197777, -0.00942415650933981, 0.018273888155817986, 0.0338372103869915, 0.04688742384314537, 0.028828943148255348, -0.015446641482412815, -0.06684868782758713, -0.04020973667502403, 0.023174449801445007, -0.0706542506814003, 0.03683498874306679, -0.03617081046104431, 0.033173032104969025, 0.017914872616529465, -0.0019723414443433285, 0.04211251810193062, -0.0033747456036508083, -0.0032513339538127184, -0.04943643510341644, 0.005676932632923126, 0.03293967247009277, 0.014881191775202751, -0.026441490277647972, -0.005591666325926781, -0.011605176143348217, -0.04372808709740639, 0.0224025659263134, -0.059273459017276764, 0.0035632287617772818, -0.0009996338048949838, -0.012116773054003716, 0.004761443007737398, 0.013355376198887825, -0.06835655122995377, 0.0017703952034935355, -0.014979921281337738, -0.020643390715122223, 0.05259576812386513, -0.023336006328463554, 0.030803529545664787, 0.01801360212266445, 0.050154462456703186, 0.0529547855257988, 0.036475975066423416, -0.06325852870941162, 0.007395719178020954, 0.056688547134399414, 0.03247294947504997, 0.037014495581388474, 0.1309688538312912, -0.0033231370616704226, 0.023443711921572685, 0.05737067386507988, 0.03669138252735138, -0.00538972020149231, -0.0243592020124197, -0.009639565832912922, -0.022420518100261688, -0.0022012137342244387, -0.04936463013291359, 0.0012543103657662868, -0.0018579051829874516, -0.02252822183072567, -0.05510887876152992, -0.008400962688028812, 0.011973166838288307, -0.037014495581388474, 0.0706542506814003, 0.013346401043236256, -0.061463452875614166, 0.0015415227971971035, -0.02879304252564907, -0.003962633665651083, 0.022312812507152557, 0.061714764684438705, -0.02053568698465824, 0.017223767936229706, -0.03137795254588127, -0.018650854006409645, 0.030731726437807083, -0.014432422816753387, -0.023838628083467484, 0.03394491598010063, -0.02547214925289154, 0.050046760588884354, 0.013633613474667072, 0.03941990062594414, -0.0029708531219512224, 0.058160509914159775, 0.02768009528517723, 0.02450280822813511, 0.03419622406363487, -0.005098020192235708, -0.011766732670366764, 0.03952760621905327, 0.05737067386507988, 0.03758892044425011, 0.014360619708895683, 0.030067548155784607, 0.018650854006409645, 0.027985258027911186, -0.02498747780919075, -0.01132693886756897, 0.011982141993939877, -0.020984455943107605, -0.026279933750629425, -0.00361708109267056, -0.00972932018339634, -0.028649436309933662, -0.03112664259970188, -0.05747837945818901, -0.044123005121946335, 0.02080494724214077, -0.024897724390029907, 0.024574611335992813, 0.04986725375056267, 0.0004779393784701824, 0.04983134940266609, 0.06907457858324051, -0.07219801843166351, 0.03322688490152359, 0.0711209699511528, 0.0019577564671635628, 0.037481218576431274, 0.020822899416089058, -0.04243563115596771, -0.02746468596160412, 0.06566393375396729, 0.04972364753484726, -0.026405589655041695, -0.058268215507268906, -0.07697292417287827, 0.04053284972906113, -0.02793140523135662, 0.026010671630501747, 0.057550184428691864, 0.03934809938073158, 0.011632101610302925, -0.027626242488622665, -0.05708346515893936, 0.02660304866731167, -0.03466294705867767, 0.01594926416873932, -0.036978594958782196, 0.025149034336209297, 0.03952760621905327, 0.04735414311289787, -0.04767725616693497, -0.10009352117776871, -0.012314231134951115, -0.008109262213110924, -0.0010961191728711128, -0.03977891802787781, -0.006385988090187311, -0.03001369535923004, 0.08207093924283981, -0.04530775547027588, -0.08702535182237625, -0.016407007351517677, 0.008073360659182072, -0.017502006143331528, 0.015706928446888924, 0.03380130976438522, -0.022366665303707123, 0.04110727459192276, 0.011632101610302925, -0.019961262121796608, 0.017142990604043007, -0.05661674216389656, -0.047425948083400726, -0.03380130976438522, 0.010923046618700027, 0.011623126454651356, -0.025328543037176132, 0.031216397881507874, 0.022187156602740288, 0.009172845631837845, -0.013256646692752838, -0.002249456476420164, 0.031342051923274994, -0.045738574117422104, -0.006915535777807236, 0.08795879781246185, 0.03974301367998123, 0.005057630594819784, 0.003195237834006548, -0.031952377408742905, 0.023479612544178963, -0.004317161161452532, -0.04232792556285858, 0.03507581353187561, 0.03380130976438522, -0.0224025659263134, -0.02450280822813511, 0.05636543408036232, 0.06035050377249718, -0.02128961868584156, 0.0720544084906578, -0.039814818650484085, -0.007431620731949806, -0.026010671630501747, 0.01532996166497469, -0.025149034336209297, -0.05772969126701355, -0.0008846365963108838, -0.04272284358739853, 0.03776843100786209, 0.0088901212438941, -0.008804854936897755, 0.027733946219086647, -0.008517642505466938, 0.04272284358739853, -0.05105200409889221, 0.006933486554771662, 0.029259761795401573, -0.019602246582508087, 0.042148418724536896, 0.0659511461853981, 0.06587934494018555, -0.018229011446237564, -0.028882795944809914, -0.03959940746426582, -0.03949170559644699, -0.009343378245830536, 0.04369218647480011, 0.012969434261322021, 0.002842953894287348, 0.0007314940448850393, 0.01532098650932312, -0.11308988183736801, -0.049651842564344406, -0.0047749062068760395, -0.010994849726557732, 0.0269441120326519, 0.017555857077240944, -0.04767725616693497, 0.0802040621638298, -0.002571448450908065, 0.04430251196026802, 0.007638054434210062, 0.044374313205480576, 0.024538708850741386, 0.028110913932323456, -0.03758892044425011, -0.009837024845182896, -0.02660304866731167, 0.02055363729596138, 0.01760970987379551, 0.007678444031625986, 0.022205108776688576, 0.0023582829162478447, -0.025005429983139038, -0.05080069229006767, -0.04405120015144348, 0.05327789857983589, 0.02164863422513008, -0.028128864243626595, -0.03179082274436951, 0.019871506839990616, -0.03322688490152359, -0.05098019912838936, -0.0020407787524163723, -0.0391685888171196, -0.03419622406363487, 0.022366665303707123, -0.0027801261749118567, 0.033190980553627014, 0.04821578040719032, 0.0310189388692379, -0.012691197916865349, 0.020122818648815155, 0.051375117152929306, -0.011991117149591446, -0.01723274402320385, 0.007036703638732433, 0.029026402160525322, 0.00834262277930975, -0.018776509910821915, -0.02633378654718399, -0.0195842944085598, -0.031575411558151245, 0.02251027151942253, -0.06333032995462418, -0.058519523590803146, 0.009621615521609783, 0.01632623001933098, 0.00928952544927597, -0.003520595608279109, -0.04426661133766174, -0.002555741462856531, -0.040676455944776535, 0.04372808709740639, -0.010187064297497272, 0.003457767888903618, -0.030498366802930832, -0.009881901554763317, 0.059524767100811005, -0.021451175212860107, -0.018650854006409645, 0.000535437953658402, 0.01895601861178875, 0.04850299283862114, 0.019350934773683548, -0.004404671490192413, -0.05772969126701355, 0.004469742998480797, 0.0002371465670876205, -0.01784306950867176, -0.024448955431580544, -0.027895504608750343, -0.046205293387174606, 0.044123005121946335, -0.042507436126470566, 0.0465284064412117, -0.017098112031817436, -0.029259761795401573, -0.021881993860006332, -0.00249291374348104, -0.02057158760726452, -0.016801925376057625, 0.0016896167071536183, 0.0035856671165674925, -0.051877737045288086, 0.024054037407040596, 0.02410789020359516, -0.022115353494882584, 0.04469742998480797, 0.026046574115753174, 0.012754024937748909, 0.02042798139154911, -0.1138797178864479, -0.017286596819758415, 0.007014265283942223, 0.02829042077064514, -0.05105200409889221, -0.07460341602563858, 0.017116064205765724, -0.021881993860006332, 0.006893097423017025, -0.04426661133766174, -0.000024594664864707738, -0.07108506560325623, -0.03848646208643913, 0.00834262277930975, 0.010187064297497272, 0.0465284064412117, -0.03171901777386665, -0.0021653121802955866, -0.004958901554346085, 0.016676269471645355, 0.013463080860674381, 0.0019566344562917948, -0.05819641053676605, -0.00839647464454174, 0.023587318137288094, 0.08386602252721786, -0.02805706113576889, 0.10741743445396423, -0.020338227972388268, 0.0360272042453289, -0.07747554033994675, 0.011766732670366764, -0.053744617849588394, 0.0043081860058009624, -0.05708346515893936, -0.0672077015042305, -0.005102507770061493, 0.02746468596160412, 0.01273607462644577, 0.030713776126503944, 0.019099624827504158, -0.011335914023220539, -0.060135096311569214, 0.012457837350666523, -0.03087533265352249, 0.027662143111228943, 0.0047749062068760395, 0.001588643528521061, -0.0073912316001951694, -0.05683215335011482, 0.006049410905689001, -0.05442674830555916, -0.01359771192073822, -0.011955215595662594, 0.012089846655726433, -0.011398741975426674, -0.006385988090187311, 0.008252868428826332, -0.013436154462397099, 0.011030751280486584, 0.045235950499773026, 0.07173129171133041, -0.011955215595662594, -0.009675467386841774, -0.03358589857816696, -0.04598988592624664, -0.053349703550338745, 0.009199772030115128, -0.04408710077404976, -0.014728610403835773, -0.005326892249286175, 0.03816334530711174, 0.047425948083400726, 0.02238461561501026, -0.09111813455820084, -0.05155462399125099, 0.01727762073278427, -0.0015673269517719746, -0.030803529545664787, 0.046707917004823685, -0.016110820695757866, 0.045738574117422104, -0.001395672676153481, 0.01150644663721323, 0.019907409325242043, -0.0012857242254540324, -0.037983838468790054, -0.0014809388667345047, 0.013301524333655834, -0.0477849617600441, 0.037373512983322144, 0.005555764771997929, -0.04638480022549629, 0.0374453142285347, -0.01287070568650961, 0.019997162744402885, 0.0888204351067543, -0.02032027766108513, -0.037732526659965515, 0.03740941360592842, -0.04896971210837364, -0.044374313205480576, 0.03645802289247513, 0.04017383232712746, -0.018435444682836533, -0.005726296920329332, 0.05291888490319252, 0.03173696994781494, -0.011650052852928638, 0.018776509910821915, 0.03103688918054104, 0.00788038969039917, -0.09004108607769012, -0.05604231730103493, 0.03064197301864624, 0.02437715232372284, 0.05058528110384941, 0.06749491393566132, 0.0013283573789522052, -0.0009076360147446394, -0.10734563320875168, -0.013014311902225018, -0.012233452871441841, -0.0068257818929851055, -0.03065992332994938, -0.013337425887584686, -0.030193202197551727, 0.044517919421195984, 0.024807970970869064, 0.0030718264169991016, 0.001131459721364081, -0.0003329307655803859, -0.013813121244311333, -0.036242615431547165, 0.035991303622722626, 0.051770035177469254, 0.009854975156486034, -0.01729557104408741, -0.0360272042453289, 0.0063994512893259525, -0.028739189729094505, 0.023659121245145798, -0.019727900624275208, 0.0465284064412117, -0.01922527886927128, -0.010770464316010475, 0.001431574230082333, -0.03888137638568878, -0.018085405230522156, -0.02818271704018116, 0.025023380294442177, 0.01801360212266445, -0.07022342830896378, -0.006610372569411993, -0.011291037313640118, -0.06487409770488739, -0.05848362296819687, -0.015850534662604332, 0.010483252815902233, -0.004882610868662596, 0.01660446636378765, 0.003038168651983142, -0.017771266400814056, 0.003381477203220129, -0.023443711921572685, 0.0020576075185090303, -0.022007649764418602, 0.014495250768959522, -0.07790636271238327, -0.0010220722761005163, 0.010133212432265282, 0.04193301126360893, 0.07101326435804367, 0.0731673538684845, 0.05098019912838936, 0.06193017214536667, -0.02189994417130947, 0.02340780943632126, -0.018309790641069412, -0.06261230260133743, 0.05457035452127457, 0.016631392762064934, -0.010869193822145462, 0.03261655569076538, -0.0052416264079511166, 0.05130331218242645, 0.02168453484773636, 0.017448153346776962, -0.013642588630318642, 0.055826909840106964, 0.009693418629467487, 0.03372950479388237, 0.001992536010220647, 0.0160569678992033, 0.04563086852431297, -0.07654210180044174, 0.04193301126360893, -0.008145163767039776, -0.00960366427898407, -0.10562235862016678, 0.027285177260637283, 0.03460909426212311, -0.02881099283695221, 0.02301289327442646, -0.04146628826856613, 0.05916575342416763, 0.01786102168262005, -0.012780951336026192, -0.046241194009780884, -0.005470498465001583, -0.02523878961801529, -0.019045772030949593, 0.0049544139765203, -0.04160989448428154, -0.049292828887701035, 0.01681089960038662, 0.043512675911188126, 0.05661674216389656, 0.026620998978614807, -0.016030041500926018, 0.007516887038946152, -0.020104868337512016, -0.018291838467121124, -0.010573006235063076, -0.03313713148236275, 0.03197032958269119, -0.024395102635025978, -0.027733946219086647, -0.05094429850578308, -0.018417494371533394, -0.0037180541548877954, -0.022617975249886513, 0.004222919698804617, 0.008275306783616543, 0.04017383232712746, 0.03017525188624859, -0.002222530310973525, 0.08221454918384552, 0.043979398906230927, -0.002135020215064287, -0.015536395832896233, 0.06699229031801224, 0.03529122471809387, -0.03040861152112484, 0.05869903415441513, -0.035398926585912704, -0.008356085978448391, -0.014217013493180275, -0.02338985912501812, 0.04835938662290573, -0.022959040477871895, 0.002703835489228368, -0.0046043735928833485, 0.03236524760723114, 0.02326420322060585, 0.04936463013291359, -0.02349756471812725, -0.10296564549207687, -0.045235950499773026, 0.03369360417127609, 0.020374128594994545, 0.010348621755838394, -0.034052617847919464, 0.026638949289917946, -0.03459114208817482, 0.01028579380363226, 0.030749676749110222, -0.012305255979299545, -0.002531059319153428, -0.016469836235046387, 0.05543199181556702, 0.0642278715968132, 0.02006896585226059, 0.003284991718828678, 0.0054839616641402245, 0.0703311339020729, 0.02931361459195614, -0.037337612360715866, -0.048790205270051956, -0.03315507993102074, 0.010258867405354977, 0.018229011446237564, 0.0043440875597298145, -0.015267133712768555, 0.01803155243396759, -0.07241342216730118, -0.050154462456703186, -0.03188057616353035, -0.03460909426212311, 0.022348714992403984, -0.040676455944776535, -0.0129245575517416, 0.022743631154298782, -0.052882980555295944, 0.037337612360715866, 0.04922102391719818, 0.04638480022549629, -0.024341249838471413, 0.035650238394737244, 0.02733903005719185, 0.01563512533903122, 0.008571495302021503, 0.05916575342416763, -0.03766072541475296, -0.06440737843513489, 0.03371155634522438, -0.037337612360715866, -0.02620813064277172, -0.05708346515893936, 0.0034196225460618734, 0.01836364157497883, -0.01776229217648506, -0.006839245092123747, -0.000026084719138452783, -0.020499784499406815, 0.035380978137254715, 0.009980631060898304, 0.0008885633433237672, -0.026980014517903328, 0.03543483093380928, -0.01698143221437931, -0.06681278347969055, 0.0011623126920312643, 0.05726297199726105, -0.008172090165317059, -0.03762482479214668, -0.04340497404336929, -0.01452217623591423, 0.03898908197879791, 0.017510980367660522, -0.05457035452127457, 0.011910338886082172, -0.011443618685007095, 0.03247294947504997, -0.03683498874306679, 0.0063635497353971004, 0.005878878757357597, 0.03579384461045265, -0.007727808319032192, 0.0314856581389904, 0.0023919406812638044, 0.050046760588884354, -0.039814818650484085, -0.056185923516750336, 0.055934615433216095, -0.054965272545814514, -0.037229906767606735, 0.027249276638031006, 0.02496952749788761, 0.021630683913826942, -0.005358306225389242, 0.03631441667675972, -0.01735839992761612, -0.00017459933587815613, -0.0004179164825472981, -0.03694269433617592, 0.052990686148405075, 0.00800604559481144, 0.058591328561306, 0.003100996371358633, 0.055324286222457886, 0.023802727460861206, 0.019620196893811226, 0.024664364755153656, -0.02881099283695221, -0.029116155579686165, -0.007889365777373314, -0.019297081977128983, 0.023210352286696434, 0.05255986750125885, -0.014674758538603783, 0.009105530567467213, 0.08164012432098389, -0.006031460128724575, 0.009253623895347118, -0.03087533265352249, -0.03259860724210739, -0.04846709221601486, -0.04139448702335358, -0.031234348192811012, -0.006255845073610544, 0.027231324464082718, -0.012520665302872658, 0.03484245389699936, 0.0166852455586195, 0.03091123327612877 ]
715,762
pytorch_optimizer.loss.cross_entropy
BCELoss
binary cross entropy with label smoothing + probability input. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param eps: float. epsilon. :param reduction: str. type of reduction.
class BCELoss(nn.Module): r"""binary cross entropy with label smoothing + probability input. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param eps: float. epsilon. :param reduction: str. type of reduction. """ def __init__(self, label_smooth: float = 0.0, eps: float = 1e-6, reduction: str = 'mean'): super().__init__() self.label_smooth = label_smooth self.eps = eps self.reduction = reduction def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: if self.training and self.label_smooth > 0.0: y_true = (1.0 - self.label_smooth) * y_true + self.label_smooth / y_pred.size(-1) y_pred = torch.clamp(y_pred, self.eps, 1.0 - self.eps) return binary_cross_entropy(y_pred, y_true, reduction=self.reduction)
(label_smooth: float = 0.0, eps: float = 1e-06, reduction: str = 'mean')
[ -0.04674236848950386, -0.05171118304133415, -0.023672861978411674, 0.015323475934565067, 0.02314048819243908, -0.030913138762116432, -0.048658911138772964, 0.01101125217974186, 0.04109921306371689, -0.07105407863855362, 0.00032718770671635866, -0.0104877520352602, 0.03936012461781502, 0.02415199764072895, -0.005589918699115515, 0.00981341302394867, 0.04138314351439476, 0.006046872586011887, -0.005589918699115515, 0.0029036521445959806, 0.008411496877670288, -0.017381984740495682, -0.0025753553491085768, 0.021898284554481506, -0.044825825840234756, -0.00395508948713541, -0.007302385754883289, -0.002440043957903981, -0.022075742483139038, -0.004782486241310835, -0.023229217156767845, -0.04546467214822769, -0.002826014533638954, 0.03662727773189545, 0.01775464601814747, 0.004245676565915346, 0.02956445887684822, 0.04099273681640625, -0.11790291965007782, -0.013078635558485985, -0.025731371715664864, -0.07552601397037506, 0.01918318122625351, 0.04283829778432846, -0.01393930520862341, -0.014187745749950409, -0.013673118315637112, -0.000002387187805652502, -0.0055189356207847595, -0.0404958575963974, -0.050220537930727005, -0.03403639420866966, 0.021117471158504486, 0.005869414657354355, 0.012954414822161198, 0.050788406282663345, 0.0329539030790329, 0.008677683770656586, -0.049830131232738495, 0.04273182153701782, -0.006548190489411354, -0.05025603249669075, 0.052279047667980194, 0.005093037150800228, 0.007630682550370693, 0.030185561627149582, -0.08809001743793488, 0.025979813188314438, 0.007479843683540821, 0.017728028818964958, 0.0292805265635252, -0.0590224452316761, 0.02844647504389286, 0.08809001743793488, -0.035775478929281235, -0.03676924481987953, -0.03211985155940056, 0.004773613065481186, 0.04837498068809509, -0.002564264228567481, 0.002892561024054885, -0.01845560409128666, 0.029298271983861923, -0.014853212982416153, 0.052669458091259, -0.11989044398069382, -0.0024023340083658695, 0.008012216538190842, 0.004119237884879112, 0.03045174852013588, -0.07403536885976791, 0.016796374693512917, -0.01453378889709711, 0.026015304028987885, 0.06959892809391022, 0.04901382699608803, -0.008797467686235905, 0.0371241569519043, 0.004252330865710974, -0.008180801756680012, 0.03302488476037979, 0.06058407202363014, 0.03776300698518753, 0.05408911779522896, -0.00042284850496798754, -0.033433038741350174, -0.015163763426244259, 0.03662727773189545, -0.010532116517424583, -0.06498502194881439, -0.030363019555807114, -0.012422041967511177, 0.023406675085425377, -0.04184453561902046, -0.004888960625976324, -0.07722960412502289, 0.02209348790347576, 0.002810486825183034, -0.06612075120210648, 0.020176945254206657, 0.028375491499900818, -0.03637883439660072, -0.05614762753248215, -0.01857982575893402, 0.033823445439338684, 0.02170308120548725, 0.02693808451294899, -0.03652080148458481, 0.044541891664266586, -0.06179078295826912, -0.010336913168430328, -0.011774321086704731, 0.002464444376528263, 0.007200347725301981, 0.03715965151786804, -0.060938987880945206, 0.01212923601269722, 0.05398264527320862, 0.047381214797496796, 0.01813618093729019, 0.03833087161183357, 0.01397479698061943, 0.05132077634334564, 0.0148887038230896, 0.0439385361969471, -0.027985084801912308, 0.019289655610919, -0.012519643642008305, 0.07474520057439804, 0.00484015978872776, 0.009698064997792244, 0.007085000164806843, -0.005993634928017855, 0.010310294106602669, 0.0005625964840874076, 0.01969780959188938, -0.006934161297976971, -0.0190234687179327, -0.01662779040634632, 0.03373471647500992, 0.014143381267786026, -0.006552626844495535, -0.034107375890016556, -0.03426709026098251, 0.005376969464123249, -0.01474673766642809, 0.014276474714279175, 0.030150068923830986, 0.01785224862396717, 0.008642191998660564, -0.022395165637135506, -0.08574757725000381, 0.02615727111697197, 0.059874240309000015, -0.010186074301600456, 0.04986562579870224, 0.020372148603200912, 0.017089180648326874, -0.018278146162629128, 0.029298271983861923, 0.0453936904668808, -0.008846268057823181, -0.029653187841176987, -0.030984120443463326, 0.028198035433888435, 0.024400439113378525, 0.03385893628001213, 0.04383205994963646, -0.013877195306122303, -0.0022115670144557953, -0.0002764458768069744, -0.03318459540605545, 0.017089180648326874, 0.025731371715664864, 0.01912994496524334, 0.0051595838740468025, -0.0014385167742148042, 0.01856207847595215, 0.02560715191066265, 0.029741916805505753, -0.04067331179976463, 0.04677785933017731, 0.03529634326696396, 0.017373112961649895, 0.01283019408583641, 0.005882724188268185, 0.032598987221717834, 0.09163917601108551, -0.06264258176088333, -0.10661660879850388, -0.018863758072257042, 0.014658008702099323, 0.011446024291217327, 0.0839020162820816, 0.06463010609149933, -0.05053996294736862, -0.02248389460146427, 0.015208127908408642, -0.027967339381575584, -0.01104674395173788, -0.021649843081831932, -0.007497589569538832, -0.03691120818257332, 0.03011457808315754, 0.03737260028719902, -0.00441869767382741, 0.020833538845181465, 0.0018244873499497771, 0.06218118965625763, 0.020105961710214615, -0.008038835600018501, 0.019449368119239807, -0.03900521248579025, 0.02253713272511959, 0.07439028471708298, 0.042412400245666504, -0.020673826336860657, 0.019822029396891594, -0.06335241347551346, -0.0012887867633253336, -0.021490132436156273, -0.03701768442988396, -0.014817721210420132, -0.008620009757578373, 0.07105407863855362, -0.036112651228904724, 0.06966990977525711, 0.04287378862500191, -0.06711451709270477, 0.03508339449763298, -0.033770207315683365, -0.03297164663672447, 0.027363983914256096, -0.0146402632817626, -0.02566038817167282, -0.06810828298330307, -0.036556292325258255, -0.05053996294736862, 0.021010996773838997, -0.007719411514699459, -0.042199451476335526, -0.002362406114116311, -0.05731884762644768, 0.04479033127427101, 0.010558735579252243, -0.012102617882192135, -0.03391217440366745, 0.0115968631580472, 0.024560151621699333, 0.020034978166222572, 0.04028290510177612, 0.002468880731612444, -0.025855591520667076, -0.005421333946287632, -0.030859900638461113, -0.012564008124172688, -0.006144474260509014, 0.017426349222660065, -0.011233074590563774, 0.012093745172023773, 0.026139523833990097, -0.06888909637928009, -0.0600162073969841, -0.02912081405520439, 0.00407930975779891, 0.008788594044744968, 0.00016095970931928605, -0.047771621495485306, 0.04606802761554718, -0.003109946846961975, 0.01432971190661192, 0.021454639732837677, 0.07268668711185455, 0.0414896197617054, 0.001242204220034182, -0.025234490633010864, 0.03797595575451851, -0.006051308941096067, -0.0019997269846498966, -0.010966888628900051, 0.011108854785561562, -0.025128016248345375, -0.029032085090875626, -0.058099664747714996, -0.052350033074617386, -0.06111644580960274, 0.039963483810424805, 0.03503015637397766, -0.012705974280834198, -0.007515334989875555, 0.03779849782586098, 0.015252492390573025, 0.03886324539780617, 0.05643156170845032, -0.016246255487203598, -0.021596606820821762, 0.052562981843948364, -0.004003890324383974, 0.015909086912870407, 0.056644510477781296, -0.027452712878584862, 0.03403639420866966, 0.017399732023477554, 0.0790041834115982, -0.021223945543169975, -0.04496778920292854, 0.07137349992990494, 0.013903813436627388, 0.015154890716075897, -0.02899659425020218, -0.03165845945477486, -0.01996399462223053, 0.04273182153701782, -0.002089564921334386, -0.07921713590621948, 0.02415199764072895, 0.028322255238890648, 0.03190690279006958, 0.009352022781968117, -0.045926064252853394, 0.02175631932914257, 0.013291584327816963, -0.04447090998291969, 0.06622722744941711, 0.020159199833869934, -0.0571058988571167, -0.021933777257800102, 0.019165435805916786, 0.042199451476335526, 0.039679549634456635, -0.00036434290814213455, 0.00496438005939126, 0.05146274343132973, 0.06058407202363014, 0.09085836261510849, -0.014099017716944218, -0.022998522967100143, 0.011099981144070625, 0.010816048830747604, -0.059093426913022995, 0.0039794896729290485, -0.03875676915049553, -0.02711554244160652, 0.019307401031255722, -0.020762555301189423, 0.05760278180241585, 0.0030744553077965975, 0.024027777835726738, 0.030203307047486305, 0.004764740355312824, -0.04915579408407211, -0.020283419638872147, -0.0058782873675227165, -0.004048254806548357, -0.006339677609503269, -0.03662727773189545, -0.07517109811306, -0.020815793424844742, 0.04546467214822769, 0.0371241569519043, 0.04422246664762497, -0.017719155177474022, -0.09625307470560074, -0.0016581207746639848, 0.021152961999177933, -0.004813541192561388, 0.027576932683587074, 0.0035691186785697937, 0.049333252012729645, -0.03471073508262634, 0.01923641934990883, -0.01034578587859869, -0.007138237357139587, -0.034213852137327194, -0.07701665908098221, -0.018295893445611, 0.049439724534749985, 0.049439724534749985, -0.018295893445611, -0.04908480867743492, -0.01296328753232956, 0.041915517300367355, 0.03474622592329979, 0.03960856795310974, -0.04986562579870224, 0.03320234268903732, 0.00435880571603775, 0.02331794612109661, -0.0013054234441369772, 0.030522730201482773, -0.05199511721730232, 0.04571311175823212, -0.045038774609565735, 0.02716878056526184, -0.027239762246608734, -0.01352227944880724, -0.025021541863679886, -0.06920851767063141, -0.04429345205426216, -0.04283829778432846, 0.006721211597323418, 0.018863758072257042, 0.06012267991900444, -0.050220537930727005, -0.040069956332445145, 0.006069054827094078, -0.02030116505920887, 0.029138561338186264, -0.005709702614694834, -0.010505498386919498, -0.1083911880850792, -0.04326419532299042, -0.07368045300245285, -0.05834810435771942, 0.015296856872737408, -0.050114065408706665, -0.009218929335474968, -0.0040238541550934315, 0.027133287861943245, 0.004136983305215836, -0.059590309858322144, 0.021596606820821762, 0.050894878804683685, 0.05192413553595543, -0.00022806091874372214, -0.035047903656959534, -0.0030788916628807783, -0.01650356873869896, -0.037053175270557404, -0.013176237232983112, -0.0012843504082411528, -0.011108854785561562, 0.0692794993519783, 0.0502915233373642, -0.01975104585289955, -0.017869994044303894, -0.059199899435043335, -0.0297774076461792, 0.05046898126602173, 0.0011229747906327248, -0.03687571734189987, 0.03769202530384064, -0.037904974073171616, 0.042199451476335526, -0.0040992735885083675, -0.02631698176264763, 0.07009580731391907, 0.000997645198367536, 0.009014853276312351, 0.0483039952814579, -0.0031010739039629698, -0.06285553425550461, 0.039750535041093826, -0.001684739370830357, -0.02743496559560299, 0.01302539836615324, 0.007643992081284523, -0.0010065181413665414, 0.047487691044807434, -0.03258123993873596, 0.041347652673721313, -0.006987398490309715, 0.0005972561775706708, -0.0453936904668808, -0.0000907391295186244, 0.013611008413136005, 0.002203803276643157, 0.008393751457333565, 0.03506564721465111, 0.0057585034519433975, -0.03453327715396881, 0.0041059283539652824, -0.010878159664571285, 0.007510898634791374, -0.05472796782851219, -0.04418697580695152, -0.015465442091226578, 0.024471422657370567, 0.011135472916066647, -0.03786947950720787, -0.017293255776166916, 0.041738059371709824, -0.04156060144305229, -0.06654664874076843, 0.01767479069530964, 0.004017199389636517, -0.025305474177002907, 0.021543368697166443, -0.008123127743601799, 0.021667590364813805, 0.017710281535983086, 0.00023097233497537673, -0.009902141988277435, 0.053734201937913895, 0.0030167815275490284, -0.032492510974407196, 0.02503928728401661, 0.06150685250759125, 0.02576686441898346, -0.009573845192790031, 0.055686239153146744, 0.04564213007688522, 0.02899659425020218, 0.0033827880397439003, -0.025340965017676353, 0.05472796782851219, 0.002522118156775832, -0.02365511655807495, 0.040744297206401825, 0.043370671570301056, -0.01787886768579483, -0.0009322076803073287, 0.005305986385792494, 0.043583620339632034, -0.041631586849689484, -0.011676719412207603, -0.029138561338186264, 0.005252749193459749, -0.06640468537807465, -0.030522730201482773, -0.010824921540915966, -0.006264258176088333, 0.047878097742795944, 0.017914358526468277, -0.016175271943211555, 0.053414780646562576, -0.0018355784704908729, 0.08887083828449249, -0.07446126639842987, -0.01845560409128666, -0.04667138680815697, -0.002475535497069359, -0.036112651228904724, -0.05068193003535271, 0.054656982421875, 0.028907865285873413, -0.02163209766149521, 0.031534239649772644, -0.008411496877670288, 0.043193213641643524, -0.053805187344551086, -0.06864064931869507, 0.05437305197119713, 0.012058253400027752, -0.014542661607265472, 0.03978602588176727, 0.011082235723733902, 0.002830450888723135, -0.0468488410115242, -0.0014551534550264478, -0.042305923998355865, 0.022998522967100143, -0.015634026378393173, 0.02040763944387436, -0.02542969398200512, 0.018047451972961426, 0.01941387727856636, -0.04131216183304787, 0.03847283869981766, -0.026760626584291458, -0.017080307006835938, -0.06260708719491959, 0.03779849782586098, 0.005612100940197706, -0.0022958593908697367, 0.00968031957745552, -0.02331794612109661, 0.01012396439909935, 0.01377071999013424, 0.012537389062345028, 0.021507877856492996, -0.003995017148554325, 0.007200347725301981, -0.022324183955788612, 0.030043594539165497, -0.024719862267374992, -0.08596052974462509, 0.04819752275943756, 0.03508339449763298, 0.04833948612213135, -0.0058782873675227165, 0.032598987221717834, 0.03251025825738907, 0.0004683220467995852, 0.02794959396123886, -0.0322263240814209, -0.009520608000457287, -0.010363532230257988, 0.005230566952377558, -0.036165885627269745, -0.0458550788462162, 0.020940013229846954, -0.007209220435470343, 0.014773356728255749, -0.04177355021238327, -0.0009055890259332955, 0.003948434721678495, -0.0326877161860466, 0.007289076689630747, 0.021294929087162018, 0.022111233323812485, 0.02085128426551819, -0.0019132161978632212, 0.04965267330408096, -0.010292548686265945, -0.005731884855777025, 0.007280203513801098, -0.04156060144305229, 0.0027261944487690926, 0.023832574486732483, -0.022554878145456314, 0.037053175270557404, 0.00011673392145894468, -0.011224201880395412, 0.0043011317029595375, 0.028375491499900818, 0.040850769728422165, 0.04159609228372574, 0.012617245316505432, -0.026299236342310905, -0.044435419142246246, 0.004689320921897888, -0.034213852137327194, 0.005731884855777025, -0.03719514235854149, 0.0056742113083601, -0.010638591833412647, 0.010141709819436073, 0.01834912970662117, -0.047097284346818924, 0.02899659425020218, 0.04106372222304344, 0.055295832455158234, 0.028854629024863243, -0.008371569216251373, -0.005017617717385292, 0.02519899792969227, 0.022785574197769165, 0.03526085242629051, -0.05628959462046623, -0.01009734533727169, -0.01676088385283947, 0.07091211527585983, 0.026565423235297203, -0.00968031957745552, 0.014879831112921238, 0.030575968325138092, -0.04677785933017731, -0.05369871109724045, -0.024240726605057716, -0.04489680752158165, -0.005301550030708313, -0.09831158816814423, -0.06019366532564163, 0.011818685568869114, -0.034604258835315704, 0.0023646242916584015, -0.023779336363077164, 0.011064490303397179, -0.000563428329769522, 0.07673272490501404, 0.023619625717401505, -0.01779901050031185, -0.0390407033264637, 0.0414896197617054, 0.013930432498455048, -0.0517466776072979, 0.027452712878584862, -0.07055719941854477, -0.11002379655838013, -0.03426709026098251, 0.023442167788743973, 0.012981033883988857, -0.032882917672395706, 0.0073423138819634914, -0.021880539134144783, -0.06225217506289482, -0.0056387195363640785, -0.025678135454654694, -0.02599755860865116, -0.04663589224219322, -0.004933325108140707, -0.04557114839553833, -0.019449368119239807, 0.012732592411339283, 0.034604258835315704, -0.04333518072962761, -0.04674236848950386, -0.009130200371146202, 0.011135472916066647, 0.0021627661772072315, 0.04170256853103638, 0.0005345914396457374, -0.021791810169816017, -0.022554878145456314, 0.02415199764072895, -0.04723925143480301, -0.007697229273617268, -0.07502913475036621, 0.05046898126602173, -0.021951522678136826, 0.015580789186060429, 0.07229628413915634, 0.03016781620681286, -0.03698219358921051, -0.050717420876026154, 0.018863758072257042, -0.04372558742761612, 0.020993249490857124, 0.010913650505244732, 0.054798949509859085, 0.017976468428969383, -0.04713277518749237, 0.028588442131876945, -0.0030256544705480337, -0.010780557990074158, 0.031871408224105835, -0.019875267520546913, 0.03245702013373375, -0.003192021045833826, 0.026867100968956947, -0.04546467214822769, 0.0571058988571167, 0.03178267925977707, 0.004239021800458431, 0.0361303947865963, -0.006188838742673397, 0.03479946404695511, 0.040353890508413315, -0.04092175513505936, 0.017781265079975128, 0.032315053045749664, 0.02566038817167282, -0.012901177629828453, 0.11350196599960327, -0.06938597559928894, 0.00003989332981291227, -0.03472847864031792, -0.07751353830099106, -0.08872886747121811, -0.0014728992246091366, -0.014720119535923004, 0.02170308120548725, -0.009263293817639351, 0.00525718554854393, 0.04770063981413841, 0.051107827574014664, 0.04851694405078888 ]
715,768
pytorch_optimizer.loss.cross_entropy
__init__
null
def __init__(self, label_smooth: float = 0.0, eps: float = 1e-6, reduction: str = 'mean'): super().__init__() self.label_smooth = label_smooth self.eps = eps self.reduction = reduction
(self, label_smooth: float = 0.0, eps: float = 1e-06, reduction: str = 'mean')
[ 0.0061333016492426395, -0.007963077165186405, 0.01160042267292738, 0.021548718214035034, -0.02433779463171959, -0.014291792176663876, -0.02995147556066513, -0.036346808075904846, 0.024533206596970558, 0.02417791076004505, -0.020020944997668266, 0.027659814804792404, 0.09244808554649353, 0.02296990342438221, -0.013350256718695164, 0.03151477873325348, 0.037981171160936356, 0.020305180922150612, -0.04107224941253662, 0.04913747310638428, 0.002917870646342635, -0.035138800740242004, 0.0007960856892168522, 0.04370144009590149, 0.01123624388128519, 0.04107224941253662, -0.013794377446174622, -0.01803128607571125, -0.029063234105706215, -0.0650547444820404, -0.04387908801436424, -0.03474797308444977, -0.044696271419525146, 0.02684263326227665, 0.04924406111240387, -0.02623862959444523, -0.003977097570896149, 0.020074239000678062, -0.06786158680915833, 0.01829775795340538, 0.02524380013346672, -0.006497480440884829, -0.057913292199373245, 0.01793357916176319, 0.006950483191758394, 0.009219937957823277, 0.003477462101727724, 0.012666312046349049, 0.021317776292562485, -0.030093593522906303, -0.06533898413181305, 0.012772900983691216, -0.017453929409384727, 0.022046133875846863, -0.03364655748009682, 0.08818453550338745, 0.0664404034614563, 0.01723186857998371, -0.019043879583477974, 0.022152721881866455, -0.010481240227818489, -0.006168831139802933, 0.0029023264069110155, 0.007390162441879511, -0.03691527992486954, -0.017844755202531815, -0.05332997068762779, 0.040148478001356125, -0.010614476166665554, -0.001465597073547542, 0.059370007365942, -0.01859975978732109, -0.01849316991865635, 0.017054220661520958, -0.006097772158682346, 0.01666339486837387, -0.06292296946048737, -0.05084289610385895, 0.019185997545719147, -0.03943788632750511, 0.01595280133187771, 0.034907858818769455, -0.031159482896327972, -0.039686594158411026, -0.0027157957665622234, -0.0831393226981163, -0.044554151594638824, -0.01789804920554161, 0.016512393951416016, 0.003017797600477934, -0.07503856718540192, 0.040752481669187546, -0.0027491047512739897, 0.0514824278652668, 0.012453134171664715, 0.03663104400038719, -0.015153385698795319, -0.06629828363656998, 0.019772237166762352, -0.022685665637254715, 0.04029059782624245, -0.045158155262470245, -0.002304984489455819, -0.0009293218026868999, 0.01669892482459545, -0.05297467112541199, 0.004463409539312124, 0.00752783939242363, 0.005453797522932291, 0.006972689181566238, 0.023716025054454803, 0.05745140463113785, -0.05244172737002373, 0.027055811136960983, -0.05201537162065506, 0.021211186423897743, 0.04757416993379593, -0.01076547708362341, 0.023023197427392006, 0.01193795446306467, -0.034605856984853745, 0.03284713998436928, -0.045335803180933, 0.052299611270427704, 0.03636457398533821, 0.006466391962021589, 0.025794507935643196, 0.046224042773246765, 0.02460426650941372, -0.0317101925611496, 0.06217684596776962, -0.040681421756744385, -0.009264349937438965, -0.021708602085709572, 0.03275831416249275, -0.03648892790079117, 0.0009165533119812608, 0.06079119071364403, -0.0018664157250896096, 0.04650828242301941, 0.03476573899388313, -0.007256926037371159, -0.016539040952920914, 0.008709199726581573, 0.00041441977373324335, 0.018741877749562263, -0.01410526130348444, -0.008509345352649689, 0.02684263326227665, 0.026167569682002068, -0.006950483191758394, 0.022152721881866455, 0.011911307461559772, -0.006128860637545586, 0.05354314669966698, -0.03883388265967369, 0.032971493899822235, -0.02911652810871601, 0.01248866319656372, 0.023129787296056747, 0.008051901124417782, -0.05087842419743538, 0.06210578605532646, -0.04807158559560776, -0.025918861851096153, 0.026700513437390327, -0.012160014361143112, 0.010259179398417473, -0.03261619806289673, 0.010783241130411625, 0.004765410907566547, -0.14488981664180756, -0.008313932456076145, 0.03512103483080864, -0.0016654512146487832, 0.08669228851795197, 0.03837199509143829, 0.08171813935041428, -0.03943788632750511, 0.034872326999902725, 0.07134348899126053, -0.010019354522228241, -0.05499986186623573, -0.04601086676120758, 0.021015774458646774, -0.01190242450684309, 0.00005353731830837205, 0.0016554584726691246, -0.009939412586390972, 0.005062971729785204, 0.0673641711473465, -0.014336204156279564, -0.007581133861094713, 0.013483493588864803, 0.03522762283682823, -0.021442130208015442, 0.03833646699786186, -0.052370667457580566, 0.034108441323041916, 0.04430544376373291, -0.016450216993689537, 0.05709610879421234, 0.018670817837119102, -0.006279861554503441, 0.045158155262470245, 0.009601881727576256, -0.004183613695204258, 0.05144689977169037, -0.003974876832216978, -0.03325572982430458, -0.012115602381527424, -0.028139464557170868, 0.03719951957464218, 0.06963806599378586, 0.032101016491651535, 0.010578946210443974, -0.008886847645044327, 0.031106187030673027, 0.022348135709762573, -0.009957177564501762, 0.03144371882081032, -0.032331958413124084, 0.02050059475004673, -0.0022206015419214964, 0.014078614301979542, 0.0006645150715485215, 0.06103989854454994, -0.04363038018345833, 0.02954288385808468, 0.014753676950931549, 0.0081451665610075, -0.07916000485420227, -0.00853155180811882, -0.013181491754949093, -0.007017101161181927, 0.016077155247330666, -0.006888306234031916, 0.042884260416030884, -0.06839453428983688, -0.05752246454358101, -0.002815722953528166, -0.019310351461172104, -0.08257085084915161, -0.017436163499951363, 0.025385918095707893, -0.009086702018976212, 0.031159482896327972, 0.031727954745292664, -0.04117883741855621, 0.022614607587456703, 0.008433844894170761, -0.0008155159302987158, 0.002611427567899227, 0.008331697434186935, 0.01723186857998371, 0.015419857576489449, -0.019487999379634857, 0.013847671449184418, 0.004752087406814098, 0.005213972646743059, -0.03894047066569328, 0.002342734718695283, -0.03755481541156769, 0.06089777871966362, 0.0014922443078830838, 0.03709293156862259, -0.022756725549697876, -0.005236178636550903, -0.022117191925644875, -0.012346545234322548, 0.05329443886876106, 0.018368816003203392, 0.001561082899570465, 0.017871402204036713, -0.010445710271596909, 0.02360943704843521, -0.04466073960065842, -0.03201219439506531, -0.00456555699929595, 0.000470212398795411, 0.07582022249698639, -0.04501603543758392, -0.007518957369029522, -0.005453797522932291, -0.04764522984623909, -0.007252485025674105, 0.03862070292234421, -0.009211055934429169, -0.010241414420306683, -0.050665248185396194, -0.020038709044456482, 0.053472086787223816, 0.07354632765054703, 0.03242078423500061, 0.04892429709434509, -0.0065019214525818825, 0.08100754767656326, -0.01539321057498455, -0.045762158930301666, -0.00911334902048111, 0.03716398775577545, -0.1055229902267456, -0.00227389601059258, -0.012328780256211758, -0.03405514732003212, -0.020518358796834946, 0.06263872981071472, 0.006564098410308361, 0.05830411612987518, -0.011396127752959728, -0.019185997545719147, 0.06775499880313873, -0.0068661002442240715, 0.031532544642686844, -0.06803923100233078, 0.03295372799038887, 0.01963011920452118, -0.061146486550569534, 0.030839715152978897, 0.047893937677145004, -0.01780034229159355, -0.021282246336340904, -0.03325572982430458, -0.051731135696172714, -0.021317776292562485, -0.017214104533195496, 0.04711228609085083, 0.009548586793243885, 0.03279384598135948, 0.00004031779826618731, -0.0251016803085804, -0.025190504267811775, 0.0426710806787014, -0.04149860516190529, -0.06441520899534225, -0.022650137543678284, 0.03712845966219902, 0.026736043393611908, -0.03201219439506531, -0.045762158930301666, 0.03616916015744209, -0.03501444682478905, -0.04451862350106239, 0.07041972130537033, 0.0017898048972710967, -0.028832292184233665, -0.0077143702656030655, -0.05539068579673767, 0.086265929043293, -0.028494760394096375, -0.01993212103843689, 0.008624817244708538, -0.014265145175158978, 0.04036165401339531, 0.08797135204076767, 0.03929576650261879, -0.02734004706144333, -0.0029711651150137186, 0.01849316991865635, -0.07979954034090042, -0.004836470354348421, -0.023449553176760674, -0.009601881727576256, 0.016503510996699333, 0.02554580196738243, 0.010801006108522415, 0.019914355129003525, 0.04412779584527016, 0.004359040874987841, 0.01595280133187771, -0.02821052260696888, -0.05489327386021614, -0.03174572065472603, -0.041782841086387634, -0.026167569682002068, 0.025297094136476517, -0.002873458433896303, -0.0431329645216465, 0.01970117725431919, -0.018883995711803436, 0.04043271392583847, 0.007452338933944702, -0.008997878059744835, 0.03787458315491676, 0.01512673869729042, 0.0037306107115000486, 0.020411770790815353, 0.008806905709207058, 0.08640804886817932, 0.0020629388745874166, 0.021442130208015442, 0.000022188667571754195, 0.051731135696172714, 0.00008604831236880273, -0.0257412139326334, -0.021726366132497787, 0.02630968764424324, -0.004330173134803772, -0.0716632530093193, 0.022312605753540993, -0.041747309267520905, -0.020571652799844742, -0.032367490231990814, 0.04466073960065842, 0.0031177247874438763, -0.022827785462141037, -0.011529363691806793, -0.011769188567996025, 0.021211186423897743, 0.026096509769558907, 0.01410526130348444, -0.024195674806833267, -0.03178125247359276, 0.006608510389924049, -0.03442820906639099, -0.0038882733788341284, -0.06665357947349548, -0.06814582645893097, -0.005369414575397968, -0.04149860516190529, -0.023218611255288124, 0.03481903299689293, 0.05162454769015312, 0.015100090764462948, 0.0669022873044014, 0.0019474676810204983, 0.0029645031318068504, -0.022810019552707672, 0.049599356949329376, -0.020820360630750656, -0.10786794871091843, 0.036808691918849945, -0.08299721032381058, -0.037448227405548096, 0.017205221578478813, -0.014931325800716877, -0.04920853301882744, 0.001703201443888247, 0.01575738936662674, -0.07031313329935074, 0.012106720358133316, -0.047893937677145004, 0.040752481669187546, -0.008433844894170761, -0.0246397964656353, -0.027393341064453125, -0.024781914427876472, 0.021051304414868355, -0.09138219803571701, -0.062354493886232376, 0.036009278148412704, -0.01262190006673336, 0.015668565407395363, 0.004343496635556221, 0.023218611255288124, -0.02517274022102356, -0.043381672352552414, -0.03926023840904236, 0.017702637240290642, -0.00426577590405941, -0.02964947372674942, 0.022223781794309616, -0.03862070292234421, 0.006519686430692673, -0.025350388139486313, 0.024799678474664688, 0.07880470901727676, 0.03636457398533821, -0.014735912904143333, -0.018812937662005424, -0.012630782090127468, -0.03636457398533821, 0.010125943459570408, -0.02584780380129814, -0.021744132041931152, 0.03702187165617943, -0.04824923351407051, -0.00998382456600666, 0.03840752691030502, 0.007314661983400583, 0.028956646099686623, -0.04430544376373291, 0.03972212225198746, 0.017773695290088654, 0.011795835569500923, 0.05539068579673767, -0.00643530348315835, -0.03787458315491676, 0.009299879893660545, 0.02767757885158062, -0.03128383681178093, 0.06256767362356186, -0.0006856107502244413, 0.023325199261307716, 0.0021395497024059296, 0.04988359659910202, 0.03471244499087334, 0.04480285942554474, 0.032438550144433975, 0.008367227390408516, -0.015641918405890465, -0.016450216993689537, -0.03584939241409302, -0.01943470537662506, 0.05094948410987854, -0.019381411373615265, -0.0778098851442337, 0.02858358435332775, -0.04032612591981888, 0.0068794237449765205, 0.02794405072927475, -0.012346545234322548, -0.01939917542040348, 0.09486410021781921, 0.023289669305086136, -0.08384992182254791, -0.06484156847000122, 0.04650828242301941, 0.004458968061953783, -0.02360943704843521, 0.01833328790962696, 0.0365244559943676, -0.036808691918849945, -0.08214449882507324, -0.01793357916176319, 0.030164653435349464, 0.004365702625364065, -0.00969958771020174, 0.055141981691122055, 0.040184006094932556, 0.017844755202531815, -0.013705553486943245, -0.020571652799844742, 0.09244808554649353, 0.008971231058239937, 0.07127243280410767, -0.020909184589982033, -0.022756725549697876, 0.0182622279971838, -0.013128196820616722, -0.0011991248466074467, 0.03997083008289337, 0.06885641813278198, 0.013181491754949093, 0.04689910635352135, 0.06608510762453079, -0.014016437344253063, 0.07233832031488419, -0.018404345959424973, -0.036808691918849945, 0.007709928788244724, -0.019807767122983932, -0.08164708316326141, -0.010454592294991016, 0.022721195593476295, 0.032438550144433975, -0.012692959047853947, -0.01742728240787983, 0.007798752747476101, 0.02357390709221363, -0.03723504766821861, -0.021051304414868355, 0.07447009533643723, -0.003108842298388481, -0.032331958413124084, -0.025350388139486313, -0.0400063581764698, -0.0017942461417987943, -0.06793264299631119, -0.033877499401569366, 0.01736510545015335, -0.01996764913201332, 0.010037119500339031, 0.01615709811449051, -0.05603022128343582, 0.049599356949329376, 0.06107542663812637, 0.020820360630750656, -0.046330634504556656, -0.04089460149407387, -0.03812328726053238, 0.01653015799820423, -0.025901097804307938, -0.03044888935983181, 0.010285826399922371, 0.002873458433896303, -0.030733127146959305, -0.018510935828089714, -0.05425373837351799, -0.043488264083862305, -0.01248866319656372, -0.018040167167782784, -0.007452338933944702, -0.0010014913277700543, -0.07638869434595108, -0.04537133127450943, -0.026522865518927574, -0.027517694979906082, 0.027730872854590416, 0.026416277512907982, -0.0602937750518322, 0.025119446218013763, -0.03291819989681244, 0.03526315465569496, -0.0050230007618665695, 0.0131903737783432, 0.002669163281098008, 0.057877760380506516, -0.03702187165617943, -0.016343628987669945, -0.002709134016185999, 0.03936682641506195, 0.015295504592359066, -0.009868353605270386, -0.0021484321914613247, -0.004156966228038073, 0.006835011765360832, -0.01849316991865635, 0.027002515271306038, -0.008726964704692364, -0.0032109899912029505, -0.01230213325470686, 0.007017101161181927, 0.0536852665245533, -0.04249343276023865, 0.004201378207653761, 0.0048631178215146065, -0.11561340093612671, 0.010587828233838081, -0.060684602707624435, -0.025368154048919678, -0.02110459841787815, 0.008971231058239937, -0.11191832274198532, 0.010863183066248894, 0.027819696813821793, 0.0018764083506539464, 0.03982871025800705, 0.01387431938201189, -0.020944714546203613, -0.01816452108323574, 0.017604930326342583, 0.008273961953818798, 0.004116995260119438, -0.009584116749465466, -0.02554580196738243, -0.052832555025815964, 0.01231989823281765, 0.06544557213783264, 0.020145298913121223, 0.01068553514778614, 0.04537133127450943, -0.005196207668632269, 0.051873255521059036, -0.010427945293486118, -0.00021553714759647846, -0.009619646705687046, -0.03862070292234421, 0.03876282274723053, -0.03691527992486954, -0.06938935816287994, 0.0263807475566864, 0.06761287897825241, 0.0448739193379879, 0.052903614938259125, 0.003395299892872572, -0.0018519817385822535, -0.052832555025815964, -0.02110459841787815, -0.05933447554707527, -0.03993529826402664, 0.007199190557003021, -0.012124485336244106, 0.014611558988690376, -0.025350388139486313, 0.028601348400115967, 0.021850720047950745, -0.04920853301882744, 0.028388170525431633, -0.023431789129972458, 0.03140819072723389, -0.0040281713008880615, -0.016103802248835564, -0.0598318912088871, 0.005840182304382324, 0.0135367875918746, -0.06892747431993484, 0.0325273722410202, 0.0067195408046245575, 0.005054089240729809, -0.029525119811296463, 0.019114939495921135, 0.01599721424281597, -0.0013900966150686145, 0.006337597034871578, -0.03121277689933777, -0.0725870281457901, -0.09244808554649353, 0.07311996817588806, -0.02684263326227665, 0.053969502449035645, 0.009370938874781132, -0.05599468946456909, 0.010827654041349888, -0.023929202929139137, 0.0409301295876503, -0.042315784841775894, -0.0162636861205101, 0.006182155106216669, -0.015402092598378658, 0.04078800976276398, 0.0347302109003067, -0.00643530348315835, -0.03512103483080864, 0.02764204889535904, 0.02376932092010975, 0.02494179829955101, -0.019416941329836845, -0.05933447554707527, 0.027020281180739403, 0.005591474939137697, -0.01380325946956873, 0.03615139424800873, 0.04540686309337616, -0.009877236559987068, -0.0024315589107573032, -0.01799575611948967, -0.005880153272300959, 0.037306107580661774, -0.017240751534700394, -0.013074902817606926, 0.051766663789749146, -0.05166007578372955, -0.010658888146281242, -0.013945378363132477, 0.020056474953889847, 0.02099800854921341, 0.019008349627256393, 0.05023889243602753, 0.02611427567899227, 0.010046001523733139, -0.04551345109939575, -0.015455387532711029, 0.013217020779848099, -0.052264079451560974, 0.00657742191106081, 0.013563434593379498, 0.029702767729759216, 0.02410685084760189, 0.02908100001513958, 0.013323609717190266, 0.011547128669917583, 0.023183081299066544, 0.02076706662774086, 0.032474078238010406, -0.0659785196185112, 0.029223117977380753, -0.013341374695301056, 0.022223781794309616, -0.04213813692331314, -0.02353837713599205, -0.03663104400038719, 0.003237637225538492, 0.020020944997668266, 0.04558451101183891, 0.08640804886817932, 0.028459230437874794, 0.010774359107017517 ]
715,798
pytorch_optimizer.loss.cross_entropy
forward
null
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: if self.training and self.label_smooth > 0.0: y_true = (1.0 - self.label_smooth) * y_true + self.label_smooth / y_pred.size(-1) y_pred = torch.clamp(y_pred, self.eps, 1.0 - self.eps) return binary_cross_entropy(y_pred, y_true, reduction=self.reduction)
(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor
[ -0.03611302375793457, -0.046097107231616974, -0.015429122373461723, -0.008770047686994076, 0.029100611805915833, 0.0040792496874928474, -0.05508459359407425, 0.03736330196261406, 0.024643108248710632, 0.02884693257510662, 0.014251327142119408, -0.03355811536312103, 0.0816846564412117, -0.0010249087354168296, 0.032543398439884186, 0.046894386410713196, 0.01978696696460247, -0.023664630949497223, -0.004076984710991383, 0.010346481576561928, 0.05185924842953682, -0.03600430488586426, 0.00021857168758288026, 0.022396236658096313, -0.011035039089620113, -0.030151568353176117, -0.029535489156842232, -0.0022480040788650513, -0.05921594053506851, 0.011044098995625973, -0.0415671244263649, -0.012049755081534386, 0.05548323318362236, 0.014169787056744099, 0.04809030145406723, 0.01880848966538906, -0.020384924486279488, -0.010681699961423874, -0.0332319550216198, -0.048452697694301605, -0.029372410848736763, -0.0683121457695961, -0.003281972836703062, 0.06914566457271576, -0.03134748339653015, 0.020167484879493713, -0.07396556437015533, 0.001591156586073339, 0.04533607140183449, -0.04526359215378761, -0.03848673775792122, -0.02384583093225956, -0.046060867607593536, 0.0271798986941576, -0.0069716437719762325, 0.05258404463529587, 0.028339574113488197, -0.01798403263092041, -0.08625087887048721, -0.01379832811653614, 0.011814195662736893, -0.052076686173677444, 0.03486274927854538, 0.02033056505024433, 0.045372311025857925, 0.0250961072742939, -0.04196576401591301, 0.04906877875328064, 0.003433727193623781, 0.0022015718277543783, -0.023338472470641136, -0.010980678722262383, 0.04167584329843521, 0.041603364050388336, -0.040081292390823364, -0.02705306001007557, -0.011560516431927681, -0.01617204025387764, 0.04124096781015396, -0.048452697694301605, -0.0270349383354187, -0.0000026233203698211582, 0.008770047686994076, -0.055809393525123596, -0.026708779856562614, -0.05066332966089249, -0.0060158176347613335, 0.004011299926787615, -0.05562819167971611, 0.03245279937982559, -0.047619182616472244, 0.06563039869070053, 0.0003369174955878407, 0.04323415830731392, 0.0588173009455204, 0.05410612002015114, -0.03794313967227936, 0.005467689596116543, 0.022776754572987556, 0.016244519501924515, 0.04769166186451912, 0.1009642630815506, -0.04653198644518852, 0.027560416609048843, 0.05088077113032341, -0.02649134211242199, -0.04087856784462929, 0.021961357444524765, -0.02982540801167488, -0.038667935878038406, 0.006745144724845886, -0.0299884881824255, -0.0027496996335685253, -0.014115427620708942, -0.019895685836672783, -0.05816498398780823, 0.003703261259943247, 0.004951271694153547, -0.03109380416572094, 0.0368197038769722, 0.006224196869879961, -0.057657625526189804, -0.0406973697245121, -0.03834177553653717, -0.011343077756464481, 0.0017859458457678556, 0.053345080465078354, -0.005336320027709007, 0.01893533021211624, -0.04584342986345291, -0.038414258509874344, 0.011850436218082905, 0.024045150727033615, 0.04167584329843521, 0.009802883490920067, -0.04533607140183449, -0.01108033861964941, 0.06465192139148712, 0.048706378787755966, 0.010917259380221367, 0.058926019817590714, -0.006020347587764263, 0.035768747329711914, 0.04229192063212395, 0.029227450489997864, -0.03161928057670593, 0.013888928107917309, 0.04729302227497101, 0.07295084744691849, 0.012738312594592571, 0.04834397882223129, -0.0015424592420458794, 0.03671098127961159, -0.032833319157361984, -0.014550305902957916, 0.009213985875248909, -0.023211633786559105, -0.03411983326077461, 0.015139203518629074, 0.010717939585447311, -0.010083742439746857, -0.07530643790960312, -0.03190920129418373, -0.028611373156309128, 0.0024960206355899572, -0.019877566024661064, 0.037435781210660934, 0.08291681110858917, 0.023320352658629417, 0.029191210865974426, 0.05146060883998871, -0.10661768168210983, 0.0537799596786499, 0.052475325763225555, -0.026980578899383545, 0.004192499443888664, 0.03540634736418724, -0.01170547679066658, -0.022649915888905525, 0.08501872420310974, 0.050554610788822174, -0.029444890096783638, -0.046350788325071335, -0.10422585159540176, 0.03328631445765495, 0.0018550280947238207, 0.008149439468979836, 0.04783662036061287, -0.012004455551505089, 0.038124337792396545, -0.004973921459168196, -0.05975953862071037, 0.015311342664062977, -0.016842477023601532, 0.021254681050777435, -0.02187075838446617, 0.023954549804329872, 0.019333967939019203, 0.014867404475808144, -0.01588212139904499, -0.03665662184357643, -0.012339673936367035, 0.01657973788678646, -0.011189058423042297, -0.030187807977199554, 0.017657874152064323, -0.03555130586028099, 0.089729905128479, -0.02022184431552887, -0.09270157665014267, -0.03263399749994278, -0.004661352839320898, -0.02884693257510662, 0.07110261172056198, 0.03779817745089531, 0.010618280619382858, -0.04975733533501625, 0.013055411167442799, -0.06012193486094475, -0.03569626808166504, -0.03754450008273125, -0.04838021844625473, -0.04200200363993645, 0.023791471496224403, 0.03611302375793457, -0.03292391821742058, 0.03136560320854187, -0.0206386037170887, 0.017250176519155502, -0.003159663174301386, 0.010192462243139744, -0.004255919251590967, -0.0022819789592176676, 0.020312443375587463, 0.08784542977809906, 0.023628391325473785, 0.01824677176773548, 0.02355591207742691, -0.027940936386585236, 0.050264693796634674, -0.034101713448762894, -0.032416559755802155, -0.011134698055684566, -0.020022524520754814, 0.0404074490070343, 0.021091600880026817, 0.025041745975613594, 0.038957856595516205, -0.022196916863322258, 0.04685814678668976, -0.018917208537459373, -0.011107518337666988, -0.028122134506702423, -0.024480028077960014, 0.01908028870820999, -0.06621023267507553, -0.002081527141854167, -0.079655222594738, 0.019025929272174835, 0.03096696361899376, -0.044285114854574203, 0.04493743181228638, -0.059469617903232574, 0.014894584193825722, -0.03765321895480156, -0.01443252619355917, -0.032362200319767, 0.026527581736445427, 0.007900290191173553, 0.055157072842121124, 0.1003844290971756, 0.007768921088427305, -0.05088077113032341, -0.004896911792457104, -0.011025979183614254, 0.016751877963542938, 0.031438082456588745, -0.026183301582932472, 0.007619431708008051, 0.005286490079015493, 0.016371358186006546, -0.08668575435876846, -0.026581941172480583, -0.028665732592344284, 0.004715712275356054, 0.028647612780332565, 0.03453659266233444, -0.009549204260110855, 0.056280508637428284, -0.00735669257119298, 0.022378116846084595, 0.07972770184278488, 0.08233696967363358, 0.00836234912276268, 0.0040022400207817554, -0.023356592282652855, 0.0061834268271923065, -0.013707729056477547, 0.020656723529100418, 0.005979577545076609, 0.022939834743738174, -0.015854941681027412, -0.032706476747989655, -0.029227450489997864, -0.05657042935490608, -0.0463145487010479, 0.05022845417261124, 0.03816057741641998, 0.0001969127042684704, -0.029734808951616287, 0.0065865954384207726, 0.015827760100364685, -0.011669236235320568, 0.016914956271648407, -0.041748322546482086, -0.006690784823149443, 0.026672540232539177, 0.005608119070529938, 0.04221944138407707, 0.05421483889222145, -0.001679491251707077, 0.027777856215834618, 0.011542396619915962, 0.027560416609048843, 0.0027723496314138174, -0.021254681050777435, 0.049286216497421265, 0.0003615492896642536, -0.03404735401272774, 0.0006217401823960245, 0.056534189730882645, -0.02078356221318245, -0.0009428027551621199, -0.002096249721944332, -0.07784322649240494, 0.004310279153287411, 0.01951516792178154, 0.05432355776429176, -0.007882170379161835, -0.00024065535399131477, -0.03471779078245163, -0.022631796076893806, -0.04279927909374237, 0.041458405554294586, 0.016407599672675133, 0.009947842918336391, -0.028375813737511635, -0.0009343090350739658, 0.05678786709904671, 0.010464261285960674, -0.01379832811653614, 0.028973771259188652, 0.04693062603473663, 0.05298268422484398, 0.029934128746390343, -0.01769411377608776, -0.04221944138407707, 0.02315727435052395, -0.0028584194369614124, -0.036892183125019073, -0.041349686682224274, -0.043850235641002655, -0.02832145430147648, 0.031583040952682495, -0.03971889242529869, 0.04881509765982628, 0.00019422303012106568, -0.011134698055684566, -0.021562719717621803, 0.04642326757311821, -0.05899849906563759, -0.013961408287286758, -0.012430273927748203, 0.006468815729022026, -0.012013515457510948, 0.009612624533474445, -0.023193513974547386, -0.015338522382080555, 0.06838462501764297, 0.014215086586773396, -0.00236691627651453, 0.02678126096725464, -0.06131784990429878, 0.020403044298291206, 0.04823525995016098, 0.02424447052180767, 0.022776754572987556, -0.053490038961172104, 0.03524326905608177, -0.07200860977172852, 0.021363399922847748, -0.03823305666446686, -0.0006285351701080799, -0.056244269013404846, -0.026002103462815285, -0.05088077113032341, 0.037019021809101105, 0.0828443318605423, -0.033521875739097595, -0.002277449006214738, -0.04381399601697922, 0.028049655258655548, -0.015583141706883907, 0.02734297886490822, -0.052765242755413055, 0.0404074490070343, 0.023882070556282997, 0.05004725232720375, -0.05091701075434685, 0.039827611297369, -0.03558754548430443, 0.0466044656932354, -0.058781061321496964, 0.0034291972406208515, -0.031564921140670776, 0.01302823144942522, -0.06363720446825027, -0.009657924063503742, -0.0017078035743907094, 0.03332255408167839, 0.007334042806178331, 0.018437031656503677, 0.029444890096783638, -0.0493224561214447, -0.06077425181865692, -0.005105291027575731, -0.019732605665922165, 0.03642106428742409, 0.0042174141854047775, -0.013680549338459969, -0.05559195205569267, -0.07273340970277786, -0.008770047686994076, -0.05399739742279053, 0.01116187870502472, -0.01908028870820999, 0.023465313017368317, -0.02023996412754059, -0.028520774096250534, -0.006554885767400265, -0.017503853887319565, -0.05131565034389496, 0.04841645807027817, 0.07588627934455872, -0.013680549338459969, -0.038957856595516205, -0.04232816398143768, -0.03221723809838295, -0.0404074490070343, -0.006835744716227055, -0.04334287717938423, -0.0016647687880322337, 0.04674942418932915, 0.04667694494128227, 0.01227625459432602, -0.005368030164390802, -0.0808148980140686, -0.06483311951160431, 0.03614926338195801, 0.007320452481508255, 0.006862924434244633, 0.04348783940076828, -0.04450255259871483, 0.06704375147819519, 0.014287566766142845, -0.04337911680340767, 0.01464090496301651, -0.0009110928513109684, -0.014052007347345352, -0.012493693269789219, 0.008760987780988216, -0.04613334685564041, 0.07208108901977539, 0.012366853654384613, -0.02424447052180767, 0.039646413177251816, -0.00836687907576561, 0.04298048093914986, 0.04084232822060585, -0.019207129254937172, -0.00941330473870039, -0.01497612427920103, -0.03754450008273125, -0.03361247479915619, 0.011750776320695877, 0.024171989411115646, -0.03011532686650753, -0.018446091562509537, 0.016751877963542938, 0.0466044656932354, 0.0147043252363801, -0.018772250041365623, 0.0299884881824255, -0.03830553591251373, -0.07382060587406158, -0.01573716104030609, 0.011660176329314709, 0.031184403225779533, 0.006654545199126005, 0.031836722046136856, -0.020692963153123856, -0.010971618816256523, -0.07374812662601471, -0.012330614030361176, 0.015066724270582199, 0.065304234623909, -0.0029965839348733425, 0.0167156383395195, -0.07617619633674622, 0.045118629932403564, 0.04392271488904953, 0.0023737112060189247, -0.02301231399178505, 0.04015377163887024, 0.035913705825805664, -0.03790690004825592, -0.003553771646693349, 0.04403143748641014, 0.01980508677661419, -0.022523075342178345, -0.020801682025194168, 0.04435759410262108, -0.0010401973268017173, -0.020113125443458557, -0.02511422708630562, 0.06323856115341187, -0.010391781106591225, -0.00474289245903492, 0.04587966948747635, 0.002423540921881795, 0.019279608502984047, -0.01135213766247034, -0.002362386090680957, 0.05591811239719391, -0.04341535642743111, 0.02091040275990963, -0.0270349383354187, -0.017648814246058464, -0.010826659388840199, -0.031728003174066544, -0.010346481576561928, -0.019714485853910446, -0.013327210210263729, 0.014323806390166283, 0.005934278015047312, 0.03642106428742409, -0.039791371673345566, 0.05265652388334274, -0.05196796730160713, -0.007868580520153046, -0.089150071144104, 0.040371209383010864, -0.01053674053400755, 0.002704399870708585, 0.08132226020097733, 0.07251597195863724, 0.03500770777463913, 0.06066553294658661, -0.01755821518599987, 0.0626949667930603, -0.03526138886809349, -0.06258624792098999, 0.05066332966089249, -0.024226348847150803, -0.011506156995892525, 0.004129079636186361, -0.03136560320854187, 0.028611373156309128, 0.007796100806444883, 0.008711157366633415, -0.019062168896198273, 0.05519331246614456, -0.005286490079015493, 0.027506057173013687, 0.002661365084350109, 0.026128942146897316, 0.06374592334032059, -0.07762578874826431, 0.008040719665586948, -0.013435930013656616, -0.03614926338195801, -0.0418570451438427, 0.02274051494896412, 0.058599863201379776, -0.013789268210530281, -0.014831164851784706, -0.004312544129788876, 0.0451548732817173, -0.020674843341112137, -0.005336320027709007, -0.01659785769879818, 0.007442762143909931, 0.015157323330640793, 0.028393933549523354, -0.011460857465863228, -0.07646611332893372, -0.03263399749994278, 0.015610321424901485, 0.06950806081295013, 0.06312984228134155, 0.03692842274904251, -0.004167584236711264, -0.0032910327427089214, 0.011687356047332287, 0.01379832811653614, -0.027687257155776024, -0.04142216593027115, -0.0038640755228698254, -0.05265652388334274, -0.06052057445049286, -0.03209039941430092, 0.03473591059446335, 0.018237711861729622, -0.025839023292064667, -0.008946716785430908, 0.028140254318714142, 0.03053208626806736, 0.028104014694690704, -0.008797227405011654, 0.01525698322802782, 0.07385684549808502, -0.03515266999602318, 0.016534438356757164, 0.05769386515021324, -0.01553784217685461, -0.031438082456588745, 0.02357403188943863, -0.026708779856562614, 0.006192486733198166, 0.005698718596249819, -0.03248903900384903, -0.007170963101089001, -0.025730304419994354, -0.01031930185854435, 0.005050931125879288, 0.019207129254937172, 0.021127840504050255, 0.04334287717938423, 0.0086477380245924, -0.06892821937799454, -0.052475325763225555, 0.030060967430472374, -0.011868556030094624, 0.009811943396925926, -0.02817649580538273, -0.01839173212647438, -0.01740419492125511, 0.015963660553097725, 0.013499349355697632, -0.0199138056486845, 0.004441648256033659, 0.04374151676893234, 0.056099310517311096, 0.03794313967227936, 0.030858244746923447, 0.0072842128574848175, -0.019623886793851852, 0.02524106577038765, 0.020439283922314644, -0.057077787816524506, -0.03790690004825592, 0.020131245255470276, 0.07595875859260559, 0.01812899298965931, -0.02536790631711483, 0.02786845527589321, 0.019569527357816696, -0.0709214136004448, -0.060013215988874435, -0.0811048150062561, -0.03509831055998802, 0.02384583093225956, -0.056244269013404846, -0.0033884274307638407, 0.04645950719714165, -0.05896225944161415, 0.009295525029301643, -0.011850436218082905, 0.010672640055418015, -0.04345159977674484, 0.024860547855496407, 0.005522049497812986, 0.0014756419695913792, -0.004303483758121729, 0.024643108248710632, -0.027397338300943375, -0.026944339275360107, -0.011007859371602535, -0.050409652292728424, -0.033395037055015564, -0.023356592282652855, 0.024443788453936577, -0.016407599672675133, -0.012493693269789219, 0.004665882792323828, -0.017485734075307846, -0.02844829484820366, 0.01687871664762497, 0.023465313017368317, -0.011143758893013, -0.03154680132865906, -0.006437106058001518, -0.02525918558239937, -0.04026249051094055, -0.009100736118853092, 0.036185506731271744, -0.024624988436698914, -0.033793672919273376, -0.05066332966089249, -0.01810181327164173, 0.050119731575250626, -0.0014767744578421116, -0.03411983326077461, 0.0054858094081282616, -0.02801341563463211, -0.000013094482710584998, -0.05127940699458122, -0.007315922528505325, -0.005879918113350868, 0.03736330196261406, 0.012058814987540245, -0.01995004527270794, 0.002545850584283471, 0.02647322043776512, -0.07668355107307434, -0.04975733533501625, 0.025349784642457962, -0.025730304419994354, -0.013408750295639038, 0.01797497272491455, 0.009775703772902489, 0.020584242418408394, -0.016344178467988968, 0.030151568353176117, -0.008874236606061459, 0.015565021894872189, 0.02759665623307228, -0.038812894374132156, 0.08842527121305466, 0.014849284663796425, 0.04500991106033325, -0.0052276006899774075, 0.059976976364851, 0.021001001819968224, -0.008665857836604118, 0.00156057917047292, -0.024425668641924858, -0.009005606174468994, 0.00669531524181366, -0.011016919277608395, 0.036167386919260025, 0.023628391325473785, -0.01825583167374134, -0.029336171224713326, 0.10669016093015671, -0.012819851748645306, 0.01193197537213564, -0.0025911503471434116, -0.04109600558876991, -0.048742618411779404, -0.0124755734577775, -0.024624988436698914, -0.012973872013390064, 0.017594454810023308, -0.011723596602678299, 0.06537671387195587, 0.04200200363993645, 0.04319791868329048 ]
715,832
pytorch_optimizer.loss.bi_tempered
BiTemperedLogisticLoss
Bi-Tempered Log Loss. Reference : https://github.com/BloodAxe/pytorch-toolbelt/blob/develop/pytorch_toolbelt/losses/bitempered_loss.py :param t1: float. Temperature 1 (< 1.0 for boundedness). :param t2: float. Temperature 2 (> 1.0 for tail heaviness, < 1.0 for finite support). :param label_smooth: float. Label smoothing parameter between [0, 1). :param ignore_index: Optional[int]. Index to ignore. :param reduction: str. type of reduction.
class BiTemperedLogisticLoss(nn.Module): """Bi-Tempered Log Loss. Reference : https://github.com/BloodAxe/pytorch-toolbelt/blob/develop/pytorch_toolbelt/losses/bitempered_loss.py :param t1: float. Temperature 1 (< 1.0 for boundedness). :param t2: float. Temperature 2 (> 1.0 for tail heaviness, < 1.0 for finite support). :param label_smooth: float. Label smoothing parameter between [0, 1). :param ignore_index: Optional[int]. Index to ignore. :param reduction: str. type of reduction. """ def __init__( self, t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean', ): super().__init__() self.t1 = t1 self.t2 = t2 self.label_smooth = label_smooth self.ignore_index = ignore_index self.reduction = reduction def forward(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: loss = bi_tempered_logistic_loss( predictions, targets, t1=self.t1, t2=self.t2, label_smooth=self.label_smooth, reduction='none' ) if self.ignore_index is not None: mask = ~targets.eq(self.ignore_index) loss *= mask if self.reduction == 'mean': loss = loss.mean() elif self.reduction == 'sum': loss = loss.sum() return loss
(t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean')
[ -0.059466298669576645, -0.044563375413417816, 0.03936552628874779, 0.01882857084274292, 0.04201897233724594, -0.0538686141371727, -0.05117882043123245, -0.011658811010420322, -0.010759184136986732, -0.03324078768491745, 0.0035712493117898703, 0.040637727826833725, 0.030750909820199013, 0.015829812735319138, -0.045290347188711166, 0.03062368929386139, -0.0009910671506077051, 0.03900204226374626, 0.020446084439754486, -0.0034167678095400333, 0.02838825061917305, -0.026570821180939674, -0.013021883554756641, 0.0693531185388565, -0.055976834148168564, -0.021227577701210976, -0.026461776345968246, -0.021518368273973465, -0.01999172568321228, -0.03674842789769173, -0.019537368789315224, -0.061792608350515366, 0.00398925831541419, 0.02975132316350937, -0.019664589315652847, -0.0349491722881794, -0.01463030930608511, 0.07237005233764648, -0.09879547357559204, 0.0020150751806795597, 0.018937617540359497, -0.05245102196931839, 0.004164185840636492, 0.009641464799642563, -0.02975132316350937, -0.01438495609909296, -0.02168193645775318, 0.013985121622681618, 0.0012756084324792027, -0.03091447800397873, -0.0024785196874290705, -0.0023581150453537703, 0.00953241903334856, 0.0032691017258912325, -0.00528872013092041, 0.07316971570253372, 0.056303970515728, 0.022099945694208145, -0.01150432974100113, -0.013040058314800262, 0.0017560913693159819, -0.010323000140488148, 0.0451086051762104, -0.001415323349647224, 0.019482845440506935, -0.0019162524258717895, -0.07058896869421005, 0.031041698530316353, 0.0014550796477124095, 0.025989243760704994, -0.008060300722718239, -0.05343243107199669, 0.023317622020840645, 0.050488196313381195, -0.02557123638689518, -0.03411315381526947, 0.004929778166115284, -0.014566699042916298, 0.04449068009853363, -0.004632174037396908, -0.013721593655645847, -0.038166023790836334, 0.023081356659531593, 0.008750923909246922, -0.0011251025134697556, -0.11580661684274673, -0.02911522425711155, -0.059466298669576645, -0.001959416316822171, -0.030696386471390724, -0.11297142505645752, -0.0049615828320384026, -0.004798014182597399, 0.015366367995738983, 0.04230976104736328, 0.02862451784312725, -0.0427095964550972, -0.00810573622584343, -0.004947952460497618, -0.04111025854945183, 0.01227673701941967, 0.06484588980674744, -0.004232339560985565, 0.037875235080718994, 0.026316381990909576, -0.03169597312808037, -0.043254826217889786, 0.0315324030816555, 0.005052454303950071, -0.05146960914134979, -0.08360176533460617, 0.013358107767999172, -0.01683848537504673, -0.06931676715612411, -0.007237913552671671, -0.05361417680978775, 0.0012778802774846554, -0.014194125309586525, -0.05906646326184273, 0.041655488312244415, 0.0611383356153965, -0.015748027712106705, -0.04776205122470856, -0.008623703382909298, -0.008328371681272984, 0.022281687706708908, 0.03144153207540512, -0.03733000531792641, 0.033022698014974594, -0.03091447800397873, -0.06928041577339172, 0.006933494005352259, 0.004298221319913864, 0.06804456561803818, 0.021554715931415558, -0.02153654210269451, 0.010568353347480297, 0.07575047016143799, 0.04648984968662262, 0.03885664790868759, 0.008787272498011589, -0.02348119206726551, 0.04478146880865097, 0.033985935151576996, 0.05088803172111511, -0.01862865500152111, 0.027497710660099983, 0.017529109492897987, 0.06579095125198364, -0.017983466386795044, 0.008401068858802319, -0.015711680054664612, -0.018719526007771492, 0.04739856719970703, 0.0007502576918341219, 0.04750761017203331, 0.005475006997585297, -0.010895490646362305, -0.01098636258393526, 0.012840140610933304, -0.020028075203299522, -0.060047876089811325, 0.0007724076276645064, -0.019519194960594177, -0.014494001865386963, -0.054268449544906616, 0.05913916230201721, 0.01824699342250824, 0.006442788057029247, 0.03235024958848953, -0.029860369861125946, -0.05375957116484642, 0.06978929787874222, 0.060920242220163345, -0.007015278562903404, 0.08338367193937302, -0.010877316817641258, 0.009577854536473751, -0.008796359412372112, 0.03305904567241669, 0.03553074970841408, -0.015148276463150978, -0.0596843920648098, -0.05779426544904709, 0.014721180312335491, 0.017492759972810745, 0.01615694910287857, 0.0011552037904039025, -0.05328703671693802, 0.04289134219288826, 0.05797600746154785, -0.03318626433610916, 0.026334555819630623, -0.014430391602218151, 0.06262862682342529, 0.045399393886327744, 0.0019605522975325584, -0.004875255282968283, 0.054850026965141296, -0.0010296874679625034, -0.005070628598332405, 0.05132421478629112, 0.05277815833687782, 0.06688141077756882, -0.0012051830999553204, -0.0005139918066561222, 0.03454933688044548, 0.10497473925352097, -0.07582316547632217, -0.05474098026752472, -0.007705901749432087, 0.018646828830242157, 0.010895490646362305, 0.10068560391664505, 0.024226337671279907, -0.017965292558073997, -0.058593932539224625, 0.04881615936756134, 0.01911935955286026, -0.015975207090377808, 0.010459307581186295, -0.056849200278520584, -0.03812967613339424, 0.06219244375824928, 0.08207512646913528, 0.03440394252538681, 0.04263690114021301, -0.01906483806669712, 0.050342801958322525, 0.050197407603263855, 0.010850055143237114, 0.004514040891081095, -0.025116877630352974, 0.018074337393045425, 0.04779839888215065, 0.053686872124671936, -0.007519615348428488, -0.005565878469496965, -0.010759184136986732, -0.008937210775911808, -0.04387275129556656, -0.012513003312051296, -0.0006258773501031101, -0.0026057397481054068, 0.041946277022361755, -0.07273353636264801, 0.03553074970841408, 0.04496321082115173, -0.05390496551990509, 0.00786038301885128, -0.03896569088101387, 0.004398179706186056, -0.008909949101507664, 0.018274255096912384, -0.014593960717320442, -0.060338664799928665, -0.017056576907634735, -0.03149605542421341, -0.015602633357048035, -0.07676822692155838, -0.03620319813489914, -0.07251544296741486, -0.09203463792800903, 0.02528044767677784, 0.010077647864818573, -0.04896155372262001, -0.009459721855819225, 0.011540678329765797, 0.020064422860741615, 0.021227577701210976, 0.04594462364912033, 0.015729853883385658, -0.05306894704699516, -0.018755873665213585, -0.007624117657542229, 0.003728002542629838, 0.016874834895133972, 0.0031100765336304903, -0.031950414180755615, 0.0162478219717741, -0.016320519149303436, -0.05183309316635132, -0.0378388874232769, -0.03567614406347275, 0.027588581666350365, 0.03936552628874779, -0.001402828493155539, -0.05826679617166519, 0.02402641996741295, 0.005079715978354216, 0.04928869381546974, 0.046707943081855774, 0.034912824630737305, 0.02464434690773487, 0.02066417597234249, -0.004879798740148544, -0.021918201819062233, 0.018701352179050446, 0.012158604338765144, -0.056122228503227234, -0.0035508032888174057, -0.04725317284464836, -0.00733787240460515, -0.0678991749882698, -0.03400411084294319, -0.051796745508909225, 0.016474999487400055, 0.02577115222811699, 0.04834362864494324, 0.012122255750000477, 0.05401400849223137, 0.001665219897404313, 0.01210408192127943, 0.017201971262693405, 0.01946467161178589, -0.03414950519800186, 0.03676660358905792, 0.017783548682928085, 0.007687727455049753, 0.07844026386737823, -0.025734804570674896, 0.04187357798218727, 0.014066905714571476, 0.048016492277383804, 0.0007712717051617801, -0.05586778745055199, 0.05466828495264053, -0.01210408192127943, -0.007333328947424889, 0.0030101179145276546, -0.04449068009853363, 0.029951240867376328, 0.037729840725660324, -0.009141671471297741, -0.07044357061386108, 0.017256494611501694, 0.028715388849377632, 0.03391323611140251, 0.01882857084274292, -0.0315324030816555, 0.0014709820970892906, -0.015893422067165375, -0.019719112664461136, 0.06862614303827286, 0.047871097922325134, -0.016275083646178246, 0.013912424445152283, 0.03922013193368912, 0.04750761017203331, 0.08185703307390213, 0.014466740190982819, -0.028497297316789627, -0.004171001259237528, 0.03925647959113121, 0.05797600746154785, 0.009246173314750195, -0.025989243760704994, 0.007396938744932413, 0.02417181432247162, -0.05408670753240585, -0.030296552926301956, -0.05634031817317009, -0.01917388290166855, 0.009100778959691525, 0.019719112664461136, 0.03489464893937111, 0.017238320782780647, 0.03473108261823654, -0.010659225285053253, -0.016138775274157524, -0.016529522836208344, -0.0427095964550972, -0.00897810235619545, 0.012313085608184338, -0.00027957180282101035, -0.04750761017203331, -0.02237255871295929, -0.029678625985980034, 0.0001435485464753583, 0.025680281221866608, 0.030096635222434998, -0.003927920013666153, -0.04987027123570442, 0.013585287146270275, 0.015448152087628841, 0.019591892138123512, 0.03562162071466446, -0.017883507534861565, -0.0018605936784297228, -0.014294084161520004, 0.022699696943163872, -0.030260203406214714, 0.013630722649395466, -0.03900204226374626, -0.08243861049413681, 0.00470714271068573, 0.020064422860741615, 0.0538686141371727, -0.03364062309265137, -0.05114247277379036, -0.03614867478609085, -0.008819077163934708, -0.02042790874838829, 0.0037825254257768393, -0.02411729097366333, 0.06913502514362335, 0.018755873665213585, 0.05132421478629112, 0.00873729307204485, 0.005733990576118231, -0.03596693277359009, 0.055686045438051224, -0.017056576907634735, -0.008342002518475056, 0.005670380778610706, 0.002079821191728115, 0.01703840307891369, -0.03943822532892227, -0.049034252762794495, 0.032822780311107635, 0.03167779743671417, -0.004309580195695162, 0.03965631499886513, -0.02008259855210781, -0.010850055143237114, -0.0063519165851175785, -0.024335382506251335, 0.016556784510612488, -0.03725731000304222, 0.029278792440891266, -0.05615857616066933, -0.022681523114442825, -0.03769349306821823, -0.06331925094127655, 0.04376370832324028, -0.06291941553354263, 0.004870711360126734, -0.002287689596414566, 0.011168105527758598, 0.022590650245547295, 0.0016992967575788498, 0.02193637564778328, 0.062228791415691376, 0.016075165942311287, 0.01194051280617714, -0.029824020341038704, -0.01639321632683277, 0.00795579794794321, -0.04827093333005905, -0.014893836341798306, -0.009841381572186947, 0.018955791369080544, 0.03649398684501648, 0.048161886632442474, -0.01554811093956232, -0.019537368789315224, -0.08432873338460922, -0.054850026965141296, 0.022154467180371284, 0.05394131317734718, -0.02697065658867359, 0.0592118576169014, -0.04143739491701126, 0.0040710424073040485, 0.014330432750284672, -0.04710777848958969, 0.09668725728988647, -0.08062118291854858, -0.03066003881394863, 0.025880198925733566, 0.010713747702538967, -0.0742238312959671, 0.041510093957185745, -0.019864507019519806, -0.037002868950366974, 0.027406839653849602, 0.02833372913300991, 0.003525813575834036, 0.05852123722434044, -0.04260054975748062, 0.051069773733615875, -0.01451217569410801, 0.03307722136378288, -0.01824699342250824, -0.013230888172984123, 0.020355211570858955, 0.000778654997702688, 0.024135466665029526, 0.040201544761657715, 0.013403544202446938, -0.03620319813489914, -0.027206921949982643, 0.015130101703107357, 0.02004624903202057, -0.07109785079956055, -0.03751174733042717, -0.025898372754454613, 0.031714148819446564, 0.014748441986739635, -0.01683848537504673, 0.014603047631680965, -0.00023569790937472135, -0.039619967341423035, -0.022845091298222542, 0.05154230445623398, 0.005488637834787369, -0.006156542804092169, 0.013757942244410515, -0.03393141180276871, -0.013312672264873981, -0.025752978399395943, 0.004364103078842163, 0.002748862374573946, 0.04601731896400452, -0.00376662309281528, -0.04663524404168129, -0.010931839235126972, 0.055249862372875214, 0.06012057512998581, -0.04336387291550636, 0.024535300210118294, 0.04721682146191597, 0.012385782785713673, -0.007260631769895554, 0.012949186377227306, -0.004698055796325207, 0.01069557387381792, -0.010477482341229916, 0.054995421320199966, 0.011059059761464596, -0.011876902543008327, -0.001725422334857285, -0.015929771587252617, 0.00810573622584343, -0.006624531000852585, -0.009832294657826424, -0.04710777848958969, -0.025934722274541855, -0.07142498344182968, -0.048161886632442474, -0.020409734919667244, -0.020845917984843254, 0.0061747170984745026, -0.04507225751876831, -0.006201978772878647, 0.009895904920995235, -0.04972487688064575, 0.08999911695718765, -0.049470435827970505, -0.026897959411144257, -0.06390082836151123, -0.0018140219617635012, -0.04761665686964989, -0.02420816384255886, 0.007233370095491409, 0.053541477769613266, -0.05459558591246605, 0.03654851019382477, -0.009477895684540272, 0.0538686141371727, -0.04405449703335762, -0.05299624800682068, 0.06171991303563118, -0.002935149008408189, -0.033458881080150604, 0.027134224772453308, 0.022445255890488625, 0.018955791369080544, -0.04430893436074257, -0.0027988418005406857, -0.03482195362448692, 0.013276323676109314, -0.014403129927814007, 0.016720352694392204, -0.030896304175257683, 0.022590650245547295, 0.06517302989959717, -0.05764887109398842, 0.03618502616882324, -0.037002868950366974, -0.006111107300966978, -0.010641050525009632, 0.009105322882533073, -0.00017890323942992836, 0.015411803498864174, -0.003275916911661625, -0.028315553441643715, 0.054704632610082626, 0.014348607510328293, 0.02726144529879093, 0.010477482341229916, -0.010368436574935913, 0.03896569088101387, -0.023935548961162567, 0.02508052997291088, -0.014448566362261772, -0.08287478983402252, 0.01737462729215622, 0.06898962706327438, 0.07262448966503143, -0.02693430706858635, -0.01858321763575077, 0.0008945161825977266, -0.04190992936491966, -0.008678226731717587, -0.046707943081855774, -0.006919863633811474, -0.008019408211112022, 0.017483673989772797, -0.030169332399964333, -0.03402228280901909, 0.028569994494318962, 0.013794290833175182, 0.017847159877419472, -0.019955378025770187, -0.021482018753886223, -0.01562989503145218, 0.006038410123437643, 0.06081119552254677, 0.0008445368730463088, -0.03838411346077919, 0.0298421960324049, -0.02533496916294098, 0.014284997247159481, -0.015566284768283367, -0.006874427665024996, 0.02173645980656147, -0.06535477191209793, -0.009264348074793816, 0.020355211570858955, -0.0451086051762104, -0.016656743362545967, 0.007828578352928162, 0.021718284115195274, -0.02678891271352768, 0.011467981152236462, 0.03711191564798355, 0.026661694049835205, 0.026043767109513283, 0.0011972318170592189, -0.032968174666166306, -0.0049661267548799515, -0.016474999487400055, -0.028370076790452003, 0.002732959808781743, -0.010332087986171246, -0.0014130516210570931, 0.011013624258339405, 0.029042527079582214, -0.01576620154082775, -0.009895904920995235, 0.04616271331906319, 0.024626171216368675, 0.021282101050019264, -0.01829242892563343, 0.03987440839409828, 0.014693918637931347, 0.015520849265158176, 0.042091671377420425, -0.009914078749716282, -0.01931927725672722, -0.03454933688044548, 0.07487810403108597, 0.05564969778060913, 0.027043353766202927, 0.011322586797177792, 0.02179098129272461, -0.03362244740128517, -0.023608410730957985, -0.02464434690773487, -0.008042125962674618, 0.002980584744364023, -0.03863855451345444, -0.014693918637931347, 0.04445432871580124, 0.015511762350797653, 0.020827744156122208, 0.013185452669858932, -0.04114660620689392, -0.024862438440322876, 0.07440557330846786, 0.027007004246115685, -0.02013712003827095, -0.01009582169353962, 0.04401814565062523, 0.026225510984659195, -0.0582304485142231, 0.017401888966560364, -0.045690182596445084, -0.06477319449186325, -0.026170987635850906, -0.001488020527176559, -0.00393019150942564, 0.02460799738764763, 0.03451298922300339, -0.05016105994582176, -0.0621197447180748, -0.017483673989772797, -0.008260217495262623, -0.050052013248205185, -0.010622876696288586, -0.03720278665423393, -0.03385871648788452, 0.01154976524412632, -0.01625690795481205, 0.017301930114626884, -0.03120526671409607, -0.06226513907313347, 0.0013608004665002227, -0.018792223185300827, 0.0051842182874679565, 0.05732173100113869, 0.03925647959113121, 0.024517126381397247, -0.0000779506954131648, -0.00034076807787641883, -0.009091692045331001, -0.00459582544863224, -0.0621197447180748, 0.02577115222811699, 0.00936884991824627, -0.04038328677415848, 0.048452675342559814, 0.07931262999773026, -0.00878272857517004, -0.04492686316370964, 0.010459307581186295, -0.02144567109644413, -0.010831881314516068, -0.004554932937026024, 0.0441635400056839, 0.0017833529273048043, -0.030878130346536636, -0.03424037620425224, 0.035294484347105026, -0.016275083646178246, 0.037729840725660324, 0.005470463540405035, 0.012867402285337448, 0.024771565571427345, 0.022772394120693207, -0.027243271470069885, 0.03307722136378288, 0.01644773781299591, 0.03169597312808037, 0.01891944371163845, -0.0092234555631876, 0.04957948252558708, 0.041219305247068405, -0.022299861535429955, 0.07538698613643646, -0.004050596617162228, -0.02173645980656147, -0.018755873665213585, 0.14205029606819153, -0.0616108663380146, 0.027679454535245895, -0.044417981058359146, -0.0756777748465538, -0.08091197162866592, 0.03951092064380646, -0.029387837275862694, 0.03178684413433075, -0.0017594990786165, -0.006301937624812126, 0.04361831396818161, 0.015838898718357086, 0.04478146880865097 ]
715,838
pytorch_optimizer.loss.bi_tempered
__init__
null
def __init__( self, t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean', ): super().__init__() self.t1 = t1 self.t2 = t2 self.label_smooth = label_smooth self.ignore_index = ignore_index self.reduction = reduction
(self, t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean')
[ -0.015341723337769508, -0.023088358342647552, 0.021626392379403114, 0.018862919881939888, -0.02964937314391136, -0.026119261980056763, -0.05865690857172012, -0.00722068315371871, -0.02408677339553833, 0.008317157626152039, -0.011829440481960773, 0.06375595927238464, 0.04417988285422325, 0.012141444720327854, -0.010162442922592163, 0.028668787330389023, 0.02203645557165146, 0.031040024012327194, 0.008838650770485401, 0.014744456857442856, 0.02119849994778633, -0.04100634902715683, -0.043288443237543106, 0.08557847142219543, 0.01317551825195551, 0.015671556815505028, -0.027224650606513023, -0.043466731905937195, -0.01593007519841194, -0.04717513173818588, -0.0028882732149213552, -0.027670372277498245, -0.0712084174156189, 0.04528527334332466, 0.0364065058529377, -0.07388274371623993, -0.04885104298591614, 0.049207620322704315, -0.07973060756921768, 0.054484959691762924, 0.05166799947619438, -0.05758717656135559, -0.03093305043876171, 0.006690274924039841, -0.010215929709374905, 0.02424723282456398, -0.010750794783234596, -0.017035463824868202, 0.007755548693239689, -0.0322345569729805, -0.024764269590377808, 0.010786452330648899, -0.019665218889713287, 0.026885902509093285, -0.06225833669304848, 0.10882728546857834, 0.04931459203362465, 0.02200079709291458, -0.038189392536878586, 0.025762684643268585, -0.018274568021297455, 0.03940175473690033, 0.021751193329691887, 0.03679874166846275, -0.04161252826452255, -0.016999805346131325, -0.06589542329311371, 0.04261094704270363, -0.002629755064845085, 0.017124608159065247, 0.05373614653944969, -0.01946910098195076, -0.009262085892260075, 0.02952457219362259, -0.0034119957126677036, 0.0036727425176650286, -0.042361341416835785, -0.0027523282915353775, 0.02617274783551693, -0.03622821718454361, -0.02487124316394329, 0.019379956647753716, -0.04129160940647125, -0.029399769380688667, -0.023694537580013275, -0.048708412796258926, -0.03861728310585022, -0.02856181375682354, -0.024657296016812325, -0.03048732876777649, -0.11046753823757172, 0.03505151346325874, -0.021091526374220848, 0.03360737860202789, 0.012426706962287426, 0.01133914664387703, -0.016366882249712944, -0.07388274371623993, -0.046212371438741684, -0.011312403716146946, 0.03492671251296997, -0.05477022007107735, -0.01044770423322916, -0.007733262609690428, 0.013906501233577728, -0.056232184171676636, -0.03251981735229492, -0.006511986721307039, -0.0068685635924339294, 0.005540314596146345, -0.01674128696322441, 0.04756736382842064, -0.06564581394195557, 0.017329640686511993, -0.07049526274204254, 0.011276746168732643, 0.03095087967813015, 0.023248817771673203, -0.011232174001634121, 0.011294574476778507, 0.03697703033685684, 0.05648178979754448, -0.03137877210974693, 0.06136689335107803, 0.01832805573940277, 0.002939531346783042, 0.023979799821972847, 0.02982766181230545, 0.019076867029070854, -0.03711966052651405, 0.02950674295425415, -0.0322345569729805, 0.02073494903743267, 0.03654913604259491, -0.005299624986946583, 0.006311411969363689, 0.03858162462711334, 0.062436625361442566, -0.0019444586941972375, 0.019344300031661987, 0.052916020154953, -0.0373692661523819, 0.022892240434885025, -0.023177502676844597, -0.003761886851862073, 0.02392631396651268, -0.04100634902715683, -0.02071712166070938, 0.015038632787764072, 0.04018622264266014, -0.008580133318901062, 0.017187008634209633, -0.0024938101414591074, -0.011116286739706993, 0.03045167215168476, -0.04628368839621544, 0.03462362289428711, -0.021465932950377464, 0.019986137747764587, 0.01642928272485733, 0.008954538963735104, -0.04389462247490883, 0.09627577662467957, -0.016054878011345863, -0.019219497218728065, 0.03180666267871857, 0.0003646556579042226, -0.009689978323876858, -0.033839151263237, -0.024853413924574852, 0.004196465015411377, -0.07837561517953873, 0.024033285677433014, 0.02900753542780876, -0.007104795891791582, 0.05156102776527405, 0.012159273959696293, 0.03558637946844101, -0.014485938474535942, 0.004399267956614494, 0.04845880717039108, -0.018738118931651115, -0.057194944471120834, -0.042503971606492996, 0.010269416496157646, -0.009128370322287083, -0.002504953183233738, -0.008228013291954994, -0.008557846769690514, 0.05270207300782204, 0.09363710880279541, -0.01961173303425312, -0.015671556815505028, 0.00956517644226551, 0.07085184007883072, 0.007488116156309843, 0.030112924054265022, -0.0522741824388504, 0.032288044691085815, 0.061830442398786545, -0.002939531346783042, 0.03936609625816345, 0.044607777148485184, -0.0037507438100874424, 0.04913630336523056, 0.01609053462743759, 0.02631537802517414, 0.05077655613422394, -0.06468305736780167, -0.016696715727448463, 0.00070312520256266, -0.03669176995754242, 0.025103017687797546, 0.07787640392780304, 0.026761099696159363, 0.012498022057116032, -0.00004157743023824878, 0.022589148953557014, 0.03754755109548569, 0.0061732386238873005, 0.09534867852926254, -0.034213557839393616, -0.008593504317104816, 0.018916407600045204, 0.07220683246850967, 0.001726055284962058, 0.05284470319747925, -0.042218711227178574, -0.0009571862756274641, 0.003102219430729747, 0.00140625040512532, -0.05277338996529579, -0.03268027678132057, -0.012578251771628857, -0.030112924054265022, 0.024817755445837975, -0.006886392366141081, -0.02264263667166233, -0.09563393890857697, -0.07516641914844513, -0.006093008443713188, -0.0033451374620199203, -0.03765452653169632, -0.026707613840699196, 0.016857175156474113, -0.05758717656135559, 0.015306065790355206, 0.054306671023368835, -0.049243275076150894, 0.019219497218728065, 0.0018486286280676723, 0.027991291135549545, -0.000048332891310565174, 0.03141443058848381, -0.006761590484529734, 0.005317453760653734, 0.029595887288451195, -0.025281306356191635, -0.020681463181972504, -0.025976629927754402, -0.037725839763879776, -0.04596276953816414, -0.0654318705201149, 0.02635103650391102, -0.018140852451324463, 0.01179378293454647, -0.02011094056069851, -0.005357568617910147, -0.04446514695882797, -0.0018865149468183517, 0.0015633670846000314, 0.02665412612259388, -0.0010853310814127326, 0.0031289628241211176, -0.009993068873882294, 0.011116286739706993, -0.011865098029375076, -0.05698099732398987, -0.016473855823278427, 0.004214293789118528, 0.05091919004917145, -0.02729596570134163, -0.016875004395842552, -0.04532093182206154, -0.005509113892912865, -0.00506784999743104, 0.023890655487775803, -0.031022194772958755, -0.00777337746694684, -0.047460392117500305, -0.017151352018117905, 0.04435817152261734, 0.060546766966581345, 0.02043185941874981, 0.06040413677692413, -0.01500297524034977, 0.030184239149093628, 0.01069730892777443, -0.033892638981342316, -0.02661846950650215, 0.027670372277498245, -0.08094296604394913, 0.015760701149702072, -0.015832016244530678, -0.025727026164531708, -0.03893820196390152, 0.06628765165805817, 0.031664032489061356, 0.08293979614973068, -0.008339443244040012, 0.018247826024889946, 0.07737720012664795, -0.03583598509430885, 0.010403132066130638, -0.053522199392318726, 0.021662048995494843, 0.00813441164791584, -0.02570919878780842, 0.02374802529811859, 0.05651744827628136, -0.024158088490366936, -0.05084787309169769, -0.004225437063723803, -0.03093305043876171, 0.004064977169036865, -0.010394218377768993, 0.026903731748461723, -0.02167987823486328, -0.01821216754615307, 0.03687005490064621, -0.01805170811712742, -0.00020336029410827905, 0.01900555193424225, -0.028668787330389023, -0.07070920616388321, -0.01708894968032837, 0.016313396394252777, 0.05373614653944969, -0.004332410171627998, -0.004399267956614494, 0.017454441636800766, -0.04974248632788658, -0.02266046591103077, 0.06707212328910828, 0.0038176020607352257, -0.034855395555496216, 0.02298138476908207, -0.037404920905828476, 0.09962759912014008, 0.028151750564575195, -0.009395802393555641, 0.023890655487775803, -0.011107372120022774, 0.046818554401397705, 0.08814582228660583, 0.05937006324529648, -0.025085188448429108, -0.011036057025194168, 0.0008724992512725294, -0.06610936671495438, -0.020342715084552765, -0.025602225214242935, 0.015252579003572464, 0.003915660548955202, 0.02490689978003502, 0.010795366950333118, 0.01975436322391033, 0.03943740949034691, -0.06721475720405579, 0.0038978317752480507, -0.042218711227178574, -0.05844296142458916, -0.0008602418820373714, -0.0042365798726677895, 0.017775360494852066, -0.01816759631037712, -0.02171553671360016, -0.03045167215168476, -0.008219098672270775, -0.01395107340067625, 0.013603410683572292, -0.014735542237758636, -0.013737127184867859, 0.043003179132938385, -0.03339343145489693, 0.027563398703932762, 0.03879557177424431, -0.02857964299619198, 0.05509113892912865, 0.01724940910935402, 0.04179081693291664, -0.05263075605034828, 0.03109350986778736, -0.04022188112139702, -0.03339343145489693, 0.004419325385242701, 0.015341723337769508, 0.011267831549048424, -0.042824890464544296, -0.01706220768392086, -0.04414422810077667, -0.05437798425555229, 0.00025225034914910793, 0.03633519262075424, 0.009788037277758121, 0.0002812222228385508, 0.012471279129385948, -0.01820325292646885, 0.024924729019403458, 0.0057096886448562145, -0.02870444394648075, -0.0026966130826622248, 0.0052327667362987995, 0.01691066101193428, -0.018720289692282677, 0.0036905715242028236, -0.04781696945428848, -0.02264263667166233, -0.012774369679391384, 0.009190770797431469, -0.015609156340360641, 0.0264580100774765, 0.027188992127776146, 0.007479201536625624, 0.08786056190729141, -0.03464145213365555, -0.003991433419287205, -0.01656300015747547, 0.05138273909687996, 0.004343552980571985, -0.06471871584653854, 0.02200079709291458, -0.09406500309705734, -0.018916407600045204, 0.03473059460520744, -0.00669918954372406, -0.025120846927165985, -0.05038432404398918, 0.04671157896518707, -0.006627873983234167, -0.00003497866782709025, -0.029471084475517273, 0.06496831774711609, -0.030754761770367622, -0.04770999774336815, -0.036941371858119965, -0.044429488480091095, 0.01993265189230442, -0.057016655802726746, -0.08037244528532028, 0.037904128432273865, 0.036620453000068665, 0.008076467551290989, 0.00973455049097538, 0.01554675493389368, -0.0386529415845871, -0.08172743767499924, -0.06240096688270569, 0.02490689978003502, 0.0022564635146409273, -0.031164824962615967, 0.03177100792527199, -0.04671157896518707, -0.019843507558107376, 0.00958300568163395, 0.012096873484551907, 0.06290017068386078, -0.032626792788505554, -0.038688600063323975, -0.011499607004225254, -0.02378368191421032, -0.055768635123968124, -0.0056160870008170605, -0.036620453000068665, -0.0015143377240747213, 0.04050714150071144, -0.010831024497747421, -0.03382132202386856, 0.04054279997944832, -0.013835186138749123, 0.040471483021974564, -0.03323297202587128, 0.04303883761167526, 0.031004365533590317, 0.025459595024585724, 0.06457608938217163, -0.020824093371629715, -0.03382132202386856, 0.02201862633228302, 0.018310226500034332, -0.030879564583301544, 0.02884707599878311, 0.023658880963921547, 0.005923634395003319, -0.058942168951034546, 0.049243275076150894, 0.02982766181230545, 0.03398178517818451, 0.03442750498652458, 0.018096279352903366, 0.011419377289712429, 0.0006045093759894371, -0.023337962105870247, -0.019504759460687637, 0.04931459203362465, -0.020645804703235626, -0.0766640454530716, 0.008223555982112885, -0.06304280459880829, -0.0029618171975016594, 0.00578546104952693, 0.00045602850150316954, 0.018417200073599815, 0.10233758389949799, 0.032787252217531204, -0.04688986763358116, -0.09977023303508759, 0.024942558258771896, 0.03701268881559372, -0.008049724623560905, 0.007336570881307125, 0.06528923660516739, 0.01322900503873825, -0.05748020485043526, 0.005723060108721256, 0.015092119574546814, 0.03936609625816345, -0.006988908164203167, 0.07787640392780304, 0.018916407600045204, -0.005994949955493212, -0.041220296174287796, -0.043466731905937195, 0.0713510513305664, 0.005691859405487776, 0.0551624558866024, -0.020307056605815887, -0.013300320133566856, 0.017623815685510635, -0.011285660788416862, 0.005972663871943951, 0.03615690395236015, 0.05844296142458916, -0.03125397115945816, 0.02442552149295807, 0.04517829790711403, -0.04549922049045563, 0.08536452054977417, -0.008620248176157475, -0.007648575585335493, 0.009716722182929516, -0.046319346874952316, -0.019736533984541893, 0.0038688599597662687, -0.024443350732326508, 0.022553492337465286, -0.033910468220710754, -0.006779419258236885, 0.04385896399617195, 0.047638680785894394, -0.018702460452914238, -0.012346477247774601, 0.0793740302324295, -0.003759658196941018, -0.03291205316781998, -0.0008379558566957712, 0.005495742429047823, 0.024479007348418236, -0.05077655613422394, -0.03045167215168476, -0.01301505882292986, -0.01880943402647972, -0.013032887130975723, 0.017784275114536285, -0.049385908991098404, 0.052916020154953, 0.04271791875362396, -0.009199685417115688, -0.08308243006467819, -0.050491295754909515, -0.03417789936065674, 0.03424921631813049, -0.0043390956707298756, -0.0364065058529377, 0.021180670708417892, 0.001982345012947917, -0.027224650606513023, -0.014316564425826073, -0.001416279119439423, -0.019861336797475815, 0.0020191168878227472, -0.022945726290345192, 0.017187008634209633, 0.05041998252272606, -0.04535658657550812, 0.01125000324100256, -0.049029331654310226, -0.04407291114330292, 0.03578249737620354, 0.017632730305194855, -0.04913630336523056, 0.027206821367144585, -0.03940175473690033, 0.029934635385870934, -0.020217912271618843, -0.0130685456097126, -0.015199092216789722, 0.02968503162264824, -0.029613716527819633, -0.039152149111032486, 0.05455627292394638, 0.04803091660141945, 0.02342710644006729, -0.019112523645162582, 0.02121632918715477, -0.027955632656812668, -0.015350637957453728, 0.003911203239113092, 0.0357646681368351, -0.03958003968000412, -0.019397785887122154, 0.005246138200163841, -0.019415615126490593, 0.05134708061814308, -0.046961184591054916, 0.0077466340735554695, 0.030665617436170578, -0.11467514932155609, 0.0033139369916170835, -0.04040016978979111, 0.006400556303560734, -0.04853012412786484, 0.0022453204728662968, -0.08215533196926117, 0.01539521012455225, 0.0030331327579915524, 0.017623815685510635, 0.028971876949071884, 0.021430274471640587, 0.02569136954843998, -0.0386529415845871, 0.013861929066479206, 0.02938194014132023, 0.032484158873558044, -0.010046555660665035, -0.07138670235872269, -0.06011887267231941, -0.017597071826457977, 0.06147386506199837, 0.030594302341341972, -0.016875004395842552, 0.05124010890722275, -0.0067170183174312115, 0.023159673437476158, -0.029257139191031456, 0.03826070576906204, -0.02856181375682354, -0.03382132202386856, 0.06582410633563995, -0.006690274924039841, -0.04261094704270363, 0.026047946885228157, 0.06379161775112152, 0.0538787767291069, 0.04118463769555092, 0.0025361536536365747, -0.005156994331628084, -0.040114905685186386, 0.01707112230360508, -0.016001390293240547, -0.013906501233577728, 0.03112916834652424, -0.011579836718738079, 0.045071326196193695, 0.01484251581132412, 0.006271297112107277, 0.023088358342647552, -0.030255554243922234, 0.011668981052935123, -0.047282103449106216, 0.045534875243902206, 0.011775953695178032, -0.005183737259358168, -0.057337574660778046, -0.011499607004225254, -0.006048436742275953, -0.06739304214715958, 0.016197508201003075, 0.03193146735429764, -0.000024949940780061297, 0.009939582087099552, -0.0018397142412140965, -0.008433044888079166, 0.03555072098970413, 0.011704638600349426, -0.019201667979359627, -0.054306671023368835, -0.0890016034245491, 0.022696122527122498, 0.00470681581646204, 0.0068685635924339294, -0.005050021223723888, -0.04578448086977005, 0.047139473259449005, -0.0348019115626812, 0.04688986763358116, -0.042824890464544296, -0.026707613840699196, 0.03378566727042198, -0.06033281981945038, 0.025085188448429108, 0.033892638981342316, 0.01816759631037712, 0.011918584816157818, 0.0270998477935791, 0.030986536294221878, 0.042967524379491806, 0.003857716917991638, -0.05091919004917145, 0.0315927192568779, -0.01371929794549942, -0.021751193329691887, 0.008352815173566341, 0.07780508697032928, -0.0017082265112549067, 0.011972070671617985, -0.005856776610016823, -0.014566168189048767, 0.013050716370344162, -0.04000793397426605, 0.01656300015747547, 0.02693938836455345, -0.00031256198417395353, -0.04432251676917076, 0.03161054849624634, -0.0014251935062929988, 0.02551308088004589, 0.012016642838716507, 0.06810619682073593, 0.044750407338142395, 0.00742125790566206, -0.05124010890722275, -0.011214344762265682, 0.006672446150332689, -0.042967524379491806, 0.017160266637802124, -0.0012714196927845478, 0.03312600031495094, 0.028793588280677795, 0.010305074043571949, 0.027188992127776146, -0.0027322708629071712, -0.006458499934524298, 0.0017104550497606397, 0.05726625770330429, -0.04200476408004761, 0.0312718003988266, -0.024782098829746246, -0.007318742107599974, -0.05102616176009178, -0.0003510054375510663, -0.02089540846645832, 0.031004365533590317, 0.03169969096779823, 0.037404920905828476, 0.08044376224279404, 0.045998428016901016, 0.04214739426970482 ]
715,868
pytorch_optimizer.loss.bi_tempered
forward
null
def forward(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: loss = bi_tempered_logistic_loss( predictions, targets, t1=self.t1, t2=self.t2, label_smooth=self.label_smooth, reduction='none' ) if self.ignore_index is not None: mask = ~targets.eq(self.ignore_index) loss *= mask if self.reduction == 'mean': loss = loss.mean() elif self.reduction == 'sum': loss = loss.sum() return loss
(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor
[ -0.06998790055513382, -0.023753134533762932, 0.010374720208346844, -0.017985304817557335, 0.0035219688434153795, -0.04356276988983154, -0.032745786011219025, -0.008730059489607811, -0.02251848764717579, 0.04551609233021736, 0.010522141121327877, 0.024656085297465324, 0.02743864804506302, -0.03781336918473244, 0.015589721500873566, 0.049496445804834366, -0.01591220498085022, -0.003314658533781767, 0.05262913182377815, -0.0015237294137477875, 0.029226120561361313, -0.016483459621667862, -0.01664009317755699, 0.058673374354839325, -0.030202781781554222, -0.04348905757069588, -0.04606891795992851, -0.012429393827915192, -0.016538741067051888, 0.0037891685497015715, -0.0024554734118282795, -0.04315736144781113, 0.016658520326018333, 0.024545518681406975, 0.0031948795076459646, -0.014281364157795906, -0.033501315861940384, 0.02657255157828331, -0.01990177296102047, -0.039103295654058456, -0.04113033041357994, -0.04525810480117798, 0.05137605592608452, 0.03521507978439331, -0.05288711562752724, 0.020380889996886253, -0.03851361572742462, -0.012973006814718246, 0.03705783560872078, -0.031124161556363106, -0.022592198103666306, 0.03705783560872078, -0.020860005170106888, 0.010107520967721939, 0.027272799983620644, 0.05049153417348862, 0.034164708107709885, -0.017966877669095993, -0.06541786342859268, -0.06070040538907051, 0.0339067243039608, -0.020399317145347595, 0.05826796591281891, -0.023145023733377457, 0.0529608279466629, 0.009600762277841568, -0.02076786756515503, 0.056720051914453506, 0.024766650050878525, -0.0005349753191694617, -0.04529495909810066, -0.054951004683971405, 0.01799451932311058, 0.030552906915545464, -0.04109347611665726, -0.030552906915545464, 0.051339201629161835, -0.0011292643612250686, 0.05738344416022301, -0.008126556873321533, -0.05373478680849075, -0.021689247339963913, 0.015073750168085098, -0.03173226863145828, -0.023697851225733757, -0.07687980681657791, -0.041830576956272125, -0.03093988448381424, -0.03873474523425102, -0.04573722183704376, -0.08004935085773468, 0.027088522911071777, -0.02404797449707985, 0.024748222902417183, 0.03987725451588631, 0.044778987765312195, -0.05775199458003044, 0.003639444475993514, 0.025116773322224617, 0.020362460985779762, 0.013286275789141655, 0.12619197368621826, 0.014272150583565235, 0.027733488008379936, 0.034293703734874725, -0.010789340361952782, -0.05513527989387512, -0.013212565332651138, 0.007946887984871864, -0.011968704871833324, -0.030571334064006805, 0.019219951704144478, 0.025337904691696167, -0.042383402585983276, -0.01815115287899971, -0.060000158846378326, -0.015985913574695587, -0.006269979756325483, -0.08815748244524002, 0.06165863946080208, 0.06092153489589691, -0.05152347683906555, -0.02535633184015751, -0.030534477904438972, -0.014216868206858635, 0.008204874582588673, 0.043673332780599594, -0.00414389930665493, 0.045221250504255295, -0.04230969399213791, -0.06364881992340088, 0.001299143536016345, 0.04120403900742531, 0.07746949046850204, 0.03836619481444359, 0.01312964130192995, 0.053108248859643936, 0.05992644652724266, 0.06276429444551468, 0.008495108224451542, 0.04584778845310211, -0.03517822548747063, 0.06313284486532211, 0.02111799269914627, 0.045663509517908096, -0.00396192679181695, 0.0049431947991251945, 0.04020895063877106, 0.03425684571266174, -0.010319437831640244, 0.04267824441194534, -0.023587286472320557, 0.0003953289124183357, 0.027401791885495186, -0.0509706512093544, 0.042825665324926376, 0.0005459166713990271, 0.0079238535836339, 0.011028898879885674, -0.0024831146001815796, -0.000633447605650872, -0.06928765028715134, 0.030884603038430214, -0.03650500997900963, 0.0026789074763655663, -0.047395702451467514, 0.04573722183704376, 0.06346453726291656, 0.00754608865827322, 0.04868563264608383, 0.013590330258011818, -0.041720010340213776, 0.0678134486079216, 0.056498922407627106, -0.019422655925154686, 0.005095222499221563, 0.01925680786371231, -0.021154846996068954, -0.03195340186357498, 0.07444737106561661, 0.032635223120450974, -0.023882126435637474, -0.047727398574352264, -0.07614270597696304, 0.05215001478791237, 0.015202743001282215, -0.0084766810759902, 0.030479196459054947, -0.07035645097494125, 0.04098290950059891, 0.0250430628657341, -0.05985273793339729, 0.06969305872917175, -0.03250622749328613, 0.060958392918109894, 0.0038628787733614445, 0.01875004917383194, -0.009347382932901382, 0.03761066496372223, -0.03665243089199066, -0.03685513511300087, 0.031676989048719406, 0.026204001158475876, 0.033851440995931625, -0.04389446601271629, 0.015856921672821045, -0.031345292925834656, 0.08425083756446838, -0.04757997766137123, -0.06855054944753647, -0.017966877669095993, 0.007417095825076103, -0.021910376846790314, 0.06718690693378448, 0.014963184483349323, 0.015230383723974228, -0.043341636657714844, 0.030055362731218338, 0.03399886190891266, -0.019183097407221794, 0.01137902308255434, -0.08277662843465805, -0.06832941621541977, 0.034717537462711334, 0.05753086507320404, 0.03195340186357498, 0.00946255587041378, 0.007541481871157885, 0.04253082349896431, 0.026296138763427734, 0.005367028992623091, 0.014548564329743385, -0.01509217731654644, 0.009499411098659039, 0.09965628385543823, 0.01892511174082756, -0.0007923853700049222, -0.009987741708755493, 0.031547993421554565, 0.022463204339146614, -0.024029547348618507, -0.013617971912026405, 0.03586004674434662, 0.039324428886175156, 0.0115817254409194, -0.019625358283519745, 0.016566382721066475, 0.04415244981646538, -0.03420156612992287, 0.03401728719472885, -0.018492063507437706, 0.0354546383023262, -0.03792393207550049, 0.017275843769311905, 0.013138854876160622, -0.07242033630609512, 0.022260500118136406, -0.03490181267261505, 0.022463204339146614, -0.04507382959127426, -0.004869484808295965, -0.027917763218283653, -0.014520922675728798, 0.003086617449298501, -0.0249324981123209, -0.007578337099403143, -0.011563298292458057, 0.006477289833128452, 0.016409749165177345, 0.058231111615896225, 0.03750009834766388, -0.014585419557988644, -0.028507446870207787, -0.0013440606417134404, 0.012724234722554684, 0.00525185652077198, 0.042162273079156876, -0.02065730281174183, -0.033501315861940384, 0.04732199385762215, 0.003146507078781724, -0.07500019669532776, -0.035933755338191986, -0.06202718988060951, 0.020178185775876045, 0.05941047519445419, 0.022039370611310005, -0.04691658541560173, 0.058894503861665726, -0.01486183237284422, 0.06707634776830673, 0.0695824921131134, 0.005472987424582243, -0.01378381997346878, 0.0035288790240883827, -0.04687973111867905, 0.012936152517795563, -0.03016592748463154, 0.03106887824833393, -0.020288750529289246, -0.06453333795070648, -0.013267848640680313, 0.010697202757000923, -0.09567593038082123, -0.04079863429069519, -0.04017209634184837, 0.05871022865176201, 0.03117944300174713, 0.03550992161035538, -0.011775215156376362, 0.029778948053717613, 0.028894424438476562, -0.04315736144781113, -0.000739406154025346, 0.0011897297808900476, -0.04684287682175636, 0.02087843418121338, 0.018805332481861115, 0.033519744873046875, 0.028673294931650162, -0.023918982595205307, 0.023532003164291382, -0.0078685712069273, -0.015949059277772903, -0.0029299831949174404, -0.03206396847963333, 0.028286315500736237, -0.045442380011081696, -0.008250943385064602, 0.004841843154281378, -0.004581553861498833, -0.003733885707333684, 0.02132069505751133, 0.004353512544184923, -0.07485277950763702, -0.02502463571727276, 0.03186126425862312, 0.07968080043792725, 0.02570645697414875, 0.036781422793865204, -0.03562048822641373, -0.04068806767463684, 0.001374005456455052, 0.07732207328081131, 0.04945959150791168, 0.029686810448765755, -0.01542387343943119, 0.04304679483175278, 0.03972983360290527, -0.006578641477972269, 0.020712586119771004, -0.009365811012685299, -0.005242642946541309, 0.03031334839761257, 0.033869870007038116, -0.022665906697511673, -0.020583592355251312, 0.020215041935443878, 0.013359986245632172, -0.03433055803179741, -0.03796078637242317, -0.06258001923561096, -0.03436741232872009, -0.00017059895617421716, 0.005532877054065466, 0.04813280701637268, 0.016474245116114616, -0.0019360462902113795, -0.02863643877208233, -0.012106911279261112, -0.014447212219238281, -0.00436042295768857, -0.009775823913514614, 0.03836619481444359, 0.0016319913556799293, 0.02087843418121338, 0.032008685171604156, -0.03729739412665367, 0.003418313805013895, 0.02089686132967472, -0.03738953173160553, 0.026627834886312485, -0.052113160490989685, 0.0018784601707011461, 0.03873474523425102, 0.051670897752046585, 0.030700325965881348, -0.07054072618484497, 0.004627622663974762, 0.018667126074433327, 0.05259227752685547, -0.057788848876953125, -0.017358768731355667, -0.09316977858543396, -0.06121637672185898, -0.001991329016163945, 0.0017966878367587924, 0.07452107965946198, -0.027862481772899628, -0.0231634508818388, -0.06154807284474373, 0.002425528597086668, -0.033538173884153366, -0.010476072318851948, -0.05402962490916252, 0.08329260349273682, -0.0008787646074779332, 0.021597107872366905, 0.009674472734332085, 0.010347078554332256, -0.03914015367627144, 0.03403571620583534, -0.04481584206223488, -0.019441083073616028, -0.008895907551050186, 0.02133912220597267, -0.022887038066983223, -0.04289937764406204, -0.028249461203813553, 0.005772435571998358, 0.03650500997900963, 0.018132725730538368, -0.0017287360969930887, -0.046621743589639664, -0.0028102039359509945, 0.019072532653808594, -0.04124089330434799, 0.03335389494895935, 0.016372893005609512, 0.020638875663280487, -0.017091568559408188, -0.031658560037612915, -0.024103257805109024, -0.02132069505751133, 0.05863652005791664, -0.03117944300174713, -0.003625623881816864, 0.01739562302827835, 0.010715629905462265, 0.019625358283519745, -0.02524576708674431, -0.03410942479968071, 0.03182440996170044, 0.03269050270318985, -0.005514449439942837, -0.045221250504255295, -0.04230969399213791, -0.050786375999450684, -0.017985304817557335, -0.01793002337217331, -0.015902990475296974, 0.024545518681406975, 0.016345251351594925, 0.040430083870887756, 0.01345212385058403, 0.006537179462611675, -0.11557769775390625, -0.050233546644449234, 0.02931826002895832, 0.02765977755188942, -0.011692291125655174, 0.018731622025370598, -0.024785077199339867, 0.02896813489496708, 0.0002425816492177546, -0.03650500997900963, 0.0527396984398365, -0.06652351468801498, -0.012245118618011475, 0.011259243823587894, 0.020694157108664513, -0.09987741708755493, 0.06298542767763138, 0.002114563249051571, -0.05863652005791664, 0.03355659916996956, 0.023771561682224274, 0.005661869887262583, 0.03825562819838524, -0.0023541217669844627, 0.013912812806665897, 0.027143806219100952, -0.0011096850503236055, -0.031124161556363106, -0.0024439559783786535, 0.03726053982973099, -0.013691682368516922, -0.00053324771579355, 0.07205178588628769, 0.020638875663280487, 0.000020838986529270187, -0.06755545735359192, 0.04658488929271698, -0.009126252494752407, -0.06818199902772903, -0.016105692833662033, 0.024987781420350075, 0.031105732545256615, 0.002226280514150858, 0.002519969828426838, 0.010697202757000923, -0.028894424438476562, -0.03738953173160553, -0.025098346173763275, 0.0012012469815090299, 0.0022838665172457695, 0.03202711045742035, 0.0008660956518724561, -0.05004927143454552, 0.0016826671781018376, -0.008338473737239838, 0.011314526200294495, -0.030202781781554222, 0.04503697529435158, 0.012917724438011646, -0.008080488070845604, -0.036468155682086945, 0.010743271559476852, 0.009434914216399193, -0.025448469445109367, 0.010669561102986336, 0.025006208568811417, -0.022923894226551056, -0.03650500997900963, 0.01723898947238922, 0.006518751848489046, 0.03718683123588562, 0.012162194587290287, 0.037020981311798096, -0.04717457294464111, -0.035380929708480835, -0.029244549572467804, -0.002533790422603488, 0.010420789010822773, -0.03597060963511467, 0.0004146202700212598, 0.00045349090942181647, -0.07555302232503891, -0.07828030735254288, -0.01007066573947668, -0.0034044929780066013, -0.03873474523425102, -0.02524576708674431, -0.07186751067638397, -0.010328651405870914, -0.020270323380827904, -0.055393267422914505, 0.004528574645519257, -0.032966919243335724, -0.012300400994718075, -0.06036870926618576, 0.010835409164428711, -0.02176295593380928, -0.009490196593105793, 0.04348905757069588, 0.07474221289157867, -0.01624390110373497, 0.08638843148946762, -0.0024969354271888733, 0.05303453654050827, -0.02876543253660202, -0.11373494565486908, 0.053439944982528687, 0.007016296032816172, -0.036910418421030045, 0.0024900250136852264, -0.0035380928311496973, 0.04640061408281326, -0.016483459621667862, -0.0016458120662719011, -0.044778987765312195, 0.05307139456272125, 0.021468115970492363, 0.017469333484768867, 0.006426614243537188, 0.009683686308562756, 0.05952104181051254, -0.08904200047254562, 0.047616831958293915, -0.025724884122610092, -0.03344603255391121, -0.02087843418121338, -0.017478547990322113, 0.01251231785863638, 0.017847098410129547, -0.00625615892931819, -0.048059094697237015, 0.06696578115224838, 0.009434914216399193, -0.02152339741587639, -0.027070095762610435, -0.03222981467843056, 0.023771561682224274, 0.017091568559408188, -0.001312964130192995, -0.017321912571787834, -0.041720010340213776, 0.014493281953036785, 0.04798538610339165, 0.07396825402975082, 0.01595827378332615, 0.003694727085530758, 0.005311746150255203, -0.03287477791309357, -0.0030290314462035894, -0.03127158060669899, -0.041830576956272125, 0.0038766993675380945, 0.01406023371964693, -0.04629004746675491, -0.008048240095376968, 0.04124089330434799, 0.006776737980544567, 0.0031994862947613, 0.017414050176739693, -0.002086922060698271, 0.018713194876909256, 0.061400651931762695, 0.004666781518608332, 0.011701504699885845, 0.010153589770197868, -0.034938666969537735, -0.03193497285246849, 0.028489017859101295, -0.005629621911793947, -0.006334476172924042, 0.01686122454702854, -0.06070040538907051, -0.012199049815535545, 0.04175686836242676, -0.046990297734737396, -0.009094004519283772, 0.0012081573950126767, 0.050565242767333984, -0.009711327962577343, 0.03239566460251808, 0.047395702451467514, 0.03847676143050194, 0.027254370972514153, -0.07282574474811554, -0.051449768245220184, 0.0001441813219571486, -0.004222216084599495, -0.004406491760164499, 0.002821721136569977, -0.023550430312752724, -0.03234038129448891, 0.01109339576214552, 0.03291163593530655, -0.021468115970492363, -0.02023346908390522, 0.02109956368803978, 0.024858787655830383, 0.03409099951386452, 0.009444127790629864, 0.04278881102800369, -0.020288750529289246, 0.02699638530611992, 0.03541778400540352, -0.019183097407221794, -0.05262913182377815, -0.014640701934695244, 0.06998790055513382, 0.015322522260248661, 0.041609447449445724, -0.0043304781429469585, 0.012106911279261112, -0.04802224040031433, -0.036025892943143845, -0.04496326297521591, -0.016741445288062096, 0.02100742608308792, -0.024950925260782242, 0.03226666897535324, 0.0647176131606102, 0.017432479187846184, 0.023900553584098816, 0.04651118069887161, -0.005445346236228943, -0.046216338872909546, 0.03689198940992355, 0.02690424770116806, 0.002628231653943658, -0.004468685016036034, 0.024674512445926666, 0.012539959512650967, -0.05520899221301079, 0.019606931135058403, -0.0025752524379640818, -0.02111799269914627, -0.003238644916564226, -0.02207622490823269, 0.01757068559527397, 0.03506765887141228, 0.011904207989573479, 0.01317571010440588, -0.0483170822262764, -0.011019685305655003, 0.03421999141573906, -0.008693205192685127, -0.01443799864500761, 0.012567601166665554, -0.02657255157828331, -0.03149271383881569, -0.01810508407652378, 0.013710109516978264, -0.01914624311029911, -0.020915288478136063, -0.04909103736281395, -0.05414019152522087, 0.010079879313707352, 0.002614411059767008, 0.012991434894502163, 0.05192888528108597, -0.0156265776604414, -0.01881454512476921, 0.0035496100317686796, 0.004383457358926535, -0.0503072589635849, 0.006053455639630556, -0.02340300939977169, -0.031105732545256615, 0.015792425721883774, 0.049054183065891266, -0.017985304817557335, -0.0492016039788723, 0.01890668459236622, -0.02515362948179245, 0.019551647827029228, 0.011498801410198212, 0.06353825330734253, -0.013488979078829288, -0.004139292053878307, -0.02404797449707985, -0.023237161338329315, -0.002085770247504115, 0.023550430312752724, -0.031658560037612915, 0.04518439620733261, 0.00770732993260026, 0.05782570689916611, -0.0024024939630180597, 0.043267928063869476, 0.011047326028347015, -0.01586613431572914, 0.005187360104173422, -0.04835393652319908, 0.022610625252127647, 0.01486183237284422, -0.038771599531173706, 0.07253090292215347, 0.015562080778181553, -0.002006301423534751, -0.015792425721883774, 0.1371748149394989, 0.00782250240445137, 0.04945959150791168, -0.05896821618080139, -0.029907941818237305, -0.04975442960858345, 0.04186743125319481, -0.05730973184108734, -0.023660996928811073, -0.008817590773105621, -0.023679424077272415, 0.024877214804291725, 0.011351381428539753, 0.037463244050741196 ]
715,902
pytorch_optimizer.loss.bi_tempered
BinaryBiTemperedLogisticLoss
Modification of BiTemperedLogisticLoss for binary classification case. :param t1: float. Temperature 1 (< 1.0 for boundedness). :param t2: float. Temperature 2 (> 1.0 for tail heaviness, < 1.0 for finite support). :param label_smooth: float. Label smoothing parameter between [0, 1). :param ignore_index: Optional[int]. Index to ignore. :param reduction: str. type of reduction.
class BinaryBiTemperedLogisticLoss(nn.Module): """Modification of BiTemperedLogisticLoss for binary classification case. :param t1: float. Temperature 1 (< 1.0 for boundedness). :param t2: float. Temperature 2 (> 1.0 for tail heaviness, < 1.0 for finite support). :param label_smooth: float. Label smoothing parameter between [0, 1). :param ignore_index: Optional[int]. Index to ignore. :param reduction: str. type of reduction. """ def __init__( self, t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean', ): super().__init__() self.t1 = t1 self.t2 = t2 self.label_smooth = label_smooth self.ignore_index = ignore_index self.reduction = reduction def forward(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: if predictions.size(1) != 1 or targets.size(1) != 1: raise ValueError('Channel dimension for predictions and targets must be equal to 1') loss = bi_tempered_logistic_loss( torch.cat((-predictions, predictions), dim=1).moveaxis(1, -1), torch.cat((1.0 - targets, targets), dim=1).moveaxis(1, -1), t1=self.t1, t2=self.t2, label_smooth=self.label_smooth, reduction='none', ).unsqueeze(dim=1) if self.ignore_index is not None: mask = targets.eq(self.ignore_index) loss = torch.masked_fill(loss, mask, value=0) if self.reduction == 'mean': loss = loss.mean() elif self.reduction == 'sum': loss = loss.sum() return loss
(t1: float, t2: float, label_smooth: float = 0.0, ignore_index: Optional[int] = None, reduction: str = 'mean')
[ -0.05928601324558258, -0.04474901035428047, 0.024063147604465485, 0.023182116448879242, 0.037553928792476654, -0.050732675939798355, -0.05484415218234062, 0.0035768921952694654, -0.011462574824690819, -0.045409783720970154, 0.009035151451826096, 0.05139344930648804, 0.028523363173007965, 0.007314389105886221, -0.03221267834305763, 0.035846929997205734, 0.011132188141345978, 0.04049069434404373, 0.02208082750439644, -0.010755914263427258, 0.02156689390540123, -0.028725266456604004, -0.012830006889998913, 0.0942702665925026, -0.04236288368701935, -0.030524037778377533, -0.04162869229912758, -0.02666952833533287, -0.022282730787992477, -0.024246694520115852, -0.013573376461863518, -0.06468232721090317, 0.0052953604608774185, 0.023310599848628044, -0.016528500244021416, -0.0448591373860836, -0.007667718920856714, 0.0875157043337822, -0.10330083221197128, -0.001740264822728932, 0.014491116628050804, -0.07562179118394852, -0.002358592115342617, 0.0027853413484990597, -0.030046813189983368, -0.005387134850025177, -0.026100529357790947, 0.013995537534356117, 0.013628440909087658, -0.03050568327307701, -0.005405489355325699, -0.006740801502019167, -0.004496926907449961, 0.016803821548819542, -0.004113770090043545, 0.07672307640314102, 0.04364772140979767, 0.0144452303647995, -0.007075776811689138, -0.01741870865225792, -0.010866043157875538, -0.012398669496178627, 0.05396312102675438, -0.022484634071588516, 0.01561993733048439, 0.012710700742900372, -0.08685492724180222, 0.02815626747906208, 0.007741138339042664, 0.01708832196891308, -0.0034713521599769592, -0.054550476372241974, 0.038177989423274994, 0.055504925549030304, -0.028706911951303482, -0.0409679189324379, 0.005001683719456196, -0.012407846748828888, 0.059763237833976746, 0.0031386713963001966, -0.006653616204857826, -0.031496841460466385, 0.02912907302379608, -0.00041957932990044355, -0.01004007738083601, -0.10418186336755753, -0.02676130272448063, -0.05686318129301071, -0.00012819682888220996, -0.04118817672133446, -0.09258162975311279, 0.0019364317413419485, 0.0027279825881123543, 0.016721226274967194, 0.05388970300555229, 0.02824804186820984, -0.04834655299782753, -0.013086974620819092, -0.017060790210962296, -0.03432347998023033, -0.01258221734315157, 0.07000521570444107, -0.005231118761003017, 0.03401144966483116, 0.020740928128361702, -0.023200470954179764, -0.04919087141752243, 0.02507266029715538, -0.013142039068043232, -0.057120148092508316, -0.08362448215484619, -0.007231792435050011, -0.014252504333853722, -0.07452049851417542, -0.008163298480212688, -0.044124945998191833, -0.0012160056503489614, -0.007621832191944122, -0.06695832312107086, 0.03513109311461449, 0.07584204524755478, -0.02030041255056858, -0.03847166895866394, -0.013279699720442295, 0.001291719265282154, 0.024375177919864655, 0.041371725499629974, -0.041591983288526535, 0.032047487795352936, -0.021713731810450554, -0.07657624036073685, 0.004485454875975847, 0.004831901751458645, 0.06805960834026337, 0.02063079923391342, -0.006649027578532696, 0.008635934442281723, 0.06475574523210526, 0.04151856526732445, 0.030964553356170654, 0.03346080705523491, -0.023328954353928566, 0.059029046446084976, 0.034800708293914795, 0.057854339480400085, -0.0046483539044857025, 0.030230360105633736, 0.023347308859229088, 0.06978496164083481, -0.016638629138469696, 0.0063966489396989346, -0.025531530380249023, -0.030340489000082016, 0.05825814604759216, -0.0024549548979848623, 0.05840498208999634, 0.01740953139960766, 0.011168898083269596, -0.018620947375893593, 0.02165866829454899, -0.022154247388243675, -0.04599713534116745, -0.009572030045092106, -0.018887093290686607, -0.015684179961681366, -0.04060082510113716, 0.06013033539056778, 0.009016796946525574, 0.00695647019892931, 0.02444859780371189, -0.02933097444474697, -0.05418337881565094, 0.05120990052819252, 0.059322722256183624, 0.0010284425225108862, 0.07213437557220459, -0.01009514182806015, 0.00560739217326045, -0.0029964216519147158, 0.03560831770300865, 0.04801616445183754, -0.012279363349080086, -0.06035059317946434, -0.07000521570444107, 0.03175380825996399, 0.02498088777065277, 0.019584575667977333, 0.012316073291003704, -0.0386919230222702, 0.0440148189663887, 0.044565461575984955, -0.03571844846010208, 0.031294938176870346, -0.009246231988072395, 0.08208268135786057, 0.026284078136086464, 0.017785804346203804, -0.00089938536984846, 0.05249473825097084, -0.0010100877843797207, 0.005332070402801037, 0.031496841460466385, 0.0686836764216423, 0.06864695996046066, -0.01899722032248974, -0.0006624936941079795, 0.04221604764461517, 0.11886570602655411, -0.06123162433505058, -0.06020375341176987, -0.009122337214648724, 0.01626235619187355, 0.011939799413084984, 0.08590047806501389, 0.026008756831288338, -0.019694704562425613, -0.0614151693880558, 0.04566675052046776, 0.02030041255056858, -0.02167702279984951, 0.003932516556233168, -0.03472728654742241, -0.0412248894572258, 0.05109977349638939, 0.08252319693565369, 0.025880271568894386, 0.030982907861471176, -0.023549212142825127, 0.040123600512742996, 0.04959467798471451, 0.0163449514657259, -0.0008884872077032924, -0.019914960488677025, 0.012885071337223053, 0.05484415218234062, 0.04673133045434952, 0.008580869995057583, -0.02294350415468216, -0.007897154428064823, -0.00581388408318162, -0.03909572958946228, -0.010544834658503532, -0.0027830470353364944, -0.01180213876068592, 0.03832482919096947, -0.06780264526605606, 0.039242569357156754, 0.05098964273929596, -0.04592371731996536, 0.005827649962157011, -0.036929864436388016, -0.0006011198274791241, -0.02764233388006687, 0.0071859052404761314, -0.01147175207734108, -0.06464561820030212, -0.022264376282691956, -0.024283405393362045, -0.005313715431839228, -0.05704672634601593, -0.028082849457859993, -0.05557834357023239, -0.0673254206776619, 0.02911071851849556, 0.007897154428064823, -0.04548320174217224, -0.017611432820558548, 0.022649826481938362, 0.02793600969016552, 0.024522017687559128, 0.037223540246486664, 0.013444893062114716, -0.043390754610300064, -0.02198905497789383, -0.015794308856129646, 0.005772585514932871, 0.02178715169429779, -0.003193735843524337, -0.03832482919096947, 0.000313178839860484, -0.02294350415468216, -0.06607729196548462, -0.018529172986745834, -0.038948893547058105, 0.0384349562227726, 0.05109977349638939, 0.005423844326287508, -0.0588822066783905, 0.020061800256371498, -0.0004637455858755857, 0.052861832082271576, 0.044675592333078384, 0.03898560255765915, 0.030762650072574615, 0.016638629138469696, -0.009094804525375366, -0.021713731810450554, 0.001868748338893056, 0.002216342370957136, -0.05128331854939461, -0.023016922175884247, -0.029514523223042488, -0.0005365912220440805, -0.0726483091711998, -0.03237787261605263, -0.0650494247674942, 0.013490780256688595, 0.03814128041267395, 0.044051527976989746, 0.004278963431715965, 0.04768577963113785, -0.0025375515688210726, 0.028192978352308273, 0.01546392124146223, 0.013288876973092556, -0.04438191279768944, 0.04526294395327568, 0.024687210097908974, 0.026687882840633392, 0.07224450260400772, -0.018226319923996925, 0.03147848695516586, -0.003950871527194977, 0.044124945998191833, -0.005460553802549839, -0.04346417263150215, 0.050512418150901794, -0.0164734348654747, -0.01985989697277546, 0.01603292115032673, -0.022539697587490082, 0.044602170586586, 0.029661361128091812, -0.0066031403839588165, -0.06552664935588837, 0.008149532601237297, 0.024081502109766006, 0.03144177794456482, 0.0224295686930418, -0.031405068933963776, -0.01264645904302597, -0.005878125783056021, -0.0019318429986014962, 0.06207594275474548, 0.0471351332962513, -0.018510818481445312, 0.0012618927285075188, 0.05344918742775917, 0.02922084741294384, 0.07441037148237228, 0.0263574980199337, -0.030156942084431648, -0.004558874294161797, 0.03166203573346138, 0.04588700830936432, -0.006465479265898466, -0.014748084358870983, 0.015876904129981995, 0.033424098044633865, -0.04676803946495056, -0.018786141648888588, -0.05506440997123718, -0.02211753837764263, 0.005120989866554737, 0.029899973422288895, 0.042326174676418304, 0.0002545294992160052, 0.05194409191608429, -0.01627153344452381, -0.029789844527840614, -0.003560831770300865, -0.04614397510886192, -0.01796017400920391, 0.012233476154506207, 0.0026109707541763783, -0.034360192716121674, -0.027789171785116196, -0.03770076483488083, 0.011508461087942123, 0.016647806391119957, 0.02028205804526806, -0.007208848837763071, -0.0669950321316719, 0.007653953041881323, 0.012123347260057926, 0.014270859770476818, 0.03689315542578697, -0.017161739990115166, -0.007323566358536482, -0.012793297879397869, 0.019511155784130096, -0.03228610008955002, 0.0004089679569005966, -0.05205422267317772, -0.08575364202260971, 0.0009183137444779277, 0.037021636962890625, 0.06567348539829254, -0.016115516424179077, -0.051907382905483246, -0.03931598737835884, -0.017914287745952606, -0.03219432383775711, 0.00730521185323596, -0.010700849816203117, 0.0818624198436737, 0.013004378415644169, 0.03259813040494919, 0.006245221942663193, 0.003797149984166026, -0.035002607852220535, 0.07187741249799728, -0.0037466741632670164, 0.004395975265651941, -0.007263913284987211, -0.009425191208720207, 0.014977519400417805, -0.049227580428123474, -0.04430849477648735, 0.02591698244214058, 0.04386797919869423, 0.0037191419396549463, 0.03971979394555092, -0.028945524245500565, -0.013215458020567894, 0.002356297802180052, -0.004292729776352644, 0.021713731810450554, -0.03147848695516586, 0.0371684767305851, -0.060937944799661636, -0.01795099675655365, -0.06515955179929733, -0.05172383412718773, 0.022062472999095917, -0.05649608373641968, 0.00850286241620779, -0.00358606968075037, 0.014711374416947365, 0.033956386148929596, -0.009246231988072395, 0.018547529354691505, 0.04522623494267464, 0.0224295686930418, -0.00018455181270837784, -0.03960966318845749, -0.013380651362240314, -0.0060020205564796925, -0.05418337881565094, -0.013242990709841251, -0.020006734877824783, 0.011994863860309124, 0.034598805010318756, 0.05565176159143448, -0.014096489176154137, -0.012215121649205685, -0.08545996248722076, -0.04071095213294029, 0.02604546584188938, 0.02742207609117031, -0.01743706315755844, 0.055174537003040314, -0.053596023470163345, 0.01110465545207262, 0.003781089326366782, -0.04423507675528526, 0.0947842001914978, -0.07018876820802689, -0.034378547221422195, 0.03151519596576691, 0.022778309881687164, -0.07863197475671768, 0.04346417263150215, -0.025458112359046936, -0.04162869229912758, 0.03689315542578697, 0.02986326441168785, 0.0003983565839007497, 0.0499250628054142, -0.04331733658909798, 0.056789759546518326, 0.008461563847959042, 0.013261345215141773, -0.021823860704898834, -0.02028205804526806, 0.013242990709841251, 0.007764081470668316, 0.025788499042391777, 0.04555661976337433, 0.007268501911312342, -0.026082174852490425, -0.030432263389229774, 0.011178075335919857, 0.028174621984362602, -0.08120165020227432, -0.0378476046025753, -0.03588363900780678, 0.039462827146053314, 0.026210658252239227, -0.018336448818445206, 0.015546518377959728, 0.005277005955576897, -0.06567348539829254, -0.02964300662279129, 0.03195571154356003, -0.00144773512147367, -0.008461563847959042, 0.012013218365609646, -0.0290189441293478, -0.01807030290365219, -0.025531530380249023, 0.008993853814899921, -0.007208848837763071, 0.03538805991411209, 0.0005862065008841455, -0.036287445574998856, 0.009365538135170937, 0.04592371731996536, 0.04610726609826088, -0.04133501648902893, 0.022594762966036797, 0.020373830571770668, 0.004118358716368675, -0.0017368232365697622, 0.012435379438102245, 0.015170244500041008, 0.012995200231671333, -0.025898627936840057, 0.05535808578133583, 0.0007439430919475853, -0.01248126570135355, 0.0008540719281882048, -0.002617853693664074, 0.010535657405853271, -0.0018159783212468028, -0.00565786799415946, -0.01551898568868637, -0.026375852525234222, -0.06684819608926773, -0.04151856526732445, -0.020667508244514465, -0.018942156806588173, 0.013591731898486614, -0.038104571402072906, -0.010223625227808952, 0.015546518377959728, -0.03390132263302803, 0.06883051246404648, -0.03476399555802345, -0.01763896644115448, -0.07367617636919022, -0.004292729776352644, -0.046364232897758484, -0.01104041375219822, 0.019713059067726135, 0.04779590666294098, -0.050292160362005234, 0.0448591373860836, -0.005180642940104008, 0.06402155011892319, -0.044895850121974945, -0.04919087141752243, 0.061672139912843704, -0.016822177916765213, -0.04621739313006401, 0.03302029147744179, 0.017978530377149582, 0.01923583447933197, -0.041591983288526535, 0.006713269278407097, -0.04665790870785713, 0.024063147604465485, -0.023182116448879242, 0.005611981265246868, -0.02030041255056858, 0.029165782034397125, 0.0552479587495327, -0.06497599929571152, 0.034800708293914795, -0.031698744744062424, -0.01923583447933197, -0.020098509266972542, 0.03386460989713669, -0.006749978754669428, 0.008525806479156017, -0.012839185073971748, -0.023971373215317726, 0.05227448046207428, -0.0015945734921842813, 0.02443024329841137, 0.008250484243035316, -0.00019960849022027105, 0.0437578521668911, -0.029606297612190247, 0.02050231583416462, -0.0016175169730558991, -0.08949802070856094, 0.014105666428804398, 0.06963812559843063, 0.06402155011892319, -0.01985989697277546, -0.021915635094046593, 0.0033176306169480085, -0.036287445574998856, -0.011288204230368137, -0.03942611813545227, -0.010645785368978977, -0.007846678607165813, 0.010370464064180851, -0.042656563222408295, -0.03272661566734314, 0.032579775899648666, 0.020116863772273064, 0.03560831770300865, -0.023310599848628044, -0.011499283835291862, -0.036158960312604904, 0.014041424728929996, 0.06299368292093277, 0.003051486099138856, -0.032653193920850754, 0.0061626252718269825, -0.03792102262377739, 0.01312368456274271, -0.02857842855155468, 0.005561505444347858, 0.01646425761282444, -0.05627582594752312, -0.011673654429614544, 0.05036557838320732, -0.033938031643629074, -0.013729392550885677, 0.0021119494922459126, 0.03305700048804283, -0.01796017400920391, 0.005437610205262899, 0.032047487795352936, 0.03770076483488083, 0.027256881818175316, 0.001283689052797854, -0.03481906279921532, -0.01914406009018421, -0.02052067033946514, -0.0224295686930418, 0.005543150473386049, -0.012573040090501308, -0.0031386713963001966, 0.010324576869606972, 0.01892380230128765, -0.016638629138469696, -0.027165109291672707, 0.03535135090351105, 0.02136499062180519, 0.013674328103661537, -0.00036222056951373816, 0.038177989423274994, 0.016078807413578033, 0.016868064180016518, 0.037572283297777176, -0.010737559758126736, -0.02911071851849556, -0.0337911918759346, 0.07848513871431351, 0.03891218081116676, -0.0059561338275671005, 0.014224972575902939, 0.034672223031520844, -0.04621739313006401, -0.025017596781253815, -0.03147848695516586, 0.006231455598026514, -0.004051822703331709, -0.044455334544181824, -0.013821166940033436, 0.052311189472675323, 0.019511155784130096, 0.008631345815956593, 0.01912570558488369, -0.03803115338087082, -0.03577351197600365, 0.08714860677719116, 0.018648479133844376, -0.028505008667707443, -0.0017884460976347327, 0.07040902227163315, 0.0006154595175758004, -0.056679632514715195, 0.007052833214402199, -0.04724526405334473, -0.06170884892344475, -0.020539024844765663, -0.00587353715673089, 0.01259139459580183, 0.01868519000709057, 0.02092447504401207, -0.04008689150214195, -0.06258987635374069, -0.012141702696681023, -0.006887639872729778, -0.042656563222408295, -0.01573006622493267, -0.041591983288526535, -0.03538805991411209, -0.005139344837516546, -0.015206954441964626, 0.021438410505652428, -0.022246021777391434, -0.04023372754454613, 0.0025100193452090025, -0.019254188984632492, 0.008456975221633911, 0.07731042802333832, 0.016445903107523918, 0.030046813189983368, -0.0197681225836277, 0.00408853217959404, -0.0165560320019722, 0.002698156051337719, -0.06894063949584961, 0.023732760921120644, 0.0002454954956192523, -0.025237854570150375, 0.033827900886535645, 0.07782436162233353, -0.004070177674293518, -0.05352260544896126, 0.018832027912139893, -0.02487075887620449, -0.01838233508169651, -0.008103645406663418, 0.06710515916347504, 0.005827649962157011, -0.030322134494781494, -0.01890544779598713, 0.0280461385846138, -0.006915172096341848, 0.05473402142524719, -0.01708832196891308, 0.005377957131713629, 0.038948893547058105, 0.0206124447286129, -0.02505430579185486, 0.04258314147591591, 0.017813336104154587, 0.025256209075450897, 0.03092784248292446, 0.00087988335872069, 0.04665790870785713, 0.04735539108514786, -0.027238527312874794, 0.06442535668611526, -0.005254062358289957, -0.007809968665242195, -0.017271868884563446, 0.12554685771465302, -0.037223540246486664, 0.014702197164297104, -0.04801616445183754, -0.07826487720012665, -0.07261160016059875, 0.02986326441168785, -0.039903342723846436, 0.02624736912548542, -0.00004072472074767575, -0.0059286016039550304, 0.0580378882586956, 0.009200344793498516, 0.05388970300555229 ]
715,938
pytorch_optimizer.loss.bi_tempered
forward
null
def forward(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: if predictions.size(1) != 1 or targets.size(1) != 1: raise ValueError('Channel dimension for predictions and targets must be equal to 1') loss = bi_tempered_logistic_loss( torch.cat((-predictions, predictions), dim=1).moveaxis(1, -1), torch.cat((1.0 - targets, targets), dim=1).moveaxis(1, -1), t1=self.t1, t2=self.t2, label_smooth=self.label_smooth, reduction='none', ).unsqueeze(dim=1) if self.ignore_index is not None: mask = targets.eq(self.ignore_index) loss = torch.masked_fill(loss, mask, value=0) if self.reduction == 'mean': loss = loss.mean() elif self.reduction == 'sum': loss = loss.sum() return loss
(self, predictions: torch.Tensor, targets: torch.Tensor) -> torch.Tensor
[ -0.0780511125922203, -0.02777809649705887, -0.018012503162026405, -0.010851682163774967, -0.0034607569687068462, -0.028514428064227104, -0.03388964757323265, 0.00864729005843401, -0.013576108030974865, 0.03449711948633194, 0.016484616324305534, 0.02671041712164879, 0.018445098772644997, -0.023930765688419342, 0.02199789695441723, 0.04859786480665207, -0.009977288544178009, -0.009135110303759575, 0.06004781648516655, 0.003605722216889262, 0.03392646461725235, -0.029913458973169327, -0.022752637043595314, 0.05150637403130531, -0.025697961449623108, -0.02873532846570015, -0.055114395916461945, -0.0007455354207195342, -0.026452701538801193, 0.006521133705973625, -0.005319993477314711, -0.03828922659158707, 0.017322193831205368, 0.03549116849899292, -0.008909608237445354, -0.0059826914221048355, -0.019604820758104324, 0.021040666848421097, -0.04966554418206215, -0.033723972737789154, -0.052500419318675995, -0.05526166036725044, 0.06549666821956635, 0.026857683435082436, -0.057139307260513306, 0.02411484904587269, -0.0416763499379158, -0.0007725725881755352, 0.03538071736693382, -0.03405532240867615, -0.016852781176567078, 0.020506825298070908, -0.03342944011092186, 0.0015106296632438898, 0.01250842772424221, 0.05158000439405441, 0.044658493250608444, -0.013714170083403587, -0.07547395676374435, -0.058206986635923386, 0.028864186257123947, -0.02566114440560341, 0.06446580588817596, -0.020470010116696358, 0.03512300178408623, 0.010851682163774967, -0.015444548800587654, 0.053568098694086075, 0.02983982488512993, -0.011597217991948128, -0.0574338398873806, -0.04329627752304077, 0.02553228661417961, 0.022181980311870575, -0.04278084635734558, -0.03495732694864273, 0.049334194511175156, 0.011486767791211605, 0.06218317523598671, -0.0025081282947212458, -0.06593846529722214, -0.015499773435294628, 0.00890040397644043, -0.025311388075351715, -0.013217146508395672, -0.07197637856006622, -0.03390805423259735, -0.011118602007627487, -0.04782471805810928, -0.027060173451900482, -0.07536350935697556, 0.019107796251773834, -0.02032274380326271, 0.02763083018362522, 0.04749336838722229, 0.05080685764551163, -0.049260564148426056, 0.005531688686460257, 0.00782351940870285, 0.021298382431268692, -0.006465909071266651, 0.1251026839017868, 0.002763543277978897, 0.014662196859717369, 0.01662267930805683, -0.013005451299250126, -0.06615936756134033, -0.008302135393023491, 0.0012724724365398288, -0.0157114677131176, -0.040535036474466324, 0.003640237729996443, 0.03917282447218895, -0.04016686975955963, 0.005959681235253811, -0.060415979474782944, -0.03188314288854599, -0.0037921061739325523, -0.08953788131475449, 0.05474622920155525, 0.056145258247852325, -0.05051232501864433, -0.01769956387579441, -0.03902555629611015, -0.022053122520446777, 0.028035813942551613, 0.039430540055036545, -0.011597217991948128, 0.035288676619529724, -0.05393626540899277, -0.0678161084651947, -0.006180580705404282, 0.044143058359622955, 0.06582801789045334, 0.05470941215753555, 0.015969185158610344, 0.0417499840259552, 0.042596764862537384, 0.047272466123104095, 0.017082884907722473, 0.04863468185067177, -0.026728825643658638, 0.054120346903800964, 0.03335580602288246, 0.03954099118709564, -0.0011873341863974929, 0.022660594433546066, 0.0234705600887537, 0.014395276084542274, -0.01283977646380663, 0.03274833410978317, -0.024335749447345734, 0.003334200009703636, 0.031514979898929596, -0.05861197039484978, 0.05886968597769737, -0.0037322791758924723, 0.01663188263773918, 0.011440747417509556, 0.010078534483909607, -0.014082335866987705, -0.06671161204576492, 0.011597217991948128, -0.009204140864312649, 0.003989994991570711, -0.05334720015525818, 0.041529085487127304, 0.03961462154984474, -0.004024510737508535, 0.04561572149395943, 0.02873532846570015, -0.03412895277142525, 0.07945014536380768, 0.04016686975955963, -0.03330058231949806, -0.009144313633441925, 0.012618876993656158, -0.03712950274348259, -0.029103493317961693, 0.06601209938526154, 0.021095890551805496, -0.02656315080821514, -0.039945971220731735, -0.0733754113316536, 0.04915011301636696, 0.017543092370033264, -0.006746635306626558, 0.0366508886218071, -0.058243803679943085, 0.03186473622918129, 0.025403428822755814, -0.048781946301460266, 0.07043008506298065, -0.020635683089494705, 0.07131368666887283, -0.019715270027518272, 0.031551796942949295, -0.0066039711236953735, 0.03613545745611191, -0.028864186257123947, -0.03447871282696724, 0.02665519155561924, 0.04498983919620514, 0.025292979553341866, -0.04392215982079506, 0.009682755917310715, -0.01663188263773918, 0.09564943611621857, -0.062404073774814606, -0.06468670070171356, -0.025716369971632957, 0.00832974724471569, -0.01489229965955019, 0.053457651287317276, 0.007956979796290398, 0.009020058438181877, -0.05135910585522652, 0.027446748688817024, 0.03773697838187218, -0.02709699049592018, 0.01667790301144123, -0.08291090279817581, -0.06833153963088989, 0.030152766034007072, 0.040976837277412415, 0.022292429581284523, 0.00964593980461359, 0.005706567317247391, 0.041970882564783096, 0.01513160765171051, 0.003983092028647661, 0.023120801895856857, -0.011808913201093674, 0.010262616910040379, 0.1201692670583725, 0.0011666248319670558, 0.012315141037106514, -0.002655394608154893, 0.03490210324525833, 0.024722322821617126, -0.014533338136970997, -0.01672392338514328, 0.024740731343626976, 0.045652538537979126, 0.0261581689119339, -0.023249659687280655, 0.020120251923799515, 0.03976188972592354, -0.03249061852693558, 0.033631931990385056, -0.03234335035085678, 0.02982141636312008, -0.06129957735538483, 0.019991394132375717, 0.0027957577258348465, -0.08777068555355072, 0.0038887495175004005, -0.04009323939681053, 0.038436491042375565, -0.04848741367459297, 0.0015002749860286713, -0.017046069726347923, -0.002570256358012557, 0.014533338136970997, -0.012802960351109505, -0.006456704810261726, -0.022789452224969864, 0.003766794688999653, 0.03076023980975151, 0.05835425481200218, 0.03182791918516159, 0.01621769554913044, -0.023820316419005394, 0.001492221374064684, 0.008472411893308163, 0.0060609267093241215, 0.04653613641858101, -0.0288089606910944, -0.04480575770139694, 0.03876784071326256, 0.007611824665218592, -0.09123144298791885, -0.05375218391418457, -0.057176124304533005, 0.03444189578294754, 0.0628458708524704, 0.017644338309764862, -0.04215496405959129, 0.06660116463899612, -0.004956429824233055, 0.06376628577709198, 0.07385402917861938, 0.008564453572034836, -0.00509909400716424, -0.006626981310546398, -0.0417499840259552, -0.0013886747183278203, -0.028017405420541763, 0.04123455286026001, -0.02306557632982731, -0.06354539096355438, -0.007211444433778524, 0.01875803992152214, -0.08202730119228363, -0.04138181731104851, -0.048303332179784775, 0.045100290328264236, 0.04289129748940468, 0.030668197199702263, -0.017938870936632156, 0.03817877545952797, 0.03512300178408623, -0.04230223223567009, -0.006571756675839424, 0.006723625119775534, -0.03503096103668213, 0.03087068907916546, 0.01780080795288086, 0.04498983919620514, 0.027833322063088417, -0.011394726112484932, 0.02030433528125286, -0.020083434879779816, -0.00003185495734214783, -0.003978489898145199, -0.02823830395936966, 0.03324535861611366, -0.03018958307802677, -0.012351957149803638, 0.019218245521187782, 0.001492221374064684, 0.01380621176213026, 0.008803760632872581, 0.005568505264818668, -0.06383991986513138, -0.01978890225291252, 0.01620849221944809, 0.07643118500709534, 0.044584859162569046, 0.03803151100873947, -0.024409381672739983, -0.03398168832063675, -0.009876043535768986, 0.06207272782921791, 0.06048961356282234, 0.03810514509677887, -0.006751237437129021, 0.04609433934092522, 0.024409381672739983, -0.0027267266996204853, 0.020690908655524254, -0.0038703412283211946, -0.0010809112573042512, 0.03339262306690216, 0.026397475972771645, -0.0002732479479163885, -0.024170074611902237, 0.008500023745000362, 0.01980731077492237, -0.044695306569337845, -0.01674233190715313, -0.053089484572410583, -0.02971096709370613, -0.007082586642354727, 0.0006805311422795057, 0.04911329597234726, 0.004376568831503391, 0.005177329294383526, -0.023176027461886406, 0.002908508526161313, -0.0010889648692682385, 0.0012943323235958815, 0.0007547395653091371, 0.04929737746715546, -0.018702814355492592, 0.03460757061839104, 0.021059075370430946, -0.02043319307267666, -0.0004455379385035485, 0.006102345418184996, -0.029029861092567444, 0.019070979207754135, -0.049334194511175156, -0.011670851148664951, 0.03503096103668213, 0.04024050384759903, 0.02142724022269249, -0.06199909374117851, 0.0022400578018277884, 0.01721174269914627, 0.04495302587747574, -0.054562147706747055, -0.014432093128561974, -0.08946424722671509, -0.062514528632164, -0.002211294835433364, 0.015232853591442108, 0.08099643886089325, -0.026894500479102135, -0.046646587550640106, -0.06001099944114685, -0.010566353797912598, -0.03298763930797577, -0.006723625119775534, -0.05021779239177704, 0.09196777641773224, 0.008932618424296379, 0.021187933161854744, 0.010069330222904682, 0.0182518120855093, -0.016880394890904427, 0.04278084635734558, -0.05069640651345253, -0.021022258326411247, -0.008978639729321003, 0.01411915197968483, -0.04237586632370949, -0.05010734498500824, -0.02137201465666294, 0.00787414237856865, 0.023433743044734, 0.006360061466693878, -0.00430063484236598, -0.033226948231458664, -0.007515180855989456, 0.01993616856634617, -0.04068230465054512, 0.039909154176712036, 0.029011452570557594, 0.008311339654028416, -0.02196107991039753, -0.0314045287668705, -0.0209670327603817, -0.02196107991039753, 0.05180090665817261, -0.021187933161854744, 0.002397678792476654, 0.034718018025159836, 0.010649191215634346, 0.030392073094844818, -0.03602500632405281, -0.0418236181139946, 0.0287169199436903, 0.0261581689119339, -0.009066078811883926, -0.0416763499379158, -0.04292811453342438, -0.06641708314418793, -0.040940020233392715, 0.0006649991846643388, -0.04013005271553993, 0.025716369971632957, 0.015426140278577805, 0.040535036474466324, 0.02459346503019333, -0.0003603996301535517, -0.1357794851064682, -0.02709699049592018, 0.03234335035085678, 0.022163571789860725, -0.01204822026193142, 0.01515001617372036, -0.01665029115974903, 0.02288149483501911, -0.010860886424779892, -0.023783499374985695, 0.05375218391418457, -0.06932558864355087, -0.027428340166807175, -0.008118052035570145, 0.02567955292761326, -0.08762342482805252, 0.06707978248596191, 0.004296032711863518, -0.06343493610620499, 0.03195677697658539, 0.03247220814228058, 0.017331397160887718, 0.027557197958230972, -0.00481376564130187, 0.003304286627098918, 0.01619008369743824, -0.0026208790950477123, -0.027391523122787476, -0.01567465253174305, 0.0417499840259552, -0.009728777222335339, 0.001486468710936606, 0.07451672852039337, 0.02661837637424469, -0.011109397746622562, -0.07142413407564163, 0.034681204706430435, -0.020193886011838913, -0.06159410998225212, -0.01989935338497162, 0.010897702537477016, 0.02402280829846859, -0.008407982997596264, -0.007818917743861675, 0.006406082306057215, -0.021832222118973732, -0.04760381579399109, -0.035785701125860214, -0.005398228764533997, -0.006870891433209181, 0.04605752229690552, 0.006861687172204256, -0.040940020233392715, -0.005499474238604307, -0.01361292414367199, 0.011265868321061134, -0.03718473017215729, 0.023249659687280655, 0.006268019787967205, -0.0030258612241595984, -0.023654641583561897, 0.004818367771804333, -0.007386323064565659, -0.024887997657060623, 0.01329998392611742, 0.028440795838832855, -0.0038381267804652452, -0.012628081254661083, 0.017018456012010574, 0.009922063909471035, 0.053015850484371185, 0.004629682749509811, 0.025882044807076454, -0.05702885612845421, -0.0313861221075058, -0.014800258912146091, 0.003449251875281334, 0.029379617422819138, -0.02503526397049427, -0.0011200289009138942, -0.0030603769700974226, -0.062514528632164, -0.09314590692520142, -0.005034665111452341, -0.018491119146347046, -0.045210741460323334, -0.034184180200099945, -0.0734858587384224, -0.019126204773783684, -0.04815606400370598, -0.029618926346302032, -0.007004351355135441, -0.011459155939519405, -0.004464008379727602, -0.07672572135925293, 0.010262616910040379, -0.027925362810492516, -0.00744154816493392, 0.03703746199607849, 0.08254273235797882, -0.011937770992517471, 0.073117695748806, -0.007644039113074541, 0.03799469396471977, -0.017625929787755013, -0.10154008120298386, 0.04340672865509987, 0.01873042620718479, -0.029140310361981392, -0.011891749687492847, -0.005554698873311281, 0.049886442720890045, -0.02242128737270832, 0.00937441736459732, -0.047751083970069885, 0.06306677311658859, 0.012996247038245201, 0.027281073853373528, 0.011173826642334461, 0.0025863635819405317, 0.06586483120918274, -0.08430992811918259, 0.05367854982614517, -0.027557197958230972, -0.031551796942949295, -0.030612973496317863, -0.006507327780127525, 0.0021641235798597336, 0.012425590306520462, -0.0013541592052206397, -0.044032610952854156, 0.06115231290459633, -0.006383071653544903, -0.0287169199436903, -0.025716369971632957, -0.012996247038245201, 0.021059075370430946, 0.02306557632982731, 0.016346555203199387, -0.00888659805059433, -0.05257405340671539, 0.0052003394812345505, 0.05967964977025986, 0.0625513419508934, -0.002618578029796481, 0.005881445948034525, -0.007984592579305172, -0.02288149483501911, 0.0014001799281686544, -0.05054914206266403, -0.02764923870563507, 0.006217397283762693, 0.022200388833880424, -0.04381171241402626, -0.012361161410808563, 0.03462597727775574, 0.0028325743041932583, 0.009461856447160244, 0.016493819653987885, -0.016263717785477638, 0.014284826815128326, 0.06314040720462799, 0.008173277601599693, 0.033208541572093964, 0.028514428064227104, -0.03495732694864273, -0.050843674689531326, 0.027446748688817024, -0.008118052035570145, 0.008674902841448784, -0.0005254989373497665, -0.07006192207336426, -0.016972435638308525, 0.04800879955291748, -0.03243539109826088, 0.008371165953576565, -0.004443299025297165, 0.05883286893367767, -0.015610222704708576, 0.024427790194749832, 0.03720313683152199, 0.037810612469911575, 0.02411484904587269, -0.08033373951911926, -0.04918693006038666, 0.0035136807709932327, 0.0017131207277998328, -0.00994967669248581, 0.0036977636627852917, -0.022218795493245125, -0.02142724022269249, 0.008978639729321003, 0.027317890897393227, -0.0261581689119339, -0.017487868666648865, 0.024832772091031075, 0.03497573733329773, 0.026728825643658638, 0.02671041712164879, 0.03865739330649376, -0.019070979207754135, 0.034184180200099945, 0.03979870676994324, -0.018905306234955788, -0.024170074611902237, -0.004440998192876577, 0.0888751819729805, 0.005149716977030039, 0.019623229280114174, -0.007151617668569088, 0.038988739252090454, -0.04966554418206215, -0.04281766340136528, -0.03079705499112606, -0.02199789695441723, 0.0033940270077437162, -0.02444619871675968, 0.02457505650818348, 0.07245499640703201, 0.012480814941227436, 0.02409644052386284, 0.04915011301636696, 0.0019616326317191124, -0.041492268443107605, 0.03596978262066841, 0.03909919038414955, -0.010897702537477016, 0.006585563067346811, 0.029968682676553726, -0.00280266092158854, -0.04605752229690552, 0.0035136807709932327, 0.0009468760108575225, -0.03197518736124039, 0.006889299489557743, -0.006797258276492357, 0.014459704980254173, 0.01729458011686802, -0.001854634378105402, 0.018923712894320488, -0.06008463352918625, -0.017322193831205368, 0.025421837344765663, -0.012876593507826328, -0.011532788164913654, 0.020506825298070908, -0.04244949668645859, -0.0367429293692112, -0.01566544733941555, 0.011551196686923504, -0.010860886424779892, -0.00804902147501707, -0.042081333696842194, -0.03232494369149208, 0.01676074042916298, 0.021519280970096588, 0.011275072582066059, 0.04800879955291748, -0.01819658651947975, -0.01665029115974903, -0.002108898712322116, 0.017625929787755013, -0.04211815074086189, 0.010952928103506565, -0.02247651293873787, -0.014155969023704529, 0.014717421494424343, 0.044584859162569046, -0.0043328492902219296, -0.058722417801618576, 0.024869589135050774, -0.007409333251416683, 0.01986253634095192, 0.0090936915948987, 0.06615936756134033, -0.006898503750562668, -0.006746635306626558, 0.003578109899535775, -0.02498003840446472, -0.002358561148867011, 0.036558847874403, -0.03869421035051346, 0.03858375921845436, 0.008467809297144413, 0.05448851361870766, -0.005361412186175585, 0.05632934346795082, 0.0023505075369030237, 0.013051471672952175, 0.003536691190674901, -0.050328243523836136, 0.020267518237233162, 0.01354849524796009, -0.03191995993256569, 0.07598938792943954, 0.004514631349593401, -0.0005076659144833684, -0.01539852749556303, 0.13379138708114624, -0.0008047870942391455, 0.03282196819782257, -0.05791245400905609, -0.041050467640161514, -0.052537236362695694, 0.038326043635606766, -0.05953238531947136, -0.005830823443830013, -0.010087738744914532, -0.03604341670870781, 0.026544742286205292, 0.027796505019068718, 0.0313677117228508 ]
715,972
pytorch_optimizer.optimizer.shampoo_utils
BlockPartitioner
Partition a tensor into smaller tensors for preconditioning. For example, if a variable has shape (4096, 512), we might split the 4096 into 4 blocks, so we effectively have 4 variables of size (1024, 512) each. :param var: torch.Tensor. tensor variable. :param rank: int. rank. :param block_size: int. block size. :param pre_conditioner_type: int type of pre-conditioner.
class BlockPartitioner: r"""Partition a tensor into smaller tensors for preconditioning. For example, if a variable has shape (4096, 512), we might split the 4096 into 4 blocks, so we effectively have 4 variables of size (1024, 512) each. :param var: torch.Tensor. tensor variable. :param rank: int. rank. :param block_size: int. block size. :param pre_conditioner_type: int type of pre-conditioner. """ def __init__(self, var: torch.Tensor, rank: int, block_size: int, pre_conditioner_type: int): self.shape: List[int] = var.shape self.splits: List[Tuple[int, np.ndarray]] = [] self.split_sizes: List[Tuple[int, np.ndarray]] = [] split_sizes: List[np.ndarray] = [] # We split var into smaller blocks. Here we store the metadata to make that split. for i, d in enumerate(self.shape): if block_size <= 0 or block_size >= d: split_sizes.append(np.array([d], dtype=np.int32)) continue # d - 1, otherwise split appends a 0-size array. num_split: int = (d - 1) // block_size indices = (np.arange(num_split, dtype=np.int32) + 1) * block_size sizes: np.ndarray = np.ones(num_split + 1, dtype=np.int32) * block_size sizes[-1] = d - indices[-1] self.splits.append((i, indices)) self.split_sizes.append((i, sizes)) split_sizes.append(sizes) self.num_splits: int = len(split_sizes) self.pre_conditioner_shapes: List[List[int]] = self.build_pre_conditioner_shapes( split_sizes, pre_conditioner_type, rank ) @staticmethod def build_pre_conditioner_shapes( split_sizes: List[np.ndarray], pre_conditioner_type: int, rank: int ) -> List[List[int]]: r"""Build pre-conditioner shapes.""" pre_conditioner_shapes: List[List[int]] = [] for t in itertools.product(*split_sizes): t_shape: List[Optional[List[int]]] = [[d, d] for d in t] if pre_conditioner_type == PreConditionerType.INPUT: t_shape = t_shape[:-1] + [None] if pre_conditioner_type == PreConditionerType.OUTPUT: t_shape = [None] * (rank - 1) + t_shape[-1:] pre_conditioner_shapes.extend(t_shape) return pre_conditioner_shapes def shapes_for_pre_conditioners(self) -> List[List[int]]: r"""Get shapes of pre-conditioner.""" return self.pre_conditioner_shapes @torch.no_grad() def partition(self, x: torch.Tensor) -> List[torch.Tensor]: r"""Partition tensor into blocks.""" if x.shape != self.shape: raise ValueError(f'self.shape != x.shape ({self.shape} vs {x.shape})') tensors = [x] for i, sizes in self.split_sizes: tensors = [torch.split(t, list(sizes), dim=i) for t in tensors] tensors = [t for tensor in tensors for t in tensor] return tensors def merge_partitions(self, partitions: List[torch.Tensor]) -> torch.Tensor: r"""Merge partitions back to original shape.""" for i, indices in reversed(self.splits): n: int = len(indices) + 1 partitions: List[torch.Tensor] = [ torch.cat(partitions[idx:idx + n], dim=i) for idx in range(0, len(partitions), n) # fmt: skip ] return partitions[0]
(var: torch.Tensor, rank: int, block_size: int, pre_conditioner_type: int)
[ -0.009682194329798222, -0.01599961891770363, -0.07505276054143906, -0.0037380929570645094, 0.048677630722522736, 0.00007268766785273328, -0.013226351700723171, 0.003432645695284009, -0.05705561116337776, -0.0075101242400705814, 0.024261241778731346, -0.001842380384914577, -0.027461165562272072, 0.006142884027212858, -0.025250308215618134, 0.011141553521156311, 0.03048654831945896, -0.010831257328391075, 0.02212795801460743, -0.014913585036993027, -0.012877269648015499, -0.03316284716129303, 0.004642313811928034, 0.02078980766236782, 0.003056897083297372, 0.04507044330239296, 0.040338434278964996, -0.019112272188067436, -0.022244319319725037, 0.0008224046905525029, -0.009977944195270538, 0.03422948718070984, -0.0007557395729236305, 0.02086738310754299, 0.005153816659003496, -0.012062743306159973, 0.033337388187646866, 0.07578971236944199, -0.04600133001804352, 0.03969844803214073, 0.0044677723199129105, -0.04972487688064575, 0.005478657782077789, -0.03417130932211876, -0.006239851471036673, 0.050229109823703766, 0.026452703401446342, -0.005158665124326944, -0.007699210662394762, 0.010453084483742714, 0.04828976094722748, -0.06415362656116486, 0.04693221673369408, 0.000561501772608608, -0.06372696906328201, 0.0022872183471918106, 0.06461907178163528, -0.03665367513895035, -0.0378754623234272, 0.00039150583324953914, 0.033007699996232986, 0.006104097235947847, 0.023504896089434624, 0.008072535507380962, -0.03040897287428379, -0.022787336260080338, -0.0324258953332901, -0.0005430174060165882, -0.0378754623234272, 0.007961022667586803, -0.011897899210453033, -0.01981043815612793, 0.029439300298690796, 0.017318375408649445, -0.002218129113316536, -0.01577659510076046, -0.001467843889258802, -0.00938644353300333, 0.08758094906806946, -0.04828976094722748, 0.03438463807106018, 0.022690368816256523, -0.02717026323080063, -0.03713851049542427, 0.03839908540248871, -0.03991177678108215, 0.021681908518075943, 0.04452742636203766, 0.010918527841567993, -0.06081794574856758, -0.029245365411043167, 0.06997166574001312, 0.0416959784924984, 0.026394523680210114, 0.023175206035375595, 0.030641695484519005, -0.0035465823020786047, -0.07090255618095398, -0.015146306715905666, -0.03149500861763954, -0.0067101432941854, 0.03203802555799484, 0.0027223594952374697, -0.006768323946744204, 0.007345279678702354, 0.00739861186593771, -0.039252400398254395, 0.026006653904914856, -0.044217128306627274, -0.05899496003985405, -0.017977753654122353, -0.02449396252632141, -0.09014088660478592, 0.036556705832481384, 0.007568304892629385, -0.019529232755303383, -0.02362125553190708, 0.006938016973435879, -0.02294248528778553, 0.00832465011626482, 0.018840763717889786, -0.0029550811741501093, -0.06070158630609512, 0.020770415663719177, -0.05275025963783264, -0.018928034231066704, 0.06558874249458313, 0.0422389954328537, -0.033667076379060745, -0.05534898489713669, -0.024610323831439018, -0.007476185914129019, -0.0534096397459507, 0.009308869019150734, -0.02980777621269226, -0.008222835138440132, -0.026685426011681557, 0.020285578444600105, 0.018520772457122803, -0.03302709385752678, 0.031378649175167084, -0.036420952528715134, -0.008295560255646706, -0.0020484360866248608, 0.0017442009411752224, -0.03258104249835014, 0.0784660130739212, -0.06520087271928787, 0.04138568043708801, 0.001974498387426138, -0.0219340231269598, 0.03853484243154526, 0.04763038083910942, -0.047940678894519806, -0.006874987855553627, 0.016532940790057182, -0.04448863863945007, -0.04627284035086632, 0.030447760596871376, -0.0006993773276917636, -0.05790892615914345, -0.03395798057317734, -0.01855955831706524, 0.02046011947095394, -0.015989921987056732, 0.0200334619730711, 0.005444718990474939, -0.05581443011760712, -0.04514801874756813, 0.004060509614646435, 0.07734119147062302, -0.02400912530720234, -0.016930505633354187, 0.013177867978811264, -0.04390683397650719, 0.021022530272603035, 0.013313623145222664, -0.020363152027130127, -0.04123053327202797, -0.034016162157058716, 0.036149442195892334, -0.02144918590784073, -0.015107518993318081, -0.0134881641715765, -0.03510219603776932, 0.015757201239466667, 0.04743644595146179, -0.028644166886806488, 0.0523236021399498, 0.03005989082157612, -0.07734119147062302, -0.026685426011681557, -0.019713470712304115, 0.033201634883880615, 0.0035417338367551565, 0.035955507308244705, 0.025036979466676712, 0.014419050887227058, -0.0034544633235782385, -0.01116094645112753, -0.011965775862336159, 0.003098108107224107, 0.030389580875635147, 0.025851506739854813, -0.018375320360064507, -0.009434927254915237, -0.020944956690073013, 0.039989352226257324, 0.017861394211649895, 0.015611750073730946, -0.08199562877416611, -0.02852780558168888, 0.06143853813409805, 0.09378685802221298, 0.05709439888596535, -0.06368818134069443, -0.015805684030056, 0.03322102874517441, 0.03159197419881821, -0.007321037817746401, 0.049143072217702866, 0.00976946484297514, -0.01536933146417141, 0.04398440942168236, -0.0018520771991461515, -0.0010266422759741545, -0.029749594628810883, -0.05294419452548027, -0.004824127536267042, 0.010569445788860321, -0.01574750430881977, -0.03227074816823006, -0.052633900195360184, -0.009371898137032986, 0.03605247661471367, 0.03547067195177078, -0.01735716313123703, -0.04204506054520607, -0.01618385687470436, 0.013371802866458893, -0.03170833736658096, -0.011587603017687798, 0.011005798354744911, -0.039717841893434525, 0.03283315896987915, -0.0005293813301250339, 0.03436524420976639, 0.029710808768868446, -0.003132046665996313, 0.014147542417049408, -0.07257039844989777, -0.031029565259814262, -0.008494343608617783, -0.019829832017421722, 0.027752067893743515, 0.02530848979949951, 0.03376404568552971, 0.0012066379422321916, 0.010317330248653889, 0.017812909558415413, -0.023427320644259453, -0.03211560100317001, 0.010957315564155579, 0.010627626441419125, 0.01257667038589716, -0.03244528919458389, 0.021100103855133057, 0.07691453397274017, -0.01382755022495985, 0.014787526801228523, 0.0967346653342247, 0.09991519898176193, -0.0038132425397634506, -0.006705294828861952, 0.001424208516255021, -0.004567163996398449, -0.024164274334907532, 0.04064872860908508, 0.017638368532061577, -0.0009811887284740806, 0.04534194990992546, 0.009022816084325314, -0.0667523518204689, -0.011965775862336159, 0.03170833736658096, 0.006957410369068384, -0.0324258953332901, -0.1122494488954544, -0.012460310012102127, 0.011364578269422054, -0.051896948367357254, -0.018375320360064507, 0.026142409071326256, -0.001872682711109519, 0.04037722200155258, -0.03463675081729889, -0.03019564598798752, 0.027887821197509766, 0.0008763427613303065, -0.05275025963783264, 0.030641695484519005, -0.011393668130040169, 0.043480176478624344, 0.03775910288095474, -0.03721608594059944, -0.03308527171611786, 0.007825268432497978, -0.0034520390909165144, -0.004593830090016127, -0.02920657768845558, 0.07125163823366165, 0.009672497399151325, 0.04863884299993515, -0.007321037817746401, 0.08409012109041214, -0.02536666952073574, 0.03874816745519638, 0.02705390192568302, 0.007534366101026535, 0.07544063031673431, 0.021837055683135986, 0.01610628329217434, 0.021914631128311157, 0.12357524037361145, -0.03283315896987915, -0.03054472804069519, 0.02468789741396904, -0.0425105057656765, -0.0967346653342247, 0.03731305152177811, -0.03863180801272392, 0.012053046375513077, 0.012702727690339088, 0.03853484243154526, -0.04111417382955551, 0.00976946484297514, 0.04285958781838417, -0.000501503236591816, 0.028411446139216423, -0.033861011266708374, 0.0708637684583664, -0.0343264564871788, 0.016552332788705826, 0.03182469680905342, -0.02185644954442978, -0.02038254588842392, 0.04716493934392929, 0.014574198983609676, -0.02272915653884411, 0.12078258395195007, 0.022767942398786545, 0.01234394870698452, -0.01194638293236494, 0.015379028394818306, 0.026976328343153, -0.07396672666072845, -0.029904743656516075, -0.026588458567857742, -0.0027950850781053305, 0.03033139929175377, 0.06399847567081451, 0.016038406640291214, 0.053797509521245956, 0.04285958781838417, -0.017008081078529358, -0.0386899895966053, -0.039252400398254395, 0.012150013819336891, -0.013400893658399582, -0.028159329667687416, -0.002198735484853387, -0.04270443692803383, 0.02011103741824627, 0.008184047415852547, 0.018889248371124268, -0.013226351700723171, -0.08354710042476654, 0.024183666333556175, 0.020343758165836334, 0.05193573608994484, 0.04130810871720314, 0.002787812380120158, 0.04390683397650719, -0.007936781272292137, -0.060779161751270294, 0.040997814387083054, 0.01238273549824953, -0.030932597815990448, 0.01929651014506817, -0.003190227085724473, 0.020673448219895363, 0.016096586361527443, 0.016038406640291214, -0.014806920662522316, -0.04487650841474533, 0.03128167986869812, 0.023058844730257988, 0.003490826115012169, -0.008988876827061176, -0.06853654980659485, 0.0020872231107205153, -0.06632569432258606, -0.01571841351687908, 0.04863884299993515, 0.009628862142562866, -0.042006272822618484, 0.051625438034534454, 0.07842722535133362, -0.02367943711578846, 0.016164464876055717, -0.020343758165836334, 0.032600436359643936, 0.04313109442591667, 0.003253255970776081, -0.00912947952747345, -0.017483221367001534, -0.001018157578073442, 0.014341477304697037, 0.033744651824235916, -0.005115029867738485, 0.01981043815612793, 0.0200334619730711, 0.06384333223104477, 0.00248963781632483, -0.04883277788758278, -0.01812320575118065, -0.033608898520469666, 0.028101149946451187, -0.03391919285058975, -0.04460499808192253, -0.0038932408206164837, 0.000014687150724057574, -0.04526437819004059, -0.011742751114070415, -0.02024679072201252, -0.002096919808536768, 0.04064872860908508, 0.049608517438173294, -0.009871280752122402, -0.007413156796246767, 0.06741172820329666, 0.01530145388096571, 0.012188800610601902, -0.015708716586232185, 0.023718222975730896, 0.03422948718070984, -0.044023193418979645, 0.025715751573443413, -0.10177697241306305, 0.01923833042383194, 0.016823843121528625, 0.004038691986352205, 0.04452742636203766, 0.03108774498105049, -0.009497955441474915, 0.011170643381774426, -0.010540354996919632, -0.03073866292834282, -0.038379691541194916, -0.023446714505553246, 0.05589200556278229, 0.05255632475018501, -0.03657609969377518, 0.023117026314139366, 0.01073428988456726, 0.016445670276880264, 0.007485882379114628, -0.02435820922255516, 0.02166251465678215, 0.014302690513432026, 0.018346229568123817, -0.003907785750925541, -0.010821560397744179, 0.023291567340493202, -0.018617738038301468, 0.018433500081300735, 0.024610323831439018, 0.0088579710572958, -0.03364768624305725, -0.010065214708447456, 0.004795037675648928, -0.0023490351159125566, -0.05387508124113083, -0.006642266176640987, 0.011897899210453033, -0.024784864857792854, -0.02839205227792263, 0.07039832323789597, -0.005144120194017887, 0.005415628664195538, -0.054728396236896515, -0.014816617593169212, 0.043363817036151886, 0.03927179425954819, -0.0020181338768452406, 0.022011596709489822, -0.003747789654880762, 0.016911113634705544, 0.10782773792743683, -0.06442513316869736, 0.023291567340493202, 0.053642358630895615, -0.010453084483742714, -0.028566593304276466, 0.024978799745440483, 0.00866403616964817, 0.04095902666449547, 0.022787336260080338, -0.03921361267566681, -0.008251924999058247, -0.007912538945674896, -0.03496644273400307, -0.02158494107425213, -0.01502994541078806, -0.011461545713245869, 0.01923833042383194, 0.005851982161402702, 0.03995056450366974, 0.0057792565785348415, -0.024106092751026154, 0.04452742636203766, 0.011645783670246601, 0.009410684928297997, -0.009333111345767975, -0.01915105991065502, 0.04297594726085663, -0.007534366101026535, -0.05934404209256172, 0.03442342206835747, 0.015252970159053802, -0.049880024045705795, -0.004397470969706774, 0.00896463543176651, 0.06655841320753098, 0.01869531348347664, 0.03159197419881821, -0.015359634533524513, 0.04014449939131737, 0.02300066500902176, -0.011636086739599705, -0.002799933310598135, 0.04697100445628166, 0.042626865208148956, -0.015708716586232185, -0.025347275659441948, 0.05247875303030014, 0.043014734983444214, 0.025133946910500526, -0.07187222689390182, 0.007330734748393297, 0.005531989503651857, -0.007466488983482122, 0.0043029277585446835, -0.03199923783540726, 0.0561247244477272, -0.05011274665594101, -0.004399895202368498, -0.06015856936573982, 0.02106131799519062, 0.03194105997681618, 0.01940317451953888, 0.03578096628189087, 0.023718222975730896, -0.03190227225422859, 0.021817663684487343, -0.014147542417049408, -0.011907595209777355, -0.03746819868683815, -0.00820344127714634, 0.011849415488541126, 0.0386899895966053, 0.03987298905849457, 0.02455214411020279, 0.018569255247712135, -0.0012205770472064614, -0.006167125888168812, -0.024843044579029083, -0.019277116283774376, -0.0730358362197876, -0.036362770944833755, -0.00486291479319334, -0.027344804257154465, 0.01460328884422779, -0.02718965709209442, -0.020227396860718727, -0.017211711034178734, -0.053913868963718414, 0.009977944195270538, 0.006113794166594744, 0.07695332169532776, 0.014535412192344666, 0.06120581552386284, 0.004390198737382889, 0.00866403616964817, 0.021953416988253593, -0.01967468298971653, -0.012586367316544056, -0.019858920946717262, -0.031456220895051956, -0.022632189095020294, -0.014157239347696304, -0.023504896089434624, 0.0026859967038035393, 0.07641030102968216, 0.033007699996232986, -0.1073622927069664, -0.02482365258038044, 0.04476014897227287, 0.045109231024980545, -0.05907253548502922, -0.008862819522619247, 0.02757752500474453, 0.011781537905335426, -0.03927179425954819, -0.038922712206840515, -0.03748759254813194, -0.04937579482793808, -0.02474607713520527, 0.103561170399189, -0.030292613431811333, -0.015049339272081852, 0.023252779617905617, 0.017560794949531555, -0.01934499479830265, 0.0032193174120038748, -0.01524327415972948, 0.01776442676782608, -0.13575434684753418, 0.017473524436354637, -0.06287365406751633, 0.010937921702861786, 0.0012533034896478057, 0.061128243803977966, -0.014322083443403244, 0.015262667089700699, -0.020208004862070084, 0.03221256658434868, -0.02160433493554592, 0.012470006011426449, -0.07997870445251465, 0.022826123982667923, -0.02065405435860157, 0.019383780658245087, -0.01268333476036787, -0.00017045049753505737, -0.10061336308717728, 0.024183666333556175, 0.011180340312421322, 0.06613176316022873, 0.04801825061440468, -0.05616351217031479, 0.05209088325500488, -0.020692840218544006, -0.0422389954328537, -0.00628833519294858, 0.052711471915245056, 0.023601863533258438, -0.010782773606479168, -0.0002162069722544402, -0.008402224630117416, 0.018404411152005196, -0.010937921702861786, -0.04285958781838417, 0.04177355021238327, -0.008402224630117416, -0.01204334944486618, 0.012838482856750488, 0.0011127007892355323, -0.017027473077178, 0.02158494107425213, -0.03936875984072685, -0.009323414415121078, -0.03325981646776199, -0.050345469266176224, 0.03409373387694359, -0.04452742636203766, -0.022186139598488808, -0.04433349147439003, -0.05112120881676674, -0.016911113634705544, 0.04204506054520607, -0.011636086739599705, -0.0128093920648098, 0.01137427520006895, 0.03479189798235893, 0.013730582781136036, -0.06523966044187546, -0.03203802555799484, -0.05496111512184143, -0.02334974706172943, 0.04324745759367943, 0.05073333904147148, 0.050423044711351395, -0.022574009373784065, -0.07641030102968216, -0.011859111487865448, 0.01629052124917507, -0.001215122640132904, -0.014273599721491337, -0.01399239432066679, -0.005100484937429428, -0.06927350163459778, -0.09270082414150238, -0.010676109232008457, -0.06279607862234116, 0.04177355021238327, -0.0629512295126915, 0.008407073095440865, 0.004574436694383621, 0.006167125888168812, 0.03564521297812462, 0.012188800610601902, 0.03054472804069519, -0.07633273303508759, -0.010026427917182446, 0.01395360752940178, 0.010511265136301517, 0.03081623651087284, 0.01782260648906231, 0.03799182176589966, -0.02389276586472988, 0.032716795802116394, 0.05918889492750168, 0.015000855550169945, -0.07513033598661423, -0.0026763000059872866, 0.0823059231042862, -0.04588497057557106, -0.009977944195270538, -0.01486510131508112, 0.053991444408893585, 0.06000342220067978, -0.026627246290445328, -0.022632189095020294, 0.061981555074453354, -0.031921666115522385, 0.04507044330239296, -0.03149500861763954, -0.03502462059259415, 0.04817339777946472, 0.04464378580451012, -0.04340260475873947, -0.0416959784924984, -0.04212263599038124, -0.020149823278188705, 0.028101149946451187, 0.002533273072913289, 0.0029478087089955807, 0.02051829919219017, 0.0027247837278991938, 0.006816807668656111, -0.03199923783540726, -0.03159197419881821, -0.04972487688064575, 0.0064386348240077496, -0.04212263599038124, 0.03847666084766388, -0.0558532178401947, -0.0781945064663887, -0.0861070454120636, -0.019054092466831207, -0.03329860046505928, 0.02381519041955471, 0.035296130925416946, -0.005289571359753609, -0.004775643814355135, 0.04092023894190788, 0.013226351700723171 ]
715,973
pytorch_optimizer.optimizer.shampoo_utils
__init__
null
def __init__(self, var: torch.Tensor, rank: int, block_size: int, pre_conditioner_type: int): self.shape: List[int] = var.shape self.splits: List[Tuple[int, np.ndarray]] = [] self.split_sizes: List[Tuple[int, np.ndarray]] = [] split_sizes: List[np.ndarray] = [] # We split var into smaller blocks. Here we store the metadata to make that split. for i, d in enumerate(self.shape): if block_size <= 0 or block_size >= d: split_sizes.append(np.array([d], dtype=np.int32)) continue # d - 1, otherwise split appends a 0-size array. num_split: int = (d - 1) // block_size indices = (np.arange(num_split, dtype=np.int32) + 1) * block_size sizes: np.ndarray = np.ones(num_split + 1, dtype=np.int32) * block_size sizes[-1] = d - indices[-1] self.splits.append((i, indices)) self.split_sizes.append((i, sizes)) split_sizes.append(sizes) self.num_splits: int = len(split_sizes) self.pre_conditioner_shapes: List[List[int]] = self.build_pre_conditioner_shapes( split_sizes, pre_conditioner_type, rank )
(self, var: torch.Tensor, rank: int, block_size: int, pre_conditioner_type: int)
[ -0.006887178402394056, 0.017226984724402428, -0.04877062141895294, 0.003240227699279785, 0.05010829120874405, 0.012319191358983517, -0.03181478753685951, 0.009924044832587242, -0.05133749917149544, -0.007845236919820309, 0.004177950322628021, 0.04595067724585533, -0.03170632943511009, -0.009426938369870186, -0.03421897441148758, 0.04388994351029396, 0.00656179990619421, -0.013250135816633701, -0.004894235171377659, 0.00914223212748766, -0.015762781724333763, -0.005287400912493467, -0.036858152598142624, 0.029555214568972588, 0.030404813587665558, 0.03994924947619438, 0.0011405195109546185, -0.02597605064511299, 0.015473555773496628, 0.004984618164598942, -0.037056997418403625, 0.028723690658807755, -0.020065007731318474, 0.05441051721572876, 0.023951472714543343, -0.03922618553042412, 0.014651071280241013, 0.05249439924955368, -0.08112771064043045, 0.02736794762313366, 0.01828446425497532, -0.06641336530447006, 0.0012382459826767445, 0.011189404875040054, -0.028561001643538475, 0.00983366183936596, 0.05849582329392433, -0.05600125715136528, -0.003649210324510932, -0.00839657336473465, 0.024837225675582886, -0.037743907421827316, 0.05918273329734802, -0.0021714495960623026, -0.06435263901948929, 0.02783793956041336, 0.07245095074176788, 0.02715102955698967, -0.037852365523576736, 0.020480768755078316, -0.00593815790489316, 0.02331879362463951, 0.006936889141798019, -0.004214103799313307, -0.013476093299686909, -0.024638382717967033, -0.037743907421827316, 0.00668381666764617, -0.009042810648679733, -0.015030679292976856, 0.001182886422611773, 0.011749779805541039, 0.04992752522230148, 0.04692681133747101, 0.027982551604509354, -0.007411399390548468, -0.030043281614780426, -0.04548068344593048, 0.07440321892499924, -0.032122090458869934, 0.021655747666954994, 0.03532164543867111, -0.0358097106218338, -0.008495993912220001, -0.00007216510857688263, -0.05679662525653839, 0.01091825682669878, 0.02199920266866684, 0.030007129535079002, -0.026319505646824837, -0.0590742751955986, 0.05827890709042549, 0.013801471330225468, 0.02857907861471176, -0.007528896909207106, 0.04887908324599266, 0.044613007456064224, -0.07982619106769562, -0.006968522910028696, -0.02810908854007721, -0.011071907356381416, 0.014858951792120934, -0.004736064933240414, 0.011297864839434624, -0.014994526281952858, 0.03651469945907593, -0.015645282343029976, 0.01524759829044342, -0.054808203130960464, -0.04128691554069519, -0.002064119791612029, -0.005025290418416262, -0.08401995897293091, 0.06684720516204834, -0.020896531641483307, -0.03474319353699684, -0.002993934089317918, -0.016856415197253227, -0.02301149070262909, 0.013702050782740116, 0.03098326362669468, -0.01195766031742096, -0.06728104501962662, 0.04714373126626015, -0.06088193506002426, 0.0062093064188957214, 0.05441051721572876, 0.009761354885995388, -0.022812647745013237, -0.032230548560619354, -0.008523109368979931, -0.04660143330693245, -0.04895138740539551, 0.011261711828410625, -0.016657572239637375, -0.005160864442586899, -0.01816696673631668, 0.007384284399449825, -0.011623242869973183, -0.005870370659977198, 0.042696889489889145, 0.004257035441696644, -0.016377385705709457, -0.019414251670241356, -0.015509708784520626, -0.013177829794585705, 0.052892085164785385, -0.05965272709727287, 0.016919681802392006, -0.03734622150659561, -0.030224047601222992, 0.006444301921874285, 0.0179048553109169, -0.0043203034438192844, -0.008893678896129131, 0.008758104406297207, -0.02783793956041336, -0.0822846069931984, 0.05383206531405449, -0.00447847368195653, -0.05542280524969101, -0.004575635306537151, -0.02975405752658844, -0.005002694670110941, -0.008215807378292084, 0.014018390327692032, -0.0013772096717730165, -0.07411399483680725, -0.06196652725338936, 0.0048671201802790165, 0.05025290325284004, -0.052892085164785385, 0.0008925313013605773, 0.056182023137807846, -0.062147293239831924, 0.016033928841352463, 0.010827873833477497, -0.017651783302426338, -0.05325361713767052, -0.02827177755534649, 0.027295641601085663, -0.00839657336473465, 0.001085159950889647, -0.016910644248127937, -0.03611701354384422, 0.01468722429126501, 0.04931291937828064, -0.0227945726364851, 0.06435263901948929, 0.02673526667058468, -0.0511205792427063, -0.004406167194247246, -0.029934823513031006, 0.0019138583447784185, 0.015139139257371426, 0.011758817359805107, 0.03778006136417389, 0.008608972653746605, -0.03197747841477394, -0.015048756264150143, -0.011334017850458622, 0.016937758773565292, 0.00015831133350729942, 0.0015873500378802419, -0.032284777611494064, 0.03147133067250252, -0.02386108972132206, 0.08937063068151474, 0.0039700698107481, -0.0074520716443657875, -0.061821915209293365, -0.02662680856883526, 0.08300767093896866, 0.09247980266809464, 0.048698317259550095, -0.08141693472862244, -0.04388994351029396, 0.04446839541196823, 0.036731619387865067, 0.0050659626722335815, 0.08242922276258469, -0.014886066317558289, -0.05824275314807892, 0.02969982661306858, -0.0205711517482996, 0.006055655423551798, -0.037002768367528915, -0.03810543939471245, -0.016829298809170723, 0.016142388805747032, -0.031326718628406525, -0.015283751301467419, -0.04728834331035614, -0.03309822455048561, 0.015826048329472542, 0.06225575506687164, -0.002673074835911393, -0.011053831316530704, -0.02789216861128807, -0.00350007857196033, -0.02720525860786438, -0.020896531641483307, 0.018194081261754036, -0.01934194378554821, 0.030350584536790848, -0.0012495438568294048, 0.020336156710982323, 0.03678584843873978, -0.010791720822453499, 0.004794813692569733, -0.07490935921669006, -0.009214538149535656, -0.02783793956041336, 0.017082370817661285, 0.04150383546948433, 0.023354945704340935, 0.03523126244544983, 0.0011817566119134426, 0.01785966381430626, -0.016223734244704247, -0.021384598687291145, -0.048372939229011536, 0.04472146928310394, 0.006381033919751644, -0.011352094821631908, -0.018926182761788368, 0.0046682776883244514, 0.06522031128406525, -0.0009010047069750726, 0.001033189706504345, 0.06800410896539688, 0.10079503059387207, -0.004277371801435947, -0.02060730569064617, 0.0031001341994851828, -0.011632281355559826, -0.023788783699274063, 0.01368397381156683, 0.007967254146933556, 0.018908105790615082, 0.04732449725270271, 0.0020019817166030407, -0.04566144943237305, 0.009716163389384747, 0.02868753857910633, 0.011108060367405415, -0.01839292421936989, -0.06283420324325562, -0.0036220955662429333, -0.0038412739522755146, -0.057845067232847214, 0.006096327677369118, 0.03868388757109642, 0.01768793724477291, 0.016820261254906654, -0.04511915147304535, -0.027657173573970795, 0.08749066293239594, -0.00604209816083312, -0.043383799493312836, 0.018194081261754036, -0.0526028573513031, 0.026211045682430267, 0.026120662689208984, -0.043853793293237686, -0.012798220850527287, 0.0028357640840113163, -0.00026295779389329255, 0.009625780396163464, -0.01731736771762371, 0.09052753448486328, 0.05520588532090187, 0.05303669720888138, 0.008699355646967888, 0.08018772304058075, 0.028398312628269196, 0.021637670695781708, -0.0328451544046402, 0.0070137144066393375, 0.08083847910165787, 0.015021640807390213, -0.022830724716186523, 0.023409176617860794, 0.0681125670671463, -0.041901521384716034, -0.021601516753435135, 0.015220483765006065, -0.05679662525653839, -0.0656903088092804, 0.0511205792427063, -0.04717988520860672, 0.021493058651685715, 0.0036989208310842514, 0.02257765270769596, -0.03933464735746384, 0.013349557295441628, 0.016232771798968315, 0.009517321363091469, 0.028181394562125206, -0.05093981325626373, 0.0570496991276741, -0.044179171323776245, -0.004135018680244684, 0.04544453322887421, 0.009915006347000599, -0.03741852939128876, 0.03479742258787155, -0.012762067839503288, 0.0028561002109199762, 0.10715799033641815, 0.004758660681545734, 0.02221612073481083, 0.004376792814582586, 0.04255227744579315, 0.0511205792427063, -0.05281977728009224, -0.026120662689208984, -0.03893696144223213, 0.0025081259664148092, 0.006272574421018362, 0.052313633263111115, 0.024204544723033905, 0.060809627175331116, 0.039985403418540955, 0.015744704753160477, -0.04916830733418465, -0.0435645654797554, -0.004089827183634043, 0.009250692091882229, -0.0002468583406880498, -0.007668990641832352, -0.06525646895170212, 0.008699355646967888, 0.0040649715811014175, 0.030151741579174995, -0.03320668265223503, -0.0832245945930481, -0.015301828272640705, 0.023770706728100777, -0.010258461348712444, 0.027639096602797508, 0.017543325200676918, 0.0420822873711586, -0.006381033919751644, -0.06287036091089249, 0.02315610460937023, 0.0098788533359766, 0.01805850677192211, 0.017733128741383553, 0.0111622903496027, 0.02449377067387104, 0.01288860384374857, 0.0277837086468935, -0.04273304343223572, -0.01950463466346264, 0.018420038744807243, 0.004794813692569733, -0.0019127285340800881, 0.00847339816391468, -0.04305842146277428, -0.0325016975402832, -0.08199538290500641, -0.037165455520153046, 0.06637721508741379, -0.000533541664481163, -0.03991309553384781, 0.019685398787260056, 0.06435263901948929, -0.0018923924071714282, 0.002476491965353489, 0.014976449310779572, 0.05046982318162918, 0.03937079757452011, -0.01805850677192211, -0.021981125697493553, -0.005197017919272184, 0.02002885565161705, -0.0027227853424847126, 0.028976764529943466, -0.007537935394793749, 0.0073119779117405415, 0.04143153131008148, 0.0650033950805664, 0.005572107154875994, -0.013078408315777779, 0.02252342365682125, -0.026373734697699547, 0.003922618459910154, -0.03315245360136032, -0.05621817708015442, -0.03564702346920967, 0.02948290854692459, -0.03262823447585106, -0.01832965575158596, 0.011216520331799984, 0.010348844341933727, -0.023987626656889915, 0.025994127616286278, -0.0171637162566185, 0.016567189246416092, 0.0640634149312973, 0.0014416076010093093, 0.012002851814031601, 0.008383016102015972, -0.045625295490026474, 0.016910644248127937, -0.031019417569041252, 0.012581301853060722, -0.10679645836353302, -0.016874490305781364, 0.018022354692220688, 0.02342725172638893, 0.04681835323572159, 0.036749694496393204, 0.0005160299479030073, 0.005608260165899992, -0.07219787687063217, -0.008143501356244087, 0.0018212158465757966, -0.04526376724243164, 0.01605200581252575, 0.04493838548660278, -0.04341995343565941, -0.0028696577064692974, -0.016395460814237595, 0.020426539704203606, 0.04750526323914528, -0.019323868677020073, -0.0011269620154052973, -0.014831837266683578, 0.0016845116624608636, -0.01331340428441763, 0.004121460951864719, 0.01468722429126501, -0.0034774828236550093, 0.012066119350492954, 0.01726313680410385, 0.0013049034168943763, -0.05997810512781143, 0.007330054882913828, 0.0006388942711055279, 0.0011456034844741225, -0.04027462750673294, 0.008509552106261253, -0.005526915658265352, 0.008242921903729439, -0.04649297147989273, 0.059905797243118286, 0.007465628907084465, 0.02476491965353489, -0.057736609131097794, 0.031634021550416946, 0.01368397381156683, 0.06337650120258331, 0.030748268589377403, 0.03890080749988556, 0.027711402624845505, 0.03922618553042412, 0.07093251496553421, -0.06681105494499207, -0.008812334388494492, 0.03559279441833496, -0.04240766540169716, -0.01376531831920147, -0.0059110429137945175, -0.0012224289821460843, 0.01551874727010727, 0.003504597581923008, -0.03400205448269844, -0.01997462473809719, 0.012391498312354088, -0.01556393876671791, -0.03118210658431053, -0.007736777886748314, -0.023463405668735504, 0.017461979761719704, -0.029952898621559143, 0.03900926932692528, -0.05133749917149544, -0.0005713895079679787, 0.035357799381017685, -0.005319034680724144, 0.007488224655389786, -0.011198443360626698, -0.0078000458888709545, 0.037490833550691605, 0.013747242279350758, -0.027187181636691093, 0.06948638707399368, 0.015428364276885986, -0.043853793293237686, -0.03745467960834503, 0.01227400079369545, 0.09038291871547699, 0.041684601455926895, 0.04602298140525818, 0.037165455520153046, 0.030730191618204117, 0.0018878731643781066, -0.01012288685888052, -0.010945371352136135, 0.03300784155726433, 0.010267499834299088, -0.021185755729675293, -0.02152921073138714, 0.04681835323572159, 0.04334764927625656, 0.03038673661649227, -0.0629788190126419, -0.011225558817386627, 0.010023465380072594, -0.0007287123007699847, -0.013250135816633701, -0.01256322581321001, 0.048481397330760956, -0.025524135679006577, -0.01832965575158596, -0.07592165470123291, 0.03537587448954582, 0.03405628353357315, 0.02816331759095192, 0.010547686368227005, 0.042263053357601166, 0.021004989743232727, -0.025271063670516014, -0.0023544749710708857, 0.00418472895398736, -0.03336937353014946, -0.012346306815743446, 0.03027827851474285, 0.05766430124640465, 0.008455322124063969, 0.016702763736248016, 0.0627257451415062, -0.014361845329403877, -0.007167365401983261, -0.0042299204505980015, -0.004749622195959091, -0.04211844131350517, -0.012020927853882313, -0.013566476292908192, -0.03369475156068802, 0.006936889141798019, -0.008116385899484158, -0.03984079137444496, 0.02375263161957264, -0.05245824530720711, 0.03326091542840004, 0.011135175824165344, 0.0461314432322979, 0.01917925477027893, 0.060231175273656845, -0.041250765323638916, 0.004989136941730976, 0.009589627385139465, -0.041250765323638916, -0.009300402365624905, -0.027657173573970795, -0.023282639682292938, 0.013096485286951065, -0.03933464735746384, -0.03606278449296951, -0.018474267795681953, 0.08792450278997421, 0.008699355646967888, -0.13477900624275208, -0.03497818857431412, 0.07787392288446426, 0.023770706728100777, -0.02677142061293125, -0.013259174302220345, -0.0040220399387180805, 0.0245480015873909, -0.020444616675376892, -0.017787357792258263, -0.044504549354314804, -0.06659413129091263, -0.015401249751448631, 0.11547321826219559, -0.03177863359451294, -0.0158802792429924, 0.00448977155610919, 0.010728452354669571, 0.011135175824165344, -0.011460553854703903, -0.03336937353014946, 0.04696296527981758, -0.15097562968730927, 0.0049575031735002995, -0.05780891329050064, 0.029211759567260742, 0.02789216861128807, 0.04862600937485695, -0.02662680856883526, -0.013186867348849773, -0.019432326778769493, 0.03577356040477753, 0.0064081489108502865, 0.029265988618135452, -0.07096866518259048, 0.026554500684142113, -0.037743907421827316, 0.05574818328022957, -0.0033983977045863867, 0.009490206837654114, -0.090093694627285, 0.04764987528324127, 0.003007491584867239, 0.045625295490026474, 0.03861158341169357, -0.03192324563860893, 0.0737886130809784, -0.04515530541539192, -0.011496706865727901, 0.021167678758502007, 0.03548433259129524, 0.030205970630049706, -0.014434152282774448, 0.027548713609576225, -0.00983366183936596, -0.042696889489889145, 0.004528184421360493, -0.021239986643195152, 0.006245459895581007, 0.027548713609576225, -0.009607704356312752, 0.024638382717967033, -0.00487615866586566, -0.004998175427317619, 0.01631411723792553, -0.020788071677088737, 0.003007491584867239, -0.05607356131076813, -0.023300716653466225, 0.04978291317820549, -0.04244381934404373, 0.007714182138442993, -0.03799697756767273, -0.02592182159423828, -0.0047179884277284145, 0.02662680856883526, 0.010854988358914852, -0.014217233285307884, -0.03421897441148758, 0.06384649127721786, 0.012219770811498165, -0.06832948327064514, -0.00409208657220006, -0.03331514447927475, -0.033025916665792465, 0.01876349374651909, 0.04602298140525818, 0.04681835323572159, -0.009607704356312752, -0.06590722501277924, -0.03532164543867111, -0.012716876342892647, -0.023029567673802376, -0.008853007107973099, 0.01568143628537655, 0.008880121633410454, -0.05585664510726929, -0.09146751463413239, -0.002659517340362072, -0.038756195455789566, -0.0037418529391288757, -0.049059849232435226, 0.004989136941730976, 0.02252342365682125, 0.01667564921081066, 0.04266073927283287, 0.04197382554411888, 0.030404813587665558, -0.08474302291870117, -0.025524135679006577, 0.07313785701990128, -0.0008111866773106158, 0.033983975648880005, -0.01811273768544197, 0.012662647292017937, 0.006701893638819456, 0.008044079877436161, 0.061821915209293365, 0.03882850334048271, -0.038756195455789566, -0.04070846736431122, 0.08250153064727783, -0.004989136941730976, -0.0031475850846618414, -0.03575548157095909, 0.04092538729310036, 0.036261625587940216, -0.028669461607933044, -0.044396091252565384, 0.01551874727010727, -0.009065406396985054, 0.046095289289951324, -0.01476856879889965, -0.024584153667092323, 0.06775103509426117, 0.019161177799105644, -0.04023847356438637, -0.016377385705709457, -0.03239323943853378, -0.027060646563768387, 0.02433108165860176, 0.005748353432863951, -0.01748005673289299, 0.045625295490026474, -0.012228809297084808, 0.012147463858127594, -0.009255210869014263, 0.013593590818345547, -0.018510421738028526, 0.014632994309067726, -0.06124346703290939, 0.05451897531747818, -0.04602298140525818, -0.036749694496393204, -0.09790277481079102, -0.03660508245229721, -0.059435807168483734, 0.011587089858949184, 0.029265988618135452, -0.02969982661306858, 0.0017579477280378342, 0.053325921297073364, -0.02311995066702366 ]
715,974
pytorch_optimizer.optimizer.shampoo_utils
build_pre_conditioner_shapes
Build pre-conditioner shapes.
@staticmethod def build_pre_conditioner_shapes( split_sizes: List[np.ndarray], pre_conditioner_type: int, rank: int ) -> List[List[int]]: r"""Build pre-conditioner shapes.""" pre_conditioner_shapes: List[List[int]] = [] for t in itertools.product(*split_sizes): t_shape: List[Optional[List[int]]] = [[d, d] for d in t] if pre_conditioner_type == PreConditionerType.INPUT: t_shape = t_shape[:-1] + [None] if pre_conditioner_type == PreConditionerType.OUTPUT: t_shape = [None] * (rank - 1) + t_shape[-1:] pre_conditioner_shapes.extend(t_shape) return pre_conditioner_shapes
(split_sizes: List[numpy.ndarray], pre_conditioner_type: int, rank: int) -> List[List[int]]
[ -0.04401024430990219, -0.02468046173453331, -0.06991320848464966, -0.03384040296077728, 0.012340230867266655, 0.000854868849273771, 0.010320437140762806, -0.05694400891661644, -0.020534569397568703, 0.02730265073478222, 0.021792512387037277, -0.002122776582837105, -0.010967126116156578, -0.026239601895213127, 0.024432417005300522, 0.005567721091210842, 0.04553394764661789, -0.04220305755734444, 0.04422285407781601, -0.029659077525138855, 0.014616928063333035, -0.03653346374630928, -0.004788151476532221, 0.027355803176760674, 0.032865941524505615, 0.07391736656427383, 0.006830092053860426, 0.0107367979362607, -0.007782407104969025, -0.02150903269648552, -0.03591335192322731, 0.03547041490674019, -0.03398214280605316, 0.008136756718158722, 0.024450134485960007, 0.01721253991127014, 0.03192691504955292, 0.08313045650720596, -0.03398214280605316, 0.04836874455213547, 0.011188594624400139, -0.04312437027692795, -0.0074014812707901, -0.010417883284389973, -0.029446467757225037, 0.019949892535805702, 0.03277735412120819, -0.05205398425459862, -0.01844390667974949, -0.008632846176624298, 0.0325293093919754, -0.03926195576786995, 0.032865941524505615, 0.015263617038726807, -0.06711384654045105, -0.014005674980580807, 0.03446051478385925, -0.02530057355761528, -0.012163056060671806, -0.04634895175695419, -0.005930929444730282, 0.049857012927532196, 0.0014018963556736708, -0.016238078474998474, -0.022448059171438217, -0.0355767197906971, -0.05208941921591759, -0.00417468324303627, -0.01206560991704464, -0.0066972109489142895, -0.008725862950086594, 0.011206312105059624, 0.0070648486725986, 0.004956467542797327, 0.018727386370301247, -0.0141296973451972, 0.06314513087272644, -0.04705765098333359, 0.10864364355802536, -0.07710651308298111, -0.004227835685014725, 0.06254273653030396, -0.009992663748562336, -0.0051912241615355015, 0.05729835852980614, -0.0016344384057447314, 0.033078551292419434, 0.0712597444653511, -0.007180012296885252, -0.0471639558672905, -0.05527856573462486, 0.011206312105059624, 0.005049484316259623, 0.032865941524505615, -0.006688352208584547, 0.05471160635352135, -0.0021648555994033813, -0.07802782207727432, -0.006838950794190168, -0.026895148679614067, -0.010311578400433064, 0.007760260254144669, -0.012818603776395321, -0.02150903269648552, 0.0015945740742608905, 0.01449290569871664, -0.020215654745697975, 0.014714375138282776, -0.057475533336400986, -0.01133919321000576, -0.005146930459886789, -0.03646259382367134, -0.035417262464761734, -0.018550211563706398, 0.01851477660238743, -0.01070136297494173, -0.03029690682888031, 0.026895148679614067, -0.006621911656111479, -0.018727386370301247, -0.02450328692793846, -0.03485029935836792, -0.030243754386901855, 0.042273927479982376, -0.04014782980084419, -0.0026642673183232546, 0.0495026633143425, 0.0727834478020668, -0.017398573458194733, -0.0703384280204773, -0.00823863223195076, 0.023794587701559067, -0.06491687893867493, -0.002721849363297224, -0.03316713869571686, -0.004881168249994516, -0.02540687844157219, 0.0024848778266459703, 0.020003044977784157, -0.03222811222076416, 0.04588829725980759, -0.034141600131988525, -0.020180219784379005, -0.009115648455917835, -0.043691329658031464, 0.016964495182037354, 0.07101169973611832, -0.03026147186756134, 0.04404567927122116, 0.04822700470685959, -0.008371513336896896, 0.0346376895904541, 0.0052930996753275394, -0.0545344315469265, 0.003857983276247978, -0.03423018753528595, 0.009186518378555775, -0.09680835902690887, 0.04663243144750595, -0.014882691204547882, -0.038482386618852615, -0.011250605806708336, -0.018585646525025368, -0.030314624309539795, -0.011055713519454002, 0.034283339977264404, -0.0034748425241559744, -0.05410921201109886, 0.0030850577168166637, 0.00942570436745882, 0.09099702537059784, -0.023015018552541733, 0.016140632331371307, 0.0007662813877686858, -0.03763194754719734, -0.001113433507271111, -0.003173645120114088, -0.008189909160137177, -0.0452859029173851, 0.0074723511934280396, 0.048652224242687225, -0.01232251338660717, -0.032936811447143555, -0.020392829552292824, -0.010417883284389973, 0.032210394740104675, 0.014439753256738186, -0.028808636590838432, 0.037100423127412796, 0.027869610115885735, -0.04666786640882492, 0.004117101430892944, -0.021385008469223976, 0.03894304111599922, 0.0027240640483796597, 0.01604318618774414, 0.012384524568915367, 0.02085348404943943, -0.05584552511572838, -0.03656889870762825, -0.01564454287290573, 0.056199874728918076, -0.006209979765117168, 0.03777368739247322, -0.00388234481215477, 0.029287008568644524, -0.0114100631326437, 0.01659242808818817, 0.028596026822924614, 0.0059043532237410545, -0.027869610115885735, -0.015449650585651398, 0.021792512387037277, 0.05045940726995468, 0.03233441710472107, -0.00342169008217752, -0.02453872188925743, 0.03376953303813934, -0.016601286828517914, -0.02227088436484337, 0.0038225483149290085, 0.018709668889641762, 0.021243268623948097, 0.03502747416496277, 0.009248529560863972, -0.0027462108992040157, -0.027444390580058098, -0.02570807747542858, -0.005833483301103115, 0.015290193259716034, -0.05269181355834007, -0.08185479789972305, -0.017513737082481384, -0.004316423088312149, -0.014696657657623291, 0.04372676461935043, -0.005107066128402948, -0.051238980144262314, -0.002588968025520444, 0.02195196971297264, -0.030013427138328552, -0.017159387469291687, 0.015449650585651398, -0.02319219335913658, 0.01335898693650961, 0.021154681220650673, 0.04450633376836777, 0.028153089806437492, -0.03543497994542122, -0.01975500024855137, -0.056447919458150864, -0.04277001693844795, -0.008079174906015396, -0.013739912770688534, 0.031732022762298584, 0.0197195652872324, 0.020286524668335915, -0.040006089955568314, 0.02406034991145134, -0.0117024015635252, -0.011100007221102715, 0.017956675961613655, 0.044825248420238495, 0.0034283341374248266, -0.014643504284322262, -0.05846771225333214, 0.014049968682229519, 0.08348480612039566, -0.049857012927532196, 0.004334140568971634, 0.05304616317152977, 0.0832013264298439, -0.002710775937885046, -0.01051532942801714, 0.0038779154419898987, 0.017159387469291687, -0.04004152491688728, 0.020658591762185097, -0.004907744470983744, -0.014484046958386898, 0.06863754987716675, -0.015883728861808777, -0.03548813238739967, 0.042451102286577225, 0.0023940757382661104, 0.031590282917022705, -0.018355319276452065, -0.05701487883925438, 0.0052930996753275394, -0.013562737964093685, -0.026841996237635612, 0.034761711955070496, 0.010621634311974049, -0.006090386770665646, 0.017221398651599884, -0.03951000049710274, 0.05070745199918747, -0.005536715500056744, 0.029216138646006584, -0.014643504284322262, 0.002276697428897023, 0.004296490922570229, 0.07774434238672256, -0.009523150511085987, -0.0642436146736145, -0.03339746594429016, 0.028082219883799553, -0.04269914701581001, -0.019879022613167763, -0.038553256541490555, 0.006347290240228176, 0.03777368739247322, 0.011126583442091942, -0.02002076245844364, 0.057617273181676865, -0.031483978033065796, -0.0005282026249915361, 0.011808706447482109, 0.051061805337667465, 0.07108256965875626, 0.0125794168561697, -0.021420443430542946, 0.016353242099285126, 0.03933282569050789, -0.0568731389939785, -0.02347567304968834, -0.008694857358932495, -0.03295452892780304, -0.0421321876347065, 0.03398214280605316, -0.05662509426474571, -0.008389230817556381, 0.0058201951906085014, 0.0553494356572628, 0.00880559254437685, -0.015325628221035004, 0.06417274475097656, 0.003244515275582671, -0.001997646875679493, -0.03412388265132904, 0.006360578816384077, -0.03309626877307892, 0.006909820716828108, 0.059991419315338135, -0.029180703684687614, 0.004378434270620346, 0.05286898836493492, 0.010400165803730488, 0.0013886082451790571, 0.11891978979110718, 0.006976261269301176, -0.012216208502650261, 0.023085888475179672, 0.013155235908925533, 0.05152245983481407, -0.031483978033065796, -0.05591639503836632, -0.033043116331100464, 0.05935359001159668, 0.0526563785970211, 0.10524188727140427, 0.023564260452985764, 0.08809135854244232, 0.03073984384536743, 0.00971804279834032, -0.01833760179579258, -0.0028037927113473415, -0.0009273998439311981, 0.02530057355761528, -0.02698373608291149, -0.02847200445830822, -0.02636362425982952, 0.03415931761264801, -0.018133850768208504, 0.010630493052303791, 0.038553256541490555, -0.033521488308906555, -0.020623156800866127, 0.0037671811878681183, 0.008947332389652729, -0.04812069982290268, 0.025637207552790642, 0.023457955569028854, -0.003729531541466713, -0.05063658207654953, 0.017690913751721382, -0.02540687844157219, 0.00909793097525835, -0.010967126116156578, -0.009762336499989033, 0.02792276255786419, -0.006768080871552229, 0.03653346374630928, -0.008362654596567154, -0.0332380086183548, 0.029375597834587097, -0.012092186138033867, 0.030722126364707947, -0.01516617089509964, -0.007259740959852934, -0.026080144569277763, -0.07802782207727432, -0.015626825392246246, 0.026558516547083855, 0.012384524568915367, -0.04379763454198837, -0.004247767850756645, 0.09354834258556366, -0.008389230817556381, 0.0218810997903347, -0.010355872102081776, 0.030420929193496704, 0.05088463053107262, -0.01909945346415043, -0.050140492618083954, 0.0036741644144058228, -0.011330334469676018, 0.03653346374630928, 0.043585024774074554, -0.007813412696123123, 0.05283355340361595, 0.009762336499989033, 0.021686207503080368, 0.07724825292825699, -0.008340507745742798, 0.030243754386901855, 0.012543981894850731, 0.038411516696214676, -0.040998268872499466, -0.002806007396429777, -0.006905391346663237, 0.02216457948088646, -0.062436431646347046, -0.046171776950359344, -0.015192747116088867, -0.0058822063729166985, 0.015307910740375519, 0.0406084842979908, -0.02450328692793846, 0.0020330818369984627, 0.045994602143764496, 0.04277001693844795, -0.0050672017969191074, 0.019312063232064247, 0.028631461784243584, 0.02453872188925743, -0.030137449502944946, 0.015945740044116974, -0.09149311482906342, -0.037064988166093826, 0.0049298913218081, 0.002943317871540785, 0.03936826065182686, 0.017655478790402412, 0.04273458197712898, 0.04507329314947128, -0.038659561425447464, -0.009735760278999805, -0.03132452070713043, -0.048864834010601044, 0.07611433416604996, 0.02136729098856449, -0.0040373727679252625, 0.013970240019261837, -0.0017617827979847789, 0.023776870220899582, 0.019010866060853004, -0.011551802977919579, -0.012384524568915367, 0.02847200445830822, 0.06328687071800232, -0.02227088436484337, 0.005036196205765009, 0.03167887032032013, -0.007197729777544737, 0.02905668132007122, 0.03477942943572998, 0.03933282569050789, -0.010311578400433064, -0.010125544853508472, 0.018532494083046913, 0.027284933254122734, -0.07299605756998062, -0.005120354238897562, -0.03958087041974068, -0.0013819641899317503, -0.08142957836389542, 0.004890026990324259, -0.055101390928030014, 0.006528894882649183, -0.04787265509366989, 0.005049484316259623, 0.04631351679563522, 0.008526541292667389, 0.06020402908325195, 0.03236985206604004, 0.04890026897192001, -0.0011372413719072938, 0.08213827759027481, -0.008925185538828373, 0.025087963789701462, 0.022341754287481308, -0.04053761437535286, -0.015148453414440155, 0.01368676032871008, -0.032139524817466736, 0.03763194754719734, -0.003747249022126198, -0.08568177372217178, -0.004898885730654001, -0.016636721789836884, -0.005771472118794918, 0.019949892535805702, 0.003968717530369759, -0.012526264414191246, 0.0280290674418211, 0.047482870519161224, 0.018213579431176186, -0.023103605955839157, 0.035240087658166885, 0.047270260751247406, -0.015768565237522125, 0.011897293850779533, -0.021703924983739853, 0.013996816240251064, 0.05701487883925438, 0.03222811222076416, -0.013890511356294155, 0.053683992475271225, -0.0014018963556736708, -0.022005122154951096, 0.0014041110407561064, 0.015024431049823761, 0.08171305805444717, 0.012127621099352837, 0.02103065885603428, 0.025548620149493217, 0.05201854929327965, 0.06941711902618408, 0.0064314487390220165, 0.022465776652097702, 0.05733379349112511, 0.030863866209983826, -0.01816042698919773, -0.008402518928050995, 0.05602269992232323, 0.06885015964508057, -0.010931691154837608, -0.06562557816505432, -0.056164439767599106, -0.00849110633134842, 0.019258910790085793, 0.02544231526553631, 0.03430105745792389, 0.03632085397839546, -0.0367460735142231, 0.047412000596523285, -0.0672910213470459, 0.02292643114924431, 0.025070246309041977, -0.01575084775686264, -0.0032423005905002356, 0.030704408884048462, -0.012818603776395321, -0.04220305755734444, -0.008654993027448654, -0.028277112171053886, 0.022589799016714096, -0.03543497994542122, 0.006644058506935835, 0.026966018602252007, 0.015051007270812988, 0.014333448372781277, -0.02864917926490307, -0.009177659638226032, -0.041104573756456375, -0.015910305082798004, -0.034212470054626465, -0.05407377704977989, -0.0165569931268692, -0.014413177035748959, -0.02347567304968834, -0.001642189803533256, -0.06204664707183838, -0.004345213994383812, -0.025725794956088066, -0.05733379349112511, -0.006311855278909206, -0.04649069160223007, 0.033007681369781494, -0.010922832414507866, 0.0565187893807888, 0.01800982840359211, 0.013164094649255276, -0.0021128104999661446, -0.03467312455177307, -0.00978891272097826, -0.03745477274060249, -0.04397480934858322, 0.0010220776312053204, -0.013766488991677761, -0.011188594624400139, -0.010568481869995594, 0.08490220457315445, 0.04542764276266098, -0.13266855478286743, -0.04684504121541977, 0.05315246805548668, -0.003995293751358986, -0.03671063855290413, 0.004493598360568285, 0.043549589812755585, 0.014173991046845913, -0.02257208153605461, 0.0021072737872600555, -0.02949962019920349, -0.046278081834316254, 0.01706194132566452, 0.09609965980052948, -0.033663228154182434, -0.02081804908812046, 0.0276747178286314, 0.047553740441799164, -0.014652363024652004, -0.00581576582044363, -0.017336562275886536, 0.02384774014353752, -0.12869983911514282, 0.02657623402774334, -0.04939635843038559, 0.06842494010925293, 0.026186449453234673, 0.08483133465051651, -0.08008304983377457, -0.011604955419898033, 0.024910788983106613, 0.01630008965730667, 0.014794103801250458, -0.009275105781853199, -0.07377562671899796, -0.0017418506322428584, -0.032139524817466736, 0.033521488308906555, -0.04188414290547371, 0.03890760615468025, -0.05464073643088341, 0.015520520508289337, -0.03564758971333504, 0.06186947226524353, 0.05038853734731674, -0.06555470824241638, 0.016760744154453278, -0.026168731972575188, 0.0041392482817173, 0.01520160585641861, 0.07299605756998062, -0.01242881827056408, -0.015768565237522125, -0.011941587552428246, -0.04631351679563522, -0.02957049012184143, -0.0012800885597243905, 0.019205758348107338, 0.0228201262652874, -0.06027489900588989, 0.002502595307305455, 0.03749020770192146, -0.04372676461935043, -0.013766488991677761, 0.0005113156512379646, -0.018567929044365883, 0.0004202366981189698, 0.004770433995872736, -0.04135261848568916, 0.01397909875959158, 0.0045356773771345615, -0.05542030557990074, 0.016636721789836884, -0.016424112021923065, -0.048864834010601044, 0.010772233828902245, -0.013722195290029049, -0.035824764519929886, 0.012242784723639488, 0.0731377974152565, -0.08164218813180923, -0.011560661718249321, -0.02864917926490307, -0.01578628271818161, 0.02074717916548252, 0.029340162873268127, 0.04939635843038559, 0.0703384280204773, -0.01902858354151249, -0.08610700070858002, -0.01596345752477646, -0.02953505516052246, -0.00831393152475357, -0.022501211613416672, 0.020534569397568703, 0.033007681369781494, -0.05063658207654953, -0.08412263542413712, -0.0015403141733258963, -0.0444708988070488, 0.04780178517103195, -0.040998268872499466, -0.0024206519592553377, 0.04546307772397995, -0.00478372210636735, -0.007879853248596191, 0.024042632430791855, 0.021207833662629128, -0.07930348068475723, -0.0754765048623085, -0.00621440913528204, 0.021190116181969643, 0.07611433416604996, -0.027444390580058098, 0.02081804908812046, 0.0038469098508358, 0.06211751699447632, 0.054924216121435165, 0.0010104505345225334, -0.058751195669174194, 0.015759706497192383, 0.08008304983377457, -0.06172773241996765, -0.021703924983739853, -0.04790809005498886, 0.022430341690778732, 0.016388677060604095, -0.032245829701423645, -0.014616928063333035, 0.03222811222076416, -0.01808955706655979, 0.03167887032032013, -0.04656156152486801, -0.047376565635204315, 0.0067990864627063274, 0.026629386469721794, -0.02333393320441246, -0.05581009015440941, -0.00710028363391757, 0.022873278707265854, 0.035381827503442764, 0.04269914701581001, -0.02774558775126934, 0.029109833762049675, -0.032139524817466736, 0.003990864381194115, -0.02891494147479534, 0.0047615752555429935, -0.08674483001232147, -0.02482220157980919, -0.02544231526553631, 0.02926929108798504, -0.033521488308906555, -0.0503176674246788, -0.03430105745792389, -0.0073483288288116455, -0.035381827503442764, 0.0025734652299433947, 0.034283339977264404, 0.031767457723617554, 0.00047947955317795277, -0.006688352208584547, -0.04315980523824692 ]
715,975
pytorch_optimizer.optimizer.shampoo_utils
merge_partitions
Merge partitions back to original shape.
def merge_partitions(self, partitions: List[torch.Tensor]) -> torch.Tensor: r"""Merge partitions back to original shape.""" for i, indices in reversed(self.splits): n: int = len(indices) + 1 partitions: List[torch.Tensor] = [ torch.cat(partitions[idx:idx + n], dim=i) for idx in range(0, len(partitions), n) # fmt: skip ] return partitions[0]
(self, partitions: List[torch.Tensor]) -> torch.Tensor
[ -0.04948537424206734, 0.001280027674511075, -0.07426418364048004, -0.023135315626859665, -0.0034111496061086655, -0.011387054808437824, 0.038143470883369446, -0.019974753260612488, -0.007675651460886002, 0.04912416636943817, 0.021383460611104965, -0.020570745691657066, -0.05815434455871582, 0.013346603140234947, 0.025392860174179077, 0.014258651062846184, -0.005494863260537386, -0.005011748522520065, 0.033971529453992844, -0.005770283751189709, 0.010818153619766235, -0.04421175271272659, 0.009156600572168827, -0.0024584659840911627, -0.023081135004758835, -0.011883714236319065, 0.06425874680280685, -0.018268050625920296, -0.07498659938573837, -0.03543441742658615, 0.02667514607310295, -0.016687769442796707, 0.02996212989091873, 0.012353283353149891, -0.036825064569711685, 0.03212937340140343, 0.017319880425930023, 0.050135549157857895, 0.06732900440692902, 0.06017710641026497, 0.04190002381801605, -0.013463995419442654, 0.020787470042705536, -0.05580649897456169, 0.05591486021876335, 0.07188021391630173, 0.0076395305804908276, 0.042911406606435776, 0.0026955080684274435, 0.06938789039850235, 0.028842387720942497, -0.06357245147228241, -0.009057268500328064, -0.017617877572774887, -0.08148832619190216, 0.0509302020072937, 0.04872684180736542, -0.024435661733150482, -0.03584980592131615, 0.004722782876342535, -0.0007912693545222282, -0.05400046333670616, 0.0067410278134047985, 0.054181069135665894, 0.006962267216295004, -0.023839669302105904, -0.02102225460112095, -0.036825064569711685, -0.058840639889240265, 0.022033633664250374, 0.028715966269373894, 0.02672932669520378, -0.0011129694757983088, -0.05472287908196449, -0.02875208668410778, 0.0636085718870163, 0.05519244819879532, 0.011441235430538654, 0.05327805131673813, -0.025230316445231438, -0.02808385342359543, 0.03187652677297592, -0.04713752865791321, 0.020950011909008026, 0.08184953033924103, -0.013888414017856121, 0.026657085865736008, 0.013978715054690838, -0.07830969989299774, -0.05869615823030472, 0.010872334241867065, 0.07123004645109177, 0.0080504035577178, -0.055336929857730865, 0.06285003572702408, -0.040924765169620514, -0.03958829864859581, -0.026982171460986137, -0.045801062136888504, -0.06646210700273514, -0.03572338446974754, -0.0025284497532993555, -0.051508136093616486, -0.024562083184719086, 0.06162193417549133, -0.025176135823130608, -0.006366275250911713, 0.022900531068444252, -0.04233347252011299, 0.005102050490677357, 0.034423038363456726, 0.001405321410857141, 0.014484405517578125, -0.0017326653469353914, 0.007666620891541243, -0.027668464928865433, 0.013256301172077656, 0.040491316467523575, -0.011323843151330948, 0.013915504328906536, -0.03669864311814308, 0.03664446249604225, -0.03713209182024002, -0.015044276602566242, -0.06689555943012238, -0.017058005556464195, 0.03380898758769035, 0.0265487227588892, -0.032219674438238144, -0.07513108104467392, -0.039841145277023315, -0.010032528080046177, -0.05139977112412453, -0.025555403903126717, -0.026494542136788368, -0.04869071766734123, -0.015279061160981655, -0.015902142971754074, -0.01977608911693096, -0.05139977112412453, -0.032273855060338974, -0.010167980566620827, 0.017879752442240715, 0.059671416878700256, -0.03335747867822647, 0.002704538404941559, 0.0727471113204956, -0.014357983134686947, 0.036120712757110596, 0.004187745042145252, -0.024724626913666725, 0.05324193090200424, -0.0005708765820600092, -0.052375033497810364, 0.003709145588800311, -0.018376411870121956, -0.033429719507694244, -0.013463995419442654, 0.011983046308159828, -0.020931951701641083, -0.028950750827789307, 0.014231560751795769, -0.02206975407898426, 0.027144715189933777, -0.02300889417529106, -0.010836213827133179, -0.0011214351980015635, -0.021618245169520378, -0.037493299692869186, -0.05869615823030472, 0.04966598004102707, -0.0039055519737303257, 0.004323197528719902, -0.08278866857290268, -0.011143239215016365, 0.034423038363456726, -0.018385441973805428, -0.057576414197683334, -0.03604847192764282, -0.005639346316456795, -0.006745542865246534, -0.04623451083898544, 0.03702373057603836, -0.03283372521400452, -0.0009097904548980296, 0.03817959129810333, 0.018873071298003197, -0.006849389988929033, 0.03734881430864334, -0.027036352083086967, -0.022737987339496613, -0.011007786728441715, -0.023099195212125778, 0.0633196085691452, -0.025772128254175186, 0.013789081946015358, -0.011748261749744415, 0.03566920384764671, 0.005621285643428564, -0.006113430485129356, -0.02656678296625614, 0.014466345310211182, 0.038468558341264725, 0.014348953031003475, -0.008235522545874119, 0.006695876829326153, -0.05797374248504639, 0.0320751927793026, 0.03357420116662979, -0.021925272420048714, 0.01185662392526865, -0.006352730095386505, 0.02985376864671707, 0.026747386902570724, 0.041755542159080505, -0.05959917604923248, -0.05627606809139252, -0.00796913169324398, 0.04923253133893013, -0.011260631494224072, -0.017590787261724472, -0.003898779395967722, 0.012678369879722595, 0.014231560751795769, -0.008641880005598068, -0.011820502579212189, -0.018376411870121956, -0.09543091803789139, -0.05909348279237747, 0.016525225713849068, 0.0025081320200115442, -0.11768127977848053, -0.05233891308307648, -0.018249990418553352, 0.044536836445331573, 0.09767040610313416, -0.04348933696746826, -0.043561577796936035, 0.03494678810238838, 0.05349477380514145, -0.08011573553085327, -0.0068809958174824715, -0.012895094230771065, -0.01111614890396595, 0.006686846725642681, 0.06093564257025719, -0.010592399165034294, 0.014791431836783886, -0.004853720776736736, 0.04775157943367958, 0.007562774233520031, 0.00859672948718071, 0.03882976621389389, -0.00646109227091074, 0.03886588662862778, 0.02640424109995365, -0.03160562366247177, -0.008172310888767242, -0.012533887289464474, 0.008474822156131268, 0.003210228169336915, -0.0008911656914278865, -0.012678369879722595, -0.0018116794526576996, 0.0011242571054026484, -0.018195807933807373, 0.0284269992262125, 0.07314444333314896, -0.018114537000656128, 0.014701129868626595, 0.045801062136888504, 0.07672039419412613, 0.012217830866575241, 0.021780788898468018, 0.0598158985376358, -0.009996406733989716, -0.012976366095244884, 0.022593505680561066, 0.02234066091477871, -0.020390141755342484, 0.04511477053165436, 0.03039557859301567, -0.04244183748960495, -0.012813822366297245, 0.04522313177585602, 0.001948260935023427, 0.02179884910583496, -0.09355264157056808, -0.05349477380514145, 0.009292053058743477, 0.004287077113986015, 0.015188759192824364, 0.028463121503591537, 0.018259020522236824, -0.01889113150537014, 0.012001106515526772, -0.009996406733989716, 0.010158950462937355, -0.0025261922273784876, 0.005047869402915239, 0.009454595856368542, 0.0006021999870426953, -0.0032147434540092945, 0.040816403925418854, -0.01026731263846159, -0.05931020900607109, -0.00487178098410368, -0.03642773628234863, 0.037493299692869186, 0.019125916063785553, -0.011025846935808659, -0.028553422540426254, -0.01472822017967701, 0.0055716196075081825, -0.007364110089838505, -0.04294752702116966, 0.0595630519092083, 0.032996270805597305, 0.031226355582475662, 0.04442847520112991, 0.014249620959162712, 0.055662017315626144, 0.002101773861795664, 0.0838000476360321, -0.04179166257381439, 0.04117761179804802, -0.005291684065014124, -0.001340981456451118, -0.04442847520112991, -0.0026345544029027224, -0.047607097774744034, -0.02315337583422661, -0.0016073717270046473, 0.03158756345510483, -0.08213850110769272, -0.011188390664756298, 0.05230278894305229, -0.03482036665081978, -0.004302879795432091, 0.017292790114879608, 0.036770883947610855, -0.009319143369793892, 0.011477355845272541, -0.014854642562568188, 0.04478968307375908, 0.05295296385884285, 0.019794149324297905, 0.0075447135604918, -0.06154969334602356, 0.012895094230771065, 0.004194517619907856, -0.03380898758769035, -0.004278047010302544, 0.00502529414370656, 0.03525381535291672, 0.007616955321282148, -0.006429486908018589, 0.051508136093616486, 0.03438691794872284, -0.0026052063331007957, -0.005589680280536413, -0.038035109639167786, 0.028517302125692368, 0.047498736530542374, -0.011368993669748306, 0.022792169824242592, -0.07314444333314896, -0.03259894251823425, -0.03438691794872284, -0.0533502921462059, 0.012082378380000591, -0.027018291875720024, 0.0444645956158638, 0.014394103549420834, 0.018249990418553352, -0.010908454656600952, -0.0738307312130928, -0.0011603778693825006, 0.04840175434947014, 0.034477218985557556, -0.0019843815825879574, -0.01741921342909336, 0.07159125059843063, 0.028445061296224594, -0.02113061584532261, 0.0786709114909172, -0.03966054320335388, -0.10251057893037796, 0.010962636210024357, -0.017988113686442375, -0.025808248668909073, 0.06964073330163956, 0.007905920967459679, -0.0010610459139570594, -0.058623913675546646, 0.021040314808487892, 0.011378023773431778, -0.08575057238340378, -0.016561346128582954, -0.05952693149447441, 0.038793645799160004, -0.058298829942941666, -0.013969684951007366, 0.07939332723617554, 0.011703110300004482, -0.035398297011852264, 0.04190002381801605, 0.041213732212781906, -0.00473632849752903, -0.02662096545100212, -0.04244183748960495, 0.01725666970014572, 0.026982171460986137, 0.011233541183173656, 0.05678175762295723, -0.006090855225920677, -0.01786169223487377, 0.03817959129810333, 0.051616497337818146, 0.011495416052639484, -0.006632665637880564, 0.04966598004102707, 0.002092743758112192, 0.02261156588792801, -0.046090029180049896, -0.07375849038362503, -0.02266574651002884, 0.00553098414093256, -0.029763465747237206, -0.04352545738220215, -0.004438332282006741, -0.03742105886340141, -0.03131665661931038, -0.04442847520112991, 0.01350011583417654, -0.02519419603049755, 0.06815978139638901, 0.04804054647684097, -0.028463121503591537, 0.024706566706299782, 0.09947644174098969, 0.018547985702753067, 0.04478968307375908, -0.03926321491599083, 0.053964342921972275, -0.0025036167353391647, -0.06783469766378403, -0.0014741765335202217, -0.14838388562202454, 0.01686837151646614, 0.027415620163083076, 0.0009086616337299347, -0.002028403803706169, 0.028824327513575554, 0.04655959829688072, -0.004740843549370766, 0.0468846820294857, -0.041647180914878845, -0.04486192390322685, 0.010167980566620827, 0.07448090612888336, 0.033321358263492584, 0.014972034841775894, 0.05819046497344971, 0.05212218686938286, -0.005088505335152149, -0.006339184939861298, -0.054686758667230606, 0.0020656532142311335, 0.05262787640094757, 0.0367889441549778, -0.02519419603049755, -0.018602166324853897, -0.04937701299786568, 0.0010802350006997585, 0.030738726258277893, 0.06259719282388687, 0.00031690282048657537, -0.005964432377368212, 0.024670446291565895, -0.04655959829688072, -0.013156969100236893, -0.05696236342191696, 0.001361299306154251, -0.03538023680448532, 0.030251096934080124, -0.03333941847085953, 0.04948537424206734, 0.02320755645632744, 0.008822483941912651, 0.002075812080875039, -0.0027722646482288837, -0.04009398818016052, 0.04507865011692047, -0.0016322046285495162, 0.007689196616411209, -0.019920572638511658, 0.004921447020024061, 0.05273623764514923, -0.045042525976896286, -0.005427137017250061, 0.043886665254831314, 0.07513108104467392, -0.029582863673567772, 0.001658166409470141, -0.0031808800995349884, 0.01796102337539196, 0.0900128111243248, -0.029113294556736946, -0.0409608855843544, -0.032165493816137314, -0.05230278894305229, -0.041213732212781906, 0.030522001907229424, -0.004907901864498854, 0.0184576828032732, 0.00903920829296112, 0.023731308057904243, 0.06404202431440353, -0.005368440877646208, 0.007504078093916178, 0.009508777409791946, 0.019360700622200966, -0.00033157685538753867, -0.030648423358798027, -0.006912601180374622, -0.021437643095850945, -0.030522001907229424, -0.036120712757110596, 0.024706566706299782, -0.06115236505866051, 0.03781838342547417, 0.02705441229045391, -0.017283760011196136, 0.006722967606037855, -0.004548951983451843, -0.06689555943012238, -0.04320036992430687, 0.047498736530542374, 0.0004845254879910499, -0.027235016226768494, 0.02026371844112873, 0.030792906880378723, -0.033212993294000626, -0.028101913630962372, 0.046198390424251556, 0.02015535719692707, 0.0007004031795077026, -0.009815803728997707, 0.0035375722218304873, -0.025591524317860603, -0.003311817767098546, -0.015270031057298183, -0.004916931968182325, 0.026964111253619194, -0.039118729531764984, -0.0503883920609951, -0.06570357829332352, -0.011612809263169765, -0.010032528080046177, 0.04576494172215462, 0.032328035682439804, 0.03465782478451729, 0.0026729325763881207, 0.05327805131673813, 0.0013556554913520813, -0.06779857724905014, -0.04753485694527626, -0.017879752442240715, -0.00013538212806452066, 0.01495397463440895, 0.007684681564569473, -0.029203595593571663, -0.040166232734918594, 0.020498502999544144, 0.00785625446587801, 0.025049714371562004, -0.04063580185174942, -0.052049946039915085, 0.00009989634418161586, -0.03608459234237671, 0.0150894271209836, 0.007815618999302387, -0.04395890608429909, 0.033267173916101456, 0.012542917393147945, -0.035506658256053925, -0.008998571895062923, 0.033863168209791183, -0.012109468691051006, 0.03543441742658615, 0.05573425814509392, 0.044825803488492966, 0.04872684180736542, 0.011802442371845245, -0.04341709613800049, -0.02978152595460415, -0.015008156187832355, -0.06263331323862076, -0.07729832082986832, 0.028390878811478615, -0.019360700622200966, 0.04861847683787346, 0.05815434455871582, 0.0695323720574379, -0.031406957656145096, -0.042911406606435776, 0.04309200868010521, 0.04330873489379883, 0.02821027673780918, 0.03175010532140732, 0.05327805131673813, -0.011928864754736423, -0.0374571792781353, -0.00046505415230058134, -0.021094495430588722, -0.02201557345688343, -0.06823202222585678, 0.04670407995581627, 0.014908824115991592, 0.012010136619210243, 0.021871091797947884, -0.01582087203860283, -0.016561346128582954, -0.01927039958536625, 0.04858235642313957, -0.020877771079540253, -0.03155144304037094, 0.02923971600830555, 0.024345358833670616, 0.008908270858228207, -0.04681244120001793, 0.028553422540426254, 0.03055812232196331, -0.005535499192774296, -0.015739599242806435, 0.01686837151646614, -0.043019767850637436, 0.0051742917858064175, -0.04948537424206734, 0.018358351662755013, 0.019956693053245544, -0.01631753146648407, -0.04601778835058212, -0.006339184939861298, -0.08885695040225983, -0.02765040472149849, 0.01702188514173031, -0.01163989957422018, 0.06126072630286217, -0.02234066091477871, 0.018638286739587784, -0.008547062985599041, 0.023641005158424377, 0.018746649846434593, 0.0827164277434349, 0.060899518430233, 0.002490071579813957, 0.0150894271209836, 0.0024020273704081774, 0.014547616243362427, -0.011260631494224072, -0.0013917761389166117, 0.04934089258313179, -0.007535683456808329, 0.021871091797947884, 0.00009044287435244769, 0.0076034097000956535, 0.03839631751179695, -0.0042080627754330635, -0.019252339377999306, -0.01746436394751072, -0.008262612856924534, 0.021437643095850945, -0.0038039623759686947, -0.04457295686006546, -0.027144715189933777, -0.0090617835521698, -0.02568182535469532, -0.00036290028947405517, 0.05176097899675369, -0.0036639946047216654, 0.016985764726996422, -0.011179360561072826, -0.024851050227880478, 0.005639346316456795, -0.013030546717345715, -0.027849068865180016, -0.03297821059823036, 0.005282653961330652, 0.05761253461241722, -0.009066298604011536, 0.010989726521074772, 0.0009239001083187759, -0.04244183748960495, 0.038360197097063065, 0.05125528946518898, -0.060863398015499115, -0.013734900392591953, 0.0025871458929032087, -0.004664086736738682, 0.011089058592915535, -0.061080124229192734, -0.028571482747793198, -0.02896881103515625, 0.020606866106390953, -0.04161106050014496, -0.006095370277762413, -0.07455314695835114, -0.004027459304779768, 0.009508777409791946, 0.004921447020024061, 0.012425525113940239, 0.01872858963906765, 0.02300889417529106, 0.008583184331655502, 0.03514545410871506, 0.016931584104895592, 0.02459820546209812, 0.020408201962709427, -0.020570745691657066, 0.009906104765832424, 0.08697867393493652, -0.002575858263298869, 0.002932550385594368, 0.005639346316456795, 0.05602322518825531, 0.0010373416589573026, -0.038360197097063065, -0.006452062167227268, 0.023966092616319656, 0.014800461940467358, 0.03155144304037094, -0.02158212475478649, 0.06693167984485626, -0.01691352389752865, 0.07104943692684174, -0.005494863260537386, -0.05345865339040756, -0.01358138769865036, -0.007490532472729683, -0.05996038019657135, -0.025067774578928947, 0.054795119911432266, -0.025934670120477676, 0.0018737618811428547, 0.0396244190633297, -0.02579018846154213, -0.011206450872123241, 0.05136365070939064, 0.030323337763547897, -0.03482036665081978, -0.007129325531423092, -0.002306081587448716, -0.021058375015854836, -0.004088412970304489, 0.04645123705267906, -0.028156094253063202, -0.058407191187143326, -0.0649450421333313, 0.0034066345542669296, 0.03465782478451729, -0.014827552251517773, 0.01790684275329113, 0.015739599242806435, 0.005115595646202564, 0.03767390176653862, 0.006953237112611532 ]
715,976
pytorch_optimizer.optimizer.shampoo_utils
partition
Partition tensor into blocks.
def precondition_gradient(self, grad: torch.Tensor) -> torch.Tensor: r"""Get preconditioned gradient.""" return grad / (torch.sqrt(self.statistics) + self.diagonal_eps)
(self, x: torch.Tensor) -> List[torch.Tensor]
[ -0.036862634122371674, -0.018714362755417824, 0.0031717848032712936, 0.019330404698848724, 0.014177295379340649, -0.0057733142748475075, 0.00673900218680501, -0.023259755223989487, 0.010339519008994102, -0.0048034642823040485, 0.03196759521961212, -0.001174850738607347, 0.023043308407068253, 0.006081335712224245, -0.04838428646326065, -0.004770164843648672, 0.011696476489305496, 0.022960059344768524, 0.0006087578949518502, -0.028720885515213013, -0.042190566658973694, -0.0823831558227539, 0.019663400948047638, 0.051847442984580994, -0.04525412619113922, -0.007030373439192772, 0.007192709017544985, -0.01726583205163479, 0.026173468679189682, -0.026356616988778114, -0.0519806407392025, 0.03579704836010933, 0.020912135019898415, 0.0014308412792161107, 0.02657306380569935, 0.02452513948082924, 0.03275013715028763, -0.05384541675448418, -0.04688580706715584, -0.01869771257042885, -0.03381572291254997, 0.015759024769067764, -0.015642477199435234, -0.01706603355705738, 0.04552052542567253, 0.006888850126415491, -0.004218640271574259, -0.02409224584698677, -0.03341612592339516, 0.048983678221702576, 0.020096296444535255, 0.012745413929224014, 0.010231295600533485, -0.03972639888525009, -0.02815479412674904, -0.027055907994508743, 0.04425514116883278, -0.04032579064369202, -0.014643489383161068, -0.017249181866645813, 0.04911687970161438, -0.041957467794418335, -0.0024308692663908005, -0.01295353565365076, 0.018631113693118095, 0.007596466224640608, -0.014177295379340649, -0.018331417813897133, 0.05714207515120506, 0.010614240542054176, -0.030918657779693604, 0.011230282485485077, -0.003213409334421158, -0.02996962144970894, 0.03722892701625824, -0.08278275281190872, 0.050881754606962204, -0.03486466035246849, -0.005307120271027088, -0.07758801430463791, 0.015176283195614815, 0.013927549123764038, -0.001318455208092928, 0.0011561197461560369, 0.03398222103714943, -0.0665658563375473, -0.020096296444535255, -0.030019570142030716, -0.0038981318939477205, 0.006048035807907581, 0.012245919555425644, 0.0019407410873100162, -0.005656765773892403, -0.00583158852532506, 0.08691190183162689, 0.038327813148498535, -0.00586072588339448, 0.018897511065006256, 0.020179543644189835, 0.005423668771982193, 0.02282686159014702, 0.1114203929901123, -0.011246932670474052, -0.007371694315224886, 0.05128135159611702, -0.044121939688920975, -0.009357181377708912, -0.04082528501749039, 0.0074715930968523026, -0.06543367356061935, 0.00728012016043067, -0.048484187573194504, -0.010381143540143967, -0.025507478043437004, 0.022194169461727142, -0.007829563692212105, -0.041757673025131226, -0.04229046404361725, 0.007330069784075022, 0.02718910574913025, 0.04768499732017517, 0.008882662281394005, -0.0351310558617115, 0.030219366773962975, -0.023193156346678734, 0.0199630968272686, 0.029653275385499, 0.042456962168216705, 0.01554257795214653, -0.04335604980587959, 0.01507638394832611, 0.014110696502029896, 0.011063785292208195, 0.006310270167887211, 0.0447879321873188, -0.030052870512008667, 0.043655745685100555, 0.014343793503940105, 0.024924734607338905, 0.008882662281394005, 0.034082118421792984, 0.02379254810512066, -0.016116995364427567, 0.031568001955747604, 0.003839857643470168, 0.036429740488529205, -0.02081223577260971, 0.04112498089671135, 0.02444189041852951, 0.023376304656267166, 0.03822791576385498, 0.006314432714134455, 0.012046122923493385, -0.07891999930143356, 0.017024409025907516, -0.02923703007400036, -0.004924175329506397, -0.045853517949581146, 0.02610686980187893, -0.05391201749444008, -0.043689046055078506, -0.04738530144095421, -0.03316637873649597, -0.0018148269737139344, -0.004416356794536114, 0.0007596466457471251, 0.02370929904282093, -0.043389350175857544, -0.035197652876377106, 0.028587687760591507, 0.03842771425843239, -0.07325907051563263, 0.007404993753880262, 0.05151444673538208, -0.06713195145130157, 0.03309978172183037, 0.011446730233728886, 0.054578009992837906, -0.05997253954410553, -0.0008470580214634538, 0.07046190649271011, 0.03453166410326958, -0.0010666270973160863, -0.035397451370954514, 0.05630958825349808, 0.008420631289482117, -0.04282325878739357, 0.0018554108683019876, 0.03972639888525009, 0.006356057245284319, -0.037661824375391006, -0.023892447352409363, 0.048251088708639145, 0.005511080380529165, -0.0015910954680293798, -0.03945999965071678, 0.04135807603597641, 0.034731458872556686, 0.06833073496818542, -0.007509055081754923, 0.015351105481386185, -0.018198220059275627, 0.023309705778956413, 0.003203003201633692, -0.03296658396720886, -0.008866013027727604, -0.04005939140915871, 0.025124531239271164, -0.0117963757365942, 0.014726738445460796, -0.03008616901934147, 0.02683946117758751, -0.026439866051077843, 0.0005801410879939795, -0.03151804953813553, -0.0338989719748497, 0.05317942798137665, -0.0039043754804879427, -0.010314544662833214, -0.0004110416630282998, 0.008932611905038357, -0.025690624490380287, 0.048750583082437515, -0.038594212383031845, 0.006847225595265627, -0.04272335767745972, -0.013977497816085815, -0.04378894716501236, -0.01515963301062584, -0.0472521036863327, 0.023259755223989487, -0.03802811726927757, 0.03211744502186775, -0.0044871182180941105, 0.0676647424697876, 0.04518752917647362, -0.07279288023710251, 0.0156841017305851, 0.05124805122613907, 0.010406117886304855, -0.03356597572565079, -0.010422768071293831, 0.014859937131404877, 0.09317222237586975, 0.03433186560869217, 0.002507874509319663, 0.013228257186710835, 0.034964557737112045, 0.01612532138824463, 0.025690624490380287, -0.08671209961175919, -0.0544448122382164, -0.025241080671548843, -0.002201934577897191, 0.014909885823726654, 0.04528742656111717, 0.05950634554028511, 0.043655745685100555, 0.04032579064369202, -0.005165596958249807, -0.018780961632728577, -0.07765461504459381, 0.033649224787950516, -0.003960568457841873, -0.029703224077820778, 0.015784000977873802, 0.03726222738623619, 0.06879693269729614, 0.0005431993631646037, 0.01919720694422722, -0.007492405362427235, 0.06473437696695328, -0.023892447352409363, -0.04845088720321655, 0.029220379889011383, -0.01469343900680542, 0.005577679257839918, 0.027588700875639915, 0.056242987513542175, 0.007030373439192772, 0.03719563037157059, -0.06167082116007805, -0.043422650545835495, 0.04139137640595436, -0.03378242254257202, -0.0035859483759850264, -0.00406046723946929, -0.04528742656111717, 0.016608165577054024, 0.006447630934417248, 0.013486329466104507, 0.006339407060295343, 0.03289998322725296, -0.04818449169397354, 0.05874045565724373, 0.012354143895208836, 0.042456962168216705, -0.037628524005413055, -0.007613115943968296, 0.02066238783299923, 0.07858700305223465, -0.011055460199713707, -0.06579996645450592, -0.007979411631822586, -0.06683225184679031, -0.015192932449281216, 0.016549890860915184, 0.03223399072885513, -0.0027055907994508743, -0.04698570445179939, -0.07232668250799179, -0.02564067579805851, 0.005298795644193888, 0.0338989719748497, -0.01829811930656433, -0.07945279777050018, -0.001187338144518435, -0.044421639293432236, 0.04085858166217804, 0.048783883452415466, -0.006922150030732155, 0.0652671754360199, 0.048484187573194504, 0.03972639888525009, -0.07592304050922394, -0.027705248445272446, 0.004002192988991737, 0.002614016877487302, -0.021111933514475822, 0.0314348004758358, -0.0375286266207695, -0.008707839995622635, 0.016092021018266678, 0.020479241386055946, 0.0008366518886759877, 0.0016774663235992193, 0.09743456542491913, 0.02803824469447136, -0.034997858107089996, -0.06636606156826019, 0.03453166410326958, -0.02517448179423809, 0.00990662444382906, 0.027705248445272446, 0.004235289990901947, -0.03479805961251259, 0.004745190031826496, -0.013428054749965668, 0.01648329198360443, 0.028521088883280754, -0.0026036107446998358, -0.03479805961251259, -0.037628524005413055, 0.023159855976700783, 0.02332635410130024, 0.0012778713135048747, -0.03609674423933029, -0.036130040884017944, 0.032417140901088715, 0.001468303264118731, 0.06070513278245926, 0.04795139282941818, -0.01981324888765812, 0.036662835627794266, 0.003662953618913889, -0.003105185693129897, -0.045820221304893494, 0.014085722155869007, -0.022194169461727142, 0.022260768339037895, 0.011679827235639095, -0.029636625200510025, -0.017049383372068405, -0.010397793725132942, -0.0398595966398716, -0.03782832249999046, -0.03479805961251259, 0.0012705870904028416, 0.030452463775873184, 0.032034195959568024, -0.034731458872556686, -0.017399029806256294, -0.022344017401337624, 0.01141343079507351, -0.0471855029463768, 0.006809763610363007, -0.00019147257262375206, -0.04042568802833557, 0.021328380331397057, -0.02201102115213871, -0.007746314629912376, -0.029020583257079124, 0.008582966402173042, 0.008391493931412697, -0.026240067556500435, 0.00321965292096138, 0.07845380902290344, 0.022427266463637352, 0.0181482695043087, -0.005336257629096508, -0.03962649777531624, -0.032683536410331726, 0.011346830986440182, 0.003694172017276287, -0.01133018173277378, -0.08624590933322906, 0.0005520445993170142, 0.0544448122382164, 0.04865068569779396, 0.09223983436822891, 0.027155805379152298, -0.0014121102867648005, 0.025723924860358238, 0.05557699501514435, -0.002351782750338316, -0.021228481084108353, 0.002383001148700714, -0.023925747722387314, -0.0037524462677538395, 0.0320175439119339, 0.037095729261636734, -0.04328945279121399, 0.052879732102155685, -0.0026910221204161644, -0.058640558272600174, 0.015084709040820599, -0.02382584847509861, 0.019030708819627762, -0.044121939688920975, 0.006406006403267384, -0.00579412654042244, -0.011280232109129429, 0.010181345976889133, 0.011388455517590046, -0.02675621211528778, 0.008108447305858135, 0.01744897849857807, 0.09403800964355469, -0.013020135462284088, 0.015742376446723938, 0.052113838493824005, -0.01709933392703533, 0.015875574201345444, -0.005677578039467335, -0.04578692093491554, -0.01618359424173832, -0.003078129841014743, -0.05870715528726578, -0.022493865340948105, -0.013527953997254372, 0.0031884347554296255, 0.007771288976073265, 0.040259189903736115, 0.0030365053098648787, -0.016283493489027023, 0.012612215243279934, -0.054511409252882004, -0.04398874193429947, -0.004187421873211861, 0.037595223635435104, 0.019546853378415108, 0.07718842476606369, -0.06473437696695328, -0.026240067556500435, 0.007180221378803253, -0.006705702748149633, 0.03225064277648926, -0.0057982890866696835, -0.02286016009747982, -0.0003592712455429137, 0.039060406386852264, -0.004337270278483629, -0.0018970353994518518, -0.03583034500479698, -0.02189447358250618, -0.009523679502308369, -0.0641682893037796, 0.06932972371578217, 0.0666990578174591, 0.016050396487116814, -0.039326801896095276, -0.02564067579805851, -0.01635841839015484, 0.04984946921467781, 0.010239620693027973, -0.02985307201743126, -0.07425805926322937, 0.05317942798137665, 0.02452513948082924, 0.028437839820981026, 0.019713349640369415, 0.0034818872809410095, 0.05304623022675514, 0.005519405007362366, -0.02007964625954628, -0.014443691819906235, 0.031950946897268295, -0.04192417114973068, 0.05351242423057556, 0.04189087077975273, -0.00041026121471077204, -0.006210371386259794, -0.06623286008834839, 0.04771829769015312, -0.019779950380325317, -0.06959611922502518, -0.037129029631614685, 0.06793113797903061, 0.04625311493873596, -0.00926560815423727, 0.035963546484708786, 0.04262346029281616, -0.03919360414147377, 0.038361113518476486, -0.014185620471835136, -0.015550903044641018, -0.049982666969299316, 0.0642348900437355, 0.01714928261935711, -0.02645651437342167, -0.05098165571689606, 0.08577971160411835, -0.040292490273714066, -0.04358914867043495, -0.018864210695028305, 0.050881754606962204, 0.0005504836444742978, -0.07452445477247238, 0.007504892535507679, 0.023193156346678734, -0.027388902381062508, -0.01639171689748764, 0.05777476727962494, 0.03378242254257202, -0.027705248445272446, 0.030718861147761345, -0.01071413978934288, -0.05271323397755623, -0.08125097304582596, -0.052113838493824005, 0.00974845141172409, -0.016058722510933876, 0.0725264847278595, 0.03341612592339516, -0.00559016689658165, 0.003687928430736065, 0.006177071947604418, 0.030519064515829086, -0.10682504624128342, 0.006830575875937939, -0.04009269177913666, -0.017548877745866776, -0.06899672746658325, -0.037129029631614685, 0.026822810992598534, 0.08817728608846664, 0.02216086909174919, 0.025107882916927338, -0.006893012672662735, 0.038627512753009796, -0.04259015992283821, -0.1280701756477356, 0.09164044260978699, 0.013644502498209476, -0.07432466000318527, 0.00586072588339448, -0.000663390033878386, -0.006097985431551933, -0.016724713146686554, -0.005481943022459745, -0.02645651437342167, -0.007496567443013191, 0.026856109499931335, 0.05660928413271904, -0.006714027374982834, -0.01919720694422722, 0.056242987513542175, -0.037861619144678116, -0.006077173165977001, -0.025857122614979744, 0.02464168891310692, -0.023426253348588943, 0.004152041394263506, -0.02224411815404892, -0.025657325983047485, 0.03038586489856243, -0.04691910743713379, 0.06063853204250336, -0.0032696023117750883, -0.05417841300368309, -0.0062270211055874825, 0.005827426444739103, -0.015251207165420055, -0.06340239942073822, 0.002339295344427228, -0.043888844549655914, -0.005877375602722168, -0.02695600874722004, 0.03479805961251259, 0.027622001245617867, -0.05411181598901749, -0.010913936421275139, 0.054578009992837906, 0.021328380331397057, -0.016141971573233604, -0.016849586740136147, -0.016724713146686554, -0.01226256974041462, -0.0003808639303315431, -0.09996533393859863, 0.014726738445460796, -0.01849791593849659, -0.04811789095401764, -0.00535706989467144, -0.0034860495943576097, -0.036396440118551254, -0.07652243226766586, 0.036396440118551254, 0.00794611219316721, 0.08611270785331726, 0.0124124176800251, 0.010247944854199886, 0.026506464928388596, 0.01050601713359356, 0.02537427842617035, 0.00845809280872345, 0.0362965390086174, -0.10382808744907379, -0.023842498660087585, -0.01461851503700018, -0.004815951455384493, 0.05557699501514435, -0.009640228003263474, 0.019163906574249268, -0.040991779416799545, 0.010847337543964386, 0.023059958592057228, -0.012553941458463669, 0.017665427178144455, -0.021461578086018562, -0.015475979074835777, 0.06826413422822952, -0.006963774561882019, -0.012753739021718502, -0.018431317061185837, 0.005136460065841675, -0.0006519433227367699, -0.05830756202340126, 0.024625038728117943, -0.060605231672525406, -0.029786473140120506, 0.08038518577814102, 0.01277871336787939, 0.013286531902849674, 0.016291819512844086, 0.00016012413834687322, -0.0181149709969759, 0.07385846227407455, 0.014393743127584457, -0.021461578086018562, 0.05384541675448418, -0.020612439140677452, 0.009199008345603943, -0.013777700252830982, -0.0017940148245543242, 0.05168094485998154, 0.02247721515595913, 0.013461354188621044, -0.02042929083108902, -0.08504712581634521, 0.0025370116345584393, 0.038627512753009796, -0.04112498089671135, -0.03158465027809143, 0.060338836163282394, -0.033965568989515305, 0.019829899072647095, -0.023293055593967438, 0.010930586606264114, -0.00032753258710727096, 0.04015929251909256, 0.0024142195470631123, 0.011829675175249577, 0.0749240517616272, 0.02795499563217163, -0.014676788821816444, 0.0018741418607532978, -0.04931667447090149, -0.022060969844460487, 0.048484187573194504, -0.041291479021310806, -0.04545392468571663, 0.03348272666335106, 0.021911121904850006, 0.0774548202753067, -0.036862634122371674, -0.04741859808564186, 0.035963546484708786, 0.017865223810076714, -0.0023039146326482296, 0.013061759993433952, -0.017865223810076714, -0.035930246114730835, 0.05258003622293472, -0.005515242461115122, -0.002170716179534793, 0.07532364875078201, -0.03211744502186775, -0.00230807694606483, 0.007479917723685503, 0.04322285205125809, 0.015550903044641018, 0.022327367216348648, -0.04661941155791283, 0.025224430486559868, 0.023226456716656685, 0.008549666963517666, -0.06380198895931244, 0.006622453685849905, -0.008158396929502487, 0.007837887853384018, -0.021211830899119377, -0.004457980860024691, 0.038794007152318954, -0.051847442984580994, 0.0006238467758521438, 0.02259376458823681, -0.04272335767745972, -0.06633275747299194, -0.01044774241745472, -0.020096296444535255, 0.020562490448355675, 0.023376304656267166, 0.032616935670375824, 0.03070221096277237, 0.013594552874565125, 0.03105185739696026, 0.03081876039505005, -0.04252356290817261, 0.028754185885190964, 0.018065020442008972, 0.06137112155556679, -0.01826481893658638, -0.036163341253995895, -0.001164444605819881, 0.03371582180261612, -0.03536415100097656, -0.04142467677593231, 0.03692923113703728, -0.04022588953375816, 0.07612283527851105, 0.018797611817717552, -0.004815951455384493, -0.03008616901934147, 0.031917646527290344, -0.06543367356061935, 0.04312295466661453, -0.022027671337127686, -0.05784136801958084, -0.005165596958249807, -0.0111969830468297, -0.00884103775024414, -0.023159855976700783, 0.05874045565724373, -0.006626616232097149, 0.0247915368527174, -0.006564179435372353, 0.005806614179164171 ]
715,977
pytorch_optimizer.optimizer.shampoo_utils
shapes_for_pre_conditioners
Get shapes of pre-conditioner.
def shapes_for_pre_conditioners(self) -> List[List[int]]: r"""Get shapes of pre-conditioner.""" return self.pre_conditioner_shapes
(self) -> List[List[int]]
[ -0.007675793953239918, -0.03626224771142006, 0.002794502070173621, -0.008774779736995697, -0.011751020327210426, 0.0032670232467353344, 0.010690520517528057, -0.039033230394124985, 0.04905666038393974, 0.059901125729084015, 0.027915088459849358, -0.04765406623482704, -0.01811401918530464, -0.0397174246609211, 0.009048456326127052, -0.019790291786193848, 0.008295844309031963, -0.0465935654938221, 0.05343550071120262, -0.047243550419807434, -0.016625897958874702, 0.013615447096526623, 0.0067906188778579235, -0.02765851467847824, 0.008680703118443489, 0.05401706323027611, -0.009202400222420692, -0.014162802137434483, 0.034432027488946915, -0.03225971385836601, -0.05918272212147713, 0.05288814380764961, -0.016463402658700943, -0.021706033498048782, 0.03947795554995537, 0.033884674310684204, 0.03834903612732887, 0.05983270704746246, 0.00072481733513996, 0.020987629890441895, -0.0028821644373238087, -0.03258470818400383, 0.03687801957130432, -0.008843198418617249, -0.007970851846039295, 0.03735695406794548, 0.017686396837234497, -0.045054130256175995, 0.015650922432541847, -0.02617039531469345, 0.03937532752752304, -0.035680681467056274, 0.02634144388139248, 0.033576786518096924, -0.02712826617062092, -0.023707298561930656, 0.011306295171380043, 0.0038122397381812334, -0.007598822005093098, -0.029317684471607208, 0.020919211208820343, 0.026905903592705727, 0.026529597118496895, -0.08333474397659302, 0.04416467994451523, -0.060995835810899734, 0.0031494274735450745, 0.02767561934888363, -0.017387062311172485, 0.031455788761377335, -0.04580674320459366, -0.015599607490003109, -0.009014246985316277, 0.0055334134958684444, 0.01035697665065527, -0.061782658100128174, 0.08135058730840683, -0.009664230979979038, 0.08497681468725204, -0.07758752256631851, -0.007299487479031086, 0.08217161893844604, -0.0005943929427303374, 0.023963870480656624, 0.07149820029735565, -0.035441216081380844, 0.021517880260944366, 0.07895591109991074, -0.02594803273677826, -0.0164206400513649, -0.040675293654203415, 0.04259103536605835, 0.00809486210346222, 0.011810887604951859, -0.01425687875598669, 0.06421154737472534, -0.03299522399902344, -0.07567178457975388, 0.045977793633937836, -0.04101739078760147, -0.022065235301852226, 0.06277474015951157, -0.021517880260944366, 0.014633185230195522, 0.005122897680848837, 0.028257183730602264, -0.008235977031290531, -0.0260335560888052, -0.0551459826529026, 0.00013857588055543602, 0.015308825299143791, -0.02274942770600319, 0.0056574237532913685, 0.02367308922111988, 0.04803037270903587, -0.0510750338435173, -0.03484254702925682, -0.02767561934888363, 0.024169130250811577, 0.018267961218953133, -0.04710670933127403, 0.013555580750107765, -0.002011955948546529, 0.028821643441915512, -0.024990161880850792, 0.03619382530450821, 0.01953371986746788, 0.060995835810899734, -0.052477627992630005, -0.039820052683353424, 0.022133653983473778, 0.007231068331748247, -0.020594218745827675, 0.030737385153770447, -0.02859928086400032, 0.0009578706813044846, 0.043172597885131836, -0.00043563873623497784, 0.04190684109926224, -0.034722812473773956, 0.025212524458765984, -0.0020333370193839073, -0.013230588287115097, 0.007402116432785988, -0.05480388551950455, 0.041222646832466125, 0.04399362951517105, -0.00014311935228761286, 0.010057642124593258, 0.01664300262928009, -0.01797717995941639, 0.04221472889184952, 0.06489573419094086, -0.08388210088014603, 0.005785709712654352, -0.03412414342164993, -0.016899574548006058, -0.07854539155960083, 0.05483809486031532, -0.023159943521022797, -0.05822485312819481, -0.012725995853543282, -0.018661372363567352, -0.021432356908917427, 0.005050201900303364, 0.03432939946651459, -0.011323399841785431, -0.07402972131967545, 0.014855547808110714, 0.026974322274327278, 0.06458785384893417, -0.01587328501045704, -0.011579971760511398, 0.00008772908768150955, -0.04782511293888092, 0.007380735594779253, -0.010314214043319225, 0.051622387021780014, -0.019790291786193848, 0.015445664525032043, 0.058635368943214417, 0.004026050213724375, -0.025451991707086563, 0.011126694269478321, 0.0024395768996328115, 0.02671775035560131, 0.011999040842056274, -0.03540700301527977, 0.015420007519423962, 0.006136358715593815, -0.03101106360554695, 0.04436993598937988, 0.003061765106394887, 0.060140594840049744, -0.01000632718205452, -0.027316419407725334, 0.04276208207011223, 0.0007552853203378618, -0.05134870857000351, -0.06475889682769775, -0.030070297420024872, 0.0008146176696754992, -0.033251795917749405, 0.07964010536670685, -0.001171681098639965, 0.022253388538956642, -0.011058274656534195, 0.01520619634538889, -0.021534984931349754, -0.005020268727093935, -0.022167863324284554, 0.001822733785957098, -0.015804866328835487, 0.007671517785638571, 0.0454646460711956, -0.037391167134046555, 0.04276208207011223, 0.03302943333983421, -0.04108580946922302, -0.0033782045356929302, 0.005636042449623346, 0.0211928877979517, 0.001509501482360065, -0.0065768081694841385, -0.014359507709741592, 0.0007429912220686674, -0.05562491714954376, -0.021432356908917427, -0.014402269385755062, -0.012041802518069744, -0.024870427325367928, -0.047551438212394714, -0.03385046496987343, -0.018575849011540413, -0.024049395695328712, 0.06222738325595856, -0.023878347128629684, -0.06171423941850662, 0.011058274656534195, 0.005101516377180815, -0.009236609563231468, -0.015026596374809742, 0.04679882526397705, -0.02358756586909294, 0.022373121231794357, 0.002507996279746294, 0.03622803837060928, 0.022629695013165474, -0.004661066923290491, -0.013914781622588634, -0.02805192582309246, -0.06198791414499283, 0.016625897958874702, -0.033576786518096924, 0.008885961025953293, -0.004075226373970509, -0.018490325659513474, -0.002268528565764427, 0.03335442394018173, 0.021449461579322815, 0.0015608160756528378, 0.05210132151842117, 0.03046370856463909, 0.023946765810251236, -0.009758307598531246, -0.016745632514357567, 0.003961907234042883, 0.05644594877958298, -0.06640096008777618, 0.0012326170690357685, 0.027401942759752274, 0.02837691828608513, -0.04594358056783676, -0.05774591863155365, 0.0078596705570817, -0.019431089982390404, -0.042146310210227966, 0.0632878839969635, -0.007350801955908537, -0.02102183923125267, 0.045533064752817154, -0.023108629509806633, -0.01386346761137247, 0.04423309862613678, -0.022681009024381638, -0.007641584146767855, -0.008505377918481827, -0.05624069273471832, -0.010391185991466045, -0.017703501507639885, -0.007231068331748247, 0.014581870287656784, -0.011237875558435917, -0.01218719407916069, 0.0630142092704773, -0.07430339604616165, 0.03190051391720772, -0.029044006019830704, 0.017703501507639885, -0.021432356908917427, 0.030840015038847923, 0.0022834951523691416, 0.03109658695757389, 0.025691458955407143, -0.048098791390657425, -0.01547987386584282, 0.06079057604074478, -0.01837059110403061, -0.02822297438979149, -0.05063030496239662, -0.017062071710824966, 0.009467525407671928, -0.0009856660617515445, -0.019242936745285988, 0.026238813996315002, -0.060687948018312454, 0.0042591034434735775, 0.04166737198829651, 0.01891794614493847, 0.08832935988903046, -0.0016891022678464651, 0.0014646013732999563, 0.0018473219824954867, 0.03354257717728615, -0.016771288588643074, 0.010493814945220947, -0.007889604195952415, -0.04573832452297211, -0.04105160012841225, 0.045909371227025986, -0.06650359183549881, -0.02976240962743759, -0.01813112385571003, 0.03369652107357979, 0.027880879119038582, -0.02079947665333748, 0.06729041039943695, 0.014487793669104576, -0.007077124901115894, -0.04806458204984665, 0.0282058697193861, -0.055214401334524155, 0.015420007519423962, 0.06520362198352814, -0.04088054969906807, 0.01819954253733158, 0.035509634763002396, 0.005169935990124941, 0.009860936552286148, 0.09448710083961487, -0.008218872360885143, 0.04077792167663574, 0.0009685611585155129, 0.022253388538956642, 0.04283050075173378, -0.008672150783240795, -0.0847715511918068, 0.026307232677936554, 0.04891982302069664, 0.09216084331274033, 0.1128234788775444, 0.010570786893367767, 0.03557805344462395, 0.018319277092814445, 0.0032050181180238724, 0.020765267312526703, 0.01398320123553276, -0.015035148710012436, -0.009458973072469234, -0.0561380609869957, -0.029351893812417984, 0.0019905748777091503, -0.036467503756284714, -0.02085079252719879, 0.010245795361697674, 0.05675383657217026, 0.019037678837776184, -0.01695089042186737, 0.01898636482656002, 0.014436479657888412, -0.05730118975043297, 0.012845729477703571, -0.0023369479458779097, 0.016548926010727882, -0.04077792167663574, 0.00008786271791905165, -0.09667652100324631, -0.047551438212394714, -0.026905903592705727, -0.014872652478516102, 0.01898636482656002, -0.04707249999046326, -0.014949624426662922, -0.012067459523677826, -0.044575195759534836, 0.010365528985857964, 0.005713014397770166, 0.04549885541200638, 0.010194480419158936, -0.0038827972020953894, 0.027213789522647858, -0.05292235314846039, 0.015753552317619324, 0.017139043658971786, -0.007688622456043959, -0.03906743973493576, 0.003974735736846924, 0.09325554966926575, -0.0015960948076099157, 0.015077910386025906, 0.010177375748753548, 0.0302413459867239, 0.035749100148677826, -0.0010749318171292543, -0.031455788761377335, -0.013760838657617569, -0.031934723258018494, 0.020337646827101707, 0.0770401656627655, -0.0013277627294883132, 0.03260181099176407, 0.04577253386378288, 0.02741904743015766, 0.08566100150346756, 0.018473219126462936, 0.03968321159482002, -0.01819954253733158, 0.032157085835933685, -0.04166737198829651, 0.007962299510836601, 0.019174518063664436, 0.029403207823634148, -0.007564612664282322, -0.052238162606954575, -0.0399910993874073, -0.018267961218953133, 0.01867847703397274, -0.01595025695860386, -0.031233426183462143, -0.019738977774977684, 0.0618852861225605, 0.050356630235910416, -0.0026726301293820143, 0.005965310614556074, 0.016762737184762955, -0.027949297800660133, -0.035749100148677826, -0.00396832125261426, -0.018798211589455605, -0.04344627633690834, -0.007192582357674837, -0.021004734560847282, 0.05425653234124184, 0.015052253380417824, 0.03533858433365822, 0.08367684483528137, -0.01806270331144333, -0.06297999620437622, -0.08367684483528137, -0.04933033883571625, 0.069035105407238, 0.013136511668562889, -0.04289892315864563, 0.008920170366764069, -0.0007510090945288539, 0.008971485309302807, 0.017010755836963654, -0.018336381763219833, 0.007436326239258051, 0.037151698023080826, 0.0958554819226265, -0.02548620104789734, -0.04057266563177109, -0.007337973453104496, -0.04980927333235741, 0.03273865208029747, 0.04026477783918381, 0.03585173189640045, 0.0023583287838846445, -0.012452318333089352, 0.0030553508549928665, -0.01008329913020134, -0.0877135843038559, -0.005845576990395784, 0.005687356926500797, -0.014436479657888412, -0.11877596378326416, -0.021757347509264946, -0.045909371227025986, -0.022287597879767418, -0.01437661238014698, 0.007675793953239918, 0.00917674321681261, 0.0019242936978116632, 0.014188459143042564, 0.035441216081380844, 0.08743990957736969, -0.059422191232442856, 0.06431417167186737, 0.03484254702925682, 0.025178315117955208, 0.005264012608677149, -0.046696193516254425, 0.015103567391633987, 0.0016025090590119362, -0.06489573419094086, 0.015069358050823212, -0.04002530872821808, -0.0620221272110939, 0.019756082445383072, 0.014778575859963894, -0.03701486065983772, 0.05401706323027611, 0.0369122289121151, -0.03674118220806122, -0.016711421310901642, 0.03205445781350136, 0.01946529932320118, -0.013889124616980553, 0.06356155872344971, 0.016369326040148735, -0.03626224771142006, -0.0006211192812770605, 0.00046343408757820725, -0.0007552853203378618, 0.05008295178413391, -0.002281357068568468, -0.04604621231555939, 0.043891001492738724, -0.014282535761594772, 0.022527065128087997, -0.02305731549859047, 0.01128918956965208, 0.07806646078824997, -0.03383335843682289, 0.018096912652254105, 0.012854281812906265, 0.00230487622320652, -0.017994284629821777, 0.009630020707845688, 0.02991635352373123, 0.016745632514357567, 0.022287597879767418, 0.008612283505499363, 0.03975163400173187, 0.002646972890943289, 0.029796618968248367, -0.04433572664856911, -0.06082478538155556, -0.027076950296759605, 0.01370952371507883, -0.022681009024381638, 0.01187930628657341, -0.023382307961583138, 0.08668729662895203, 0.0172587763518095, 0.09202400594949722, -0.014085830189287663, -0.015804866328835487, 0.02163761481642723, -0.029112426564097404, -0.0520671121776104, 0.041154228150844574, -0.03804114833474159, -0.0481330007314682, 0.002689735032618046, -0.01632656343281269, 0.04744880646467209, -0.041222646832466125, -0.013700971379876137, 0.02892427332699299, 0.00373099185526371, 0.03595435991883278, -0.020029759034514427, -0.008505377918481827, -0.034825440496206284, -0.01437661238014698, -0.007834013551473618, -0.0937344878911972, -0.024716483429074287, 0.01837059110403061, -0.013042435050010681, 0.012435213662683964, -0.04984348267316818, -0.006418588571250439, -0.014462136663496494, -0.05808801203966141, 0.0025892441626638174, -0.04837246984243393, 0.024288862943649292, -0.012221403419971466, 0.008646492846310139, -0.006589637137949467, 0.01171681098639965, -0.013512818142771721, 0.011665496043860912, -0.0035449767019599676, -0.043412066996097565, -0.056309111416339874, 0.0520671121776104, 0.05884062498807907, 0.020286332815885544, 0.032926805317401886, 0.03313206136226654, 0.048338260501623154, -0.09428183734416962, 0.0006735028000548482, 0.029796618968248367, -0.03000187687575817, -0.0506645143032074, -0.02991635352373123, 0.010604996234178543, 0.017635082826018333, -0.05018557980656624, -0.011742467992007732, -0.004036740865558386, -0.044506777077913284, 0.009860936552286148, 0.05750644952058792, 0.024100709706544876, 0.015821970999240875, -0.0002792898449115455, 0.04433572664856911, -0.01984160579741001, 0.03125052899122238, -0.03000187687575817, 0.00036107233609072864, -0.11166035383939743, 0.00030708519625477493, -0.033884674310684204, 0.11446554213762283, -0.0022663904819637537, 0.0771770104765892, -0.08572942763566971, -0.023399412631988525, 0.03533858433365822, -0.003767339512705803, -0.02093631587922573, -0.004073088523000479, -0.03834903612732887, -0.02054290473461151, 0.015223301947116852, 0.009279372170567513, 0.000127885359688662, 0.018096912652254105, -0.01883242093026638, -0.06212475523352623, -0.024271758273243904, 0.05148554965853691, 0.03383335843682289, -0.07505600899457932, 0.0234336219727993, -0.009390553459525108, -0.02579408884048462, -0.010185928083956242, 0.03362810239195824, 0.001681618974544108, 0.001505225314758718, -0.06339051574468613, -0.050835564732551575, -0.05993533506989479, 0.0134358461946249, -0.005246907472610474, 0.04720934107899666, -0.023348096758127213, 0.01227271743118763, -0.00035545980790629983, -0.02562304027378559, 0.02165471948683262, 0.01410293485969305, 0.017139043658971786, 0.02564014494419098, -0.015916047617793083, -0.020919211208820343, -0.0021028253249824047, 0.04272787272930145, -0.015830522403120995, -0.00031750847119838, 0.017789026722311974, -0.037699051201343536, -0.019328461959958076, 0.0005262409104034305, -0.036775391548871994, 0.008723464794456959, 0.07649281620979309, -0.03408993408083916, -0.003410276025533676, 0.003589876927435398, -0.0015928875654935837, 0.06687989830970764, 0.01907188817858696, 0.017566664144396782, 0.07580862194299698, 0.024802008643746376, -0.008911618031561375, 0.012529290281236172, -0.014684499241411686, -0.012640471570193768, 0.013957544229924679, 0.03054923191666603, 0.02187708206474781, -0.02805192582309246, -0.07081400603055954, -0.0016976547194644809, -0.03516753762960434, 0.0589432567358017, 0.00949318241328001, -0.0015191229758784175, -0.0227323230355978, -0.01804559864103794, -0.009356344118714333, 0.06332208961248398, 0.039580583572387695, -0.06031164154410362, -0.06537467241287231, -0.008937275037169456, 0.024630960077047348, 0.01520619634538889, 0.0068419333547353745, -0.0005815643235109746, -0.008672150783240795, 0.06376681476831436, 0.021534984931349754, -0.0078596705570817, -0.02861638553440571, 0.05008295178413391, 0.0411200188100338, -0.06756409257650375, -0.02014949358999729, -0.0508013553917408, 0.0342438779771328, 0.01417990680783987, -0.042864713817834854, -0.030207134783267975, 0.006987324450165033, -0.016352221369743347, 0.05104082077741623, -0.027470361441373825, -0.04047003388404846, -0.0006857968983240426, 0.04744880646467209, -0.027607200667262077, -0.032943908125162125, -0.0001046334728016518, 0.021757347509264946, 0.016600240021944046, 0.0123838996514678, 0.005379470065236092, 0.00033835499198175967, -0.04416467994451523, 0.017771922051906586, 0.025691458955407143, 0.043788373470306396, -0.08155584335327148, -0.023775719106197357, -0.01617261953651905, 0.034585971385240555, -0.04156474396586418, -0.02132972702383995, -0.021757347509264946, -0.04221472889184952, -0.022013921290636063, -0.014162802137434483, 0.06079057604074478, 0.03414124622941017, 0.026632225140929222, -0.030908433720469475, 0.007051467429846525 ]
715,978
pytorch_optimizer.optimizer.came
CAME
Confidence-guided Adaptive Memory Efficient Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param clip_threshold: float. threshold of root-mean-square of final gradient update. :param ams_bound: bool. whether to use the AMSBound variant. :param eps1: float. term added to the denominator to improve numerical stability. :param eps2: float. term added to the denominator to improve numerical stability.
class CAME(Optimizer, BaseOptimizer): r"""Confidence-guided Adaptive Memory Efficient Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param clip_threshold: float. threshold of root-mean-square of final gradient update. :param ams_bound: bool. whether to use the AMSBound variant. :param eps1: float. term added to the denominator to improve numerical stability. :param eps2: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 2e-4, betas: BETAS = (0.9, 0.999, 0.9999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, clip_threshold: float = 1.0, ams_bound: bool = False, eps1: float = 1e-30, eps2: float = 1e-16, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps1, 'eps1') self.validate_non_negative(eps2, 'eps2') self.clip_threshold = clip_threshold self.eps1 = eps1 self.eps2 = eps2 defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'ams_bound': ams_bound, 'eps1': eps1, 'eps2': eps2, } super().__init__(params, defaults) def __str__(self) -> str: return 'CAME' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] grad = p.grad grad_shape: Tuple[int, ...] = grad.shape factored: bool = self.get_options(grad_shape) state['exp_avg'] = torch.zeros_like(p) if factored: state['exp_avg_sq_row'] = torch.zeros(grad_shape[:-1], dtype=grad.dtype, device=grad.device) state['exp_avg_sq_col'] = torch.zeros( grad_shape[:-2] + grad_shape[-1:], dtype=grad.dtype, device=grad.device ) state['exp_avg_res_row'] = torch.zeros(grad_shape[:-1], dtype=grad.dtype, device=grad.device) state['exp_avg_res_col'] = torch.zeros( grad_shape[:-2] + grad_shape[-1:], dtype=grad.dtype, device=grad.device ) else: state['exp_avg_sq'] = torch.zeros_like(grad) if group['ams_bound']: state['exp_avg_sq_hat'] = torch.zeros_like(grad) state['RMS'] = 0.0 @staticmethod def get_options(shape: Tuple[int, ...]) -> bool: r"""Get `factored`.""" return len(shape) >= 2 @staticmethod def get_rms(x: torch.Tensor) -> float: r"""Get RMS.""" return x.norm(2) / math.sqrt(x.numel()) @staticmethod def approximate_sq_grad( exp_avg_sq_row: torch.Tensor, exp_avg_sq_col: torch.Tensor, output: torch.Tensor, ): r"""Get approximation of EMA of squared gradient.""" r_factor: torch.Tensor = (exp_avg_sq_row / exp_avg_sq_row.mean(dim=-1, keepdim=True)).rsqrt_().unsqueeze(-1) c_factor: torch.Tensor = exp_avg_sq_col.unsqueeze(-2).rsqrt() torch.mul(r_factor, c_factor, out=output) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2, beta3 = group['betas'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] grad_shape: Tuple[int, ...] = grad.shape factored: bool = self.get_options(grad_shape) if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) if factored: state['exp_avg_sq_row'] = torch.zeros(grad_shape[:-1], dtype=grad.dtype, device=grad.device) state['exp_avg_sq_col'] = torch.zeros( grad_shape[:-2] + grad_shape[-1:], dtype=grad.dtype, device=grad.device ) state['exp_avg_res_row'] = torch.zeros(grad_shape[:-1], dtype=grad.dtype, device=grad.device) state['exp_avg_res_col'] = torch.zeros( grad_shape[:-2] + grad_shape[-1:], dtype=grad.dtype, device=grad.device ) else: state['exp_avg_sq'] = torch.zeros_like(grad) if group['ams_bound']: state['exp_avg_sq_hat'] = torch.zeros_like(grad) state['RMS'] = 0.0 state['RMS'] = self.get_rms(p) update = torch.mul(grad, grad).add_(self.eps1) if factored: exp_avg_sq_row, exp_avg_sq_col = state['exp_avg_sq_row'], state['exp_avg_sq_col'] exp_avg_sq_row.mul_(beta2).add_(update.mean(dim=-1), alpha=1.0 - beta2) exp_avg_sq_col.mul_(beta2).add_(update.mean(dim=-2), alpha=1.0 - beta2) self.approximate_sq_grad(exp_avg_sq_row, exp_avg_sq_col, update) else: exp_avg_sq = state['exp_avg_sq'] exp_avg_sq.mul_(beta2).add_(update, alpha=1.0 - beta2) torch.rsqrt(exp_avg_sq, out=update) if group['ams_bound']: exp_avg_sq_hat = state['exp_avg_sq_hat'] torch.max(exp_avg_sq_hat, 1 / update, out=exp_avg_sq_hat) torch.rsqrt(exp_avg_sq_hat / beta2, out=update) update.mul_(grad) update.div_((self.get_rms(update) / self.clip_threshold).clamp_(min=1.0)) exp_avg = state['exp_avg'] exp_avg.mul_(beta1).add_(update, alpha=1.0 - beta1) res = update - exp_avg res.pow_(2).add_(self.eps2) if factored: exp_avg_res_row, exp_avg_res_col = state['exp_avg_res_row'], state['exp_avg_res_col'] exp_avg_res_row.mul_(beta3).add_(res.mean(dim=-1), alpha=1.0 - beta3) exp_avg_res_col.mul_(beta3).add_(res.mean(dim=-2), alpha=1.0 - beta3) self.approximate_sq_grad(exp_avg_res_row, exp_avg_res_col, update) update.mul_(exp_avg) else: update = exp_avg self.apply_weight_decay( p=p, grad=grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) update.mul_(group['lr']) p.add_(-update) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.0002, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999, 0.9999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, clip_threshold: float = 1.0, ams_bound: bool = False, eps1: float = 1e-30, eps2: float = 1e-16)
[ 0.007412360515445471, -0.04692747816443443, -0.01598847284913063, 0.02342180162668228, 0.019636990502476692, -0.0213878583163023, -0.0577891543507576, -0.06651204824447632, -0.013451285660266876, -0.010714897885918617, -0.02178625948727131, -0.011343952268362045, 0.03195597603917122, 0.09444206953048706, -0.005478017497807741, 0.05317608639597893, 0.00041609344771131873, 0.025246059522032738, 0.0371142253279686, -0.02600092627108097, -0.04285959154367447, -0.0940227061510086, -0.06366033107042313, 0.017655467614531517, -0.031054330989718437, -0.00284385122358799, 0.0470113530755043, -0.01679576002061367, -0.043153148144483566, 0.02059105597436428, -0.026692885905504227, -0.06844114512205124, 0.012423829175531864, -0.0014088202733546495, 0.026776760816574097, -0.0915064811706543, 0.03438832238316536, -0.005593344569206238, -0.07913507521152496, -0.029607506468892097, -0.00020198551646899432, -0.05082761496305466, 0.04495643824338913, -0.0003155102313030511, -0.032165661454200745, 0.014143245294690132, -0.017246581614017487, 0.04019659385085106, -0.009210408665239811, -0.038288459181785583, -0.004555404186248779, -0.09536468982696533, 0.05623748525977135, 0.04688553884625435, 0.002043117070570588, 0.049275949597358704, 0.03166241943836212, -0.015485228970646858, 0.02759453095495701, -0.08332877606153488, 0.03537384048104286, -0.07154448330402374, 0.041769228875637054, -0.02001442201435566, -0.01646026410162449, 0.004151760600507259, -0.07200579345226288, -0.009220892563462257, 0.0133149903267622, 0.010442307218909264, -0.012581093236804008, -0.03747069090604782, 0.03172532469034195, -0.015590071678161621, -0.035331904888153076, -0.030068812891840935, -0.04785009101033211, -0.0032972947228699923, -0.020769288763403893, -0.05061793327331543, 0.021125752478837967, 0.04994694143533707, -0.03099142573773861, -0.01831597462296486, 0.024763785302639008, -0.042020849883556366, 0.010924582369625568, 0.00014489552995655686, 0.00802568905055523, -0.03390604630112648, 0.04302733764052391, -0.008088594302535057, 0.04019659385085106, 0.06860889494419098, 0.05229540914297104, 0.021995944902300835, -0.04801783710718155, -0.04785009101033211, 0.008298279717564583, -0.02897845208644867, -0.02008781209588051, 0.04889851436018944, 0.02543477714061737, 0.06634429842233658, 0.009241861291229725, -0.04319508746266365, -0.027489688247442245, -0.03317214921116829, 0.06693141907453537, -0.059047263115644455, -0.06848308444023132, -0.0047624679282307625, -0.039672382175922394, -0.035164155066013336, -0.004862068220973015, -0.004563267342746258, -0.028705861419439316, 0.03929494693875313, -0.04457900673151016, 0.054434195160865784, 0.06525393575429916, 0.0057191550731658936, -0.05426644906401634, 0.011480247601866722, 0.02356858178973198, -0.0037271487526595592, 0.03155757486820221, 0.0027494931127876043, 0.008219647221267223, -0.06135379895567894, -0.03132692351937294, -0.0022174175828695297, -0.010515697300434113, -0.011333468370139599, 0.014227119274437428, -0.010049148462712765, 0.03138982877135277, 0.005603828467428684, -0.027804216369986534, 0.0062328833155334, 0.020853161811828613, 0.0691121369600296, -0.002791430102661252, -0.04713716357946396, 0.007920846343040466, -0.0008243236807174981, 0.031033363193273544, -0.00932049285620451, -0.0027127983048558235, 0.0032632211223244667, 0.006164735648781061, -0.005053405649960041, -0.021272530779242516, 0.003417863743379712, 0.022499188780784607, -0.004212045110762119, -0.014531162567436695, 0.028307460248470306, -0.032333411276340485, 0.003910623025149107, -0.054392259567976, -0.03430444747209549, -0.03990303352475166, 0.0024651079438626766, 0.018284521996974945, -0.0061227986589074135, -0.024281509220600128, 0.006468778941780329, -0.03990303352475166, 0.01994103193283081, 0.01953214779496193, -0.06982506811618805, -0.020632993429899216, 0.0014179940335452557, -0.06508618593215942, 0.09947451204061508, -0.0012043776223435998, 0.005865934770554304, -0.00667846342548728, -0.007873667404055595, 0.028475208207964897, -0.02107333019375801, -0.03432541713118553, -0.02495250105857849, -0.02769937366247177, 0.05237928405404091, 0.01165847945958376, 0.011574605479836464, 0.006390146911144257, 0.02671385370194912, -0.019353915005922318, -0.043949950486421585, 0.008114805445075035, -0.04002884402871132, -0.01888212375342846, -0.008272068575024605, 0.008460785262286663, 0.027217097580432892, 0.07594786584377289, 0.030320433899760246, -0.07041218131780624, -0.004801783710718155, 0.009524935856461525, -0.026839666068553925, -0.005446564871817827, -0.03593998774886131, 0.001274490961804986, 0.015873145312070847, -0.029209105297923088, 0.029754284769296646, -0.07326389849185944, 0.016040893271565437, 0.02841230295598507, 0.06269577890634537, 0.06793790310621262, -0.027384845539927483, 0.0305930245667696, 0.027804216369986534, 0.03384314104914665, 0.026839666068553925, -0.022541124373674393, -0.07351551949977875, -0.029334915801882744, 0.013178694993257523, 0.04357251897454262, -0.008329732343554497, 0.01871437579393387, 0.024826690554618835, -0.004033812787383795, -0.008141015656292439, 0.02147173322737217, -0.0004350961244199425, -0.017634499818086624, -0.014436804689466953, 0.0382465235888958, 0.07519300282001495, -0.02033943310379982, 0.01930149458348751, -0.03390604630112648, -0.030949488282203674, -0.014069856144487858, -0.015265059657394886, -0.018284521996974945, 0.026189642027020454, -0.007412360515445471, -0.014929563738405704, 0.08915801346302032, 0.033297959715127945, -0.04246119037270546, 0.022708872333168983, -0.01222462859004736, -0.0144472885876894, -0.009131777100265026, 0.03579321131110191, -0.08039318770170212, -0.05288252979516983, 0.015097311697900295, 0.059215012937784195, 0.03392701596021652, -0.06814758479595184, 0.022415313869714737, -0.018032900989055634, -0.016292516142129898, 0.05191797763109207, -0.004993121139705181, 0.05640523508191109, 0.044033825397491455, -0.020140232518315315, -0.003525327192619443, 0.03732391074299812, 0.04059499502182007, 0.07997381687164307, -0.07401876151561737, -0.0004426316882018, -0.019993454217910767, 0.03673679381608963, -0.009635020978748798, 0.014594067819416523, -0.02107333019375801, 0.026923539116978645, 0.06584105640649796, -0.027657436206936836, -0.05200185254216194, 0.011480247601866722, -0.015957020223140717, 0.020119264721870422, -0.035478681325912476, -0.005472775548696518, 0.06512812525033951, 0.021849164739251137, 0.02283468469977379, 0.0028097773902118206, 0.07460588216781616, -0.008911607787013054, 0.0676862820982933, 0.010667718946933746, 0.022163692861795425, 0.02413473092019558, -0.03027849830687046, 0.023631487041711807, 0.0597601942718029, 0.02155560627579689, 0.04365639388561249, 0.0057925451546907425, -0.02212175540626049, -0.01735142432153225, -0.022058850154280663, 0.023799235001206398, 0.07578011602163315, -0.002159754280000925, -0.007008717395365238, -0.020685413852334023, -0.021974975243210793, 0.033381834626197815, -0.013975497335195541, -0.036128707230091095, 0.019196651875972748, -0.021933039650321007, 0.0390852615237236, 0.052840590476989746, -0.04520806297659874, 0.015600555576384068, 0.03581417724490166, -0.007988994009792805, -0.021366890519857407, -0.07234128564596176, 0.03027849830687046, 0.025770273059606552, -0.013545643538236618, -0.043320897966623306, -0.0654216855764389, -0.04042724519968033, 0.020853161811828613, 0.020968489348888397, -0.030551087111234665, -0.027867121621966362, 0.009063629433512688, 0.004301161039620638, 0.03090755268931389, -0.03698841482400894, 0.06252803653478622, 0.060011815279722214, -0.03812071308493614, 0.03310924395918846, 0.013849686831235886, -0.07011862844228745, 0.04566936939954758, 0.008272068575024605, -0.032585032284259796, 0.019720863550901413, -0.029775254428386688, -0.027468720450997353, 0.022645967081189156, 0.10014550387859344, 0.07825440168380737, 0.03698841482400894, -0.045166123658418655, -0.047598470002412796, 0.028957482427358627, -0.06663785874843597, -0.012591577135026455, 0.0355415865778923, -0.06273771822452545, 0.06013762578368187, 0.03157854452729225, 0.005677218083292246, -0.013650486245751381, -0.03044624626636505, 0.04271281138062477, -0.0620247907936573, -0.005745365750044584, -0.08169323205947876, 0.0015398734249174595, -0.009456788189709187, -0.02929297834634781, -0.01235044002532959, -0.054601944983005524, 0.019521662965416908, 0.05229540914297104, 0.018378879874944687, 0.043069276958703995, 0.010064874775707722, -0.049527570605278015, 0.008827733807265759, 0.02939782105386257, -0.02237337827682495, -0.006175220012664795, -0.009367672726511955, 0.0495695061981678, -0.030970457941293716, 0.05242122337222099, 0.04466288164258003, 0.007637771777808666, -0.0389384850859642, -0.06743466109037399, 0.08773215860128403, 0.033864110708236694, 0.05464388057589531, -0.09016449749469757, -0.02597995661199093, -0.03042527660727501, -0.010038663633167744, 0.02348470687866211, 0.011081846430897713, -0.03566740080714226, -0.05707622691988945, 0.029775254428386688, 0.03461897373199463, 0.005024574231356382, 0.08806765079498291, -0.03820458799600601, 0.015044890344142914, -0.035688366740942, 0.030320433899760246, -0.05883757770061493, -0.024155698716640472, -0.009713652543723583, -0.027909059077501297, 0.013440800830721855, 0.030152685940265656, 0.047346848994493484, 0.023065337911248207, 0.03575127199292183, 0.02688160166144371, -0.00611755670979619, -0.02631545253098011, -0.08580305427312851, 0.005991745740175247, -0.06802177429199219, -0.0458790548145771, -0.02486862801015377, 0.006709916517138481, -0.019815221428871155, -0.040574025362730026, -0.028055837377905846, 0.011763322167098522, -0.011731869541108608, 0.023715360090136528, 0.023946013301610947, -0.02066444605588913, 0.031096268445253372, -0.011585090309381485, 0.02665094844996929, 0.007459539920091629, -0.008455542847514153, -0.016900602728128433, 0.01936439983546734, -0.017393361777067184, -0.0917581096291542, 0.010112053714692593, 0.028517143800854683, 0.020853161811828613, 0.02767840586602688, 0.016690917313098907, 0.01380774937570095, -0.006720400415360928, 0.00341000035405159, -0.007134528364986181, 0.0072970339097082615, 0.004670730791985989, -0.027217097580432892, 0.027405815199017525, -0.032815683633089066, 0.006872422061860561, -0.010966519825160503, 0.058166585862636566, 0.07162835448980331, 0.013786781579256058, -0.0034519373439252377, 0.026860633864998817, -0.015558618120849133, -0.02872682921588421, 0.019678926095366478, -0.03866589441895485, -0.02574930340051651, -0.008177710697054863, -0.01888212375342846, 0.028768766671419144, 0.034010887145996094, -0.003535811323672533, 0.048646893352270126, -0.0705379992723465, 0.020549118518829346, 0.016271546483039856, 0.027468720450997353, 0.042188599705696106, 0.016732854768633842, -0.00939912535250187, -0.003677348606288433, 0.019899096339941025, -0.06496037542819977, -0.04449513182044029, 0.04592099040746689, 0.033549580723047256, -0.08571918308734894, -0.043782204389572144, 0.02858005091547966, 0.011868164874613285, 0.07502525299787521, -0.027992932125926018, 0.01702641323208809, -0.0039158654399216175, -0.08655792474746704, -0.030949488282203674, 0.017844183370471, -0.018766798079013824, -0.08341264724731445, -0.0068252431228756905, -0.025938021019101143, 0.011742353439331055, -0.015590071678161621, -0.042419251054525375, 0.0529664009809494, -0.015306997112929821, 0.016586074605584145, -0.011291530914604664, 0.031222078949213028, 0.03954656794667244, 0.03463994339108467, -0.01412227749824524, -0.0010123848915100098, 0.028601018711924553, -0.015726367011666298, -0.002898893551900983, 0.018137741833925247, 0.04545968398451805, -0.006626042537391186, 0.0024441394489258528, 0.03843523934483528, -0.004940700251609087, -0.01199397537857294, -0.006301030982285738, 0.028852639719843864, 0.06546362489461899, 0.006175220012664795, -0.014300509355962276, 0.020968489348888397, -0.03044624626636505, -0.07213160395622253, -0.02551865018904209, -0.024491194635629654, -0.0013242911081761122, 0.02526702918112278, -0.04344670847058296, -0.03187210112810135, 0.03887557610869408, 0.01513924915343523, 0.03570933640003204, -0.016449779272079468, -0.021828196942806244, -0.024994438514113426, 0.007186949253082275, 0.029125230386853218, 0.016491716727614403, 0.05355352163314819, 0.010237864218652248, -0.002917241072282195, 0.004901384003460407, -0.0033549582585692406, -0.019353915005922318, -0.020874129608273506, -0.05149860680103302, 0.02212175540626049, -0.04789202660322189, 0.006463536527007818, 0.0077950358390808105, 0.003829370252788067, 0.027636468410491943, -0.026671918109059334, 0.014793268404901028, -0.030634962022304535, 0.0009370293118990958, 0.0040600234642624855, 0.0004698252014350146, -0.03231244161725044, 0.00008674074342707172, 0.006788548082113266, -0.012528671883046627, 0.009268072433769703, -0.016502199694514275, 0.07825440168380737, -0.06198285147547722, -0.018137741833925247, -0.024889595806598663, 0.028202617540955544, 0.0611860491335392, -0.06038924679160118, 0.04780815541744232, 0.008093836717307568, 0.03067689947783947, -0.025141218677163124, 0.04776621609926224, -0.02858005091547966, -0.03659001365303993, -0.00022393690596800297, 0.04132889211177826, -0.051792167127132416, 0.040804680436849594, 0.02356858178973198, 0.022100787609815598, -0.030173655599355698, 0.0064215995371341705, 0.05866983160376549, -0.04940176010131836, -0.002099470002576709, -0.020203139632940292, -0.00411768676713109, 0.024910563603043556, 0.032983433455228806, -0.016407841816544533, -0.023862140253186226, -0.010437064804136753, -0.026336422190070152, -0.013902108184993267, -0.022813715040683746, -0.028055837377905846, -0.03665291890501976, 0.02688160166144371, 0.08236422389745712, 0.034346383064985275, -0.0009075424168258905, 0.017372392117977142, -0.024805722758173943, 0.021660448983311653, 0.024910563603043556, -0.0247847530990839, 0.03633838891983032, -0.07498331367969513, -0.04558549448847771, -0.03325602412223816, 0.0074228448793292046, 0.02260403148829937, 0.01735142432153225, -0.036464203149080276, 0.029754284769296646, 0.013147242367267609, 0.0566568560898304, 0.029607506468892097, -0.033717330545186996, -0.018693407997488976, 0.0008623290923424065, 0.032564062625169754, 0.006442568264901638, -0.011480247601866722, -0.019731348380446434, 0.022583061829209328, -0.0062328833155334, 0.007490992546081543, 0.04923401027917862, 0.03558352589607239, 0.002524081850424409, 0.024763785302639008, -0.03990303352475166, -0.019678926095366478, 0.014531162567436695, 0.009032176807522774, -0.016837695613503456, 0.032564062625169754, 0.011270562186837196, -0.025728335604071617, -0.005897387396544218, 0.003981391899287701, 0.010893129743635654, -0.021681416779756546, -0.020287012681365013, 0.005281438119709492, -0.0018046005861833692, 0.04170632362365723, 0.010442307218909264, 0.08030930906534195, -0.1178429052233696, -0.043153148144483566, -0.04810171201825142, 0.012843199074268341, 0.006557894870638847, -0.002741629956290126, 0.03963044285774231, -0.04067886620759964, -0.03438832238316536, 0.0001314625988015905, 0.06479263305664062, 0.05082761496305466, -0.010505212470889091, 0.021891102194786072, 0.05716010183095932, -0.017257066443562508, -0.016124768182635307, 0.028768766671419144, 0.006741369143128395, -0.03864492475986481, -0.06072474271059036, -0.015789272263646126, 0.026336422190070152, -0.029691379517316818, 0.026839666068553925, -0.07175416499376297, -0.06022150069475174, 0.0016145736444741488, 0.01251818798482418, -0.046382296830415726, -0.00819343701004982, 0.008293037302792072, -0.043069276958703995, -0.010735866613686085, 0.019574083387851715, 0.0660087987780571, -0.007150254677981138, 0.014300509355962276, 0.0031216838397085667, -0.02444925718009472, -0.0029198620468378067, 0.03619161248207092, -0.002225280739367008, 0.03679969906806946, 0.034912534058094025, 0.0012273119064047933, 0.037806186825037, -0.005514712538570166, -0.032983433455228806, 0.055901989340782166, 0.0014979364350438118, 0.05741172283887863, 0.043069276958703995, -0.009467273019254208, -0.059298884123563766, -0.04449513182044029, -0.0026394084561616182, -0.03210275620222092, 0.0611860491335392, -0.009367672726511955, 0.047430720180273056, 0.013933560810983181, 0.015327964909374714, 0.05682460591197014, -0.031138205900788307, -0.007716403808444738, 0.05942469835281372, -0.015118280425667763, 0.009315251372754574, 0.020727351307868958, 0.001062185037881136, 0.022226598113775253, -0.01383920293301344, -0.031683385372161865, -0.011165720410645008, 0.04453707113862038, -0.019657958298921585, -0.03212372586131096, 0.02793002687394619, -0.04189503937959671, 0.05682460591197014, 0.013681938871741295, 0.06802177429199219, 0.05988600477576256, 0.08009962737560272, -0.029334915801882744, 0.008177710697054863, -0.058166585862636566, -0.06181510537862778, -0.07888345420360565, 0.015873145312070847, -0.03623354807496071, 0.028936514630913734, 0.014877142384648323, -0.02065396122634411, 0.0002621060993988067, 0.017969993874430656, 0.00823537353426218 ]
715,980
pytorch_optimizer.optimizer.came
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 2e-4, betas: BETAS = (0.9, 0.999, 0.9999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, clip_threshold: float = 1.0, ams_bound: bool = False, eps1: float = 1e-30, eps2: float = 1e-16, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps1, 'eps1') self.validate_non_negative(eps2, 'eps2') self.clip_threshold = clip_threshold self.eps1 = eps1 self.eps2 = eps2 defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'ams_bound': ams_bound, 'eps1': eps1, 'eps2': eps2, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.0002, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999, 0.9999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, clip_threshold: float = 1.0, ams_bound: bool = False, eps1: float = 1e-30, eps2: float = 1e-16)
[ 0.014767813496291637, -0.04255228117108345, -0.015535701997578144, -0.013990560546517372, -0.0540144257247448, -0.031633272767066956, -0.08720220625400543, -0.02977910451591015, -0.02226877585053444, 0.028973756358027458, -0.04633553698658943, 0.053490012884140015, 0.016584526747465134, 0.05772276595234871, -0.06678760051727295, 0.0642404556274414, 0.03043461963534355, 0.009795265272259712, 0.002032096032053232, -0.00043105953955091536, 0.007187252398580313, -0.017830004915595055, -0.035416532307863235, 0.10907767713069916, 0.016537703573703766, 0.03433024883270264, -0.018888192251324654, 0.007201299071311951, -0.049631841480731964, 0.010226031765341759, 0.007983234710991383, -0.026276782155036926, -0.0012068497017025948, 0.04708469659090042, 0.043338898569345474, -0.02457244321703911, -0.0017769135301932693, 0.005192614160478115, -0.09147241711616516, 0.03721451386809349, 0.06772404909133911, -0.04524925351142883, 0.0608692392706871, -0.02333632856607437, -0.025340331718325615, -0.011921006254851818, 0.0365215428173542, 0.0530405156314373, -0.012436053715646267, -0.03571619465947151, 0.0027414567302912474, -0.03504195064306259, 0.04172820225358009, -0.010132387280464172, -0.061730772256851196, 0.04296431690454483, 0.04105395823717117, 0.07150730490684509, 0.04060446470975876, 0.011424687691032887, -0.003570214845240116, -0.028655363246798515, 0.02369217947125435, -0.024478798732161522, 0.010581882670521736, -0.0034086774103343487, -0.10128641128540039, -0.01667817123234272, 0.01975909061729908, 0.041578371077775955, 0.0995633453130722, -0.01004810631275177, -0.026201866567134857, 0.037589095532894135, -0.009935732930898666, -0.007585243321955204, -0.07753804326057434, -0.027924932539463043, -0.05596224218606949, -0.019403239712119102, 0.05689869076013565, 0.058359552174806595, -0.018972473219037056, -0.05764785036444664, 0.023598534986376762, -0.04296431690454483, -0.030528264120221138, -0.03462991490960121, 0.03899376839399338, 0.019440697506070137, -0.05300305783748627, -0.012773175723850727, 0.015179851092398167, -0.011415323242545128, 0.07323037832975388, 0.01248287595808506, 0.012679530307650566, -0.06296688318252563, 0.02320522628724575, -0.014533701352775097, -0.03854427486658096, 0.0013765812618657947, -0.051954235881567, 0.017389873042702675, 0.023392517119646072, -0.02861790545284748, -0.045848581939935684, -0.03669010475277901, 0.024984480813145638, -0.055250540375709534, -0.02138851396739483, 0.04371347650885582, -0.045436546206474304, 0.02191292494535446, -0.0584719255566597, 0.024122947826981544, 0.012745081447064877, 0.02063935436308384, 0.00354212149977684, 0.017314957454800606, 0.05311543494462967, 0.02623932436108589, -0.026819922029972076, 0.05060574784874916, 0.02537778951227665, -0.0059136804193258286, 0.0031394478864967823, 0.006166521925479174, 0.006264849100261927, -0.030940301716327667, 0.020283503457903862, -0.010750443674623966, -0.036034587770700455, -0.01096582692116499, 0.022156402468681335, -0.031970396637916565, 0.012501604855060577, 0.058696672320365906, -0.03560382127761841, 0.006859494838863611, 0.05933345854282379, 0.016256768256425858, 0.03391821309924126, -0.04146599769592285, -0.017343049868941307, 0.005122380331158638, -0.009860816411674023, -0.043338898569345474, -0.0020999887492507696, 0.04697232320904732, 0.010919004678726196, 0.0036053317598998547, -0.02740052156150341, 0.02835570089519024, 0.021407242864370346, -0.03929343447089195, 0.025284145027399063, -0.022493524476885796, 0.0016762451268732548, 0.005871540401130915, -0.038132235407829285, 0.028711551800370216, 0.017642714083194733, -0.04865793138742447, -0.0041203792206943035, 0.01856979914009571, -0.03187675029039383, 0.012286221608519554, 0.0007667182944715023, -0.012735716998577118, -0.002790620317682624, -0.09342022985219955, -0.050043877214193344, 0.02861790545284748, -0.014468149282038212, 0.04285194352269173, 0.029535626992583275, 0.009917003102600574, -0.017858097329735756, -0.018888192251324654, 0.06540165096521378, 0.005122380331158638, -0.025396518409252167, -0.06349129974842072, 0.01367216743528843, 0.02537778951227665, -0.021538345143198967, 0.057947512716054916, -0.058284636586904526, 0.01851361244916916, 0.04985658824443817, 0.009720348753035069, 0.026538986712694168, 0.019796548411250114, -0.02530287392437458, -0.0009165502269752324, 0.03861919045448303, -0.014196579344570637, 0.0011576861143112183, 0.044350262731313705, 0.06083177775144577, 0.01281999796628952, 0.019534343853592873, -0.028767738491296768, 0.03599712997674942, -0.01877581886947155, -0.017314957454800606, 0.010160480625927448, -0.032775744795799255, -0.02631423994898796, -0.011003285646438599, -0.024741003289818764, 0.04974421486258507, 0.024441340938210487, 0.004874221049249172, -0.050568290054798126, -0.0029732282273471355, 0.02556508034467697, 0.0017195559339597821, 0.016275497153401375, 0.07828720659017563, -0.035753652453422546, -0.026426613330841064, -0.006494279485195875, 0.04060446470975876, 0.04438772052526474, 0.034536268562078476, -0.03522924333810806, -0.04873284697532654, 0.020489521324634552, 0.0011249103117734194, -0.042252615094184875, -0.04161582887172699, -0.01366280298680067, 0.0030926254112273455, 0.012913642451167107, -0.02755035273730755, 0.028449345380067825, -0.08517947793006897, -0.043601103127002716, 0.05888396501541138, 0.02949816919863224, -0.002125740982592106, -0.002703998936340213, 0.02537778951227665, -0.012745081447064877, 0.032026585191488266, -0.00306219095364213, -0.03674628958106041, -0.018972473219037056, -0.028936298564076424, -0.013953101821243763, -0.004892950411885977, 0.04229007288813591, -0.04262719675898552, 0.004239776637405157, 0.0041437903419137, -0.015264132060110569, 0.02563999593257904, -0.004064192064106464, 0.0010927198454737663, 0.016041385009884834, -0.006517690606415272, 0.07169459760189056, 0.005848129279911518, 0.042252615094184875, -0.012698259204626083, -0.009954461827874184, 0.022044029086828232, 0.009149114601314068, 0.08855069428682327, 0.013035381212830544, 0.0014023336116224527, 0.0020660425070673227, -0.014852093532681465, -0.008151795715093613, -0.0031160367652773857, -0.029179776087403297, 0.0031090134289115667, 0.047946229577064514, 0.0540144257247448, -0.0221189446747303, 0.01861662231385708, 0.001101499074138701, 0.02374836802482605, -0.0011647094506770372, -0.019871465861797333, 0.015104935504496098, 0.0017019974766299129, -0.001967715099453926, -0.003635766450315714, 0.006185250822454691, 0.10548170655965805, 0.010535060428082943, 0.09484363347291946, -0.01955307275056839, 0.04262719675898552, -0.02077045664191246, 0.059633124619722366, -0.020114941522479057, 0.04802114516496658, -0.04026734083890915, 0.0540144257247448, 0.007894271984696388, -0.05487595871090889, -0.02401057258248329, 0.019646717235445976, 0.02854298986494541, 0.05907125398516655, 0.03363727778196335, 0.0332065112888813, 0.007182570174336433, 0.06274213641881943, -0.0023680473677814007, 0.051467280834913254, -0.03577238321304321, 0.02361726388335228, -0.05363984405994415, 0.02226877585053444, 0.047946229577064514, -0.012492240406572819, 0.022699544206261635, 0.01660325564444065, -0.030359702184796333, -0.04693486541509628, -0.06116890162229538, 0.021463429555296898, 0.02247479557991028, -0.03369346261024475, -0.005820035468786955, -0.04671011492609978, 0.006480232812464237, 0.021800551563501358, -0.030078768730163574, -0.0551007054746151, 0.0043989731930196285, 0.004813352134078741, 0.05611207336187363, -0.008493599481880665, -0.046859949827194214, 0.09529313445091248, -0.009748442098498344, -0.008629385381937027, 0.04135362431406975, -0.002021560911089182, -0.030528264120221138, -0.007224710192531347, -0.025677453726530075, 0.032513536512851715, 0.001407015835866332, 0.0007661330164410174, 0.006775214336812496, 0.002469886327162385, 0.10690511018037796, 0.027157044038176537, -0.018757089972496033, -0.007383906748145819, -0.01579790748655796, 0.041990410536527634, -0.05719835311174393, -0.02740052156150341, 0.013925008475780487, -0.045698750764131546, 0.042926859110593796, 0.025752369314432144, -0.004935090430080891, 0.01004810631275177, -0.04172820225358009, 0.010666163638234138, -0.008175206370651722, 0.01113438792526722, -0.06000770255923271, -0.035285428166389465, -0.030472077429294586, 0.015048748813569546, -0.019365781918168068, -0.0452117957174778, 0.00692036421969533, 0.05000641942024231, 0.013484877534210682, 0.019403239712119102, 0.017577162012457848, 0.04281448572874069, 0.03348744660615921, 0.015451421961188316, -0.03174564987421036, -0.0010979874059557915, 0.020995205268263817, 0.08308182656764984, 0.012361137196421623, 0.01975909061729908, 0.0029615224339067936, 0.020526979118585587, -0.02496575191617012, -0.056336820125579834, 0.0376078225672245, 0.037645284086465836, 0.04914488643407822, -0.03584729880094528, -0.03963055461645126, -0.017240041866898537, -0.02659517526626587, -0.020339690148830414, 0.0332065112888813, -0.017577162012457848, -0.0070608314126729965, 0.020470792427659035, 0.036502812057733536, 0.014205943793058395, 0.07218155264854431, -0.011190575547516346, -0.0071685235016047955, -0.015226674266159534, -0.010132387280464172, -0.03693358227610588, -0.02949816919863224, -0.004722048062831163, -0.0034391118679195642, 0.010207302868366241, -0.02706339955329895, 0.02931087836623192, 0.013625344261527061, 0.0836811512708664, 0.007524374406784773, 0.07083306461572647, 0.04105395823717117, -0.031221237033605576, -0.0067939432337880135, -0.006517690606415272, -0.07903636246919632, -0.04906997084617615, -0.004370879381895065, -0.046522825956344604, -0.041503455489873886, 0.018963107839226723, 0.0231490395963192, -0.017024656757712364, -0.014280859380960464, 0.015011290088295937, -0.026033304631710052, 0.015133028849959373, -0.05270339548587799, 0.014861458912491798, -0.023935656994581223, -0.05813480541110039, -0.04330144077539444, 0.008100290782749653, -0.01079726591706276, -0.051467280834913254, -0.016724994406104088, 0.02462862990796566, 0.01532031875103712, 0.05581240728497505, -0.011499603278934956, -0.01983400620520115, -0.02788747474551201, -0.02781255915760994, -0.011022014543414116, 0.028973756358027458, -0.03193293884396553, 0.041578371077775955, -0.01960925944149494, -0.025209229439496994, -0.019309595227241516, -0.053827136754989624, 0.03451754152774811, 0.07225646823644638, -0.010235396213829517, -0.0036381075624376535, 0.013419325463473797, 0.010113658383488655, -0.01384072843939066, 0.043676018714904785, -0.022587168961763382, -0.013925008475780487, 0.03457372635602951, -0.008357814513146877, -0.019290866330266, -0.00930831115692854, 0.00010974021279253066, 0.011331042274832726, -0.04790877178311348, -0.004630744457244873, 0.07409191131591797, 0.0030926254112273455, 0.0004372050170786679, -0.06277959793806076, 0.007561832200735807, 0.001732432167045772, 0.03801986202597618, -0.07851195335388184, 0.001595476409420371, 0.019796548411250114, 0.0686979591846466, -0.03740180656313896, -0.0016715629026293755, 0.028262054547667503, 0.028130952268838882, 0.04135362431406975, 0.006882905960083008, -0.00428659887984395, -0.03861919045448303, -0.049631841480731964, -0.03936835005879402, 0.026014575734734535, -0.0342366062104702, -0.11529570072889328, -0.00020192198280710727, -0.026745006442070007, -0.00044744741171598434, -0.009486236609518528, -0.00980462972074747, -0.027456708252429962, 0.019908923655748367, -0.02556508034467697, -0.022156402468681335, -0.049669299274683, 0.0485830157995224, -0.008151795715093613, -0.026745006442070007, 0.0386941060423851, 0.05435154587030411, 0.037177056074142456, -0.04599841311573982, 0.015657441690564156, 0.0292921494692564, 0.009832723066210747, -0.03959309682250023, 0.08690254390239716, 0.018213948234915733, 0.018607256934046745, -0.059370916336774826, -0.026014575734734535, 0.04041717201471329, 0.0069765509106218815, 0.04420043155550957, 0.0013765812618657947, -0.0303222443908453, -0.04933217540383339, -0.026838650926947594, 0.008301627822220325, 0.027756372466683388, 0.006311671808362007, -0.03985530510544777, -0.016771815717220306, 0.03382456675171852, -0.03618441894650459, 0.07087051868438721, -0.06974678486585617, -0.013100933283567429, 0.036708831787109375, -0.02786874584853649, -0.037851300090551376, 0.02511558309197426, 0.02794366143643856, -0.008929048664867878, 0.0064989617094397545, -0.009701619856059551, 0.05562511831521988, 0.026763735339045525, -0.030415888875722885, -0.006311671808362007, 0.004462183453142643, -0.00886817928403616, -0.0431516058743, 0.006297625135630369, 0.013634709641337395, -0.013559793122112751, -0.051467280834913254, 0.024591172114014626, 0.007992599159479141, -0.011377865448594093, 0.008268851786851883, -0.003825397463515401, -0.04925725981593132, 0.034686099737882614, -0.01079726591706276, 0.01911294087767601, -0.0652143657207489, -0.022025300189852715, 0.019019296392798424, -0.030546993017196655, -0.09289582073688507, -0.10023758560419083, 0.025939660146832466, -0.004115696996450424, -0.05363984405994415, 0.002905335510149598, -0.023898199200630188, 0.03260718286037445, -0.0007591096218675375, 0.06832338124513626, -0.012529698200523853, -0.015207944437861443, -0.061805687844753265, 0.013335045427083969, -0.021557074040174484, -0.017801910638809204, 0.02820586785674095, 0.07087051868438721, -0.059445835649967194, -0.01416848599910736, 0.03245735168457031, 0.025209229439496994, 0.007191934622824192, -0.01173371635377407, -0.013316316530108452, 0.021950382739305496, 0.014131027273833752, -0.04378839209675789, 0.011209304444491863, -0.008929048664867878, 0.01038522832095623, -0.02178182266652584, -0.007308990694582462, -0.04371347650885582, -0.0529281422495842, 0.026688819751143456, 0.0851045623421669, 0.0028819243889302015, 0.009870180860161781, -0.035566363483667374, -0.016219310462474823, 0.04296431690454483, -0.05817226320505142, -0.03444262221455574, 0.00987954530864954, -0.12758192420005798, -0.002708681160584092, -0.027756372466683388, 0.048695389181375504, -0.021482158452272415, 0.005571876186877489, -0.0717320516705513, -0.015713628381490707, 0.03816969320178032, 0.02820586785674095, 0.023298870772123337, 0.021894196048378944, 0.0002218215522589162, 0.020133670419454575, 0.028992485255002975, -0.004174225032329559, 0.0003824812301900238, -0.009411321021616459, -0.02509685419499874, -0.03249480947852135, -0.002900653285905719, 0.037982404232025146, 0.04513688012957573, -0.0292921494692564, 0.051654569804668427, -0.06952203065156937, -0.00320499949157238, -0.020077483728528023, 0.009565834887325764, 0.029554355889558792, 0.03249480947852135, 0.04135362431406975, -0.02584601379930973, -0.0453241690993309, -0.0209764763712883, 0.04513688012957573, 0.004471547901630402, 0.005595287773758173, -0.004010346252471209, -0.0221189446747303, 0.00211052387021482, -0.023654721677303314, 0.0005039270617999136, -0.04667265713214874, -0.021163765341043472, -0.0629294291138649, 0.023598534986376762, 0.0023739002645015717, 0.01516112219542265, -0.0607568621635437, -0.04064192250370979, -0.003991617355495691, -0.02170690707862377, 0.05251610651612282, 0.04494959115982056, -0.016865460202097893, -0.05854684114456177, 0.028299512341618538, -0.004469206556677818, -0.06558894366025925, 0.05142982304096222, -0.013007287867367268, -0.01691228337585926, -0.051654569804668427, 0.0037949627730995417, 0.018120303750038147, 0.013728354126214981, 0.027100857347249985, -0.033337611705064774, -0.06851066648960114, -0.08907510340213776, 0.021219952031970024, -0.026632633060216904, 0.0030013215728104115, -0.011874184012413025, -0.0694471150636673, 0.06210535019636154, -0.0171463955193758, 0.02198784239590168, 0.007023373618721962, 0.004073556512594223, 0.02944198250770569, -0.037308160215616226, 0.035341616719961166, 0.06585115194320679, 0.05202915146946907, -0.07180697470903397, -0.016790544614195824, 0.03590348735451698, 0.025677453726530075, -0.009673526510596275, -0.041166335344314575, 0.014842729084193707, -0.033112864941358566, 0.0076180193573236465, 0.030340973287820816, -0.024310236796736717, 0.010366499423980713, -0.06225518509745598, -0.026276782155036926, 0.007959823124110699, 0.04146599769592285, -0.036839935928583145, 0.04959438368678093, 0.02333632856607437, -0.028842654079198837, 0.0057310727424919605, 0.0068641770631074905, -0.01559188961982727, 0.035435259342193604, 0.0006086923531256616, 0.062142807990312576, 0.0707581490278244, 0.022699544206261635, 0.02084537222981453, -0.028636634349822998, -0.005454820115119219, -0.02753162384033203, 0.04959438368678093, -0.007051466964185238, -0.01065679918974638, 0.07124510407447815, -0.02401057258248329, -0.005848129279911518, -0.010066835209727287, 0.028243325650691986, 0.02856171876192093, 0.06435283273458481, -0.040492091327905655, 0.03884393721818924, -0.030359702184796333, -0.07045848667621613, -0.09319548308849335, 0.0033197146840393543, -0.03457372635602951, 0.07641430199146271, 0.030565721914172173, 0.010141751728951931, 0.03330015391111374, 0.03301921859383583, 0.01797047257423401 ]
715,983
pytorch_optimizer.optimizer.came
__str__
null
def __str__(self) -> str: return 'CAME'
(self) -> str
[ -0.006779749412089586, -0.04411492496728897, -0.0006469751242548227, 0.007799674291163683, -0.016428830102086067, -0.09425628930330276, 0.01730063371360302, 0.013441001065075397, 0.12730015814304352, -0.08707872778177261, -0.0563032366335392, -0.012442236766219139, -0.034482769668102264, 0.03629408776760101, 0.019315091893076897, -0.032434456050395966, 0.015066109597682953, -0.06825455278158188, 0.013669531792402267, 0.0022091318387538195, 0.03275609388947487, 0.013957311399281025, 0.023174723610281944, -0.03160497546195984, -0.014592119492590427, 0.08098457008600235, -0.01049549225717783, -0.002805851399898529, -0.03365328907966614, 0.032654523849487305, 0.002786807017400861, -0.058063771575689316, -0.012484556995332241, 0.005209657363593578, -0.004367479123175144, 0.025900166481733322, -0.0424221009016037, -0.005996819585561752, -0.0406954251229763, -0.027829982340335846, -0.002420734381303191, 0.0027614147402346134, -0.01965365558862686, -0.01963672786951065, -0.041203271597623825, -0.02747448906302452, 0.013347895815968513, 0.05075078457593918, 0.004359014797955751, -0.031960465013980865, -0.009293588809669018, -0.008112845942378044, -0.039815157651901245, -0.0033560183364897966, -0.010080751031637192, -0.0034893278498202562, 0.03226517513394356, 0.0006982887862250209, -0.016488078981637955, 0.058707043528556824, -0.04421649128198624, -0.04428420588374138, 0.04502904787659645, -0.04756828024983406, -0.048617828637361526, 0.015193071216344833, 0.01325479056686163, 0.0369035042822361, 0.04221896454691887, 0.020415425300598145, 0.03788534179329872, -0.04306537285447121, -0.003021686105057597, 0.028066977858543396, 0.015303104184567928, -0.03116483986377716, -0.10421007871627808, 0.05403485521674156, 0.01779155246913433, -0.04066156595945358, 0.03162190318107605, -0.0077192652970552444, -0.031706541776657104, -0.022480666637420654, -0.013584891334176064, -0.07915632426738739, -0.030301501974463463, -0.035210683941841125, -0.03754677623510361, 0.03592166677117348, -0.004289186093956232, -0.009276661090552807, -0.024291986599564552, 0.08132313191890717, -0.018807245418429375, 0.006183029618114233, 0.015176142565906048, -0.024613622575998306, 0.045604605227708817, 0.04851625859737396, 0.0036057094112038612, 0.06002744287252426, -0.028456326574087143, 0.010613990016281605, -0.06646016240119934, -0.028439398854970932, -0.03944273665547371, 0.03155418857932091, 0.01489682774990797, 0.012044423259794712, -0.08193255215883255, -0.018062403425574303, 0.029607445001602173, -0.024071918800473213, 0.035210683941841125, -0.051360197365283966, -0.01397424004971981, 0.01709749549627304, 0.03003064915537834, -0.031740400940179825, 0.021380333229899406, -0.0020990984048694372, -0.023174723610281944, -0.02165118418633938, 0.03598938137292862, 0.09500113129615784, -0.04353936389088631, -0.033145442605018616, 0.02310701087117195, -0.012382987886667252, 0.049294956028461456, 0.0019932971335947514, -0.0354815348982811, -0.046688012778759, 0.10035044699907303, 0.006508897989988327, 0.022074390202760696, 0.0063099912367761135, 0.048583973199129105, 0.13854049146175385, -0.0011574665550142527, 0.01711442321538925, 0.06368393450975418, 0.03226517513394356, 0.010360066778957844, 0.0067247324623167515, -0.020652420818805695, 0.021397260949015617, -0.022751517593860626, 0.008946560323238373, 0.03707278519868851, 0.05186804383993149, 0.03135105222463608, 0.0033073495142161846, -0.004617169965058565, 0.012967010959982872, -0.027406776323914528, -0.015937913209199905, 0.011164156720042229, -0.005116552580147982, -0.025426175445318222, -0.025934021919965744, -0.024342769756913185, -0.003842704463750124, 0.009285124950110912, -0.0005308581748977304, -0.026441868394613266, 0.0107240229845047, 0.011705859564244747, -0.020720133557915688, -0.05606624111533165, -0.0733330175280571, -0.09161549061536789, 0.0342288464307785, 0.010402387008070946, 0.03397492319345474, -0.016665825620293617, 0.0663924515247345, 0.03788534179329872, -0.03466898202896118, -0.023005440831184387, -0.011172620579600334, -0.046688012778759, 0.043505508452653885, 0.07753121852874756, -0.051766473799943924, 0.04252367094159126, 0.03444891422986984, 0.06537675857543945, -0.006212654057890177, -0.004718739539384842, 0.02309008315205574, -0.05403485521674156, 0.014744473621249199, 0.016555791720747948, -0.07319759577512741, 0.008205951191484928, -0.047398995608091354, -0.012958547100424767, 0.0076049999333918095, -0.03815619274973869, 0.04225281998515129, -0.022734589874744415, 0.006665484048426151, 0.07624467462301254, 0.010884840972721577, 0.039815157651901245, -0.0076727126725018024, 0.007858922705054283, -0.03582010045647621, 0.02195589244365692, 0.023936493322253227, -0.008603764697909355, -0.004003522451967001, 0.05196961387991905, -0.06280367076396942, -0.001835653092712164, -0.03490597382187843, -0.012636911123991013, 0.03754677623510361, 0.04753442108631134, -0.015548563562333584, -0.01487143523991108, -0.0274406336247921, -0.04956580698490143, 0.0023932261392474174, -0.006009515840560198, 0.008095918223261833, -0.007287595886737108, -0.0179777629673481, -0.01591251976788044, -0.050649214535951614, -0.03815619274973869, 0.021972820162773132, -0.011164156720042229, 0.012535342015326023, -0.03527839481830597, 0.01164661068469286, -0.10569976270198822, -0.04827926307916641, 0.00019824525224976242, -0.006377704441547394, 0.01605641096830368, 0.03758063167333603, 0.051563337445259094, -0.07705722749233246, 0.01958594284951687, 0.019992219284176826, -0.03605709224939346, -0.006712036672979593, 0.04523218423128128, -0.04750056564807892, -0.01302625983953476, -0.028439398854970932, -0.021109482273459435, -0.0820002630352974, -0.053899429738521576, 0.015590883791446686, 0.029827510938048363, -0.008997345343232155, -0.08538590371608734, 0.032891519367694855, -0.021989747881889343, 0.04157569259405136, -0.001268557971343398, 0.03490597382187843, -0.03697121888399124, 0.04306537285447121, 0.01680971495807171, -0.009716793894767761, 0.07326530665159225, -0.008011276833713055, -0.05464427173137665, 0.03456741198897362, -0.04127098247408867, -0.02701742760837078, -0.01717367209494114, 0.046518728137016296, -0.10123071074485779, -0.050615355372428894, -0.006800909526646137, -0.018367111682891846, -0.015531635843217373, -0.014752937480807304, -0.017469916492700577, -0.07990116626024246, 0.014388981275260448, -0.0343811996281147, 0.01960287056863308, 0.028100833296775818, 0.054102569818496704, 0.0027381384279578924, -0.01565859653055668, 0.007236810866743326, 0.025764741003513336, 0.003165575908496976, 0.051360197365283966, 0.020144574344158173, -0.01591251976788044, -0.014397445134818554, -0.00007690433994866908, -0.0007628275780007243, -0.011164156720042229, -0.022514523938298225, -0.03092784620821476, -0.010529348626732826, -0.04939652606844902, -0.008955025114119053, 0.00012722609972115606, 0.026120232418179512, -0.02701742760837078, 0.026712719351053238, 0.0006570262485183775, 0.09405314922332764, 0.016615040600299835, 0.10353294759988785, 0.0006591422716155648, 0.004752595908939838, 0.04330236837267876, 0.06666330248117447, -0.006737428717315197, -0.020889414474368095, -0.0493626706302166, 0.03444891422986984, -0.0017478379886597395, -0.03206203505396843, -0.03578624129295349, 0.06981194764375687, 0.02375028282403946, 0.03626023232936859, -0.06358236819505692, -0.04712814465165138, 0.024410482496023178, -0.0017541861161589622, -0.010233105160295963, 0.016445759683847427, 0.008117077872157097, -0.012425308115780354, -0.012704623863101006, -0.039815157651901245, 0.08714643865823746, -0.007262203376740217, -0.0324852392077446, 0.0016716610407456756, 0.020635491237044334, 0.04130484163761139, -0.020432353019714355, 0.0025159555952996016, 0.0060349078848958015, 0.006580842658877373, -0.019010383635759354, -0.031012486666440964, 0.05623552203178406, 0.024275057017803192, 0.02835475653409958, 0.01941666007041931, -0.03812233731150627, 0.03351786360144615, -0.03988286852836609, -0.0016949373530223966, 0.015032253228127956, -0.07279131561517715, 0.02121105045080185, 0.0161664430052042, -0.04309923201799393, 0.0121036721393466, -0.001121494104154408, 0.0101315351203084, 0.03961201757192612, -0.04685729369521141, -0.023581000044941902, 0.0058486973866820335, -0.022074390202760696, -0.027880767360329628, -0.023140868172049522, 0.04523218423128128, 0.03971358761191368, 0.03666650876402855, -0.03272223472595215, -0.002204899676144123, 0.04956580698490143, 0.0161664430052042, -0.009962253272533417, 0.03275609388947487, 0.0012950083473697305, 0.004926110152155161, 0.011748179793357849, 0.024071918800473213, 0.012780800461769104, 0.005882554221898317, 0.00697442376986146, -0.035887811332941055, -0.001697053317911923, -0.023885708302259445, -0.04496133327484131, -0.043505508452653885, -0.01802854612469673, -0.010216176509857178, -0.06111085042357445, 0.025443105027079582, 0.008514891378581524, -0.016378046944737434, 0.009886076673865318, -0.009555975906550884, -0.06097542494535446, 0.058740898966789246, 0.008413322269916534, 0.004989590961486101, -0.030572352930903435, 0.006830533966422081, -0.0161664430052042, -0.009996109642088413, -0.022734589874744415, -0.07062450796365738, 0.061754122376441956, 0.0037749914918094873, -0.008387929759919643, -0.030098363757133484, 0.021295692771673203, 0.0002756124595180154, -0.03649722784757614, 0.03747906535863876, 0.027288278564810753, 0.06344693899154663, 0.014126594178378582, 0.03212974965572357, 0.03900260105729103, 0.04408106580376625, 0.07719264924526215, -0.03412727639079094, -0.0387994647026062, -0.0033687143586575985, -0.033331651240587234, -0.026187945157289505, 0.0202630702406168, -0.003796151839196682, 0.011714323423802853, -0.0383254736661911, -0.026137160137295723, 0.028066977858543396, -0.01164661068469286, -0.04594317078590393, -0.028473254293203354, 0.04160954803228378, 0.00207370612770319, -0.034025710076093674, -0.062397394329309464, -0.004553689155727625, 0.05860547348856926, 0.004951502196490765, 0.011214940808713436, 0.049024105072021484, -0.03869789466261864, -0.05105549097061157, 0.05789448693394661, -0.005074231885373592, -0.0032904213294386864, -0.029404306784272194, 0.01715674437582493, 0.0006607293034903705, -0.06226196885108948, 0.06365007907152176, 0.0023403253871947527, 0.01848560944199562, 0.010740951634943485, 0.051360197365283966, -0.02051699347794056, 0.06405635923147202, -0.01774076744914055, 0.010326210409402847, 0.011316510848701, -0.021769681945443153, -0.02126183547079563, -0.012967010959982872, -0.025070684030652046, 0.03988286852836609, -0.058537762612104416, -0.013017795979976654, -0.00006106720684329048, -0.021329548209905624, -0.05650637671351433, -0.0161664430052042, -0.0017774624284356833, 0.030995558947324753, 0.005713271908462048, 0.01167200319468975, 0.020669348537921906, 0.015201535075902939, -0.031469546258449554, 0.013991167768836021, 0.00008186377817764878, 0.03158804401755333, -0.07008279860019684, -0.03416113555431366, -0.027322135865688324, 0.05081849545240402, -0.004117787815630436, -0.0060603003948926926, -0.08396393805742264, 0.013246326707303524, -0.009124306961894035, -0.0179777629673481, -0.0002440043172100559, -0.03365328907966614, 0.036598797887563705, -0.03272223472595215, 0.000512871949467808, -0.013288646936416626, -0.0007797558209858835, -0.018993455916643143, 0.020246142521500587, -0.048143837600946426, 0.04286223649978638, -0.020449280738830566, 0.00628459919244051, -0.011299582198262215, -0.008912703953683376, -0.0067755174823105335, -0.02789769507944584, 0.04408106580376625, 0.012713087722659111, -0.03605709224939346, -0.02353021688759327, -0.005907946266233921, -0.011638146825134754, 0.03527839481830597, -0.015091502107679844, 0.014245091006159782, -0.04130484163761139, 0.0794948861002922, -0.012763872742652893, 0.04756828024983406, -0.009759115055203438, 0.07678637653589249, -0.003601477248594165, 0.056167811155319214, -0.08281281590461731, 0.031503405421972275, 0.03297615796327591, 0.025713955983519554, 0.007253739517182112, -0.05792834609746933, 0.016555791720747948, -0.008955025114119053, 0.003580317134037614, -0.04401335492730141, -0.005404332187026739, 0.012645374983549118, -0.00809168629348278, 0.026594223454594612, -0.01708056777715683, -0.037275925278663635, -0.020229214802384377, -0.07638009637594223, 0.0002782575029414147, 0.02791462279856205, -0.0024990274105221033, 0.014600583352148533, 0.04204967990517616, 0.024765975773334503, -0.004892253782600164, -0.0005141944857314229, 0.06486891210079193, 0.0214480459690094, 0.06006129831075668, 0.04299766197800636, -0.02099098451435566, 0.053391583263874054, 0.029929080978035927, -0.056675657629966736, 0.01693667657673359, -0.03724206984043121, 0.05606624111533165, 0.06023058295249939, -0.06412407010793686, 0.06967652589082718, 0.04296380653977394, 0.03863018378615379, -0.010935625992715359, 0.004574849735945463, -0.031689614057540894, 0.021786609664559364, -0.00037136266473680735, -0.025578530505299568, -0.02678043395280838, -0.012010566890239716, -0.012035959400236607, -0.015320032835006714, 0.02309008315205574, -0.04286223649978638, -0.04411492496728897, 0.012713087722659111, -0.03444891422986984, -0.002488447353243828, 0.05843619257211685, -0.06026443839073181, -0.0160056259483099, -0.0015870200004428625, 0.007414557505398989, 0.008785742335021496, 0.03224824741482735, 0.016665825620293617, 0.02535846270620823, 0.050615355372428894, 0.06117856130003929, 0.04570617526769638, -0.0153369614854455, 0.010343138128519058, -0.007698104716837406, 0.02979365549981594, -0.025917094200849533, 0.013788029551506042, -0.0369035042822361, -0.014372052624821663, 0.003904069075360894, -0.0179777629673481, 0.03873175010085106, -0.037716057151556015, -0.04184654355049133, 0.036429513245821, 0.02053392305970192, 0.04702657461166382, -0.050649214535951614, 0.05051378905773163, -0.03917188569903374, 0.01443130150437355, 0.00021914100216235965, 0.01914580911397934, 0.02862560749053955, -0.07719264924526215, 0.03984901309013367, 0.01912888139486313, -0.03214667737483978, -0.07292674481868744, -0.02584938146173954, 0.008718029595911503, 0.020720133557915688, 0.046688012778759, -0.02908267080783844, 0.04066156595945358, -0.004871093202382326, 0.026645006611943245, -0.018993455916643143, 0.048787109553813934, -0.08741728961467743, 0.029116526246070862, -0.06310837715864182, -0.04909181967377663, -0.01717367209494114, -0.06216039881110191, -0.017910050228238106, 0.011324974708259106, 0.010740951634943485, 0.022226743400096893, 0.0008120252168737352, -0.014135058037936687, -0.0008855571504682302, 0.01777462288737297, -0.013914991170167923, -0.03758063167333603, 0.012035959400236607, -0.01697053387761116, 0.031503405421972275, -0.050209078937768936, 0.07197876274585724, 0.014879899099469185, 0.004833004903048277, -0.04577388986945152, -0.028930315747857094, -0.013584891334176064, -0.03155418857932091, 0.01711442321538925, -0.018147043883800507, -0.0663924515247345, -0.02080477401614189, -0.0042976499535143375, 0.022531451657414436, 0.026932787150144577, 0.06788213551044464, -0.02977672591805458, 0.0474667102098465, -0.021380333229899406, -0.0010093447053804994, -0.06463191658258438, 0.056607943028211594, 0.07028593868017197, -0.05264674127101898, 0.02004300430417061, 0.040255289524793625, -0.08789128065109253, -0.05586310476064682, -0.04133869707584381, -0.032197460532188416, 0.012044423259794712, 0.07177562266588211, 0.0447920523583889, -0.017859265208244324, -0.014236627146601677, -0.028456326574087143, 0.01733449101448059, 0.013110901229083538, 0.06165255233645439, -0.012069815769791603, -0.0005443478585220873, 0.015954840928316116, -0.020466210320591927, -0.00865031685680151, 0.023885708302259445, 0.039815157651901245, -0.04177882894873619, 0.059384170919656754, 0.04221896454691887, -0.05119091644883156, 0.01824861392378807, 0.04076313599944115, -0.07929175347089767, -0.021583471447229385, 0.05047992989420891, 0.0073468443006277084, 0.045333754271268845, 0.00783776305615902, 0.033077728003263474, 0.00992839690297842, -0.018113188445568085, 0.0424221009016037, 0.04611245170235634, -0.007651552092283964, -0.03304387256503105, -0.03619251772761345, 0.014625975862145424, 0.0005956615204922855, 0.027355993166565895, -0.004473280161619186, 0.05999358743429184, 0.030318429693579674, 0.009208948351442814, 0.02173582650721073, -0.012577662244439125, 0.06571532040834427, 0.02351328730583191, 0.0018631614511832595, 0.025341534987092018, 0.004162224475294352, -0.016411902382969856, -0.01130804605782032, 0.052037328481674194, 0.04059385508298874, 0.019044239073991776, -0.021126409992575645, 0.02561238594353199, 0.03361942991614342, 0.04198196902871132, 0.017241384834051132, 0.009522119536995888, 0.004414031747728586, -0.03365328907966614, -0.03372099995613098, 0.025324607267975807, 0.007482270244508982, 0.002879912266507745, 0.014685224741697311, -0.023022370412945747, 0.008557211607694626, -0.003072470659390092, 0.01144347246736288, 0.026678863912820816, 0.022006677463650703, 0.03268837928771973 ]
716,007
pytorch_optimizer.optimizer.came
reset
null
@staticmethod def approximate_sq_grad( exp_avg_sq_row: torch.Tensor, exp_avg_sq_col: torch.Tensor, output: torch.Tensor, ): r"""Get approximation of EMA of squared gradient.""" r_factor: torch.Tensor = (exp_avg_sq_row / exp_avg_sq_row.mean(dim=-1, keepdim=True)).rsqrt_().unsqueeze(-1) c_factor: torch.Tensor = exp_avg_sq_col.unsqueeze(-2).rsqrt() torch.mul(r_factor, c_factor, out=output)
(self)
[ -0.013792572543025017, -0.05072632059454918, 0.02397216111421585, 0.047583021223545074, 0.011037671007215977, -0.015608098357915878, 0.03322140499949455, -0.035551778972148895, -0.014497105032205582, 0.007542107719928026, 0.05050953850150108, 0.011805430985987186, 0.020720472559332848, 0.04776367172598839, -0.04060995951294899, 0.059252966195344925, 0.0029310346581041813, -0.011091866530478, 0.031469106674194336, 0.013720313087105751, -0.04931725561618805, -0.08866266906261444, -0.030186494812369347, -0.015255832113325596, -0.0328059121966362, 0.00238682865165174, 0.03808087110519409, -0.004945273976773024, 0.03174008056521416, -0.047727540135383606, -0.005460124462842941, -0.07356038689613342, -0.006909835152328014, -0.004242999944835901, 0.02740449644625187, -0.06474470347166061, 0.02769353613257408, -0.021226290613412857, -0.026718029752373695, -0.08418256789445877, -0.03217363730072975, 0.028109028935432434, 0.03242654725909233, 0.005500770639628172, 0.012961586005985737, 0.018624940887093544, -0.050545670092105865, 0.015851974487304688, -0.05755486339330673, -0.00366943865083158, 0.0032065247651189566, -0.035804688930511475, 0.0038975083734840155, 0.05390574783086777, 0.024279264733195305, 0.03775570169091225, 0.023105043917894363, -0.032101377844810486, 0.006160140503197908, -0.0188236553221941, 0.02845226228237152, -0.07565592229366302, 0.023917965590953827, 0.03352850675582886, 0.02973487228155136, 0.015815844759345055, -0.03211944177746773, 0.000794856867287308, 0.05076244845986366, 0.026718029752373695, -0.021352745592594147, 0.024640562012791634, 0.014903565868735313, -0.05354444682598114, 0.002809096360579133, 0.0037800862919539213, -0.01005313266068697, -0.022219862788915634, -0.031324587762355804, -0.02704319730401039, 0.006101429462432861, 0.00839115958660841, 0.005591095425188541, 0.004660751670598984, 0.008928591385483742, -0.064130499958992, -0.000766630400903523, -0.03085489757359028, -0.007415653206408024, 0.03589501231908798, 0.032625261694192886, -0.02393602952361107, -0.004486876539885998, 0.02729610726237297, 0.0031410395167768, -0.00865761749446392, -0.0338536761701107, -0.028000639751553535, 0.011028639040887356, -0.012970618903636932, 0.011904788203537464, 0.06832156330347061, 0.01652940921485424, 0.029391638934612274, 0.045668140053749084, -0.02639286033809185, 0.03687052056193352, -0.041043516248464584, 0.07179002463817596, -0.015851974487304688, -0.004617847502231598, 0.0017376203322783113, -0.0006356596713885665, -0.03967058286070824, -0.027205782011151314, -0.022888263687491417, -0.027061263099312782, 0.0515211746096611, 0.04675203561782837, 0.030945222824811935, 0.09032464027404785, -0.009276340715587139, -0.045415230095386505, 0.03833377733826637, 0.028542587533593178, 0.03840603679418564, 0.01357579417526722, -0.019961746409535408, -0.009276340715587139, -0.023502472788095474, 0.016095850616693497, 0.005044631194323301, 0.028398068621754646, -0.05148504674434662, 0.001299545750953257, 0.03640083223581314, 0.03750279173254967, -0.04021253064274788, 0.03883959725499153, -0.01728813722729683, 0.013964190147817135, 0.07330747693777084, -0.0007536462508141994, -0.018353966996073723, 0.014722917228937149, 0.0668763667345047, -0.0013695474481210113, 0.07955794781446457, 0.037864089012145996, -0.03352850675582886, -0.017965571954846382, 0.021298550069332123, -0.01286222878843546, -0.012817067094147205, 0.03920089453458786, -0.01178736612200737, 0.014244196005165577, 0.036184050142765045, -0.03334785997867584, -0.03300462290644646, -0.015481643378734589, -0.013042878359556198, -0.025941237807273865, -0.010712502524256706, 0.0037891187239438295, -0.014740982092916965, 0.002653286326676607, 0.039128635078668594, -0.06261304020881653, -0.014063547365367413, -0.008106636814773083, -0.05368896946310997, -0.04761915281414986, -0.016104884445667267, -0.02641092613339424, 0.059505876153707504, -0.014813241548836231, 0.03186653554439545, -0.014804208651185036, -0.02819935418665409, 0.019781095907092094, -0.007993730716407299, 0.04494554176926613, -0.02115403115749359, 0.02996971644461155, 0.027259977534413338, 0.006941448897123337, -0.022725680842995644, 0.010875087231397629, -0.005704001057893038, -0.06651506572961807, -0.07110355794429779, -0.0021666623651981354, -0.06431114673614502, -0.0012814808869734406, -0.0060517508536577225, 0.004800754599273205, 0.04599330946803093, 0.03242654725909233, 0.037358272820711136, -0.07580044120550156, -0.014072579331696033, -0.004873014520853758, -0.004832368344068527, 0.032842040061950684, -0.07197067886590958, 0.021605653688311577, -0.02641092613339424, -0.046426866203546524, 0.036689870059490204, -0.055784501135349274, 0.04086286947131157, -0.006020137574523687, 0.020846927538514137, 0.07085064798593521, 0.025543808937072754, 0.03450401499867439, -0.004023962654173374, 0.017739759758114815, 0.029138728976249695, -0.00692338403314352, -0.07825727015733719, -0.0019589157309383154, 0.01523776724934578, 0.07442750781774521, -0.053110890090465546, 0.008806652389466763, -0.008644068613648415, -0.01949205808341503, -0.043247438967227936, -0.005622709169983864, 0.001092363614588976, 0.001806492917239666, -0.044909413903951645, -0.003445885144174099, 0.0919143557548523, -0.03782796114683151, 0.014027416706085205, 0.06846608221530914, 0.0034142713993787766, -0.043753258883953094, -0.024622498080134392, -0.045306842774152756, 0.07009192556142807, -0.0015626163221895695, 0.008707295171916485, 0.027187718078494072, 0.021479200571775436, -0.03141491115093231, 0.02294245921075344, -0.0050807613879442215, 0.030674248933792114, 0.019510122016072273, 0.04256097227334976, -0.009046012535691261, -0.013837735168635845, 0.03941767290234566, 0.11221933364868164, 0.006119494792073965, -0.05545933172106743, 0.01357579417526722, -0.06019234284758568, 0.0673099234700203, -0.031848467886447906, -0.07222358137369156, 0.036202117800712585, 0.012518995441496372, 0.01331385225057602, -0.01115509308874607, 0.04357260838150978, 0.08635035902261734, 0.09856224805116653, -0.0456320084631443, -0.02948196418583393, 0.01486743614077568, 0.04219967499375343, 0.02178630419075489, 0.03074650838971138, 0.005487222224473953, -0.019004303961992264, 0.0010291363578289747, -0.06694862246513367, -0.009438925422728062, 0.08064184337854385, -0.037213753908872604, -0.003172653028741479, -0.004633654374629259, -0.012528028339147568, 0.06257691234350204, 0.03343818336725235, 0.03589501231908798, -0.025525745004415512, 0.015246800146996975, 0.03508209064602852, 0.046968813985586166, 0.054375436156988144, 0.02931937947869301, 0.040176402777433395, -0.010477658361196518, 0.04010414332151413, 0.015815844759345055, 0.03300462290644646, -0.03495563566684723, 0.011453164741396904, 0.0012792227789759636, -0.0022253734059631824, -0.019419798627495766, -0.013657085597515106, 0.037466660141944885, 0.0043175178579986095, -0.033383987843990326, 0.0002754901652224362, -0.06976675242185593, 0.0317581444978714, -0.09299825131893158, 0.02588704228401184, -0.005243345629423857, -0.03576855733990669, 0.044259075075387955, -0.01133574265986681, -0.01512937806546688, -0.006557568907737732, 0.07413846999406815, 0.01766750030219555, -0.03213750943541527, -0.059361353516578674, -0.045270711183547974, 0.00002725616650423035, -0.0013808379881083965, -0.04111577570438385, -0.04050156846642494, -0.049786943942308426, -0.005487222224473953, -0.0031410395167768, 0.007352425716817379, -0.03665373846888542, 0.029915520921349525, -0.00752855883911252, -0.018101058900356293, -0.008323416113853455, -0.01275383960455656, 0.04097125679254532, 0.014497105032205582, 0.03649115562438965, 0.026447055861353874, -0.010667339898645878, 0.0114621976390481, 0.0003934767155442387, -0.01587004028260708, 0.002233276842162013, 0.005216248333454132, -0.059758782386779785, 0.008296318352222443, 0.03253493458032608, 0.050798580050468445, 0.08880718797445297, -0.037972480058670044, -0.036455027759075165, 0.03963445499539375, -0.030818767845630646, -0.02946389839053154, 0.001990529242902994, -0.026302536949515343, -0.004529780708253384, -0.015851974487304688, 0.03352850675582886, -0.05954200401902199, 0.00592078035697341, 0.04046544060111046, -0.0038342811167240143, -0.014253228902816772, -0.027874184772372246, 0.02037723921239376, 0.006191754247993231, -0.054917383939027786, 0.0013153526233509183, -0.06431114673614502, 0.015192604623734951, 0.027133522555232048, -0.007822114042937756, 0.00852664653211832, -0.03546145558357239, -0.031577493995428085, -0.02521863952279091, 0.0649976134300232, 0.004764624871313572, -0.024785082787275314, -0.02025078423321247, -0.026212211698293686, -0.01920301839709282, -0.026952873915433884, 0.03623824566602707, -0.017884278669953346, -0.05441156402230263, -0.09769513458013535, 0.009005366824567318, 0.0058033582754433155, 0.03499176725745201, -0.09393762797117233, 0.054519955068826675, -0.03829764947295189, 0.0282896775752306, 0.005433027166873217, -0.019961746409535408, -0.0729823112487793, -0.03309495002031326, -0.07572817802429199, 0.046173956245183945, 0.05061792954802513, 0.04537910223007202, -0.023285692557692528, -0.003558791009709239, 0.003294591326266527, 0.06290207803249359, -0.05274959281086922, 0.009908613748848438, -0.01542744878679514, -0.04628234729170799, -0.06535891443490982, 0.037611182779073715, -0.006223367992788553, -0.02241857722401619, -0.019943680614233017, 0.02099144645035267, -0.006254981737583876, -0.055025771260261536, -0.07572817802429199, -0.03410658612847328, -0.022219862788915634, -0.014659689739346504, -0.011109931394457817, -0.018932044506072998, -0.03822539001703262, 0.00282038701698184, 0.002815870800986886, 0.009502151980996132, 0.010929281823337078, 0.03114393725991249, -0.017459753900766373, -0.04881143569946289, 0.04660751670598984, -0.0001511526497779414, -0.018498487770557404, -0.0015558419981971383, -0.031451039016246796, -0.04172998666763306, 0.021804368123412132, -0.02857871726155281, -0.026320600882172585, -0.008169864304363728, 0.0055414168164134026, 0.027585145086050034, 0.03546145558357239, 0.057193562388420105, -0.007149195298552513, -0.040537700057029724, 0.022526966407895088, -0.05123213678598404, 0.056687746196985245, 0.03790022060275078, -0.009908613748848438, 0.050292760133743286, 0.01055895071476698, -0.04378938674926758, 0.024297328665852547, 0.04512619227170944, 0.07840178906917572, 0.00871632806956768, 0.014099677093327045, -0.027205782011151314, 0.04996759071946144, -0.03627437725663185, -0.048341747373342514, -0.040176402777433395, 0.03237235173583031, -0.0275490153580904, -0.02780192531645298, 0.04559588059782982, 0.03190266340970993, -0.022328251972794533, -0.027567081153392792, -0.039164766669273376, -0.019437862560153008, 0.010017002932727337, 0.04180224612355232, 0.04433133453130722, -0.022761810570955276, -0.04812496900558472, 0.039381545037031174, -0.018552681431174278, -0.009082143194973469, 0.013304820284247398, 0.008305351249873638, 0.022906329482793808, -0.08056958019733429, -0.09531056135892868, 0.02496573142707348, 0.014804208651185036, 0.0351182222366333, 0.006178205367177725, 0.017098454758524895, 0.009109240025281906, -0.08288189023733139, 0.021750174462795258, -0.012654482387006283, -0.026934808120131493, -0.06185431405901909, 0.02306891418993473, -0.0005117455730214715, -0.021605653688311577, -0.013648053631186485, 0.03114393725991249, -0.004069125279784203, 0.024261198937892914, 0.03793634846806526, -0.04241645336151123, 0.0358588844537735, 0.04288614168763161, 0.10297009348869324, -0.015282929874956608, -0.036184050142765045, 0.033907871693372726, -0.05806067958474159, 0.03150523453950882, -0.02279794029891491, 0.048739176243543625, 0.02677222341299057, 0.027964510023593903, -0.01064024306833744, -0.003278784453868866, -0.014795176684856415, 0.037105362862348557, 0.008228574879467487, 0.02267148531973362, -0.015210669487714767, 0.02075660228729248, 0.014894533902406693, -0.03818925842642784, -0.027440626174211502, -0.011968014761805534, -0.021750174462795258, -0.0012803517747670412, -0.00024839278194122016, -0.017884278669953346, -0.08215929567813873, 0.027838055044412613, -0.009226662106812, 0.026447055861353874, 0.017902344465255737, -0.020431434735655785, 0.03340205177664757, 0.057446472346782684, 0.04364486783742905, 0.039020244032144547, 0.04855852946639061, 0.059903305023908615, -0.06423888355493546, -0.020196590572595596, -0.029915520921349525, -0.04238032177090645, -0.016086818650364876, -0.09697254002094269, 0.055134162306785583, 0.04089899733662605, 0.009962808340787888, 0.027838055044412613, 0.010703470557928085, 0.057085175067186356, -0.03611179068684578, 0.0028226450085639954, -0.088734932243824, 0.01728813722729683, 0.057193562388420105, -0.008666649460792542, -0.00941182766109705, -0.01652940921485424, 0.060770418494939804, -0.08273737132549286, 0.029771002009510994, -0.021605653688311577, 0.015942299738526344, -0.07847405225038528, -0.0037439565639942884, 0.011814462952315807, 0.007862759754061699, 0.036075662821531296, -0.05050953850150108, 0.022743744775652885, -0.031342651695013046, -0.005577546544373035, 0.006503374315798283, 0.0030032943468540907, -0.04172998666763306, -0.058349721133708954, 0.004873014520853758, -0.00605626730248332, -0.01985335722565651, 0.01780298724770546, 0.02063014917075634, 0.01152542419731617, -0.06048138067126274, 0.019510122016072273, 0.06864672899246216, -0.0776069313287735, -0.015066150575876236, -0.0021406940650194883, -0.012067371979355812, -0.033257532864809036, 0.01147122960537672, -0.024604432284832, -0.021190160885453224, 0.030728444457054138, -0.017757825553417206, 0.025706393644213676, -0.043355830013751984, -0.008472451940178871, -0.05000372231006622, 0.036581479012966156, 0.00896020419895649, 0.07580044120550156, 0.01615907810628414, 0.04126029834151268, 0.018643006682395935, 0.011164125986397266, 0.0023574731312692165, 0.01249189767986536, 0.01780298724770546, -0.03482918068766594, -0.05224377289414406, 0.006268530152738094, -0.010098295286297798, 0.03024069033563137, 0.0251283161342144, -0.06705701351165771, 0.005681420210748911, -0.027314171195030212, 0.04523457959294319, -0.00012356128718238324, -0.04147707670927048, -0.03063811920583248, -0.006973062641918659, 0.04660751670598984, -0.005283991806209087, 0.004360422026365995, -0.009881515987217426, 0.0712842047214508, -0.02791031450033188, -0.004791722167283297, -0.01478614378720522, -0.006544020492583513, 0.02525476925075054, 0.018245577812194824, 0.013359014876186848, 0.05921683460474014, 0.0343775600194931, 0.000029373150027822703, -0.04364486783742905, 0.02231018617749214, 0.02138887532055378, 0.022472770884633064, 0.006679507438093424, -0.02473088726401329, -0.04306678846478462, -0.016990065574645996, 0.0022016630973666906, -0.005460124462842941, -0.009420860558748245, 0.06055364012718201, -0.02294245921075344, -0.020467564463615417, -0.02805483341217041, 0.011209288612008095, -0.04223580285906792, -0.03535306453704834, 0.0032494289334863424, -0.030421338975429535, 0.022111471742391586, -0.05957813560962677, -0.036310505121946335, 0.0028226450085639954, 0.03858668729662895, 0.04574039950966835, -0.002653286326676607, 0.035804688930511475, 0.031324587762355804, -0.003775570075958967, 0.016953935846686363, 0.05878327786922455, 0.01542744878679514, -0.0645640566945076, -0.05408639460802078, -0.07121194899082184, -0.041440945118665695, -0.01612294837832451, 0.03060198947787285, -0.036436960101127625, -0.021172096952795982, 0.027567081153392792, 0.016628766432404518, 0.019257213920354843, 0.045162320137023926, 0.06474470347166061, -0.02126242034137249, 0.054917383939027786, 0.045921050012111664, 0.02406248450279236, 0.01678231917321682, 0.02946389839053154, -0.030529730021953583, 0.014623560011386871, -0.0069685461930930614, -0.02767547033727169, -0.0282896775752306, -0.0011990596540272236, 0.013377079740166664, 0.004513973835855722, 0.024658627808094025, -0.011173157952725887, -0.04628234729170799, 0.029265183955430984, -0.005166569724678993, -0.017017163336277008, 0.03703310340642929, -0.0322820283472538, -0.04830561950802803, -0.03201105445623398, 0.020015940070152283, -0.005744647234678268, -0.004200095776468515, 0.008878912776708603, 0.004084932152181864, -0.008296318352222443, 0.08345997333526611, 0.11236385256052017, 0.004089448135346174, 0.05737421289086342, -0.013377079740166664, -0.02268955111503601, 0.03450401499867439, -0.024387653917074203, 0.021497264504432678, 0.018552681431174278, 0.05123213678598404, -0.037611182779073715, -0.019383668899536133, 0.022508900612592697, -0.04725785180926323, -0.00742920208722353, 0.02305084839463234, -0.01857074722647667, 0.018805591389536858, 0.016330694779753685, 0.052966371178627014, 0.0935763269662857, 0.019311409443616867, -0.04140481725335121, 0.014894533902406693, -0.07580044120550156, -0.04819722846150398, -0.017730727791786194, 0.004236225970089436, 0.02203921228647232, -0.0066117639653384686, 0.0161410141736269, -0.02099144645035267, 0.027567081153392792, -0.028669042512774467, -0.010143456980586052 ]
716,022
torch.optim.lr_scheduler
ConstantLR
Multiply the learning rate of each parameter group by a small constant factor until the number of epoch reaches a pre-defined milestone: total_iters. Notice that such multiplication of the small constant factor can happen simultaneously with other changes to the learning rate from outside this scheduler. When last_epoch=-1, sets initial lr as lr. Args: optimizer (Optimizer): Wrapped optimizer. factor (float): The number we multiply learning rate until the milestone. Default: 1./3. total_iters (int): The number of steps that the scheduler multiplies the learning rate by the factor. Default: 5. last_epoch (int): The index of the last epoch. Default: -1. verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. Example: >>> # xdoctest: +SKIP >>> # Assuming optimizer uses lr = 0.05 for all groups >>> # lr = 0.025 if epoch == 0 >>> # lr = 0.025 if epoch == 1 >>> # lr = 0.025 if epoch == 2 >>> # lr = 0.025 if epoch == 3 >>> # lr = 0.05 if epoch >= 4 >>> scheduler = ConstantLR(optimizer, factor=0.5, total_iters=4) >>> for epoch in range(100): >>> train(...) >>> validate(...) >>> scheduler.step()
class ConstantLR(LRScheduler): """Multiply the learning rate of each parameter group by a small constant factor until the number of epoch reaches a pre-defined milestone: total_iters. Notice that such multiplication of the small constant factor can happen simultaneously with other changes to the learning rate from outside this scheduler. When last_epoch=-1, sets initial lr as lr. Args: optimizer (Optimizer): Wrapped optimizer. factor (float): The number we multiply learning rate until the milestone. Default: 1./3. total_iters (int): The number of steps that the scheduler multiplies the learning rate by the factor. Default: 5. last_epoch (int): The index of the last epoch. Default: -1. verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. Example: >>> # xdoctest: +SKIP >>> # Assuming optimizer uses lr = 0.05 for all groups >>> # lr = 0.025 if epoch == 0 >>> # lr = 0.025 if epoch == 1 >>> # lr = 0.025 if epoch == 2 >>> # lr = 0.025 if epoch == 3 >>> # lr = 0.05 if epoch >= 4 >>> scheduler = ConstantLR(optimizer, factor=0.5, total_iters=4) >>> for epoch in range(100): >>> train(...) >>> validate(...) >>> scheduler.step() """ def __init__(self, optimizer, factor=1.0 / 3, total_iters=5, last_epoch=-1, verbose="deprecated"): if factor > 1.0 or factor < 0: raise ValueError('Constant multiplicative factor expected to be between 0 and 1.') self.factor = factor self.total_iters = total_iters super().__init__(optimizer, last_epoch, verbose) def get_lr(self): if not self._get_lr_called_within_step: warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.", UserWarning) if self.last_epoch == 0: return [group['lr'] * self.factor for group in self.optimizer.param_groups] if self.last_epoch != self.total_iters: return [group['lr'] for group in self.optimizer.param_groups] return [group['lr'] * (1.0 / self.factor) for group in self.optimizer.param_groups] def _get_closed_form_lr(self): return [base_lr * (self.factor + (self.last_epoch >= self.total_iters) * (1 - self.factor)) for base_lr in self.base_lrs]
(optimizer, factor=0.3333333333333333, total_iters=5, last_epoch=-1, verbose='deprecated')
[ 0.006591292098164558, 0.008966618217527866, -0.03898940980434418, 0.03289495036005974, -0.006633877754211426, 0.015643080696463585, -0.015841813758015633, -0.08577670156955719, -0.05148116126656532, 0.04697656258940697, -0.004674943629652262, 0.01850104331970215, 0.07972009479999542, 0.07078659534454346, -0.006269535049796104, 0.050837647169828415, -0.00009611315181246027, 0.007296319119632244, -0.015926985070109367, 0.03191075101494789, 0.001219601952470839, -0.016570499166846275, -0.005342117045074701, 0.06351867318153381, -0.025891996920108795, 0.032989583909511566, -0.0007724540191702545, -0.007211148273199797, -0.04330474138259888, 0.021993055939674377, -0.0033264022786170244, -0.02388574555516243, -0.023071888834238052, -0.022163398563861847, -0.00495884707197547, -0.050534818321466446, -0.031021185219287872, 0.0056733377277851105, -0.07835736125707626, -0.03495798259973526, 0.061285294592380524, -0.00006132758426247165, 0.015406494960188866, -0.03251641243696213, -0.020176073536276817, -0.0020358245819807053, 0.013012242503464222, 0.04587880149483681, -0.0026024484541267157, -0.06734190136194229, 0.04197986051440239, -0.01689225621521473, 0.02460496686398983, -0.031683627516031265, 0.003612671745941043, 0.01686386577785015, 0.042131274938583374, -0.03480656445026398, 0.04568953067064285, -0.03336812183260918, 0.038705505430698395, -0.06412433087825775, -0.01082618534564972, 0.0495506189763546, 0.03605573996901512, -0.07866019010543823, -0.04856641963124275, -0.027292586863040924, 0.0013355292612686753, 0.04269908368587494, 0.009491839446127415, -0.029601668938994408, 0.008081785403192043, -0.018444262444972992, -0.028693176805973053, -0.0029171081259846687, -0.05076194182038307, -0.09342316538095474, 0.0002865650749299675, -0.025797361508011818, 0.028768885880708694, 0.029033862054347992, 0.03575291112065315, -0.024491406977176666, 0.0045992364175617695, -0.07972009479999542, -0.033670950680971146, -0.051556870341300964, 0.028768885880708694, 0.001594591187313199, -0.01446015015244484, -0.014791371300816536, 0.019627192988991737, -0.002124544233083725, 0.013428634032607079, 0.04061712324619293, -0.0426233746111393, -0.005569239612668753, -0.029147423803806305, -0.04841500520706177, 0.037475258111953735, 0.01716669648885727, 0.006950903218239546, 0.04076853767037392, 0.038913700729608536, -0.01238765474408865, -0.02854176238179207, -0.01887958124279976, 0.021633444353938103, -0.012860827147960663, -0.06476784497499466, 0.03936794772744179, -0.07275499403476715, 0.005919387564063072, -0.06650912016630173, 0.06215593218803406, -0.03355738893151283, 0.009889304637908936, 0.009070715866982937, 0.014923859387636185, 0.020914223045110703, 0.03669925406575203, -0.008952422998845577, 0.0392165333032608, -0.011393992230296135, -0.019144557416439056, 0.031607918441295624, 0.05901406705379486, 0.01710045151412487, -0.06567633897066116, 0.018803874030709267, -0.0019127996638417244, -0.01251067966222763, -0.027746831998229027, 0.021482029929757118, -0.020403197035193443, -0.0003856355615425855, 0.05432019755244255, -0.040389999747276306, -0.01779128424823284, 0.018936362117528915, 0.06783400475978851, 0.02854176238179207, 0.02439677156507969, 0.043986111879348755, -0.0008848324650898576, 0.00515757966786623, 0.08229415118694305, 0.0037120378110557795, 0.02933669276535511, -0.0009871560614556074, -0.0014230661327019334, 0.0596197284758091, 0.012747266329824924, 0.05257892236113548, 0.03018840216100216, 0.006709585431963205, -0.016939572989940643, -0.021576663479208946, -0.014725126326084137, -0.02045997604727745, -0.005441483110189438, -0.0384405292570591, -0.03626393526792526, 0.005957241170108318, 0.030036987736821175, -0.047620076686143875, 0.008441396988928318, -0.06476784497499466, 0.003645793767645955, 0.007466661278158426, -0.05719708651304245, 0.06363223493099213, 0.021463101729750633, -0.011289894580841064, 0.08426254987716675, 0.0025291068013757467, 0.008077053353190422, 0.008777349255979061, 0.004606334026902914, 0.03221357986330986, -0.006633877754211426, 0.0018938727444037795, -0.08782080560922623, -0.04194200783967972, 0.007835735566914082, -0.0723007544875145, 0.009274180047214031, -0.0175168439745903, 0.03796735778450966, 0.026156973093748093, -0.00021337119687814265, 0.00789724849164486, 0.005621288903057575, -0.08297552168369293, -0.008029736578464508, 0.0029975473880767822, 0.036793891340494156, 0.09009203314781189, 0.004613431636244059, 0.020781734958291054, 0.08214274048805237, 0.04300191253423691, 0.023601841181516647, -0.006368901114910841, -0.013532732613384724, -0.015803959220647812, 0.0007718625711277127, -0.044705335050821304, 0.026005558669567108, -0.02755756303668022, 0.040654975920915604, 0.011971263214945793, 0.07956867665052414, -0.010892430320382118, -0.02566487342119217, -0.03314099833369255, 0.0384405292570591, 0.026497656479477882, -0.027425074949860573, 0.0364721342921257, -0.06215593218803406, 0.04871783405542374, 0.003995941486209631, 0.05322243645787239, -0.005384702701121569, 0.06461642682552338, -0.06151241809129715, -0.03077513724565506, 0.03533652052283287, -0.001102491864003241, -0.10803473740816116, 0.009094374254345894, -0.0383080430328846, 0.038951557129621506, 0.010958674363791943, -0.010069109499454498, 0.03967077657580376, -0.02916635014116764, 0.038497310131788254, -0.059884704649448395, 0.0011776079190894961, -0.0035156712401658297, 0.001922263065353036, 0.01634337566792965, 0.031380798667669296, 0.03584754467010498, 0.03043445199728012, -0.07063518464565277, 0.008602275513112545, -0.01712884195148945, 0.000794338237028569, -0.016627280041575432, 0.037399549037218094, -0.018652457743883133, 0.005763240624219179, 0.01291760802268982, 0.01678815856575966, 0.03391700237989426, 0.016598889604210854, -0.002595350844785571, 0.027765760198235512, -0.08501962572336197, 0.047241538763046265, -0.05466088280081749, 0.021368468180298805, -0.04080639407038689, -0.0005246299551799893, 0.025210628286004066, 0.03808091953396797, 0.058824799954891205, 0.04894495755434036, -0.02693297527730465, -0.008029736578464508, -0.0012314312625676394, -0.00232209381647408, -0.0381755530834198, -0.015690399333834648, 0.013703074306249619, -0.0564778633415699, 0.044667478650808334, -0.03685067221522331, -0.050118427723646164, -0.026876194402575493, -0.03554471582174301, 0.002111532026901841, -0.035487934947013855, 0.021576663479208946, -0.005976167973130941, 0.018453726544976234, 0.01563361845910549, -0.049437057226896286, 0.07919014245271683, 0.0005187153001315892, 0.10122105479240417, 0.035487934947013855, -0.016163570806384087, 0.0013698342954739928, 0.029734157025814056, 0.025475604459643364, 0.03626393526792526, -0.0020027023274451494, 0.0019317265832796693, 0.0035109396558254957, -0.015822887420654297, -0.051254041492938995, -0.03724813461303711, -0.014242490753531456, 0.023866819217801094, 0.041412051767110825, 0.03715350106358528, 0.024150721728801727, 0.010996527969837189, -0.0596197284758091, 0.01823606714606285, -0.08342976868152618, -0.024926723912358284, -0.01816035807132721, 0.04440250247716904, -0.013059559278190136, -0.004767212551087141, 0.0509890653192997, -0.0058342162519693375, -0.0022416545543819666, -0.015775568783283234, -0.0466737300157547, 0.05280604586005211, 0.035790763795375824, -0.07245216518640518, -0.008015541359782219, -0.02134954184293747, -0.039973609149456024, -0.0033216706942766905, 0.019986804574728012, -0.007764759939163923, 0.021254906430840492, 0.022144470363855362, 0.01293653529137373, 0.04451606422662735, -0.030756209045648575, 0.062042370438575745, 0.01860514096915722, -0.053790245205163956, 0.027368294075131416, -0.04849071428179741, -0.0016856768634170294, 0.06817469000816345, 0.06310227513313293, 0.025967704132199287, -0.016371766105294228, -0.036169301718473434, -0.024491406977176666, -0.012056434527039528, 0.023734331130981445, 0.003839794546365738, -0.002059483202174306, -0.016731377691030502, -0.10394652187824249, 0.06317798793315887, -0.06984025239944458, 0.0027656930033117533, 0.007466661278158426, 0.004424162209033966, 0.045803092420101166, 0.040654975920915604, -0.016371766105294228, -0.030964406207203865, -0.03615037724375725, 0.031059039756655693, -0.02980986423790455, -0.038402676582336426, -0.03225143253803253, 0.026119118556380272, 0.0016561035299673676, 0.0002569917996879667, -0.014393906109035015, -0.00964798592031002, -0.03060479462146759, 0.017090989276766777, 0.03575291112065315, 0.05617503449320793, -0.021084563806653023, 0.03289495036005974, 0.02286369353532791, 0.03703993931412697, -0.02388574555516243, 0.001146851689554751, -0.01936221681535244, 0.05178399384021759, -0.03480656445026398, 0.06295086443424225, 0.0008457957883365452, 0.0031418651342391968, 0.010050183162093163, -0.09410453587770462, 0.02049783058464527, 0.04031429439783096, 0.03471193090081215, -0.030245183035731316, -0.053071022033691406, -0.007296319119632244, 0.03855409100651741, -0.03230821341276169, -0.011942872777581215, 0.03056694008409977, -0.029942352324724197, 0.06279944628477097, 0.04273693636059761, -0.055569373071193695, 0.05855982378125191, -0.02909064292907715, -0.03081298992037773, 0.027500782161951065, 0.017119379714131355, 0.01922972872853279, -0.023431500419974327, -0.02628946118056774, -0.005498263984918594, 0.029393473640084267, 0.024548185989260674, 0.03446588292717934, -0.03217572718858719, 0.05276819318532944, 0.04875569045543671, 0.031475432217121124, -0.02063031867146492, 0.008200078271329403, -0.010684234090149403, -0.0521625317633152, 0.005630752071738243, 0.0031702553387731314, -0.049020666629076004, -0.0662819966673851, 0.008843593299388885, -0.010930283926427364, -0.04803646728396416, -0.008966618217527866, 0.08577670156955719, -0.008223737590014935, -0.043986111879348755, 0.029052788391709328, -0.010769405402243137, 0.025967704132199287, 0.017090989276766777, -0.033159926533699036, -0.000644106010440737, 0.03864872455596924, 0.016674596816301346, -0.0899406224489212, -0.0065818289294838905, -0.01991109736263752, 0.0024959847796708345, 0.0038989409804344177, 0.041109222918748856, 0.0036765499971807003, -0.00978520605713129, 0.0005651453393511474, -0.05318458378314972, -0.00970003567636013, -0.023526133969426155, 0.046219486743211746, 0.02731151320040226, 0.010608525946736336, -0.004887871444225311, -0.036377497017383575, -0.014904932118952274, 0.057764891535043716, 0.036585692316293716, -0.007504514884203672, -0.012879754416644573, 0.00541309267282486, 0.0035487934947013855, 0.04440250247716904, -0.030964406207203865, -0.03175933659076691, 0.030869770795106888, -0.04462962597608566, -0.02337471954524517, 0.0005057030357420444, -0.04232054576277733, 0.005924119148403406, -0.025475604459643364, 0.05572078749537468, 0.012188922613859177, -0.023393645882606506, -0.01768718659877777, -0.07014308124780655, 0.03444695472717285, 0.00978520605713129, 0.02502135932445526, -0.09206043183803558, -0.002204983728006482, 0.030926551669836044, 0.025551311671733856, -0.06143671274185181, -0.035317592322826385, 0.05220038443803787, 0.027841467410326004, 0.08358117938041687, 0.02854176238179207, 0.02587307058274746, -0.006666999775916338, -0.015406494960188866, 0.043986111879348755, 0.06442715972661972, -0.007845199666917324, -0.06756902486085892, -0.015463275834918022, -0.045840948820114136, 0.030320890247821808, 0.029450252652168274, 0.02912849560379982, 0.01826445758342743, 0.03558256849646568, -0.029601668938994408, -0.07442056387662888, -0.0009546254295855761, 0.05038340389728546, 0.06215593218803406, -0.00956281553953886, 0.02282583899796009, -0.00444782106205821, 0.011696822941303253, -0.03898940980434418, 0.014270881190896034, 0.004797968547791243, -0.034181978553533554, -0.04531099274754524, 0.00170933548361063, 0.004788505379110575, 0.016333913430571556, -0.005044018384069204, 0.012103751301765442, 0.05178399384021759, -0.007622808218002319, 0.01110062561929226, -0.009993402287364006, -0.007537637371569872, -0.05348741263151169, -0.021955201402306557, -0.007551832124590874, 0.05291960760951042, 0.07396631687879562, 0.02186056785285473, -0.02755756303668022, 0.015056347474455833, -0.018652457743883133, 0.060225389897823334, 0.007622808218002319, 0.003775916062295437, 0.012775655835866928, 0.03715350106358528, -0.04659802466630936, -0.017355965450406075, -0.05000486597418785, -0.007769491523504257, 0.019352752715349197, 0.059165485203266144, 0.033084217458963394, 0.02628946118056774, -0.039254385977983475, 0.017762893810868263, 0.03482549265027046, -0.05167043209075928, 0.04413752630352974, -0.0065865605138242245, -0.01110062561929226, -0.014725126326084137, -0.02806858904659748, 0.045121725648641586, 0.018595676869153976, -0.017668260261416435, 0.026800487190485, -0.035071540623903275, -0.055531520396471024, 0.009250521659851074, 0.014592638239264488, -0.011621115729212761, -0.03382236510515213, -0.01655157282948494, 0.03387914597988129, -0.02912849560379982, 0.014062684960663319, -0.07347422093153, 0.008829398080706596, 0.009387741796672344, -0.06544921547174454, 0.02176593244075775, -0.057386353611946106, 0.02186056785285473, -0.021235980093479156, 0.08335405588150024, -0.05254106968641281, -0.026951903477311134, 0.018699774518609047, 0.0337277315557003, -0.052692484110593796, 0.0028721566777676344, 0.023734331130981445, 0.058446262031793594, -0.05394165962934494, -0.021993055939674377, -0.006099192891269922, 0.008114907890558243, -0.017195086926221848, -0.02303403429687023, -0.022560862824320793, -0.04500816389918327, 0.015463275834918022, -0.010201598517596722, -0.03153221309185028, 0.02539989724755287, 0.026649072766304016, -0.0047151632606983185, 0.0036528913769870996, -0.01983538828790188, -0.028977081179618835, -0.015945911407470703, 0.0682503953576088, -0.1100788414478302, -0.010286768898367882, -0.00155082275159657, -0.025797361508011818, -0.028693176805973053, -0.047203682363033295, -0.0056922645308077335, -0.0017755796434357762, -0.08214274048805237, 0.01266209501773119, -0.04277478903532028, 0.001728262403048575, 0.029790937900543213, 0.00001669965968176257, -0.07699462026357651, 0.038402676582336426, 0.008389347232878208, 0.011658969335258007, -0.0007482039509341121, 0.0025551312137395144, -0.05727279186248779, 0.02333686500787735, 0.0562128871679306, -0.03649105876684189, -0.013722001574933529, -0.05276819318532944, -0.03289495036005974, -0.03986004739999771, 0.027235805988311768, 0.08403542637825012, 0.03200538456439972, -0.04606806859374046, 0.03272460773587227, -0.002893449505791068, 0.0381755530834198, 0.007755296304821968, -0.006406755186617374, 0.006666999775916338, 0.0074761249125003815, 0.06298871338367462, -0.05439590662717819, -0.015775568783283234, -0.023810038343071938, 0.012841900810599327, -0.004566114395856857, -0.06715263426303864, 0.004665480460971594, -0.008039199747145176, -0.018728164955973625, -0.01933382637798786, -0.03382236510515213, -0.03989790007472038, -0.04273693636059761, -0.00464418763294816, 0.012444435618817806, 0.015643080696463585, 0.0027846198063343763, -0.06454072147607803, -0.05110262334346771, 0.009652717970311642, -0.004215966444462538, 0.0051954337395727634, 0.026667999103665352, -0.06450286507606506, 0.014649419113993645, 0.016125716269016266, -0.036793891340494156, 0.0015271641314029694, 0.021103492006659508, 0.018453726544976234, 0.011034381575882435, -0.02121705189347267, 0.07828164845705032, -0.006435145158320665, 0.015226689167320728, -0.00957701075822115, -0.015046884305775166, -0.039595071226358414, 0.00543201994150877, -0.0008682714542374015, -0.01655157282948494, 0.0134002435952425, 0.008237932808697224, -0.02028963528573513, 0.041033513844013214, -0.017450600862503052, 0.09213613718748093, -0.010750478133559227, -0.03043445199728012, 0.000710941618308425, -0.028295712545514107, 0.04334259778261185, 0.03760774806141853, -0.02093314938247204, -0.03876228630542755, -0.02786039374768734, -0.02240944653749466, 0.0031797189731150866, -0.05439590662717819, -0.030283037573099136, 0.04973988980054855, 0.004991969559341669, 0.002324459608644247, 0.014346588402986526, -0.009629059582948685, -0.021614518016576767, 0.023696476593613625, 0.027576491236686707, 0.009879840537905693, 0.02063031867146492, -0.01727079413831234, 0.05943046137690544, 0.07275499403476715, 0.0012988584348931909, -0.016882793977856636, 0.07214933633804321, 0.013740927912294865, -0.012889217585325241, -0.011280431412160397, -0.00043975465814583004, 0.020819587633013725, 0.020743880420923233, 0.023866819217801094, -0.002749131992459297, -0.005640215706080198, -0.0466737300157547, 0.046863000839948654, -0.05068623274564743, -0.01410053949803114, 0.0861552432179451, -0.02731151320040226, -0.012255166657269001, -0.07449626922607422, -0.004253820516169071, 0.02286369353532791, 0.020781734958291054, -0.06809897720813751, 0.007935102097690105, -0.019967878237366676, -0.008985544554889202, -0.03951936215162277, 0.010135353542864323, -0.03643427789211273, 0.09879840910434723, 0.05185969918966293, 0.01394912414252758, 0.005337385460734367, -0.004547187127172947, 0.00663860933855176 ]
716,023
torch.optim.lr_scheduler
__init__
null
def __init__(self, optimizer, factor=1.0 / 3, total_iters=5, last_epoch=-1, verbose="deprecated"): if factor > 1.0 or factor < 0: raise ValueError('Constant multiplicative factor expected to be between 0 and 1.') self.factor = factor self.total_iters = total_iters super().__init__(optimizer, last_epoch, verbose)
(self, optimizer, factor=0.3333333333333333, total_iters=5, last_epoch=-1, verbose='deprecated')
[ -0.018243812024593353, -0.0029513384215533733, 0.021503904834389687, 0.03901215270161629, -0.04881967604160309, -0.008281909860670567, -0.04453342780470848, -0.06647322326898575, -0.06788986176252365, 0.03456244245171547, 0.00724667077884078, 0.07341113686561584, -0.004663114435970783, 0.08223790675401688, 0.0015369661850854754, 0.03430817276239395, 0.024809405207633972, 0.013912155292928219, -0.029331762343645096, 0.05953530594706535, -0.007818776182830334, 0.033781472593545914, -0.01583733595907688, 0.056629374623298645, -0.017535490915179253, 0.06658219546079636, -0.005153490696102381, -0.01930629275739193, -0.017871489748358727, -0.010316062718629837, -0.05797336623072624, -0.0004617141967173666, -0.02618972212076187, 0.025372428819537163, 0.009834767319262028, -0.03556135669350624, -0.01225940603762865, 0.026135236024856567, -0.07373805344104767, 0.013485345989465714, 0.061932701617479324, -0.015201662667095661, -0.03034883923828602, -0.00766439875587821, -0.021322283893823624, -0.000453484506579116, 0.041336897760629654, 0.003791334806010127, -0.004438358824700117, -0.06643689423799515, -0.03648762404918671, -0.035761140286922455, 0.059281036257743835, -0.013730534352362156, -0.013040374964475632, 0.06738132238388062, 0.05891779437661171, -0.004070576746016741, -0.010188927873969078, 0.013358211144804955, -0.05027264356613159, -0.0293862484395504, 0.019960127770900726, -0.005589380860328674, 0.005861812271177769, -0.06959710270166397, -0.075554259121418, 0.017526408657431602, 0.01946975290775299, 0.06458436697721481, 0.03937539458274841, -0.027660852298140526, 0.006247756537050009, 0.008922123350203037, -0.003403120208531618, 0.009353472851216793, -0.07889608293771744, -0.04282619059085846, -0.0037391188088804483, -0.007964072749018669, 0.004615439102053642, 0.009544174186885357, -0.016300469636917114, -0.006969699170440435, 0.040937334299087524, -0.0811481848359108, -0.037740807980298996, -0.0770798772573471, 0.02213957905769348, 0.04980042949318886, -0.0630950778722763, -0.02126779779791832, 0.016482090577483177, 0.001823019003495574, -0.002581286011263728, 0.04013820365071297, -0.03229218348860741, -0.04987308010458946, -0.001944477902725339, -0.030839215964078903, 0.045405205339193344, 0.00818201806396246, 0.04130057618021965, 0.009462445043027401, 0.034798551350831985, -0.005239760968834162, -0.011660057120025158, -0.05982590094208717, 0.02253914438188076, -0.021594716235995293, -0.033799637109041214, 0.08071229606866837, -0.08412676304578781, 0.03369066119194031, -0.06349463760852814, 0.041627492755651474, -0.03009457141160965, -0.05281533673405647, 0.008731421083211899, 0.05891779437661171, -0.01420274842530489, 0.05517640709877014, -0.008204720914363861, 0.07715252786874771, -0.026244208216667175, -0.01961504854261875, 0.05350549519062042, 0.01765354350209236, 0.010779195465147495, -0.05012734606862068, 0.04395223781466484, -0.023719679564237595, -0.009980063885450363, -0.023883137851953506, 0.016400359570980072, -0.006034351885318756, 0.008776825852692127, 0.02856895513832569, -0.030603108927607536, 0.019687697291374207, 0.023320114240050316, 0.06008016690611839, -0.000051435585191939026, 0.0042181434109807014, 0.00608883798122406, 0.028732413426041603, -0.010597575455904007, -0.002674366580322385, -0.011160599999129772, -0.017253978177905083, -0.023828651756048203, 0.0032918774522840977, 0.06255020946264267, 0.010352387093007565, 0.04634963348507881, 0.023465409874916077, 0.008717799559235573, -0.03574297949671745, -0.016591062769293785, -0.004461061675101519, 0.0073828864842653275, -0.01749008521437645, -0.03748653829097748, -0.024482486769557, -0.02913198061287403, -0.009998226538300514, -0.06661851704120636, -0.01477485429495573, -0.05670202150940895, 0.018670620396733284, 0.033127639442682266, -0.09182748943567276, 0.03626967966556549, 0.027261285111308098, -0.0027856093365699053, 0.08034905046224594, 0.026571126654744148, 0.02017807401716709, 0.025299780070781708, 0.026770910248160362, 0.04482401907444, -0.013594319112598896, -0.01863429695367813, -0.05165296047925949, 0.013203834183514118, -0.047512006014585495, 0.0012611296260729432, 0.018834078684449196, 0.007473696954548359, 0.002107936656102538, 0.03287336975336075, 0.010888168588280678, -0.014175505377352238, 0.00326917483471334, -0.0307847298681736, -0.024682270362973213, 0.05895411968231201, -0.0077279661782085896, 0.10810071229934692, 0.035198114812374115, -0.06520187854766846, 0.06977871805429459, 0.04377061873674393, -0.016482090577483177, 0.003589281579479575, 0.024446163326501846, -0.012786106206476688, 0.01001638825982809, -0.01140578743070364, 0.009998226538300514, -0.00285144685767591, 0.003575660055503249, 0.042898837476968765, 0.06636425107717514, -0.01426631584763527, -0.022629953920841217, 0.03719594329595566, 0.017835164442658424, 0.03683270141482353, 0.026843557134270668, 0.07391967624425888, -0.05052691325545311, 0.006738132797181606, 0.004249927122145891, 0.011996055021882057, 0.021158825606107712, 0.06316772103309631, -0.042898837476968765, -0.03973863646388054, 0.018261974677443504, -0.03514362871646881, -0.07264833152294159, 0.006111540831625462, 0.013921236619353294, 0.0022861522156745195, 0.04438813030719757, -0.004976410418748856, -0.0016062092036008835, -0.07039622962474823, -0.053251225501298904, -0.02490021474659443, -0.028096741065382957, -0.01279518660157919, 0.011596489697694778, -0.03287336975336075, 0.03763183578848839, 0.0006981050246395171, 0.05568494647741318, -0.044569749385118484, 0.03835831955075264, 0.010779195465147495, -0.039121124893426895, -0.02533610537648201, 0.010733790695667267, -0.002667555818334222, 0.021049853414297104, -0.004436088725924492, 0.0026834476739168167, 0.027461068704724312, 0.008368179202079773, -0.014729448594152927, 0.02633501961827278, -0.07511837035417557, 0.06749029457569122, -0.02980397641658783, 0.00326917483471334, -0.03510730341076851, -0.03476222604513168, -0.025862805545330048, 0.03803139925003052, 0.10425035655498505, 0.04874702915549278, -0.0011884812265634537, 0.0033372826874256134, -0.030857378616929054, -0.02353805862367153, -0.05532170459628105, 0.009031095542013645, -0.0447876937687397, -0.04852908477187157, 0.052561067044734955, -0.04366164654493332, -0.024155570194125175, -0.017944136634469032, -0.04159116744995117, -0.0020534503273665905, 0.006125162355601788, 0.03601540997624397, -0.015592147596180439, 0.010724709369242191, 0.00343036325648427, 0.0122412433847785, 0.06596468389034271, 0.038975827395915985, 0.078387551009655, -0.0009421580471098423, -0.03192894160747528, -0.0001376345317112282, 0.017971379682421684, 0.018289217725396156, 0.01764446310698986, -0.07046888023614883, -0.028205713257193565, 0.017871489748358727, 0.005603002384305, 0.019397104158997536, 0.0010914276354014874, 0.02575383335351944, 0.05539435148239136, 0.04994572699069977, 0.04602271690964699, 0.013203834183514118, -0.03977496176958084, 0.009753038175404072, -0.009807524271309376, -0.048492759466171265, -0.000987563282251358, -0.057719096541404724, 0.001513128518126905, 0.031166132539510727, -0.013548913411796093, 0.043189432471990585, -0.04170013964176178, -0.05219782516360283, -0.03131143003702164, -0.04602271690964699, 0.051870908588171005, 0.01650025136768818, -0.059971194714307785, -0.013040374964475632, -0.045150935649871826, -0.011896164156496525, 0.01000730786472559, 0.014329883269965649, -0.03557952120900154, 0.018252892419695854, 0.028895873576402664, 0.008903960697352886, 0.01985115557909012, -0.01806219108402729, 0.07304789870977402, 0.0012599944602698088, -0.04046512022614479, 0.03817669674754143, -0.027188638225197792, -0.025935454294085503, -0.0017935056239366531, -0.06280448287725449, 0.050999127328395844, -0.050599560141563416, -0.06084297597408295, -0.034507956355810165, 0.005825487896800041, 0.01945159025490284, 0.04180911183357239, 0.020813746377825737, -0.02197611890733242, -0.0839088186621666, 0.000707186060026288, -0.08565238118171692, 0.01636403612792492, 0.03734124079346657, 0.005870893131941557, 0.058046016842126846, 0.03481671214103699, -0.02577199414372444, -0.00825012568384409, -0.055067434906959534, 0.03723226860165596, 0.010824601165950298, 0.0032918774522840977, -0.058845147490501404, -0.0019842074252665043, -0.004592736717313528, -0.000014747824025107548, -0.0012792916968464851, -0.04380694404244423, 0.0146931242197752, 0.0129404840990901, 0.03937539458274841, 0.04533255845308304, 0.004626790527254343, 0.0003164175432175398, 0.008390882052481174, 0.0034712280612438917, -0.002417827257886529, -0.03430817276239395, -0.009889253415167332, 0.09015657752752304, 0.009471526369452477, 0.0016379927983507514, 0.021503904834389687, 0.013766858726739883, -0.020123587921261787, -0.04700347036123276, 0.03683270141482353, 0.02840549685060978, -0.006969699170440435, -0.07075947523117065, -0.017535490915179253, -0.00972579512745142, -0.0143571263179183, 0.016899818554520607, 0.06106092035770416, 0.03599724546074867, -0.058445580303668976, 0.06073400378227234, 0.03412655368447304, -0.009190013632178307, 0.04929189011454582, -0.014012046158313751, -0.03850361332297325, 0.002381503116339445, 0.03568849340081215, -0.025245293974876404, -0.029785815626382828, -0.01734478957951069, -0.09531460702419281, 0.05125339701771736, 0.011850758455693722, 0.05517640709877014, 0.0406104177236557, 0.05390506237745285, 0.050054699182510376, 0.042172353714704514, 0.008000397123396397, -0.008295531384646893, -0.03966598957777023, 0.0010233197826892138, -0.022048767656087875, -0.06538349390029907, -0.02030520886182785, -0.025644861161708832, -0.006225053686648607, 0.023011358454823494, -0.02813306637108326, -0.046531256288290024, 0.022593630477786064, -0.0181802436709404, -0.02882322482764721, 0.05935368686914444, -0.04100998118519783, 0.022920547053217888, -0.012359296903014183, -0.02687988243997097, -0.018443593755364418, 0.03835831955075264, 0.015483175404369831, -0.0853617861866951, -0.023447249084711075, 0.028078580275177956, -0.02504551224410534, -0.013830426149070263, -0.009012933820486069, 0.027624526992440224, 0.008999311365187168, -0.019124673679471016, -0.010552169755101204, 0.025227133184671402, 0.004812951665371656, -0.005902676843106747, 0.027787985280156136, 0.0005942406132817268, -0.010188927873969078, -0.04511461406946182, 0.01279518660157919, 0.06367626041173935, 0.07657133787870407, 0.013948479667305946, -0.004642682150006294, -0.008431746624410152, 0.039956580847501755, -0.010534008033573627, -0.01623690128326416, -0.03272807225584984, 0.02408292144536972, -0.04046512022614479, -0.023883137851953506, 0.014674962498247623, -0.0023837732151150703, 0.015991713851690292, -0.04180911183357239, 0.04831114038825035, -0.01859797164797783, -0.0010959681821987033, 0.024682270362973213, -0.043334729969501495, 0.0029082035180181265, 0.040247175842523575, 0.029640518128871918, -0.05252474173903465, 0.02827836200594902, 0.023846814408898354, 0.027406582608819008, -0.009094662964344025, 0.023283788934350014, 0.03545238450169563, 0.0307847298681736, 0.02504551224410534, 0.03879420831799507, 0.0023451789747923613, 0.0028423659969121218, -0.054776839911937714, -0.012749781832098961, 0.025445077568292618, -0.0005425921990536153, -0.08136612921953201, 0.006238675210624933, -0.038140371441841125, 0.0419544093310833, 0.050853829830884933, -0.0073147788643836975, -0.016282306984066963, 0.0258991289883852, 0.00833639595657587, -0.03154753893613815, -0.05826396122574806, 0.029295438900589943, 0.005630245432257652, -0.0016572900349274278, 0.01239562127739191, 0.037595510482788086, -0.025172647088766098, -0.03443530946969986, 0.03817669674754143, -0.021376771852374077, -0.007051428314298391, -0.0391574501991272, 0.07297524809837341, -0.004479223396629095, -0.011324058286845684, -0.029349924996495247, -0.0018820457626134157, 0.11783558875322342, 0.00362333538942039, -0.016454847529530525, -0.0031602024100720882, -0.013285563327372074, 0.016709115356206894, -0.04257192090153694, 0.010906330309808254, 0.034072067588567734, 0.09073776006698608, -0.01859797164797783, -0.036451298743486404, -0.0003706199931912124, -0.059716928750276566, 0.08470795303583145, 0.01554674282670021, 0.0008224017801694572, -0.011505679227411747, -0.0033531745430082083, -0.05891779437661171, -0.012858754023909569, -0.007192184682935476, 0.021594716235995293, 0.0462043359875679, 0.03948436677455902, 0.03792242705821991, 0.02967684343457222, -0.017708029597997665, -0.004921924322843552, 0.04489666596055031, -0.0056120832450687885, 0.03652394935488701, -0.03290969505906105, -0.022012444213032722, 0.004767546430230141, -0.036887187510728836, 0.015492256730794907, 0.029150141403079033, -0.014547827653586864, -0.00013848587695974857, 0.05237944424152374, -0.07678928226232529, 0.004515547771006823, 0.003927550278604031, 0.04050144553184509, 0.0033304719254374504, -0.006956077646464109, 0.011587408371269703, -0.0015857768012210727, -0.045296233147382736, -0.01874326914548874, -0.009825686924159527, 0.015101771801710129, -0.06218697130680084, -0.011669137515127659, -0.036324165761470795, 0.003630146151408553, -0.0009972117841243744, 0.024446163326501846, -0.06400317698717117, -0.042317651212215424, -0.028605280444025993, -0.00042141706217080355, -0.05670202150940895, -0.021158825606107712, 0.04852908477187157, 0.03487119823694229, -0.0994555652141571, -0.0020886394195258617, -0.024428000673651695, 0.013249238952994347, 0.021322283893823624, -0.004663114435970783, -0.06055238097906113, 0.04685817286372185, -0.04144587367773056, 0.0010085630929097533, -0.02297503501176834, 0.035052817314863205, 0.01511085219681263, -0.006956077646464109, -0.047947898507118225, -0.01265897136181593, -0.011442111805081367, -0.003439444350078702, 0.04224500432610512, -0.03904847800731659, -0.06538349390029907, 0.010261576622724533, -0.022793414071202278, 0.02954970858991146, -0.0686526745557785, -0.013594319112598896, 0.018280135467648506, -0.1133313924074173, -0.00699240155518055, -0.05583024024963379, -0.008595205843448639, 0.016137009486556053, 0.0034008498769253492, -0.04184543713927269, -0.015210743993520737, -0.008104829117655754, -0.01733570732176304, 0.03361801430583, 0.03131143003702164, -0.025027349591255188, 0.03652394935488701, 0.06091562286019325, -0.013766858726739883, -0.03290969505906105, -0.023138493299484253, -0.06756294518709183, -0.03265542536973953, 0.03610622137784958, 0.07860549539327621, 0.015455932356417179, -0.01766262575984001, 0.03599724546074867, 0.0045564123429358006, 0.04369797185063362, -0.0009518066071905196, -0.028351010754704475, -0.0023338275495916605, 0.029586032032966614, 0.07410129904747009, -0.03158386051654816, -0.007659858092665672, -0.014901988208293915, 0.04489666596055031, 0.010125361382961273, 0.010488602332770824, 0.009076500311493874, -0.01943342760205269, -0.07453718781471252, -0.04144587367773056, 0.009671309031546116, -0.025808319449424744, -0.003984306938946247, -0.012186757288873196, -0.018434513360261917, -0.011033465154469013, 0.007192184682935476, -0.01329464465379715, -0.03109348565340042, 0.002045504515990615, -0.006365810055285692, -0.017036033794283867, 0.009203635156154633, -0.015119933523237705, 0.004749384708702564, 0.012059622444212437, 0.002626691246405244, -0.07163125276565552, 0.07355643063783646, -0.029604194685816765, -0.022175902500748634, -0.05023631826043129, 0.03581562638282776, -0.004029712174087763, 0.02727944776415825, 0.0005811866139993072, -0.010751952417194843, -0.06650954484939575, -0.04660390317440033, 0.033109474927186966, -0.033944930881261826, 0.03610622137784958, 0.014257234521210194, -0.04664022848010063, 0.023429086431860924, -0.02577199414372444, 0.055067434906959534, -0.020541315898299217, -0.04446077719330788, 0.028768738731741905, -0.03525260090827942, 0.02546324022114277, 0.05430462583899498, -0.0019285861635580659, -0.025027349591255188, -0.011678218841552734, 0.07577221095561981, 0.04827481508255005, -0.008340936154127121, -0.01932445541024208, 0.01567387767136097, 0.010243414901196957, -0.030857378616929054, 0.02210325375199318, 0.04700347036123276, -0.0007293210946954787, -0.015401446260511875, 0.0028923116624355316, -0.016264144331216812, 0.04874702915549278, -0.0041568465530872345, 0.035888273268938065, 0.02827836200594902, -0.03329109773039818, -0.07326584309339523, 0.0017753435531631112, -0.022448332980275154, 0.022085092961788177, -0.0174719225615263, 0.03930274769663811, 0.013530751690268517, -0.0175082478672266, -0.0012066432973369956, -0.014647719450294971, 0.0209953673183918, -0.002027342561632395, 0.010597575455904007, 0.0025109078269451857, 0.006429377011954784, 0.04565947502851486, 0.005153490696102381, -0.018706945702433586, -0.033109474927186966, 0.037595510482788086, 0.07606279850006104, 0.0364331379532814, -0.07428291440010071, 0.023701516911387444, -0.023992110043764114, 0.013330968096852303, -0.07773371040821075, -0.016273226588964462, -0.05764644965529442, 0.09044717252254486, -0.004365710541605949, 0.006883429363369942, 0.018943052738904953, 0.07301156967878342, -0.004812951665371656 ]
716,024
torch.optim.lr_scheduler
_get_closed_form_lr
null
def _get_closed_form_lr(self): return [base_lr * (self.factor + (self.last_epoch >= self.total_iters) * (1 - self.factor)) for base_lr in self.base_lrs]
(self)
[ 0.0009234407334588468, 0.007459775544703007, -0.018116597086191177, 0.022289013490080833, -0.008904768154025078, -0.0011356740724295378, -0.003869871376082301, -0.06758953630924225, 0.02387850545346737, 0.030579660087823868, -0.01644582487642765, -0.011325131170451641, 0.03272908553481102, 0.03426439315080643, 0.019037779420614243, 0.04100167006254196, -0.020067337900400162, 0.0010781000601127744, -0.031139595434069633, -0.02490806393325329, 0.0010679400293156505, 0.05303123593330383, -0.006236047018319368, 0.04490315169095993, -0.04573402181267738, 0.04782926291227341, -0.004989740904420614, -0.002422620775178075, -0.06997377425432205, -0.02772579900920391, -0.035203635692596436, 0.03287358582019806, 0.037642061710357666, -0.04978000372648239, -0.015867827460169792, -0.014278335496783257, -0.01665354147553444, 0.013880962505936623, 0.004217572510242462, 0.031880155205726624, 0.022144515067338943, -0.027328426018357277, -0.04136291891336441, 0.004251439590007067, -0.05545159801840782, -0.025829246267676353, -0.00825903657823801, 0.014296397566795349, 0.031952403485774994, -0.03384895622730255, 0.0193809662014246, -0.02579312212765217, 0.007270120084285736, -0.030507409945130348, -0.008710597641766071, 0.023210197687149048, -0.03767818585038185, -0.0076810396276414394, 0.02853860706090927, -0.0240410678088665, -0.01571429707109928, -0.04981612786650658, -0.023607570677995682, 0.022252889350056648, 0.0607619471848011, -0.01976027712225914, -0.021403955295681953, 0.014115773141384125, 0.01990477554500103, 0.03710018843412399, -0.012038595974445343, -0.017285726964473724, 0.01352874469012022, -0.0006886293995194137, -0.04772088676691055, -0.011307069100439548, 0.010927758179605007, -0.027671612799167633, -0.013555838726460934, -0.07896886020898819, 0.009871107526123524, 0.061303820461034775, 0.04049592465162277, 0.006814043968915939, -0.02351725846529007, -0.08453208208084106, 0.01146059948951006, -0.0018672016449272633, -0.07976360619068146, -0.0007732969243079424, -0.0380394347012043, -0.007834570482373238, 0.006068969611078501, -0.027075553312897682, -0.021422017365694046, 0.012887529097497463, -0.10418397933244705, 0.04696226492524147, 0.002555831102654338, -0.05899183079600334, 0.011361256241798401, 0.042880162596702576, -0.07593437284231186, 0.09284079074859619, 0.01762891188263893, 0.017827598378062248, -0.0343366414308548, -0.07019052654504776, 0.002842571819201112, -0.006005751434713602, -0.0373169407248497, 0.0808473452925682, -0.02306569740176201, 0.04269953817129135, -0.08041384816169739, 0.02358950674533844, -0.00525164557620883, 0.036540254950523376, 0.00528777064755559, 0.0311034694314003, -0.004560758359730244, -0.005870283115655184, -0.04410840570926666, 0.03475207835435867, 0.005644503049552441, 0.04194091632962227, 0.00720690144225955, 0.03988180309534073, -0.001629003556445241, -0.050321873277425766, 0.03753368929028511, 0.013826774433255196, 0.001306138001382351, 0.025269310921430588, -0.01643679291009903, -0.03487851470708847, -0.010801320895552635, -0.010394916869699955, -0.005089084152132273, 0.01290559209883213, 0.008236458525061607, 0.04985225200653076, 0.022072264924645424, 0.04739576205611229, 0.012201158329844475, 0.047612514346838, 0.02595568262040615, 0.10418397933244705, 0.0017001243541017175, 0.0029170792549848557, 0.00615476630628109, 0.02830379642546177, 0.06242368742823601, 0.004185963422060013, 0.041146170347929, -0.011668317019939423, 0.016490980982780457, -0.015831701457500458, 0.0030209380201995373, -0.015434329397976398, -0.03271102532744408, -0.017087040469050407, -0.07759611308574677, -0.057619087398052216, 0.014747957699000835, 0.008913799189031124, 0.016906416043639183, -0.06325455754995346, -0.014820207841694355, 0.023914631456136703, 0.001107451505959034, -0.04963550344109535, 0.02935141697525978, -0.0158497653901577, -0.042735662311315536, 0.040062423795461655, -0.014513146132230759, 0.02218063920736313, -0.035275887697935104, 0.03581775724887848, 0.03652219474315643, -0.03029066137969494, -0.0322955884039402, -0.08287033438682556, -0.007933913730084896, 0.01687029004096985, -0.05433173105120659, -0.024167504161596298, -0.010990976355969906, -0.013041060417890549, -0.011641222983598709, -0.0023503710981458426, 0.014052554965019226, -0.05935307964682579, -0.03148278221487999, -0.002966750878840685, -0.038220059126615524, 0.06022007390856743, 0.03858130797743797, -0.033361271023750305, -0.013664213009178638, 0.05151399224996567, -0.03458951413631439, -0.0316995307803154, -0.06022007390856743, 0.018486876040697098, -0.07839085906744003, -0.0055045196786522865, 0.014738926663994789, 0.022885072976350784, 0.016536137089133263, 0.030850596725940704, -0.0028877276927232742, 0.016238106414675713, 0.03215108811855316, -0.0153711112216115, -0.040676549077034, -0.013041060417890549, -0.013926117680966854, 0.0005681192269548774, 0.016635479405522346, -0.05696884170174599, 0.014729895628988743, -0.0519113652408123, -0.015506578609347343, 0.005739330779761076, 0.02071758359670639, -0.0181256290525198, -0.01666257344186306, 0.04251891374588013, -0.05064699798822403, -0.050538621842861176, -0.009862075559794903, -0.008091960102319717, 0.0359983816742897, 0.1131429374217987, -0.03392120450735092, 0.027454862371087074, -0.05639084428548813, 0.061737317591905594, -0.039339929819107056, -0.00848030112683773, 0.016617417335510254, 0.015867827460169792, 0.02698524110019207, 0.032187215983867645, 0.04403615742921829, 0.025756996124982834, -0.03706406429409981, 0.022650262340903282, -0.02160264179110527, -0.053862106055021286, 0.020229898393154144, 0.01628326252102852, 0.07665687054395676, -0.04974387586116791, -0.04371103271842003, -0.039917927235364914, 0.016716759651899338, -0.013032028451561928, 0.06448280066251755, 0.06238756328821182, -0.05241711437702179, 0.032403964549303055, -0.07073239982128143, 0.04121841862797737, -0.03128409385681152, -0.016427762806415558, 0.03775043785572052, 0.018161753192543983, 0.11184244602918625, -0.006791466381400824, -0.07542862743139267, 0.011415443383157253, 0.02647949382662773, 0.005621924996376038, 0.022505762055516243, 0.010963883250951767, -0.05480135232210159, 0.01733088307082653, 0.009527921676635742, -0.014982769265770912, 0.000973112357314676, -0.014549271203577518, -0.040676549077034, 0.01635551266372204, -0.012986872345209122, -0.051875241100788116, 0.009017658419907093, -0.016996728256344795, 0.032620713114738464, 0.017367007210850716, 0.06376031041145325, 0.06693929433822632, 0.10403948277235031, -0.015976201742887497, 0.03319871053099632, -0.03840068355202675, 0.031157657504081726, 0.03345158323645592, 0.01028654258698225, -0.04045979678630829, 0.06141219288110733, 0.009573076851665974, -0.02581118419766426, -0.11762241274118423, 0.02013958804309368, -0.026371117681264877, -0.011081288568675518, 0.01526273600757122, 0.001969931647181511, 0.05852220952510834, 0.040965545922517776, -0.07456162571907043, -0.011189662851393223, -0.0645911768078804, -0.02765354886651039, 0.016265200451016426, 0.043530408293008804, 0.04916587844491005, -0.006267656106501818, -0.00031355215469375253, 0.023101821541786194, -0.010954851284623146, -0.04172416776418686, -0.0158497653901577, 0.02205420285463333, 0.0030209380201995373, -0.018550094217061996, -0.023932693526148796, -0.026497555896639824, -0.06802303344011307, 0.00884154997766018, 0.012770123779773712, 0.005052959080785513, -0.03263877332210541, 0.06509692221879959, 0.010828414931893349, 0.008254521526396275, -0.07578986883163452, 0.010774227790534496, -0.037931062281131744, -0.03274714946746826, 0.016996728256344795, -0.03007391281425953, 0.022758636623620987, 0.05104437097907066, 0.008525457233190536, 0.028574733063578606, 0.013131371699273586, -0.04082104563713074, -0.03648606687784195, -0.009862075559794903, 0.046420395374298096, -0.013050091452896595, 0.04215766489505768, -0.04103779420256615, 0.0028899856843054295, 0.012959779240190983, -0.02012152411043644, 0.014278335496783257, 0.00396018335595727, -0.013041060417890549, 0.02263220027089119, 0.013339090161025524, 0.016626449301838875, 0.00003120351902907714, -0.01558785978704691, 0.02573893405497074, 0.011397380381822586, -0.05548772215843201, -0.01923646591603756, 0.003174468642100692, 0.011009039357304573, -0.04222991317510605, -0.003068351885303855, -0.016012325882911682, -0.0359983816742897, 0.039123181253671646, 0.03236784040927887, -0.014296397566795349, -0.014296397566795349, 0.02550412341952324, 0.0036147397477179766, 0.012146971188485622, 0.006412155460566282, -0.0019631581380963326, -0.031229907646775246, 0.03509526327252388, -0.005608378443866968, -0.01777341216802597, -0.03518557548522949, 0.0025264795403927565, 0.009130548685789108, -0.031247969716787338, 0.004452384077012539, 0.04660101607441902, 0.04743188992142677, 0.027220051735639572, -0.04468640312552452, -0.02463712729513645, 0.06430217623710632, -0.020229898393154144, 0.021060770377516747, -0.012544344179332256, -0.0044230325147509575, 0.03419214114546776, 0.07040727138519287, -0.030904782935976982, -0.05758296325802803, -0.02868310734629631, 0.021927766501903534, 0.019706089049577713, -0.021205268800258636, 0.00676437234506011, -0.016319386661052704, -0.04165191575884819, -0.005179395899176598, 0.0461675189435482, 0.014467990025877953, 0.07261088490486145, 0.0265517421066761, 0.023860443383455276, 0.033578019589185715, -0.01271593663841486, 0.02315600961446762, -0.0045562428422272205, 0.056426968425512314, -0.07011827826499939, 0.04092942178249359, -0.008787362836301327, -0.024023005738854408, -0.025269310921430588, -0.06105094403028488, -0.025919558480381966, -0.05877508223056793, -0.04754026234149933, 0.061231568455696106, -0.04613139480352402, -0.012824310921132565, 0.06224306300282478, 0.015804609283804893, 0.06347130984067917, 0.003937605302780867, 0.08655507117509842, -0.026569806039333344, -0.0014833754394203424, 0.031663402915000916, -0.07300826162099838, 0.0025761511642485857, -0.029080480337142944, -0.031247969716787338, 0.012291469611227512, 0.026208557188510895, -0.0031202812679111958, 0.07387525588274002, 0.00419951044023037, -0.041977040469646454, -0.00593350175768137, -0.011659285984933376, 0.06545817106962204, 0.024203630164265633, 0.017132196575403214, 0.05848608538508415, -0.0037411765661090612, -0.020807895809412003, 0.024528753012418747, -0.010963883250951767, -0.043024659156799316, -0.006005751434713602, 0.01644582487642765, 0.031211843714118004, 0.03525782376527786, -0.0992710068821907, -0.026371117681264877, 0.043241407722234726, -0.00394212082028389, -0.012706905603408813, 0.037858810275793076, -0.06303781270980835, -0.04822663590312004, -0.07622337341308594, -0.018712656572461128, -0.02337275817990303, -0.03686537966132164, -0.03767818585038185, -0.10447297990322113, 0.016418730840086937, -0.01290559209883213, -0.0025355108082294464, -0.02478162571787834, 0.02212645299732685, 0.0027025879826396704, 0.021403955295681953, -0.01021429244428873, 0.00003460785956121981, 0.04750413820147514, 0.0022363520693033934, 0.05140561982989311, 0.040676549077034, 0.02411331795156002, -0.02299344725906849, -0.013212652876973152, 0.04949100315570831, 0.032855525612831116, -0.016563229262828827, -0.039195429533720016, -0.03605256974697113, -0.024438440799713135, -0.006931449752300978, -0.011532848700881004, -0.01312234066426754, -0.0021674891468137503, 0.016039419919252396, -0.050394125282764435, -0.02483581379055977, -0.031807903200387955, 0.03339739516377449, 0.039412178099155426, 0.05079149827361107, -0.004366587847471237, -0.004262728616595268, -0.0014980511041358113, -0.03428245335817337, -0.007107558194547892, 0.03104928322136402, -0.06744503974914551, -0.011027101427316666, 0.013772587291896343, 0.013573900796473026, 0.05241711437702179, -0.03184402734041214, 0.052091989666223526, 0.04064042121171951, -0.06813140958547592, 0.0507192462682724, 0.0065024676732718945, -0.07477837800979614, 0.002670978894457221, -0.03177177906036377, -0.01783663034439087, 0.03652219474315643, 0.06390480697154999, 0.06336293369531631, 0.0070624020881950855, 0.011126444675028324, 0.01592201367020607, 0.017592787742614746, 0.050105124711990356, -0.0032918741926550865, 0.01592201367020607, 0.029369479045271873, -0.0011932479683309793, -0.0449753999710083, 0.015813639387488365, 0.005247130058705807, 0.06553042680025101, 0.051802992820739746, 0.02787029929459095, -0.039195429533720016, 0.00033895240630954504, -0.01204762700945139, 0.04165191575884819, -0.048479508608579636, -0.020880145952105522, -0.003445404814556241, 0.022379325702786446, 0.033072274178266525, -0.02344500832259655, 0.035203635692596436, 0.013357152231037617, -0.007455259561538696, 0.017972098663449287, -0.035203635692596436, 0.060256198048591614, -0.030055850744247437, 0.00429208017885685, -0.054295603185892105, -0.0074823531322181225, -0.020482772961258888, 0.029893288388848305, -0.016039419919252396, 0.0018186589004471898, -0.09226278960704803, 0.003537974553182721, -0.002860634122043848, -0.05639084428548813, 0.041110046207904816, -0.01666257344186306, -0.00044224681914784014, -0.0096904831007123, 0.028809543699026108, -0.022614138200879097, -0.04446965456008911, -0.012445000931620598, -0.009681452065706253, -0.04959937930107117, -0.017439257353544235, -0.07051564753055573, 0.07470612972974777, 0.026208557188510895, -0.011767660267651081, -0.03858130797743797, 0.05639084428548813, -0.026064056903123856, -0.03988180309534073, 0.0023639178834855556, -0.014919551089406013, -0.04392778128385544, 0.016472917050123215, 0.010701977647840977, 0.04916587844491005, 0.02844829484820366, -0.04172416776418686, 0.011117413640022278, -0.04526440054178238, 0.006236047018319368, 0.02552218548953533, 0.026876866817474365, 0.0033302567899227142, 0.010756164789199829, -0.020446648821234703, 0.006330874748528004, -0.010412978939712048, -0.05559609830379486, 0.026569806039333344, 0.016238106414675713, 0.007798445411026478, 0.023788193240761757, -0.03533007577061653, 0.0039466368034482, 0.01939902827143669, -0.024077191948890686, -0.03699181601405144, 0.005644503049552441, 0.08763881027698517, 0.018468813970685005, -0.003436373546719551, 0.009834982454776764, 0.004989740904420614, -0.02507062442600727, 0.03724468871951103, -0.015009862370789051, -0.05848608538508415, -0.05631859600543976, -0.02787029929459095, -0.028646981343626976, 0.004601398948580027, 0.0265517421066761, 0.018857156857848167, -0.04837113246321678, 0.04396390542387962, 0.03988180309534073, -0.028701169416308403, 0.0181256290525198, -0.052380990236997604, 0.033794768154621124, 0.0669754147529602, 0.07933010160923004, -0.039917927235364914, -0.028502482920885086, -0.034101828932762146, 0.035564884543418884, -0.03305421024560928, -0.023697881028056145, 0.010051731020212173, 0.015976201742887497, 0.027978673577308655, -0.009582108817994595, -0.06574717164039612, -0.019110029563307762, -0.035799697041511536, -0.0018796195508912206, 0.046637143939733505, -0.03455338999629021, 0.03789493441581726, -0.048479508608579636, 0.012607562355697155, 0.1260756254196167, 0.018306251615285873, -0.015885889530181885, 0.028935980051755905, -0.07159939408302307, -0.002237481065094471, 0.0655665472149849, 0.008254521526396275, -0.014495084062218666, 0.055704470723867416, -0.010123981162905693, 0.03294583410024643, -0.025919558480381966, -0.011469630524516106, 0.017665037885308266, -0.023481132462620735, 0.02734648808836937, 0.07470612972974777, -0.006628904491662979, 0.027382614091038704, 0.015506578609347343, 0.03023647516965866, 0.0288276057690382, 0.0005748926196247339, 0.022740574553608894, 0.02801479771733284, 0.005829642992466688, 0.01856815814971924, 0.03507719933986664, 0.006448280531913042, -0.06007557734847069, 0.0012022791197523475, 0.036540254950523376, 0.0387619324028492, -0.013980305753648281, 0.011243849992752075, -0.03455338999629021, -0.024799689650535583, -0.002722908277064562, 0.01101807039231062, -0.046709392219781876, -0.0015104690100997686, 0.021114956587553024, 0.022307075560092926, 0.05035799741744995, 0.025323498994112015, -0.005215520970523357, 0.0514417439699173, -0.006714700721204281, 0.059678204357624054, -0.038292307406663895, -0.032241400331258774, -0.0205730851739645, 0.030832534655928612, -0.03189821541309357, -0.03832843527197838, -0.0228489488363266, 0.0027183927595615387, 0.026425305753946304, 0.016382606700062752, -0.02026602439582348, -0.0171683207154274, -0.018387533724308014, 0.010936789214611053, 0.010313635692000389, 0.09204604476690292, -0.041146170347929, 0.04009855166077614, 0.001790436333976686, -0.060942571610212326, 0.02122333087027073, -0.04085716977715492, 0.054440103471279144, -0.014097711071372032, -0.0007823281339369714, -0.02292119897902012, -0.02787029929459095, -0.026208557188510895, 0.031374406069517136, -0.03267490118741989, -0.02507062442600727, -0.01606651395559311, 0.023101821541786194, -0.04392778128385544, 0.04988837614655495, 0.08099184930324554, -0.013871930539608002, 0.03507719933986664, -0.033072274178266525, -0.06943190097808838 ]
716,027
torch.optim.lr_scheduler
get_lr
null
def get_lr(self): if not self._get_lr_called_within_step: warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.", UserWarning) if self.last_epoch == 0: return [group['lr'] * self.factor for group in self.optimizer.param_groups] if self.last_epoch != self.total_iters: return [group['lr'] for group in self.optimizer.param_groups] return [group['lr'] * (1.0 / self.factor) for group in self.optimizer.param_groups]
(self)
[ -0.004878837149590254, 0.016625218093395233, -0.013028818182647228, 0.02330690249800682, 0.019756967201828957, 0.03170779347419739, 0.013103162869811058, -0.042524874210357666, -0.003168920986354351, 0.05702199041843414, -0.012564167380332947, -0.043863069266080856, 0.026819664984941483, 0.0556466206908226, 0.008865543641149998, 0.04434630647301674, -0.044569339603185654, 0.02479378506541252, -0.033845189958810806, -0.020426064729690552, 0.000685941253323108, 0.009121102280914783, -0.02256345935165882, -0.001077990629710257, -0.034793078899383545, 0.030908595770597458, 0.03312033414840698, -0.02722855843603611, -0.027098454535007477, 0.03951393440365791, -0.04323114454746246, -0.015138334594666958, -0.01813068799674511, -0.06055333837866783, -0.022935181856155396, 0.004497823305428028, -0.029142919927835464, -0.020797785371541977, -0.04055475443601608, -0.021299608051776886, 0.0438258983194828, -0.012796493247151375, 0.004456004593521357, 0.008317255415022373, -0.04806351661682129, -0.018390892073512077, -0.021355366334319115, -0.02390165627002716, 0.011328195221722126, -0.050516873598098755, 0.01919938623905182, 0.022005878388881683, -0.005970767233520746, -0.023251144215464592, 0.011895069852471352, -0.022656390443444252, 0.005129748955368996, -0.06757886707782745, 0.024868130683898926, -0.009186153300106525, 0.05817432329058647, -0.07534783333539963, -0.03284154459834099, 0.030425358563661575, 0.07895352691411972, -0.06590612232685089, -0.024570753797888756, 0.004404893144965172, -0.016327841207385063, 0.03536924719810486, -0.013484176248311996, -0.017340781167149544, 0.014246204867959023, -0.010482530109584332, -0.019533934071660042, 0.004943888168781996, -0.004855604376643896, -0.03100152499973774, -0.014069637283682823, -0.016848251223564148, 0.02401317097246647, 0.08965908735990524, 0.03917938470840454, 0.00018368240853305906, -0.011216678656637669, -0.09025383740663528, -0.031224558129906654, -0.012554874643683434, -0.046056222170591354, -0.019217971712350845, 0.008995646610856056, -0.03585248440504074, 0.023641450330615044, 0.003631248837336898, -0.035387832671403885, 0.001292891800403595, -0.11590258777141571, 0.008521702140569687, -0.0010164243867620826, -0.06107374653220177, 0.015835311263799667, 0.026262084022164345, 0.005938241723924875, 0.05888059362769127, 0.03620561957359314, 0.004929948598146439, -0.023232556879520416, -0.05055404454469681, 0.004379337187856436, 0.03466297686100006, -0.03200517222285271, 0.07003222405910492, -0.054234083741903305, 0.037971291691064835, -0.04230184108018875, 0.02490530163049698, -0.016987645998597145, 0.03899352625012398, -0.007076636888086796, 0.05995858460664749, -0.004191153217107058, 0.04587036371231079, 0.006128748878836632, 0.015686623752117157, -0.05769108608365059, -0.002040980150923133, 0.0040145860984921455, 0.018771907314658165, -0.029793431982398033, -0.028250791132450104, 0.023734381422400475, -0.001259204582311213, -0.024366306141018867, -0.03233972191810608, 0.01321467850357294, -0.02841806411743164, 0.04795200005173683, 0.048175033181905746, 0.004855604376643896, -0.011030818335711956, 0.030035050585865974, 0.07612844556570053, 0.04735724627971649, -0.021596984937787056, 0.0594010055065155, 0.027042698115110397, 0.02722855843603611, 0.11218537390232086, 0.013307608664035797, -0.027897655963897705, 0.008391600102186203, -0.03471873328089714, 0.06341558694839478, 0.009306962601840496, 0.04865827038884163, 0.02142971195280552, -0.04259921610355377, -0.004976413678377867, -0.01908786967396736, -0.061631329357624054, -0.042933765798807144, -0.027191385626792908, -0.06553439795970917, -0.09612703323364258, 0.04248770326375961, 0.020853543654084206, 0.0000055585710470040794, 0.03481166437268257, -0.0578397773206234, 0.014032464474439621, 0.014487823471426964, -0.07374943047761917, -0.0005787811242043972, 0.050368186086416245, 0.0032316488213837147, 0.06642653048038483, -0.016309255734086037, 0.04341700300574303, -0.008995646610856056, 0.08229900896549225, 0.05159486457705498, -0.013697915710508823, 0.002688006963580847, -0.09397105127573013, -0.03466297686100006, -0.0020293639972805977, -0.0400715172290802, -0.0015867836773395538, -0.05531207472085953, 0.030332427471876144, 0.04557298496365547, 0.024180445820093155, -0.011105163022875786, -0.039997171610593796, -0.061482641845941544, 0.014013879001140594, -0.02157839946448803, 0.05817432329058647, 0.04765462130308151, -0.004316609352827072, 0.015073283575475216, 0.023790139704942703, -0.001999161671847105, 0.02559298649430275, -0.04720855876803398, -0.03817573934793472, -0.08400893211364746, -0.004925302229821682, -0.018595339730381966, 0.01001787930727005, 0.009209386073052883, 0.04196729138493538, 0.021857190877199173, 0.016086222603917122, -0.0073647210374474525, -0.02271214872598648, -0.032209619879722595, 0.02639218606054783, 0.019273729994893074, -0.0018551197135820985, 0.031168799847364426, -0.0787304937839508, 0.044123273342847824, -0.03141041845083237, -0.00006719291559420526, -0.04627925530076027, 0.013196093030273914, -0.05010798200964928, -0.05263568460941315, 0.04378872364759445, 0.0009037465206347406, -0.09701915830373764, -0.00506934430450201, -0.010854250751435757, 0.01795412041246891, 0.06873119622468948, -0.009176860563457012, 0.05876907706260681, -0.02613198012113571, 0.032655682414770126, -0.03817573934793472, 0.02613198012113571, -0.006323902402073145, 0.003926302306354046, -0.022005878388881683, 0.028789784759283066, 0.05070273578166962, 0.031968001276254654, -0.06490247696638107, 0.006923302076756954, 0.010287376120686531, 0.005585107021033764, 0.013307608664035797, 0.021466882899403572, -0.01013868860900402, -0.013354074209928513, -0.005594399757683277, 0.02048182301223278, 0.02366003766655922, -0.0030829603783786297, 0.056129857897758484, 0.003189830109477043, -0.06783907115459442, -0.00768997659906745, -0.07006939500570297, 0.047097042202949524, -0.005376013927161694, -0.0010396569268777966, 0.002155981259420514, 0.034495700150728226, 0.11679471284151077, 0.0035569046158343554, -0.07137041538953781, -0.03308316320180893, 0.008726148866117, -0.006049757823348045, 0.003129425458610058, 0.027711795642971992, 0.011746381409466267, 0.018939180299639702, 0.03843594342470169, -0.014720148406922817, -0.02776755392551422, -0.03133607283234596, -0.03289730101823807, 0.009748381562530994, -0.014840957708656788, 0.0017192092491313815, -0.023492762818932533, 0.06133395433425903, 0.04772896692156792, -0.040406063199043274, 0.019236557185649872, 0.020017171278595924, 0.11612561345100403, -0.004832372069358826, 0.01321467850357294, -0.017219971865415573, 0.051557693630456924, 0.05575813725590706, 0.015073283575475216, 0.00922797154635191, 0.04330548644065857, 0.024514995515346527, -0.04676249250769615, -0.046204909682273865, 0.008438064716756344, -0.023771552368998528, 0.017796140164136887, -0.000731244741473347, 0.01599329337477684, 0.03462580591440201, 0.03977413848042488, -0.07806139439344406, -0.00841483287513256, -0.05152051895856857, -0.005125102121382952, 0.002045626752078533, 0.02196870744228363, 0.013623571954667568, -0.02538853883743286, 0.03914221376180649, 0.038361597806215286, -0.010324548929929733, 0.0018330487655475736, -0.014311255887150764, 0.009274437092244625, 0.027897655963897705, -0.036781784147024155, -0.030741320922970772, -0.0034802372101694345, -0.09880342334508896, -0.015612279064953327, 0.017443004995584488, 0.031466174870729446, -0.009674036875367165, 0.035034697502851486, 0.04579601809382439, 0.020221618935465813, -0.025332780554890633, 0.010779906995594501, -0.022451944649219513, -0.028492409735918045, 0.03800846263766289, 0.003912362735718489, 0.01887412928044796, 0.052598509937524796, 0.05594399943947792, 0.02306528389453888, -0.000715562782716006, -0.03572238236665726, -0.017870483919978142, -0.054791662842035294, 0.04033172130584717, -0.021113747730851173, 0.0065748137421905994, -0.05531207472085953, -0.021708501502871513, 0.050962939858436584, -0.0000764496362535283, 0.011114455759525299, 0.012815078720450401, -0.01376296766102314, 0.05449428781867027, 0.032767198979854584, 0.013707209378480911, -0.019719794392585754, -0.04048040881752968, 0.059698380529880524, -0.019571106880903244, -0.036930475383996964, -0.008688976988196373, 0.01001787930727005, 0.010975060053169727, -0.04259921610355377, -0.014692269265651703, 0.042190324515104294, -0.04137253761291504, 0.028102101758122444, 0.01694118045270443, 0.011495469138026237, 0.012796493247151375, 0.04520126432180405, 0.016383599489927292, 0.027061283588409424, 0.005520055536180735, -0.016281375661492348, -0.06601763516664505, 0.00751340901479125, -0.05263568460941315, 0.02559298649430275, -0.001758704660460353, -0.03758098557591438, -0.012945180758833885, -0.07806139439344406, 0.0024835604708641768, 0.023529933765530586, 0.018242204561829567, -0.009952827356755733, -0.039290901273489, -0.017824018374085426, 0.02484954334795475, -0.04988494887948036, 0.012369013391435146, -0.005915009416639805, -0.007536641787737608, 0.06140829622745514, 0.07155627757310867, -0.052598509937524796, -0.01572379469871521, -0.036967646330595016, -0.0025950768031179905, 0.02470085583627224, -0.004544288385659456, 0.033752258867025375, 0.010194445960223675, -0.02182001806795597, 0.022823665291070938, 0.05787694826722145, 0.023845897987484932, -0.007355427835136652, 0.016244204714894295, -0.008577460423111916, 0.03282295912504196, 0.04111233353614807, 0.014432065188884735, 0.00202123261988163, -0.001577490707859397, -0.074195496737957, -0.00517156720161438, 0.02951464056968689, -0.00932090263813734, 0.0000032126272344612516, -0.04230184108018875, -0.019125040620565414, -0.034941766411066055, -0.018855543807148933, 0.06560873985290527, -0.03347346931695938, -0.06296952813863754, 0.043714381754398346, -0.005547934677451849, 0.04557298496365547, 0.038361597806215286, -0.0009124586940743029, -0.02737724594771862, -0.01944100484251976, -0.0007283407030627131, -0.0831167995929718, 0.004016909282654524, -0.02434772066771984, -0.04676249250769615, 0.061631329357624054, 0.05055404454469681, 0.002416186034679413, 0.05367650091648102, -0.025165505707263947, -0.03391953557729721, 0.003482560394331813, -0.04055475443601608, 0.050516873598098755, 0.04033172130584717, 0.038361597806215286, 0.022730734199285507, -0.01958969235420227, -0.02113233506679535, 0.03533207252621651, -0.0005581622244790196, -0.047394417226314545, 0.018827665597200394, -0.004009939264506102, 0.02945888414978981, 0.02131819538772106, -0.07932524383068085, -0.026968352496623993, 0.039848484098911285, 0.011727795004844666, -0.020351720973849297, 0.014952474273741245, -0.06014444679021835, -0.029477469623088837, -0.06270931661128998, 0.012294669635593891, 0.0048509580083191395, 0.005120455753058195, 0.00018905493197962642, -0.11582823842763901, 0.05590682849287987, -0.01774967461824417, -0.01810280978679657, -0.05505187064409256, 0.02122526429593563, 0.0024092162493616343, 0.020444650202989578, -0.07215103507041931, -0.019013525918126106, 0.08073778450489044, 0.016783200204372406, 0.041781432926654816, 0.08876695483922958, 0.03564803674817085, -0.03378943353891373, 0.012517701834440231, 0.02122526429593563, 0.004676714073866606, -0.014775906689465046, -0.026670975610613823, -0.012164567597210407, -0.021169506013393402, 0.04204163700342178, 0.010278083384037018, 0.008438064716756344, -0.009274437092244625, 0.02672673389315605, -0.0734892264008522, -0.045907534658908844, -0.005129748955368996, 0.04936453700065613, 0.05148334801197052, 0.04271073266863823, 0.0008938726386986673, 0.02009151503443718, 0.011253850534558296, -0.04534995183348656, 0.030629804357886314, 0.04508974775671959, -0.07315468043088913, -0.005222679115831852, -0.006997646298259497, 0.006072990596294403, 0.05256133899092674, -0.014311255887150764, 0.025908948853611946, 0.003814785974100232, -0.025332780554890633, 0.056910473853349686, -0.015556520782411098, -0.07092434912919998, -0.07363791763782501, -0.027191385626792908, -0.021708501502871513, -0.005218032281845808, 0.04271073266863823, 0.03549934923648834, -0.001072763348929584, -0.011365367099642754, -0.030722733587026596, 0.0638616532087326, 0.020054344087839127, -0.02395741268992424, 0.05252416804432869, 0.020203031599521637, -0.025760259479284286, -0.04248770326375961, -0.008335841819643974, -0.024738026782870293, 0.009130395017564297, 0.05460580438375473, 0.01852099597454071, -0.02380872517824173, -0.009204739704728127, -0.03932807222008705, 0.02490530163049698, -0.006886130198836327, 0.0022163859102874994, -0.024440649896860123, -0.01104011107236147, 0.032358307391405106, -0.058397356420755386, 0.021150920540094376, -0.0011674360139295459, -0.025853190571069717, 0.012508409097790718, -0.06564591825008392, 0.013428417965769768, -0.014775906689465046, 0.016281375661492348, 0.005176214035600424, -0.041744258254766464, -0.017470883205533028, 0.036075517535209656, -0.021559813991189003, 0.02226608246564865, -0.04832372069358826, -0.006421478930860758, 0.023976000025868416, -0.03992282599210739, 0.03726502135396004, -0.048881299793720245, 0.017517348751425743, -0.007406539283692837, 0.044271960854530334, -0.0068396651186048985, 0.0008264982607215643, 0.006598046515136957, 0.010947180911898613, -0.04508974775671959, 0.0001346036297036335, -0.03154052048921585, 0.07828442752361298, 0.034848835319280624, -0.011764966882765293, 0.026949767023324966, 0.03274861350655556, -0.004081960301846266, -0.047245729714632034, -0.020556166768074036, -0.00982272531837225, -0.007559874095022678, 0.0005154723767191172, -0.008317255415022373, 0.0011093546636402607, 0.02802775800228119, -0.04850957915186882, 0.03440277278423309, -0.027451589703559875, -0.0029691208619624376, 0.012071637436747551, 0.06512550264596939, -0.019571106880903244, 0.02494247443974018, 0.002987707033753395, 0.012852250598371029, -0.010584753006696701, -0.019459590315818787, -0.0150268180295825, -0.01420903205871582, -0.05832301452755928, 0.03269285708665848, -0.08542146533727646, -0.009451004676520824, -0.019924242049455643, 0.03362215682864189, -0.08066344261169434, 0.018985645845532417, 0.05508904159069061, 0.01116092037409544, -0.030890008434653282, -0.010008585639297962, -0.07650016248226166, 0.022507701069116592, 0.08475237339735031, -0.007499469444155693, -0.029384538531303406, -0.018149273470044136, -0.027748966589570045, -0.07259709388017654, 0.018353721126914024, 0.06969767063856125, 0.0322839617729187, -0.024366306141018867, 0.007188153453171253, 0.040406063199043274, 0.01016656681895256, -0.02256345935165882, -0.0037497347220778465, 0.0129916463047266, 0.07330336421728134, 0.026206325739622116, -0.07032959908246994, -0.07207668572664261, -0.030741320922970772, 0.028102101758122444, -0.016448650509119034, -0.03899352625012398, 0.023883068934082985, -0.04787765443325043, 0.04036889225244522, 0.026169152930378914, -0.05178072303533554, -0.03224679082632065, -0.02449640817940235, 0.005204092711210251, 0.06553439795970917, -0.0038891301956027746, 0.050962939858436584, -0.043677207082509995, -0.07181648164987564, 0.07516197115182877, 0.00749017670750618, -0.03391953557729721, 0.04549863934516907, -0.07181648164987564, 0.012461943551898003, 0.026763906702399254, -0.006611986085772514, 0.018809078261256218, 0.05025666952133179, 0.033845189958810806, 0.037227850407361984, -0.04248770326375961, 0.030611218884587288, -0.003814785974100232, 0.028845543041825294, 0.04222749546170235, 0.021169506013393402, -0.0013451650738716125, 0.010742735117673874, -0.0035011465661227703, 0.00012327775766607374, -0.01391165517270565, 0.008986352942883968, -0.015946827828884125, 0.008786553516983986, 0.0009676360059529543, 0.051260314881801605, 0.056018345057964325, -0.005585107021033764, -0.05847170203924179, -0.0008369528804905713, 0.04289659485220909, -0.02122526429593563, -0.008168566972017288, -0.02300952561199665, -0.011514055542647839, -0.04378872364759445, 0.019831310957670212, -0.022600632160902023, -0.047580279409885406, 0.021169506013393402, -0.009413832798600197, 0.006021879147738218, 0.053341951221227646, 0.010826371610164642, 0.0029412417206913233, 0.03620561957359314, 0.03391953557729721, 0.03520197048783302, -0.021801432594656944, -0.02083495818078518, 0.0018516348209232092, 0.03735795244574547, 0.009306962601840496, -0.026949767023324966, 0.04107516258955002, 0.003154981415718794, 0.037413712590932846, -0.008846958167850971, 0.025630157440900803, 0.008373013697564602, 0.006900069769471884, 0.030666977167129517, 0.0011122587602585554, 0.02464509755373001, 0.010064343921840191, -0.003450034884735942, -0.04166991636157036, -0.05954969301819801, 0.05590682849287987, -0.045015402138233185, 0.041484054177999496, -0.06795058399438858, 0.008052404969930649, -0.0020247173961251974, -0.019366659224033356, -0.059698380529880524, 0.0237157940864563, -0.03202375769615173, 0.0018098162254318595, -0.004244588315486908, 0.011365367099642754, -0.057207848876714706, 0.040145859122276306, 0.028826957568526268, -0.002906393026933074, -0.019217971712350845, -0.018809078261256218, -0.05062839016318321 ]
716,032
torch.optim.lr_scheduler
CosineAnnealingLR
Set the learning rate of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial lr and :math:`T_{cur}` is the number of epochs since the last restart in SGDR: .. math:: \begin{aligned} \eta_t & = \eta_{min} + \frac{1}{2}(\eta_{max} - \eta_{min})\left(1 + \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right), & T_{cur} \neq (2k+1)T_{max}; \\ \eta_{t+1} & = \eta_{t} + \frac{1}{2}(\eta_{max} - \eta_{min}) \left(1 - \cos\left(\frac{1}{T_{max}}\pi\right)\right), & T_{cur} = (2k+1)T_{max}. \end{aligned} When last_epoch=-1, sets initial lr as lr. Notice that because the schedule is defined recursively, the learning rate can be simultaneously modified outside this scheduler by other operators. If the learning rate is set solely by this scheduler, the learning rate at each step becomes: .. math:: \eta_t = \eta_{min} + \frac{1}{2}(\eta_{max} - \eta_{min})\left(1 + \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right) It has been proposed in `SGDR: Stochastic Gradient Descent with Warm Restarts`_. Note that this only implements the cosine annealing part of SGDR, and not the restarts. Args: optimizer (Optimizer): Wrapped optimizer. T_max (int): Maximum number of iterations. eta_min (float): Minimum learning rate. Default: 0. last_epoch (int): The index of last epoch. Default: -1. verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. .. _SGDR\: Stochastic Gradient Descent with Warm Restarts: https://arxiv.org/abs/1608.03983
class CosineAnnealingLR(LRScheduler): r"""Set the learning rate of each parameter group using a cosine annealing schedule, where :math:`\eta_{max}` is set to the initial lr and :math:`T_{cur}` is the number of epochs since the last restart in SGDR: .. math:: \begin{aligned} \eta_t & = \eta_{min} + \frac{1}{2}(\eta_{max} - \eta_{min})\left(1 + \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right), & T_{cur} \neq (2k+1)T_{max}; \\ \eta_{t+1} & = \eta_{t} + \frac{1}{2}(\eta_{max} - \eta_{min}) \left(1 - \cos\left(\frac{1}{T_{max}}\pi\right)\right), & T_{cur} = (2k+1)T_{max}. \end{aligned} When last_epoch=-1, sets initial lr as lr. Notice that because the schedule is defined recursively, the learning rate can be simultaneously modified outside this scheduler by other operators. If the learning rate is set solely by this scheduler, the learning rate at each step becomes: .. math:: \eta_t = \eta_{min} + \frac{1}{2}(\eta_{max} - \eta_{min})\left(1 + \cos\left(\frac{T_{cur}}{T_{max}}\pi\right)\right) It has been proposed in `SGDR: Stochastic Gradient Descent with Warm Restarts`_. Note that this only implements the cosine annealing part of SGDR, and not the restarts. Args: optimizer (Optimizer): Wrapped optimizer. T_max (int): Maximum number of iterations. eta_min (float): Minimum learning rate. Default: 0. last_epoch (int): The index of last epoch. Default: -1. verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. .. _SGDR\: Stochastic Gradient Descent with Warm Restarts: https://arxiv.org/abs/1608.03983 """ def __init__(self, optimizer, T_max, eta_min=0, last_epoch=-1, verbose="deprecated"): self.T_max = T_max self.eta_min = eta_min super().__init__(optimizer, last_epoch, verbose) def get_lr(self): if not self._get_lr_called_within_step: warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.", UserWarning) if self.last_epoch == 0: return [group['lr'] for group in self.optimizer.param_groups] elif self._step_count == 1 and self.last_epoch > 0: return [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos((self.last_epoch) * math.pi / self.T_max)) / 2 for base_lr, group in zip(self.base_lrs, self.optimizer.param_groups)] elif (self.last_epoch - 1 - self.T_max) % (2 * self.T_max) == 0: return [group['lr'] + (base_lr - self.eta_min) * (1 - math.cos(math.pi / self.T_max)) / 2 for base_lr, group in zip(self.base_lrs, self.optimizer.param_groups)] return [(1 + math.cos(math.pi * self.last_epoch / self.T_max)) / (1 + math.cos(math.pi * (self.last_epoch - 1) / self.T_max)) * (group['lr'] - self.eta_min) + self.eta_min for group in self.optimizer.param_groups] def _get_closed_form_lr(self): return [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos(math.pi * self.last_epoch / self.T_max)) / 2 for base_lr in self.base_lrs]
(optimizer, T_max, eta_min=0, last_epoch=-1, verbose='deprecated')
[ 0.004105559084564447, -0.003213374875485897, -0.004861647263169289, 0.004256776534020901, 0.005710986442863941, 0.005590012297034264, -0.07355226576328278, -0.0467766597867012, -0.022884270176291466, 0.0419376939535141, -0.01999097317457199, -0.014395919628441334, 0.1074250116944313, 0.03867139294743538, -0.017511002719402313, 0.058067575097084045, -0.005227089859545231, 0.017541246488690376, -0.012167979963123798, -0.008110306225717068, -0.011794975958764553, -0.04000210762023926, -0.029336223378777504, 0.04895419254899025, -0.03933674842119217, 0.036836616694927216, 0.02078738622367382, 0.00013192163896746933, -0.10040851682424545, -0.0023363125510513783, 0.027299825102090836, -0.022622158750891685, 0.0028025670908391476, -0.04044567793607712, 0.05798692628741264, -0.026674792170524597, -0.03221943974494934, -0.017188405618071556, -0.0836334377527237, 0.00015712458116468042, 0.033388856798410416, -0.017148081213235855, 0.025807810947299004, -0.004143363330513239, -0.01801506243646145, 0.007621369324624538, 0.0028706148732453585, 0.0420989915728569, 0.017642058432102203, -0.02520294114947319, 0.04387328028678894, -0.06157582625746727, 0.013609588146209717, -0.020847871899604797, -0.024618232622742653, 0.06419692933559418, 0.03663499653339386, -0.01911390945315361, 0.04371197894215584, -0.06923751533031464, 0.0841979831457138, -0.06710030883550644, 0.002842891728505492, 0.04649438336491585, 0.006189842242747545, -0.016442399471998215, -0.02713852748274803, -0.011421972885727882, 0.014446325600147247, 0.03294528275728226, 0.020243002101778984, -0.02542472630739212, 0.012460334226489067, -0.030969373881816864, -0.021311607211828232, -0.006703982129693031, -0.07278609275817871, -0.044155552983284, -0.0327436588704586, -0.06782615184783936, 0.03181619197130203, 0.04476042464375496, 0.016936376690864563, -0.027622422203421593, 0.0037426366470754147, -0.0443168506026268, -0.0325017124414444, -0.02617073431611061, -0.04008275642991066, -0.04572821408510208, -0.016321424394845963, -0.00895712524652481, 0.032118625938892365, 0.02290443331003189, -0.01105905044823885, 0.012258710339665413, -0.04030454158782959, -0.06907621771097183, 0.02123095653951168, -0.05472062528133392, 0.03098953515291214, 0.03814717009663582, 0.030687101185321808, 0.06818907707929611, 0.05814822390675545, -0.021089820191264153, -0.06060803309082985, -0.014859654009342194, 0.040183570235967636, -0.011119537055492401, -0.0512930266559124, 0.06415660679340363, -0.03492119535803795, -0.003314186818897724, -0.04657503589987755, 0.0013256747042760253, -0.01434551365673542, 0.057140108197927475, -0.014637867920100689, 0.011502622626721859, 0.06016445904970169, 0.025586025789380074, -0.03621158376336098, 0.015232657082378864, 0.02635219506919384, -0.0043298653326928616, 0.032158952206373215, 0.040546491742134094, 0.008831110782921314, -0.05443835258483887, 0.026856252923607826, 0.03715921565890312, 0.017813438549637794, 0.02746112458407879, 0.028973300009965897, -0.003309146035462618, 0.01482941024005413, 0.061777450144290924, -0.043107111006975174, -0.03326788172125816, 0.03770359978079796, 0.03248155117034912, 0.023106055334210396, -0.037804409861564636, 0.026856252923607826, 0.034094538539648056, 0.016674265265464783, 0.05052685737609863, 0.024698881432414055, 0.006184801459312439, 0.03508249297738075, -0.009027693420648575, 0.07790733128786087, 0.01818644255399704, 0.015071358531713486, -0.015353631228208542, 0.007218122016638517, 0.0015247779665514827, -0.014970546588301659, 0.004682706203311682, -0.048792894929647446, -0.014537055976688862, -0.03560671582818031, -0.05218016728758812, 0.012702282518148422, 0.007828033529222012, -0.02617073431611061, 0.034134864807128906, -0.02820713073015213, -0.0053783077746629715, 0.014053159393370152, -0.09064994007349014, -0.0244569331407547, 0.03346950560808182, -0.013760806061327457, 0.06798744946718216, 0.02096884697675705, 0.029477359727025032, -0.016966620460152626, 0.001594086061231792, 0.03534460440278053, -0.005191805772483349, -0.008896637707948685, -0.10532812774181366, -0.03506233170628548, 0.07976226508617401, -0.022218912839889526, -0.0010843565687537193, -0.016170207411050797, 0.033489666879177094, 0.0303645022213459, -0.0043878317810595036, -0.007586085237562656, 0.0022367609199136496, -0.05871276929974556, 0.0024434251245111227, -0.0030823196284472942, 0.028328105807304382, 0.034235674887895584, 0.018216686323285103, 0.022944757714867592, 0.09855358302593231, 0.017773114144802094, -0.020424462854862213, 0.023650439456105232, -0.05189789459109306, -0.03240090236067772, 0.016311343759298325, -0.029033787548542023, 0.04492172226309776, -0.04034486785531044, 0.004019869025796652, -0.009062977507710457, 0.07040693610906601, 0.01028279960155487, -0.0037325555458664894, 0.008725258521735668, 0.03808668255805969, 0.050163932144641876, -0.02524326555430889, 0.031412944197654724, -0.0608096569776535, 0.018559444695711136, -0.035949476063251495, 0.047744449228048325, -0.030122553929686546, 0.0560513399541378, -0.04951873794198036, -0.021109983325004578, -0.00926964171230793, 0.016230693086981773, -0.05363185703754425, -0.02145274356007576, 0.004163525998592377, 0.010212231427431107, 0.020686574280261993, 0.0010181987890973687, 0.05080913007259369, -0.06774550676345825, -0.01937602087855339, -0.040143243968486786, -0.01766222156584263, -0.02988060750067234, -0.01006605476140976, -0.012873661704361439, 0.04213931784033775, 0.053026989102363586, 0.0490751676261425, -0.058107901364564896, -0.01938610151410103, -0.021533392369747162, -0.02423514798283577, -0.005237170960754156, 0.009667848236858845, -0.06657608598470688, -0.02635219506919384, 0.020333733409643173, 0.036534182727336884, 0.031937167048454285, -0.00834217295050621, -0.02467872016131878, -0.006814875174313784, -0.09452111274003983, 0.0536721833050251, -0.011119537055492401, 0.050607506185770035, -0.007545760367065668, -0.004564252682030201, -0.016543209552764893, 0.0279853455722332, 0.05165594816207886, 0.03901415318250656, -0.06923751533031464, -0.005569850094616413, 0.016764996573328972, 0.026110246777534485, -0.05443835258483887, -0.009027693420648575, -0.007545760367065668, -0.020444625988602638, 0.04141347110271454, 0.008906719274818897, -0.044558800756931305, -0.037501975893974304, -0.046897631138563156, 0.0057916357181966305, -0.03532444313168526, -0.03651402145624161, 0.03191700577735901, -0.015454443171620369, 0.009214195422828197, -0.02035389468073845, 0.06633414328098297, -0.0011580751743167639, 0.15984712541103363, 0.044155552983284, -0.009899714961647987, -0.024477096274495125, 0.016805320978164673, -0.017067432403564453, 0.07226186990737915, 0.014668111689388752, 0.0489138662815094, -0.016936376690864563, -0.0314331091940403, -0.04750250279903412, 0.004443278536200523, 0.01611980050802231, 0.04298613592982292, -0.016795240342617035, -0.007097148336470127, 0.017319461330771446, 0.03719954192638397, -0.041252173483371735, 0.0070467423647642136, -0.030485477298498154, -0.015525011345744133, -0.01699686236679554, 0.040627140551805496, 0.0395585373044014, -0.042663536965847015, 0.026432843878865242, 0.040284380316734314, -0.016583535820245743, 0.015192332677543163, -0.052946336567401886, 0.022884270176291466, 0.0489138662815094, -0.07564914971590042, -0.013085367158055305, -0.008755501359701157, -0.06657608598470688, -0.0096426447853446, -0.0028101278003305197, -0.04851062223315239, 0.00602350290864706, 0.039578698575496674, 0.0512123741209507, 0.019658293575048447, -0.029114436358213425, 0.0723021999001503, 0.036614831537008286, -0.023650439456105232, 0.08589161932468414, -0.06472115218639374, -0.04141347110271454, 0.08726266026496887, -0.007863317616283894, 0.04351035878062248, -0.02490050531923771, -0.034094538539648056, 0.019577644765377045, -0.03002174384891987, 0.06883427500724792, 0.03558655083179474, 0.019144153222441673, -0.04234094172716141, -0.04395392909646034, 0.04294580966234207, -0.08589161932468414, -0.06411628425121307, 0.04133282229304314, -0.0385705791413784, 0.07076986134052277, 0.02119063213467598, 0.006169680040329695, -0.01757149025797844, -0.0023955395445227623, 0.056656211614608765, -0.048268672078847885, -0.029154762625694275, -0.048268672078847885, 0.02683609165251255, 0.0011593352537602186, -0.004889370407909155, 0.01836790330708027, 0.005297658033668995, -0.04351035878062248, 0.027219176292419434, 0.00041584850987419486, 0.045486267656087875, 0.01871066354215145, 0.03528411686420441, 0.024376284331083298, 0.04536529257893562, 0.003664507530629635, 0.009370453655719757, -0.01628109999001026, 0.0395585373044014, -0.042179640382528305, 0.02312621846795082, -0.006406587548553944, 0.030223365873098373, -0.013145853765308857, -0.09718254208564758, 0.02534407749772072, 0.039397235959768295, 0.047300878912210464, -0.036393046379089355, -0.03240090236067772, -0.0021107462234795094, 0.00845306646078825, -0.0039089759811758995, -0.003936699125915766, 0.017773114144802094, -0.05270439013838768, 0.12282904982566833, 0.008286726661026478, -0.026936903595924377, 0.07028596103191376, -0.05657556280493736, -0.03540509194135666, -0.007903642021119595, 0.014385838992893696, -0.021876152604818344, 0.001917943824082613, -0.05964023992419243, 0.0315137580037117, 0.026815928518772125, 0.014466487802565098, -0.0005131948855705559, -0.006346100475639105, 0.040667466819286346, 0.04532497003674507, 0.059035368263721466, -0.005048149265348911, -0.009874512441456318, -0.022501185536384583, -0.06899557262659073, -0.029457196593284607, 0.021593879908323288, -0.011139700189232826, -0.03304609656333923, -0.02308589406311512, -0.0315137580037117, -0.013670074753463268, -0.008241361938416958, 0.03177586942911148, 0.022722970694303513, -0.04887354373931885, 0.03050564043223858, -0.03367112949490547, 0.0022581834346055984, 0.011421972885727882, -0.026997389271855354, -0.02119063213467598, 0.027864370495080948, -0.011986518278717995, -0.03161456808447838, -0.007802830543369055, -0.013649912551045418, 0.019496994093060493, 0.02657398022711277, 0.051575299352407455, -0.018216686323285103, -0.008876475505530834, 0.036393046379089355, -0.04713958129286766, -0.05133334919810295, -0.035465579479932785, 0.001699938322417438, 0.03766327351331711, 0.00722820358350873, 0.012097411789000034, -0.011502622626721859, 0.03298560902476311, 0.04629276320338249, 0.016714589670300484, -0.00136599934194237, -0.008619405329227448, -0.008221199735999107, -0.023872224614024162, 0.019789349287748337, -0.03625191003084183, 0.010444099083542824, 0.0014025436248630285, -0.052906014025211334, -0.010817102156579494, -0.013791048899292946, -0.05093010142445564, 0.02000105381011963, -0.03973999619483948, 0.045042697340250015, 0.038247983902692795, 0.011926031671464443, 0.01601898856461048, -0.029275735840201378, 0.004478562623262405, 0.009546874091029167, 0.015696391463279724, -0.040627140551805496, 0.003346950514242053, 0.04847029596567154, 0.037058405578136444, -0.06810842454433441, -0.0008398880017921329, 0.03719954192638397, -0.015363712795078754, 0.04278451204299927, 0.046897631138563156, 0.022622158750891685, -0.01284341886639595, -0.051494646817445755, 0.04609113931655884, 0.08077038824558258, -0.0016507926629856229, -0.11298982053995132, -0.027743397280573845, -0.08355279266834259, 0.02869102731347084, -0.003036954440176487, 0.011240511201322079, 0.03102986142039299, 0.008548837155103683, -0.04326840862631798, -0.029638659209012985, -0.019486913457512856, 0.06387433409690857, 0.0362720713019371, -0.016613777726888657, -0.013518857769668102, 0.036876942962408066, -0.03861090540885925, -0.030263692140579224, 0.0029537847731262445, 0.0535915344953537, -0.02653365582227707, -0.03246138617396355, 0.029739469289779663, 0.02475936897099018, 0.019446589052677155, -0.008286726661026478, -0.006295694503933191, 0.051534973084926605, -0.01233936008065939, 0.0397198349237442, -0.030747586861252785, -0.0394778847694397, 0.019930485635995865, -0.020404301583766937, -0.02935638464987278, 0.04467977210879326, 0.030606450513005257, 0.009481346234679222, -0.0035989799071103334, 0.015988744795322418, 0.011603433638811111, 0.02123095653951168, 0.0026488290168344975, -0.00024541362654417753, 0.030384665355086327, -0.004047592170536518, 0.007646572310477495, 0.031191159039735794, -0.02375125139951706, -0.012661957181990147, -0.004297101404517889, 0.0168658085167408, 0.0015827446477487683, 0.023428654298186302, -0.03744148835539818, 0.0037300351541489363, -0.0004656243254430592, -0.05955959111452103, 0.02639251947402954, -0.00048137616249732673, 0.03177586942911148, 0.004780997987836599, -0.0004583784902933985, 0.032642848789691925, -0.010040851309895515, -0.021331768482923508, 0.017813438549637794, -0.057583678513765335, -0.04576854035258293, 0.02379157580435276, 0.00005788800626760349, -0.03572768718004227, -0.07439908385276794, -0.06189842149615288, 0.0419376939535141, -0.02758209779858589, -0.01699686236679554, -0.06996336579322815, 0.01651296764612198, 0.0062704915180802345, -0.08258499950170517, 0.03901415318250656, -0.05601101741194725, 0.002422002609819174, -0.03582850098609924, 0.058954719454050064, -0.022440697997808456, -0.025444889441132545, -0.01059531606733799, 0.008291767910122871, -0.029477359727025032, 0.010363449342548847, 0.05177692323923111, 0.05101075395941734, -0.04042551666498184, 0.017541246488690376, 0.009723294526338577, 0.020464787259697914, 0.003145327093079686, -0.0039089759811758995, 0.007717140484601259, -0.05125270038843155, 0.009234357625246048, -0.037985872477293015, -0.011865544132888317, 0.02750144898891449, 0.02119063213467598, -0.029033787548542023, 0.028630541637539864, -0.005998299922794104, -0.016573453322052956, 0.009521670639514923, 0.08250434696674347, -0.0535915344953537, 0.007954047992825508, 0.002026316476985812, -0.01386161707341671, -0.022763296961784363, -0.04419587552547455, -0.009345250204205513, 0.03844960778951645, -0.08589161932468414, 0.01432535145431757, -0.08443993330001831, -0.004665064159780741, -0.031110510230064392, 0.0015209974953904748, -0.07399583607912064, 0.027299825102090836, 0.021130146458745003, 0.007298771757632494, 0.03433648496866226, -0.017359785735607147, -0.05455932766199112, -0.003667027922347188, 0.04855094477534294, -0.03447762131690979, -0.0003808794426731765, -0.01840822771191597, -0.02193664014339447, -0.017470678314566612, 0.013569263741374016, 0.06847134977579117, 0.06956011801958084, -0.04818802326917648, 0.05443835258483887, -0.0407077893614769, 0.03163473308086395, -0.03578817471861839, -0.01529314462095499, 0.0024724085815250874, -0.010988482274115086, 0.036796294152736664, -0.040546491742134094, -0.013700318522751331, -0.01315593533217907, -0.011401810683310032, 0.0005582451121881604, -0.055204521864652634, -0.025001317262649536, -0.021654367446899414, 0.02701755240559578, 0.00860428437590599, -0.004581894725561142, -0.05488192290067673, -0.032642848789691925, 0.007409664802253246, 0.029477359727025032, 0.007742343470454216, 0.028267618268728256, -0.029537847265601158, -0.07302804291248322, 0.009667848236858845, -0.003349470905959606, -0.023448815569281578, 0.012440172024071217, -0.02149306796491146, -0.01906350441277027, -0.01119010616093874, -0.03367112949490547, 0.010837264358997345, -0.005428713280707598, 0.043550681322813034, -0.01616012491285801, -0.0328243114054203, 0.04887354373931885, -0.005842041689902544, 0.01646256074309349, 0.038207657635211945, -0.008377457968890667, -0.03879236802458763, 0.028791839256882668, 0.017934411764144897, -0.04722023010253906, 0.0096023203805089, -0.00684007816016674, -0.01606939546763897, 0.01061547826975584, -0.0005295767914503813, 0.056252963840961456, -0.0031554081942886114, -0.017188405618071556, -0.015777040272951126, -0.00944606214761734, 0.05234146863222122, 0.014859654009342194, 0.007485273294150829, -0.001488233683630824, -0.001749084098264575, -0.04101022705435753, 0.034094538539648056, -0.015565336681902409, -0.027864370495080948, 0.03363080322742462, -0.000224778734263964, -0.004473521839827299, 0.06097095459699631, -0.00034906071959994733, -0.015101602301001549, 0.0116941649466753, 0.00732901506125927, 0.02356979064643383, 0.012490577064454556, -0.028065994381904602, 0.029820119962096214, 0.06258394569158554, 0.014859654009342194, 0.0027067959308624268, 0.03302593529224396, 0.015877852216362953, 0.01973894238471985, 0.01624077558517456, -0.0021208275575190783, 0.057583678513765335, 0.026775604113936424, 0.045486267656087875, -0.03465908393263817, -0.03951821103692055, -0.01185546349734068, 0.0537528321146965, -0.06028543412685394, -0.02943703532218933, 0.07835090160369873, -0.014899978414177895, 0.03490103408694267, -0.05230114236474037, 0.0044054738245904446, 0.012974473647773266, 0.016573453322052956, -0.05863212049007416, 0.01610971987247467, -0.018640095368027687, -0.031937167048454285, -0.05593036487698555, 0.020605923607945442, -0.05322860926389694, 0.06863264739513397, 0.053833480924367905, 0.01941634528338909, 0.010736452415585518, -0.026513494551181793, 0.007631450425833464 ]
716,033
torch.optim.lr_scheduler
__init__
null
def __init__(self, optimizer, T_max, eta_min=0, last_epoch=-1, verbose="deprecated"): self.T_max = T_max self.eta_min = eta_min super().__init__(optimizer, last_epoch, verbose)
(self, optimizer, T_max, eta_min=0, last_epoch=-1, verbose='deprecated')
[ 0.0004252017824910581, -0.0014451228780671954, 0.026834456250071526, -0.0037958412431180477, -0.05028081685304642, -0.0008644831250421703, -0.07212323695421219, -0.02672632597386837, -0.043468575924634933, -0.014967103488743305, -0.025284582749009132, 0.04375692456960678, -0.008389146998524666, 0.020454740151762962, -0.015048201195895672, 0.047577545046806335, -0.00357056874781847, 0.007614209782332182, 0.003642655909061432, 0.00770882423967123, 0.0024892608635127544, -0.0358814001083374, -0.07003270834684372, 0.0262938030064106, -0.005775986239314079, 0.07893547415733337, -0.0059336768463253975, -0.003090738318860531, -0.016760272905230522, -0.033268239349126816, -0.061850812286138535, -0.005037092603743076, 0.0028384332545101643, 0.04696480557322502, 0.048730943351984024, -0.06368903070688248, -0.028654659166932106, 0.025032278150320053, -0.08282818645238876, 0.043648794293403625, 0.04559515044093132, -0.09421795606613159, -0.03148408234119415, 0.01324602123349905, 0.0061093894764781, -0.012579214759171009, 0.03139397129416466, 0.007443002425134182, 0.015300506725907326, -0.04819028824567795, -0.003689963137730956, -0.02140989527106285, 0.04901929199695587, 0.012299876660108566, -0.058210406452417374, 0.08520705997943878, 0.04923555254936218, 0.03640403226017952, -0.002534315222874284, -0.008240466937422752, -0.030078381299972534, -0.004079684615135193, 0.007677285932004452, -0.03042079508304596, -0.0005040471442043781, -0.026852479204535484, -0.0924878641963005, 0.011155492626130581, 0.012335920706391335, 0.082900270819664, 0.025915345177054405, -0.022401094436645508, 0.0064157601445913315, -0.0012896849075332284, 0.00956957507878542, -0.02512238547205925, -0.1278826743364334, -0.0013797938590869308, -0.055867575109004974, -0.036980729550123215, -0.017120707780122757, 0.016471922397613525, 0.0016568790888413787, 0.0033926034811884165, 0.0068077342584729195, -0.0985431894659996, -0.021824397146701813, -0.040224652737379074, -0.001612950931303203, -0.009380346164107323, -0.06996061652898788, 0.005311924964189529, -0.000017370619389112107, 0.02418525330722332, 0.0032326600048691034, 0.011344721540808678, -0.027248958125710487, -0.04606371372938156, -0.0016456154407933354, -0.03964795544743538, 0.010290446691215038, 0.013390195555984974, 0.034439656883478165, 0.010461653582751751, 0.03218693286180496, -0.01586819253861904, -0.03316010907292366, -0.03957586735486984, 0.009984076023101807, -0.019481563940644264, -0.05961610749363899, 0.07129423320293427, -0.03463789448142052, 0.03090738318860531, -0.04108969867229462, 0.004129244480282068, -0.002903762273490429, 0.008564859628677368, 0.042279139161109924, 0.012606247328221798, 0.016679173335433006, 0.05784996971487999, -0.028726745396852493, 0.04447779804468155, -0.026167649775743484, 0.02762741595506668, 0.028672680258750916, 0.02049078419804573, -0.01931936666369438, -0.07648450881242752, 0.031682319939136505, -0.02186044119298458, -0.013209978118538857, 0.05291200056672096, 0.0177424605935812, -0.023554489016532898, 0.024978211149573326, 0.06415759772062302, -0.04307209700345993, -0.0066815814934670925, 0.015480724163353443, 0.04465801641345024, 0.034926243126392365, -0.0649145171046257, -0.005595768336206675, 0.023338228464126587, -0.016174564138054848, -0.00020879942167084664, -0.0006538533489219844, -0.04029674082994461, 0.0030434310901910067, -0.01684137061238289, 0.01890486665070057, -0.0021164349745959044, 0.021752310916781425, 0.009713749401271343, -0.012263833545148373, -0.040188610553741455, 0.00817288551479578, -0.005821040831506252, -0.04819028824567795, 0.007361904252320528, -0.02259933389723301, -0.0653109923005104, -0.018346190452575684, -0.012642291374504566, -0.018976952880620956, -0.009317269548773766, -0.03602557256817818, 0.0441894493997097, -0.00783948227763176, -0.0924878641963005, -0.003854412119835615, 0.0433964878320694, 0.018832778558135033, 0.06873513758182526, 0.05042498931288719, 0.020400675013661385, 0.01199350692331791, 0.059111498296260834, 0.02762741595506668, -0.004699183627963066, -0.02652808651328087, -0.03364669531583786, 0.026996653527021408, -0.01566094160079956, 0.014453481882810593, 0.01173219084739685, -0.04400923103094101, 0.026690281927585602, 0.03388097882270813, 0.007150148507207632, -0.01842728815972805, -0.020112326368689537, 0.004645118489861488, 0.013155912049114704, 0.0346018522977829, -0.000018690576325752772, 0.058859191834926605, 0.05994049832224846, -0.012822508811950684, 0.050064556300640106, 0.032150886952877045, -0.046207889914512634, 0.03458382934331894, 0.018138939514756203, 0.005902139004319906, -0.003401614259928465, -0.04119782894849777, 0.01278646569699049, -0.01565193198621273, -0.00471720565110445, 0.011110438033938408, 0.026690281927585602, 0.003056947374716401, -0.026437977328896523, 0.0441894493997097, 0.014570623636245728, 0.03555700555443764, 0.04912742227315903, 0.11562785506248474, -0.05662449076771736, -0.004282429814338684, -0.02441953681409359, 0.05799414590001106, 0.011615049093961716, 0.03838643059134483, -0.0627518966794014, -0.02049078419804573, -0.010731980204582214, -0.01678730547428131, -0.03642205521464348, -0.054966483265161514, 0.02350042387843132, -0.0012806740123778582, 0.08917185664176941, 0.0007034132722765207, -0.009686716832220554, -0.11050966382026672, -0.059760283678770065, -0.012894595973193645, -0.005172255914658308, -0.035160526633262634, -0.007582671474665403, -0.05074938386678696, -0.005654339212924242, 0.011975484900176525, 0.056336142122745514, -0.04451384022831917, -0.0011793014127761126, 0.01913915015757084, -0.05074938386678696, -0.02651006542146206, 0.04537888616323471, -0.031934626400470734, 0.04397318512201309, 0.012245811522006989, -0.01800377666950226, 0.014985124580562115, -0.032601431012153625, -0.02950168401002884, -0.024329427629709244, -0.0719430148601532, 0.07327663153409958, 0.010083195753395557, 0.02166220173239708, -0.0021592366974800825, -0.056083835661411285, -0.04624393209815025, -0.007889041677117348, 0.1167091652750969, 0.05662449076771736, -0.061850812286138535, 0.004480669740587473, -0.00862793531268835, -0.018814757466316223, -0.03413328528404236, -0.04285583645105362, -0.04858676716685295, -0.021355830132961273, 0.045739322900772095, -0.027230937033891678, -0.0009754298371262848, -0.018814757466316223, -0.02652808651328087, -0.027014674618840218, -0.02807796187698841, -0.017670372501015663, -0.011281645856797695, -0.013110858388245106, -0.009416389279067516, 0.008564859628677368, 0.05478626489639282, 0.03321417421102524, 0.11223975569009781, -0.03622381389141083, -0.003651666920632124, 0.017850590869784355, 0.0010503329103812575, -0.012714378535747528, 0.06869909167289734, -0.10481477528810501, -0.01861651800572872, 0.008339586667716503, -0.0052308267913758755, 0.01751718670129776, 0.020598914474248886, 0.03625985607504845, 0.08066556602716446, 0.003976059146225452, 0.05276782438158989, 0.027248958125710487, -0.01611148752272129, 0.006321145687252283, -0.014624688774347305, 0.00027609957032836974, 0.008082776330411434, -0.06711317598819733, 0.005766975227743387, 0.06693295389413834, -0.045523062348365784, 0.004072926472872496, 0.02719489298760891, -0.07014083862304688, -0.017823558300733566, -0.04775776341557503, 0.0049650054425001144, -0.005145223345607519, -0.06271585822105408, -0.0253206267952919, -0.03584535792469978, -0.025645017623901367, 0.041810572147369385, 0.002673984272405505, -0.0469287633895874, 0.02951970510184765, 0.012858552858233452, 0.0631483793258667, 0.0038679284043610096, -0.01371458824723959, 0.04761359095573425, 0.044117361307144165, 0.003334032604470849, 0.07269993424415588, -0.004072926472872496, -0.02739313244819641, -0.021247699856758118, -0.07352893799543381, 0.046856675297021866, -0.022076701745390892, -0.035376790910959244, -0.00030242829234339297, -0.03456581011414528, 0.0283482875674963, 0.039035215973854065, -0.009731770493090153, 0.00534796854481101, -0.01338118501007557, -0.007699813228100538, -0.046171847730875015, -0.042279139161109924, 0.024059100076556206, -0.03472800552845001, 0.04148617759346962, 0.03501635417342186, -0.003252934431657195, 0.033538565039634705, -0.022256920114159584, 0.0441894493997097, 0.003410625271499157, -0.009078480303287506, -0.0654912143945694, 0.03384493663907051, 0.01728290505707264, -0.009141556918621063, 0.002987113082781434, -0.0639413371682167, -0.005694888066500425, 0.012894595973193645, 0.007280806545168161, 0.0696001872420311, 0.0067176250740885735, 0.029772009700536728, -0.0015600118786096573, 0.0029916183557361364, -0.020382653921842575, 0.009281225502490997, 0.0004423788341227919, 0.06981644779443741, 0.018544429913163185, 0.007672780659049749, -0.036710403859615326, -0.020130347460508347, -0.023392293602228165, -0.009839901700615883, 0.04350462183356285, 0.010173304937779903, 0.012894595973193645, -0.04869489744305611, 0.0013246021699160337, -0.023626577109098434, -0.012759433127939701, 0.03611568361520767, 0.051217950880527496, 0.03197066858410835, -0.059796325862407684, 0.09054151177406311, 0.0341152623295784, 0.02168022282421589, 0.0492715947329998, -0.03380889445543289, -0.009993086569011211, -0.00001767860885593109, 0.04191870242357254, -0.011128460057079792, 0.0026829950511455536, -0.00033875348162837327, -0.03961191326379776, 0.04440570995211601, -0.03245725855231285, 0.013408217579126358, 0.0741056352853775, 0.006632021628320217, -0.0004423788341227919, 0.05961610749363899, -0.011227579787373543, -0.02369866520166397, -0.02946563996374607, -0.024491623044013977, -0.016922468319535255, -0.04152222350239754, 0.0051947832107543945, -0.021085504442453384, 0.0040549044497311115, 0.02094133011996746, 0.014994136057794094, -0.02007628232240677, -0.027465220540761948, 0.004829841665923595, 0.01679631508886814, 0.037665557116270065, -0.04602767154574394, 0.041594307869672775, -0.008645957335829735, -0.011831310577690601, -0.032367147505283356, -0.015138310380280018, 0.03642205521464348, -0.02721291407942772, -0.030312664806842804, 0.0271768718957901, 0.011795266531407833, 0.014471503905951977, 0.0005257296143099666, 0.025735126808285713, -0.020923307165503502, -0.03943169489502907, -0.00025033403653651476, 0.010146272368729115, -0.020220456644892693, -0.03770160302519798, 0.03359263017773628, 0.012516139075160027, -0.04602767154574394, -0.025879301130771637, 0.037449296563863754, 0.041125744581222534, 0.005893127992749214, -0.025176452472805977, -0.011660103686153889, 0.003050189232453704, -0.018562451004981995, -0.0404769591987133, -0.030060358345508575, -0.030312664806842804, -0.0007687422912567854, -0.010885166004300117, 0.0021569838281720877, 0.03083529695868492, -0.01543566957116127, 0.04336044564843178, -0.04163035377860069, 0.05053311958909035, 0.029862118884921074, 0.014696775935590267, 0.05734536051750183, -0.02467184141278267, -0.038134124130010605, -0.004579789470881224, 0.04278374835848808, -0.030997492372989655, 0.04627997800707817, 0.026564130559563637, 0.04934368282556534, -0.018337178975343704, 0.02117561176419258, 0.050605207681655884, 0.03224099799990654, 0.03245725855231285, 0.052227169275283813, -0.004120233468711376, 0.00022259735851548612, -0.03914334625005722, -0.03795390576124191, 0.03316010907292366, -0.0008774363086558878, -0.09104612469673157, 0.006163455080240965, -0.07706120610237122, 0.03454778715968132, 0.03222297504544258, -0.020580893382430077, -0.009966053999960423, 0.03598953038454056, -0.00005821885497425683, -0.02094133011996746, -0.07014083862304688, 0.03849456086754799, 0.034421633929014206, 0.01706664264202118, -0.011876365169882774, 0.08866724371910095, -0.028294222429394722, -0.06650043278932571, 0.016012366861104965, 0.004262155387550592, 0.020400675013661385, -0.0027595877181738615, 0.059111498296260834, 0.043865054845809937, 0.034007132053375244, -0.0437929704785347, -0.003489470575004816, 0.07994469255208969, -0.004739732947200537, 0.05849875509738922, -0.012002517469227314, -0.01729191467165947, 0.021590113639831543, -0.03802599385380745, -0.006577956024557352, 0.026672260835766792, 0.05828249454498291, -0.028924984857439995, -0.011569994501769543, -0.019643759354948997, -0.05640822649002075, 0.08636045455932617, -0.026437977328896523, 0.015138310380280018, 0.004983026999980211, -0.013237010687589645, -0.005253354087471962, 0.021806376054883003, -0.0373411662876606, -0.005947193130850792, 0.0198419988155365, 0.008474750444293022, 0.037917863577604294, 0.0455591045320034, 0.0025207989383488894, -0.016525989398360252, 0.021319786086678505, 0.04761359095573425, -0.024707885459065437, 0.007483551744371653, -0.012579214759171009, 0.048262376338243484, -0.05536296218633652, 0.034854158759117126, 0.015354571864008904, -0.043432533740997314, -0.027789613232016563, -0.005235332529991865, -0.03752138465642929, 0.04015256464481354, -0.01451655849814415, 0.04217100888490677, -0.025843258947134018, -0.024779971688985825, 0.031880561262369156, 0.03240319341421127, -0.04855072498321533, -0.0461358018219471, 0.003095243824645877, 0.029826074838638306, -0.03130386397242546, 0.02211274579167366, -0.011615049093961716, -0.02492414601147175, -0.002232450293377042, 0.04646019637584686, -0.05341660976409912, -0.02353646792471409, -0.029339486733078957, -0.022256920114159584, -0.05038894712924957, -0.04000839218497276, 0.049884337931871414, 0.02995222806930542, -0.08527914434671402, 0.02647402137517929, -0.02166220173239708, 0.02921333536505699, 0.0034714487846940756, -0.05622800812125206, -0.007983656600117683, 0.022419117391109467, -0.027717525139451027, -0.008817164227366447, 0.006478836294263601, 0.00227525201626122, 0.005325441248714924, -0.004469405859708786, -0.04332440346479416, -0.025392713025212288, -0.028204113245010376, 0.03132188320159912, 0.04844259098172188, -0.03609766066074371, -0.03319615125656128, 0.05085751414299011, 0.009497487917542458, 0.02652808651328087, -0.05637218430638313, -0.01752619817852974, 0.04152222350239754, -0.10474269092082977, -0.014300297014415264, -0.019643759354948997, 0.011660103686153889, -0.06300420314073563, 0.0003590279957279563, -0.05615592375397682, -0.044369667768478394, -0.0447661466896534, 0.011434830725193024, 0.04718106612563133, 0.02969992347061634, -0.03634996712207794, -0.010344511829316616, 0.04703689366579056, 0.03348449990153313, 0.004194573499262333, -0.008019699715077877, -0.025915345177054405, -0.04108969867229462, 0.049163464456796646, 0.04191870242357254, 0.014498536475002766, 0.005690382793545723, 0.05348869785666466, -0.015300506725907326, 0.04797402769327164, -0.04768567904829979, -0.021319786086678505, -0.006514879874885082, 0.02348240278661251, 0.09984076023101807, -0.03600755333900452, -0.03301593288779259, 0.0021445939783006907, 0.006708614062517881, 0.03413328528404236, 0.06513077765703201, -0.008272005245089531, -0.07316850125789642, -0.0012412513606250286, -0.02330218441784382, 0.01199350692331791, -0.018508385866880417, -0.022869661450386047, -0.022527247667312622, 0.00021555759303737432, 0.0003852159425150603, -0.012849542312324047, 0.005361484829336405, -0.025843258947134018, -0.014669743366539478, -0.03292582556605339, 0.032835714519023895, 0.028690703213214874, 0.0020668748766183853, -0.029555749148130417, -0.009605618193745613, 0.03337636962532997, -0.08001678436994553, 0.07944008708000183, 0.024491623044013977, -0.022941749542951584, -0.012236800976097584, -0.02973596565425396, -0.015372593887150288, 0.03133990615606308, 0.041810572147369385, -0.021734287962317467, -0.06336463987827301, -0.05100168660283089, 0.017336970195174217, -0.036746446043252945, 0.0271768718957901, 0.00644279271364212, -0.08801846206188202, 0.04354066401720047, 0.01151592843234539, -0.007798932958394289, -0.004978521727025509, -0.014570623636245728, -0.005375001113861799, -0.0373411662876606, 0.07122214883565903, 0.030528925359249115, 0.02027452178299427, -0.024743927642703056, 0.024239318445324898, 0.038566648960113525, 0.03917938843369484, 0.009236171841621399, -0.03867477923631668, 0.011957462877035141, -0.0035818323958665133, -0.026419956237077713, 0.023103944957256317, 0.045487016439437866, 0.04606371372938156, 0.01844530925154686, -0.02330218441784382, -0.013083824887871742, 0.02787972055375576, -0.03579128906130791, 0.005167750641703606, 0.012570204213261604, -0.004372538533061743, -0.06541913002729416, -0.0030299148056656122, -0.003261945443227887, -0.003658425062894821, 0.019427498802542686, 0.03018651157617569, 0.04786589369177818, 0.006798723246902227, 0.01118252519518137, -0.028672680258750916, 0.004129244480282068, 0.025158429518342018, -0.005352473817765713, -0.009186611510813236, -0.007875525392591953, 0.048010069876909256, 0.023121966049075127, 0.007348387967795134, 0.023103944957256317, 0.05918358266353607, 0.03914334625005722, 0.07262784242630005, -0.036944687366485596, 0.03990026190876961, -0.015012158080935478, -0.01569698564708233, -0.06289607286453247, -0.012011528015136719, -0.05828249454498291, 0.04977620765566826, -0.0018111907411366701, 0.01776949316263199, 0.03552096337080002, 0.05784996971487999, 0.004807314369827509 ]
716,034
torch.optim.lr_scheduler
_get_closed_form_lr
null
def _get_closed_form_lr(self): return [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos(math.pi * self.last_epoch / self.T_max)) / 2 for base_lr in self.base_lrs]
(self)
[ 0.006564245093613863, 0.01056419126689434, -0.010907301679253578, 0.009968262165784836, 0.01210818812251091, 0.0019108093110844493, 0.0011100301053375006, -0.07591770589351654, 0.0025417262222617865, 0.046337973326444626, -0.011042740195989609, -0.03017566353082657, 0.031403638422489166, 0.015584439039230347, -0.016198426485061646, 0.05204444006085396, -0.0197017639875412, -0.003142169676721096, -0.02351209707558155, -0.032198209315538406, 0.0026703926268965006, 0.019105836749076843, -0.04413484409451485, 0.01825708895921707, -0.042040061205625534, 0.030861884355545044, 0.004521383438259363, 0.007742558605968952, -0.07714568078517914, -0.044568244367837906, 0.0018250317079946399, 0.03194539248943329, 0.061579301953315735, -0.050527531653642654, 0.01705620251595974, -0.03673087805509567, -0.0020406043622642756, 0.0026997376699000597, -0.01378762349486351, 0.041823361068964005, 0.015232299454510212, -0.03734486550092697, -0.02916439063847065, 0.009173690341413021, -0.05352523550391197, -0.03517785295844078, -0.0030563920736312866, 0.032992780208587646, 0.04760206490755081, -0.013778594322502613, 0.03355259448289871, -0.01736319623887539, 0.0060586086474359035, -0.036207184195518494, -0.014130733907222748, 0.05926781892776489, -0.019322536885738373, -0.00015236814215313643, 0.026058338582515717, -0.01776951178908348, 0.013670243322849274, -0.03441939875483513, -0.025642992928624153, 0.014780838042497635, 0.0632045641541481, -0.0003953106643166393, -0.011223324574530125, 0.019340595230460167, 0.021200615912675858, 0.05395863577723503, -0.016911735758185387, -0.010383606888353825, 0.005295639391988516, -0.00992311630398035, -0.03322754055261612, -0.011394879780709743, 0.0036320050712674856, -0.03357065096497536, -0.01546705886721611, -0.08480246365070343, -0.01476277969777584, 0.04944402724504471, 0.048902273178100586, 0.01261382456868887, -0.030789650976657867, -0.07071687281131744, 0.00041054747998714447, 0.0018284176476299763, -0.06761082261800766, -0.003668121760711074, -0.04630185663700104, -0.00018382933922111988, -0.0005076116067357361, -0.00813081581145525, -0.032198209315538406, 0.005390446167439222, -0.0913035050034523, 0.03689340502023697, 0.034274931997060776, -0.06251834332942963, 0.024559486657381058, 0.03839225694537163, -0.056053418666124344, 0.1017051711678505, 0.019864290952682495, 0.01850990764796734, -0.029019923880696297, -0.06208493933081627, 0.023295395076274872, -0.00007484379602828994, -0.04666302353143692, 0.06389078497886658, -0.010889243334531784, 0.047529831528663635, -0.10278867185115814, 0.010744775645434856, 0.0012482900638133287, 0.0632045641541481, 0.03483474254608154, 0.006947987247258425, 0.016379009932279587, 0.0016941080102697015, -0.05294736474752426, 0.03335395082831383, 0.02638339065015316, 0.05377805233001709, 0.009318158030509949, 0.024776188656687737, -0.049949660897254944, -0.04940791055560112, 0.049118973314762115, 0.03835614025592804, 0.025859694927930832, 0.025877753272652626, -0.017074260860681534, -0.03972858190536499, -0.0059547726996243, -0.011169148609042168, 0.013272957876324654, -0.0008611621451564133, 0.010591278783977032, 0.0342026986181736, 0.020532453432679176, 0.007774161174893379, -0.004153442569077015, 0.06150706857442856, 0.03022983856499195, 0.08935318887233734, 0.021236732602119446, -0.010302343405783176, 0.0157289057970047, 0.03423881530761719, 0.05908723548054695, -0.0017211956437677145, 0.039222944527864456, -0.046121273189783096, 0.023692680522799492, -0.018230000510811806, 0.004338541533797979, -0.01618036814033985, -0.04955237731337547, -0.009751561097800732, -0.04669914022088051, -0.05370581895112991, 0.011747019365429878, 0.015530264005064964, 0.025444351136684418, -0.061182014644145966, 0.00008210949454223737, 0.011250412091612816, -0.015918521210551262, -0.04247346520423889, 0.0020699494052678347, -0.00738138984888792, -0.043195802718400955, 0.03523202985525131, -0.005814819596707821, 0.015151035971939564, -0.04698807746171951, 0.015439971350133419, 0.026708442717790604, -0.024144142866134644, -0.02537211775779724, -0.07089745998382568, -0.015548322349786758, 0.034852802753448486, -0.03655029460787773, -0.041606660932302475, -0.029579734429717064, -0.017959125339984894, -0.027286311611533165, -0.005756129510700703, 0.0031263683922588825, -0.0537419356405735, -0.03667670488357544, 0.015385796315968037, -0.02836981974542141, 0.04850498586893082, 0.012649941258132458, -0.04662690684199333, 0.002207644982263446, 0.05027471482753754, -0.05016636475920677, -0.03810331970453262, -0.019810115918517113, 0.005399475339800119, -0.06547992676496506, -0.01722775772213936, 0.01403141301125288, 0.03828390687704086, 0.011494200676679611, 0.04059538617730141, -0.03416658192873001, 0.004033805336803198, 0.013778594322502613, -0.0014909504679962993, -0.019250303506851196, -0.011178177781403065, 0.010212051682174206, 0.022013245150446892, 0.018527965992689133, -0.06891103088855743, 0.03918682783842087, -0.04084820672869682, -0.001589143299497664, 0.0004043398948851973, 0.02956167608499527, -0.017444459721446037, -0.022067422047257423, 0.026365332305431366, -0.055294960737228394, -0.03642388433218002, -0.041028790175914764, -0.010654482990503311, 0.014609282836318016, 0.11759660392999649, -0.02889351360499859, 0.02638339065015316, -0.0803239718079567, 0.05515049397945404, -0.02571522817015648, -0.01369733177125454, 0.006631964351981878, 0.020478278398513794, 0.01018496323376894, 0.018925251439213753, 0.03248714283108711, 0.019250303506851196, -0.034798625856637955, 0.0046771373599767685, -0.033516477793455124, -0.046121273189783096, 0.03781438618898392, 0.03022983856499195, 0.06977783888578415, -0.04529058188199997, -0.006631964351981878, -0.009191748686134815, 0.01036554854363203, -0.02898380532860756, 0.053453002125024796, 0.016198426485061646, -0.041823361068964005, 0.022591115906834602, -0.03875342383980751, 0.06515487283468246, -0.018040386959910393, -0.01595463789999485, 0.04326803609728813, 0.0022934225853532553, 0.10026049613952637, 0.008722229860723019, -0.09079786390066147, -0.003516882425174117, 0.04644632339477539, 0.015123948454856873, 0.030735475942492485, -0.006514584645628929, -0.03689340502023697, 0.034798625856637955, -0.0009271883172914386, -0.026654265820980072, -0.00472679827362299, -0.0008250452810898423, -0.0623016394674778, 0.018103592097759247, -0.0135889807716012, -0.08574150502681732, 0.0375615693628788, -0.02461366169154644, 0.007349787745624781, 0.019521180540323257, 0.048541102558374405, 0.06049579381942749, 0.13153772056102753, -0.0059502581134438515, 0.04904673993587494, -0.04157054424285889, 0.03380541130900383, 0.012225568294525146, 0.034852802753448486, -0.03032013028860092, 0.07078910619020462, -0.003923197276890278, -0.025263765826821327, -0.11542958766222, 0.05273066461086273, -0.02598610334098339, 0.001541739795356989, -0.02143537625670433, -0.01846476085484028, 0.07241436839103699, 0.04287075251340866, -0.08408012241125107, -0.005223405547440052, -0.03651417791843414, -0.024469194933772087, -0.005977345630526543, 0.04424319416284561, 0.040920440107584, -0.013065285980701447, -0.01166575588285923, 0.05692022293806076, -0.005548457615077496, -0.033606767654418945, -0.014302289113402367, -0.010988564230501652, 0.0012358749518170953, -0.006144386250525713, -0.023566272109746933, -0.032198209315538406, -0.06306009739637375, -0.011530318297445774, 0.013534805737435818, -0.010013408027589321, -0.02681679278612137, 0.05952063947916031, 0.0034401339944452047, -0.0001793147239368409, -0.07794025540351868, -0.001853247988037765, -0.027773890644311905, -0.008510042913258076, 0.056631285697221756, -0.04698807746171951, 0.011747019365429878, 0.08639160543680191, -0.023132869973778725, 0.023168986663222313, 0.013995295390486717, -0.029182448983192444, -0.01546705886721611, -0.016911735758185387, 0.033642884343862534, -0.004580073524266481, 0.03976469859480858, -0.04034256935119629, 0.018546024337410927, 0.003814846742898226, -0.01635192334651947, 0.0007567617576569319, -0.0034559350460767746, -0.026708442717790604, 0.029200507327914238, 0.0110698277130723, 0.012523532845079899, 0.014175880700349808, -0.006758373696357012, 0.039656348526477814, 0.01378762349486351, -0.05059976503252983, -0.014717633835971355, 0.008478440344333649, 0.010166904889047146, -0.042401231825351715, 0.0180223286151886, -0.004225676413625479, -0.05392251908779144, 0.012993051670491695, -0.0014593481319025159, -0.009661268442869186, -0.01578308269381523, 0.029453326016664505, -0.0009249310242012143, 0.006735800299793482, 0.004124097526073456, 0.014040442183613777, -0.03380541130900383, 0.025047065690159798, -0.003871279302984476, 0.0013171379687264562, -0.05608953535556793, 0.02430666796863079, 0.012081100605428219, -0.02952555939555168, 0.012595766223967075, 0.04720477759838104, 0.01603589951992035, 0.027557188645005226, -0.027900299057364464, -0.015801141038537025, 0.05204444006085396, -0.014636370353400707, 0.004767430014908314, -0.013372279703617096, -0.05200832337141037, 0.03720039874315262, 0.04272628203034401, -0.014518991112709045, -0.0381755568087101, -0.03432910516858101, 0.04294298589229584, 0.028622636571526527, -0.010654482990503311, 0.0031308832112699747, -0.005106025841087103, -0.05164715647697449, -0.01930447854101658, 0.0179410669952631, 0.00617598881945014, 0.044965531677007675, 0.005413019098341465, 0.004013489466160536, 0.03355259448289871, 0.01533162035048008, 0.023981615900993347, 0.00179004343226552, 0.03701981529593468, -0.06428806483745575, 0.03273996338248253, 0.019557297229766846, -0.006455894559621811, -0.049118973314762115, -0.060965314507484436, -0.04323191940784454, -0.03136752173304558, -0.04431542754173279, 0.05320018157362938, -0.012162363156676292, -0.013516747392714024, 0.056811872869729996, 0.03889789432287216, 0.05868994817137718, -0.0018227744149044156, 0.06598556041717529, -0.03376929461956024, -0.008410721085965633, 0.025462409481406212, -0.03792273625731468, -0.00799537729471922, -0.031168878078460693, -0.00799537729471922, 0.024974830448627472, 0.034979209303855896, 0.0016218741657212377, 0.046157389879226685, -0.00037132680881768465, -0.05493379384279251, -0.028658753260970116, -0.01688464730978012, 0.06439641863107681, 0.03570154681801796, 0.01674017868936062, 0.042184531688690186, 0.018708549439907074, -0.013733448460698128, 0.03579184040427208, -0.027683597058057785, -0.042184531688690186, -0.01009467151015997, 0.03573766350746155, 0.0023340540938079357, 0.03795885294675827, -0.08574150502681732, -0.02156178466975689, 0.030988292768597603, -0.008112756535410881, 0.006631964351981878, 0.04565175250172615, -0.0748341977596283, -0.06396301835775375, -0.08068513870239258, -0.005232434719800949, 0.014690546318888664, -0.023891324177384377, 0.005710983648896217, -0.10249973833560944, 0.0047990321181714535, -0.009214322082698345, 0.003636519657447934, -0.018004270270466805, 0.03889789432287216, 0.012830525636672974, 0.019322536885738373, -0.02244664914906025, 0.004501067567616701, 0.06692460179328918, 0.002839690772816539, 0.05442815646529198, 0.044170960783958435, 0.013552864082157612, -0.02262723259627819, -0.014419669285416603, 0.03483474254608154, 0.03149392828345299, -0.047963231801986694, -0.06728576868772507, -0.043990373611450195, -0.05005801096558571, 0.006749344058334827, -0.005322726909071207, -0.02638339065015316, 0.024848422035574913, 0.0053498148918151855, -0.05775091052055359, -0.005914140958338976, -0.03579184040427208, 0.05186385661363602, 0.032144032418727875, 0.042798519134521484, -0.02687096782028675, -0.01056419126689434, -0.01905165985226631, -0.04828828573226929, -0.019322536885738373, 0.041209373623132706, -0.05421145632863045, -0.017480576410889626, 0.0060495794750750065, 0.018889134749770164, 0.05197220668196678, -0.03169257193803787, 0.042184531688690186, 0.018708549439907074, -0.07490643113851547, 0.0690193846821785, -0.007900570519268513, -0.07418409734964371, 0.010130788199603558, -0.04196782782673836, -0.03022983856499195, 0.02705155313014984, 0.056847989559173584, 0.06006239354610443, 0.025444351136684418, 0.006695169024169445, 0.02846011146903038, 0.005679381545633078, 0.040053632110357285, 0.005765159148722887, 0.0516110397875309, 0.021850720047950745, 0.017652131617069244, -0.03198150917887688, -0.00967932678759098, -0.0021162242628633976, 0.04055926948785782, 0.022374413907527924, 0.010085642337799072, -0.0375615693628788, 0.007990862242877483, -0.009607093408703804, 0.037453215569257736, -0.01811262220144272, -0.04034256935119629, -0.0013600267702713609, 0.03429298847913742, 0.03777826949954033, -0.015719877555966377, 0.03936741128563881, -0.000543728529009968, -0.005250493064522743, 0.029092157259583473, -0.06584109365940094, 0.07028347253799438, -0.014925305731594563, 0.0041692438535392284, -0.07649558037519455, -0.04164277762174606, -0.03828390687704086, 0.038247790187597275, -0.0342026986181736, 0.00045061466516926885, -0.1044500544667244, 0.010482927784323692, 0.01493433490395546, -0.050888702273368835, 0.04749371483922005, 0.0002243197668576613, 0.004424319136887789, -0.02638339065015316, 0.023403747007250786, -0.02226606383919716, -0.05244172737002373, -0.010997593402862549, -0.020749155431985855, -0.03987304866313934, -0.0352681465446949, -0.059990156441926956, 0.06945278495550156, 0.025570759549736977, -0.01573793590068817, -0.0358821339905262, 0.05825654789805412, -0.03149392828345299, -0.0531279481947422, 0.02797253243625164, -0.03667670488357544, -0.04420707747340202, -0.009950203821063042, 0.026004161685705185, 0.030916059389710426, 0.024071909487247467, -0.022898109629750252, 0.030735475942492485, -0.020694978535175323, 0.00321440352126956, 0.005110540427267551, 0.05825654789805412, 0.025245707482099533, 0.008744802325963974, -0.020387984812259674, 0.011223324574530125, -0.02085750550031662, -0.041209373623132706, -0.0011077728122472763, 0.03561125695705414, -0.0075303721241652966, 0.016667945310473442, -0.03239685297012329, -0.0014774065930396318, -0.0031083100475370884, -0.03660447150468826, -0.05576448142528534, -0.009300099685788155, 0.0940483883023262, 0.03850060701370239, -0.010952447541058064, -0.00297738634981215, 0.006947987247258425, -0.030952176079154015, 0.03416658192873001, -0.015846285969018936, -0.04084820672869682, -0.02311481162905693, 0.002873550169169903, -0.04247346520423889, 0.011295557953417301, 0.02421637624502182, 0.025335999205708504, -0.04406260699033737, 0.04395425692200661, 0.02284393459558487, -0.007417506538331509, -0.019376711919903755, -0.05948452278971672, 0.03187315911054611, 0.05294736474752426, 0.07873482257127762, -0.03026595525443554, -0.03169257193803787, -0.033426184207201004, 0.020261576399207115, -0.019430888816714287, -0.021327024325728416, -0.027196019887924194, -0.00310379546135664, 0.03548484668135643, -0.013209753669798374, -0.06186823546886444, -0.012315860018134117, -0.05045529827475548, 0.02076721377670765, 0.046554673463106155, -0.03561125695705414, 0.04308745265007019, -0.03689340502023697, 0.021995186805725098, 0.1022830381989479, 0.026401448994874954, 0.004051863681524992, 0.03022983856499195, -0.05836489796638489, -0.02470395527780056, 0.04817993566393852, 0.010058554820716381, -0.010446811094880104, 0.06067637726664543, 0.008473926223814487, 0.04175112769007683, -0.020514395087957382, -0.030338188633322716, 0.008410721085965633, -0.014076558873057365, 0.051285985857248306, 0.05041918158531189, -0.011756048537790775, 0.04857721924781799, 0.011548376642167568, 0.03792273625731468, 0.029489442706108093, -0.0012403895379975438, 0.0156476441770792, 0.04326803609728813, 0.01285761408507824, -0.006415262818336487, 0.052080560475587845, 0.01056419126689434, -0.07779578864574432, 0.0064694383181631565, 0.0503830648958683, 0.03557514026761055, 0.004654564429074526, 0.012279743328690529, -0.0023035805206745863, -0.010004378855228424, -0.02531794086098671, 0.0041669863276183605, -0.02983255311846733, -0.0010005508083850145, 0.004835148807615042, -0.001890493556857109, 0.058978885412216187, 0.025823578238487244, 0.0072098346427083015, 0.04720477759838104, -0.00819853413850069, 0.06692460179328918, -0.04839663580060005, -0.03689340502023697, -0.03198150917887688, 0.02705155313014984, -0.020044874399900436, -0.0197017639875412, -0.00536787323653698, 0.019322536885738373, 0.00724595133215189, 0.04113714024424553, -0.024324726313352585, -0.00844232365489006, 0.010970505885779858, 0.018925251439213753, 0.013715390115976334, 0.05334464833140373, -0.015458029694855213, 0.038247790187597275, -0.024685895070433617, -0.06584109365940094, 0.030699359253048897, -0.027683597058057785, 0.05005801096558571, 0.009105971083045006, 0.003661349881440401, -0.01948506385087967, -0.03346230089664459, -0.03573766350746155, 0.03893401101231575, -0.016162309795618057, -0.04323191940784454, 0.000803036498837173, 0.03138557821512222, -0.04464047774672508, 0.03561125695705414, 0.09455402195453644, -0.005006704013794661, 0.03187315911054611, -0.06204882264137268, -0.06977783888578415 ]
716,037
torch.optim.lr_scheduler
get_lr
null
def get_lr(self): if not self._get_lr_called_within_step: warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.", UserWarning) if self.last_epoch == 0: return [group['lr'] for group in self.optimizer.param_groups] elif self._step_count == 1 and self.last_epoch > 0: return [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos((self.last_epoch) * math.pi / self.T_max)) / 2 for base_lr, group in zip(self.base_lrs, self.optimizer.param_groups)] elif (self.last_epoch - 1 - self.T_max) % (2 * self.T_max) == 0: return [group['lr'] + (base_lr - self.eta_min) * (1 - math.cos(math.pi / self.T_max)) / 2 for base_lr, group in zip(self.base_lrs, self.optimizer.param_groups)] return [(1 + math.cos(math.pi * self.last_epoch / self.T_max)) / (1 + math.cos(math.pi * (self.last_epoch - 1) / self.T_max)) * (group['lr'] - self.eta_min) + self.eta_min for group in self.optimizer.param_groups]
(self)
[ -0.003828236134722829, 0.00316731259226799, -0.009332052432000637, 0.015964558348059654, 0.031798794865608215, 0.032320085912942886, 0.008866613730788231, -0.05481010302901268, -0.02872689813375473, 0.07547559589147568, -0.009397214278578758, -0.03559677675366402, 0.047660958021879196, 0.0570814423263073, -0.0039003791753202677, 0.04032563790678978, -0.038352176547050476, 0.016839584335684776, -0.03583880513906479, -0.03096100501716137, -0.0008878249791450799, -0.0036234429571777582, -0.03902240842580795, 0.004533376079052687, -0.03578295186161995, 0.03250626102089882, 0.0326179675757885, -0.017332950606942177, -0.05097488313913345, 0.03367916867136955, -0.020888904109597206, -0.017826315015554428, 0.007037438452243805, -0.06948073953390121, 0.001917608897201717, -0.006949004717171192, -0.030067361891269684, -0.017332950606942177, -0.044719383120536804, -0.015843544155359268, 0.04382574185729027, -0.03440525382757187, -0.003853835165500641, 0.01605764776468277, -0.04993230104446411, -0.015415340662002563, -0.02448209375143051, -0.019790468737483025, 0.01283680833876133, -0.048107780516147614, 0.029955657199025154, 0.020367613062262535, -0.0004843474889639765, -0.035298895090818405, -0.0008023005211725831, 0.003690931713208556, 0.012138649821281433, -0.05071423947811127, 0.016011102125048637, -0.014977828599512577, 0.06598063558340073, -0.060804955661296844, -0.022899601608514786, 0.0382404699921608, 0.06787963211536407, -0.04751201719045639, -0.0374026820063591, -0.009755602106451988, -0.012389987707138062, 0.05093764886260033, -0.0035652630031108856, -0.02107507921755314, 0.016811657696962357, -0.027647079899907112, -0.0069303871132433414, 0.010481687262654305, -0.021763930097222328, -0.03399566933512688, 0.00018224847735837102, -0.040921401232481, 0.007167761214077473, 0.07610858976840973, 0.037197887897491455, -0.004016738850623369, -0.004361163824796677, -0.081842802464962, -0.029099248349666595, -0.008601313456892967, -0.04732584208250046, -0.028652427718043327, -0.001978115877136588, -0.035075485706329346, 0.03526166081428528, 0.015722529962658882, -0.04468214884400368, 0.01685820147395134, -0.10865209251642227, -0.0007464478840120137, 0.018105579540133476, -0.06758175045251846, 0.02131710760295391, 0.021447431296110153, -0.006190339103341103, 0.06277842074632645, 0.03583880513906479, -0.0017488872399553657, -0.026045968756079674, -0.03946923092007637, 0.019864939153194427, 0.021745312958955765, -0.03250626102089882, 0.06128901243209839, -0.03596913069486618, 0.05250152572989464, -0.060804955661296844, 0.008899194188416004, -0.009895234368741512, 0.0572303831577301, -0.0065114921890199184, 0.031742941588163376, 0.011105375364422798, 0.05544309690594673, -0.016299676150083542, 0.023532597348093987, -0.03274828940629959, 0.005952965468168259, 0.014205199666321278, 0.01333017461001873, -0.050528060644865036, -0.03693724423646927, 0.03861282393336296, 0.017733227461576462, 0.003334870794788003, -0.009541500359773636, 0.0027111824601888657, -0.023197481408715248, 0.04546408727765083, 0.03621115908026695, -0.011673211120069027, -0.014354140497744083, 0.02597149834036827, 0.06512422859668732, 0.053395166993141174, -0.026101822033524513, 0.048517365008592606, 0.04434703290462494, 0.027163023129105568, 0.10969467461109161, 0.03528027981519699, -0.02820560522377491, 0.020665492862462997, -0.03701171278953552, 0.06192201003432274, 0.017556359991431236, 0.052836641669273376, -0.005729554686695337, -0.032487645745277405, 0.008913157507777214, -0.031147180125117302, -0.05693250522017479, -0.05078870803117752, -0.021745312958955765, -0.05611333250999451, -0.08400243520736694, 0.03408875688910484, 0.025301266461610794, -0.005659738555550575, 0.027907725423574448, -0.036341480910778046, -0.005264115519821644, 0.010332746431231499, -0.0686243325471878, -0.013190542347729206, 0.03905964270234108, -0.005520107224583626, 0.06050707399845123, -0.005319968331605196, 0.05037912353873253, -0.013600128702819347, 0.06881050765514374, 0.05008124187588692, -0.014112112112343311, 0.013413953594863415, -0.08809830248355865, -0.03218976408243179, 0.025897027924656868, -0.01269717700779438, -0.012175885029137135, -0.06445399671792984, 0.04293209686875343, 0.008075367659330368, 0.014940593391656876, -0.022880982607603073, -0.018887516111135483, -0.05916661024093628, 0.026399701833724976, -0.015433958731591702, 0.0648263469338417, 0.026269380003213882, 0.005087248515337706, 0.02079581655561924, 0.028056666254997253, -0.011105375364422798, 0.016178661957383156, -0.026381084695458412, -0.05332069844007492, -0.05827296897768974, -0.00008552442159270868, -0.023476745933294296, 0.04125651717185974, 0.0025552604347467422, 0.03891070559620857, 0.000020199327991576865, 0.021186785772442818, -0.010695789009332657, -0.0023353404831141233, -0.026678966358304024, 0.024370389059185982, 0.028242841362953186, 0.0001413771096849814, 0.039953287690877914, -0.08869406580924988, 0.06612958014011383, -0.02591564506292343, 0.014987137168645859, -0.04568749666213989, 0.02809390053153038, -0.048926953226327896, -0.060804955661296844, 0.03928305581212044, 0.017854241654276848, -0.1079818606376648, -0.015852853655815125, -0.007856611162424088, 0.014605477452278137, 0.06694874912500381, -0.01330224797129631, 0.0503418855369091, -0.04792160540819168, 0.025301266461610794, -0.03330681845545769, 0.019548440352082253, -0.010863346979022026, -0.015340871177613735, -0.012389987707138062, 0.01964152790606022, 0.05112382397055626, 0.008838687092065811, -0.06311353296041489, -0.004137753043323755, -0.0013125380501151085, 0.011561505496501923, 0.016951289027929306, 0.018133504316210747, -0.013358100317418575, -0.020497934892773628, 0.011012287810444832, 0.034833457320928574, 0.03245041146874428, -0.014493771828711033, 0.048517365008592606, -0.002971828216686845, -0.06784239411354065, 0.0006504510529339314, -0.0608794279396534, 0.057304855436086655, 0.008336013182997704, -0.010453760623931885, -0.003581553464755416, 0.03137059137225151, 0.08199173957109451, 0.017453964799642563, -0.08742807060480118, -0.02705131657421589, 0.016122808679938316, 0.009467029944062233, 0.018003182485699654, 0.012967132031917572, 0.023458126932382584, 0.005427019204944372, 0.03732820972800255, -0.004489159677177668, -0.03109132871031761, -0.034852076321840286, -0.03293446823954582, 0.013963171280920506, -0.02872689813375473, -0.018608253449201584, 0.004356509540230036, 0.03384672850370407, 0.048405662178993225, -0.03721650689840317, 0.009150531142950058, 0.022080428898334503, 0.14871707558631897, 0.018105579540133476, 0.013171925209462643, -0.014921975322067738, 0.048405662178993225, 0.03905964270234108, 0.027479521930217743, -0.00239002937451005, 0.07067226618528366, 0.01444722805172205, -0.04423532634973526, -0.05015571042895317, 0.006911769974976778, -0.018328988924622536, 0.033008936792612076, -0.019864939153194427, 0.012026945129036903, 0.039841581135988235, 0.05968790128827095, -0.07376278191804886, -0.009211038239300251, -0.03665797784924507, -0.011654593981802464, -0.008959701284766197, 0.022378308698534966, 0.009783528745174408, -0.02947160042822361, 0.037086181342601776, 0.0465439036488533, -0.005710937082767487, 0.00653476407751441, -0.017109539359807968, -0.0014475154457613826, 0.018654797226190567, -0.04591090604662895, -0.014400684274733067, -0.01878511905670166, -0.09383250772953033, -0.024426240473985672, 0.023011306300759315, 0.010593392886221409, 0.0030230265110731125, 0.038575589656829834, 0.05112382397055626, 0.025208178907632828, -0.02861519157886505, 0.02768431417644024, -0.00444028852507472, -0.018105579540133476, 0.06724663078784943, -0.0052315350621938705, 0.0011001814855262637, 0.07245954871177673, 0.04419809207320213, 0.017453964799642563, 0.0014416974736377597, -0.030346626415848732, -0.007484260015189648, -0.05481010302901268, 0.029843950644135475, -0.009662514552474022, 0.01290197018533945, -0.05946449190378189, -0.030030127614736557, 0.05894320085644722, -0.017733227461576462, -0.00866182055324316, 0.007819375954568386, -0.026455555111169815, 0.06732109934091568, 0.02947160042822361, 0.009373942390084267, -0.006599925458431244, -0.02666034922003746, 0.044160857796669006, -0.01594594120979309, -0.02883860282599926, -0.001617400674149394, 0.02068411186337471, 0.011915239505469799, -0.03511271998286247, 0.006706976797431707, 0.03245041146874428, -0.04985782876610756, 0.019231941550970078, -0.020833050832152367, 0.014149347320199013, 0.010453760623931885, 0.06300182640552521, 0.036453187465667725, 0.02660449594259262, -0.006502183619886637, -0.004100517835468054, -0.05745379626750946, 0.018077652901411057, -0.031333357095718384, 0.03621115908026695, -0.007502877153456211, -0.027256110683083534, -0.030197685584425926, -0.08243856579065323, 0.009895234368741512, 0.024463476613163948, 0.019976643845438957, -0.009052789770066738, -0.03109132871031761, -0.016867510974407196, 0.025319883599877357, -0.023644303902983665, -0.002680928912013769, -0.006115869153290987, -0.029173718765378, 0.079012930393219, 0.04624602198600769, -0.033232346177101135, -0.008047441020607948, -0.046506669372320175, 0.01266925036907196, 0.046208787709474564, -0.011756990104913712, 0.024035271257162094, 0.020293142646551132, -0.04155439883470535, 0.03622977435588837, 0.029043396934866905, 0.01903645694255829, -0.01605764776468277, 0.011663902550935745, -0.007256194483488798, 0.026678966358304024, 0.052203644067049026, 0.02068411186337471, -0.0009657859918661416, -0.012250355444848537, -0.06780515611171722, -0.014912666752934456, 0.034274931997060776, -0.007633200380951166, -0.008680437691509724, -0.039953287690877914, -0.025468824431300163, -0.02120540291070938, -0.009699749760329723, 0.06709769368171692, -0.025208178907632828, -0.06225712597370148, 0.04717690125107765, -0.000781937618739903, 0.03727236017584801, 0.037942592054605484, -0.0024272645823657513, -0.03226423263549805, -0.024612417444586754, -0.01401902362704277, -0.0634114146232605, -0.001964152790606022, -0.018161430954933167, -0.0188409723341465, 0.06899668276309967, 0.05641121044754982, 0.016011102125048637, 0.033008936792612076, -0.018934059888124466, -0.041852280497550964, -0.018170740455389023, -0.029825333505868912, 0.05108658969402313, 0.04483108967542648, 0.0421873964369297, 0.0127251036465168, -0.014800961129367352, -0.03125888481736183, 0.047139666974544525, 0.004279712215065956, -0.040995869785547256, 0.012278282083570957, -0.000444203382357955, 0.011673211120069027, 0.031147180125117302, -0.05246428772807121, -0.03520580753684044, 0.025319883599877357, 0.011598740704357624, -0.01560151670128107, 0.02165222354233265, -0.0802789255976677, -0.032785527408123016, -0.06758175045251846, 0.02316024713218212, 0.02366292104125023, -0.0016523086233064532, 0.026567259803414345, -0.1079818606376648, 0.04743754863739014, -0.01232482586055994, -0.011412565596401691, -0.05510798096656799, 0.01886889897286892, 0.0006958313751965761, 0.012939205393195152, -0.08452372997999191, -0.03222699835896492, 0.09211969375610352, 0.00848495401442051, 0.05082594230771065, 0.07435853779315948, 0.040697988122701645, -0.04032563790678978, 0.024668268859386444, 0.02170807681977749, 0.03263658657670021, -0.01556428149342537, -0.04740031063556671, -0.03183602914214134, -0.05049082636833191, 0.0496344193816185, 0.00943444948643446, 0.000941932259593159, 0.005459600128233433, 0.015266400761902332, -0.07231061160564423, -0.026287997141480446, 0.004133098758757114, 0.05320899188518524, 0.045650262385606766, 0.0420384556055069, -0.010239658877253532, 0.02085166983306408, -0.013171925209462643, -0.049373771995306015, 0.009341361932456493, 0.05607609450817108, -0.05682079866528511, -0.01286473497748375, -0.01705368608236313, 0.0090341717004776, 0.04028840363025665, -0.02401665411889553, 0.012129341252148151, -0.00040056847501546144, -0.039096880704164505, 0.0722733736038208, -0.03509410470724106, -0.059017669409513474, -0.05183129012584686, -0.020609641447663307, -0.01622520573437214, 0.0004343127948231995, 0.031631238758563995, 0.01952982135117054, 0.012110724113881588, -0.0065208007581532, -0.010686480440199375, 0.060804955661296844, 0.026399701833724976, 0.001744232838973403, 0.06464017182588577, 0.016672026365995407, -0.018971296027302742, -0.028391782194375992, -0.031277503818273544, -0.026101822033524513, -0.011552196927368641, 0.03315787762403488, 0.003974849358201027, -0.015136078000068665, -0.01171975489705801, -0.04155439883470535, 0.011086758226156235, -0.013749069534242153, -0.005799370352178812, -0.024835826829075813, -0.0025855139829218388, 0.030588652938604355, -0.04382574185729027, 0.029732245951890945, -0.02062825858592987, -0.0191202349960804, -0.004123789723962545, -0.09278992563486099, 0.018142813816666603, -0.018133504316210747, 0.026269380003213882, -0.013432570733129978, -0.05481010302901268, -0.018906133249402046, 0.04032563790678978, -0.006967622321099043, 0.021968722343444824, -0.07555006444454193, 0.003860816825181246, 0.03016044944524765, -0.05406539887189865, 0.038463883101940155, -0.035485073924064636, 0.010826111771166325, -0.020702729001641273, 0.06255500763654709, -0.026008734479546547, -0.011449800804257393, 0.004184296820312738, 0.002438900526612997, -0.03608083352446556, -0.013143998570740223, -0.027032699435949326, 0.06698598712682724, 0.022955453023314476, 0.0017488872399553657, 0.010006939060986042, 0.038687292486429214, -0.0095601174980402, -0.04967165365815163, 0.0051710279658436775, -0.025543294847011566, -0.017398111522197723, -0.018133504316210747, 0.013171925209462643, -0.0076750898733735085, 0.033977050334215164, -0.03675106540322304, 0.04944824427366257, -0.01993940770626068, -0.0021014572121202946, 0.011691829189658165, 0.06337417662143707, -0.016960598528385162, 0.021726693958044052, -0.001115890103392303, 0.005017432849854231, -0.018450003117322922, -0.016988525167107582, -0.01988355629146099, 0.0072934296913445, -0.04833118990063667, 0.0490758940577507, -0.06687428057193756, 0.002170109422877431, -0.03353022783994675, 0.012185194529592991, -0.10425834357738495, 0.01971599832177162, 0.05257599428296089, 0.03479622304439545, -0.015452575869858265, -0.01746327243745327, -0.07219890505075455, 0.007423752918839455, 0.07428406924009323, -0.011505653150379658, -0.028987543657422066, 0.0013276648242026567, -0.009634587913751602, -0.053916458040475845, 0.03591327741742134, 0.07108184695243835, 0.0458364374935627, -0.02286236546933651, 0.011794225312769413, 0.02895030751824379, 0.014354140497744083, -0.042894862592220306, -0.017398111522197723, 0.011701137758791447, 0.05890596657991409, 0.028242841362953186, -0.06486358493566513, -0.07182655483484268, -0.02101922780275345, 0.012185194529592991, 0.0023714120034128428, -0.047027960419654846, 0.01079818606376648, -0.0653848797082901, 0.052836641669273376, 0.017174700275063515, -0.052538760006427765, -0.034219078719615936, -0.028968926519155502, 0.012315517291426659, 0.07245954871177673, -0.00030893515213392675, 0.03693724423646927, -0.05056529864668846, -0.07033714652061462, 0.05559203773736954, -0.0039306324906647205, -0.0191947054117918, 0.028652427718043327, -0.06475187838077545, -0.014149347320199013, 0.003700240282341838, -0.024500710889697075, 0.03488931059837341, 0.03969264030456543, 0.05257599428296089, 0.03743991628289223, -0.039953287690877914, 0.03678830340504646, -0.0006533600389957428, 0.024053890258073807, 0.04107034206390381, 0.0028694316279143095, -0.012976440601050854, 0.018887516111135483, 0.00207236735150218, -0.01878511905670166, -0.011701137758791447, -0.0076006194576621056, -0.028410399332642555, 0.017584286630153656, 0.002259706612676382, 0.04624602198600769, 0.052836641669273376, 0.0016627809964120388, -0.05648568272590637, 0.00940652284771204, 0.03924582153558731, -0.010248967446386814, -0.007763523142784834, -0.033809490501880646, -0.003127750474959612, -0.04870354011654854, 0.0270699355751276, -0.02988118678331375, -0.04516620561480522, 0.02969501167535782, -0.018198667094111443, -0.000524491595569998, 0.04996953532099724, 0.012166576460003853, -0.005147755611687899, 0.02883860282599926, 0.03717926889657974, 0.03176156058907509, -0.030774829909205437, -0.0273491982370615, -0.0010536375921219587, 0.05130999907851219, 0.01090989075601101, -0.018133504316210747, 0.04430979862809181, 0.014707873575389385, 0.030123215168714523, 0.009811455383896828, 0.015629442408680916, 0.01519193034619093, 0.030886534601449966, 0.03621115908026695, 0.0051617189310491085, 0.007177070248872042, 0.00479867635294795, 0.004586901981383562, -0.04244804009795189, -0.06750728189945221, 0.058347437530756, -0.049150362610816956, 0.03999052196741104, -0.048293955624103546, 0.01781700737774372, -0.007400480564683676, -0.03235732391476631, -0.07104461640119553, 0.03161261975765228, -0.034032903611660004, -0.017360875383019447, 0.0004156952491030097, 0.016960598528385162, -0.05395369231700897, 0.04498003050684929, 0.04114481061697006, -0.0066837044432759285, -0.010788876563310623, -0.041740573942661285, -0.04040011018514633 ]
716,051
pytorch_optimizer.lr_scheduler.cosine_anealing
CosineAnnealingWarmupRestarts
CosineAnnealingWarmupRestarts. :param optimizer: Optimizer. wrapped optimizer instance. :param first_cycle_steps: int. first cycle step size. :param cycle_mult: float. cycle steps magnification. :param max_lr: float. :param min_lr: float. :param warmup_steps: int. number of warmup steps. :param gamma: float. decrease rate of lr by cycle. :param last_epoch: int. step size of the current cycle.
class CosineAnnealingWarmupRestarts(_LRScheduler): r"""CosineAnnealingWarmupRestarts. :param optimizer: Optimizer. wrapped optimizer instance. :param first_cycle_steps: int. first cycle step size. :param cycle_mult: float. cycle steps magnification. :param max_lr: float. :param min_lr: float. :param warmup_steps: int. number of warmup steps. :param gamma: float. decrease rate of lr by cycle. :param last_epoch: int. step size of the current cycle. """ def __init__( self, optimizer: OPTIMIZER, first_cycle_steps: int, cycle_mult: float = 1.0, max_lr: float = 1e-4, min_lr: float = 1e-6, warmup_steps: int = 0, gamma: float = 0.9, last_epoch: int = -1, ): if warmup_steps >= first_cycle_steps: raise ValueError( f'[-] warmup_steps must be smaller than first_cycle_steps. {warmup_steps} < {first_cycle_steps}' ) self.first_cycle_steps = first_cycle_steps self.cycle_mult = cycle_mult self.base_max_lr = max_lr self.max_lr = max_lr self.min_lr = min_lr self.warmup_steps = warmup_steps self.gamma = gamma self.cur_cycle_steps = first_cycle_steps self.step_in_cycle = last_epoch self.last_epoch = last_epoch self.cycle: int = 0 self.base_lrs: List[float] = [] super().__init__(optimizer, last_epoch) self.init_lr() def init_lr(self): self.base_lrs = [] for param_group in self.optimizer.param_groups: param_group['lr'] = self.min_lr self.base_lrs.append(self.min_lr) def get_lr(self) -> List[float]: if self.step_in_cycle == -1: return self.base_lrs if self.step_in_cycle < self.warmup_steps: return [ (self.max_lr - base_lr) * self.step_in_cycle / self.warmup_steps + base_lr for base_lr in self.base_lrs ] return [ base_lr + (self.max_lr - base_lr) * ( 1 + math.cos( math.pi * (self.step_in_cycle - self.warmup_steps) / (self.cur_cycle_steps - self.warmup_steps) ) ) / 2.0 for base_lr in self.base_lrs ] def step(self, epoch: Optional[int] = None): if epoch is None: epoch = self.last_epoch + 1 self.step_in_cycle = self.step_in_cycle + 1 if self.step_in_cycle >= self.cur_cycle_steps: self.cycle += 1 self.step_in_cycle = self.step_in_cycle - self.cur_cycle_steps self.cur_cycle_steps = ( int((self.cur_cycle_steps - self.warmup_steps) * self.cycle_mult) + self.warmup_steps ) elif epoch >= self.first_cycle_steps: if self.cycle_mult == 1.0: self.step_in_cycle = epoch % self.first_cycle_steps self.cycle = epoch // self.first_cycle_steps else: n: int = int(math.log((epoch / self.first_cycle_steps * (self.cycle_mult - 1) + 1), self.cycle_mult)) self.cycle = n self.step_in_cycle = epoch - int( self.first_cycle_steps * (self.cycle_mult ** n - 1) / (self.cycle_mult - 1) ) # fmt: skip self.cur_cycle_steps = self.first_cycle_steps * self.cycle_mult ** n # fmt: skip else: self.cur_cycle_steps = self.first_cycle_steps self.step_in_cycle = epoch self.max_lr = self.base_max_lr * (self.gamma ** self.cycle) # fmt: skip self.last_epoch = math.floor(epoch) for param_group, lr in zip(self.optimizer.param_groups, self.get_lr()): param_group['lr'] = lr
(optimizer: Type[torch.optim.optimizer.Optimizer], first_cycle_steps: int, cycle_mult: float = 1.0, max_lr: float = 0.0001, min_lr: float = 1e-06, warmup_steps: int = 0, gamma: float = 0.9, last_epoch: int = -1)
[ -0.0005454903584904969, -0.038287341594696045, -0.03646035119891167, 0.052466366440057755, -0.02162599191069603, 0.026471486315131187, -0.04777974262833595, -0.038029178977012634, -0.039935603737831116, 0.028993524610996246, -0.004986985586583614, 0.026114031672477722, 0.10326460748910904, 0.07518458366394043, -0.020553629845380783, 0.03888309746980667, 0.016343610361218452, 0.02051391266286373, -0.028437485918402672, -0.00964630488306284, -0.004182713106274605, -0.014288247562944889, -0.02609417214989662, 0.07804421335458755, -0.039458997547626495, 0.05103654786944389, 0.005123513285070658, 0.03209146484732628, -0.08682170510292053, -0.00895621906965971, -0.015211671590805054, 0.017098236829042435, -0.016879791393876076, -0.03842635080218315, 0.021506840363144875, -0.04090867191553116, 0.009249133057892323, -0.00698029063642025, -0.1533082276582718, -0.004197607282549143, 0.0489315390586853, -0.012769066728651524, 0.007625694386661053, 0.004286970943212509, -0.015281176194548607, -0.021963588893413544, -0.024525344371795654, 0.021129528060555458, 0.011766208335757256, -0.06672482192516327, 0.0232742540538311, -0.07971233874559402, 0.03798945993185043, -0.003323829732835293, 0.009472542442381382, 0.03810861334204674, 0.03286594897508621, -0.00897111278027296, 0.041305843740701675, -0.0395384319126606, 0.03858521953225136, -0.051513154059648514, -0.009442754089832306, 0.07129229605197906, 0.02164585143327713, -0.022241609171032906, -0.04122640937566757, -0.013682560995221138, 0.036639079451560974, 0.020186245441436768, 0.025478556752204895, -0.030284332111477852, 0.048534367233514786, -0.03520926088094711, -0.004808258265256882, -0.014059874229133129, -0.05206919461488724, -0.08253225684165955, -0.0015092520043253899, -0.06330914795398712, 0.03997531905770302, 0.03862493485212326, -0.0026312617119401693, -0.05747072771191597, 0.021129528060555458, -0.04356972128152847, -0.03463336080312729, -0.007496613543480635, -0.01839897409081459, -0.025895586237311363, -0.016859933733940125, 0.006826386321336031, 0.027623282745480537, 0.04098810628056526, 0.02188415452837944, 0.03439505770802498, -0.049487579613924026, -0.045039258897304535, 0.02375086024403572, -0.05878139287233353, 0.0371752604842186, 0.00803775992244482, -0.012461258098483086, 0.05882111191749573, -0.005103654693812132, -0.02794102020561695, -0.0558026060461998, -0.010455542244017124, 0.03417661413550377, -0.027782151475548744, -0.07168947160243988, 0.054134488105773926, -0.03324326127767563, -0.008921466767787933, -0.06164103001356125, 0.0075264014303684235, -0.015767712146043777, 0.025538133457303047, -0.008454790338873863, 0.03818804770708084, 0.0325084924697876, 0.0003112211707048118, -0.009015794843435287, 0.03415675461292267, 0.010415825061500072, -0.02353241667151451, 0.02535940520465374, 0.06879011541604996, -0.003303971141576767, -0.03095952421426773, 0.038982391357421875, 0.0032369482796639204, -0.011905218474566936, -0.014784712344408035, 0.01036617811769247, -0.04988475143909454, 0.006444108672440052, 0.029668716713786125, -0.05925799906253815, -0.04094839096069336, 0.026570778340101242, 0.048812385648489, 0.02091108448803425, -0.0025741683784872293, 0.02164585143327713, 0.033402130007743835, 0.036380916833877563, 0.03419647365808487, 0.02470407262444496, 0.028040314093232155, 0.020414618775248528, -0.020553629845380783, 0.04706483334302902, 0.005197983235120773, 0.0035621325951069593, -0.0063994270749390125, -0.03467307984828949, 0.016234388574957848, -0.029609141871333122, 0.0232742540538311, -0.04972588270902634, -0.032647505402565, -0.0325482115149498, -0.027821868658065796, 0.0005765193491242826, 0.041067540645599365, -0.02166570909321308, 0.012262672185897827, -0.016224458813667297, 0.025438839569687843, 0.023313971236348152, -0.04813719540834427, 0.018210316076874733, 0.0007515231263823807, 0.03119782730937004, 0.09826024621725082, 0.014437186531722546, 0.009864749386906624, -0.007422144059091806, 0.027087101712822914, -0.00035993673373013735, -0.015261317603290081, -0.004900104366242886, -0.1023114025592804, -0.02883465588092804, 0.052228063344955444, 0.01788265071809292, -0.002673461101949215, 0.013632914051413536, 0.027543848380446434, 0.002728072227910161, -0.010922218672931194, 0.027067244052886963, 0.022261466830968857, -0.011557692661881447, -0.012520833872258663, 0.004517826717346907, 0.04114697501063347, 0.06009206175804138, -0.0042373244650661945, -0.011120804585516453, 0.09166719764471054, 0.03507025167346001, -0.024326758459210396, -0.01174634974449873, -0.03880366310477257, -0.031078675761818886, 0.02796087972819805, -0.017108166590332985, 0.0465882271528244, -0.039458997547626495, -0.0003555926668923348, 0.032905664294958115, 0.03854550048708916, 0.02585586905479431, -0.03207160532474518, 0.0008092370699159801, 0.0325283519923687, 0.029926879331469536, -0.028973666951060295, 0.009398072957992554, -0.03610289841890335, -0.03854550048708916, -0.04138527810573578, 0.031297121196985245, -0.028258757665753365, 0.04936842620372772, -0.011021511629223824, -0.009278921410441399, 0.01700887270271778, -0.0104654710739851, -0.07967261970043182, -0.006483825854957104, 0.010862642899155617, 0.031019100919365883, 0.007715058047324419, -0.03115811012685299, 0.06791634112596512, -0.01579749956727028, -0.028914090245962143, -0.05226777866482735, -0.013474046252667904, 0.004775988403707743, -0.016194671392440796, 0.015400327742099762, 0.04007461294531822, 0.06942559033632278, 0.03236948326230049, -0.07061710953712463, 0.012709490954875946, -0.024326758459210396, -0.026928232982754707, -0.0008142017177306116, 0.011299531906843185, -0.033858876675367355, -0.03050277754664421, 0.03234962373971939, 0.02935097925364971, 0.04511869326233864, -0.009075370617210865, 0.002225402044132352, 0.006086654495447874, -0.05055994167923927, 0.025756577029824257, -0.0558820404112339, 0.028775081038475037, -0.015767712146043777, -0.018488336354494095, -0.04539671167731285, 0.02047419548034668, 0.09277927875518799, 0.028437485918402672, -0.06434179842472076, 0.01834932714700699, 0.021069953218102455, 0.028794938698410988, -0.03820790722966194, -0.033660292625427246, 0.014605985023081303, -0.0003034639230463654, 0.03534827008843422, -0.03095952421426773, -0.04285481199622154, -0.02377071976661682, -0.05171173810958862, -0.024584921076893806, -0.0244061928242445, -0.007690234575420618, 0.04229877144098282, -0.01315630879253149, 0.013513763435184956, -0.05604090914130211, 0.07776619493961334, 0.01255062222480774, 0.14711235463619232, 0.06342829763889313, -0.0017078378004953265, -0.014605985023081303, -0.036182332783937454, 0.007476754952222109, 0.05401533469557762, -0.019858578220009804, 0.027305545285344124, -0.02188415452837944, -0.020811790600419044, -0.018796145915985107, -0.014516620896756649, -0.002401646925136447, 0.05377703160047531, -0.009710845537483692, -0.01325560174882412, 0.028000596910715103, 0.04833577945828438, -0.00109284243080765, -0.019898295402526855, -0.05608062818646431, -0.004378816578537226, 0.010048440657556057, 0.05230749770998955, 0.04396689310669899, -0.023353688418865204, 0.04706483334302902, 0.022618921473622322, 0.03914126008749008, 0.009154804982244968, -0.04535699263215065, 0.0861067995429039, 0.03445463627576828, -0.023552274331450462, -0.052704669535160065, -0.015519479289650917, -0.036420632153749466, -0.029926879331469536, 0.040829237550497055, 0.005163230467587709, -0.026828940957784653, 0.02071249857544899, 0.02494237571954727, 0.01931246742606163, -0.05933743342757225, 0.1092221811413765, 0.05536571890115738, -0.045237842947244644, 0.038247622549533844, 0.016691135242581367, -0.04972588270902634, 0.07979176938533783, 0.026114031672477722, -0.004525273572653532, 0.0008588835480622947, -0.023433122783899307, 0.0029465167317539454, -0.03093966655433178, 0.07097455859184265, 0.030324049293994904, 0.04090867191553116, -0.0418618842959404, -0.09500344097614288, 0.05302240699529648, -0.07621722668409348, -0.020414618775248528, 0.023333830758929253, -0.04527755826711655, 0.06938587129116058, 0.026888515800237656, -0.004031291697174311, -0.055047981441020966, -0.015052802860736847, 0.0465087927877903, -0.02325439639389515, -0.04372859001159668, -0.010564764030277729, 0.021526699885725975, -0.018756428733468056, -0.023115385323762894, 0.016343610361218452, -0.01127967331558466, -0.017137954011559486, 0.012232884764671326, 0.036440491676330566, 0.05961545556783676, -0.0007831727270968258, -0.026630355045199394, -0.0021534147672355175, 0.050123054534196854, -0.015211671590805054, 0.02444591000676155, -0.02533954754471779, 0.08261168748140335, -0.03379930183291435, 0.022678496316075325, 0.02768285945057869, 0.03238934278488159, -0.026828940957784653, -0.0465087927877903, 0.027126818895339966, 0.04213990643620491, 0.08880756795406342, -0.03312411159276962, -0.03566600754857063, -0.003711072029545903, -0.0031401377636939287, 0.008986007422208786, 0.01672092266380787, -0.01093214750289917, -0.0512351356446743, 0.08269112557172775, 0.024505486711859703, -0.02186429500579834, 0.08062583208084106, -0.032687220722436905, -0.03203188627958298, 0.015092520043253899, -0.004818187560886145, -0.04353000596165657, -0.012252743355929852, -0.05909913033246994, -0.04464208707213402, 0.03205174580216408, 0.02881479822099209, 0.013652772642672062, 0.031992170959711075, 0.06489783525466919, 0.06684397906064987, 0.03806889429688454, 0.004713930189609528, -0.002400405704975128, -0.012977581471204758, -0.042457640171051025, -0.01432796474546194, -0.016214529052376747, -0.007183840963989496, -0.04754143953323364, -0.03139641508460045, -0.0221423152834177, -0.006821421906352043, 0.003073115134611726, 0.0581856369972229, 0.01047540083527565, -0.046191055327653885, 0.021586274728178978, -0.01765427738428116, 0.02931126207113266, -0.013901005499064922, -0.012669773772358894, 0.021467123180627823, -0.017813146114349365, -0.026689929887652397, -0.07510514557361603, 0.010654127225279808, -0.029172252863645554, 0.02114938572049141, -0.006012185011059046, 0.01059455145150423, 0.023393405601382256, 0.0029936807695776224, -0.02400902286171913, -0.016105307266116142, -0.019898295402526855, -0.04774002358317375, 0.03306453302502632, 0.050599660724401474, 0.014854216948151588, 0.025657283142209053, -0.009015794843435287, 0.0020230927038937807, 0.03868451341986656, 0.05441250652074814, -0.016333680599927902, -0.009745597839355469, 0.004525273572653532, -0.002904317108914256, 0.061561595648527145, -0.03582487627863884, 0.0035075214691460133, -0.013066944666206837, -0.057589877396821976, -0.023333830758929253, 0.025478556752204895, -0.048057761043310165, -0.009487436152994633, -0.0267892237752676, 0.06815464049577713, 0.022023163735866547, -0.008762598037719727, 0.00895621906965971, -0.023155102506279945, -0.005853316280990839, 0.00014156995166558772, -0.0007192529155872762, -0.07546260207891464, -0.0027032489888370037, 0.02000751905143261, 0.049924466758966446, -0.058741677552461624, -0.0372745543718338, 0.035745441913604736, 0.009125016629695892, 0.08062583208084106, 0.004969609435647726, 0.02446576952934265, 0.003155031707137823, -0.017316680401563644, 0.0009345943690277636, 0.05274438485503197, 0.01442725770175457, -0.059416867792606354, -0.04869323596358299, -0.07621722668409348, 0.05171173810958862, 0.01513223722577095, -0.02022596262395382, 0.03133683651685715, -0.006463967263698578, -0.04102782532572746, -0.01395065151154995, -0.022678496316075325, 0.048772670328617096, 0.04444349929690361, -0.006046937312930822, 0.002112456364557147, 0.027881445363163948, 0.00768527016043663, -0.038247622549533844, 0.004242288880050182, 0.047620873898267746, -0.010673985816538334, -0.06342829763889313, 0.010634268634021282, 0.03695681691169739, -0.0244260523468256, -0.043172549456357956, -0.024823224171996117, 0.04436406493186951, 0.025935303419828415, 0.0048281168565154076, -0.03050277754664421, -0.05894026160240173, -0.002586579881608486, -0.029907019808888435, -0.01719752885401249, -0.0004021362110506743, 0.05747072771191597, 0.006315028294920921, -0.021824577823281288, 0.025001950562000275, 0.025478556752204895, 0.06442122906446457, -0.030185040086507797, 0.01140875369310379, 0.011001653037965298, 0.01083285454660654, -0.03914126008749008, -0.003517450764775276, -0.015648560598492622, -0.005982397124171257, -0.008494507521390915, 0.006632765289396048, 0.03133683651685715, 0.027821868658065796, -0.04603218659758568, -0.009482471272349358, 0.009472542442381382, -0.10628311336040497, -0.021506840363144875, -0.005624942481517792, -0.000758970039896667, 0.003398299217224121, -0.02071249857544899, 0.033858876675367355, 0.015529409050941467, -0.023591991513967514, 0.011527905240654945, -0.0418618842959404, -0.07113342732191086, -0.015708135440945625, 0.029926879331469536, -0.02091108448803425, -0.00454264972358942, -0.06307084858417511, 0.04488039016723633, -0.027583565562963486, -0.0209309421479702, -0.07391363382339478, 0.010028582066297531, 0.02232104353606701, -0.05858280882239342, 0.02651120349764824, -0.033143967390060425, -0.0007937225745990872, -0.030423343181610107, 0.0674000158905983, -0.05703384056687355, -0.03739370405673981, -0.024306900799274445, 0.008851961232721806, -0.007988112978637218, 0.02045433595776558, 0.008896643295884132, 0.04952729493379593, -0.05306212231516838, 0.020871367305517197, 0.005495861638337374, 0.008007971569895744, -0.02027560956776142, 0.0014869110891595483, 0.004182713106274605, -0.039895884692668915, 0.014824429526925087, -0.016184741631150246, -0.023889871314167976, 0.012888217344880104, 0.03167443349957466, -0.017505336552858353, -0.009765456430613995, -0.012371894903481007, -0.015549267642199993, -0.026213323697447777, 0.07570090144872665, -0.027285687625408173, 0.004579884931445122, -0.011666915379464626, -0.02559770829975605, -0.028437485918402672, -0.04754143953323364, 0.010495259426534176, 0.03747313842177391, -0.04206047207117081, 0.04233849048614502, -0.0652155727148056, 0.015330823138356209, 0.003845117287710309, 0.004564990755170584, -0.06116442382335663, 0.041981037706136703, 0.029728293418884277, -0.00790867954492569, 0.011230026371777058, -0.0018580183386802673, -0.03673836961388588, 0.017118094488978386, 0.033143967390060425, -0.04166330024600029, 0.009829996153712273, -0.04380802437663078, -0.03675822913646698, 0.02003730647265911, 0.04265622794628143, 0.0814996063709259, 0.08308829367160797, -0.01768406480550766, 0.043609440326690674, -0.022460052743554115, 0.035944029688835144, -0.027881445363163948, -0.004068526439368725, -0.02116924524307251, 0.014824429526925087, 0.034553926438093185, -0.0767335519194603, -0.01037610787898302, 0.018756428733468056, -0.015440044924616814, -0.02160613425076008, -0.029668716713786125, -0.011766208335757256, 0.023413265123963356, 0.003296524053439498, -0.010276814922690392, 0.0031798549462109804, -0.05536571890115738, -0.07041852176189423, -0.00897111278027296, 0.01349390484392643, -0.004259665030986071, 0.0005675209686160088, -0.03818804770708084, -0.04285481199622154, 0.02672964707016945, 0.007878891192376614, -0.013037157244980335, 0.027285687625408173, -0.06529501080513, -0.0033834055066108704, 0.019183387979865074, -0.012709490954875946, -0.000055735894420649856, -0.008429966866970062, 0.038942672312259674, 0.013186096213757992, -0.03789016976952553, 0.08467698097229004, -0.008271098136901855, 0.006190911866724491, 0.013374753296375275, -0.009929289110004902, -0.07065682113170624, -0.01768406480550766, 0.02766299992799759, -0.06767803430557251, 0.02863607183098793, -0.012312319129705429, -0.05024220421910286, 0.03139641508460045, -0.007958325557410717, 0.06358716636896133, -0.007506542839109898, -0.005202947650104761, 0.006260416936129332, 0.03767172619700432, 0.06120413914322853, 0.04698539897799492, 0.017823074012994766, -0.03310425207018852, -0.0035968851298093796, -0.04233849048614502, 0.004048667848110199, -0.020077023655176163, -0.035745441913604736, 0.023313971236348152, -0.008186698891222477, 0.02027560956776142, 0.03330283612012863, 0.009254097938537598, -0.05508769676089287, -0.0024897693656384945, 0.014695348218083382, -0.0036514962557703257, 0.018676994368433952, -0.003825258696451783, 0.01107115764170885, 0.05449194088578224, -0.017118094488978386, 0.021804720163345337, 0.04869323596358299, -0.019709639251232147, 0.003989092074334621, 0.008822173811495304, -0.011964794248342514, 0.017098236829042435, -0.00860372930765152, -0.008444860577583313, -0.0511954165995121, -0.00004689262277679518, -0.01675071194767952, 0.04356972128152847, -0.00605190172791481, -0.008653376251459122, 0.07300013303756714, -0.06549359112977982, 0.03115811012685299, -0.04468180239200592, -0.02234090119600296, 0.024346617981791496, -0.00988460797816515, -0.06700284779071808, 0.0076306588016450405, -0.02323453687131405, -0.019491195678710938, -0.06477868556976318, 0.010723632760345936, -0.05723242461681366, 0.05544515326619148, 0.05048050731420517, 0.02907295897603035, 0.013305247761309147, 0.0021174210123717785, 0.012759136967360973 ]
716,052
pytorch_optimizer.lr_scheduler.cosine_anealing
__init__
null
def __init__( self, optimizer: OPTIMIZER, first_cycle_steps: int, cycle_mult: float = 1.0, max_lr: float = 1e-4, min_lr: float = 1e-6, warmup_steps: int = 0, gamma: float = 0.9, last_epoch: int = -1, ): if warmup_steps >= first_cycle_steps: raise ValueError( f'[-] warmup_steps must be smaller than first_cycle_steps. {warmup_steps} < {first_cycle_steps}' ) self.first_cycle_steps = first_cycle_steps self.cycle_mult = cycle_mult self.base_max_lr = max_lr self.max_lr = max_lr self.min_lr = min_lr self.warmup_steps = warmup_steps self.gamma = gamma self.cur_cycle_steps = first_cycle_steps self.step_in_cycle = last_epoch self.last_epoch = last_epoch self.cycle: int = 0 self.base_lrs: List[float] = [] super().__init__(optimizer, last_epoch) self.init_lr()
(self, optimizer: Type[torch.optim.optimizer.Optimizer], first_cycle_steps: int, cycle_mult: float = 1.0, max_lr: float = 0.0001, min_lr: float = 1e-06, warmup_steps: int = 0, gamma: float = 0.9, last_epoch: int = -1)
[ -0.017530426383018494, -0.037805233150720596, -0.02132028341293335, 0.046038370579481125, -0.06134715676307678, 0.02152564562857151, -0.036405038088560104, -0.043499354273080826, -0.07430361211299896, 0.01617690548300743, 0.009469976648688316, 0.0822940543293953, 0.04222984239459038, 0.06739599257707596, -0.023411240428686142, 0.036012984812259674, -0.012303035706281662, 0.0046579777263104916, -0.026155618950724602, -0.0015098756412044168, -0.008391828276216984, 0.014449999667704105, -0.02357926219701767, 0.10066459327936172, -0.02466207928955555, 0.06989767402410507, -0.012891117483377457, 0.03731983155012131, -0.05817338451743126, -0.013245833106338978, -0.009764017537236214, 0.016671640798449516, -0.0312336552888155, 0.021600322797894478, 0.02201104536652565, -0.04450749233365059, 0.00030425042496062815, 0.02445671707391739, -0.18086768686771393, 0.02328055538237095, 0.03526621311903, -0.027350451797246933, 0.014524676837027073, -0.00782708264887333, -0.0031574368476867676, -0.014225968159735203, 0.02680904231965542, -0.016148900613188744, -0.00008802259981166571, -0.07848552614450455, -0.002337156794965267, -0.03487415984272957, 0.04028823971748352, -0.021450968459248543, -0.002128294436261058, 0.051937852054834366, 0.02595025673508644, 0.01772645302116871, 0.030692247673869133, -0.002870397176593542, -0.049473512917757034, -0.035434234887361526, 0.013787240721285343, 0.02779851295053959, 0.010090729221701622, -0.0437980592250824, -0.10492118448019028, -0.01851056143641472, 0.022645799443125725, 0.043984752148389816, 0.022141730412840843, 0.008737209253013134, 0.02249644696712494, -0.010436111129820347, 0.00014505132276099175, -0.020498836413025856, -0.08610258251428604, -0.052908655256032944, -0.050444312393665314, -0.03205510228872299, 0.017278390005230904, 0.04797997325658798, -0.025184817612171173, -0.04607570916414261, 0.024736756458878517, -0.09805089980363846, -0.04140839725732803, -0.028675967827439308, 0.027555812150239944, -0.014281976036727428, -0.043499354273080826, -0.01297512836754322, -0.01105219591408968, 0.04002687335014343, 0.021861691027879715, 0.04439547657966614, -0.0389440543949604, -0.022384431213140488, -0.0071456553414464, -0.027985205873847008, 0.006188856437802315, -0.014571350067853928, -0.0354902446269989, 0.02320587821304798, -0.0062682004645466805, -0.017409075051546097, -0.02947874553501606, -0.03957881033420563, 0.019434688612818718, -0.046523772180080414, -0.06239263340830803, 0.028227906674146652, -0.02899334579706192, 0.025334171950817108, -0.04626240208745003, 0.03909340873360634, 0.00692629162222147, -0.013348514214158058, 0.020872222259640694, 0.021581653505563736, -0.0015297116478905082, -0.004480619914829731, -0.009143264964222908, 0.10148604214191437, 0.0036755085457116365, -0.039056070148944855, 0.03386601805686951, 0.036012984812259674, -0.007841085083782673, -0.04514224827289581, 0.05634379759430885, -0.023411240428686142, -0.036311689764261246, -0.007799079176038504, 0.0015017078258097172, -0.04854004830121994, 0.01350720226764679, 0.03771188482642174, -0.0762825533747673, -0.02623029612004757, 0.033268604427576065, 0.05343139171600342, 0.018893280997872353, -0.004461950622498989, -0.02406466379761696, 0.04383539780974388, -0.013899256475269794, 0.013647221960127354, 0.012863113544881344, 0.028526613488793373, -0.0023184875026345253, -0.03666640818119049, 0.04600103199481964, 0.014823384582996368, 0.005278730299323797, -0.01804383099079132, -0.04443281516432762, 0.01174295786768198, -0.006837612949311733, 0.050369635224342346, -0.010398772545158863, 0.008872561156749725, -0.008709205314517021, -0.03192441910505295, -0.03804793208837509, 0.011080199852585793, -0.04969754442572594, -0.029217375442385674, -0.024942118674516678, 0.03860801085829735, 0.054103486239910126, -0.0534687303006649, 0.02182435244321823, -0.004053561016917229, 0.005941488780081272, 0.08192066848278046, 0.048091989010572433, 0.021376291289925575, -0.006230862345546484, 0.043760720640420914, 0.012303035706281662, 0.00925528071820736, -0.016419606283307076, -0.10454779863357544, 0.005568103864789009, 0.008881895802915096, 0.00048306683311238885, 0.016680974513292313, 0.01818384975194931, 0.040250904858112335, 0.03662906959652901, 0.013721899129450321, 0.009950710460543633, -0.011145542375743389, 0.007052309345453978, -0.02171233855187893, 0.05078035965561867, 0.008993911556899548, 0.06392351537942886, 0.073743537068367, -0.020816214382648468, 0.07150322943925858, 0.04532893747091293, -0.021488307043910027, 0.011752292513847351, 0.019210658967494965, -0.008629861287772655, 0.037973254919052124, -0.032279133796691895, 0.021955037489533424, -0.03186840936541557, -0.007883090525865555, 0.014758042059838772, 0.02998281642794609, -0.0027910529170185328, -0.032764535397291183, 0.026174288243055344, 0.036610398441553116, 0.024736756458878517, -0.0005256560980342329, 0.04671046510338783, -0.04786795750260353, -0.047307878732681274, -0.045851677656173706, 0.03735717013478279, -0.009329957887530327, 0.03868268430233002, -0.04301395267248154, -0.042192503809928894, 0.03647971525788307, -0.007537709549069405, -0.0937943086028099, -0.00837782584130764, 0.016046220436692238, 0.03834664076566696, 0.04077364131808281, -0.026585012674331665, 0.027481136843562126, -0.059890955686569214, -0.05541033297777176, -0.011173546314239502, 0.005535432603210211, 0.009110594168305397, -0.01597154326736927, -0.000692512490786612, 0.03702112287282944, 0.02309386245906353, 0.029460076242685318, -0.06060038506984711, 0.003334794891998172, -0.007379021029919386, -0.0028493942227214575, 0.014534011483192444, 0.0061561851762235165, -0.02163766138255596, 0.020778875797986984, 0.013367182575166225, -0.004494621884077787, 0.029646769165992737, -0.019434688612818718, -0.0034864824265241623, -0.007766407914459705, -0.05275930091738701, 0.06478229910135269, -0.0424165353178978, 0.009185271337628365, -0.016036884859204292, -0.025390179827809334, -0.04588901624083519, 0.013077809475362301, 0.08617725968360901, 0.03535955771803856, -0.019882751628756523, 0.023336563259363174, 0.0026020267978310585, 0.0045669651590287685, -0.036703746765851974, -0.07419160008430481, -0.0036124999169260263, -0.0006831778446212411, 0.055074285715818405, -0.03274586424231529, -0.012051001191139221, -0.009199272841215134, -0.0077057331800460815, -0.020162789151072502, -0.00418891292065382, 0.0007438529282808304, 0.011136207729578018, -0.020890891551971436, 0.02230975404381752, -0.01464602630585432, 0.06806808710098267, 0.03754386305809021, 0.13292506337165833, 0.030804263427853584, 0.005932154133915901, 0.004872674122452736, -0.02919870615005493, 0.014468668960034847, 0.019602712243795395, -0.0875961184501648, -0.02497945725917816, 0.0031341002322733402, -0.031102970242500305, -0.009320623241364956, -0.019696058705449104, 0.021674999967217445, 0.06739599257707596, 0.021787013858556747, 0.014907396398484707, 0.041221704334020615, 0.022552454844117165, 0.020368151366710663, -0.043088629841804504, -0.09095658361911774, 0.006114179268479347, -0.018239857628941536, 0.03605032339692116, 0.04588901624083519, -0.01887461170554161, 0.058621443808078766, -0.009222609922289848, -0.015560819767415524, -0.02014411985874176, -0.03409004956483841, 0.050369635224342346, 0.015728842467069626, -0.022477777674794197, -0.03379134088754654, -0.03774922341108322, -0.037394508719444275, -0.0011866642162203789, 0.03155103325843811, 0.0254648569971323, -0.0312336552888155, 0.014356653206050396, 0.01636359840631485, 0.015439469367265701, -0.0626913383603096, 0.09521317481994629, 0.031196316704154015, -0.015756847336888313, 0.026080941781401634, 0.0437980592250824, -0.060488369315862656, 0.021768346428871155, -0.041221704334020615, 0.0009976380970329046, -0.013871252536773682, -0.0389440543949604, 0.0009947209618985653, -0.03259650990366936, 0.022664468735456467, 0.044059429317712784, 0.025894248858094215, -0.03864534571766853, -0.05611976608633995, 0.030038822442293167, -0.0534687303006649, 0.018659915775060654, 0.03332461044192314, -0.052908655256032944, 0.04865206405520439, 0.05544767156243324, -0.01218168530613184, -0.035527583211660385, -0.039354778826236725, 0.03214844688773155, -0.002462007338181138, -0.018239857628941536, -0.011780296452343464, 0.006109511945396662, 0.002062952145934105, -0.0221230611205101, 0.006422222126275301, -0.03416472673416138, 0.01592487096786499, 0.03114030882716179, 0.03382867947220802, 0.049286819994449615, -0.005059366580098867, -0.002348825102671981, -0.014347318559885025, 0.02328055538237095, -0.019621381536126137, 0.007290342357009649, -0.020704198628664017, 0.0908072292804718, -0.007281007710844278, 0.013628552667796612, -0.008191133849322796, -0.00791576225310564, -0.008993911556899548, -0.0027560479938983917, 0.03496750444173813, 0.06082441657781601, 0.0698229968547821, -0.03352997452020645, -0.027761174365878105, 0.004083898384124041, -0.018445219844579697, 0.009511983022093773, 0.039653487503528595, 0.002097957069054246, -0.05436485633254051, 0.0684414729475975, 0.03745051473379135, 0.0029590760823339224, 0.09730412811040878, 0.003190108109265566, -0.02357926219701767, -0.014039276167750359, 0.01673698239028454, -0.052721962332725525, -0.02417667955160141, -0.039765503257513046, -0.05204986780881882, 0.01917332038283348, 0.01846388913691044, 0.017045024782419205, 0.07811214029788971, 0.028843991458415985, 0.01730639487504959, 0.03487415984272957, -0.006062838714569807, -0.0015145429642871022, -0.03412738814949989, -0.012592408806085587, -0.02889999933540821, -0.02919870615005493, 0.03235381096601486, -0.017175709828734398, -0.0005912901251576841, 0.005395413376390934, 0.004424612037837505, -0.03455678001046181, 0.05671717971563339, 0.020106783136725426, -0.03860801085829735, 0.026118280366063118, -0.06877751648426056, 0.03212977945804596, -0.006151517853140831, -0.0440220907330513, -0.01036143396049738, -0.004445615224540234, 0.008587854914367199, -0.07833617180585861, 0.02723843604326248, -0.009838694706559181, 0.015318119898438454, -0.006907622329890728, -0.01813717558979988, 0.04208048805594444, -0.024438047781586647, -0.02563288062810898, 0.037189144641160965, 0.034836821258068085, -0.03901873156428337, 0.02230975404381752, 0.02731311321258545, 0.027761174365878105, -0.02357926219701767, -0.038383979350328445, 0.0361810065805912, 0.02602493390440941, 0.06373681873083115, -0.0017957484815269709, 0.0014655360719189048, -0.010202744975686073, 0.01297512836754322, 0.014795380644500256, -0.03823462501168251, 0.002527349628508091, -0.016540955752134323, -0.04420878365635872, -0.03046821616590023, 0.04812932759523392, -0.03535955771803856, 0.0218990296125412, -0.02733178250491619, 0.08557984232902527, 0.00530673423781991, -0.005003359168767929, 0.03382867947220802, -0.03890671581029892, -0.02369127795100212, -0.01204166654497385, 0.03535955771803856, -0.055671703070402145, 0.034258075058460236, -0.008737209253013134, 0.039466794580221176, -0.023859301581978798, -0.02456873282790184, 0.01887461170554161, 0.02309386245906353, 0.0719139501452446, 0.023075193166732788, 0.028619959950447083, 0.008751210756599903, -0.024008655920624733, -0.03171905502676964, 0.042005810886621475, -0.001777079189196229, -0.0698229968547821, -0.03214844688773155, -0.06859082728624344, 0.03352997452020645, 0.030300192534923553, -0.02802254445850849, -0.026697028428316116, 0.023560592904686928, -0.04215516522526741, -0.010193410329520702, -0.04159509018063545, 0.0493241585791111, 0.036311689764261246, 0.012667085975408554, 0.01882793940603733, 0.06810542196035385, 0.002110792091116309, -0.04069896414875984, 0.002753714332357049, -0.010557460598647594, -0.0037921913899481297, -0.048988111317157745, 0.06373681873083115, 0.020088113844394684, -0.0049286819994449615, -0.05496227368712425, -0.029609430581331253, 0.07019638270139694, 0.02468074858188629, 0.004256588872522116, 0.00924127921462059, -0.006072173360735178, -0.01139757689088583, -0.04301395267248154, 0.011854973621666431, 0.02357926219701767, 0.044283460825681686, -0.015038080513477325, -0.03323126584291458, -0.007267005741596222, 0.005554101895540953, 0.10477183014154434, -0.03644237667322159, 0.018641246482729912, 0.0007981104427017272, -0.033959366381168365, -0.07325813919305801, 0.020853552967309952, -0.018221188336610794, -0.001959104323759675, 0.02770516648888588, 0.042192503809928894, 0.06179521605372429, 0.04551563039422035, -0.037282492965459824, -0.0088165532797575, 0.00992270652204752, -0.017409075051546097, -0.036498382687568665, -0.007943766191601753, 0.005824806168675423, 0.020778875797986984, -0.030505554750561714, 0.03752519190311432, 0.018501225858926773, -0.04992157593369484, -0.03005749173462391, 0.014954069629311562, -0.08289147168397903, 0.0018342537805438042, -0.013255167752504349, 0.034743472933769226, 0.01769844815135002, -0.036498382687568665, 0.040922995656728745, -0.009614664129912853, -0.005274062976241112, -0.07008436322212219, 0.006697593256831169, 0.029142700135707855, -0.029142700135707855, -0.001658062799833715, -0.054700903594493866, -0.03901873156428337, 0.01125755812972784, 0.041221704334020615, -0.07430361211299896, -0.023448577150702477, -0.03627435117959976, 0.004788662772625685, -0.025072801858186722, -0.02468074858188629, 0.0109495148062706, 0.050257619470357895, -0.0937943086028099, 0.04641175642609596, 0.004100234247744083, 0.03455678001046181, 0.0029824126977473497, -0.001256673946045339, -0.0008955405792221427, 0.01797848753631115, -0.007005636114627123, -0.042192503809928894, -0.01385258324444294, 0.02359793148934841, 0.013693895190954208, 0.01484205387532711, -0.04749457165598869, -0.011080199852585793, -0.027761174365878105, -0.0010215580696240067, 0.048316020518541336, -0.008466504514217377, -0.007976436987519264, 0.002770049963146448, -0.027779843658208847, 0.004648643080145121, -0.06832945346832275, 0.011724288575351238, 0.04671046510338783, -0.07243669033050537, 0.04626240208745003, -0.026603681966662407, 0.02210439182817936, 0.013152486644685268, -0.005782800260931253, -0.044582169502973557, 0.009782686829566956, -0.005437419284135103, -0.0010921511566266418, 0.03461278975009918, 0.04312596842646599, -0.023728616535663605, -0.003983551170676947, 0.06261666119098663, -0.0003905957273673266, 0.015140761621296406, -0.03201776370406151, -0.037581201642751694, 0.016130231320858, 0.05216188356280327, 0.07053242623806, 0.05373010039329529, -0.000009981849871110171, 0.04491821676492691, -0.00012069378135493025, 0.029236044734716415, -0.028937337920069695, -0.01917332038283348, 0.005316068883985281, 0.003955547232180834, 0.06481963396072388, -0.06082441657781601, 0.002285816241055727, 0.011789631098508835, 0.04017622768878937, -0.017894476652145386, 0.017661111429333687, 0.01592487096786499, -0.002980079036206007, -0.01655028946697712, -0.006492231506854296, 0.01464602630585432, -0.05641847476363182, -0.0613098181784153, -0.021787013858556747, 0.007789744529873133, -0.007089647464454174, 0.007528374902904034, -0.006179521791636944, -0.05126576125621796, 0.0254648569971323, -0.0049286819994449615, -0.004625306464731693, 0.03442609682679176, -0.047905296087265015, -0.025222156196832657, -0.011481588706374168, -0.010800161398947239, -0.07430361211299896, 0.03274586424231529, 0.012863113544881344, -0.014823384582996368, -0.05160180851817131, 0.05126576125621796, 0.0038388646207749844, -0.002405999694019556, 0.005946156103163958, -0.015747511759400368, -0.06818009912967682, -0.057837337255477905, 0.021768346428871155, -0.05126576125621796, 0.03151369467377663, -0.0040628956630826, -0.07322079688310623, 0.058808136731386185, 0.0028820654843002558, 0.026192957535386086, 0.007677729241549969, -0.003780523082241416, 0.023952648043632507, -0.0109495148062706, 0.06608914583921432, 0.04734521731734276, 0.027499806135892868, -0.017549095675349236, 0.014459334313869476, -0.013871252536773682, 0.012676420621573925, -0.008923901244997978, -0.04835335910320282, 0.01538346242159605, -0.004783995449542999, -0.0060348352417349815, -0.009175936691462994, 0.01664363592863083, 0.004730321001261473, -0.027089081704616547, 0.010109398514032364, 0.008531847037374973, 0.03422073647379875, -0.031681716442108154, 0.006786272395402193, 0.04559030756354332, -0.030542893335223198, -0.030412208288908005, 0.01682099513709545, -0.036106329411268234, -0.0017794128507375717, 0.004506290424615145, 0.029814792796969414, 0.07071911543607712, -0.03588229790329933, -0.01282577496021986, -0.04566498473286629, 0.011780296452343464, -0.01984541304409504, 0.011192215606570244, 0.007159657310694456, 0.0016662306152284145, 0.05817338451743126, -0.03801059350371361, -0.023224547505378723, -0.02654767408967018, 0.041707105934619904, 0.040250904858112335, 0.014804715290665627, -0.08647596836090088, -0.014702034182846546, -0.008121123537421227, -0.0024013323709368706, -0.08647596836090088, -0.020909560844302177, -0.08692403137683868, 0.08819353580474854, 0.0021469637285917997, -0.001435198588296771, 0.03597564622759819, 0.05806136876344681, 0.0034281411208212376 ]
716,055
pytorch_optimizer.lr_scheduler.cosine_anealing
get_lr
null
def get_lr(self) -> List[float]: if self.step_in_cycle == -1: return self.base_lrs if self.step_in_cycle < self.warmup_steps: return [ (self.max_lr - base_lr) * self.step_in_cycle / self.warmup_steps + base_lr for base_lr in self.base_lrs ] return [ base_lr + (self.max_lr - base_lr) * ( 1 + math.cos( math.pi * (self.step_in_cycle - self.warmup_steps) / (self.cur_cycle_steps - self.warmup_steps) ) ) / 2.0 for base_lr in self.base_lrs ]
(self) -> List[float]
[ -0.0021286236587911844, -0.025372175499796867, -0.012991665862500668, 0.039965808391571045, 0.019001351669430733, 0.055337272584438324, 0.018121659755706787, -0.050707314163446426, -0.018019801005721092, 0.0717458501458168, 0.005907827988266945, -0.024853620678186417, 0.06696773320436478, 0.05355936661362648, 0.0052272239699959755, 0.0074820141308009624, -0.026501886546611786, 0.009778473526239395, -0.04133627563714981, -0.030205853283405304, 0.013538001105189323, 0.04818861559033394, -0.015778901055455208, 0.00327106611803174, -0.06204145401716232, 0.04159555211663246, 0.002162190852686763, -0.0012628213735297322, -0.06589357554912567, 0.010084050707519054, -0.025816652923822403, 0.03429873660206795, -0.009463636204600334, -0.06326375901699066, -0.007917230017483234, -0.01669563353061676, 0.006838449742645025, 0.0018010541098192334, -0.08348742127418518, 0.018149439245462418, 0.038521260023117065, -0.014741790480911732, -0.0030094734393060207, 0.032539352774620056, -0.04933684691786766, -0.04278082400560379, -0.0412621945142746, -0.028909465298056602, 0.03720635175704956, -0.06444903463125229, 0.04159555211663246, 0.0023196095135062933, 0.0019874100107699633, -0.027205640450119972, 0.043373458087444305, 0.022983117029070854, -0.019519908353686333, -0.022223804146051407, 0.0260574109852314, 0.014593631029129028, 0.04155851528048515, -0.06770852208137512, -0.011760096065700054, 0.019334709271788597, 0.07259775698184967, -0.027872353792190552, -0.014686230570077896, 0.01640857569873333, 0.012010114267468452, 0.033465344458818436, -0.0130287054926157, -0.013010185211896896, 0.015139966271817684, -0.019390268251299858, 0.006764370482414961, 0.019890304654836655, 0.02631668746471405, -0.027927914634346962, 0.016223376616835594, -0.06415271759033203, -0.00034348509507253766, 0.06022650748491287, 0.02683524414896965, -0.0050003561191260815, -0.01725122705101967, -0.08504308760166168, -0.046410709619522095, -0.015964100137352943, -0.03524325042963028, 0.014362133108079433, -0.023205354809761047, -0.007218106184154749, -0.0027756604831665754, 0.033817220479249954, -0.04133627563714981, 0.01525108516216278, -0.09585867822170258, -0.002040654420852661, 0.03209487721323967, -0.02564997412264347, 0.03522472828626633, 0.058596763759851456, -0.03574328497052193, 0.08415413647890091, 0.022001566365361214, 0.0026714864652603865, -0.0407806821167469, -0.032076358795166016, 0.017945721745491028, 0.04144739359617233, -0.028650186955928802, 0.05878196284174919, -0.03244675323367119, 0.03185411915183067, -0.08682099729776382, 0.008718213066458702, -0.004792007617652416, 0.047299664467573166, -0.004291972145438194, 0.0629674419760704, 0.014871428720653057, 0.0028057552408427, 0.0031622620299458504, 0.022112684324383736, -0.010102570988237858, 0.004660054109990597, -0.00035795371513813734, 0.019779184833168983, -0.06011538952589035, 0.004898496903479099, 0.048781249672174454, 0.019723625853657722, -0.026557445526123047, -0.02822423167526722, -0.01776978373527527, -0.028001993894577026, 0.049040526151657104, 0.014769569970667362, 0.03050217032432556, -0.007472753990441561, 0.0020557017996907234, 0.051929622888565063, 0.050596192479133606, 0.006782890297472477, 0.029557660222053528, 0.06904195249080658, 0.0392250157892704, 0.1207493394613266, 0.021334851160645485, 0.006069876719266176, -0.004032694268971682, -0.007880190387368202, 0.0655231848359108, 0.015130707062780857, 0.030002135783433914, -0.0022698375396430492, -0.04463280737400055, 0.017862383276224136, -0.007190326694399118, -0.0015591387636959553, -0.0454106405377388, -0.028446469455957413, -0.044151291251182556, -0.07348671555519104, 0.01000997144728899, 0.007153287064284086, -0.017112329602241516, -0.012121233157813549, -0.018047580495476723, 0.03385426104068756, 0.01411211583763361, -0.07926490157842636, -0.006528242491185665, 0.02068665809929371, 0.030261414125561714, 0.049003489315509796, -0.01992734521627426, 0.033724620938301086, -0.01788090169429779, 0.07570908963680267, 0.030150294303894043, -0.02926134131848812, 0.001544091384857893, -0.10600754618644714, -0.005801338702440262, 0.04452168941497803, -0.0015035792021080852, -0.01681601256132126, -0.03324310854077339, 0.02611296996474266, 0.009204358793795109, -0.007671842351555824, 0.0005200022715143859, -0.03209487721323967, -0.028446469455957413, 0.00114822993054986, -0.009759954176843166, 0.04418833181262016, 0.023038677871227264, -0.034335777163505554, -0.0018242038786411285, 0.029094664379954338, -0.024501744657754898, 0.006222665309906006, -0.04422536864876747, -0.013575040735304356, -0.05641142278909683, 0.008352446369826794, 0.000831656449008733, 0.03139112517237663, 0.020408859476447105, 0.021371891722083092, -0.00006427685730159283, -0.027279719710350037, -0.006643991451710463, -0.01078780461102724, -0.05044803395867348, 0.004567454569041729, 0.021242253482341766, 0.0052503738552331924, 0.036410000175237656, -0.07496830075979233, -0.0008223964832723141, -0.023557232692837715, -0.0004178538220003247, -0.008528384380042553, -0.010500747710466385, -0.04070660099387169, -0.05292969197034836, 0.027576036751270294, -0.007153287064284086, -0.07426454871892929, -0.017464205622673035, -0.008329296484589577, 0.03139112517237663, 0.06263408809900284, -0.007204216439276934, 0.07467198371887207, -0.03290975093841553, 0.0180568415671587, -0.05526319146156311, 0.0237424299120903, 0.02059405855834484, 0.019427308812737465, 0.005449461750686169, 0.044669847935438156, 0.02853906899690628, 0.02192748710513115, -0.06770852208137512, 0.03215043619275093, -0.0179364625364542, -0.002833534963428974, 0.03489137068390846, 0.004220207687467337, 0.03646555915474892, -0.0071671768091619015, 0.009259918704628944, 0.020445900037884712, 0.017899421975016594, -0.010130350477993488, 0.0459291934967041, -0.030557731166481972, -0.023038677871227264, -0.01047296728938818, -0.07393118739128113, 0.025501815602183342, -0.02183488756418228, -0.0050188759341835976, -0.03239119425415993, 0.04366977512836456, 0.1223049983382225, -0.016158558428287506, -0.06919010728597641, -0.01970510557293892, 0.026131490245461464, 0.04007692635059357, 0.03618776053190231, 0.018788374960422516, 0.013565780594944954, 0.033928342163562775, 0.001407507574185729, -0.029390981420874596, -0.01886245422065258, -0.01756606437265873, -0.05196666345000267, -0.025575894862413406, -0.003817401360720396, -0.03261343389749527, 0.004187798127532005, 0.026038890704512596, 0.04885533079504967, -0.013176864013075829, -0.0017362346407026052, 0.023816509172320366, 0.15452951192855835, -0.004382256418466568, 0.02337203361093998, -0.03420613706111908, 0.019130991771817207, 0.022075645625591278, 0.028131632134318352, -0.04504024237394333, 0.05763373151421547, 0.015788160264492035, -0.03039105236530304, -0.046669989824295044, 0.022001566365361214, -0.04000284895300865, 0.009121019393205643, -0.02383502945303917, -0.026557445526123047, 0.06622693687677383, 0.03390982002019882, -0.05733741447329521, -0.0012894435785710812, -0.044669847935438156, -0.025057340040802956, 0.04315121844410896, 0.019742146134376526, 0.010741505771875381, -0.023816509172320366, 0.04526248201727867, 0.001607753336429596, 0.02807607315480709, 0.01724196784198284, 0.020297741517424583, 0.025168457999825478, 0.006032836623489857, 0.003991025034338236, -0.03231711685657501, -0.0036646127700805664, -0.0835615023970604, -0.03472469374537468, 0.03290975093841553, 0.04029916599392891, -0.04511432349681854, 0.06870859116315842, 0.0448920838534832, 0.02403874881565571, -0.0448920838534832, 0.03553956747055054, -0.022779399529099464, -0.015241825953125954, 0.04241042584180832, 0.033780183643102646, -0.006764370482414961, 0.07244960218667984, 0.043892014771699905, 0.01571408100426197, 0.031076285988092422, -0.01849205791950226, -0.035169169306755066, -0.047966375946998596, 0.014593631029129028, -0.014815869741141796, 0.013973216526210308, -0.07263480126857758, -0.031242964789271355, 0.023649832233786583, 0.002801125403493643, -0.008824702352285385, 0.004782747942954302, -0.03757674992084503, 0.06055986508727074, -0.007509793620556593, 0.005092955194413662, -0.026816723868250847, -0.025464775040745735, 0.025575894862413406, 0.03053921088576317, -0.048484932631254196, 0.005755039397627115, -0.006907898932695389, -0.007190326694399118, -0.041521474719047546, -0.0128990663215518, 0.03187263756990433, -0.03605812042951584, 0.01305648498237133, 0.020038463175296783, 0.002900669351220131, 0.0030766078270971775, 0.0030418832320719957, 0.013926917687058449, 0.054003842175006866, 0.02013106271624565, 0.01488994900137186, -0.06100434064865112, 0.03226155415177345, -0.013380582444369793, 0.010222950018942356, -0.035317327827215195, -0.012880546040832996, -0.004613754339516163, -0.07541277259588242, -0.007676472421735525, 0.03442837670445442, 0.06015243008732796, 0.027261199429631233, -0.021334851160645485, -0.003722487250342965, 0.0242609865963459, -0.008630244061350822, -0.0007714669336564839, -0.05022579804062843, -0.014778830111026764, 0.049966517835855484, 0.04841085150837898, -0.023872070014476776, -0.013176864013075829, -0.0454106405377388, 0.029446540400385857, 0.04307714104652405, -0.020408859476447105, 0.0016378480941057205, 0.0008304989314638078, -0.05174442380666733, -0.01614929735660553, 0.014186195097863674, 0.030613290145993233, 0.011037822812795639, -0.0009398817201144993, -0.006116176024079323, 0.03787306696176529, 0.036761876195669174, 0.022890517488121986, 0.027668636292219162, 0.0227053202688694, -0.04759598150849342, -0.017297526821494102, 0.01583446003496647, 0.02466842345893383, -0.012426810339093208, -0.06511574238538742, -0.012945366092026234, -0.03435429558157921, -0.012760167941451073, 0.05026283860206604, -0.03415057808160782, -0.05748557299375534, 0.048262692987918854, 0.003620628034695983, 0.04681814834475517, 0.025112899020314217, 0.01364911999553442, -0.009991452097892761, -0.07511645555496216, -0.020908895879983902, -0.05815228819847107, -0.03333570435643196, -0.04804045706987381, -0.010185910388827324, 0.041669633239507675, 0.0369100347161293, 0.009565495885908604, 0.049966517835855484, -0.06026354804635048, -0.05044803395867348, -0.019538428634405136, -0.03240971267223358, 0.07859818637371063, 0.061745136976242065, 0.02352019213140011, 0.0019144881516695023, -0.0012906010961160064, -0.025761092081665993, 0.04359569400548935, 0.012028633616864681, -0.027779754251241684, 0.0022108054254204035, 0.0257981326431036, 0.025372175499796867, 0.044447608292102814, -0.07682028412818909, 0.022020086646080017, 0.026020370423793793, -0.024779541417956352, -0.022464562207460403, 0.03522472828626633, -0.08585796505212784, -0.06837523728609085, -0.08733955025672913, 0.02822423167526722, -0.016075218096375465, -0.020982975140213966, 0.007185696624219418, -0.08393190056085587, 0.021742288023233414, -0.006954198703169823, -0.03255787119269371, -0.04648479074239731, 0.0320022776722908, -0.020445900037884712, 0.02135337144136429, -0.06385640054941177, -0.02559441514313221, 0.10393332690000534, -0.007088467478752136, 0.08541348576545715, 0.0800056979060173, 0.04722558334469795, -0.039706528186798096, 0.01846427656710148, 0.028205711394548416, 0.0066254716366529465, 0.001407507574185729, -0.023501673713326454, -0.04752190038561821, -0.04029916599392891, 0.044706884771585464, 0.017945721745491028, 0.005509651266038418, -0.008403375744819641, 0.009449746459722519, -0.06022650748491287, -0.0273537989705801, -0.04529952257871628, 0.04774414002895355, 0.042225226759910583, 0.020297741517424583, -0.03246527537703514, 0.021538570523262024, -0.014251014217734337, -0.05774484947323799, 0.015788160264492035, 0.0443735271692276, -0.0681159570813179, -0.06259705126285553, -0.017436426132917404, 0.016964171081781387, 0.008074648678302765, -0.04504024237394333, 0.0023126646410673857, -0.003164577065035701, -0.030928127467632294, 0.05852268263697624, -0.03033549338579178, -0.08363558351993561, -0.03163187950849533, -0.035465486347675323, 0.01579742133617401, -0.03822494298219681, 0.0531519316136837, 0.03316902741789818, 0.014047295786440372, -0.029687298461794853, -0.008764512836933136, 0.07107913494110107, 0.01629745587706566, -0.0006453005480580032, 0.05718925595283508, -0.012630528770387173, -0.05237409844994545, -0.06463423371315002, 0.02455730363726616, -0.02022366225719452, 0.004687833599746227, 0.01762162521481514, -0.0027501957956701517, 0.002900669351220131, 0.004423926118761301, -0.046151433140039444, 0.013269462622702122, -0.055337272584438324, -0.04622551426291466, -0.029298381879925728, 0.010667425580322742, 0.048892367631196976, -0.024853620678186417, -0.003416909836232662, -0.005037395749241114, -0.004541989881545305, 0.0010527370031923056, -0.05407792329788208, 0.032076358795166016, -0.03452097624540329, 0.04607735574245453, -0.0335579439997673, -0.03342830389738083, -0.0753016546368599, 0.006722700782120228, -0.012732387520372868, 0.004296602215617895, -0.05026283860206604, 0.011130422353744507, 0.03137260302901268, -0.042854901403188705, 0.04607735574245453, -0.014260274358093739, -0.019982904195785522, -0.007162546738982201, 0.022927558049559593, -0.023242395371198654, -0.020445900037884712, -0.024020228534936905, -0.00983403343707323, -0.033409785479307175, -0.007926490157842636, -0.024335065856575966, 0.07770923525094986, 0.026742644608020782, 0.009347887709736824, 0.00009874835086520761, 0.022816438227891922, -0.01863095536828041, -0.03778046742081642, 0.021908966824412346, -0.05444832146167755, -0.0480034165084362, -0.018149439245462418, 0.0004470804415177554, 0.016714151948690414, 0.04326234012842178, -0.03405797854065895, 0.03776194900274277, -0.017167888581752777, -0.0015510363737121224, -0.0019063856452703476, 0.05392976477742195, 0.0257981326431036, 0.018853193148970604, -0.03039105236530304, 0.03479877486824989, -0.022575680166482925, -0.009889592416584492, 0.007894080132246017, -0.00009925475023919716, -0.02166820876300335, 0.05918939784169197, -0.04344753548502922, 0.015362204983830452, 0.005051285494118929, 0.004764228127896786, -0.06459718942642212, 0.0196125078946352, 0.0722273662686348, 0.00697734858840704, -0.029224302619695663, 0.022816438227891922, -0.03720635175704956, 0.015130707062780857, 0.06159697845578194, -0.029557660222053528, -0.0242609865963459, -0.017464205622673035, -0.029742857441306114, -0.024983258917927742, 0.03911389410495758, 0.06518982350826263, 0.05748557299375534, -0.0255388543009758, 0.013482441194355488, 0.03952133283019066, 0.022686799988150597, -0.029483580961823463, -0.029594698920845985, 0.007769071497023106, 0.058189328759908676, 0.029187262058258057, -0.06648621708154678, -0.07333855330944061, 0.017204929143190384, 0.014065816067159176, -0.004898496903479099, -0.00901453010737896, -0.02120521292090416, -0.010195170529186726, 0.03566920384764671, -0.010769285261631012, -0.04618847370147705, 0.004220207687467337, -0.024390624836087227, -0.018843933939933777, 0.055596549063920975, -0.002527957782149315, 0.052188899368047714, -0.05011468008160591, -0.04433649033308029, 0.09096943587064743, 0.004127608612179756, -0.028353869915008545, 0.01227865181863308, -0.06315264105796814, 0.0054772417061030865, 0.02781679481267929, 0.020149582996964455, 0.016741933301091194, 0.044447608292102814, 0.01846427656710148, 0.06567133963108063, -0.037132274359464645, 0.025575894862413406, -0.0021841833367943764, 0.01733456738293171, 0.049040526151657104, 0.020668137818574905, -0.023983187973499298, -0.0012894435785710812, 0.01914951205253601, -0.009556235745549202, 0.01178787648677826, -0.005370752885937691, -0.035521045327186584, 0.04674406722187996, -0.00044823792995885015, 0.006708811037242413, 0.06970866769552231, -0.014325093477964401, -0.07167176902294159, 0.03522472828626633, 0.06493055075407028, 0.021445970982313156, 0.005949497688561678, -0.02966877818107605, -0.004048899281769991, -0.07152360677719116, -0.004048899281769991, -0.027205640450119972, -0.05067027360200882, 0.024168387055397034, -0.009713654406368732, 0.005398532375693321, 0.051003631204366684, 0.03566920384764671, -0.033465344458818436, 0.025668494403362274, 0.01819573901593685, 0.047855257987976074, -0.05252225697040558, -0.011121162213385105, -0.0325208343565464, 0.04189186915755272, -0.00017029567970894277, -0.017371606081724167, 0.028001993894577026, -0.020908895879983902, 0.016334496438503265, 0.0307058896869421, -0.021186692640185356, -0.016362275928258896, -0.0081302085891366, -0.0110933817923069, -0.0030048436019569635, 0.021594129502773285, -0.005370752885937691, 0.023038677871227264, -0.018732814118266106, -0.023001637309789658, 0.033057909458875656, -0.06278225034475327, 0.04926276579499245, -0.021705249324440956, -0.004421610850840807, -0.017353087663650513, -0.023557232692837715, -0.06670845299959183, 0.014612151309847832, -0.05496687442064285, -0.02657596580684185, -0.016528954729437828, 0.00620414549484849, -0.05133698880672455, 0.005208704154938459, 0.06633805483579636, 0.0019422678742557764, 0.016806751489639282, -0.04085475951433182, -0.0074357143603265285 ]
716,056
pytorch_optimizer.lr_scheduler.cosine_anealing
init_lr
null
def init_lr(self): self.base_lrs = [] for param_group in self.optimizer.param_groups: param_group['lr'] = self.min_lr self.base_lrs.append(self.min_lr)
(self)
[ -0.04225725680589676, 0.006044051144272089, -0.024324867874383926, 0.03935834392905235, -0.033616259694099426, 0.04541632905602455, 0.01778372749686241, -0.07135789841413498, -0.013825593516230583, 0.04262891411781311, -0.040510475635528564, -0.0013170549646019936, 0.038986686617136, 0.06154618784785271, -0.004687508102506399, 0.012366844341158867, -0.01249692402780056, 0.0207383893430233, -0.02577432431280613, -0.03621784970164299, -0.009342496283352375, 0.02436203323304653, -0.018945151939988136, 0.06195501238107681, -0.022856827825307846, 0.053258266299963, -0.027260947972536087, -0.022503754124045372, -0.008348316885530949, 0.0035562808625400066, -0.026350392028689384, -0.00362828909419477, -0.010610771365463734, -0.02848741225898266, -0.005184597335755825, -0.048166584223508835, -0.01002541370689869, 0.004661956802010536, -0.07403381913900375, 0.03049435280263424, 0.07596643269062042, -0.024863768368959427, -0.015860408544540405, -0.006773425731807947, -0.00202668528072536, 0.01505205687135458, 0.00990462489426136, -0.012970784679055214, 0.07329051196575165, -0.03768588975071907, 0.014921978116035461, -0.004873335827142, -0.00009001036960398778, -0.006736260373145342, -0.025272589176893234, -0.010043996386229992, -0.005467984825372696, -0.015228593721985817, 0.025123927742242813, -0.02244800701737404, 0.03317027539014816, -0.05612001568078995, -0.07091191411018372, 0.0035678951535373926, 0.016269229352474213, -0.06098870560526848, -0.08399419486522675, 0.018434124067425728, 0.0076421708799898624, 0.03302161023020744, -0.02516109310090542, -0.02274533174932003, -0.010870929807424545, -0.012840705923736095, -0.015079931356012821, 0.048166584223508835, -0.036701004952192307, -0.051957473158836365, -0.010443526320159435, -0.027298113331198692, -0.00022255790827330202, 0.0719153881072998, 0.00874320138245821, 0.019549092277884483, -0.006034759804606438, -0.08198725432157516, -0.03584619611501694, -0.0461224764585495, 0.02939796820282936, -0.07990597933530807, -0.01672450825572014, 0.015878990292549133, 0.020626893267035484, 0.04366954788565636, 0.026276059448719025, 0.03606918826699257, -0.06414777785539627, 0.012915036641061306, -0.018991608172655106, -0.05415023863315582, -0.04868689924478531, -0.032073888927698135, -0.03211105614900589, 0.03677533566951752, 0.018991608172655106, -0.01856420375406742, 0.00477577606216073, -0.05901893228292465, 0.00634602177888155, 0.042591746896505356, -0.05441039800643921, 0.026443306356668472, -0.018945151939988136, 0.057309314608573914, -0.045007508248090744, 0.010387777350842953, -0.030066948384046555, 0.028840484097599983, 0.036626674234867096, 0.043595217168331146, 0.005212471820414066, 0.021871939301490784, -0.018285462632775307, 0.01885223761200905, -0.0005929070175625384, -0.012989368289709091, 0.04277757555246353, 0.07436831295490265, 0.020310984924435616, -0.06552290916442871, 0.038094714283943176, -0.02947229892015457, -0.08310221880674362, -0.055451035499572754, -0.014132209122180939, -0.09759679436683655, 0.015302924439311028, 0.032612789422273636, 0.0020046180579811335, -0.012915036641061306, -0.0010586380958557129, 0.06927663087844849, 0.03917251527309418, -0.008320442400872707, 0.008469104766845703, 0.05221762880682945, 0.033467598259449005, 0.09001501649618149, -0.02832016721367836, -0.01551662664860487, 0.013277401216328144, -0.005667749792337418, 0.036701004952192307, -0.012273930944502354, 0.007131144404411316, 0.01927034929394722, -0.033932168036699295, -0.011354082264006138, -0.009212416596710682, -0.04563932493329048, -0.02516109310090542, -0.0170682892203331, -0.05742081254720688, -0.08377119898796082, 0.009426118806004524, -0.015813952311873436, -0.007233349606394768, -0.027260947972536087, -0.04526766762137413, 0.02335856296122074, 0.00009175251034321263, -0.10324596613645554, 0.02190910466015339, 0.029286472126841545, 0.020775554701685905, 0.0865214541554451, -0.02027381956577301, -0.006494684144854546, -0.030234193429350853, 0.0715065598487854, 0.04192276671528816, 0.008250757120549679, 0.034229494631290436, -0.05916759371757507, -0.043297894299030304, -0.004738610703498125, -0.03655233979225159, -0.012682751752436161, -0.040510475635528564, 0.036403678357601166, 0.04188559949398041, 0.0005153819802217185, -0.02281966246664524, -0.048315245658159256, -0.02413903921842575, 0.04850107431411743, 0.006740905810147524, 0.019307514652609825, 0.0332631878554821, 0.015498043969273567, 0.015618831850588322, 0.033783506602048874, -0.0035307295620441437, 0.015135679394006729, -0.0037560458295047283, 0.021723277866840363, -0.07206404954195023, 0.02995545230805874, -0.018415542319417, 0.02739102765917778, 0.024622192606329918, 0.00990462489426136, 0.012273930944502354, 0.024473529309034348, 0.00497089559212327, 0.0057420809753239155, -0.05069384351372719, 0.039432674646377563, 0.0439668744802475, 0.011939440853893757, 0.009913916699588299, -0.07641241699457169, 0.010378486476838589, -0.05314676836133003, -0.011168254539370537, 0.014457408338785172, 0.018350502476096153, -0.08823107182979584, -0.06451943516731262, 0.05820128694176674, 0.02421337179839611, -0.10376627743244171, -0.015330798923969269, -0.058833103626966476, 0.036162104457616806, 0.07020577043294907, 0.031219081953167915, 0.03987865895032883, -0.04660562798380852, -0.0047246734611690044, -0.03421090915799141, 0.033839255571365356, -0.002120760502293706, -0.002392533700913191, -0.046159643679857254, 0.0643707737326622, 0.04355805367231369, 0.005189243238419294, -0.032073888927698135, 0.016074109822511673, -0.0052960943430662155, 0.003663131734356284, -0.011289043352007866, 0.02908206172287464, -0.015730328857898712, -0.017867349088191986, 0.022485172376036644, 0.03257562592625618, 0.0032148221507668495, -0.04117945581674576, 0.014262288808822632, 0.009895334020256996, -0.07960865646600723, 0.029379386454820633, -0.03125624731183052, 0.0650397539138794, 0.02049681358039379, 0.024027543142437935, 0.003026671474799514, -0.02482660301029682, 0.1365463137626648, 0.04850107431411743, -0.037815969437360764, 0.011902274563908577, 0.03920967876911163, 0.03917251527309418, -0.049021393060684204, -0.016956793144345284, -0.01856420375406742, 0.014457408338785172, 0.096556156873703, 0.0007421500631608069, -0.012013771571218967, -0.019995078444480896, -0.0014053232735022902, -0.006559723522514105, -0.015878990292549133, -0.01562812365591526, -0.054336067289114, -0.018740739673376083, -0.009570134803652763, 0.01442953385412693, 0.027799848467111588, 0.03203672543168068, 0.09402889758348465, 0.0156559981405735, 0.027223782613873482, 0.038875188678503036, 0.003639903385192156, 0.057755302637815475, -0.0026782441418617964, -0.02599731832742691, 0.04727460816502571, 0.018211130052804947, -0.0246779415756464, -0.056751832365989685, -0.003565572202205658, -0.015488753095269203, 0.023154152557253838, -0.010815181769430637, 0.009347141720354557, 0.07132073491811752, 0.027223782613873482, -0.05318393558263779, 0.01678025722503662, -0.07592926919460297, 0.003442461136728525, -0.010555022396147251, 0.02166752889752388, 0.04296340420842171, -0.03274286910891533, -0.013026533648371696, -0.03356051445007324, -0.017523568123579025, -0.00036526788608171046, -0.0079116215929389, 0.05121415853500366, 0.010852347128093243, -0.04411553591489792, -0.02005082741379738, -0.040510475635528564, -0.060468386858701706, -0.011744321323931217, 0.023154152557253838, -0.0019337711855769157, -0.009314621798694134, 0.008459813892841339, -0.009876751340925694, 0.009138084948062897, -0.0012636295286938548, 0.019381847232580185, -0.017031123861670494, -0.07187821716070175, 0.02895198203623295, 0.012915036641061306, -0.0017038092482835054, 0.05411307513713837, 0.01660371944308281, -0.01594403013586998, -0.039729997515678406, -0.05329543352127075, -0.016194898635149002, -0.028115756809711456, 0.054967883974313736, 0.05340692773461342, 0.026034483686089516, -0.0362921841442585, -0.00008732458081794903, 0.053667087107896805, -0.007711856625974178, 0.013686222024261951, 0.0078001245856285095, -0.030308524146676064, 0.04634546861052513, 0.05221762880682945, 0.01442953385412693, -0.00221019028685987, -0.019288932904601097, 0.027186617255210876, -0.027298113331198692, -0.02335856296122074, -0.04627113789319992, 0.0016898721223697066, -0.002270584227517247, -0.05128849297761917, -0.014912686310708523, -0.004989478271454573, -0.04641979932785034, 0.015730328857898712, 0.01048998348414898, 0.008808241225779057, 0.019214602187275887, 0.0829535573720932, 0.009472575969994068, -0.008701389655470848, -0.016733799129724503, 0.009811711497604847, -0.0032171448692679405, 0.0257557425647974, -0.011688572354614735, 0.07106057554483414, 0.002817614935338497, -0.013686222024261951, -0.0038675423711538315, -0.025439834222197533, 0.024938099086284637, 0.009821002371609211, 0.013825593516230583, -0.03395074978470802, -0.06180634722113609, 0.0002932595962192863, -0.023804549127817154, -0.027502523735165596, 0.020087992772459984, 0.017281992360949516, -0.030141279101371765, 0.05061950907111168, 0.08444017916917801, -0.019288932904601097, -0.0034052955452352762, -0.04950454458594322, -0.003221790539100766, 0.05013635754585266, -0.050173524767160416, 0.012171724811196327, -0.03341184929013252, 0.04976470395922661, 0.04772059619426727, 0.05935342237353325, 0.039581336081027985, 0.02668488211929798, 0.03441531956195831, -0.004761839285492897, 0.04764626547694206, 0.010666519403457642, -0.005008060950785875, 0.01613914966583252, -0.010787307284772396, -0.057680968195199966, -0.02283824421465397, 0.002392533700913191, 0.03304019570350647, 0.03133057802915573, -0.02337714470922947, 0.006020823027938604, -0.013305275700986385, 0.006954608019441366, 0.08287923038005829, -0.0266291331499815, -0.023024072870612144, 0.0682731568813324, -0.03946983814239502, 0.024343449622392654, -0.006457518320530653, -0.005602710414677858, 0.03149782493710518, -0.049244385212659836, 0.04705161601305008, -0.09038667380809784, 0.011242586188018322, -0.036645255982875824, 0.001062122406437993, 0.04173693805932999, 0.04210859537124634, 0.03147923946380615, 0.051957473158836365, -0.0016805807827040553, -0.01863853447139263, 0.0003095195279456675, -0.04433852806687355, 0.02103571407496929, 0.03188806027173996, 0.0182482972741127, 0.039284009486436844, -0.013844176195561886, 0.05983657389879227, 0.04155110940337181, -0.006671220529824495, -0.03452681750059128, -0.01431803684681654, -0.010787307284772396, 0.011809361167252064, 0.01850845478475094, -0.09781979024410248, -0.02229934372007847, 0.008218237198889256, 0.014810481108725071, 0.00017537505482323468, 0.008529499173164368, -0.026053067296743393, -0.011289043352007866, -0.05678899586200714, 0.07061459124088287, 0.03281719982624054, -0.008413356728851795, -0.008859343826770782, -0.07775037735700607, 0.0042345523834228516, -0.04920721799135208, 0.012803539633750916, -0.037258487194776535, -0.0034099414478987455, -0.015804659575223923, 0.05032218620181084, -0.025644246488809586, -0.026053067296743393, 0.051957473158836365, 0.023265648633241653, 0.08414285629987717, 0.0428890734910965, 0.0046991221606731415, -0.019604839384555817, -0.04757193475961685, 0.016148442402482033, 0.04649413377046585, 0.01717049442231655, -0.07663541287183762, 0.0022972968872636557, -0.06414777785539627, 0.04883556440472603, 0.01885223761200905, -0.004269395023584366, -0.05533953756093979, 0.01214385125786066, -0.050656676292419434, -0.03296586498618126, -0.01980924978852272, 0.058833103626966476, 0.05537670478224754, 0.018861528486013412, 0.013918506912887096, 0.03264995664358139, 0.003830377012491226, -0.038726527243852615, 0.029769623652100563, 0.022094933316111565, -0.04846390709280968, -0.03660808876156807, 0.005035934969782829, 0.03935834392905235, 0.03854069858789444, -0.036701004952192307, -0.009217062033712864, 0.035641785711050034, 0.009821002371609211, 0.06325580924749374, 0.028208669275045395, -0.06656353920698166, -0.05415023863315582, -0.04355805367231369, 0.0003571379347704351, 0.03186947852373123, 0.05857294425368309, -0.009175251238048077, 0.0015714068431407213, 0.036831084638834, -0.07146939635276794, 0.06136036291718483, -0.016984667629003525, -0.01633426919579506, 0.02516109310090542, -0.0046503422781825066, -0.06552290916442871, -0.009672340005636215, -0.002720055403187871, -0.04274040833115578, 0.0023809196427464485, 0.00891509186476469, 0.053667087107896805, 0.029453717172145844, 0.023860298097133636, -0.000775250606238842, 0.014410951174795628, 0.006099799647927284, -0.024733688682317734, -0.01670592464506626, -0.06912796944379807, 0.023228483274579048, -0.05143715441226959, 0.020998548716306686, 0.010852347128093243, -0.060691382735967636, -0.03201813995838165, -0.021779026836156845, -0.03458256646990776, 0.000738085072953254, 0.010861638933420181, 0.02235509268939495, -0.03606918826699257, -0.02491951733827591, 0.03969283401966095, -0.003015057183802128, 0.03209247440099716, -0.06537424027919769, 0.021407369524240494, 0.012534089386463165, -0.03409941494464874, 0.05251495540142059, -0.011066049337387085, 0.013407480902969837, -0.03566036745905876, 0.06875631213188171, -0.01880577951669693, -0.00366777740418911, -0.025588497519493103, 0.010387777350842953, -0.036701004952192307, -0.03382067009806633, -0.004209001082926989, 0.045007508248090744, -0.015999779105186462, -0.011512036435306072, 0.006411061622202396, 0.03636651486158371, -0.030085531994700432, -0.04705161601305008, -0.011725738644599915, -0.005811766721308231, -0.009523678570985794, 0.03551170602440834, -0.004448254592716694, 0.002462219214066863, 0.058312784880399704, -0.017467819154262543, -0.0003792049828916788, -0.07057742029428482, -0.01765364781022072, -0.015813952311873436, 0.09744813293218613, -0.05206896737217903, -0.01702183298766613, 0.010499274358153343, 0.0053193224593997, -0.013639765791594982, -0.026573384180665016, -0.01032273843884468, 0.014754733070731163, -0.04950454458594322, 0.02670346386730671, -0.0475347675383091, -0.009570134803652763, -0.038726527243852615, 0.004864044487476349, -0.08391986787319183, 0.03655233979225159, 0.02205776795744896, 0.018164673820137978, -0.012431884184479713, 0.009049816988408566, -0.06399911642074585, 0.013593308627605438, 0.011809361167252064, 0.05225479602813721, -0.03738856688141823, -0.008050992153584957, -0.027279531583189964, -0.05712348595261574, 0.01783018372952938, 0.031163332983851433, 0.016324978321790695, -0.028283001855015755, -0.005830349400639534, -0.014002129435539246, 0.038800857961177826, -0.008171780034899712, -0.01497772615402937, -0.023024072870612144, 0.03363484516739845, 0.07960865646600723, -0.06028255820274353, -0.08347387611865997, 0.010870929807424545, 0.05333259701728821, -0.01508922316133976, -0.016575844958424568, 0.025644246488809586, -0.02469652332365513, 0.0072240582667291164, -0.0067594884894788265, -0.033541928976774216, -0.07165522873401642, -0.0335976779460907, -0.013518976978957653, 0.044524356722831726, 0.000024770999516476877, 0.0359576940536499, -0.02335856296122074, -0.050656676292419434, 0.04311206564307213, -0.0017665261402726173, 0.003110293997451663, -0.0046456968411803246, -0.013518976978957653, -0.01741207204759121, 0.02475227229297161, 0.017616482451558113, -0.04300056770443916, 0.000646332569885999, 0.0654485747218132, 0.07596643269062042, -0.018740739673376083, 0.0037537228781729937, 0.04088212922215462, 0.004868689924478531, -0.013927798718214035, 0.03751864656805992, -0.04184843599796295, -0.053667087107896805, -0.0077768960036337376, -0.0011294849682599306, 0.00643893564119935, 0.0007572485483251512, -0.09023801237344742, 0.023098403587937355, -0.004576011095196009, 0.03465689718723297, 0.030141279101371765, 0.00679200841113925, -0.0472002774477005, -0.015581666491925716, 0.04385537654161453, -0.0010110196890309453, -0.004736287984997034, -0.04077063500881195, 0.024510696530342102, 0.008640996180474758, 0.004850107245147228, -0.00789768435060978, -0.03868936002254486, 0.005486567970365286, 0.05470772460103035, 0.010341321118175983, 0.018499163910746574, 0.025792907923460007, 0.0425545796751976, 0.0011840719962492585, 0.023711636662483215, 0.03025277704000473, -0.018703574314713478, -0.014327328652143478, -0.0025086761452257633, 0.036422260105609894, -0.0031683652196079493, -0.027483941987156868, 0.0182482972741127, -0.0031033253762871027, 0.03209247440099716, 0.016659468412399292, -0.028115756809711456, 0.02949088253080845, -0.011558493599295616, -0.03452681750059128, 0.006262399256229401, 0.050099194049835205, -0.00806957483291626, 0.015925448387861252, 0.023544391617178917, -0.04106795787811279, 0.03935834392905235, -0.001007535494863987, 0.035009969025850296, -0.005793183576315641, 0.02166752889752388, 0.016343560069799423, -0.033541928976774216, -0.045007508248090744, 0.031925227493047714, 0.00671303179115057, 0.009003359824419022, -0.02917497418820858, -0.004422703292220831, -0.08339954912662506, 0.04032464697957039, 0.03984149545431137, 0.05069384351372719, 0.007846581749618053, 0.06582023203372955, -0.04746043682098389 ]
716,060
pytorch_optimizer.lr_scheduler.cosine_anealing
step
null
def step(self, epoch: Optional[int] = None): if epoch is None: epoch = self.last_epoch + 1 self.step_in_cycle = self.step_in_cycle + 1 if self.step_in_cycle >= self.cur_cycle_steps: self.cycle += 1 self.step_in_cycle = self.step_in_cycle - self.cur_cycle_steps self.cur_cycle_steps = ( int((self.cur_cycle_steps - self.warmup_steps) * self.cycle_mult) + self.warmup_steps ) elif epoch >= self.first_cycle_steps: if self.cycle_mult == 1.0: self.step_in_cycle = epoch % self.first_cycle_steps self.cycle = epoch // self.first_cycle_steps else: n: int = int(math.log((epoch / self.first_cycle_steps * (self.cycle_mult - 1) + 1), self.cycle_mult)) self.cycle = n self.step_in_cycle = epoch - int( self.first_cycle_steps * (self.cycle_mult ** n - 1) / (self.cycle_mult - 1) ) # fmt: skip self.cur_cycle_steps = self.first_cycle_steps * self.cycle_mult ** n # fmt: skip else: self.cur_cycle_steps = self.first_cycle_steps self.step_in_cycle = epoch self.max_lr = self.base_max_lr * (self.gamma ** self.cycle) # fmt: skip self.last_epoch = math.floor(epoch) for param_group, lr in zip(self.optimizer.param_groups, self.get_lr()): param_group['lr'] = lr
(self, epoch: Optional[int] = None)
[ -0.0019610750023275614, 0.03730025514960289, -0.0871214047074318, 0.07557519525289536, -0.043523214757442474, 0.02847190387547016, 0.000733938766643405, 0.012727072462439537, -0.0422111451625824, 0.013401851058006287, 0.008472219109535217, 0.01909060776233673, 0.08794613182544708, 0.09012041985988617, 0.0418737567961216, 0.00910482369363308, 0.013233155943453312, 0.03456365317106247, -0.046072375029325485, 0.007525654509663582, 0.040449224412441254, -0.00902516208589077, -0.021086828783154488, 0.029371608048677444, -0.033495254814624786, 0.05278267338871956, 0.05143311619758606, 0.043523214757442474, -0.0699145495891571, 0.03936208039522171, -0.023729709908366203, -0.014938846230506897, -0.01083394419401884, 0.018809450790286064, 0.00775058101862669, -0.03152715042233467, -0.05728119611740112, -0.009746800176799297, -0.12385934591293335, -0.004587556701153517, 0.0033785784617066383, -0.006180783733725548, -0.020730694755911827, 0.03325158357620239, -0.046072375029325485, -0.023223627358675003, -0.019962197169661522, -0.008533136919140816, -0.018996888771653175, -0.05634400621056557, -0.040786612778902054, -0.029690254479646683, 0.053907305002212524, -0.03102106787264347, 0.02129301056265831, -0.007314786314964294, 0.038912225514650345, -0.02774089388549328, -0.012811419554054737, 0.008045796304941177, 0.0341138020157814, -0.04247355833649635, 0.011602441780269146, 0.08727135509252548, 0.01039346307516098, -0.03523843362927437, -0.05671888217329979, -0.0304774958640337, 0.026016460731625557, 0.04517267271876335, 0.02967151068150997, 0.01770356297492981, 0.04213616997003555, -0.018771963194012642, -0.019812246784567833, -0.014488994143903255, -0.08112337440252304, -0.0049483757466077805, 0.021086828783154488, -0.01723496802151203, 0.025978973135352135, 0.0340200811624527, 0.012998858466744423, -0.01923118717968464, 0.0016693739453330636, -0.04134892672300339, -0.024441976100206375, 0.007174207363277674, -0.02247387357056141, 0.014573341235518456, 0.007811498362571001, -0.015594881027936935, 0.02536042593419552, -0.008903327398002148, 0.016953809186816216, 0.04910888150334358, -0.056793857365846634, -0.0143952751532197, -0.05413223057985306, -0.06609080731868744, 0.020524512976408005, -0.00893612951040268, -0.005065524950623512, 0.0032801732886582613, -0.018340853974223137, -0.027628431096673012, -0.008631541393697262, -0.030215082690119743, -0.012389683164656162, -0.009662453085184097, -0.029390351846814156, 0.04059917479753494, -0.059380508959293365, 0.02183658257126808, -0.06729041039943695, 0.00677121477201581, 0.010374719277024269, -0.012277220375835896, -0.02894050069153309, 0.025247963145375252, -0.010712108574807644, 0.023917149752378464, -0.02880929410457611, 0.015726087614893913, -0.03283922001719475, -0.017497381195425987, 0.053907305002212524, 0.07737459987401962, -0.025641582906246185, -0.056119080632925034, 0.03679417073726654, -0.011265052482485771, -0.006986768916249275, -0.021236779168248177, 0.011452490463852882, -0.06016774848103523, -0.021892813965678215, 0.017965978011488914, -0.05199543386697769, -0.026635007932782173, -0.00826135091483593, 0.03902469202876091, 0.04562252387404442, -0.0018158102175220847, 0.043860603123903275, 0.03767513483762741, -0.022230202332139015, 0.04134892672300339, 0.03799377754330635, 0.021030597388744354, 0.03803126513957977, -0.010590273886919022, 0.08839598298072815, 0.030271314084529877, -0.00464378809556365, 0.03452616557478905, -0.04944626986980438, 0.005037408787757158, -0.02299869991838932, 0.024142075330018997, -0.040974050760269165, -0.02706611528992653, 0.002369925146922469, -0.027216065675020218, -0.005965229589492083, 0.05413223057985306, -0.07137656956911087, 0.04041173681616783, -0.01686946302652359, 0.03270801529288292, 0.06013026088476181, 0.00240389839746058, 0.06706548482179642, -0.01909998059272766, 0.014207836240530014, 0.08472219109535217, 0.06676558405160904, -0.003310631960630417, -0.0185751523822546, 0.07471297681331635, -0.010131049901247025, 0.01269895676523447, 0.04622232913970947, -0.08187312632799149, -0.018800079822540283, -0.02877180650830269, -0.005220161285251379, -0.00716014951467514, 0.021442960947752, 0.0105527862906456, 0.03506973758339882, 0.054619573056697845, 0.008748690597712994, -0.00826135091483593, -0.03145217522978783, -0.02384217455983162, 0.03593195602297783, 0.049633707851171494, 0.12655845284461975, 0.03454491123557091, -0.006185469683259726, 0.07186391204595566, 0.023036187514662743, -0.021911557763814926, -0.04685961827635765, -0.026953652501106262, -0.013514313846826553, 0.024085843935608864, -0.04655971750617027, 0.021030597388744354, -0.035500846803188324, 0.00045336681068874896, 0.020130891352891922, 0.04730946943163872, 0.02044953778386116, -0.05533183738589287, -0.040974050760269165, 0.007178893778473139, 0.04393557831645012, -0.010327859781682491, 0.0044024609960615635, -0.053270015865564346, -0.00413301819935441, -0.026672495529055595, 0.041648827493190765, -0.0700644999742508, 0.07055184245109558, -0.05548178777098656, -0.010299744084477425, 0.025116754695773125, -0.03272675722837448, -0.03776885196566582, -0.046747155487537384, 0.03628809005022049, 0.07190139591693878, 0.045060209929943085, -0.03321409597992897, 0.004519610200077295, -0.030421264469623566, -0.022698799148201942, -0.009765544906258583, -0.03662547841668129, -0.03529466316103935, -0.03188328444957733, -0.01994345337152481, 0.044010553508996964, 0.052745185792446136, 0.006677495781332254, -0.05548178777098656, 0.028696829453110695, -0.0014093030476942658, -0.008064540103077888, 0.022005276754498482, 0.01943736895918846, -0.004507895093411207, 0.03017759509384632, 0.004210336599498987, 0.023542271926999092, 0.04296089708805084, 0.021930301561951637, -0.028490647673606873, 0.009076707996428013, -0.04536011070013046, 0.00464378809556365, -0.048471588641405106, 0.02727229706943035, -0.018144045025110245, -0.058330852538347244, 0.006878992076963186, 0.020187122747302055, 0.09731805324554443, 0.04431045427918434, -0.05199543386697769, 0.007113290019333363, 0.03118976205587387, 0.02404835633933544, 0.020412050187587738, -0.025098010897636414, -0.01585729420185089, 0.002204745076596737, 0.05878070369362831, -0.05694380775094032, -0.05465706065297127, -0.02790958806872368, -0.053232528269290924, -0.024254538118839264, 0.014676432125270367, 0.04745941981673241, 0.02043079398572445, -0.024273281916975975, 0.01842520199716091, -0.04194873198866844, 0.0709267184138298, 0.022567592561244965, 0.05128316581249237, 0.008256664499640465, -0.05450710654258728, -0.014245323836803436, -0.0212742667645216, 0.033457767218351364, 0.048771489411592484, -0.05143311619758606, 0.005379484035074711, 0.009606221690773964, 0.020505769178271294, 0.013608032837510109, -0.0411989763379097, 0.017919117584824562, 0.05945548415184021, -0.00017133048095274717, -0.00348869850859046, 0.024816853925585747, 0.0435607023537159, -0.0066259498707950115, -0.027834612876176834, -0.05878070369362831, 0.019362393766641617, -0.01184611115604639, -0.01703815720975399, 0.023898405954241753, 0.001404617098160088, 0.06436637043952942, -0.00434622960165143, 0.04652222990989685, -0.048621539026498795, -0.03611939400434494, 0.07186391204595566, 0.03879976272583008, -0.03596944361925125, -0.03947454318404198, -0.00574967497959733, -0.02487308531999588, 0.0006548631936311722, 0.05821838974952698, -0.0001417503517586738, -0.024235794320702553, -0.006818074267357588, 0.024741878733038902, 0.03675668314099312, -0.03596944361925125, 0.0666906088590622, 0.027497224509716034, -0.059043120592832565, -0.0027014568913728, 0.09484386444091797, 0.012183500453829765, 0.046109866350889206, 0.02622264251112938, 0.02181783877313137, -0.012183500453829765, -0.027853356674313545, -0.028546879068017006, -0.04832163825631142, 0.001603770419023931, -0.03598818555474281, 0.035707030445337296, -0.006579090375453234, -0.09281953424215317, 0.001630714745260775, -0.07714967429637909, -0.0029240401927381754, 0.019830990582704544, -0.015444930642843246, 0.06897735595703125, 0.050683364272117615, 0.012811419554054737, -0.03700035437941551, 0.012951998971402645, 0.04442291706800461, 0.038087498396635056, -0.042848434299230576, 0.013008230365812778, 0.005730931181460619, 0.027009883895516396, -0.021068084985017776, 0.03814372792840004, -0.017937861382961273, 0.004613329656422138, 0.03733774274587631, -0.0009407068137079477, 0.06496617197990417, -0.02742224931716919, -0.008087970316410065, 0.012239732779562473, 0.040486712008714676, -0.04502272233366966, 0.034844812005758286, -0.05282016098499298, 0.061554793268442154, -0.052407797425985336, 0.03235188126564026, 0.04134892672300339, 0.010131049901247025, -0.04134892672300339, 0.009137625806033611, 0.036869149655103683, 0.0432233102619648, 0.036550503224134445, -0.04925883188843727, -0.020374562591314316, -0.022173970937728882, 0.007567828521132469, -0.006302618887275457, 0.042361095547676086, 0.005065524950623512, -0.044535379856824875, 0.03776885196566582, 0.009915495291352272, -0.02590399794280529, 0.05113321542739868, -0.021405473351478577, -0.03355148807168007, -0.0025468203239142895, 0.019034376367926598, 0.03287670761346817, 0.019980940967798233, -0.03846237435936928, -0.04431045427918434, 0.0050327228382229805, -0.0012851250357925892, -0.004219708498567343, 0.044722821563482285, 0.02043079398572445, 0.053569916635751724, 0.027553455904126167, -0.0059183696284890175, 0.021930301561951637, -0.012117897160351276, -0.03049623966217041, 0.023092420771718025, -0.023111164569854736, -0.03805001080036163, -0.05600661784410477, 0.0076240599155426025, 0.015969758853316307, 0.03623185679316521, -0.01908123679459095, 0.023448552936315536, 0.014086001552641392, -0.05263272300362587, -0.03265178203582764, -0.0036527072079479694, 0.00835975632071495, -0.022548848763108253, 0.03718779236078262, -0.005431029945611954, 0.02148044854402542, -0.011799251660704613, -0.08682150393724442, 0.020355818793177605, -0.039287105202674866, -0.02404835633933544, 0.025660326704382896, 0.00007061890937620774, 0.027872100472450256, -0.0548819862306118, -0.07729962468147278, 0.019793502986431122, 0.03596944361925125, -0.014057885855436325, 0.019980940967798233, 0.05042095109820366, 0.023129908367991447, 0.014920102432370186, 0.007656861562281847, -0.001603770419023931, 0.009011104702949524, 0.07557519525289536, -0.020018428564071655, -0.010618389584124088, -0.023823430761694908, -0.0030458751134574413, 0.05293262377381325, 0.011864854954183102, -0.00029887648997828364, -0.02775963768362999, -0.015107541345059872, -0.025810277089476585, 0.009545303881168365, -0.041461389511823654, -0.02880929410457611, -0.04093656316399574, 0.05132065340876579, 0.01415160484611988, -0.013336247764527798, 0.042323607951402664, -0.05998031049966812, 0.04427296668291092, 0.04835912585258484, 0.02740350551903248, -0.05267021059989929, -0.01769419200718403, -0.026616264134645462, 0.006255758926272392, -0.015491790138185024, -0.05878070369362831, 0.0168882068246603, 0.03801252320408821, 0.055969126522541046, 0.014460878446698189, 0.01302697416394949, 0.02215522713959217, 0.048284150660037994, -0.031752075999975204, -0.0260914359241724, 0.04393557831645012, -0.07115164399147034, -0.005215475335717201, -0.05368237942457199, 0.07639992237091064, 0.05177050828933716, -0.021555423736572266, -0.020393306389451027, -0.008664343506097794, -0.016110336408019066, 0.0059183696284890175, -0.003441839013248682, 0.02689742110669613, 0.07152651995420456, 0.020205868408083916, 0.00355898798443377, 0.016288403421640396, 0.019146841019392014, -0.032108210027217865, -0.019624808803200722, 0.03988690674304962, -0.016569560393691063, -0.03576325997710228, -0.0000867635098984465, 0.010262256488204002, -0.0006736069917678833, -0.021011853590607643, 0.0006460769800469279, 0.0646662712097168, 0.015360582619905472, -0.021011853590607643, -0.019868478178977966, -0.015079425647854805, -0.03596944361925125, -0.034338727593421936, -0.038574837148189545, -0.057131245732307434, 0.03947454318404198, 0.021199291571974754, -0.020674463361501694, 0.023129908367991447, 0.008200433105230331, 0.077674500644207, 0.01208978146314621, 0.03701910004019737, -0.025660326704382896, 0.03563205525279045, -0.020037172362208366, -0.01753486879169941, -0.014179720543324947, 0.025772789493203163, 0.010459067299962044, 0.023579759523272514, 0.05267021059989929, 0.009840520098805428, -0.03342027962207794, -0.03390761837363243, 0.015435558743774891, -0.06987706571817398, 0.00646662712097168, -0.03240811079740524, -0.016578933224081993, -0.05109572783112526, -0.012820791453123093, 0.05480701103806496, 0.006035518832504749, 0.02402961254119873, -0.019015632569789886, -0.018837567418813705, -0.02554786391556263, 0.009306319989264011, 0.0010467267129570246, -0.021030597388744354, 0.0016389151569455862, 0.013083205558359623, 0.011180705390870571, -0.016963182017207146, 0.01838771440088749, -0.0525202602148056, -0.0042595393024384975, 0.04532262310385704, -0.035707030445337296, -0.0195873212069273, -0.06522858887910843, -0.02268005535006523, 0.004355601500719786, 0.028865525498986244, -0.08907075971364975, -0.03216444328427315, -0.0009717513457871974, -0.03685040399432182, -0.027028627693653107, -0.043523214757442474, 0.008270722813904285, 0.021199291571974754, -0.0673653855919838, 0.01842520199716091, 0.0012171785347163677, 0.036213114857673645, -0.007080488372594118, -0.0003180596686434001, -0.020655719563364983, -0.006091750226914883, -0.03319535404443741, -0.057506125420331955, -0.035688284784555435, 0.0199247095733881, -0.004423548001796007, -0.034676115959882736, -0.02416081912815571, -0.026672495529055595, 0.032614294439554214, -0.025079267099499702, 0.019849734380841255, -0.04157385230064392, 0.025941485539078712, 0.011265052482485771, -0.04142390191555023, -0.006077692378312349, -0.03677542880177498, -0.030739909037947655, 0.03626934438943863, -0.03913715481758118, 0.06294184178113937, -0.0864466205239296, -0.020337074995040894, 0.02129301056265831, -0.03252057358622551, -0.06522858887910843, 0.056831344962120056, -0.009395353496074677, -0.03306414559483528, 0.003268458414822817, -0.003205197863280773, -0.0442354790866375, 0.013308132067322731, 0.0665406584739685, -0.03222067281603813, 0.0032989170867949724, -0.03529466316103935, -0.04513518512248993, 0.026128923520445824, 0.06410396099090576, 0.06983957439661026, 0.0415363647043705, 0.009076707996428013, 0.052220359444618225, 0.013861075043678284, 0.028490647673606873, 0.0060308328829705715, 0.000023265069103217684, 0.014798267744481564, 0.04787178710103035, 0.04059917479753494, -0.09971726685762405, 0.005557550583034754, -0.001125216600485146, -0.040186807513237, -0.006447883322834969, -0.03887473791837692, 0.02502303570508957, -0.036887891590595245, -0.05199543386697769, -0.023429809138178825, -0.03748769313097, -0.09521874785423279, -0.0796988382935524, -0.013158180750906467, 0.016475841403007507, 0.004482122603803873, -0.047084543853998184, -0.02897798828780651, -0.031920772045850754, 0.037562668323516846, 0.027328530326485634, -0.04194873198866844, -0.002556192222982645, -0.06350415199995041, 0.027384761720895767, 0.012708328664302826, 0.004210336599498987, 0.009821776300668716, 0.039924394339323044, 0.021874070167541504, 0.017244338989257812, -0.02314865216612816, 0.026128923520445824, -0.01890316978096962, -0.01706627383828163, -0.0072913565672934055, -0.04817168787121773, -0.011049497872591019, -0.03630683198571205, 0.01907186396420002, -0.06013026088476181, 0.027047371491789818, -0.03117101825773716, -0.05405725538730621, 0.008233235217630863, -0.003657393157482147, 0.04416050389409065, -0.008823665790259838, 0.01523874793201685, 0.014873242937028408, 0.03701910004019737, 0.03308289125561714, 0.016438353806734085, -0.015613624826073647, -0.030533727258443832, -0.03572577238082886, 0.019381137564778328, -0.02571655809879303, -0.016288403421640396, -0.06402898579835892, 0.006129238288849592, -0.024085843935608864, -0.03285796567797661, 0.026166411116719246, 0.04629730433225632, -0.0783492848277092, 0.006147982086986303, 0.021349241957068443, 0.021705375984311104, 0.04517267271876335, 0.018284622579813004, -0.005838708486407995, 0.05806843936443329, 0.016232172027230263, -0.0007544398540630937, 0.021555423736572266, -0.01804095320403576, 0.0056137824431061745, -0.0014959933469071984, 0.020711950957775116, -0.04667218029499054, 0.008003623224794865, -0.02622264251112938, -0.004711734596639872, -0.028884269297122955, -0.002987300744280219, 0.03130222484469414, 0.022792518138885498, -0.02674747072160244, 0.046259816735982895, -0.07752455025911331, 0.020730694755911827, -0.02026209980249405, -0.012192872352898121, 0.05705627053976059, 0.01208978146314621, -0.04333577677607536, 0.012970742769539356, -0.0014374187448993325, 0.01907186396420002, -0.017131876200437546, 0.0008036424405872822, -0.06691553443670273, 0.08584681898355484, 0.02689742110669613, -0.00716014951467514, 0.0022890924010425806, 0.05180799588561058, -0.008575309999287128 ]
716,061
pytorch_optimizer.lr_scheduler.linear_warmup
CosineScheduler
Cosine LR Scheduler w/ linear warmup.
class CosineScheduler(BaseLinearWarmupScheduler): r"""Cosine LR Scheduler w/ linear warmup.""" def _step(self) -> float: phase: float = (self.step_t - self.warmup_steps) / (self.total_steps - self.warmup_steps) * math.pi return self.min_lr + (self.max_lr - self.min_lr) * (np.cos(phase) + 1.0) / 2.0
(optimizer: Type[torch.optim.optimizer.Optimizer], t_max: int, max_lr: float, min_lr: float = 0.0, init_lr: float = 0.0, warmup_steps: int = 0)
[ -0.026073047891259193, -0.008528358303010464, -0.0011012997711077332, 0.006043718196451664, 0.012991756200790405, -0.0028248787857592106, -0.05594244599342346, -0.0025383615866303444, -0.04842137545347214, 0.027451911941170692, 0.022348327562212944, 0.027487726882100105, 0.11783012002706528, 0.05741084739565849, -0.04372965916991234, 0.009213312529027462, 0.05375775694847107, 0.013699094764888287, -0.04680971801280975, -0.04688134789466858, 0.030890116468071938, 0.013385716825723648, 0.0010464586084708571, 0.05436660349369049, -0.04716786369681358, 0.053721942007541656, -0.01243662927299738, -0.0008612298406660557, -0.05680199712514877, -0.0673673152923584, 0.009992280974984169, 0.040434714406728745, 0.00008303117647301406, -0.07001759856939316, 0.046236682683229446, -0.03638765960931778, 0.02537466399371624, -0.05196702480316162, -0.08538207411766052, 0.01694927178323269, 0.04491154104471207, -0.0025406000204384327, 0.01783568412065506, 0.03404180333018303, 0.007216647267341614, 0.004188072867691517, -0.008340331725776196, 0.048027414828538895, 0.051286544650793076, -0.02888449653983116, 0.0007638588431291282, -0.06557658314704895, 0.016438914462924004, -0.012597794644534588, -0.005510975606739521, 0.05741084739565849, 0.016994040459394455, -0.022509492933750153, 0.02669980376958847, -0.00853283517062664, 0.048528820276260376, -0.02929636463522911, 0.005090153776109219, 0.04304918274283409, 0.06919386237859726, -0.024479297921061516, 0.0157405287027359, 0.004472351633012295, 0.0073061841540038586, 0.009365525096654892, 0.013081292621791363, -0.0019373474642634392, -0.006518261972814798, -0.02573280967772007, 0.009096914902329445, -0.007821018807590008, -0.07442279160022736, -0.07195158302783966, 0.009132729843258858, -0.05834202840924263, 0.03860816732048988, 0.00993855856359005, -0.020826205611228943, -0.036047421395778656, -0.0336836576461792, -0.030764764174818993, 0.009204358793795109, -0.06468121707439423, -0.07836240530014038, 0.018587792292237282, -0.04680971801280975, 0.00891784206032753, -0.014424340799450874, 0.014084101654589176, 0.057804808020591736, 0.0331285297870636, -0.04290592297911644, -0.0030129055958241224, -0.0032882303930819035, 0.0011774058220908046, 0.06099231168627739, 0.07062644511461258, 0.004411914385855198, 0.05662292614579201, 0.03377319499850273, -0.0007683356525376439, -0.03581462800502777, -0.036817435175180435, 0.025661179795861244, 0.00996541976928711, -0.04158078134059906, 0.022957175970077515, -0.03939608857035637, -0.029636604711413383, -0.048278115689754486, -0.02557164430618286, -0.016215072944760323, 0.05859272927045822, 0.006849547382444143, 0.025517921894788742, 0.04269103705883026, -0.01472876500338316, 0.015328660607337952, -0.00213320879265666, 0.02186482958495617, -0.0008796968031674623, 0.019751766696572304, 0.03592207282781601, 0.014307943172752857, -0.020826205611228943, 0.020611317828297615, 0.005305041559040546, 0.05468893423676491, -0.039002127945423126, 0.008595510385930538, -0.02639538049697876, 0.04856463521718979, 0.03352249041199684, -0.026896784082055092, 0.03592207282781601, 0.014898885041475296, 0.04315662384033203, 0.013779677450656891, -0.010717527009546757, 0.03389854356646538, 0.056730370968580246, -0.0015556978760287166, 0.04122263565659523, 0.005909413564950228, 0.027147486805915833, 0.03298527002334595, -0.011084627360105515, 0.07829077541828156, 0.002395103219896555, 0.008403006941080093, -0.03914538770914078, 0.00002784027674351819, -0.021972274407744408, -0.01996665447950363, 0.009105868637561798, -0.012651517055928707, 0.017101485282182693, -0.04014819860458374, -0.024318132549524307, -0.029636604711413383, 0.02471209317445755, -0.03638765960931778, 0.01111148763448, -0.0168418288230896, -0.004843928385525942, 0.004924511071294546, -0.06743894517421722, 0.02863379381597042, 0.03685325011610985, 0.04849300533533096, 0.03409552574157715, -0.007968754507601261, 0.0491376668214798, 0.004105251748114824, -0.003165117697790265, 0.01087869331240654, 0.024622555822134018, -0.023959985002875328, -0.07829077541828156, -0.018641512840986252, 0.07037574052810669, -0.009741578251123428, 0.01996665447950363, 0.0314810574054718, 0.014701904729008675, -0.02079039067029953, -0.01587483286857605, -0.0018187115201726556, 0.0016250887420028448, -0.00901633221656084, -0.0023704806808382273, -0.015140634030103683, -0.0012389622861519456, 0.024336040019989014, -0.010905553586781025, -0.052611686289310455, 0.08960819989442825, 0.04029145464301109, -0.025159776210784912, 0.015668898820877075, -0.04229707643389702, -0.013967704959213734, 0.057195957750082016, -0.06027601659297943, 0.025643272325396538, -0.005793015938252211, -0.028705423697829247, -0.04011238366365433, 0.059595540165901184, 0.006276513449847698, -0.03968260809779167, -0.013340948149561882, 0.020879928022623062, 0.036709994077682495, -0.007436011917889118, 0.02970823273062706, -0.01292012631893158, 0.0035859395284205675, -0.07127110660076141, 0.014487016946077347, -0.006348142866045237, 0.023673469200730324, -0.0588076189160347, -0.027451911941170692, -0.014155731536448002, -0.021059000864624977, -0.07256043702363968, -0.010439964011311531, -0.011711383238434792, 0.016367284581065178, -0.019232455641031265, 0.015158540569245815, 0.08989471197128296, -0.017826730385422707, -0.029367994517087936, -0.03402389585971832, 0.004080628976225853, 0.007552409544587135, -0.007427058182656765, 0.021882737055420876, 0.01763870380818844, 0.03432831913232803, 0.03305689990520477, -0.10035258531570435, 0.0003503118350636214, -0.029367994517087936, -0.0157405287027359, 0.01536447461694479, -0.009625180624425411, -0.021596219390630722, -0.03382691368460655, 0.03260921686887741, 0.03130198270082474, 0.0010078459745272994, 0.02247367799282074, -0.046344127506017685, -0.02822192572057247, -0.009311802685260773, 0.04494735598564148, -0.035617645829916, 0.022867638617753983, -0.040184009820222855, 0.017271604388952255, -0.011935224756598473, 0.03678162023425102, 0.07879217714071274, -0.0019586123526096344, -0.0626755952835083, 0.0011908363085240126, 0.01976967416703701, 0.010296705178916454, -0.09404920786619186, -0.02786378003656864, 0.02644910290837288, -0.015973323956131935, 0.04143752530217171, -0.024013707414269447, -0.03402389585971832, -0.035546015948057175, -0.04312081262469292, -0.036817435175180435, -0.018202783539891243, 0.011218931525945663, 0.03739047050476074, -0.025553736835718155, -0.01634042337536812, 0.0033173297997564077, 0.022742288187146187, -0.03602951392531395, 0.14075148105621338, 0.02725493162870407, -0.03366575017571449, -0.02695050649344921, -0.009128252975642681, 0.0299589354544878, 0.08137083053588867, -0.0019272746285423636, -0.05279076099395752, -0.02786378003656864, -0.05264750123023987, 0.007731482852250338, 0.005067769903689623, 0.02012781985104084, -0.008617894724011421, -0.015892740339040756, -0.04161659628152847, 0.011245792731642723, -0.008734292350709438, -0.04301336780190468, -0.011944178491830826, -0.0026435672771185637, -0.02283182553946972, 0.02181110717356205, 0.059846241027116776, 0.008125443942844868, -0.024443482980132103, -0.0033956742845475674, 0.054903823882341385, 0.031069189310073853, 0.012669424526393414, -0.04458921030163765, 0.027487726882100105, 0.009114822372794151, -0.04179567098617554, -0.04505480080842972, 0.002515977481380105, -0.02079039067029953, -0.018041618168354034, -0.004723053891211748, -0.031875018030405045, -0.029439624398946762, 0.06478866189718246, 0.07893543690443039, 0.008555219508707523, -0.014988421462476254, 0.09447898715734482, 0.05074932798743248, -0.015561455860733986, 0.06332026422023773, -0.016170304268598557, -0.04956744238734245, 0.03853653743863106, -0.02614467777311802, 0.04426687955856323, -0.0408644899725914, -0.0017392478184774518, -0.014209453016519547, -0.026001419872045517, 0.022348327562212944, 0.07173670083284378, 0.05279076099395752, -0.051895394921302795, -0.09741578251123428, 0.03282410651445389, -0.06579147279262543, 0.008107536472380161, 0.008049337193369865, -0.04999721795320511, 0.04244033247232437, -0.027219116687774658, 0.004026907030493021, -0.0541159026324749, -0.0005439346423372626, 0.032788291573524475, 0.010538454167544842, -0.03448948636651039, 0.01966223120689392, 0.033612027764320374, 0.009222266264259815, -0.010126586072146893, 0.008188119158148766, 0.04627249762415886, -0.01459446083754301, -0.03097965195775032, -0.013654327020049095, 0.04204637184739113, 0.02048596739768982, -0.02695050649344921, 0.004714100155979395, 0.02915310673415661, 0.02191855199635029, -0.02079039067029953, -0.007386766839772463, 0.02114853821694851, -0.032483868300914764, 0.021542498841881752, -0.020665040239691734, 0.0063794804736971855, -0.057804808020591736, -0.05712433159351349, 0.012356046587228775, 0.0389304980635643, 0.05146561935544014, -0.028723331168293953, -0.02700422890484333, 0.01706567034125328, 0.007968754507601261, -0.0016083006048575044, 0.005869122222065926, 0.007722529117017984, -0.0836629718542099, 0.04444595053792, -0.02283182553946972, 0.006621228996664286, 0.09426409751176834, -0.025159776210784912, -0.026735618710517883, -0.013340948149561882, 0.002697288990020752, -0.07764611393213272, -0.07528234273195267, -0.058879248797893524, -0.058879248797893524, 0.0009966539219021797, 0.047418564558029175, -0.00945506151765585, 0.04000493884086609, 0.023816727101802826, 0.03832165151834488, 0.06231744959950447, 0.027702614665031433, 0.03678162023425102, -0.023619746789336205, -0.001976519823074341, -0.02388835698366165, -0.02104109339416027, 0.01419154554605484, -0.09977955371141434, -0.015570409595966339, -0.018354997038841248, -0.04186730086803436, 0.019787581637501717, 0.005461730528622866, 0.0030240975320339203, -0.026323750615119934, 0.015525640919804573, -0.011371144093573093, 0.04287010803818703, 0.00907005462795496, -0.03296736255288124, -0.004331331700086594, -0.01554354839026928, -0.020754575729370117, 0.0013173067709431052, 0.0016362807946279645, -0.021990181878209114, 0.04186730086803436, -0.037533730268478394, 0.020915742963552475, 0.04186730086803436, -0.0049424185417592525, -0.013448392041027546, -0.0274698194116354, -0.05450986325740814, -0.04645157232880592, 0.012955941259860992, 0.04505480080842972, -0.01711939089000225, -0.03602951392531395, -0.0065093087032437325, 0.07213065773248672, 0.03953934833407402, 0.05375775694847107, 0.014236314222216606, -0.00864475592970848, 0.026574453338980675, -0.0049961404874920845, 0.03749791532754898, -0.047561824321746826, 0.023351136595010757, 0.0010968229034915566, -0.09698601067066193, 0.02766679972410202, 0.04867208003997803, -0.017593935132026672, 0.0037560591008514166, -0.015588316135108471, 0.06453795731067657, 0.03636975213885307, 0.010484731756150723, 0.047418564558029175, -0.001882506301626563, -0.0632486343383789, 0.0513581745326519, 0.002379434183239937, -0.01795208267867565, 0.034167155623435974, 0.04834974557161331, 0.012472444213926792, -0.04498317092657089, 0.014272129163146019, 0.02954706735908985, 0.013618512079119682, 0.046200867742300034, 0.06937292963266373, -0.000829892058391124, 0.01078020315617323, -0.0425119623541832, 0.04133008047938347, 0.0381067618727684, 0.0040380991995334625, -0.049853961914777756, -0.05146561935544014, -0.0982753336429596, 0.003521025413647294, 0.031767573207616806, -0.01885640062391758, -0.006003426853567362, -0.016224026679992676, -0.027595169842243195, -0.05615733563899994, -0.04358639940619469, 0.06622124463319778, 0.012320231646299362, -0.005663187708705664, -0.015731574967503548, 0.01916082575917244, -0.013394670560956001, -0.002455540467053652, -0.02007409930229187, 0.016985086724162102, -0.003832165151834488, -0.030084285885095596, 0.044875726103782654, 0.046702273190021515, 0.005430392920970917, -0.04652320221066475, -0.03760536015033722, 0.05837784335017204, 0.0439087338745594, 0.06099231168627739, -0.07556886225938797, -0.06962363421916962, 0.06367840617895126, -0.015095865353941917, -0.022330420091748238, -0.00907005462795496, 0.06192348897457123, 0.02399579994380474, -0.0004868550749961287, -0.01016240008175373, -0.0007241269922815263, 0.02247367799282074, -0.05339960753917694, 0.027648892253637314, -0.016062859445810318, -0.030711043626070023, -0.040577974170446396, -0.008317947387695312, 0.002016811165958643, 0.0014863070100545883, 0.01668066345155239, 0.021220166236162186, -0.03226897865533829, 0.04265522211790085, -0.026735618710517883, 0.019286176189780235, 0.04269103705883026, -0.05185957998037338, -0.012499304488301277, -0.01686869002878666, 0.0020727715454995632, 0.040076568722724915, 0.015803204849362373, 0.00634366599842906, 0.01625984162092209, 0.01946524903178215, 0.019859211519360542, -0.01078020315617323, -0.05680199712514877, 0.012311277911067009, 0.04809904471039772, -0.02150668390095234, -0.037891875952482224, -0.07879217714071274, 0.014827256090939045, -0.011030904948711395, -0.04759763926267624, -0.04315662384033203, -0.01971595175564289, -0.03481181710958481, -0.07037574052810669, 0.050212107598781586, -0.05809132382273674, -0.020038284361362457, -0.030460340902209282, 0.03097965195775032, -0.054760564118623734, 0.004385053180158138, -0.0020078574307262897, -0.05354286730289459, -0.010010188445448875, 0.010672759264707565, 0.008219457231462002, 0.05010466277599335, -0.02893821895122528, 0.023816727101802826, 0.042977552860975266, 0.0134573457762599, 0.009983327239751816, -0.0004121480160392821, -0.01755812019109726, -0.040577974170446396, -0.04118682071566582, -0.017182067036628723, 0.0023234740365296602, 0.0023592885117977858, 0.018158016726374626, 0.03042452596127987, 0.02628793567419052, -0.02068294771015644, -0.020199449732899666, -0.08803234994411469, 0.05311309173703194, -0.022939268499612808, 0.017495445907115936, -0.045735277235507965, -0.04265522211790085, -0.02960078977048397, 0.0047409613616764545, 0.004201503470540047, 0.07033992558717728, -0.021220166236162186, 0.028597978875041008, -0.07614189386367798, -0.0005584843456745148, 0.0000032570674193266314, 0.0073061841540038586, -0.09476550668478012, -0.009446107782423496, 0.048886965960264206, -0.0681910514831543, 0.06339188665151596, -0.003988854121416807, -0.07130692154169083, 0.02481953613460064, 0.05554848536849022, -0.04122263565659523, -0.03343295305967331, -0.04097193479537964, -0.020396430045366287, -0.039252832531929016, 0.014137824065983295, 0.0737065002322197, 0.0381067618727684, -0.01811324805021286, 0.05268331617116928, -0.0019351090304553509, 0.10450708121061325, -0.006898792460560799, -0.026073047891259193, -0.02095155604183674, -0.054080087691545486, 0.04347895830869675, -0.037676986306905746, -0.020521780475974083, 0.017325326800346375, -0.0019384666811674833, -0.02297508344054222, 0.005354286637157202, -0.03402389585971832, 0.04064960032701492, 0.0063570961356163025, -0.04931674152612686, -0.025500014424324036, -0.023207878693938255, -0.01665380224585533, 0.0196085087954998, -0.019286176189780235, -0.006733149755746126, 0.03178548067808151, -0.03642347455024719, -0.03542066738009453, 0.023619746789336205, -0.010636944323778152, -0.00901633221656084, -0.02460464835166931, -0.005188643932342529, -0.01437061931937933, -0.03957516327500343, -0.0037829200737178326, -0.006263082846999168, -0.028615886345505714, -0.02258112281560898, 0.005918367300182581, -0.002650282345712185, 0.050426993519067764, -0.03373738005757332, 0.030603598803281784, 0.029171014204621315, 0.012293370440602303, -0.054796379059553146, -0.031158724799752235, 0.024192780256271362, 0.007556886412203312, 0.020879928022623062, 0.023064620792865753, -0.00983111560344696, 0.0037403900641947985, -0.015248077921569347, 0.04383710399270058, 0.024586740881204605, -0.00996541976928711, 0.004022430162876844, 0.027219116687774658, 0.0936194360256195, 0.02150668390095234, 0.00684059364721179, 0.038035135716199875, 0.023977892473340034, -0.06417981535196304, -0.01737009361386299, 0.016779152676463127, 0.0006150042754597962, 0.0204322449862957, -0.0011830019066110253, 0.0005173534736968577, 0.03275247663259506, 0.002327950671315193, -0.01582111231982708, -0.005573651287704706, 0.010395195335149765, 0.025804439559578896, -0.010144493542611599, -0.00594970490783453, -0.028204018250107765, 0.032233163714408875, -0.014961560256779194, 0.04842137545347214, 0.0820154994726181, 0.02888449653983116, -0.02358393184840679, -0.005663187708705664, 0.018838493153452873, 0.00955355167388916, 0.005631850101053715, 0.015865879133343697, 0.006751057226210833, -0.05751829221844673, 0.025643272325396538, 0.04723949357867241, -0.02772052213549614, -0.009714717976748943, 0.07556886225938797, 0.0057303402572870255, 0.018784772604703903, -0.014200499281287193, 0.0024913549423217773, 0.013385716825723648, 0.003832165151834488, -0.06396492570638657, -0.02592978999018669, 0.030460340902209282, -0.02302880585193634, -0.03493716940283775, 0.007991138845682144, -0.05325635150074959, -0.006160115823149681, 0.054903823882341385, 0.0695878192782402, 0.0243002250790596, 0.012400814332067966, 0.048278115689754486 ]
716,062
pytorch_optimizer.base.scheduler
__init__
null
def __init__( self, optimizer: OPTIMIZER, t_max: int, max_lr: float, min_lr: float = 0.0, init_lr: float = 0.0, warmup_steps: int = 0, ): self.optimizer = optimizer self.total_steps = t_max self.max_lr = max_lr self.min_lr = min_lr self.init_lr = init_lr self.warmup_steps = warmup_steps self.step_t: int = 0 self.base_lrs: List[float] = [] # record current value in self._last_lr to match API from torch.optim.lr_scheduler self.last_lr: List[float] = [init_lr] self.validate_parameters() self._init_lr()
(self, optimizer: Type[torch.optim.optimizer.Optimizer], t_max: int, max_lr: float, min_lr: float = 0.0, init_lr: float = 0.0, warmup_steps: int = 0)
[ -0.04480379447340965, -0.015165545977652073, -0.0033583601471036673, 0.03050430305302143, -0.031120162457227707, 0.013404572382569313, -0.031023934483528137, -0.041108638048172, -0.11963075399398804, -0.007505790796130896, -0.012461536563932896, 0.08968457579612732, -0.009295633062720299, 0.043841514736413956, -0.01950543187558651, 0.05769835785031319, -0.017811818048357964, -0.0014746953966096044, 0.024057021364569664, -0.009406295605003834, 0.009998098015785217, -0.0008780812495388091, -0.04734421893954277, 0.09030043333768845, -0.032486602663993835, 0.0384334959089756, -0.024653635919094086, -0.014944221824407578, -0.04311018064618111, -0.002667923690751195, -0.024634389206767082, 0.02330644242465496, 0.01005583442747593, 0.016474248841404915, 0.020689038559794426, -0.050692953169345856, -0.00041889288695529103, 0.0035652504302561283, -0.12555840611457825, 0.026270266622304916, 0.016782177612185478, -0.09276387095451355, -0.007390317041426897, 0.01762898452579975, -0.0000791626371210441, 0.015175169333815575, 0.02492307312786579, -0.03371832147240639, 0.02413400448858738, -0.0523865707218647, -0.012952299788594246, -0.0416090227663517, 0.020727530121803284, -0.005095276981592178, -0.054080184549093246, 0.06582000851631165, 0.04776762053370476, -0.0032501034438610077, 0.02016940712928772, -0.012884940952062607, -0.040415797382593155, -0.032332636415958405, 0.015868011862039566, 0.008203444071114063, 0.020727530121803284, -0.0042099785059690475, -0.09907643496990204, -0.010383009910583496, -0.002487496007233858, 0.06193239614367485, 0.03650893643498421, 0.0008419957594014704, 0.028945408761501312, 0.0069957817904651165, 0.018668249249458313, -0.012759843841195107, -0.048883866518735886, -0.04056975990533829, -0.05365677922964096, -0.0286374781280756, 0.0215358454734087, 0.047806113958358765, -0.016041221097111702, -0.015935370698571205, 0.0018415650120005012, -0.10546597838401794, -0.01655123010277748, -0.0758662223815918, -0.016945766285061836, -0.03891463577747345, -0.06882232427597046, -0.0019450101535767317, 0.007231540512293577, 0.015656309202313423, -0.012259458191692829, 0.009728658944368362, -0.06108558923006058, -0.006500206887722015, -0.027155565097928047, -0.018956933170557022, 0.003033590270206332, 0.02486533671617508, -0.012615501880645752, 0.03302547708153725, 0.04141656681895256, -0.026174038648605347, -0.04230186715722084, -0.04326414689421654, 0.0017669881926849484, -0.024884583428502083, -0.05080842971801758, 0.04757516458630562, -0.038452740758657455, 0.04776762053370476, -0.017513511702418327, 0.035469673573970795, -0.014924976043403149, -0.009694979526102543, 0.024441933259367943, 0.025384968146681786, 0.03864520043134689, 0.01801389828324318, -0.03015788085758686, 0.034430406987667084, -0.03662440925836563, -0.008073536679148674, 0.03725951537489891, 0.014828748069703579, -0.027328776195645332, -0.04137807711958885, 0.04037730395793915, -0.024057021364569664, -0.029445793479681015, 0.042417339980602264, 0.011393405497074127, -0.010623580776154995, 0.02736726775765419, 0.06678228825330734, -0.04137807711958885, -0.03681686520576477, 0.015483099035918713, 0.04899933934211731, 0.02521175891160965, -0.03113940730690956, 0.009189781732857227, 0.044226426631212234, -0.016195187345147133, 0.03602779656648636, 0.036489687860012054, -0.018495038151741028, -0.020535074174404144, -0.06281769275665283, 0.03402625024318695, 0.0020183841697871685, 0.001862013479694724, 0.0071353125385940075, -0.02428796887397766, -0.022093968465924263, -0.0018187108216807246, 0.01300041377544403, -0.03250584751367569, -0.0009364195284433663, -0.016599344089627266, -0.0489608496427536, -0.019130142405629158, -0.022979266941547394, -0.010998870246112347, -0.025789126753807068, -0.04507323354482651, 0.04969218373298645, 0.01353929191827774, -0.09930738061666489, -0.012519273906946182, 0.02794463559985161, -0.012894563376903534, 0.05996934324502945, 0.029830705374479294, 0.005518680438399315, -0.034545883536338806, 0.057736851274967194, 0.023922301828861237, 0.021901512518525124, -0.0009616794413886964, -0.07567376643419266, -0.0384334959089756, -0.0008293658029288054, -0.01005583442747593, 0.004361537750810385, -0.018033143132925034, 0.05577379837632179, 0.015184791758656502, -0.0182352215051651, -0.010065457783639431, -0.03117789886891842, -0.015425361692905426, 0.024788355454802513, 0.03856821730732918, 0.026963109150528908, 0.07571225613355637, 0.03231339156627655, -0.0015685177640989423, 0.07432657480239868, 0.044033970683813095, -0.025192512199282646, -0.013192870654165745, -0.013693256303668022, -0.01324098464101553, 0.058776114135980606, -0.005104899872094393, 0.04695930704474449, 0.004784941673278809, -0.021073950454592705, -0.011143212206661701, 0.04434190317988396, 0.00026462721871212125, -0.0047825356014072895, 0.004031956661492586, 0.04665137454867363, 0.044957760721445084, 0.02550044283270836, 0.08914569765329361, -0.02819482795894146, -0.03162054717540741, -0.022786810994148254, 0.0376829169690609, 0.01539649348706007, 0.02045809105038643, -0.07386467605829239, -0.02707858383655548, 0.013173624873161316, -0.02070828340947628, -0.047613658010959625, -0.029060881584882736, 0.016041221097111702, 0.02794463559985161, 0.059007059782743454, 0.002387659391388297, -0.007087198551744223, -0.07740586996078491, -0.06963064521551132, -0.00784740038216114, 0.0031634983606636524, -0.01931297592818737, -0.032043952494859695, -0.018543152138590813, 0.03802933916449547, 0.013770238496363163, 0.021112442016601562, -0.033506620675325394, 0.012201720848679543, -0.012567387893795967, -0.019197503104805946, -0.02707858383655548, -0.003346331650391221, -0.01642613485455513, 0.0435720756649971, 0.019139766693115234, -0.020843002945184708, 0.007602018769830465, -0.02771368809044361, 0.0016479059122502804, -0.06339506059885025, -0.04515021666884422, 0.07744435966014862, -0.035854585468769073, -0.01054659765213728, 0.00017456375644542277, -0.030080899596214294, -0.018754852935671806, -0.0183603186160326, 0.142879456281662, 0.04822951555252075, -0.04541965574026108, 0.002297445433214307, 0.004676684737205505, -0.0013279475970193744, -0.0401463583111763, -0.052502043545246124, -0.030485056340694427, -0.0018415650120005012, 0.06401092559099197, -0.012480782344937325, 0.0005088059697300196, -0.02197849377989769, 0.000021914442186243832, -0.004698336124420166, -0.04311018064618111, -0.03558514639735222, -0.029060881584882736, -0.01610858179628849, 0.0015083752805367112, 0.009738282300531864, 0.04769063740968704, 0.02927258424460888, 0.1317169964313507, -0.005114522762596607, -0.0016948170959949493, 0.019486187025904655, -0.020381107926368713, -0.016724441200494766, 0.05388772860169411, -0.09538127481937408, 0.002807454438880086, -0.002268576994538307, -0.023190967738628387, -0.023826073855161667, -0.019592037424445152, 0.03360284864902496, 0.07794474810361862, 0.0006363082211464643, 0.058083273470401764, 0.026174038648605347, 0.02172830142080784, -0.01439572125673294, 0.00749135622754693, -0.03745197132229805, -0.010662071406841278, -0.04930727183818817, -0.02178603783249855, 0.03779838979244232, -0.012220966629683971, 0.04083919897675514, 0.021016214042901993, -0.030754495412111282, -0.011114344000816345, -0.06293316930532455, 0.03240961953997612, 0.0034425596240907907, -0.07975383847951889, -0.038010094314813614, -0.030427319929003716, -0.030850723385810852, 0.01937071420252323, -0.006851439829915762, 0.004452954512089491, 0.02051582746207714, 0.02482684515416622, 0.0523865707218647, 0.006100860424339771, -0.00790994893759489, 0.09899945557117462, 0.02559667080640793, -0.0029710421804338694, 0.0670517310500145, 0.01520403753966093, -0.02730952948331833, 0.01617594063282013, -0.04488077759742737, 0.026077810674905777, -0.006654172204434872, -0.03337189927697182, -0.012913809157907963, -0.04137807711958885, 0.02555817924439907, 0.037663672119379044, 0.018062012270092964, -0.03381454944610596, -0.02619328536093235, 0.015444607473909855, -0.04488077759742737, -0.013260230422019958, 0.03820255026221275, -0.04118562117218971, 0.05908404290676117, 0.01779257319867611, -0.018658624961972237, 0.009810453280806541, -0.03373756632208824, 0.004505880177021027, 0.0035652504302561283, 0.002482684561982751, -0.08868380635976791, 0.025327231734991074, 0.03144733980298042, 0.014347607269883156, -0.01690727472305298, -0.05204014852643013, -0.0031851495150476694, 0.017552003264427185, 0.037240270525217056, 0.03137035667896271, 0.029830705374479294, 0.04522719979286194, -0.01556970365345478, -0.008852983824908733, -0.026270266622304916, 0.004043985158205032, 0.008078347891569138, 0.0636645033955574, -0.0024129191879183054, 0.02923409268260002, -0.01512705534696579, -0.005566794890910387, -0.02432646043598652, -0.009290821850299835, 0.049576710909605026, 0.03137035667896271, 0.04630495607852936, -0.02207472175359726, -0.0464974120259285, 0.0017778138862922788, -0.003942945972084999, 0.026712916791439056, 0.03706705942749977, 0.016849538311362267, -0.012326817959547043, 0.08283313363790512, 0.039492007344961166, 0.01683991402387619, 0.05442660301923752, 0.0037841694429516792, 0.009978852234780788, 0.03552740812301636, 0.011422273702919483, -0.059314992278814316, -0.03275604173541069, -0.029311073943972588, 0.009079120121896267, 0.020843002945184708, 0.002566884271800518, 0.02080451138317585, 0.06528113037347794, 0.03481532260775566, -0.010392633266746998, 0.022979266941547394, -0.023556634783744812, -0.014039677567780018, -0.0315820574760437, -0.021555090323090553, -0.05812176316976547, -0.011893791146576405, 0.053926218301057816, 0.017369169741868973, -0.02305624820291996, 0.020669791847467422, 0.028522003442049026, -0.01845654658973217, 0.022286424413323402, 0.006197088863700628, -0.019803740084171295, 0.03710554912686348, -0.0778292715549469, 0.027886899188160896, 0.007563527673482895, -0.01889919489622116, -0.021997740492224693, -0.023479653522372246, 0.024076266214251518, -0.05658211559057236, 0.01953430101275444, 0.002256548497825861, 0.022844547405838966, 0.010556221008300781, 0.019861476495862007, 0.026462722569704056, -0.0075827729888260365, -0.04388000816106796, 0.047613658010959625, -0.0014362041838467121, -0.00227579427883029, -0.02159358188509941, 0.04738270863890648, 0.04311018064618111, -0.04592004045844078, -0.03273679316043854, 0.0607006773352623, 0.02359512634575367, 0.00840071216225624, -0.00268716923892498, -0.013038905337452888, -0.02815633825957775, 0.026905372738838196, 0.00661086943000555, -0.018148615956306458, -0.009565071202814579, -0.026251021772623062, -0.00006281137757468969, 0.004395217634737492, 0.021112442016601562, -0.01671481877565384, 0.0695151686668396, -0.025000056251883507, 0.06893780082464218, 0.022921530529856682, -0.017734836786985397, 0.03716328740119934, -0.061316534876823425, -0.0032958118245005608, 0.0007878674659878016, 0.040261831134557724, -0.04499625414609909, 0.030716003850102425, 0.012759843841195107, 0.028579741716384888, -0.03152431920170784, -0.016041221097111702, 0.039338041096925735, 0.015271397307515144, 0.05769835785031319, 0.04680534079670906, 0.025827618315815926, -0.022055476903915405, -0.03774065524339676, -0.007395128253847361, 0.023729845881462097, 0.015242528170347214, -0.09653601795434952, 0.002062889514490962, -0.07332579791545868, 0.031793758273124695, 0.018976178020238876, -0.026020074263215065, -0.041493549942970276, 0.010402255691587925, -0.056466639041900635, -0.031004689633846283, -0.054465096443891525, 0.035027023404836655, 0.031004689633846283, 0.0018944904441013932, -0.0011805982794612646, 0.09707488864660263, -0.020631302148103714, -0.05535039305686951, 0.01858164370059967, 0.004784941673278809, -0.010277159512043, -0.01412628311663866, 0.054811518639326096, 0.008078347891569138, 0.013799107633531094, -0.04776762053370476, -0.02806011028587818, 0.04630495607852936, 0.0069813476875424385, 0.06089313328266144, -0.02486533671617508, -0.03044656664133072, 0.0008504156721755862, -0.05061597377061844, -0.007332580164074898, 0.036643654108047485, 0.04811404272913933, -0.03171677514910698, -0.011566615663468838, -0.009170536883175373, -0.04399548098444939, 0.12055454403162003, -0.028772197663784027, 0.0401463583111763, 0.020034687593579292, -0.03543118014931679, -0.03006165288388729, 0.00572557095438242, -0.029849952086806297, -0.0065771895460784435, 0.033121705055236816, 0.016762932762503624, 0.05346432328224182, 0.04884537681937218, -0.016262546181678772, 0.000798693101387471, -0.0004979803343303502, 0.03577760234475136, -0.0037697351071983576, -0.005268487613648176, 0.0026053753681480885, 0.01940920390188694, -0.039087846875190735, 0.03196696937084198, 0.016378020867705345, -0.03281377628445625, -0.05096239224076271, 0.019101275131106377, -0.053579796105623245, 0.036836110055446625, -0.008078347891569138, 0.03421870619058609, 0.002347965259104967, -0.020939230918884277, 0.04284074157476425, 0.012307572178542614, -0.02267133630812168, -0.04118562117218971, -0.0016334716929122806, 0.028464267030358315, -0.04861442744731903, 0.013991563580930233, -0.03929955139756203, -0.017455775290727615, -0.0034233140759170055, 0.05492699146270752, -0.06035425513982773, 0.006846628151834011, 0.0015709234867244959, -0.010315651074051857, -0.05084691941738129, -0.023575881496071815, 0.05673607811331749, 0.03010014444589615, -0.07174766063690186, 0.02016940712928772, -0.03337189927697182, 0.01449194923043251, 0.0040103052742779255, -0.0636645033955574, -0.03872217983007431, 0.012355686165392399, -0.0023984850849956274, -0.025346476584672928, 0.0038226607721298933, -0.003918888978660107, 0.0359700582921505, -0.02213246002793312, -0.019765248522162437, -0.0582757294178009, -0.03656667098402977, 0.024114757776260376, 0.08729811757802963, -0.03221716359257698, -0.0051722596399486065, 0.0026703292969614267, 0.0032813777215778828, 0.017686722800135612, -0.050692953169345856, -0.03956898674368858, 0.022055476903915405, -0.09091629087924957, 0.011480010114610195, -0.04557362198829651, 0.012153606861829758, -0.03745197132229805, -0.017109353095293045, -0.03069675900042057, 0.0051385797560215, 0.006139351986348629, 0.029445793479681015, 0.03104317933320999, 0.04083919897675514, -0.0499231293797493, -0.007953250780701637, 0.0670902207493782, 0.030080899596214294, -0.030234863981604576, 0.005658211186528206, -0.04137807711958885, -0.01067169476300478, 0.0558122880756855, 0.059507448226213455, 0.04091618210077286, -0.018369941040873528, 0.07582773268222809, 0.005918027367442846, 0.020592810586094856, -0.06408790498971939, -0.014857616275548935, 0.004123373422771692, 0.03749046102166176, 0.08637432754039764, -0.011566615663468838, -0.0401463583111763, 0.017561625689268112, 0.05254053324460983, -0.0056052859872579575, 0.005682268179953098, 0.010796790942549706, -0.03614326938986778, 0.012519273906946182, 0.0015625035157427192, 0.001797059434466064, -0.04549663886427879, -0.013568160124123096, -0.011383782140910625, 0.03481532260775566, 0.020669791847467422, 0.014780634082853794, -0.0031634983606636524, -0.07817569375038147, -0.0014410155126824975, -0.02365286275744438, 0.006124917417764664, 0.024749863892793655, -0.034237951040267944, -0.025423459708690643, 0.008087970316410065, 0.03281377628445625, -0.08722113817930222, 0.027578968554735184, 0.011143212206661701, 0.015463853254914284, -0.04884537681937218, 0.0068706851452589035, 0.0074288081377744675, 0.023267950862646103, 0.0396459698677063, -0.004041579551994801, -0.06254825741052628, -0.07278691977262497, 0.015896879136562347, -0.027386512607336044, 0.0002868799783755094, -0.009358181618154049, -0.09738282114267349, 0.025423459708690643, -0.011614729650318623, 0.007385505363345146, 0.00888185203075409, -0.003115384140983224, -0.0032741606701165438, -0.03568137437105179, 0.07409562170505524, 0.03779838979244232, 0.012961923144757748, -0.034430406987667084, 0.02990768849849701, 0.004840272478759289, 0.033121705055236816, 0.0027256605681031942, -0.04541965574026108, -0.019043538719415665, 0.027482740581035614, -0.023575881496071815, 0.005778496619313955, 0.02794463559985161, 0.012394177727401257, -0.01572366990149021, 0.013645142316818237, 0.01772521249949932, 0.021901512518525124, -0.04103165492415428, 0.016512738540768623, 0.0337953045964241, 0.002723254729062319, -0.06243278086185455, 0.012105492874979973, -0.02178603783249855, 0.04037730395793915, 0.01852390542626381, 0.029099373146891594, 0.05846818536520004, 0.01681104674935341, 0.010488861240446568, -0.007837777957320213, 0.005008671898394823, -0.0029397679027169943, 0.02653970569372177, -0.022459635511040688, -0.04969218373298645, 0.05130881443619728, 0.015386871062219143, 0.02207472175359726, -0.022363407537341118, 0.03774065524339676, 0.032140180468559265, 0.05542737618088722, -0.05331035703420639, 0.020689038559794426, -0.034930795431137085, -0.03999239206314087, -0.07548131048679352, -0.004051202442497015, -0.07521186769008636, 0.06666681915521622, -0.030581286177039146, 0.01689765229821205, 0.03325642645359039, 0.056659094989299774, -0.016378020867705345 ]
716,063
pytorch_optimizer.base.scheduler
_init_lr
null
def _init_lr(self): self.base_lrs = [] for param_group in self.optimizer.param_groups: param_group['lr'] = self.min_lr self.base_lrs.append(self.min_lr)
(self)
[ -0.03984253481030464, 0.001690576900728047, -0.02845630794763565, 0.04543381929397583, -0.03426976129412651, 0.04036093130707741, 0.018282761797308922, -0.0693911761045456, -0.015727803111076355, 0.03962036222219467, -0.03917602449655533, -0.0016604913398623466, 0.04124961048364639, 0.05506119877099991, -0.004107835702598095, 0.01638505607843399, -0.01280256174504757, 0.019643554463982582, -0.01856047473847866, -0.03521398827433586, -0.011330683715641499, 0.021161718294024467, -0.021050631999969482, 0.065355084836483, -0.02201336994767189, 0.060985736548900604, -0.022087426856160164, -0.022161483764648438, -0.009932862594723701, 0.0009586878586560488, -0.029696758836507797, -0.007072419859468937, -0.005859740544110537, -0.0245498139411211, -0.005091401748359203, -0.04676683992147446, -0.012617419473826885, 0.006720650475472212, -0.08020346611738205, 0.026938144117593765, 0.07398270070552826, -0.027808310464024544, -0.015875916928052902, -0.007336247246712446, -0.00472111813724041, 0.013876384124159813, 0.006262424401938915, -0.009386694058775902, 0.0747232660651207, -0.03730608895421028, 0.009497778490185738, -0.008771097287535667, -0.0025896721053868532, 0.0015980058815330267, -0.030752066522836685, -0.009294122457504272, -0.00016575984773226082, -0.005966197233647108, 0.02351301908493042, -0.019143670797348022, 0.025790264829993248, -0.05132133141160011, -0.07102042436599731, 0.00044925836846232414, 0.01783842034637928, -0.061393048614263535, -0.08509121090173721, 0.01992126740515232, 0.0018039762508124113, 0.0381392277777195, -0.021532000973820686, -0.025993920862674713, -0.007234419230371714, -0.012534106150269508, -0.018690073862671852, 0.04643358662724495, -0.03843545541167259, -0.05609799176454544, -0.004691032692790031, -0.03004852868616581, -0.0000062602907746622805, 0.06953929364681244, 0.01197868026793003, 0.01697751134634018, -0.002804899588227272, -0.08020346611738205, -0.030918695032596588, -0.04343428835272789, 0.028030481189489365, -0.0775374248623848, -0.020254522562026978, 0.013432043604552746, 0.022587310522794724, 0.04598924517631531, 0.027937911450862885, 0.03836140036582947, -0.06731759011745453, 0.00971069186925888, -0.018671559169888496, -0.05643124878406525, -0.04780363664031029, -0.034473419189453125, -0.02764168381690979, 0.03712094947695732, 0.021346859633922577, -0.021809713914990425, 0.002892842050641775, -0.05924540385603905, 0.003837065538391471, 0.040509045124053955, -0.057616155594587326, 0.02554957941174507, -0.023587075993418694, 0.06050436943769455, -0.04528570547699928, 0.004288348834961653, -0.02995595708489418, 0.026253119111061096, 0.03399205207824707, 0.0409533865749836, 0.005345971789211035, 0.022716909646987915, -0.018782643601298332, 0.023161249235272408, 0.0016199914971366525, -0.018764130771160126, 0.048507172614336014, 0.0772411972284317, 0.02132834494113922, -0.06461451947689056, 0.03430679067969322, -0.026586374267935753, -0.07894449681043625, -0.054542798548936844, -0.015625976026058197, -0.09071952104568481, 0.008835896849632263, 0.03725054860115051, 0.0013110359432175756, -0.017320023849606514, 0.0002626700443215668, 0.06509588658809662, 0.040138762444257736, -0.010525315999984741, 0.014468838460743427, 0.04739632457494736, 0.029474588111042976, 0.0916082039475441, -0.03151115030050278, -0.01919921301305294, 0.012580391019582748, -0.00514231575652957, 0.03014109842479229, -0.01432072464376688, 0.009220065549015999, 0.017320023849606514, -0.029974471777677536, -0.013580157421529293, -0.01050680223852396, -0.04728523641824722, -0.026845574378967285, -0.016894197091460228, -0.05998597294092178, -0.08501715213060379, 0.013524615205824375, -0.01756996475160122, -0.006757678929716349, -0.03317742422223091, -0.040916357189416885, 0.022994622588157654, -0.0028141567017883062, -0.1041237935423851, 0.01497797854244709, 0.03271457180380821, 0.012765533290803432, 0.0925709456205368, -0.01787544973194599, -0.007308476138859987, -0.029585672542452812, 0.07320509850978851, 0.04080527275800705, 0.007951843552291393, 0.030937209725379944, -0.05931945890188217, -0.04217532277107239, -0.0023906445130705833, -0.03504735976457596, -0.017264481633901596, -0.04617438465356827, 0.03913899511098862, 0.036287810653448105, -0.0012277221539989114, -0.021532000973820686, -0.04887745901942253, -0.024494271725416183, 0.0428418330848217, 0.007766702212393284, 0.021050631999969482, 0.034436389803886414, 0.020902518182992935, 0.01566300354897976, 0.03023367002606392, -0.004267520271241665, 0.020180465653538704, -0.009155265986919403, 0.01870858669281006, -0.07483434677124023, 0.03541764244437218, -0.01372827123850584, 0.0320480614900589, 0.025086725130677223, 0.007248304784297943, 0.010534573346376419, 0.03128897771239281, 0.00835452787578106, 0.00808144360780716, -0.04724821075797081, 0.04076824337244034, 0.04017578810453415, 0.011451025493443012, 0.01014577504247427, -0.07235345244407654, 0.009238580241799355, -0.052580296993255615, 0.0014857635833323002, 0.009178409352898598, 0.022068912163376808, -0.08538743853569031, -0.05987488478422165, 0.05772724002599716, 0.02723437175154686, -0.10575304180383682, -0.02042114920914173, -0.0547279417514801, 0.040472015738487244, 0.06365177780389786, 0.029622701928019524, 0.04058310016989708, -0.04339725896716118, -0.004695660900324583, -0.030622467398643494, 0.030715038999915123, -0.005040487740188837, -0.001736862352117896, -0.040101733058691025, 0.05813455209136009, 0.040546074509620667, 0.00821567140519619, -0.030752066522836685, 0.01651465706527233, -0.0008175171678885818, 0.0017877763602882624, -0.013524615205824375, 0.03064098209142685, -0.023272335529327393, -0.021772686392068863, 0.01788470707833767, 0.03432530537247658, 0.004015264566987753, -0.042915888130664825, 0.012432277202606201, 0.014441067352890968, -0.07368647307157516, 0.024790499359369278, -0.03195548802614212, 0.06165224686264992, 0.027937911450862885, 0.02251325361430645, 0.003045584075152874, -0.024901583790779114, 0.1322653591632843, 0.048507172614336014, -0.039879560470581055, 0.015320491045713425, 0.0353250727057457, 0.03836140036582947, -0.05069184675812721, -0.01815316267311573, -0.018634531646966934, 0.01793099194765091, 0.09864359349012375, 0.002114088973030448, -0.0084008127450943, -0.01929178461432457, -0.004725746810436249, -0.0050590019673109055, -0.014765065163373947, -0.023087192326784134, -0.048359062522649765, -0.01652391254901886, -0.014542895369231701, 0.01413558330386877, 0.033344052731990814, 0.03140006214380264, 0.09634783864021301, 0.020495206117630005, 0.024938611313700676, 0.03412165120244026, 0.006475337315350771, 0.05587582290172577, -0.0032260974403470755, -0.02179119922220707, 0.05165458470582962, 0.011904623359441757, -0.02410547435283661, -0.05561662092804909, 0.0003312304033897817, -0.017458880320191383, 0.024309130385518074, -0.010043947026133537, 0.010321659967303276, 0.06998363137245178, 0.030844638124108315, -0.04943288490176201, 0.022976107895374298, -0.07953695207834244, 0.003894922323524952, -0.008442469872534275, 0.021309830248355865, 0.04543381929397583, -0.03401056304574013, -0.00959960650652647, -0.03234428912401199, -0.015542661771178246, 0.005887512117624283, -0.00821567140519619, 0.05224703997373581, 0.0077435593120753765, -0.044285938143730164, -0.02323530614376068, -0.045507874339818954, -0.057616155594587326, -0.013024731539189816, 0.02310570701956749, -0.0031103836372494698, -0.011293655261397362, 0.006850249599665403, -0.007257562130689621, 0.007465846370905638, 0.002255259547382593, 0.0186067596077919, -0.014792836271226406, -0.07390864193439484, 0.03373285010457039, 0.012913646176457405, -0.006655850913375616, 0.05043264850974083, 0.020347094163298607, -0.019717611372470856, -0.04402673989534378, -0.05528336763381958, -0.01982869580388069, -0.02192080020904541, 0.05883809179067612, 0.057838324457407, 0.027067743241786957, -0.03526952862739563, -0.003700523404404521, 0.0543946847319603, -0.00620688172057271, 0.023883303627371788, 0.00010435927106300369, -0.026067977771162987, 0.046322498470544815, 0.051987841725349426, 0.01674608327448368, -0.0009141380432993174, -0.0204766932874918, 0.03177034854888916, -0.03339959681034088, -0.023975873365998268, -0.046507641673088074, 0.0035871239379048347, -0.006924306508153677, -0.048322033137083054, -0.011886108666658401, -0.00404072180390358, -0.046137358993291855, 0.0088729253038764, 0.012108279392123222, 0.011154798790812492, 0.024753469973802567, 0.08264733850955963, 0.01472803670912981, -0.009914347901940346, -0.021661600098013878, 0.016644256189465523, -0.001119529828429222, 0.028345223516225815, -0.01796801947057247, 0.06679919362068176, 0.0063411095179617405, -0.013172845356166363, -0.005901397671550512, -0.0231427364051342, 0.022550281137228012, 0.007910187356173992, 0.012895132414996624, -0.03576941415667534, -0.06154116243124008, -0.0047905463725328445, -0.024531299248337746, -0.02651231735944748, 0.022568795830011368, 0.01643134281039238, -0.027438027784228325, 0.047322265803813934, 0.08923839032649994, -0.019236242398619652, 0.0009291808237321675, -0.04869231581687927, -0.005794940982013941, 0.04987722262740135, -0.05202487111091614, 0.006257795728743076, -0.03473261743783951, 0.052543267607688904, 0.050765905529260635, 0.06305932998657227, 0.0365840382874012, 0.027345456182956696, 0.03191846236586571, -0.005424657370895147, 0.04336022958159447, 0.010043947026133537, -0.006678993348032236, 0.015403805300593376, -0.009562578052282333, -0.05572770908474922, -0.02164308726787567, 0.001920847105793655, 0.03349216654896736, 0.02560512349009514, -0.025993920862674713, 0.01200645137578249, -0.010580859147012234, 0.0037444946356117725, 0.08449875563383102, -0.025494037196040154, -0.023772217333316803, 0.0650218278169632, -0.041101500391960144, 0.020402636379003525, -0.007655616849660873, -0.003908807877451181, 0.02914133295416832, -0.05228406935930252, 0.0500253364443779, -0.09020112454891205, 0.004482747986912727, -0.03591752424836159, 0.0024716441985219717, 0.04121258482336998, 0.0400276742875576, 0.0333070270717144, 0.04728523641824722, -0.00014044747513253242, -0.019625039771199226, 0.004610032774507999, -0.043508343398571014, 0.018366076052188873, 0.032473888248205185, 0.017958762124180794, 0.042138293385505676, -0.01230267807841301, 0.06413315236568451, 0.04099041223526001, -0.008974753320217133, -0.035565756261348724, -0.013894898816943169, -0.009451493620872498, 0.0075028748251497746, 0.021717144176363945, -0.09686623513698578, -0.02654934674501419, 0.007822244428098202, 0.017366308718919754, 0.002088631968945265, 0.0060772825963795185, -0.022254055365920067, -0.00567459873855114, -0.050173450261354446, 0.07450109720230103, 0.031881432980298996, -0.0054154000245034695, -0.0052765435539186, -0.07738930732011795, 0.006484594661742449, -0.047359295189380646, 0.010580859147012234, -0.042138293385505676, -0.004957173950970173, -0.0100069185718894, 0.05224703997373581, -0.023809246718883514, -0.02586432173848152, 0.051358360797166824, 0.02841928042471409, 0.0890902727842331, 0.041693951934576035, 0.007197390776127577, -0.021661600098013878, -0.05132133141160011, 0.01724596694111824, 0.052987609058618546, 0.012922903522849083, -0.07872232794761658, 0.006702136248350143, -0.06761381775140762, 0.048173919320106506, 0.016847912222146988, -0.003175183432176709, -0.053580060601234436, 0.012608162127435207, -0.045952215790748596, -0.03177034854888916, -0.0242350734770298, 0.056172046810388565, 0.051358360797166824, 0.02369816228747368, 0.019810181111097336, 0.02836373634636402, 0.00432306295260787, -0.045100562274456024, 0.0278268251568079, 0.028160080313682556, -0.050321564078330994, -0.031659264117479324, 0.006646593566983938, 0.036380380392074585, 0.03763934597373009, -0.040101733058691025, -0.007498246617615223, 0.037602316588163376, 0.010562344454228878, 0.0669102743268013, 0.031844403594732285, -0.06898386776447296, -0.051580529659986496, -0.039916589856147766, 0.0026197577826678753, 0.029344988986849785, 0.0543946847319603, -0.007220533676445484, 0.004510519094765186, 0.03913899511098862, -0.07131665199995041, 0.05976380035281181, -0.014329981990158558, -0.014515124261379242, 0.028696991503238678, 0.001842161756940186, -0.062022533267736435, -0.007424189709126949, 0.00525340111926198, -0.03736163303256035, -0.0005409614532254636, 0.008687783032655716, 0.05650530382990837, 0.026678945869207382, 0.018088363111019135, -0.004168006591498852, 0.01061788760125637, 0.0026544719003140926, -0.02945607341825962, -0.021272802725434303, -0.07235345244407654, 0.0256421510130167, -0.04906259849667549, 0.020273037254810333, 0.009942119009792805, -0.0634666383266449, -0.03432530537247658, -0.027586141601204872, -0.03943522274494171, 0.002749356906861067, 0.004952545277774334, 0.017995791509747505, -0.03621375188231468, -0.026753002777695656, 0.03693580627441406, -0.0032260974403470755, 0.03700986132025719, -0.06857655197381973, 0.018847443163394928, 0.0044619194231927395, -0.029400531202554703, 0.04702603816986084, -0.010775257833302021, 0.015042778104543686, -0.03589901328086853, 0.06646593660116196, -0.017542194575071335, -0.005845854990184307, -0.026382718235254288, 0.011256626807153225, -0.03712094947695732, -0.03245537355542183, -0.006493851542472839, 0.04084229841828346, -0.013385758735239506, -0.010025433264672756, 0.007326990365982056, 0.0381392277777195, -0.026567861437797546, -0.047729577869176865, -0.010951142758131027, -0.008474869653582573, -0.01009949017316103, 0.030603954568505287, -0.0059800827875733376, 0.006095796823501587, 0.06435532122850418, -0.018717844039201736, 0.006859506946057081, -0.06961335241794586, -0.01982869580388069, -0.009784748777747154, 0.0941261351108551, -0.05046967789530754, -0.0161073449999094, 0.008308242075145245, 0.0025619007647037506, -0.010479031130671501, -0.03086315281689167, -0.01597774401307106, 0.02132834494113922, -0.05809752270579338, 0.027382485568523407, -0.04484136402606964, -0.009682920761406422, -0.04217532277107239, 0.00741956103593111, -0.08775725215673447, 0.036750663071870804, 0.020865490660071373, 0.022716909646987915, -0.012321192771196365, 0.003031698288396001, -0.06357772648334503, 0.014292953535914421, 0.00783150177448988, 0.05146944522857666, -0.03621375188231468, -0.008997895754873753, -0.02723437175154686, -0.055801764130592346, 0.016422085464000702, 0.03136303648352623, 0.019643554463982582, -0.029900414869189262, -0.0025364437606185675, -0.016783112660050392, 0.031066808849573135, -0.011062228120863438, -0.01336724404245615, -0.02382776141166687, 0.033695824444293976, 0.07716713845729828, -0.0625409260392189, -0.08138837665319443, 0.013644956983625889, 0.05661638826131821, -0.01733853854238987, -0.016190657392144203, 0.028104538097977638, -0.023883303627371788, 0.008423956111073494, -0.0014059211825951934, -0.029696758836507797, -0.06809518486261368, -0.03317742422223091, -0.013644956983625889, 0.04487839341163635, -0.0032631256617605686, 0.03821328654885292, -0.020624805241823196, -0.049729108810424805, 0.03754677623510361, -0.006165224593132734, 0.0017924049170687795, -0.0009025667095556855, -0.017542194575071335, -0.017366308718919754, 0.029085790738463402, 0.015996258705854416, -0.04317508637905121, -0.0033464396838098764, 0.0659845694899559, 0.0716128796339035, -0.016329513862729073, 0.0049108886159956455, 0.04099041223526001, 0.0029692130628973246, -0.012061993591487408, 0.03210360184311867, -0.04447108134627342, -0.05306166410446167, -0.004552176222205162, 0.0017750478582456708, 0.004464233759790659, -0.009474636055529118, -0.09057141095399857, 0.020587777718901634, -0.006748421583324671, 0.035880498588085175, 0.022365139797329903, 0.009803262539207935, -0.047951746731996536, -0.017394080758094788, 0.04384160041809082, -0.0022691453341394663, -0.001972918165847659, -0.04498947784304619, 0.02595689333975315, 0.010951142758131027, 0.0035616669338196516, -0.004286034498363733, -0.035695355385541916, -0.0004909152630716562, 0.05550553649663925, 0.010867828503251076, 0.021994855254888535, 0.024475757032632828, 0.03843545541167259, -0.0013202930567786098, 0.022716909646987915, 0.021254288032650948, -0.013080274686217308, -0.012024965137243271, 0.0013202930567786098, 0.04143475368618965, -0.0026359576731920242, -0.02741951309144497, 0.01833830401301384, -0.005021973513066769, 0.03521398827433586, 0.015422319062054157, -0.02832670882344246, 0.03199251741170883, -0.01091411430388689, -0.03191846236586571, 0.003198326099663973, 0.052543267607688904, -0.01486689317971468, 0.019402869045734406, 0.027271399274468422, -0.039398193359375, 0.04154583811759949, -0.004244377836585045, 0.03501033037900925, -0.004288348834961653, 0.021161718294024467, 0.019236242398619652, -0.03351068124175072, -0.04747037962079048, 0.03462153300642967, 0.00853504054248333, 0.014987235888838768, -0.03193697705864906, -0.005531114060431719, -0.08242516964673996, 0.036010097712278366, 0.04358239844441414, 0.05428360030055046, 0.0055496278218925, 0.06668810546398163, -0.04424891248345375 ]
716,064
pytorch_optimizer.lr_scheduler.linear_warmup
_step
null
def _step(self) -> float: phase: float = (self.step_t - self.warmup_steps) / (self.total_steps - self.warmup_steps) * math.pi return self.min_lr + (self.max_lr - self.min_lr) * (np.cos(phase) + 1.0) / 2.0
(self) -> float
[ -0.04340291768312454, -0.0011682437034323812, -0.0125458724796772, 0.05141632258892059, 0.019036367535591125, 0.0426052026450634, 0.008897235617041588, -0.02123008295893669, -0.10580594092607498, 0.05351938679814339, 0.036785513162612915, -0.004360234830528498, 0.06679045408964157, 0.073788583278656, -0.021012524142861366, 0.005312053021043539, 0.05558619275689125, 0.046339958906173706, -0.05707284435629845, -0.025309303775429726, 0.04579606279730797, 0.028536422178149223, -0.03673112392425537, 0.020015381276607513, -0.04876936227083206, -0.012337379157543182, 0.047391489148139954, -0.010923248715698719, -0.05594879016280174, -0.03622348606586456, -0.017123665660619736, 0.026107018813490868, 0.032597512006759644, -0.050038453191518784, 0.01731402985751629, -0.05370068550109863, 0.011041092686355114, -0.020994393154978752, -0.0679507702589035, -0.022734861820936203, -0.006173221860080957, 0.004591390490531921, -0.004253721795976162, 0.048189204186201096, -0.02311558835208416, -0.00469563715159893, -0.029533565044403076, -0.011866002343595028, 0.05032853037118912, -0.0162081066519022, 0.004840676207095385, -0.029896162450313568, 0.02327875792980194, -0.003238448640331626, 0.03945060446858406, 0.038797929883003235, 0.014893691055476665, -0.09978682547807693, -0.014413249678909779, 0.03803647682070732, 0.03620535880327225, -0.023895174264907837, 0.01640753634274006, 0.04126359149813652, 0.0385078527033329, 0.024565979838371277, -0.00305714993737638, 0.02539995312690735, -0.0019127016421407461, 0.008883638307452202, 0.0011965716257691383, 0.007895560003817081, 0.025889459997415543, -0.018963847309350967, 0.028137564659118652, 0.018710030242800713, -0.031255900859832764, -0.050038453191518784, 0.03392099216580391, -0.05928468704223633, 0.015229093842208385, 0.04485330730676651, 0.0008243427146226168, 0.004484877455979586, -0.014857431873679161, -0.031255900859832764, -0.044672008603811264, -0.048261724412441254, -0.0773783028125763, -0.001261159311980009, -0.013733379542827606, -0.005982858128845692, 0.0104337427765131, 0.03569772094488144, 0.03774639591574669, 0.044236890971660614, -0.08448521047830582, 0.007256481796503067, -0.012464288622140884, -0.026487745344638824, 0.06301943957805634, 0.06392593681812286, -0.009237171150743961, 0.05108998343348503, 0.04797164723277092, 0.012636521831154823, 0.004935858305543661, -0.03595153987407684, 0.03734754025936127, 0.008027001284062862, 0.008317079395055771, 0.02801065519452095, -0.06439731270074844, 0.040103279054164886, -0.06450609117746353, -0.03424733132123947, 0.02918909676373005, 0.03504504635930061, 0.013017249293625355, 0.07400614768266678, 0.020958134904503822, -0.020486757159233093, 0.002785201882943511, -0.0037120915949344635, 0.009572573006153107, -0.025835070759058, 0.0352807343006134, 0.03606031835079193, -0.05326556786894798, -0.03160037100315094, 0.030857045203447342, 0.006980001460760832, 0.019036367535591125, -0.08122183382511139, -0.03022249974310398, -0.0029098447412252426, 0.047246452420949936, 0.019000107422471046, 0.01613558828830719, 0.03839907422661781, 0.013062573969364166, 0.046376217156648636, 0.025671901181340218, -0.03270629048347473, 0.02536369301378727, 0.05906713008880615, 0.006844027433544397, 0.09188219904899597, 0.05373694747686386, 0.019272055476903915, 0.003920585382729769, -0.03622348606586456, 0.11160749942064285, 0.022118445485830307, 0.014830236323177814, -0.0031681954860687256, -0.012101690284907818, 0.007424183189868927, -0.045143384486436844, -0.013280132785439491, -0.022553563117980957, -0.03486374765634537, -0.02287990041077137, -0.01404158677905798, -0.004323974717408419, 0.03566146269440651, -0.026252057403326035, 0.05772551894187927, -0.022734861820936203, -0.015646081417798996, 0.03645917773246765, -0.04206130653619766, 0.011285846121609211, 0.021592680364847183, 0.020523017272353172, 0.06410723179578781, 0.03214426711201668, 0.036948684602975845, -0.014866496436297894, 0.03569772094488144, 0.021411381661891937, 0.022354135289788246, -0.016017744317650795, -0.06407097727060318, -0.0008379400824196637, 0.03595153987407684, 0.010796340182423592, -0.01039748266339302, 0.03771013766527176, -0.01222859974950552, 0.013579275459051132, 0.011086417362093925, 0.0097810672596097, -0.02666904404759407, -0.016987692564725876, 0.002215243875980377, 0.021846497431397438, 0.014830236323177814, 0.10500822961330414, -0.025146134197711945, -0.0283188633620739, 0.0071069104596972466, -0.0186918992549181, 0.01355208083987236, -0.05050982907414436, -0.04075595736503601, -0.02536369301378727, 0.031056473031640053, -0.02066805586218834, 0.030566968023777008, -0.025236783549189568, -0.030603226274251938, 0.006005520466715097, 0.008842846378684044, -0.003673565573990345, -0.03959564492106438, -0.024112731218338013, 0.0015557698206976056, 0.0536644272506237, 0.023895174264907837, 0.009264365769922733, -0.05964728444814682, 0.03930556774139404, -0.03214426711201668, 0.01163937896490097, -0.05170639976859093, 0.012727171182632446, -0.05174265801906586, -0.07679814845323563, -0.00472283223643899, -0.016353145241737366, -0.02193714678287506, 0.003068481106311083, 0.022227225825190544, 0.04202504828572273, 0.05304801091551781, -0.02170145884156227, 0.014268211089074612, -0.019308315590023994, -0.003256578464061022, -0.0351538248360157, -0.0199972502887249, 0.0041381437331438065, 0.021483900025486946, -0.03350400552153587, 0.04304032027721405, 0.046448737382888794, -0.030784524977207184, -0.03959564492106438, 0.027049772441387177, -0.034573670476675034, 0.004373832140117884, 0.03408416360616684, 0.013443301431834698, 0.031691018491983414, 0.03930556774139404, 0.09956926852464676, 0.06780572980642319, 0.01653444580733776, 0.03170914947986603, -0.010914184153079987, -0.0752752348780632, 0.013896548189222813, 0.0008521040435880423, -0.07498516142368317, 0.031020214781165123, -0.00785023532807827, -0.0031047409866005182, 0.004926793277263641, 0.024294031783938408, 0.14105041325092316, 0.0055522737093269825, -0.076508067548275, -0.044236890971660614, 0.03890670835971832, 0.014685197733342648, 0.030639486387372017, 0.026614654809236526, -0.00487240357324481, 0.02516426518559456, 0.04488956928253174, -0.08506536483764648, -0.0312377717345953, 0.01630782149732113, -0.09942422807216644, 0.014630808494985104, 0.012980989180505276, 0.011630314402282238, 0.04811668395996094, -0.019743433222174644, -0.007755053695291281, -0.0037166241090744734, 0.029533565044403076, 0.027013512328267097, 0.10116469860076904, 0.013688054867088795, -0.05772551894187927, -0.05569497123360634, -0.0031908578239381313, 0.03861663118004799, 0.043221618980169296, -0.021429510787129402, -0.01623530127108097, 0.025182394310832024, -0.03901548683643341, 0.018138939514756203, 0.01444044429808855, 0.01536506786942482, 0.01607213355600834, -0.04046587646007538, -0.06642785668373108, 0.009282495826482773, 0.008117650635540485, -0.010814469307661057, -0.021792108193039894, -0.02355070598423481, -0.03187231719493866, -0.009364079684019089, -0.006059910170733929, 0.01898197829723358, -0.0027466758619993925, 0.02848203107714653, 0.023913303390145302, 0.0274486280977726, -0.0030254225712269545, -0.07088780403137207, 0.04924073815345764, -0.012953794561326504, -0.01874629035592079, -0.04702889174222946, -0.045433465391397476, -0.04586857929825783, -0.018637510016560555, 0.044128112494945526, -0.01677919737994671, -0.06135149300098419, 0.04561476409435272, 0.02237226441502571, -0.0034537408500909805, -0.004627650137990713, 0.04137237370014191, 0.00860715750604868, 0.015854574739933014, 0.05286671221256256, 0.02706790156662464, -0.034700579941272736, 0.01774008199572563, -0.015927094966173172, 0.0458323210477829, -0.0018605783116072416, -0.01630782149732113, -0.03538951277732849, -0.030548837035894394, -0.003249779809266329, -0.02327875792980194, 0.021429510787129402, -0.08064167946577072, -0.03814525529742241, -0.0036214422434568405, -0.04427315294742584, -0.015337873250246048, 0.025980109348893166, -0.04246016591787338, 0.07636302709579468, 0.022227225825190544, 0.00520780635997653, -0.07016260921955109, -0.013225742615759373, 0.008697806857526302, 0.05351938679814339, -0.02592572011053562, -0.01224672980606556, -0.01279969047755003, 0.016162782907485962, -0.026252057403326035, 0.03796395659446716, 0.023460056632757187, 0.01593615859746933, 0.010832599364221096, -0.028119433671236038, 0.026759693399071693, 0.008063261397182941, -0.06193164736032486, 0.0032520461827516556, 0.028137564659118652, -0.006921079475432634, -0.027267329394817352, -0.058958347886800766, 0.02284364029765129, -0.044599488377571106, 0.00313193560577929, -0.022027796134352684, 0.0018991043325513601, -0.050908684730529785, -0.03147346153855324, 0.01945335417985916, -0.027829356491565704, 0.022825511172413826, -0.019580263644456863, 0.029878031462430954, -0.010723819956183434, -0.019544003531336784, 0.029732992872595787, 0.012600262649357319, -0.01065130066126585, -0.08927150070667267, 0.030113721266388893, 0.03778265789151192, 0.010805404745042324, 0.010859793983399868, -0.005393637344241142, 0.01972530223429203, -0.0011931722983717918, 0.0016951431753113866, -0.03667673468589783, -0.01694236695766449, -0.05594879016280174, -0.05076364800333977, -0.033467747271060944, 0.015963353216648102, -0.0017064743442460895, 0.03442863002419472, 0.00028993634623475373, 0.026215797290205956, 0.03843533247709274, 0.018302107229828835, 0.01623530127108097, 0.010225248523056507, -0.0031704616267234087, 0.014966210350394249, -0.031183382496237755, 0.028989668935537338, -0.04677507281303406, -0.013126028701663017, -0.018637510016560555, 0.029714863747358322, 0.011530599556863308, 0.0017971236957237124, 0.01992473192512989, -0.013162288814783096, 0.010379352606832981, 0.020106030628085136, 0.015301613137125969, 0.009336885064840317, 0.006907481700181961, -0.02307933010160923, -0.028772110119462013, -0.057979337871074677, -0.025309303775429726, 0.014522029086947441, -0.005493351723998785, -0.01700582168996334, 0.005339247640222311, -0.020414238795638084, 0.035643331706523895, -0.013026313856244087, -0.0717943012714386, -0.033467747271060944, -0.018338367342948914, -0.04840676113963127, 0.043257877230644226, 0.08825622498989105, -0.002347818575799465, -0.01454015914350748, 0.007220222149044275, -0.004480345174670219, 0.023024939000606537, 0.06940115988254547, -0.006612871307879686, 0.009268897585570812, 0.01741374284029007, 0.02824634313583374, 0.050401050597429276, -0.0010787275386974216, 0.021919017657637596, -0.0025721758138388395, -0.046448737382888794, 0.006254806648939848, 0.00288944854401052, -0.031092733144760132, -0.07128666341304779, -0.06871221959590912, 0.01412317156791687, 0.02070431597530842, 0.02737610973417759, 0.07817601412534714, -0.06947367638349533, 0.008969754911959171, 0.06349081546068192, -0.008434923365712166, -0.007877429947257042, 0.0040338970720767975, 0.005760767497122288, -0.0028123967349529266, -0.05014723166823387, -0.03373969346284866, 0.06816832721233368, 0.024874186143279076, 0.05547741428017616, 0.05685528367757797, 0.004917728248983622, -0.018329301849007607, 0.015002470463514328, -0.0020702050533145666, -0.01965278387069702, -0.01504779513925314, -0.050002191215753555, -0.03355839475989342, -0.06454235315322876, 0.054027024656534195, 0.06834962218999863, 0.004260520450770855, -0.031255900859832764, -0.03377595543861389, 0.018202392384409904, -0.010306833311915398, -0.03352213650941849, 0.053120531141757965, 0.014431379735469818, -0.0118931969627738, -0.05301175266504288, -0.010134599171578884, -0.013280132785439491, -0.043294139206409454, -0.012980989180505276, 0.0449620857834816, -0.03638665750622749, -0.03711185231804848, -0.000921224185731262, 0.02817382477223873, 0.020069770514965057, -0.03807273507118225, -0.005982858128845692, 0.062040429562330246, 0.003580650081858039, 0.03662234544754028, -0.06135149300098419, -0.08122183382511139, -0.002433935645967722, -0.03395725414156914, 0.0006016851984895766, -0.0705614686012268, 0.020758705213665962, 0.006286533549427986, 0.00882018357515335, 0.009971430525183678, -0.03665860369801521, 0.049095697700977325, -0.01724150963127613, 0.03571585193276405, -0.01667041890323162, 0.016017744317650795, -0.045542243868112564, -0.010207119397819042, 0.03716624155640602, 0.013660860247910023, 0.0010945911053568125, 0.02576255053281784, -0.015591691248118877, 0.009536313824355602, -0.017486263066530228, -0.05830567330121994, 0.03818151354789734, -0.05830567330121994, -0.036114707589149475, -0.04213382676243782, -0.0036146435886621475, 0.007202092558145523, -0.03640478476881981, 0.011684703640639782, 0.0037982086651027203, 0.05145258083939552, 0.007809442933648825, -0.012165145017206669, -0.011920391581952572, -0.023024939000606537, 0.05681902542710304, 0.01001675520092249, -0.0063001313246786594, -0.02773870714008808, 0.02733984962105751, -0.016561640426516533, 0.005806092172861099, -0.010723819956183434, -0.018365561962127686, 0.002538182307034731, -0.02596197836101055, 0.028373252600431442, -0.027122290804982185, -0.03760135918855667, -0.06486868858337402, -0.03100208379328251, -0.07781341671943665, -0.04202504828572273, -0.028119433671236038, -0.05214151740074158, -0.019743433222174644, -0.02525491453707218, 0.020976264029741287, 0.044599488377571106, -0.002026013331487775, -0.024946706369519234, 0.015120314434170723, 0.01623530127108097, 0.014594548381865025, -0.025907589122653008, -0.006907481700181961, -0.0005846884450875223, -0.07280956953763962, -0.0688209980726242, 0.02616140805184841, -0.0385078527033329, 0.024638498201966286, -0.014231950975954533, -0.0020441431552171707, -0.004822546616196632, 0.0417349711060524, -0.07288209348917007, 0.050038453191518784, 0.03176353871822357, 0.013515820726752281, -0.03009559027850628, -0.02287990041077137, -0.008860975503921509, 0.052649155259132385, -0.020504888147115707, 0.03948686644434929, -0.015256288461387157, 0.02268047258257866, -0.11371056735515594, -0.02177397906780243, 0.02016041986644268, -0.01404158677905798, -0.11856937408447266, 0.010605975985527039, 0.07422370463609695, -0.03462805971503258, 0.023333147168159485, -0.008788456209003925, -0.040103279054164886, 0.018166134133934975, 0.06972749531269073, -0.04336665943264961, 0.0011965716257691383, 0.010379352606832981, -0.0057335724122822285, -0.038797929883003235, 0.04565102234482765, 0.05467969924211502, 0.05547741428017616, -0.010560651309788227, 0.04717393219470978, 0.034700579941272736, 0.04612239822745323, -0.0025880394969135523, -0.06312821805477142, -0.002012416021898389, 0.05163387954235077, 0.03595153987407684, -0.06294692307710648, -0.06737060844898224, 0.02525491453707218, -0.021755848079919815, -0.0112405214458704, 0.010152729228138924, -0.027557408437132835, -0.00453700078651309, -0.050038453191518784, -0.0467025563120842, -0.06149653345346451, -0.05199647694826126, -0.04075595736503601, -0.0018277178751304746, 0.028808370232582092, 0.0050355722196400166, 0.007995273917913437, 0.004360234830528498, -0.03508130460977554, 0.04847928136587143, -0.00347187090665102, -0.02801065519452095, -0.01858312077820301, -0.028228214010596275, -0.007446845527738333, 0.0171417947858572, -0.007501235231757164, 0.0025653771590441465, 0.030240628868341446, -0.02603449858725071, 0.056275129318237305, -0.05391824617981911, -0.0076508065685629845, -0.053555648773908615, 0.05370068550109863, 0.045070867985486984, -0.03843533247709274, -0.003195390338078141, 0.015482911840081215, 0.05877704918384552, -0.013651794753968716, 0.03847159072756767, -0.030838916078209877, -0.012001976370811462, -0.01865564100444317, -0.002343286294490099, 0.03829029202461243, 0.061133936047554016, -0.023532576858997345, -0.045578502118587494, 0.03720249980688095, 0.05243159458041191, 0.00693467678502202, -0.0057698325254023075, 0.00968135241419077, 0.02549060247838497, -0.0035851825959980488, -0.07324469089508057, -0.0058242217637598515, -0.01874629035592079, 0.010053015314042568, -0.060227442532777786, -0.03669486567378044, 0.03606031835079193, 0.03981320187449455, -0.06523128598928452, 0.0015501042362302542, 0.028355123475193977, 0.046448737382888794, -0.024348421022295952, 0.027666186913847923, -0.06501372903585434, 0.03491813689470291, -0.029606083407998085, 0.015782054513692856, 0.016126522794365883, 0.02200966700911522, -0.022426653653383255, 0.026415226981043816, 0.03163662925362587, -0.011539665050804615, 0.06428853422403336, 0.02918909676373005, 0.026777824386954308, -0.05286671221256256, 0.03908800706267357, 0.029334135353565216, -0.013814963400363922, -0.045107126235961914, 0.024602238088846207, -0.04246016591787338, 0.04003076255321503, 0.02280738204717636, 0.000587521237321198, 0.007360728923231363, 0.021683329716324806, -0.04126359149813652, 0.018501536920666695, 0.009572573006153107, -0.013017249293625355, -0.003659968264400959, -0.025980109348893166, -0.06602899730205536, 0.053120531141757965, 0.05011096969246864, 0.04162618890404701, 0.03372156620025635, -0.003920585382729769, -0.008022469468414783 ]
716,065
pytorch_optimizer.base.scheduler
get_lr
null
def get_lr(self) -> float: return self.last_lr[0]
(self) -> float
[ -0.03817324712872505, 0.03052481822669506, -0.015977295115590096, 0.08943840116262436, 0.03955134376883507, 0.016287367790937424, 0.01035294309258461, -0.0210848618298769, 0.01739845611155033, 0.011326223611831665, -0.010189294815063477, -0.0400681309401989, 0.021705005317926407, 0.05095508322119713, 0.008557111956179142, 0.056743085384368896, -0.009844770655035973, 0.019482826814055443, -0.022152887657284737, -0.004250563681125641, 0.00963805615901947, 0.039723604917526245, -0.0027648042887449265, 0.014616426080465317, -0.03931017592549324, -0.008880103938281536, 0.02790643647313118, -0.012273663654923439, -0.01896604150533676, 0.006886171642690897, -0.029146721586585045, -0.02077479101717472, 0.001365175936371088, -0.038758937269449234, -0.0105079784989357, -0.005921504460275173, -0.022256243973970413, -0.019982386380434036, -0.07338359206914902, -0.015494962222874165, -0.010447687469422817, -0.02377214841544628, 0.016046199947595596, 0.0399303212761879, -0.05222982168197632, -0.03224743530154228, -0.020051291212439537, -0.03030087612569332, 0.020154647529125214, -0.04247979819774628, 0.055089373141527176, 0.009233240969479084, -0.013780956156551838, -0.023720471188426018, -0.011705199256539345, 0.011179800145328045, 0.0056760311126708984, -0.049473632127046585, -0.008992074057459831, 0.03267809376120567, 0.05446922779083252, -0.06449487060308456, -0.008664775639772415, 0.03272977098822594, 0.08371930569410324, 0.00764843076467514, -0.007885290309786797, 0.0402059406042099, 0.004638153128325939, 0.029370661824941635, -0.012170306406915188, -0.014116866514086723, 0.012256437912583351, -0.0210159569978714, -0.000819859211333096, 0.024185577407479286, -0.03369443863630295, -0.027182934805750847, 0.0014050115132704377, -0.005396105814725161, 0.009371049702167511, 0.07414153963327408, 0.05140296742320061, -0.01489204540848732, -0.010516592301428318, -0.08847373723983765, -0.027114031836390495, -0.019448373466730118, -0.06611413508653641, 0.027579138055443764, -0.042135272175073624, 0.007523540873080492, -0.0013038075994700193, 0.03450406715273857, -0.007644123863428831, -0.014556135050952435, -0.06811237335205078, 0.02055085077881813, 0.018259767442941666, -0.042204178869724274, 0.0012327495496720076, 0.06749223172664642, -0.014530295506119728, 0.05088618025183678, 0.030662627890706062, 0.013591467402875423, -0.00963805615901947, -0.022859159857034683, 0.03388392552733421, 0.003921112511307001, -0.05371127650141716, 0.01996516063809395, -0.04168739169836044, 0.05843125283718109, -0.03465910255908966, 0.01829421892762184, -0.014383872970938683, 0.05653637275099754, 0.007355585228651762, 0.0847528800368309, 0.04275541752576828, 0.00620573665946722, -0.03703631833195686, 0.00006742440746165812, -0.03955134376883507, 0.0020154647063463926, 0.02401331625878811, 0.011197026818990707, 0.008130763657391071, -0.01996516063809395, 0.037622008472681046, 0.012273663654923439, -0.013307235203683376, -0.010464913211762905, 0.021618874743580818, 0.00204345746897161, 0.046614084392786026, 0.03772536665201187, -0.005899971816688776, 0.009956740774214268, 0.02048194594681263, 0.06452932953834534, 0.08330588042736053, -0.04123951122164726, 0.037174127995967865, 0.06022277846932411, -0.008638937026262283, 0.11954979598522186, -0.006085153203457594, -0.01576196774840355, 0.018655968829989433, -0.021877268329262733, 0.07820692658424377, 0.013979056850075722, 0.015305474400520325, -0.006166977807879448, -0.02730351872742176, -0.0028552417643368244, -0.019551731646060944, -0.04957699030637741, -0.033728890120983124, -0.004448664840310812, -0.014917884953320026, -0.08626878261566162, 0.02167055383324623, 0.011748264543712139, -0.013884313404560089, 0.033057067543268204, -0.03906901180744171, 0.023048648610711098, 0.014470003545284271, -0.06370247155427933, -0.014065188355743885, 0.021119315177202225, -0.006059314124286175, 0.046993058174848557, -0.007941275835037231, 0.047372035682201385, -0.02377214841544628, 0.08413273841142654, 0.07083411514759064, -0.012799062766134739, -0.009732800535857677, -0.09481297433376312, 0.007549379952251911, 0.01891436241567135, -0.009164336137473583, 0.005525302141904831, -0.020447492599487305, 0.018276993185281754, 0.04906020313501358, 0.003212685463950038, 0.0068603320978581905, -0.06859470903873444, -0.006188510451465845, 0.0014696097932755947, 0.022445732727646828, 0.04247979819774628, 0.060946278274059296, -0.02663169801235199, 0.024357840418815613, 0.015796421095728874, -0.016115104779601097, 0.007239308673888445, -0.07779349386692047, -0.034383486956357956, -0.06483940035104752, 0.03097269870340824, -0.06218656525015831, 0.010852502658963203, -0.007880983874201775, 0.012773223221302032, -0.013806795701384544, -0.005783694796264172, -0.007092885673046112, -0.06604523211717606, -0.061635326594114304, 0.007424490060657263, 0.04330665245652199, 0.023823827505111694, 0.05746658518910408, -0.10211688280105591, 0.013315849006175995, -0.03744974732398987, 0.012006658129394054, -0.03917236626148224, 0.002085446147248149, -0.027355197817087173, -0.04037820175290108, 0.027286292985081673, 0.02468513697385788, -0.05160968005657196, 0.00382421538233757, -0.02618381567299366, 0.03471078351140022, 0.03955134376883507, -0.02184281498193741, 0.07248783111572266, -0.06129080057144165, 0.017079772427678108, -0.01867319457232952, 0.03855222463607788, 0.0243750661611557, 0.03662288933992386, -0.010309877805411816, 0.04709641635417938, 0.05977489799261093, 0.0005673877894878387, -0.0679401159286499, 0.02287638746201992, -0.01763962395489216, 0.002547323703765869, 0.03900010511279106, 0.03689850866794586, 0.028113150969147682, 0.0071273380890488625, 0.01361730694770813, 0.012721545062959194, 0.015563867054879665, 0.0019433301640674472, 0.04041265323758125, -0.034383486956357956, -0.0121530806645751, -0.018259767442941666, -0.0976380705833435, 0.06160087510943413, -0.013031616806983948, -0.008216895163059235, 0.02385828085243702, 0.02235960029065609, 0.13422651588916779, 0.012006658129394054, -0.0658385157585144, -0.06439151614904404, 0.02477126754820347, -0.03479691222310066, 0.022256243973970413, 0.01905217207968235, -0.006175591144710779, 0.03576157987117767, 0.0264766626060009, -0.042789869010448456, -0.02144661359488964, -0.016115104779601097, -0.034021735191345215, 0.01188607420772314, 0.010895567946135998, -0.041963011026382446, -0.007566606160253286, 0.016864445060491562, 0.03555486723780632, -0.031041603535413742, 0.024099446833133698, 0.045201536267995834, 0.12320175021886826, -0.04430577531456947, 0.02956015057861805, -0.03052481822669506, 0.05918920785188675, 0.050369393080472946, -0.019551731646060944, -0.009879223071038723, 0.033797793090343475, 0.013815408572554588, -0.060739561915397644, -0.030576495453715324, 0.038448866456747055, -0.01791524328291416, 0.006589019671082497, -0.01286796759814024, -0.03734638914465904, 0.05677754059433937, 0.01807027868926525, -0.022462958469986916, -0.02602878026664257, -0.017898017540574074, -0.005964570213109255, 0.009474406950175762, 0.015210730023682117, 0.014831753447651863, -0.029060591012239456, 0.02378937602043152, 0.03395283222198486, -0.005882745608687401, 0.021877268329262733, -0.04423686861991882, -0.026132138445973396, 0.02296251803636551, -0.006610552314668894, -0.01664050482213497, 0.005809534341096878, -0.11217698454856873, -0.024891851469874382, 0.011265931650996208, 0.015047081746160984, -0.004347460810095072, 0.035968296229839325, 0.03129999712109566, 0.035589318722486496, -0.02926730550825596, 0.024736816063523293, -0.06380582600831985, -0.017389843240380287, 0.05092063173651695, 0.03512421250343323, 0.02573593519628048, 0.060188326984643936, 0.007967115379869938, 0.04826779663562775, 0.007510621100664139, -0.05140296742320061, -0.01391876582056284, -0.049473632127046585, 0.028492126613855362, -0.03510698676109314, 0.0031782330479472876, -0.05663973093032837, -0.002415973925963044, 0.03490027040243149, -0.010826663114130497, -0.05626075342297554, -0.009905061684548855, -0.06494275480508804, 0.053160037845373154, -0.0002869238087441772, 0.030266424641013145, -0.04778546467423439, 0.018414802849292755, 0.014581973664462566, 0.009508859366178513, -0.05829344317317009, -0.017200356349349022, -0.002250171732157469, 0.048646774142980576, -0.01485759299248457, 0.017226194962859154, 0.01634765975177288, -0.005086034070700407, 0.016063427552580833, -0.02783753164112568, 0.0011778410989791155, 0.02768249623477459, -0.00545639730989933, 0.019534505903720856, 0.04806108400225639, 0.009052365086972713, -0.0326436385512352, -0.07469277828931808, -0.007355585228651762, -0.011016151867806911, 0.010275425389409065, -0.022617993876338005, -0.03314319998025894, -0.046407368034124374, -0.06380582600831985, 0.008406382985413074, -0.0006842029397375882, 0.0027174323331564665, 0.011033377610147, -0.02595987543463707, -0.011128121986985207, 0.012764610350131989, -0.026132138445973396, 0.006011941935867071, -0.03638172522187233, 0.00029392194119282067, 0.02971518598496914, 0.04210082069039345, -0.051954202353954315, -0.03121386468410492, -0.0694904699921608, 0.014409712515771389, -0.008763826452195644, -0.012790449894964695, 0.014805914834141731, 0.009517473168671131, 0.005714789964258671, -0.008992074057459831, 0.001949789933860302, 0.03665734454989433, -0.018793778494000435, 0.028388770297169685, -0.004246257245540619, 0.021946173161268234, 0.026287173852324486, 0.01807027868926525, -0.0120841758325696, 0.014754235744476318, -0.02242850512266159, 0.015882551670074463, 0.005826760549098253, -0.038207702338695526, 0.0016957035986706614, -0.050610560923814774, -0.022566314786672592, -0.011705199256539345, -0.016037587076425552, 0.007661350071430206, -0.010232360102236271, -0.026614470407366753, 0.0757952556014061, 0.01808750443160534, 0.03610610589385033, 0.03135167434811592, -0.010783597826957703, -0.07503730803728104, -0.036795154213905334, -0.02678673341870308, -0.0637369230389595, -0.01444416493177414, -0.047303132712841034, 0.00031410891097038984, 0.06142861023545265, 0.05305667966604233, 0.032299116253852844, 0.0058741322718560696, -0.0969490259885788, -0.05433141812682152, 0.050369393080472946, -0.02768249623477459, 0.0013081141514703631, 0.07052404433488846, 0.037622008472681046, 0.01264402735978365, -0.010990312322974205, -0.01661466434597969, 0.033728890120983124, -0.03059372305870056, -0.07903378456830978, -0.011713813059031963, 0.01956895738840103, -0.007928356528282166, 0.015055694617331028, -0.06449487060308456, -0.003389253979548812, 0.007941275835037231, 0.009327984414994717, -0.03713967651128769, 0.0465107262134552, -0.06297896802425385, -0.039275724440813065, -0.04671744257211685, -0.00275834440253675, 0.019896255806088448, 0.01943114772439003, 0.045339345932006836, -0.12058336287736893, 0.03257473558187485, 0.0048534804955124855, -0.01867319457232952, -0.04685525223612785, 0.059981610625982285, -0.0031222477555274963, 0.02249740995466709, -0.0886804535984993, -0.023582661524415016, 0.08261682838201523, -0.013315849006175995, 0.05123070254921913, 0.06728551536798477, 0.014831753447651863, -0.037622008472681046, -0.0018959580920636654, -0.016295980662107468, 0.005895665381103754, -0.010499365627765656, -0.09116102755069733, -0.009999806061387062, -0.038138795644044876, 0.008845651522278786, 0.009922288358211517, 0.020499171689152718, -0.009930901229381561, 0.016735248267650604, -0.07669101655483246, -0.04544270411133766, -0.007290986832231283, 0.0589824914932251, 0.03531369939446449, 0.012592348270118237, -0.034383486956357956, 0.044443584978580475, -0.0016580212395638227, -0.05522718280553818, -0.003781149862334132, 0.05829344317317009, -0.06783675402402878, -0.035003628581762314, 0.016407949849963188, 0.03931017592549324, 0.03910346329212189, -0.01414270605891943, 0.017467360943555832, 0.01891436241567135, -0.027217388153076172, 0.0329192578792572, -0.01609787903726101, -0.08296135812997818, -0.05867242068052292, -0.04950808361172676, -0.006670843809843063, -0.06955937296152115, 0.02303142286837101, 0.013195265084505081, 0.020137421786785126, -0.02589097060263157, -0.03955134376883507, 0.07682882994413376, 0.0040373895317316055, 0.02242850512266159, 0.028784971684217453, -0.038069892674684525, -0.009457181207835674, -0.04303103685379028, 0.017424296587705612, 0.04420241713523865, -0.014254676178097725, 0.052781060338020325, 0.056915346533060074, -0.027217388153076172, 0.007704415824264288, -0.03397005796432495, 0.05453813448548317, 0.0017150830244645476, -0.01650269515812397, -0.024926304817199707, -0.010120389983057976, 0.02859548293054104, -0.04434022679924965, -0.007058433257043362, 0.0018367430893704295, 0.027665268629789352, 0.02334149368107319, -0.038379963487386703, 0.01061133574694395, 0.017312325537204742, 0.021050410345196724, -0.022686898708343506, -0.03061094880104065, -0.013100521638989449, 0.03655398637056351, 0.0064813559874892235, 0.032746996730566025, -0.06518392264842987, 0.01515043806284666, 0.019413921982049942, -0.04516708478331566, 0.03906901180744171, -0.03114495985209942, 0.0035141438711434603, -0.04134286940097809, 0.021205445751547813, -0.030111389234662056, -0.0019110309658572078, 0.030662627890706062, -0.017088385298848152, -0.029439566656947136, -0.01994793303310871, 0.00017253111582249403, 0.07503730803728104, 0.0010195754002779722, -0.013729277066886425, -0.011670746840536594, 0.006274641491472721, -0.009982580319046974, -0.025856519117951393, -0.004272096324712038, -0.025236375629901886, -0.010740532539784908, -0.05064501240849495, 0.009724186733365059, -0.0007197319646365941, -0.0014340807683765888, -0.029008911922574043, 0.032746996730566025, -0.04285877197980881, -0.00463384622707963, -0.0019110309658572078, 0.010266812518239021, 0.038896746933460236, 0.028991686180233955, 0.023961637169122696, -0.005783694796264172, -0.006029168143868446, 0.01482314057648182, 0.009999806061387062, 0.008768132887780666, -0.036209460347890854, 0.03555486723780632, -0.06008496880531311, -0.008470981381833553, -0.006666537374258041, 0.012583735398948193, -0.09791368991136551, 0.011515711434185505, 0.044443584978580475, 0.02453010156750679, -0.0016569446306675673, -0.007949888706207275, -0.04037820175290108, -0.04509817808866501, 0.08792249858379364, 0.0003652491723187268, -0.025925423949956894, -0.007372811436653137, -0.012954099103808403, -0.06769894808530807, 0.030886568129062653, 0.05812118202447891, 0.012954099103808403, -0.04082608222961426, 0.018948813900351524, 0.04509817808866501, 0.02761359140276909, -0.020964279770851135, -0.07469277828931808, 0.024702364578843117, 0.055640608072280884, 0.011265931650996208, -0.05216091871261597, -0.09991192817687988, -0.028113150969147682, 0.0015578940510749817, -0.025563674047589302, -0.0006379075348377228, -0.02783753164112568, -0.03016306832432747, 0.017811885103583336, 0.0006438290583901107, -0.08241011947393417, -0.021946173161268234, -0.022686898708343506, 0.01654575951397419, 0.03254028409719467, 0.03467633202672005, -0.0054047186858952045, -0.02520192414522171, -0.04037820175290108, 0.09233240783214569, 0.027716947719454765, 0.02490907721221447, 0.072281114757061, -0.03434903174638748, -0.0212226714938879, 0.00408691493794322, 0.03204072266817093, -0.0048491740599274635, 0.07944720983505249, 0.020878149196505547, 0.026356078684329987, -0.06160087510943413, -0.015029855072498322, -0.010499365627765656, 0.03112773410975933, 0.03968915343284607, 0.01410825364291668, -0.0336255319416523, 0.007484781555831432, 0.0028530885465443134, -0.01349672395735979, -0.006619165651500225, 0.007635510992258787, -0.011636294424533844, 0.0025710095651447773, 0.00046160820056684315, 0.009138496592640877, 0.05009377375245094, -0.013014390133321285, -0.08978293091058731, -0.025977101176977158, 0.05019713193178177, 0.003038270166143775, -0.0031179413199424744, 0.004887932911515236, 0.009121269918978214, 0.007992954924702644, -0.02377214841544628, 0.018776552751660347, -0.05901694297790527, 0.03157561644911766, -0.022996969521045685, -0.009233240969479084, 0.0505761094391346, 0.041308414191007614, -0.028113150969147682, 0.011541550979018211, 0.04210082069039345, 0.022773029282689095, -0.057880014181137085, 0.008897329680621624, -0.01987902820110321, 0.012239211238920689, 0.03367721289396286, -0.0026442208327353, 0.008169523440301418, 0.009534698911011219, 0.021170994266867638, 0.021808363497257233, 0.056226301938295364, 0.0019530198769643903, 0.03098992444574833, 0.036795154213905334, 0.009241853840649128, 0.017631011083722115, -0.005977489519864321, 0.01891436241567135, -0.04561496526002884, -0.015684450045228004, 0.016873057931661606, -0.037174127995967865, 0.057432133704423904, -0.02079201675951481, 0.023737696930766106, 0.014521682634949684, 0.0009393659420311451, -0.014306355267763138, 0.0483367033302784, -0.01181716937571764, -0.007467555347830057, 0.017811885103583336, 0.017605170607566833, -0.05350456014275551, 0.023823827505111694, 0.04740648716688156, -0.02303142286837101, 0.012738770805299282, -0.0549171082675457, -0.015736129134893417 ]
716,066
pytorch_optimizer.base.scheduler
step
null
def step(self): if self.step_t < self.warmup_steps: value = self.init_lr + (self.max_lr - self.init_lr) * self.step_t / self.warmup_steps elif self.step_t == self.warmup_steps: value = self.max_lr else: value = self._step() self.step_t += 1 # apply the lr to optimizer if it's provided if self.optimizer is not None: for param_group in self.optimizer.param_groups: param_group['lr'] = value self.last_lr = [value] return value
(self)
[ -0.03147299960255623, 0.00029391501448117197, -0.024650314822793007, 0.04910789802670479, 0.015582314692437649, 0.023532474413514137, 0.02443831041455269, -0.0628303587436676, -0.05966956540942192, 0.021026968955993652, -0.03035515733063221, 0.012537161819636822, 0.04852970689535141, 0.0846475288271904, 0.019774217158555984, 0.03985680267214775, -0.003611300140619278, 0.04479072242975235, -0.0135682737454772, -0.00019303230510558933, 0.048722438514232635, 0.016883250325918198, -0.030374430119991302, 0.024804500862956047, -0.029642052948474884, 0.0010238842805847526, 0.034055594354867935, -0.011110951192677021, -0.021431704983115196, 0.016565242782235146, -0.008913815952837467, -0.02243390679359436, 0.01073512528091669, -0.046024199575185776, 0.013173175044357777, -0.06818828731775284, -0.03447960317134857, -0.022973554208874702, -0.04436671361327171, -0.051189396530389786, 0.001376823172904551, -0.011390411294996738, -0.01922493241727352, 0.04162992909550667, -0.03029733896255493, 0.00833562295883894, -0.01608341559767723, -0.020468048751354218, 0.03594436123967171, -0.0553138442337513, 0.020352410152554512, -0.0015550995012745261, 0.016343602910637856, -0.02399502880871296, 0.039509888738393784, 0.013173175044357777, 0.006181851960718632, -0.08873342722654343, -0.001947789336554706, -0.017104890197515488, 0.053193800151348114, -0.06121141463518143, -0.009964200668036938, 0.05022573843598366, 0.051112301647663116, -0.002507914323359728, -0.03478797525167465, 0.01591959409415722, 0.019012928009033203, 0.03463378921151161, 0.008923452347517014, -0.016709791496396065, 0.0012346840230748057, -0.03172354772686958, -0.015890683978796005, 0.01424283254891634, -0.020236771553754807, -0.0270016361027956, -0.0011485572904348373, -0.03463378921151161, 0.007198508828878403, 0.06406383961439133, 0.013202084228396416, -0.027753286063671112, -0.013876643031835556, -0.040126629173755646, -0.07146471738815308, -0.04047354310750961, -0.06013212352991104, -0.03864259645342827, 0.008427170105278492, 0.007911614142358303, 0.023975756019353867, 0.031164629384875298, 0.009983474388718605, 0.03066352754831314, -0.09251095354557037, -0.017895087599754333, -0.03841131925582886, -0.01996694877743721, 0.008576536551117897, 0.04987882450222969, 0.020737873390316963, 0.02944932132959366, 0.05018719285726547, -0.014878845773637295, -0.0016177371144294739, -0.00788752268999815, 0.01832873374223709, -0.0043701790273189545, -0.013809187337756157, 0.021104061976075172, -0.057318247854709625, 0.04193830117583275, -0.05512111261487007, 0.009925655089318752, 0.01743253320455551, 0.03126099333167076, 0.0227230042219162, 0.09466954320669174, -0.002522369148209691, 0.00299937860108912, -0.0011937286471948028, -0.01952366717159748, -0.031164629384875298, 0.015110122971236706, 0.020294591784477234, 0.046332571655511856, -0.024110667407512665, -0.03924006223678589, 0.0021730437874794006, -0.017442170530557632, -0.03079843893647194, -0.018868381157517433, -0.01913820393383503, 0.017557809129357338, 0.031068263575434685, 0.03419050946831703, -0.014975210651755333, 0.01855037361383438, 0.0027343733236193657, 0.05793498829007149, 0.06791845709085464, -0.03276429697871208, 0.06653079390525818, 0.028986766934394836, -0.015110122971236706, 0.1277422159910202, 0.03297629952430725, 0.013327359221875668, 0.0032475199550390244, -0.03251374512910843, 0.10523121058940887, 0.03536616638302803, 0.0030355157796293497, 0.026192164048552513, -0.029410775750875473, 0.00644685747101903, -0.03873896226286888, -0.05539093539118767, -0.05346362292766571, -0.03671528771519661, -0.0032547474838793278, -0.03334249183535576, -0.0003360749687999487, 0.017769813537597656, 0.0022862732876092196, 0.09135457128286362, -0.02438049204647541, 0.012469706125557423, 0.041475746780633926, -0.09621139615774155, 0.04787442088127136, 0.031974099576473236, -0.008465716615319252, 0.08734576404094696, 0.003406523261219263, 0.005960211157798767, 0.012990079820156097, 0.06275326758623123, 0.006191488355398178, 0.03686947003006935, 0.005266379099339247, -0.09806161373853683, -0.027926744893193245, -0.00594575610011816, -0.045214731246232986, -0.005001373589038849, 0.0038498048670589924, 0.05523674935102463, 0.035115618258714676, -0.0019622440449893475, 0.018820198252797127, -0.04394270479679108, -0.029507139697670937, 0.024245580658316612, 0.032109010964632034, 0.020757146179676056, 0.11864530295133591, 0.011833692900836468, -0.005849390756338835, 0.010552030988037586, 0.020429503172636032, 0.04143719747662544, -0.04186120629310608, -0.029430048540234566, -0.05068829655647278, 0.021296793594956398, -0.03895096853375435, 0.035250529646873474, -0.03438323736190796, -0.0008389828144572675, 0.026230711489915848, 0.022838642820715904, 0.002517550718039274, -0.06992286443710327, -0.019947674125432968, 0.011795147322118282, 0.055082567036151886, 0.004967645741999149, 0.01952366717159748, -0.06148124113678932, 0.04028081148862839, -0.03318830579519272, 0.04031935706734657, -0.0771310105919838, -0.013732095248997211, -0.08156382292509079, -0.0589371882379055, 0.0454460084438324, -0.008884906768798828, -0.04390415921807289, 0.023609567433595657, 0.011380774900317192, 0.03835349902510643, 0.059476837515830994, -0.009593193419277668, 0.009130639024078846, -0.03178136795759201, 0.00032975096837617457, -0.038102950900793076, -0.00007088140409905463, -0.013433361425995827, -0.01586177386343479, -0.0701155960559845, 0.05832044780254364, 0.042362309992313385, -0.026346350088715553, -0.0257103368639946, 0.0026620991993695498, 0.014397017657756805, 0.008133254945278168, -0.00226218206807971, 0.026731811463832855, 0.006557677872478962, 0.045947108417749405, 0.0981387048959732, 0.05257705971598625, -0.0005011010216549039, -0.0025006867945194244, 0.020448775961995125, -0.03627200424671173, -0.035847995430231094, 0.00003899794683093205, -0.11656380444765091, 0.025170689448714256, -0.011168770492076874, -0.025536878034472466, 0.017972180619835854, 0.019562212750315666, 0.152643084526062, 0.0532323457300663, -0.048645343631505966, -0.030991170555353165, 0.010368936695158482, 0.01222879160195589, -0.009819652885198593, 0.024361219257116318, -0.004237676504999399, -0.036368370056152344, 0.04563874006271362, -0.050958119332790375, -0.033226851373910904, -0.03332321718335152, -0.0747796893119812, -0.01073512528091669, -0.006793773267418146, 0.01592922955751419, 0.02274227701127529, -0.0135682737454772, 0.03821858763694763, -0.018723832443356514, 0.036002181470394135, 0.015206488780677319, 0.08457043021917343, -0.008812632411718369, -0.042593587189912796, -0.02391793765127659, 0.015081212855875492, 0.038989514112472534, 0.015466675162315369, -0.04344160482287407, -0.03748621046543121, 0.03276429697871208, 0.0016815793933346868, 0.004868871066719294, 0.01491739135235548, -0.0037413935642689466, 0.007150325924158096, 0.002064632484689355, -0.04995591565966606, 0.008933089673519135, -0.0025609151925891638, -0.023281924426555634, -0.00886563304811716, -0.06541295349597931, -0.017538536339998245, -0.02407212182879448, -0.028370026499032974, 0.01543776597827673, -0.009227003902196884, 0.018569646403193474, 0.0008841541712172329, -0.0024958685971796513, -0.03126099333167076, -0.03729347884654999, 0.062252163887023926, 0.004967645741999149, -0.04274776950478554, -0.06676207482814789, -0.02736782468855381, -0.0859580934047699, 0.0007444241200573742, 0.05280833691358566, 0.04097464308142662, -0.005777116399258375, 0.028061656281352043, 0.03160791099071503, 0.027040181681513786, 0.012951534241437912, 0.048182789236307144, 0.011226589791476727, -0.0336315855383873, 0.02646198868751526, 0.06799555569887161, 0.022221902385354042, 0.0659525990486145, 0.006856410764157772, 0.05623895302414894, -0.017316894605755806, -0.04629402607679367, -0.029796237125992775, -0.05542948096990585, -0.007304511032998562, -0.015900321304798126, 0.01386700663715601, -0.029179496690630913, -0.022221902385354042, 0.015119759365916252, -0.035404715687036514, -0.03351594880223274, 0.02347465604543686, -0.013558637350797653, 0.1064646914601326, 0.051189396530389786, 0.0227230042219162, -0.07111779600381851, 0.0013033444993197918, -0.013452635146677494, 0.0028933766297996044, -0.005044738296419382, -0.026057252660393715, 0.011679508723318577, 0.04590856283903122, -0.006639588624238968, 0.019928401336073875, -0.01683506742119789, -0.009357097558677197, 0.029121678322553635, 0.009477554820477962, 0.02580670267343521, 0.027541283518075943, 0.02399502880871296, 0.00104616885073483, 0.047142039984464645, -0.005545839201658964, 0.009299278259277344, -0.07747792452573776, -0.014772843569517136, -0.03710074722766876, 0.02093060314655304, 0.016208689659833908, -0.061943795531988144, -0.05153631046414375, -0.022395361214876175, 0.02093060314655304, -0.01491739135235548, 0.022086990997195244, -0.035250529646873474, 0.012806985527276993, 0.008417533710598946, -0.001290094223804772, -0.0000807061733212322, 0.020275317132472992, -0.0008486193837597966, -0.05388763174414635, 0.029179496690630913, 0.05982375144958496, -0.017075980082154274, 0.020082587376236916, -0.024052849039435387, 0.0018032408552244306, 0.008913815952837467, 0.006788955070078373, 0.01091822050511837, -0.03819931671023369, -0.0016647153533995152, 0.007449059281498194, 0.004943554289638996, 0.04174556955695152, -0.004818278830498457, 0.04926208406686783, 0.013308086432516575, 0.03866187110543251, 0.021874986588954926, -0.0020044040866196156, 0.022183356806635857, -0.021181154996156693, -0.04563874006271362, 0.014397017657756805, -0.0018803334096446633, -0.00038726915954612195, -0.009925655089318752, 0.02386011742055416, 0.0032716114073991776, 0.016064142808318138, -0.005025465041399002, 0.03627200424671173, 0.010783308185636997, -0.046910762786865234, 0.02443831041455269, -0.04640966281294823, -0.00040684343548491597, 0.01898401975631714, -0.007574334740638733, -0.027329279109835625, -0.022530272603034973, -0.03627200424671173, -0.07080943137407303, 0.027541283518075943, -0.018290186300873756, -0.028504937887191772, 0.027098001912236214, 0.031164629384875298, 0.00934746116399765, 0.0231084655970335, -0.056778598576784134, -0.02295428141951561, 0.01084112748503685, -0.023359017446637154, 0.013722458854317665, 0.043325964361429214, 0.04398125037550926, -0.013876643031835556, 0.004334041848778725, 0.018598556518554688, -0.005545839201658964, 0.033901412039995193, -0.027772560715675354, 0.00452195480465889, -0.019947674125432968, 0.025479059666395187, 0.03124172054231167, -0.03573235869407654, 0.02017895318567753, -0.02041023038327694, -0.02071859873831272, 0.0018405825830996037, 0.028215842321515083, -0.03889314830303192, -0.0026548716705292463, -0.023532474413514137, 0.05061120167374611, 0.02085351198911667, 0.0255754254758358, 0.045870017260313034, -0.07235127687454224, 0.04394270479679108, 0.05261560529470444, 0.015505221672356129, -0.025035778060555458, -0.01696034148335457, 0.028986766934394836, 0.011226589791476727, -0.09405280649662018, -0.047219134867191315, 0.043557241559028625, 0.020737873390316963, 0.0740087628364563, 0.07489532977342606, 0.01121695339679718, -0.014165740460157394, 0.01379955094307661, 0.00938118901103735, -0.015534131787717342, 0.009805197827517986, -0.07562770694494247, -0.02077641896903515, -0.05519820377230644, 0.04471362754702568, 0.04039645195007324, 0.014821026474237442, -0.0560847669839859, -0.015572677366435528, -0.006957594770938158, -0.043865613639354706, -0.0003920874441973865, 0.06248344108462334, 0.03492288663983345, -0.03658037260174751, -0.025613971054553986, 0.024149214848876, -0.011486777104437351, -0.02863985113799572, -0.006981686223298311, 0.04629402607679367, -0.01898401975631714, -0.019562212750315666, -0.01928275264799595, 0.04186120629310608, 0.03401704877614975, -0.010041293688118458, 0.016632698476314545, 0.055892035365104675, 0.022086990997195244, 0.005300106946378946, -0.03409414365887642, -0.06529732048511505, -0.04972463846206665, -0.03066352754831314, -0.02019822597503662, -0.06236780434846878, 0.010802581906318665, -0.017220528796315193, -0.03526980057358742, -0.007858612574636936, -0.05288543179631233, 0.07331493496894836, -0.030759893357753754, 0.01315390132367611, -0.006345673464238644, 0.025517605245113373, -0.00523265078663826, 0.037736762315034866, -0.004305132199078798, 0.0031607910059392452, 0.005497656296938658, 0.055814944207668304, 0.042362309992313385, 0.027464190497994423, -0.03255229443311691, -0.05512111261487007, 0.039664071053266525, -0.020082587376236916, 0.034286871552467346, -0.025671791285276413, -0.0560847669839859, 0.01951402984559536, -0.05149776488542557, 0.005690387450158596, 0.014869209378957748, 0.004456907976418734, -0.026076525449752808, -0.028601303696632385, -0.018955109640955925, 0.02281937003135681, 0.0046207294799387455, 0.015013757161796093, -0.0040184445679187775, 0.014156104065477848, 0.020429503172636032, 0.01386700663715601, 0.03079843893647194, -0.0301238801330328, 0.008041707798838615, 0.010870037600398064, -0.031280267983675, 0.04671803489327431, -0.07292947173118591, -0.0113615021109581, -0.06579841673374176, 0.029622778296470642, -0.08210347592830658, -0.008961998857557774, 0.009058364666998386, -0.017172345891594887, -0.015881046652793884, -0.03812222182750702, 0.0472576804459095, 0.03176209330558777, -0.025671791285276413, -0.021431704983115196, -0.004565319512039423, 0.03970262035727501, -0.004456907976418734, -0.011978241614997387, -0.03694656491279602, 0.01349118072539568, -0.0002098962722811848, -0.04810569807887077, 0.01491739135235548, -0.025459786877036095, 0.0255754254758358, -0.009164366871118546, -0.025594698265194893, -0.04290195554494858, 0.009588374756276608, -0.023224104195833206, 0.05681714415550232, -0.039143700152635574, 0.019427301362156868, -0.011457866989076138, -0.010282207280397415, -0.010031657293438911, -0.005743388552218676, -0.014975210651755333, 0.018184185028076172, -0.01084112748503685, 0.02991187572479248, -0.09937218576669693, -0.02624998427927494, -0.004249722231179476, 0.014609022065997124, -0.10669597238302231, 0.0375247560441494, 0.05435018613934517, -0.008851178921759129, 0.020525868982076645, -0.0050543746910989285, -0.0874999463558197, 0.0002555193495936692, 0.08218056708574295, 0.02010186016559601, -0.016035232692956924, 0.0004580376553349197, -0.025035778060555458, -0.04868388921022415, 0.03401704877614975, 0.02518996223807335, 0.039818257093429565, -0.021046241745352745, 0.010870037600398064, 0.010320753790438175, 0.04367288202047348, -0.0012623891234397888, -0.04536891356110573, 0.03289920836687088, 0.03268720582127571, 0.0275220088660717, -0.0810241773724556, -0.07643717527389526, 0.004117219243198633, 0.007535788230597973, -0.054465826600790024, 0.0006444448372349143, 0.023493928834795952, -0.037717487663030624, -0.0127877127379179, 0.004191902931779623, -0.06973013281822205, -0.06044049188494682, -0.061134323477745056, -0.002098360564559698, 0.055814944207668304, 0.01795290783047676, -0.004008808173239231, -0.0173361673951149, -0.07466404885053635, 0.05404181778430939, -0.02698236145079136, -0.01965857855975628, 0.0009425758034922183, -0.01890692673623562, 0.01155423279851675, 0.016285782679915428, -0.0255754254758358, -0.018820198252797127, 0.03287993744015694, 0.021932806819677353, 0.06367837637662888, -0.05647023022174835, -0.020545141771435738, -0.03268720582127571, 0.026500534266233444, 0.03316903114318848, -0.048336975276470184, 0.0021079969592392445, -0.031588636338710785, 0.03303411975502968, -0.02243390679359436, 0.018887653946876526, -0.004396679345518351, -0.02885185368359089, -0.045715831220149994, 0.0010136454366147518, 0.07605171203613281, 0.03550107777118683, 0.018068546429276466, -0.0415528379380703, 0.0013515272876247764, 0.04374997317790985, -0.01245043333619833, -0.030605707317590714, -0.021585889160633087, -0.004500272683799267, -0.025960886850953102, -0.0688050240278244, -0.009333006106317043, -0.05450437217950821, 0.028678396716713905, -0.03276429697871208, -0.006417947821319103, -0.00372934783808887, 0.009106547571718693, -0.03409414365887642, 0.0067407721653580666, 0.03183918818831444, 0.04845261201262474, -0.0030692436266690493, 0.0285627581179142, -0.043325964361429214, 0.013067172840237617, 0.03575162962079048, -0.016719428822398186, 0.03632982447743416, 0.025671791285276413, 0.015495585277676582, 0.016093051061034203, 0.041475746780633926, -0.020583687350153923, 0.04278631880879402, 0.01159277930855751, 0.003553480841219425, -0.027175093069672585, 0.027175093069672585, 0.025382693856954575, -0.006755227223038673, -0.06479621678590775, 0.03224392235279083, -0.034055594354867935, 0.058667365461587906, -0.00030611129477620125, 0.006707044318318367, 0.03183918818831444, 0.026866722851991653, -0.04999446123838425, 0.04914644733071327, -0.030682800337672234, -0.014387381263077259, 0.001723739318549633, 0.013549000956118107, -0.07770920544862747, 0.076321542263031, 0.010629123076796532, 0.02840857207775116, 0.0142139233648777, 0.009626921266317368, -0.02750273607671261 ]
716,067
pytorch_optimizer.base.scheduler
validate_parameters
null
def validate_parameters(self): if self.min_lr < 0: raise NegativeLRError(self.min_lr, 'min_lr') if self.max_lr < 0: raise NegativeLRError(self.max_lr, 'max_lr') if self.init_lr < 0: raise NegativeLRError(self.init_lr, 'init_lr') if self.total_steps < 0: raise NegativeStepError(self.total_steps, 't_max') if self.warmup_steps < 0: raise NegativeStepError(self.warmup_steps, 'warmup_steps')
(self)
[ -0.007425079122185707, 0.00248950463719666, 0.010634688660502434, 0.01907477341592312, -0.03635728359222412, -0.005733404774218798, -0.029499145224690437, -0.02768859639763832, -0.004046302288770676, 0.007809135131537914, 0.00687642814591527, 0.04670850187540054, 0.05929090455174446, 0.008714409545063972, -0.020665861666202545, 0.024945341050624847, -0.0194954052567482, 0.009075605310499668, 0.03547944128513336, -0.01989774964749813, -0.01669728383421898, 0.012564112432301044, -0.05749864503741264, 0.02681075409054756, -0.007960014045238495, 0.06342407315969467, 0.020044056698679924, -0.0036256699822843075, 0.010424372740089893, -0.006638679187744856, -0.05541376769542694, 0.035369712859392166, 0.019147926941514015, 0.03555259481072426, -0.020684149116277695, -0.04590381681919098, -0.0026723884511739016, -0.043306864798069, -0.09817198663949966, -0.006940437480807304, -0.024981917813420296, -0.003543372265994549, 0.0017053907504305243, 0.016075478866696358, -0.016166921705007553, -0.05885198339819908, -0.02748742327094078, 0.025878047570586205, -0.0801030695438385, -0.03617440164089203, 0.015234214253723621, -0.008764702826738358, 0.04912256821990013, -0.024067498743534088, 0.004085165448486805, 0.031474288552999496, 0.03094392642378807, 0.028273824602365494, 0.027414269745349884, -0.06346065551042557, -0.022220373153686523, 0.010936446487903595, -0.03185834363102913, -0.030175814405083656, 0.03630242124199867, -0.0005569381173700094, -0.038844503462314606, -0.007242195773869753, 0.01923936791718006, 0.07973730564117432, 0.02189118228852749, -0.02860301546752453, -0.03723512589931488, 0.04648904502391815, 0.023079926148056984, -0.02684733085334301, -0.0390273854136467, 0.0005272194975987077, -0.0216534323990345, -0.028676168993115425, 0.026554716750979424, 0.03196807578206062, 0.008284633047878742, -0.03611953556537628, 0.006323204841464758, -0.03661332279443741, -0.06024190038442612, -0.02057441882789135, 0.02101333998143673, -0.004569807089865208, -0.05263393744826317, 0.009354502893984318, -0.014200921170413494, -0.049012839794158936, 0.044513899832963943, 0.07878630608320236, -0.019093060865998268, -0.013780288398265839, -0.03851531445980072, -0.05438962206244469, 0.010762707330286503, 0.037783779203891754, 0.0476594977080822, 0.03739972040057182, 0.014246642589569092, -0.03710710629820824, -0.018087200820446014, -0.07436051964759827, 0.009875721298158169, 0.042758215218782425, -0.01698075421154499, 0.005225902423262596, 0.0029604302253574133, 0.04963464289903641, -0.049012839794158936, 0.007301632780581713, -0.00589342787861824, 0.003026725724339485, -0.057242605835199356, 0.03507709875702858, 0.04524543508887291, 0.021909469738602638, 0.0011773139704018831, -0.04092937707901001, 0.04495282098650932, 0.02340911701321602, -0.013643126003444195, 0.05559665337204933, -0.004002867732197046, -0.03160230815410614, -0.0009864290477707982, -0.012426949106156826, -0.003733114106580615, 0.011613116599619389, -0.04155118390917778, -0.02728625200688839, 0.050549060106277466, 0.03290078416466713, 0.03134626895189285, -0.04517228156328201, 0.05091482773423195, 0.08515066653490067, 0.020610995590686798, -0.015124483965337276, 0.01861756294965744, 0.03198636323213577, -0.011402800679206848, 0.0004903569933958352, 0.019751442596316338, 0.051170866936445236, 0.0044235000386834145, -0.03441871702671051, 0.013935740105807781, -0.048134997487068176, -0.015792010352015495, -0.047952111810445786, 0.011549107730388641, -0.06777670979499817, 0.001249324413947761, 0.0027866908349096775, -0.03006608411669731, -0.02512822486460209, 0.018462112173438072, -0.02035495825111866, 0.016368092969059944, 0.03440042957663536, 0.008901865221560001, 0.00844922848045826, 0.022659294307231903, 0.030852485448122025, 0.02227523736655712, -0.03635728359222412, -0.006364353466778994, 0.01135707926005125, -0.01332307979464531, -0.0016985326074063778, 0.0026289536617696285, -0.006743837613612413, -0.023683441802859306, 0.0389542318880558, 0.025457413867115974, 0.022256949916481972, -0.0368327833712101, -0.030413564294576645, 0.011869153939187527, 0.01288415864109993, -0.07172700017690659, 0.016514400020241737, -0.06580156832933426, -0.01537137757986784, 0.0028186955023556948, -0.006181470118463039, -0.004460076801478863, 0.028237247839570045, -0.045574624091386795, 0.028255535289645195, 0.029188241809606552, 0.024963628500699997, 0.1103886142373085, 0.017684856429696083, 0.04433101415634155, 0.0497809499502182, -0.005902572069317102, -0.018782159313559532, -0.06565526127815247, -0.041478030383586884, -0.09941559284925461, -0.012125191278755665, -0.0026792464777827263, -0.01698075421154499, -0.0015190779231488705, 0.009601395577192307, 0.02099505253136158, 0.040819648653268814, 0.03335799276828766, 0.013807721436023712, -0.00742050725966692, -0.016203498467803, -0.017465395852923393, 0.033668894320726395, 0.10446318238973618, -0.03383348882198334, 0.028621302917599678, -0.07593332231044769, 0.061595238745212555, 0.014420381747186184, 0.03968576714396477, -0.036485303193330765, -0.05003698915243149, 0.04934202879667282, -0.015215925872325897, -0.011174195446074009, -0.0520121306180954, 0.0313279815018177, -0.012408660724759102, 0.0692397803068161, 0.01114676333963871, -0.005843135062605143, -0.02205577678978443, -0.019806306809186935, -0.040161266922950745, -0.008037739433348179, -0.04864707216620445, -0.00927677657455206, 0.05823018029332161, 0.012646409682929516, -0.005920860450714827, 0.06229019537568092, -0.029389414936304092, 0.0013944883830845356, -0.06305830925703049, 0.01365226972848177, -0.02942599169909954, 0.01603890210390091, -0.014639842323958874, 0.02898707054555416, -0.023738307878375053, -0.036887649446725845, 0.04919572174549103, -0.020428111776709557, 0.024744167923927307, 0.009765991009771824, -0.0335225872695446, 0.0888083353638649, 0.008755558170378208, 0.019879460334777832, 0.043818939477205276, 0.015508539974689484, 0.01993432641029358, -0.00828006025403738, 0.09341700375080109, 0.05951036512851715, -0.06635021418333054, -0.0033673467114567757, 0.045574624091386795, 0.05062221363186836, 0.011311358772218227, -0.034766197204589844, -0.004208611790090799, 0.05673053115606308, 0.06777670979499817, -0.022183796390891075, 0.017694000154733658, -0.013021321035921574, 0.001945425639860332, 0.012253209948539734, -0.02684733085334301, -0.07666485756635666, -0.05614530295133591, -0.0038405582308769226, 0.027085080742836, -0.022421544417738914, 0.054645657539367676, -0.000034201399103039876, 0.0563281886279583, -0.016715573146939278, 0.06221704185009003, -0.05471881106495857, 0.03485763818025589, -0.006035163067281246, 0.009546530432999134, -0.0034976513125002384, 0.06949581950902939, -0.02942599169909954, -0.018891889601945877, -0.06905689835548401, 0.04740346223115921, 0.02361028827726841, 0.02097676321864128, -0.011640549637377262, -0.024963628500699997, 0.03421754390001297, 0.008691549301147461, -0.02251298725605011, 0.05343862622976303, 0.002050583716481924, 0.08193191140890121, -0.027395982295274734, -0.045099128037691116, 0.040197841823101044, 0.0022666151635348797, 0.017849450930953026, 0.021763162687420845, -0.06075397506356239, -0.014118623919785023, -0.024323536083102226, 0.04045388102531433, -0.023463981226086617, -0.0519755557179451, -0.045099128037691116, -0.006382641848176718, -0.028950493782758713, 0.04129514470696449, -0.015508539974689484, 0.0019065628293901682, 0.0026815326418727636, -0.0038108397275209427, 0.06543579697608948, 0.04659877344965935, 0.027085080742836, 0.056840263307094574, -0.0015499396249651909, -0.003758260514587164, 0.004322913940995932, 0.04648904502391815, -0.005920860450714827, -0.010012883692979813, -0.01148509792983532, -0.004736688453704119, 0.009363646619021893, -0.0606442429125309, 0.06755724549293518, -0.04217298701405525, 0.015673134475946426, 0.01855355314910412, 0.006620390806347132, -0.009052744135260582, -0.042977675795555115, 0.02681075409054756, 0.002018579049035907, 0.0356440395116806, -0.004576665349304676, -0.05212186276912689, 0.04184379801154137, -0.028456708416342735, 0.001420777989551425, 0.02313479222357273, -0.045099128037691116, 0.010387795977294445, 0.010634688660502434, -0.013890018686652184, -0.05113428831100464, -0.020647572353482246, -0.02536597289144993, 0.0009961448376998305, 0.051609788089990616, 0.02095847576856613, 0.024744167923927307, -0.0013864872744306922, 0.04034414887428284, -0.015188493765890598, -0.02703021466732025, 0.03229726478457451, -0.01656012050807476, 0.0237748846411705, -0.04700111597776413, -0.027158234268426895, -0.011549107730388641, -0.0014424953842535615, 0.00519846985116601, 0.00927677657455206, -0.009445944800972939, 0.0026723884511739016, 0.01428321935236454, -0.0237748846411705, 0.045538049191236496, 0.04378236457705498, 0.0584862157702446, -0.031492576003074646, -0.05040275678038597, -0.0626559630036354, -0.011375367641448975, -0.07505548000335693, 0.028895629569888115, 0.0367596298456192, 0.019989190623164177, 0.026353545486927032, 0.07995676249265671, 0.00546365138143301, 0.049488335847854614, -0.014328939840197563, -0.0063552092760801315, -0.00014194920368026942, 0.01755683682858944, -0.004960720892995596, -0.03599151596426964, -0.009455088526010513, 0.02986491285264492, -0.009240199811756611, -0.007992018945515156, 0.017886027693748474, -0.015307367779314518, 0.07041023671627045, 0.0411488376557827, 0.015307367779314518, 0.03174861520528793, -0.0497443750500679, -0.018087200820446014, -0.015133628621697426, -0.0167612936347723, -0.03851531445980072, 0.05998586118221283, -0.03635728359222412, -0.04637931287288666, -0.012957312166690826, -0.010698697529733181, -0.03741801157593727, 0.043233711272478104, 0.003948002588003874, 0.002480360446497798, 0.06346065551042557, -0.09041771292686462, 0.06759382784366608, 0.07329979538917542, 0.02664615958929062, -0.020702438428997993, 0.00228261761367321, -0.0019134209724143147, -0.0411854162812233, -0.01265555340796709, -0.01887360028922558, 0.004501225892454386, -0.004988153465092182, -0.03723512589931488, 0.024780744686722755, 0.0023100499529391527, -0.10899870097637177, -0.01493245642632246, -0.024122362956404686, -0.028054364025592804, 0.03546115383505821, 0.018727293238043785, -0.0650334507226944, -0.003838272299617529, -0.026902196928858757, 0.037564318627119064, 0.01819693110883236, -0.01123820524662733, 0.015874307602643967, 0.03242528438568115, -0.031035369262099266, 0.0008967017638497055, 0.026591293513774872, -0.049671221524477005, -0.01449353527277708, -0.0005938006215728819, 0.046233005821704865, 0.021726585924625397, 0.010204912163317204, 0.006547237280756235, 0.06196100637316704, -0.03418096899986267, 0.01091815810650587, 0.05888855829834938, 0.0036736768670380116, 0.0022437546867877245, -0.1125832200050354, 0.018480399623513222, -0.042977675795555115, 0.02039153501391411, -0.03229726478457451, -0.06386299431324005, 0.02339082770049572, 0.05438962206244469, -0.043855518102645874, -0.05212186276912689, 0.000021985339117236435, 0.0027775466442108154, 0.028401842340826988, 0.030358698219060898, 0.016633274033665657, -0.009176190942525864, 0.006204330362379551, -0.008202334865927696, 0.042063258588314056, -0.022567851468920708, -0.027176521718502045, 0.006350637413561344, 0.0046200999058783054, -0.010003739967942238, -0.02553056739270687, 0.025493990629911423, 0.04367263242602348, 0.03858846798539162, 0.001166455214843154, -0.01332307979464531, -0.019531982019543648, 0.05347520112991333, 0.031931497156620026, 0.04348975047469139, 0.0004540660011116415, 0.018644995987415314, 0.0194771159440279, -0.0800299197435379, 0.005367637146264315, 0.008472088724374771, -0.03613782301545143, -0.06784985959529877, 0.011430232785642147, 0.02381146140396595, -0.004695539828389883, -0.03880792856216431, 0.029133377596735954, 0.024396689608693123, -0.06605760008096695, 0.03577205538749695, 0.003744544228538871, -0.019641712307929993, -0.07959099858999252, 0.004773265216499567, -0.011027888394892216, 0.02357371151447296, 0.04414813220500946, 0.001091587240807712, -0.01082671619951725, -0.021123070269823074, -0.01989774964749813, 0.06686229258775711, -0.06730121374130249, -0.005289911758154631, 0.008225196041166782, -0.01635894924402237, -0.033705469220876694, -0.022604428231716156, 0.023079926148056984, -0.0022574709728360176, 0.05504800006747246, 0.07022734731435776, 0.05910801887512207, 0.047732651233673096, -0.0034930792171508074, -0.05731575936079025, 0.026554716750979424, -0.07165384292602539, -0.0953921526670456, -0.02774346061050892, -0.03286420553922653, -0.024835610762238503, -0.06821563094854355, 0.048829954117536545, 0.005760837346315384, 0.011064465157687664, -0.043416596949100494, -0.0237748846411705, -0.015005609951913357, -0.006784986238926649, 0.005843135062605143, 0.06649652123451233, -0.07095888257026672, -0.011494242586195469, 0.08858887851238251, 0.003895423375070095, -0.06196100637316704, -0.0670451745390892, 0.02381146140396595, 0.05003698915243149, -0.030633024871349335, -0.005221330560743809, -0.008636684156954288, 0.024597860872745514, -0.0030998792499303818, 0.038442160934209824, -0.031712036579847336, -0.0390273854136467, -0.00294671393930912, 0.08405335992574692, 0.00816118624061346, -0.05299970507621765, -0.011997172608971596, 0.052743665874004364, -0.019221080467104912, -0.013277358375489712, 0.01549025159329176, -0.0008544098818674684, -0.00605345144867897, -0.004498939495533705, -0.022458121180534363, 0.027377692982554436, -0.029316261410713196, -0.019093060865998268, 0.005440790671855211, -0.017794586718082428, -0.004576665349304676, -0.06466768682003021, -0.01753854937851429, -0.041002530604600906, -0.004832702688872814, 0.023884614929556847, 0.07436051964759827, -0.004782409407198429, 0.012856725603342056, -0.022769024595618248, -0.016514400020241737, -0.0031067372765392065, -0.02816409431397915, -0.0003797694807872176, -0.01493245642632246, -0.03547944128513336, -0.053987275809049606, -0.057023145258426666, 0.009829999879002571, -0.02357371151447296, -0.013569972477853298, -0.04809841886162758, -0.010214055888354778, 0.03705224394798279, 0.04268506169319153, -0.026938773691654205, 0.0325167253613472, 0.006794130429625511, -0.03339456766843796, 0.031017079949378967, -0.017712289467453957, -0.013185916468501091, 0.008014879189431667, 0.024323536083102226, -0.0626925379037857, 0.0011647407663986087, 0.09809882938861847, -0.012582400813698769, -0.0047504049725830555, 0.042758215218782425, 0.0007452511927112937, -0.03939315304160118, 0.0036965373437851667, 0.008801279589533806, -0.016249218955636024, 0.012207488529384136, 0.04963464289903641, -0.03026725724339485, -0.0389176569879055, -0.006108316592872143, 0.06411903351545334, -0.04316055774688721, -0.009340786375105381, 0.032114382833242416, -0.016404669731855392, -0.020629284903407097, 0.0194771159440279, -0.002020865213125944, -0.06357038021087646, -0.05058563873171806, 0.03825927525758743, 0.07607962936162949, 0.0411488376557827, 0.030194103717803955, -0.043014250695705414, -0.06561867892742157, 0.007173614110797644, -0.022238660603761673, -0.03224240243434906, 0.05962009355425835, -0.06404588371515274, -0.02141568437218666, -0.002994721056893468, 0.0002957572869490832, -0.05000041052699089, 0.04850076511502266, 0.019202791154384613, 0.07703062891960144, -0.05263393744826317, -0.007059311959892511, 0.017794586718082428, 0.030212391167879105, -0.00785028375685215, -0.034107815474271774, -0.025256242603063583, -0.031017079949378967, 0.03374204784631729, 0.023884614929556847, -0.02553056739270687, -0.0011807431001216173, -0.05797414109110832, 0.07015419751405716, -0.010790139436721802, -0.013112762942910194, 0.014987321570515633, -0.0173373781144619, -0.017712289467453957, -0.06375326961278915, 0.021488837897777557, -0.01598403789103031, 0.0367596298456192, -0.0931243970990181, -0.028218958526849747, -0.025164801627397537, 0.06880085915327072, 0.003600523341447115, -0.016075478866696358, -0.03440042957663536, -0.01923936791718006, 0.008060600608587265, -0.001644810545258224, -0.0035319419112056494, -0.014036325737833977, 0.01288415864109993, -0.01492331176996231, -0.07436051964759827, 0.07725008577108383, -0.041478030383586884, -0.0033719188068062067, 0.02964545227587223, -0.0367962047457695, 0.021580278873443604, 0.03048671782016754, -0.03533313423395157, -0.016633274033665657, 0.02123280055820942, 0.0081017492339015, 0.03445529565215111, 0.06909347325563431, 0.05819360166788101, 0.04001495987176895, -0.05764495208859444, 0.03229726478457451, 0.07201961427927017, -0.018709005787968636, -0.014356372877955437, 0.008083460852503777, -0.02095847576856613, 0.04246560111641884, -0.049049414694309235, 0.01278357207775116, 0.01647782325744629, 0.04696454107761383, -0.0183798149228096, 0.00986657664179802, -0.01105532143265009, -0.016276651993393898, -0.03542457893490791, 0.003289621090516448, -0.01775800995528698, 0.019824596121907234, 0.039063964039087296, 0.012088614515960217, 0.04286794364452362, 0.02357371151447296, 0.017227647826075554 ]
716,068
torch.optim.lr_scheduler
CyclicLR
Sets the learning rate of each parameter group according to cyclical learning rate policy (CLR). The policy cycles the learning rate between two boundaries with a constant frequency, as detailed in the paper `Cyclical Learning Rates for Training Neural Networks`_. The distance between the two boundaries can be scaled on a per-iteration or per-cycle basis. Cyclical learning rate policy changes the learning rate after every batch. `step` should be called after a batch has been used for training. This class has three built-in policies, as put forth in the paper: * "triangular": A basic triangular cycle without amplitude scaling. * "triangular2": A basic triangular cycle that scales initial amplitude by half each cycle. * "exp_range": A cycle that scales initial amplitude by :math:`\text{gamma}^{\text{cycle iterations}}` at each cycle iteration. This implementation was adapted from the github repo: `bckenstler/CLR`_ Args: optimizer (Optimizer): Wrapped optimizer. base_lr (float or list): Initial learning rate which is the lower boundary in the cycle for each parameter group. max_lr (float or list): Upper learning rate boundaries in the cycle for each parameter group. Functionally, it defines the cycle amplitude (max_lr - base_lr). The lr at any cycle is the sum of base_lr and some scaling of the amplitude; therefore max_lr may not actually be reached depending on scaling function. step_size_up (int): Number of training iterations in the increasing half of a cycle. Default: 2000 step_size_down (int): Number of training iterations in the decreasing half of a cycle. If step_size_down is None, it is set to step_size_up. Default: None mode (str): One of {triangular, triangular2, exp_range}. Values correspond to policies detailed above. If scale_fn is not None, this argument is ignored. Default: 'triangular' gamma (float): Constant in 'exp_range' scaling function: gamma**(cycle iterations) Default: 1.0 scale_fn (function): Custom scaling policy defined by a single argument lambda function, where 0 <= scale_fn(x) <= 1 for all x >= 0. If specified, then 'mode' is ignored. Default: None scale_mode (str): {'cycle', 'iterations'}. Defines whether scale_fn is evaluated on cycle number or cycle iterations (training iterations since start of cycle). Default: 'cycle' cycle_momentum (bool): If ``True``, momentum is cycled inversely to learning rate between 'base_momentum' and 'max_momentum'. Default: True base_momentum (float or list): Lower momentum boundaries in the cycle for each parameter group. Note that momentum is cycled inversely to learning rate; at the peak of a cycle, momentum is 'base_momentum' and learning rate is 'max_lr'. Default: 0.8 max_momentum (float or list): Upper momentum boundaries in the cycle for each parameter group. Functionally, it defines the cycle amplitude (max_momentum - base_momentum). The momentum at any cycle is the difference of max_momentum and some scaling of the amplitude; therefore base_momentum may not actually be reached depending on scaling function. Note that momentum is cycled inversely to learning rate; at the start of a cycle, momentum is 'max_momentum' and learning rate is 'base_lr' Default: 0.9 last_epoch (int): The index of the last batch. This parameter is used when resuming a training job. Since `step()` should be invoked after each batch instead of after each epoch, this number represents the total number of *batches* computed, not the total number of epochs computed. When last_epoch=-1, the schedule is started from the beginning. Default: -1 verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. Example: >>> # xdoctest: +SKIP >>> optimizer = torch.optim.SGD(model.parameters(), lr=0.1, momentum=0.9) >>> scheduler = torch.optim.lr_scheduler.CyclicLR(optimizer, base_lr=0.01, max_lr=0.1) >>> data_loader = torch.utils.data.DataLoader(...) >>> for epoch in range(10): >>> for batch in data_loader: >>> train_batch(...) >>> scheduler.step() .. _Cyclical Learning Rates for Training Neural Networks: https://arxiv.org/abs/1506.01186 .. _bckenstler/CLR: https://github.com/bckenstler/CLR
class CyclicLR(LRScheduler): r"""Sets the learning rate of each parameter group according to cyclical learning rate policy (CLR). The policy cycles the learning rate between two boundaries with a constant frequency, as detailed in the paper `Cyclical Learning Rates for Training Neural Networks`_. The distance between the two boundaries can be scaled on a per-iteration or per-cycle basis. Cyclical learning rate policy changes the learning rate after every batch. `step` should be called after a batch has been used for training. This class has three built-in policies, as put forth in the paper: * "triangular": A basic triangular cycle without amplitude scaling. * "triangular2": A basic triangular cycle that scales initial amplitude by half each cycle. * "exp_range": A cycle that scales initial amplitude by :math:`\text{gamma}^{\text{cycle iterations}}` at each cycle iteration. This implementation was adapted from the github repo: `bckenstler/CLR`_ Args: optimizer (Optimizer): Wrapped optimizer. base_lr (float or list): Initial learning rate which is the lower boundary in the cycle for each parameter group. max_lr (float or list): Upper learning rate boundaries in the cycle for each parameter group. Functionally, it defines the cycle amplitude (max_lr - base_lr). The lr at any cycle is the sum of base_lr and some scaling of the amplitude; therefore max_lr may not actually be reached depending on scaling function. step_size_up (int): Number of training iterations in the increasing half of a cycle. Default: 2000 step_size_down (int): Number of training iterations in the decreasing half of a cycle. If step_size_down is None, it is set to step_size_up. Default: None mode (str): One of {triangular, triangular2, exp_range}. Values correspond to policies detailed above. If scale_fn is not None, this argument is ignored. Default: 'triangular' gamma (float): Constant in 'exp_range' scaling function: gamma**(cycle iterations) Default: 1.0 scale_fn (function): Custom scaling policy defined by a single argument lambda function, where 0 <= scale_fn(x) <= 1 for all x >= 0. If specified, then 'mode' is ignored. Default: None scale_mode (str): {'cycle', 'iterations'}. Defines whether scale_fn is evaluated on cycle number or cycle iterations (training iterations since start of cycle). Default: 'cycle' cycle_momentum (bool): If ``True``, momentum is cycled inversely to learning rate between 'base_momentum' and 'max_momentum'. Default: True base_momentum (float or list): Lower momentum boundaries in the cycle for each parameter group. Note that momentum is cycled inversely to learning rate; at the peak of a cycle, momentum is 'base_momentum' and learning rate is 'max_lr'. Default: 0.8 max_momentum (float or list): Upper momentum boundaries in the cycle for each parameter group. Functionally, it defines the cycle amplitude (max_momentum - base_momentum). The momentum at any cycle is the difference of max_momentum and some scaling of the amplitude; therefore base_momentum may not actually be reached depending on scaling function. Note that momentum is cycled inversely to learning rate; at the start of a cycle, momentum is 'max_momentum' and learning rate is 'base_lr' Default: 0.9 last_epoch (int): The index of the last batch. This parameter is used when resuming a training job. Since `step()` should be invoked after each batch instead of after each epoch, this number represents the total number of *batches* computed, not the total number of epochs computed. When last_epoch=-1, the schedule is started from the beginning. Default: -1 verbose (bool): If ``True``, prints a message to stdout for each update. Default: ``False``. .. deprecated:: 2.2 ``verbose`` is deprecated. Please use ``get_last_lr()`` to access the learning rate. Example: >>> # xdoctest: +SKIP >>> optimizer = torch.optim.SGD(model.parameters(), lr=0.1, momentum=0.9) >>> scheduler = torch.optim.lr_scheduler.CyclicLR(optimizer, base_lr=0.01, max_lr=0.1) >>> data_loader = torch.utils.data.DataLoader(...) >>> for epoch in range(10): >>> for batch in data_loader: >>> train_batch(...) >>> scheduler.step() .. _Cyclical Learning Rates for Training Neural Networks: https://arxiv.org/abs/1506.01186 .. _bckenstler/CLR: https://github.com/bckenstler/CLR """ def __init__(self, optimizer, base_lr, max_lr, step_size_up=2000, step_size_down=None, mode='triangular', gamma=1., scale_fn=None, scale_mode='cycle', cycle_momentum=True, base_momentum=0.8, max_momentum=0.9, last_epoch=-1, verbose="deprecated"): # Attach optimizer if not isinstance(optimizer, Optimizer): raise TypeError(f'{type(optimizer).__name__} is not an Optimizer') self.optimizer = optimizer base_lrs = self._format_param('base_lr', optimizer, base_lr) if last_epoch == -1: for lr, group in zip(base_lrs, optimizer.param_groups): group['lr'] = lr self.max_lrs = self._format_param('max_lr', optimizer, max_lr) step_size_up = float(step_size_up) step_size_down = float(step_size_down) if step_size_down is not None else step_size_up self.total_size = step_size_up + step_size_down self.step_ratio = step_size_up / self.total_size if mode not in ['triangular', 'triangular2', 'exp_range'] \ and scale_fn is None: raise ValueError('mode is invalid and scale_fn is None') self.mode = mode self.gamma = gamma self._scale_fn_ref = None self._scale_fn_custom = scale_fn self.scale_mode = scale_mode self._init_scale_fn() self.cycle_momentum = cycle_momentum if cycle_momentum: if 'momentum' not in optimizer.defaults and 'betas' not in optimizer.defaults: raise ValueError('optimizer must support momentum or beta1 with `cycle_momentum` option enabled') self.use_beta1 = 'betas' in self.optimizer.defaults self.base_momentums = self._format_param('base_momentum', optimizer, base_momentum) self.max_momentums = self._format_param('max_momentum', optimizer, max_momentum) if last_epoch == -1: for m_momentum, b_momentum, group in zip(self.max_momentums, self.base_momentums, optimizer.param_groups): if self.use_beta1: group['betas'] = (m_momentum, *group['betas'][1:]) else: group['momentum'] = m_momentum group['max_momentum'] = m_momentum group['base_momentum'] = b_momentum super().__init__(optimizer, last_epoch, verbose) self.base_lrs = base_lrs def _init_scale_fn(self): if self._scale_fn_custom is not None: return if self.mode == 'triangular': self._scale_fn_ref = self._triangular_scale_fn self.scale_mode = 'cycle' elif self.mode == 'triangular2': self._scale_fn_ref = self._triangular2_scale_fn self.scale_mode = 'cycle' elif self.mode == 'exp_range':
(optimizer, base_lr, max_lr, step_size_up=2000, step_size_down=None, mode='triangular', gamma=1.0, scale_fn=None, scale_mode='cycle', cycle_momentum=True, base_momentum=0.8, max_momentum=0.9, last_epoch=-1, verbose='deprecated')
[ -0.006408096756786108, -0.02002912200987339, -0.04633390158414841, 0.026243651285767555, -0.018266640603542328, 0.02960561029613018, -0.04507061839103699, -0.06491636484861374, -0.06031149998307228, -0.008751279674470425, -0.008445647545158863, 0.02485811710357666, 0.07310731709003448, 0.04906421899795532, -0.031541284173727036, 0.05240580067038536, -0.0019102037185803056, -0.013804405927658081, -0.012021549046039581, -0.010152095928788185, 0.004245745949447155, -0.034475356340408325, 0.00795663520693779, 0.05652165412902832, -0.023166950792074203, 0.056725408881902695, 0.01610683836042881, 0.01835833117365837, -0.08533261716365814, 0.016972796991467476, -0.01810363680124283, 0.020008746534585953, -0.007946447469294071, -0.0015650935238227248, 0.04592639207839966, -0.04060838371515274, -0.012490184977650642, 0.017156176269054413, -0.13993898034095764, -0.0013957221526652575, 0.010625826194882393, -0.011695540510118008, 0.030930018052458763, -0.0070855822414159775, -0.0056491089053452015, -0.004760227631777525, 0.00015265711408574134, 0.047067418694496155, 0.01591327041387558, -0.07086601108312607, 0.047393426299095154, -0.07893471419811249, 0.006346970330923796, -0.011583475396037102, -0.02606027200818062, 0.06071900948882103, 0.03728717565536499, 0.02485811710357666, 0.053383827209472656, -0.06312331557273865, 0.009484797716140747, -0.08875570446252823, -0.030604010447859764, 0.003907003439962864, 0.010686952620744705, -0.039385855197906494, -0.04718967154622078, -0.024959994480013847, 0.020752452313899994, 0.017135800793766975, 0.000993305933661759, -0.028077447786927223, 0.006774855777621269, -0.018236078321933746, -0.04641540348529816, -0.034088220447301865, -0.03800031915307045, -0.06096351519227028, -0.02628440223634243, -0.044540856033563614, 0.039772987365722656, 0.050612758845090866, 0.027486557140946388, -0.04474461078643799, 0.013468209654092789, -0.045804139226675034, 0.004118399228900671, -0.010253973305225372, -0.030216876417398453, -0.03302869573235512, 0.0014874119078740478, -0.03213217481970787, 0.037001919001340866, 0.04629315063357353, 0.012816193513572216, 0.01084995735436678, -0.0761636421084404, -0.03433272987604141, -0.004464782774448395, -0.05065350979566574, -0.006825794465839863, 0.003624293254688382, -0.0022960647474974394, 0.05517687276005745, 0.020925644785165787, -0.02414497546851635, -0.042544055730104446, -0.022046297788619995, 0.00016292446525767446, -0.033680710941553116, -0.05481011047959328, 0.06401984393596649, -0.03221367672085762, -0.013478397391736507, -0.03983411565423012, 0.04158640652894974, -0.060107745230197906, 0.010131720453500748, 0.005144815426319838, 0.02255568467080593, 0.0029035096522420645, 0.015006559900939465, -0.012153989635407925, 0.004574301186949015, 0.0033976156264543533, -0.009637614712119102, 0.008389614522457123, 0.05481011047959328, 0.0009054365800693631, -0.02874983847141266, -0.00832848809659481, 0.007309712935239077, -0.0009551018592901528, 0.007666284218430519, 0.02732355333864689, -0.04323682561516762, -0.0031174523755908012, 0.06385684013366699, -0.052202045917510986, 0.0025456647854298353, 0.04560038447380066, 0.06862470507621765, 0.018266640603542328, -0.013906283304095268, 0.05578813701868057, 0.023166950792074203, 0.06312331557273865, 0.03586089238524437, -0.02469511330127716, 0.03280456364154816, 0.004846823401749134, 0.0068461699411273, 0.05599189177155495, 0.02597877010703087, 0.038020696491003036, 0.003468930022791028, -0.035106997936964035, 0.020609823986887932, -0.033293578773736954, 0.00736574549227953, -0.07090675830841064, 0.012296617962419987, -0.0481269471347332, -0.062104541808366776, 0.025754639878869057, 0.01829720474779606, 0.013335769064724445, -0.007319900672882795, -0.009214823134243488, 0.05855920538306236, 0.023696713149547577, -0.07685641199350357, 0.009581581689417362, 0.01464998908340931, 0.008226610720157623, 0.08647365123033524, 0.05150927975773811, 0.009230104275047779, -0.011634414084255695, 0.045559633523225784, 0.023085448890924454, -0.016422657296061516, -0.006209435407072306, -0.07921996712684631, -0.01923447847366333, 0.05212054401636124, -0.011196340434253216, -0.007411590311676264, -0.016453221440315247, 0.018826967105269432, 0.006270561832934618, -0.015363131649792194, 0.015617825090885162, -0.03382334113121033, -0.026162149384617805, -0.007055019028484821, 0.01978461630642414, 0.02699754573404789, 0.06430509686470032, 0.0206607636064291, 0.030257627367973328, 0.06047450378537178, 0.04154565557837486, -0.013478397391736507, 0.009530643001198769, -0.03308982029557228, -0.022983571514487267, 0.026854917407035828, 0.009337075985968113, 0.02938148006796837, -0.060841262340545654, -0.008542430587112904, 0.01218455284833908, 0.059088967740535736, 0.02968711219727993, -0.02587689273059368, -0.03657403215765953, 0.031541284173727036, 0.02595839463174343, 0.004485158249735832, 0.03728717565536499, -0.03331395238637924, -0.0027787096332758665, -0.0424625538289547, 0.03537187725305557, -0.01720711588859558, 0.04869746044278145, -0.021964795887470245, 0.0023062527179718018, 0.012979197315871716, 0.010310006327927113, -0.07799743860960007, -0.028953595086932182, 0.026895668357610703, 0.04820844903588295, 0.022779816761612892, -0.01962161250412464, 0.0625528022646904, -0.015128813683986664, 0.01720711588859558, -0.013478397391736507, 0.006265467964112759, -0.008786937221884727, -0.005644015036523342, -0.02730317786335945, 0.040812138468027115, 0.08272455632686615, 0.05216129496693611, -0.055380627512931824, -0.0011365711688995361, -0.035738639533519745, -0.05106101930141449, -0.04617089778184891, 0.029483357444405556, -0.05749967694282532, -0.0382448248565197, 0.020232878625392914, 0.004821354057639837, 0.05073501169681549, -0.014711115509271622, -0.011277842335402966, 0.008389614522457123, -0.0695212259888649, 0.0764896497130394, -0.0028576648328453302, -0.0094389533624053, -0.016392095014452934, -0.024002347141504288, -0.023309579119086266, 0.0243894811719656, 0.05868145823478699, 0.04307382181286812, -0.0555843822658062, 0.02809782326221466, -0.012602251023054123, 0.02002912200987339, -0.03995636850595474, -0.012245679274201393, 0.01448698528110981, -0.021088648587465286, 0.0559103898704052, -0.02008006162941456, -0.025938019156455994, -0.044622357934713364, -0.02866833657026291, -0.017196927219629288, -0.025591636076569557, -0.03404746949672699, 0.02881096675992012, 0.022433431819081306, -0.01132878102362156, -0.010697140358388424, 0.04221804812550545, 0.03712417185306549, 0.12209003418684006, 0.017635000869631767, 0.020864518359303474, -0.04890121519565582, 0.011797417886555195, -0.019774429500102997, 0.05912971869111061, -0.00434252992272377, 0.04955323040485382, 0.004966529551893473, -0.024430232122540474, -0.07212929427623749, 0.0002180815936299041, -0.010452634654939175, 0.04727117344737053, 0.007049925159662962, 0.009194447658956051, 0.017217302694916725, 0.00787513330578804, -0.0015969303203746676, 0.007355557754635811, -0.05436185002326965, 0.0018707261187955737, -0.008654496632516384, 0.031133772805333138, 0.05032750219106674, -0.055462129414081573, 0.03624802455306053, 0.026325153186917305, -0.012806005775928497, -0.028953595086932182, -0.0317654125392437, 0.038917217403650284, 0.06133027374744415, -0.03563676029443741, -0.025428632274270058, -0.02872946299612522, -0.016748666763305664, 0.005155003163963556, 0.029890866950154305, -0.027832942083477974, -0.023166950792074203, 0.040567632764577866, 0.031093021854758263, 0.040730636566877365, -0.044377852231264114, 0.09983997792005539, 0.06711691617965698, -0.04376658797264099, 0.024043098092079163, -0.012663377448916435, -0.036370277404785156, 0.09022273868322372, 0.030339129269123077, 0.018368517979979515, -0.01294863410294056, -0.037715062499046326, -0.014741678722202778, -0.049675483256578445, 0.06992873549461365, 0.001391901751048863, -0.02027362957596779, -0.02976861409842968, -0.0774676725268364, 0.050082992762327194, -0.0764896497130394, 0.01131859328597784, 0.027262426912784576, -0.05322082340717316, 0.06752442568540573, 0.050612758845090866, 0.009168977849185467, -0.029625985771417618, -0.013142201118171215, 0.06597588956356049, -0.03924322500824928, 0.0002010489406529814, -0.03306944668292999, 0.03272306174039841, 0.0004574937920551747, -0.04189204052090645, 0.03529037535190582, -0.024124599993228912, -0.01440548337996006, 0.04523362219333649, 0.034312352538108826, 0.09617239236831665, 0.003596276743337512, 0.015424258075654507, 0.022433431819081306, 0.050001490861177444, -0.016942232847213745, 0.014283229596912861, -0.029972368851304054, 0.061778534203767776, -0.04392959177494049, 0.03264155983924866, 0.02927960269153118, 0.027568059042096138, -0.02707904763519764, -0.06422359496355057, 0.03023725189268589, 0.06259355694055557, 0.06976573169231415, -0.01345802191644907, -0.03571826219558716, -0.029972368851304054, 0.03586089238524437, 0.007992292754352093, 0.01473149098455906, 0.01211323868483305, -0.02644740790128708, 0.11630339175462723, 0.05040900409221649, -0.018419457599520683, 0.09250479936599731, -0.02071170136332512, -0.023472582921385765, -0.05150927975773811, -0.0004336162528488785, -0.02620290033519268, -0.037959568202495575, -0.029014721512794495, -0.03512737154960632, 0.015597449615597725, 0.02597877010703087, 0.02153691090643406, 0.03720567375421524, 0.027506932616233826, 0.038346704095602036, 0.019183538854122162, -0.008140014484524727, -0.01539369486272335, 0.006168684456497431, -0.05297631770372391, -0.01191967073827982, -0.0008131100330501795, 0.009372732602059841, -0.05040900409221649, -0.028688712045550346, -0.01496580895036459, -0.03657403215765953, -0.0012874773237854242, 0.06785043329000473, 0.013733090832829475, -0.04376658797264099, 0.014772241935133934, -0.04417409747838974, -0.007574594579637051, -0.01092127151787281, 0.008155296556651592, -0.012744879350066185, -0.01821570284664631, -0.004380733706057072, -0.08900021016597748, 0.0020286364015191793, -0.025347130373120308, 0.03753168135881424, 0.029503732919692993, 0.02263718657195568, -0.00342308497056365, -0.009831181727349758, 0.007783443201333284, -0.02960561029613018, -0.011369532905519009, -0.06679090857505798, 0.007197647355496883, 0.029544483870267868, 0.0034791177604347467, 0.02579539082944393, -0.021659163758158684, 0.035575635731220245, 0.0761636421084404, 0.038754213601350784, -0.0012569139944389462, 0.011970610357820988, -0.013050511479377747, -0.008674872107803822, 0.038041070103645325, -0.04608939588069916, -0.024959994480013847, 0.0002180815936299041, -0.020039310678839684, 0.00655072508379817, 0.017879506573081017, -0.0491049699485302, 0.04621164873242378, -0.041036270558834076, 0.035575635731220245, 0.0484529547393322, -0.00921991653740406, -0.008797124959528446, -0.026854917407035828, 0.043807338923215866, -0.01989668235182762, 0.029707487672567368, -0.08125752210617065, -0.012398495338857174, 0.03398634493350983, 0.05159078165888786, -0.04478536173701286, -0.03272306174039841, 0.007829288020730019, -0.00820114091038704, 0.08040174841880798, 0.018236078321933746, 0.0351681225001812, 0.015108438208699226, -0.028199700638651848, 0.013050511479377747, 0.0682171955704689, 0.02453210949897766, -0.09030424058437347, 0.011155589483678341, -0.07685641199350357, 0.006815606728196144, 0.0019267587922513485, -0.008807312697172165, 0.018256453797221184, -0.010982397943735123, -0.04146415367722511, -0.027608811855316162, -0.009240292012691498, 0.028546083718538284, 0.018613025546073914, -0.04641540348529816, 0.011074087582528591, 0.027914443984627724, -0.011695540510118008, -0.007513468153774738, 0.03253968432545662, 0.04515212029218674, -0.023452207446098328, -0.05012374371290207, 0.050694260746240616, 0.03190804272890091, 0.03675741329789162, -0.023880092427134514, 0.020732076838612556, 0.05383208766579628, -0.001352424267679453, -0.0035376972518861294, -0.053628332912921906, -0.04205504432320595, -0.02938148006796837, -0.03315094858407974, -0.031296778470277786, 0.021862918511033058, 0.04930872470140457, 0.0011295671574771404, -0.02771068923175335, 0.019886493682861328, 0.03459760919213295, 0.021883293986320496, 0.007854757830500603, 0.0054657296277582645, 0.017624812200665474, 0.017217302694916725, -0.01863340102136135, 0.011889107525348663, -0.025673137977719307, -0.020884893834590912, 0.003369599347934127, 0.030665136873722076, 0.0170950498431921, -0.011848356574773788, -0.06332707405090332, 0.0016784323379397392, -0.01301994826644659, -0.05978173390030861, -0.01421191543340683, 0.010727704502642155, -0.010208128951489925, 0.033293578773736954, -0.0030359504744410515, 0.0351681225001812, 0.011614038608968258, -0.013264454901218414, 0.010911083780229092, -0.05570663511753082, -0.030604010447859764, 0.028220076113939285, 0.022046297788619995, -0.0307873897254467, -0.022127799689769745, -0.031174523755908012, 0.02493961900472641, -0.02294282056391239, -0.012887507677078247, -0.06907296925783157, 0.021170150488615036, 0.01835833117365837, -0.05383208766579628, 0.034312352538108826, -0.032111797481775284, 0.016198527067899704, -0.03474023938179016, 0.0773046687245369, -0.03278419002890587, -0.05937422439455986, -0.008842969313263893, 0.03125602751970291, -0.047474928200244904, 0.012367932125926018, 0.034088220447301865, 0.05831469967961311, -0.06410134583711624, 0.014436046592891216, -0.002727770945057273, 0.029320353642106056, -0.034617986530065536, -0.03830595314502716, 0.033517707139253616, -0.037959568202495575, 0.028403455391526222, -0.013437646441161633, -0.029096223413944244, 0.024919243529438972, -0.00132058747112751, -0.01437491923570633, 0.007151802536100149, -0.037633560597896576, -0.051183272153139114, 0.004182072822004557, 0.09136377274990082, -0.0698472335934639, -0.017787817865610123, 0.018399082124233246, -0.02159803733229637, -0.007426871918141842, -0.05994473770260811, 0.0017637547571212053, 0.02636590600013733, -0.0700102373957634, 0.0026462688110768795, -0.06613889336585999, -0.000021091833332320675, -0.022188926115632057, -0.013193140737712383, -0.04478536173701286, 0.05097951740026474, 0.009530643001198769, 0.0061228396371006966, 0.045641135424375534, -0.0016071180580183864, -0.031561657786369324, 0.02650853432714939, 0.00891937781125307, -0.0027939912397414446, -0.014232290908694267, -0.04535587877035141, 0.00293916673399508, 0.02123127691447735, 0.020701514557003975, 0.06613889336585999, 0.06312331557273865, -0.03372146189212799, 0.024246852844953537, -0.02145540900528431, 0.007314806804060936, -0.009933059103786945, 0.030583634972572327, 0.03223405033349991, 0.0015179752372205257, 0.04315532371401787, -0.05762193351984024, -0.0307873897254467, 0.004831541795283556, -0.005847770255059004, 0.008252079598605633, -0.055462129414081573, -0.016972796991467476, -0.009107851423323154, 0.0006819427362643182, -0.020844142884016037, 0.016015147790312767, -0.04356283321976662, -0.05770343542098999, -0.023635586723685265, -0.003313566790893674, -0.008949941024184227, 0.032193299382925034, -0.04242180287837982, -0.06695391237735748, 0.0027226770762354136, -0.0004635427612811327, 0.011420471593737602, 0.03264155983924866, -0.05888521298766136, 0.01681997999548912, 0.037878066301345825, -0.010034936480224133, -0.000590252922847867, -0.0018427098402753472, 0.016891295090317726, -0.004459688905626535, -0.011389908380806446, 0.06169703230261803, -0.03007424809038639, -0.02169991470873356, 0.029503732919692993, -0.035351503640413284, -0.0622267946600914, -0.012235491536557674, 0.03221367672085762, -0.03272306174039841, -0.008099263533949852, -0.029340729117393494, -0.03247855603694916, -0.0019522281363606453, 0.02801632136106491, 0.05423959717154503, -0.005065860226750374, -0.01785913109779358, 0.019183538854122162, -0.0017230036901310086, 0.06198228895664215, 0.056969914585351944, 0.03282494097948074, -0.02524525299668312, -0.010080781765282154, -0.03958960995078087, -0.012418870814144611, 0.022025922313332558, -0.04633390158414841, 0.020732076838612556, 0.008868439123034477, 0.03863196074962616, 0.026773415505886078, -0.03887646645307541, -0.017033923417329788, 0.012683752924203873, 0.027180925011634827, 0.037959568202495575, 0.02587689273059368, -0.029035096988081932, 0.031867291778326035, 0.04873821139335632, -0.009398202411830425, 0.017798004671931267, 0.033212076872587204, -0.029238851740956306, 0.01132878102362156, -0.006362251937389374, -0.017553498968482018, 0.03541262820363045, 0.005516668315976858, 0.002336815930902958, -0.0413215272128582, -0.019051099196076393, -0.01944842003285885, 0.044296350330114365, -0.03441423177719116, -0.033293578773736954, 0.06927672028541565, -0.045396629720926285, 0.022107424214482307, -0.05350608006119728, -0.026691913604736328, 0.014792617410421371, 0.00023495506320614368, -0.08044249564409256, 0.00847621075809002, -0.011929858475923538, -0.04242180287837982, -0.07294431328773499, 0.0037312644999474287, -0.0630418136715889, 0.07710091769695282, 0.05485086143016815, 0.010452634654939175, 0.0008188406354747713, 0.021007146686315536, -0.004431672394275665 ]
716,069
torch.optim.lr_scheduler
__init__
null
def __init__(self, optimizer, base_lr, max_lr, step_size_up=2000, step_size_down=None, mode='triangular', gamma=1., scale_fn=None, scale_mode='cycle', cycle_momentum=True, base_momentum=0.8, max_momentum=0.9, last_epoch=-1, verbose="deprecated"): # Attach optimizer if not isinstance(optimizer, Optimizer): raise TypeError(f'{type(optimizer).__name__} is not an Optimizer') self.optimizer = optimizer base_lrs = self._format_param('base_lr', optimizer, base_lr) if last_epoch == -1: for lr, group in zip(base_lrs, optimizer.param_groups): group['lr'] = lr self.max_lrs = self._format_param('max_lr', optimizer, max_lr) step_size_up = float(step_size_up) step_size_down = float(step_size_down) if step_size_down is not None else step_size_up self.total_size = step_size_up + step_size_down self.step_ratio = step_size_up / self.total_size if mode not in ['triangular', 'triangular2', 'exp_range'] \ and scale_fn is None: raise ValueError('mode is invalid and scale_fn is None') self.mode = mode self.gamma = gamma self._scale_fn_ref = None self._scale_fn_custom = scale_fn self.scale_mode = scale_mode self._init_scale_fn() self.cycle_momentum = cycle_momentum if cycle_momentum: if 'momentum' not in optimizer.defaults and 'betas' not in optimizer.defaults: raise ValueError('optimizer must support momentum or beta1 with `cycle_momentum` option enabled') self.use_beta1 = 'betas' in self.optimizer.defaults self.base_momentums = self._format_param('base_momentum', optimizer, base_momentum) self.max_momentums = self._format_param('max_momentum', optimizer, max_momentum) if last_epoch == -1: for m_momentum, b_momentum, group in zip(self.max_momentums, self.base_momentums, optimizer.param_groups): if self.use_beta1: group['betas'] = (m_momentum, *group['betas'][1:]) else: group['momentum'] = m_momentum group['max_momentum'] = m_momentum group['base_momentum'] = b_momentum super().__init__(optimizer, last_epoch, verbose) self.base_lrs = base_lrs
(self, optimizer, base_lr, max_lr, step_size_up=2000, step_size_down=None, mode='triangular', gamma=1.0, scale_fn=None, scale_mode='cycle', cycle_momentum=True, base_momentum=0.8, max_momentum=0.9, last_epoch=-1, verbose='deprecated')
[ -0.007637193892151117, -0.034220125526189804, -0.037341754883527756, 0.016471995040774345, -0.027368247509002686, 0.01889665611088276, -0.027407513931393623, -0.06569164991378784, -0.10923739522695541, 0.018867207691073418, -0.006125461310148239, 0.043074559420347214, 0.02428588457405567, 0.06474927067756653, -0.029213739559054375, 0.06765493750572205, 0.012417802587151527, -0.013890269212424755, 0.001760824816301465, 0.015078059397637844, 0.005497209262102842, -0.022833051159977913, -0.010984601452946663, 0.05253761261701584, -0.02330423891544342, 0.06553458422422409, -0.011426341719925404, -0.007877697236835957, -0.025620920583605766, 0.005811335518956184, -0.029645662754774094, -0.004733980633318424, 0.02271525375545025, 0.04582316428422928, 0.03011685237288475, -0.044920049607753754, -0.00013950088759884238, 0.03188381344079971, -0.1280064433813095, 0.017188595607876778, 0.006199084687978029, -0.046687010675668716, 0.016442544758319855, -0.010788273066282272, 0.011760100722312927, -0.011230012401938438, 0.0010000503389164805, 0.00024939904687926173, -0.000352164963260293, -0.04908222332596779, 0.028742549940943718, -0.08245813846588135, 0.03011685237288475, -0.0027461503632366657, -0.05026019737124443, 0.060744158923625946, 0.04024742171168327, 0.025856515392661095, 0.04790424928069115, -0.034848377108573914, -0.026209907606244087, -0.06247185543179512, -0.02942970208823681, -0.01773831620812416, 0.006218717899173498, -0.0437813438475132, -0.09455199539661407, -0.023716529831290245, 0.00992442574352026, 0.045273441821336746, 0.022106634452939034, -0.019701603800058365, 0.011563772335648537, 0.011210380122065544, -0.031019965186715126, -0.01063120923936367, -0.06145094335079193, -0.06070489436388016, -0.026916692033410072, -0.03683130070567131, 0.034514620900154114, 0.037577349692583084, 0.006169635336846113, -0.053833384066820145, 0.016285480931401253, -0.08182988315820694, -0.007244536187499762, -0.041660990566015244, 0.010542862117290497, -0.05104551091790199, -0.03445572033524513, -0.04927855357527733, 0.04299602657556534, 0.06953969597816467, 0.00842741783708334, 0.02281341701745987, -0.0609012246131897, -0.011367443017661572, 0.005796610843390226, -0.04554830491542816, -0.025797616690397263, 0.022891949862241745, 0.016501443460583687, 0.0378522127866745, 0.031412623822689056, -0.010788273066282272, -0.03084326907992363, -0.0473937951028347, -0.00547266798093915, -0.04554830491542816, -0.05885940417647362, 0.07059986889362335, -0.04440959542989731, 0.033591873943805695, -0.04594096168875694, 0.02685779333114624, -0.04594096168875694, 0.00425297487527132, 0.01905371993780136, 0.01741437241435051, -0.0066162836737930775, 0.038166336715221405, -0.007018757984042168, 0.013958984054625034, -0.0024307970888912678, -0.023873593658208847, 0.03221757337450981, 0.05512915551662445, -0.010601759888231754, -0.036320846527814865, 0.01902426965534687, 0.00121355801820755, -0.03861789405345917, -0.0002713326539378613, 0.049160756170749664, -0.03873569145798683, -0.006071471143513918, 0.0760578140616417, -0.050966981798410416, 0.01814078912138939, 0.031177029013633728, 0.046529948711395264, 0.02807503193616867, -0.037538085132837296, -0.014341825619339943, 0.04621582105755806, 0.04900369048118591, 0.019505275413393974, -0.010493779554963112, -0.005271431058645248, -0.012388353236019611, 0.00503583624958992, 0.04931781813502312, 0.010493779554963112, 0.04028668999671936, -0.023873593658208847, -0.025483490899205208, 0.0014822831144556403, -0.02919410727918148, 0.020712697878479958, -0.025797616690397263, 0.01189753133803606, -0.011230012401938438, -0.06247185543179512, -0.0006926729111000896, -0.007764807902276516, -0.0026798893231898546, -0.001116007100790739, -0.0058358763344585896, 0.050181664526462555, 0.007102197967469692, -0.08630618453025818, 0.00414008554071188, 0.023657631129026413, -0.01175028458237648, 0.12949854135513306, 0.043624281883239746, 0.004446849692612886, -0.008270354941487312, 0.05155596882104874, 0.050181664526462555, -0.020054996013641357, -0.0018945737974718213, -0.08929038047790527, -0.022401126101613045, 0.03946210816502571, -0.010012773796916008, 0.0001690269127720967, -0.0480613149702549, 0.01819968782365322, 0.03380783647298813, -0.0194169282913208, -0.005075101740658283, -0.027427146211266518, -0.036615338176488876, 0.006846970412880182, 0.0388338565826416, 0.0013522153021767735, 0.06294304132461548, 0.03249243274331093, 0.03011685237288475, 0.04091494157910347, 0.02120351977646351, -0.005349962506443262, 0.0067488057538867, -0.003663988085463643, -0.023971758782863617, 0.025326427072286606, 0.02465890906751156, 0.039481740444898605, -0.028251728042960167, -0.02247965894639492, 0.0014368820702657104, 0.03665460646152496, 0.019956832751631737, -0.008967322297394276, 0.001640573376789689, 0.04762938991189003, 0.048296909779310226, 0.039678070694208145, 0.07083546370267868, -0.03936394304037094, 0.0013730751816183329, -0.005624822806566954, 0.04228924214839935, -0.003656625747680664, 0.049160756170749664, -0.05618932843208313, 0.007941504009068012, 0.005428493954241276, -0.03215867280960083, -0.09785032272338867, -0.013075504451990128, 0.010591943748295307, 0.03156968578696251, 0.05885940417647362, 0.0041768974624574184, 0.033395543694496155, -0.05724950507283211, -0.011328177526593208, 0.010542862117290497, 0.012319638393819332, -0.02428588457405567, 0.010474146343767643, -0.04248557239770889, 0.01961325667798519, 0.052419815212488174, 0.02787870354950428, -0.04240703955292702, -0.003597727045416832, -0.021871039643883705, -0.035535529255867004, -0.032080139964818954, 0.041660990566015244, -0.04118980094790459, 0.00715128006413579, 0.013085320591926575, -0.0035780940670520067, 0.02817319706082344, -0.031177029013633728, -0.00893787294626236, -0.044488128274679184, -0.06502413004636765, 0.07821743190288544, -0.011514689773321152, -0.005668996833264828, 0.004954850301146507, -0.036320846527814865, -0.009639748372137547, -0.0025964495725929737, 0.08771975338459015, 0.049160756170749664, -0.06792979687452316, 0.030902167782187462, 0.0037302488926798105, 0.021635444834828377, -0.06690888851881027, -0.02748604491353035, 0.008613930083811283, -0.012133126147091389, 0.06741934269666672, -0.03848046436905861, -0.0013534423196688294, -0.02092866040766239, -0.019240232184529305, 0.011259461753070354, -0.03209977596998215, -0.01077845599502325, 0.03314031660556793, 0.021419482305645943, -0.0002274654252687469, 0.023382771760225296, 0.03488764539361, 0.046294353902339935, 0.10766676813364029, 0.020516369491815567, 0.03934431076049805, -0.002834498416632414, -0.00244429474696517, -0.019112618640065193, 0.05897720158100128, -0.05253761261701584, 0.012015328742563725, 0.02603321149945259, -0.01400806661695242, -0.04087567701935768, 0.020221875980496407, -0.014705033972859383, 0.07393746078014374, 0.0006337742088362575, 0.019740870222449303, 0.014116047881543636, 0.001033794367685914, -0.0026406235992908478, -0.011887714266777039, -0.06467074155807495, -0.008157465606927872, -0.031177029013633728, -0.004746250808238983, 0.046726275235414505, -0.041032738983631134, 0.051595233380794525, 0.001168770482763648, -0.05269467458128929, -0.024011023342609406, -0.03396489843726158, 0.029370803385972977, 0.059134263545274734, -0.0385000966489315, -0.0271522868424654, -0.053244397044181824, -0.031019965186715126, 0.02369689755141735, 0.04130759835243225, -0.043270889669656754, -0.020791230723261833, 0.05006386712193489, 0.04727599769830704, 0.026092110201716423, -0.02145874872803688, 0.0845784842967987, 0.03891238570213318, -0.03702763095498085, 0.03810743987560272, -0.01328164990991354, -0.033258114010095596, 0.04228924214839935, -0.040600813925266266, 0.04417400062084198, -0.024364415556192398, -0.05477576330304146, -0.02811429835855961, -0.03999219462275505, 0.04075787961483002, 0.019328579306602478, -0.012270555831491947, -0.03954064100980759, -0.059094998985528946, 0.05355852097272873, -0.06427808105945587, -0.011593221686780453, 0.03243353217840195, -0.060155171900987625, 0.06463146954774857, 0.05622859671711922, -0.02475707419216633, -0.034769847989082336, -0.027996500954031944, 0.06891144067049026, -0.011475424282252789, 0.021674709394574165, -0.04664774611592293, 0.02350056916475296, -0.0010828765807673335, -0.02403065748512745, 0.0045180185697972775, -0.038225237280130386, -0.006086195819079876, 0.0200746301561594, 0.03445572033524513, 0.07071767002344131, 0.024894503876566887, 0.03425939381122589, 0.00416217278689146, 0.019927382469177246, -0.03153042122721672, 0.028958512470126152, -0.006449404172599316, 0.05799555405974388, -0.04228924214839935, 0.022008469328284264, 0.02369689755141735, 0.01021891925483942, -0.0181015245616436, -0.03272802755236626, 0.03231573477387428, 0.02899777702987194, 0.046529948711395264, -0.03382746875286102, 0.0045180185697972775, -0.029056675732135773, 0.0157946590334177, 0.0077844406478106976, 0.019731054082512856, 0.013487795367836952, -0.05724950507283211, 0.07268095761537552, 0.08575645834207535, 0.002770691644400358, 0.09761472791433334, -0.010228735394775867, -0.02277415245771408, -0.021223153918981552, 0.029645662754774094, -0.05882013589143753, -0.013183485716581345, 0.002981745172291994, -0.03702763095498085, 0.02014334499835968, 0.016305115073919296, 0.013870636001229286, 0.07169931381940842, 0.009040945209562778, 0.025287162512540817, 0.036713503301143646, -0.011642303317785263, -0.04664774611592293, -0.010179652832448483, -0.03922651335597038, -0.0457446314394474, -0.00700403330847621, 0.016707589849829674, -0.016697771847248077, -0.012447251938283443, -0.002352265641093254, -0.002352265641093254, -0.0021927482448518276, 0.043074559420347214, 0.015480533242225647, -0.03188381344079971, 0.040993474423885345, -0.06804759800434113, 0.0037523359060287476, -0.00394130265340209, -0.010817722417414188, -0.01761070266366005, -0.009782087057828903, 0.033984530717134476, -0.06761567294597626, -0.007529213093221188, 0.021635444834828377, 0.030332814902067184, 0.018670877441763878, -0.0033253205474466085, 0.028546221554279327, -0.02870328538119793, -0.004449303727596998, -0.000494503416121006, 0.011485240422189236, -0.02126241847872734, -0.003762152511626482, 0.03270839527249336, -0.0001271536311833188, -0.0038922203239053488, -0.0352214053273201, 0.06149021163582802, 0.08190841227769852, 0.037577349692583084, -0.027603842318058014, -0.005315604619681835, -0.021812140941619873, 0.019760502502322197, 0.030627308413386345, -0.030529143288731575, -0.033591873943805695, 0.0018847574247047305, -0.0049818456172943115, -0.0035486447159200907, 0.03871605917811394, -0.013762655667960644, 0.07252389192581177, -0.03993329778313637, 0.04841470718383789, 0.031510788947343826, -0.002660256577655673, 0.02306864596903324, -0.030529143288731575, 0.014420357532799244, -0.04625508934259415, 0.06604503840208054, -0.07295581698417664, -0.0017939553363248706, 0.030725471675395966, 0.051595233380794525, -0.010758823715150356, -0.02817319706082344, 0.049985338002443314, 0.011072949506342411, 0.0740552619099617, 0.019770320504903793, 0.040600813925266266, -0.012427618727087975, -0.039678070694208145, -0.009747729636728764, 0.036261945962905884, -0.0033326828852295876, -0.10232661664485931, 0.02995978854596615, -0.10758823156356812, 0.03420049324631691, -0.002998923882842064, -0.0058358763344585896, -0.01561796385794878, -0.002338767983019352, -0.03506433963775635, -0.02340240404009819, -0.043270889669656754, 0.026092110201716423, 0.01804262585937977, -0.011720835231244564, 0.004211254883557558, 0.05249834805727005, -0.00842741783708334, -0.04825764149427414, 0.022754518315196037, 0.02850695513188839, 0.007985677570104599, -0.017983727157115936, 0.08685590326786041, 0.012879175134003162, 0.0167861208319664, -0.0404830165207386, -0.0010614030761644244, 0.07927760481834412, 0.022067368030548096, 0.017424188554286957, -0.030097220093011856, -0.02817319706082344, -0.016187317669391632, -0.05395118147134781, -0.009350163862109184, 0.02817319706082344, 0.031648218631744385, -0.007642102427780628, -0.01698244921863079, 0.016383646056056023, 0.005192899145185947, 0.07169931381940842, 0.025424592196941376, 0.007121830713003874, 0.001948564313352108, 0.01661924086511135, -0.019731054082512856, 0.05143817141652107, -0.03512324020266533, -0.019210781902074814, 0.01145579107105732, 0.03137335926294327, 0.040208157151937485, -0.005639547482132912, -0.040836408734321594, 0.010052039287984371, -0.00027117927675135434, 0.01770886592566967, -0.026936324313282967, 0.026249174028635025, -0.02159617841243744, 0.04778645187616348, -0.014606869779527187, 0.02300974726676941, -0.0019424289930611849, -0.03137335926294327, -0.031118130311369896, -0.05615006387233734, -0.05477576330304146, 0.017797214910387993, -0.0040419213473796844, 0.009350163862109184, -0.015725944191217422, -0.027760906144976616, 0.018935922533273697, -0.022931214421987534, -0.00733288424089551, -0.037734415382146835, -0.018769042566418648, 0.03011685237288475, -0.05779922753572464, 0.0266614630818367, -0.01384118665009737, 0.00941397063434124, -0.03722395747900009, 0.0549720898270607, -0.03170711547136307, -0.07323067635297775, -0.03308141976594925, -0.00032731707324273884, -0.06832245737314224, -0.04715820029377937, 0.03380783647298813, 0.02053600177168846, -0.06694815307855606, -0.008378335274755955, 0.005615006200969219, 0.019299130886793137, -0.018553080037236214, -0.03963880240917206, 0.003401398193091154, 0.011063133366405964, 0.011279094964265823, -0.014587236568331718, -0.04554830491542816, 0.008010218851268291, 0.006979492027312517, -0.03284582495689392, -0.02130168490111828, -0.03584965690970421, -0.02919410727918148, 0.019397294148802757, 0.09431640058755875, -0.03702763095498085, -0.02939043566584587, 0.027859069406986237, 0.001192698022350669, 0.027839437127113342, -0.07024648040533066, -0.019475826993584633, 0.04554830491542816, -0.09604409337043762, -0.00952685996890068, -0.07005015015602112, -0.0002832964528352022, -0.027603842318058014, 0.005315604619681835, -0.06337496638298035, 0.02719155140221119, -0.00476342998445034, 0.004221071023494005, 0.04786498472094536, 0.005286155268549919, -0.03541773185133934, 0.049357082694768906, 0.01896537095308304, 0.023382771760225296, -0.015372552908957005, -0.01823895424604416, -0.023657631129026413, 0.012064410373568535, 0.052812471985816956, 0.07319141179323196, 0.03396489843726158, -0.00042854915955103934, 0.034769847989082336, -0.031942710280418396, 0.00446893647313118, -0.00908511970192194, -0.0019007091177627444, 0.020261142402887344, 0.033258114010095596, 0.05387264862656593, -0.033002886921167374, -0.03284582495689392, 0.018769042566418648, 0.025797616690397263, 0.012172391638159752, -0.04452739283442497, -0.010670475661754608, -0.04704040288925171, -0.017620518803596497, -0.02169434353709221, 0.008471591398119926, -0.04778645187616348, -0.032374635338783264, -0.04605875909328461, 0.00729852681979537, -0.01109258271753788, 0.043663546442985535, -0.014459623023867607, -0.06694815307855606, 0.00079390499740839, -0.005659180227667093, 0.016138235107064247, 0.025601288303732872, -0.03598708659410477, -0.005453035235404968, 0.016943182796239853, -0.011014050804078579, -0.04354574903845787, 0.021046457812190056, 0.024541111662983894, 0.003499562619253993, -0.03581038862466812, 0.02389322593808174, -0.009747729636728764, -0.025699451565742493, 0.029567131772637367, -0.03524103760719299, -0.08960450440645218, -0.048336174339056015, 0.017473271116614342, -0.020653799176216125, 0.004733980633318424, -0.026622198522090912, -0.07963100075721741, 0.01642291247844696, 0.013909902423620224, 0.042446307837963104, 0.0019129796419292688, -0.0047266180627048016, 0.0017645059851929545, -0.03188381344079971, 0.04680480808019638, 0.05084918439388275, 0.03700799494981766, -0.05049579218029976, 0.022950848564505577, 0.028251728042960167, 0.012201840989291668, 0.02330423891544342, -0.03370967134833336, 0.008412692695856094, 0.002925300505012274, 0.003251697402447462, 0.026818526908755302, -0.007293618284165859, 0.004071370232850313, -0.034220125526189804, 0.0014270656974986196, 0.010758823715150356, 0.03170711547136307, -0.02860512025654316, 0.009850801900029182, 0.046883340924978256, -0.02271525375545025, -0.0148130152374506, -0.01474430039525032, -0.023245342075824738, 0.008535399101674557, -0.012280371971428394, 0.0036099974531680346, 0.034082695841789246, 0.017365289852023125, 0.02893887832760811, -0.04009035974740982, 0.006473945453763008, -0.0015571335097774863, 0.04868956655263901, -0.007632285822182894, -0.049789007753133774, 0.05084918439388275, -0.008363611064851284, 0.017326025292277336, -0.03571222722530365, 0.02544422447681427, 0.04095420613884926, 0.016933366656303406, -0.086227647960186, 0.03443608805537224, -0.008913331665098667, -0.01661924086511135, -0.06667329370975494, -0.02261708863079548, -0.0687936469912529, 0.06325717270374298, 0.008496132679283619, 0.02412882074713707, 0.015127141028642654, 0.062354058027267456, -0.022028101608157158 ]
716,070
torch.optim.lr_scheduler
_exp_range_scale_fn
null
@staticmethod def _exp_range_scale_fn(gamma, x): return gamma ** x
(gamma, x)
[ 0.02918086014688015, -0.06119779869914055, 0.014188936911523342, 0.038611676543951035, 0.004715408198535442, 0.025029251351952553, -0.010054412297904491, -0.08371558040380478, -0.013941206969320774, 0.06352133303880692, 0.050195179879665375, -0.0055397506803274155, 0.0779750868678093, 0.030086355283856392, -0.06939850747585297, 0.002223161282017827, 0.004333135671913624, -0.01846868358552456, 0.03584393858909607, 0.036698177456855774, -0.000696206116117537, -0.0009439359419047832, 0.009712716564536095, 0.0029001471120864153, -0.04028598964214325, 0.08480901271104813, 0.049101751297712326, 0.018964141607284546, -0.010438820347189903, -0.059865184128284454, -0.014188936911523342, -0.017956137657165527, 0.06331631541252136, 0.021919814869761467, 0.04404464736580849, -0.04961429536342621, 0.0033742506057024, -0.0024281791411340237, -0.08029861748218536, -0.0300521869212389, -0.012668388895690441, 0.01430853083729744, 0.01232669223099947, -0.00799569208174944, 0.005253579933196306, -0.004749577958136797, 0.015504468232393265, 0.03367416560649872, -0.01898122765123844, -0.016580810770392418, 0.006932162679731846, -0.02808743342757225, 0.036253973841667175, -0.024380028247833252, -0.03727906197309494, 0.10004866868257523, 0.04001263156533241, -0.011011161841452122, 0.007038943003863096, -0.02316700667142868, 0.001555785769596696, 0.0059625995345413685, -0.009644377045333385, -0.07442144304513931, 0.006351279094815254, 0.02060428448021412, -0.05634571239352226, 0.007931624539196491, 0.004245575983077288, 0.06136864796280861, -0.024943826720118523, -0.010353396646678448, -0.0198183823376894, -0.02943713217973709, -0.024465452879667282, 0.03449423611164093, -0.06041190028190613, -0.005761853419244289, -0.0018707870040088892, -0.0391925610601902, 0.013300526887178421, 0.0003686582203954458, 0.004489034414291382, 0.0024602131452411413, 0.03522888571023941, -0.0579175166785717, 0.024943826720118523, -0.0002470624167472124, 0.020894726738333702, 0.04999016225337982, -0.058942604809999466, -0.01799030788242817, 0.014897956512868404, 0.05484224855899811, 0.021014319732785225, 0.030086355283856392, -0.024670470505952835, 0.01265130378305912, 0.03340081125497818, -0.026498544961214066, 0.038645848631858826, 0.04612899571657181, 0.01336886640638113, 0.042096979916095734, 0.018195325508713722, -0.009840852580964565, 0.0047837477177381516, -0.020262587815523148, 0.008495423011481762, 0.027489464730024338, -0.051630303263664246, 0.05730246379971504, 0.008251965045928955, -0.04271203279495239, -0.08644915372133255, 0.006065108813345432, -0.022090664133429527, 0.05262122303247452, 0.01968170516192913, -0.00747033441439271, -0.03483593463897705, -0.010250887833535671, -0.011643299832940102, 0.039260901510715485, 0.025900576263666153, 0.044488854706287384, 0.04629984498023987, 0.025968916714191437, -0.011814148165285587, 0.017802374437451363, 0.003923100419342518, 0.021697713062167168, 0.007363554555922747, 0.03857750818133354, 0.052723731845617294, -0.042609523981809616, -0.011028246954083443, 0.04978514462709427, 0.04240450635552406, 0.060992781072854996, -0.013830156065523624, 0.05026352033019066, -0.020177165046334267, -0.006035210099071264, 0.005996769294142723, 0.01824657991528511, 0.08310052752494812, 0.0431220680475235, -0.010404651053249836, 0.010669466108083725, -0.022808225825428963, 0.10312393307685852, 0.08105035126209259, -0.013129678554832935, 0.0535779744386673, -0.011480994522571564, 0.03635648265480995, -0.02912960574030876, 0.025490541011095047, -0.007581385783851147, -0.033742506057024, 0.06454642117023468, -0.07196123152971268, -0.046709880232810974, -0.00034783611772581935, -0.005479953717440367, -0.019545026123523712, -0.0022402461618185043, 0.014727109111845493, 0.0024239078629761934, -0.004706866107881069, -0.0313677154481411, 0.020621368661522865, 0.007585656829178333, 0.04062768444418907, 0.059728506952524185, 0.009968988597393036, 0.03707404434680939, 0.00632565189152956, 0.049648467451334, -0.02082638628780842, -0.050536878407001495, -0.0657423585653305, -0.0005170825170353055, 0.004911883734166622, 0.02687440998852253, -0.00787182804197073, 0.010225260630249977, -0.06119779869914055, -0.05388550087809563, -0.008875560015439987, -0.03240989148616791, 0.025849321857094765, -0.04917009174823761, -0.008085387758910656, 0.0016134469769895077, -0.03666400909423828, 0.005283478647470474, -0.0021601610351353884, 0.02774573676288128, -0.028207026422023773, 0.007243960630148649, -0.02870248630642891, 0.013086967170238495, 0.0159999281167984, -0.021971069276332855, 0.006880908273160458, 0.011028246954083443, -0.040832702070474625, -0.008764509111642838, -0.0601043738424778, -0.019152075052261353, -0.021680627018213272, 0.03128229081630707, 0.02060428448021412, 0.00065616361098364, -0.0018312784377485514, -0.0189470574259758, 0.014718566089868546, 0.027489464730024338, 0.04821334406733513, -0.0736013725399971, 0.029864253476262093, -0.003017605049535632, 0.07783840596675873, 0.022791139781475067, 0.05603818595409393, 0.030325543135404587, -0.0134970024228096, -0.009114747866988182, -0.01763152703642845, 0.0024965181946754456, -0.000015141082258196548, -0.010250887833535671, 0.01182269025593996, 0.007401995360851288, 0.023149922490119934, 0.034032948315143585, 0.04841836169362068, 0.04175528138875961, -0.03471634164452553, 0.03932923823595047, 0.013795986771583557, 0.08836265653371811, -0.008213523775339127, 0.0048520867712795734, 0.03128229081630707, 0.0801619440317154, -0.02608850970864296, 0.019955061376094818, -0.0474616102874279, -0.042131148278713226, -0.015350704081356525, 0.043839629739522934, 0.01635870896279812, 0.06700664013624191, 0.004489034414291382, 0.043087899684906006, 0.038782525807619095, -0.03210236504673958, 0.01793905347585678, -0.008597931824624538, -0.029197946190834045, 0.011626215651631355, -0.020928895100951195, -0.010515701957046986, 0.006372635252773762, 0.00884139072149992, 0.011079501360654831, 0.05327044799923897, 0.05409051850438118, 0.09485488384962082, -0.025900576263666153, -0.01106241624802351, 0.021663542836904526, 0.001063529634848237, 0.05111775919795036, -0.010985534638166428, 0.020740963518619537, -0.0025734000373631716, 0.022842394188046455, -0.04493305832147598, -0.011762893758714199, 0.04838418960571289, -0.036732349544763565, -0.003357165725901723, 0.023577041923999786, -0.013291984796524048, 0.08781594038009644, -0.005535479635000229, -0.03823581337928772, 0.03295660391449928, 0.0014682260807603598, 0.03053056076169014, 0.07824844121932983, 0.006287211086601019, 0.03487010300159454, -0.016034096479415894, 0.010242345742881298, 0.035775598138570786, 0.041789453476667404, -0.020450521260499954, -0.024448366835713387, 0.03022303432226181, -0.015957215800881386, 0.004166558850556612, 0.04793998599052429, -0.013727647252380848, 0.026857325807213783, 0.03162398934364319, -0.048145003616809845, 0.029112521559000015, -0.06693829596042633, -0.00474530691280961, 0.009712716564536095, -0.05207451060414314, 0.015538637526333332, 0.030889341607689857, 0.00493323989212513, 0.05754164978861809, 0.008717525750398636, 0.02883916348218918, 0.028822079300880432, 0.012506083585321903, -0.03196568414568901, -0.022808225825428963, -0.03198276832699776, 0.015760740265250206, 0.025900576263666153, -0.06222289055585861, -0.09594830870628357, 0.010071497410535812, 0.05381716042757034, 0.04756411910057068, -0.08603911846876144, -0.03422088176012039, 0.05238203704357147, 0.034511324018239975, -0.03343497961759567, -0.054637230932712555, -0.040696024894714355, 0.014692938886582851, -0.044352173805236816, 0.0047538490034639835, 0.0241750106215477, -0.023491617292165756, -0.0021099743898957968, -0.06041190028190613, -0.00036091668880544603, -0.004958867095410824, 0.005847277119755745, -0.03680068626999855, 0.04035433009266853, -0.020177165046334267, 0.04035433009266853, 0.02912960574030876, 0.0007298418786376715, -0.0683734193444252, -0.02308158203959465, 0.013291984796524048, 0.09348809719085693, 0.015401958487927914, -0.05251871421933174, -0.026806071400642395, 0.0448647178709507, 0.0058814468793570995, -0.018229495733976364, -0.00037559893098659813, 0.08569741994142532, 0.0357072576880455, 0.0483500212430954, -0.02164645865559578, -0.05217701941728592, 0.01456480287015438, -0.05866924673318863, 0.03953425586223602, -0.05381716042757034, -0.020894726738333702, -0.06167617440223694, 0.012096047401428223, 0.0622912272810936, -0.028685400262475014, -0.0370057038962841, 0.013394493609666824, 0.033503320068120956, -0.006133447866886854, 0.009114747866988182, -0.005283478647470474, 0.04520641639828682, 0.0018494309624657035, 0.010174006223678589, -0.013300526887178421, 0.061642006039619446, 0.001550446730107069, -0.023047413676977158, -0.024858402088284492, -0.004788018763065338, -0.002372653456404805, -0.0070901974104344845, 0.021885644644498825, -0.06666494160890579, 0.060514409095048904, -0.01145536731928587, 0.0014383277157321572, -0.0019252448109909892, -0.05757581815123558, 0.006359821651130915, 0.050844404846429825, 0.023525787517428398, 0.06563985347747803, -0.021851476281881332, -0.02965923584997654, -0.05603818595409393, -0.03543390333652496, -0.0020202791783958673, -0.05976267531514168, -0.011164925061166286, -0.10052704066038132, -0.05012684315443039, -0.009311223402619362, 0.0029642151203006506, -0.032819926738739014, -0.004600085783749819, 0.04865754768252373, 0.018314920365810394, -0.05381716042757034, -0.010746347717940807, -0.019049566239118576, 0.0044420515187084675, 0.041174400597810745, -0.045616451650857925, -0.03367416560649872, -0.034425899386405945, -0.02094598114490509, 0.04124273732304573, -0.03707404434680939, -0.036253973841667175, 0.02342327870428562, 0.001167106325738132, -0.006590466480702162, 0.048281680792570114, 0.0045488313771784306, 0.04729076102375984, -0.02400416135787964, 0.019801298156380653, -0.026925664395093918, -0.018007392063736916, 0.006645992398262024, -0.03806496411561966, -0.05552564188838005, 0.0013849376700818539, 0.012805067002773285, 0.024824233725667, -0.02960798144340515, 0.08767925947904587, -0.03247822821140289, -0.08747424185276031, -0.07059444487094879, 0.030205950140953064, 0.0012354454956948757, 0.013830156065523624, 0.04633401334285736, -0.02173188142478466, -0.030803916975855827, -0.016034096479415894, 0.04254118353128433, 0.04421549662947655, 0.017887799069285393, 0.020348012447357178, -0.054808080196380615, 0.04206280782818794, 0.03601478412747383, -0.02420918084681034, -0.06639157980680466, -0.004668425302952528, 0.013898495584726334, -0.047017406672239304, 0.055730659514665604, 0.042233657091856, -0.055730659514665604, -0.004211406223475933, -0.04992182180285454, 0.07373805344104767, 0.06109528988599777, -0.030410967767238617, 0.0370057038962841, 0.01476127840578556, 0.004625712987035513, -0.002148415194824338, 0.014650227501988411, -0.03348623216152191, 0.03946591913700104, 0.03762075677514076, 0.04838418960571289, -0.056550730019807816, -0.0897294357419014, 0.05778083577752113, 0.011489536613225937, 0.0070901974104344845, 0.001904956647194922, -0.02965923584997654, 0.04424966499209404, -0.04691489785909653, 0.02103140391409397, 0.04503556713461876, 0.012155844829976559, -0.04377128928899765, 0.022654462605714798, -0.074899822473526, -0.048930905759334564, -0.00588998943567276, -0.020621368661522865, -0.026020171120762825, -0.02021133340895176, 0.0013785308692604303, -0.029983846470713615, -0.029642149806022644, 0.00705602765083313, -0.0014223107136785984, -0.011028246954083443, -0.011899571865797043, 0.0014981245622038841, 0.008170811459422112, -0.03946591913700104, 0.018007392063736916, -0.0003937515430152416, -0.00022704114962834865, 0.005544021725654602, -0.014103513211011887, 0.06365801393985748, -0.0017042100662365556, -0.02895875833928585, 0.03557058051228523, 0.028429128229618073, -0.05566231906414032, 0.033469147980213165, -0.06451225280761719, -0.05327044799923897, 0.013590969145298004, 0.01387286838144064, -0.026242272928357124, -0.0313677154481411, 0.050673555582761765, 0.010942822322249413, -0.01019109133630991, 0.002908689435571432, -0.01537633128464222, 0.03493844345211983, 0.04677821695804596, -0.029642149806022644, 0.011344315484166145, 0.010618211701512337, 0.030821003019809723, 0.015102975070476532, 0.00978105515241623, 0.01925458386540413, -0.007453249767422676, 0.013471375219523907, -0.03762075677514076, -0.06440974771976471, -0.03932923823595047, -0.02426043525338173, 0.07804342359304428, 0.0026908579748123884, -0.1167234405875206, -0.021885644644498825, -0.041960299015045166, 0.049716804176568985, 0.002106771105900407, -0.016819998621940613, -0.018878718838095665, 0.030018016695976257, 0.06369218230247498, -0.015239653177559376, -0.04380546137690544, -0.01846868358552456, 0.05699493736028671, -0.10804435610771179, -0.02226151153445244, -0.03779160603880882, -0.018144071102142334, -0.03148731216788292, -0.04691489785909653, -0.02608850970864296, -0.0011372078442946076, 0.028446214273571968, -0.03871418535709381, 0.014291445724666119, -0.04524058476090431, 0.014180394820868969, 0.00556537788361311, 0.018964141607284546, -0.06201787292957306, -0.05627737566828728, -0.03632231429219246, -0.047051575034856796, -0.01889580301940441, -0.0013763952301815152, -0.022876564413309097, -0.011660384945571423, -0.04554811120033264, 0.04206280782818794, 0.006607551593333483, 0.00861501693725586, 0.010507159866392612, -0.018144071102142334, 0.05819087475538254, -0.023969992995262146, -0.01295883022248745, -0.05808836594223976, -0.04643652215600014, -0.012036250904202461, -0.04602648690342903, 0.04271203279495239, -0.0010181480320170522, 0.026020171120762825, 0.003809913294389844, -0.03476759418845177, 0.03758658841252327, 0.006338465493172407, -0.10654089599847794, 0.026771901175379753, -0.013531171716749668, 0.009917734190821648, 0.04896507412195206, -0.029197946190834045, 0.07824844121932983, -0.03240989148616791, -0.01928875409066677, -0.04711991548538208, -0.01734962686896324, 0.058464229106903076, 0.022979073226451874, -0.0783851221203804, 0.01652955636382103, 0.025507625192403793, -0.023286599665880203, 0.04124273732304573, -0.06522981822490692, -0.0022530597634613514, -0.010174006223678589, 0.023525787517428398, -0.027335701510310173, -0.027899499982595444, 0.02325243130326271, 0.03652733191847801, -0.023440362885594368, 0.027762820944190025, 0.004497576970607042, -0.037689097225666046, -0.004591543693095446, -0.011523706838488579, 0.012574422173202038, 0.030684323981404305, 0.010686550289392471, 0.006201786920428276, -0.016059724614024162, -0.018707869574427605, 0.04295121878385544, -0.04414715617895126, -0.03117978386580944, -0.006372635252773762, -0.05046853795647621, 0.05234786868095398, -0.0023854670580476522, -0.03905588388442993, -0.022756971418857574, -0.06304296106100082, -0.05484224855899811, 0.007453249767422676, 0.020963065326213837, -0.0439763069152832, -0.01942543312907219, -0.04445468261837959, -0.027814075350761414, 0.037996623665094376, 0.03871418535709381, 0.02277405560016632, -0.010968449525535107, 0.021578118205070496, 0.0017693459521979094, -0.007094468455761671, -0.03601478412747383, 0.030342627316713333, 0.031863175332546234, -0.0170933548361063, -0.028514552861452103, 0.03309328109025955, -0.023235345259308815, 0.03343497961759567, 0.00029818338225595653, -0.054978929460048676, -0.07114116102457047, -0.005300563294440508, -0.01073780469596386, 0.01441958174109459, -0.06410221755504608, 0.018314920365810394, 0.07196123152971268, -0.003141470020636916, -0.002859570551663637, 0.013531171716749668, -0.02400416135787964, 0.03857750818133354, 0.02496091090142727, -0.04729076102375984, -0.009012239053845406, -0.016230572015047073, 0.0026673665270209312, 0.03435755893588066, 0.04240450635552406, -0.0038035064935684204, 0.019801298156380653, 0.004032015800476074, 0.006436703260987997, 0.02904418297111988, -0.05726829171180725, 0.033076196908950806, -0.020928895100951195, 0.04869171604514122, 0.022534867748618126, -0.039260901510715485, 0.04120856896042824, -0.028992928564548492, -0.0657423585653305, 0.014052258804440498, -0.020501775667071342, 0.018007392063736916, -0.0021516187116503716, -0.021714797243475914, -0.005087003111839294, 0.008892645128071308, -0.020142994821071625, 0.0202455036342144, 0.004245575983077288, -0.04503556713461876, -0.07961522787809372, -0.01951085589826107, -0.013975377194583416, -0.045616451650857925, 0.015538637526333332, 0.008461253717541695, -0.0006775195943191648, -0.033776674419641495, 0.025627220049500465, 0.019869636744260788, -0.01254025287926197, 0.012130217626690865, 0.024328773841261864, -0.0180757325142622, 0.01254025287926197, 0.03095768205821514, 0.016085350885987282, -0.0019519398920238018, 0.06598154455423355, -0.05549147352576256, 0.0187249556183815, -0.0005846209242008626, -0.023047413676977158, -0.008059760555624962, -0.03312745317816734, 0.0017351763090118766, 0.013949749991297722, 0.029249200597405434, 0.01494066882878542, -0.020194249227643013, 0.05918179079890251, 0.003188453149050474 ]
716,071
torch.optim.lr_scheduler
_format_param
Return correctly formatted lr/momentum for each param group.
def _format_param(self, name, optimizer, param): """Return correctly formatted lr/momentum for each param group.""" if isinstance(param, (list, tuple)): if len(param) != len(optimizer.param_groups): raise ValueError(f"expected {len(optimizer.param_groups)} values for {name}, got {len(param)}") return param else: return [param] * len(optimizer.param_groups)
(self, name, optimizer, param)
[ 0.027153778821229935, 0.03332747146487236, -0.00011220062879147008, 0.026770103722810745, -0.02239271067082882, -0.02736305631697178, 0.0014943734277039766, -0.07035218179225922, -0.012853137217462063, 0.04108818247914314, -0.019009388983249664, -0.0637948140501976, 0.013297852128744125, -0.02029993385076523, 0.0040830946527421474, 0.05779551714658737, 0.012818257324397564, -0.029979027807712555, -0.03826293349266052, 0.00014973708312027156, 0.019358186051249504, 0.006378609221428633, -0.006256530527025461, 0.017849642783403397, 0.009766291826963425, -0.030432462692260742, 0.037077028304338455, -0.03378090634942055, -0.08943133056163788, -0.0031936645973473787, -0.022584550082683563, -0.051273029297590256, -0.006073412485420704, 0.032472919672727585, -0.025409797206521034, 0.02380533516407013, -0.033222831785678864, 0.006971562746912241, -0.10017424821853638, -0.03822805732488632, 0.045936450362205505, -0.022061355412006378, -0.0003586060192901641, -0.010917318984866142, 0.006936682853847742, 0.006771004758775234, 0.04513422027230263, 0.02833968587219715, -0.048796579241752625, -0.020125536248087883, 0.024293649941682816, -0.017483405768871307, -0.00836238730698824, -0.004747987259179354, -0.037774622440338135, -0.013847206719219685, 0.06449240446090698, 0.005423779599368572, 0.10896391421556473, -0.027101458981633186, 0.027554893866181374, 0.008179268799722195, -0.009051259607076645, 0.03090333752334118, -0.028636163100600243, -0.0816880539059639, -0.042064812034368515, 0.01545166876167059, -0.034199461340904236, 0.026700343936681747, 0.003616579808294773, -0.021520720794796944, -0.02591555193066597, 0.021782318130135536, -0.023561177775263786, 0.028252486139535904, -0.019602341577410698, -0.02373557724058628, 0.0016197219956666231, -0.007124160882085562, 0.01806763932108879, 0.03836757317185402, 0.03360650688409805, 0.0027772891335189342, -0.003553360467776656, -0.10017424821853638, -0.07485164701938629, -0.007115440908819437, 0.005877214949578047, -0.06173691526055336, -0.024590127170085907, -0.04185553640127182, 0.03983251750469208, 0.054133158177137375, -0.03651895374059677, 0.011457952670753002, -0.055179547518491745, -0.023892534896731377, -0.030990535393357277, -0.02666546404361725, -0.028845440596342087, -0.049145374447107315, -0.03433897718787193, 0.012277623638510704, 0.0390302874147892, -0.05116839334368706, -0.001985957846045494, -0.02514820173382759, -0.009879650548100471, 0.05612129718065262, -0.05360996350646019, -0.0010823579505085945, -0.04447150602936745, -0.04293680191040039, 0.02483428455889225, 0.01806763932108879, -0.011318434029817581, 0.007551436312496662, -0.018608273938298225, 0.015730705112218857, 0.04447150602936745, 0.02983950823545456, -0.001749430550262332, 0.0006790624465793371, -0.027554893866181374, -0.016044622287154198, 0.008929180912673473, 0.032769396901130676, -0.010542362928390503, -0.04339023679494858, -0.0014529539039358497, -0.009295416995882988, -0.06257402896881104, -0.041681136935949326, 0.06857331842184067, -0.07966503500938416, 0.008828901685774326, 0.005541498307138681, 0.018521074205636978, -0.0019957679323852062, 0.0390302874147892, 0.09752339869737625, -0.010734200477600098, -0.013262973167002201, 0.04747115448117256, -0.02806064859032631, 0.05081959441304207, 0.05643521249294281, -0.008815822191536427, -0.018869871273636818, 0.008183629252016544, 0.013751287013292313, 0.03690262883901596, -0.0425182469189167, 0.03822805732488632, -0.005275541450828314, 0.019619781523942947, -0.04691307991743088, 0.005083703435957432, -0.026334106922149658, -0.0007286568870767951, -0.03149629011750221, -0.01595742255449295, -0.011623631231486797, 0.027973448857665062, 0.029891828075051308, -0.020666170865297318, 0.04468078538775444, -0.013550729490816593, -0.011518992483615875, 0.017823481932282448, -0.062260109931230545, -0.02903727814555168, 0.04495982080698013, 0.028984958305954933, 0.0817578136920929, -0.05929534137248993, 0.024258770048618317, -0.019741861149668694, 0.010751640424132347, 0.0675618126988411, 0.0008147659827955067, 0.034618016332387924, -0.05810943618416786, -0.02663058415055275, -0.048378024250268936, -0.019410504028201103, -0.0011902668047696352, -0.08719903230667114, 0.008440866135060787, 0.05971389636397362, 0.007346518337726593, -0.012635139748454094, 0.0049005853943526745, -0.0355074442923069, -0.029368633404374123, 0.024032052606344223, -0.015800464898347855, 0.09103579074144363, -0.0012251463485881686, 0.03770486265420914, 0.0015684926183894277, -0.03400762379169464, 0.08629216253757477, 0.02549699693918228, 0.0010774530237540603, 0.021067285910248756, 0.014980793930590153, -0.033501867204904556, 0.01633237861096859, 0.043111201375722885, 0.006147531792521477, 0.02063129097223282, 0.04332048073410988, 0.027136338874697685, 0.019236106425523758, -0.008549865335226059, 0.06065564602613449, 0.026334106922149658, 0.006635846570134163, 0.03651895374059677, -0.05399364233016968, 0.09850002825260162, -0.008929180912673473, 0.0177188441157341, -0.008440866135060787, 0.0390302874147892, -0.04004179686307907, -0.028671041131019592, 0.06679445505142212, 0.03690262883901596, -0.09424471110105515, -0.024590127170085907, -0.009208218194544315, -0.02738049626350403, 0.023508859798312187, -0.000720482028555125, -0.04101842641830444, -0.015704546123743057, -0.022113675251603127, -0.018625713884830475, 0.01850363425910473, -0.028147848322987556, 0.015355749987065792, 0.007621195632964373, -0.07268911600112915, 0.04077426716685295, 0.030432462692260742, -0.014047764241695404, 0.027171218767762184, -0.041716016829013824, 0.08433890342712402, -0.014849995262920856, 0.009373895823955536, -0.04318096116185188, -0.04154161736369133, -0.05183110386133194, 0.05207526311278343, 0.01631493866443634, -0.009478534571826458, -0.039937157183885574, -0.01470175664871931, -0.01669861376285553, 0.0425182469189167, 0.00023761736520100385, 0.0008698103483766317, 0.0018758692312985659, 0.013446090742945671, 0.0005591638037003577, -0.002827428514137864, 0.001097617787308991, 0.01984649896621704, -0.03048478253185749, 0.02125912345945835, 0.03081613779067993, 0.004992144647985697, 0.04907561466097832, -0.012181704863905907, -0.03524584695696831, 0.01669861376285553, 0.04199505224823952, -0.02699682116508484, -0.010263325646519661, 0.029316315427422523, -0.0069018034264445305, 0.059399981051683426, 0.027049139142036438, 0.013341451995074749, -0.03864661231637001, 0.03364138677716255, -0.010123807936906815, -0.018939629197120667, 0.000932484632357955, -0.00012057991261826828, 0.03121725283563137, 0.011850348673760891, 0.049145374447107315, 0.009016379714012146, 0.046668920665979385, 0.022793827578425407, -0.008153109811246395, 0.04583181068301201, 0.05929534137248993, -0.0023282142356038094, -0.024276209995150566, -0.032769396901130676, -0.00956573337316513, -0.06602710485458374, 0.009548294357955456, -0.008833262138068676, 0.01101323775947094, 0.050156883895397186, 0.015547587536275387, -0.02446804754436016, 0.07540972530841827, 0.0071328808553516865, -0.002903727814555168, 0.02874080091714859, 0.05580738186836243, 0.050540558993816376, 0.020334813743829727, -0.032839156687259674, 0.03308331221342087, -0.05116839334368706, 0.019794180989265442, -0.013576889410614967, -0.020753368735313416, 0.01806763932108879, -0.0017843102104961872, 0.01982905901968479, -0.04705259948968887, -0.03651895374059677, -0.01670733466744423, -0.007263679523020983, -0.011449232697486877, -0.011571311391890049, -0.010533642955124378, -0.001493283431045711, -0.014056484214961529, -0.009339015930891037, 0.04011155664920807, -0.021206805482506752, -0.04049523174762726, 0.04579693078994751, -0.011449232697486877, 0.045552775263786316, 0.027589773759245872, 0.07373550534248352, 0.021398643031716347, 0.025287719443440437, -0.037844378501176834, 0.008597824722528458, 0.007930751889944077, 0.059155821800231934, 0.04293680191040039, 0.04199505224823952, -0.01119635533541441, -0.010045328177511692, 0.006513767875730991, 0.018887311220169067, 0.05360996350646019, -0.023282142356038094, 0.08622240275144577, 0.027886250987648964, 0.06696885824203491, 0.014108803123235703, 0.011292275041341782, -0.034251779317855835, 0.08015335351228714, -0.031409092247486115, -0.045901570469141006, 0.006086492445319891, 0.03128701448440552, -0.06341113895177841, -0.04569229111075401, 0.0638296902179718, 0.02621202915906906, -0.021032406017184258, -0.014073924161493778, -0.06173691526055336, 0.006269610486924648, 0.014387840405106544, 0.10463883727788925, 0.05427267774939537, 0.015129032544791698, -0.006574807222932577, 0.017570605501532555, -0.05472611263394356, -0.04931977391242981, -0.015024392865598202, -0.017823481932282448, 0.04112306237220764, -0.000354791060090065, 0.012155544944107533, -0.07143344730138779, -0.017221808433532715, -0.0033048433251678944, 0.0003174589655827731, -0.09277977049350739, -0.04004179686307907, -0.010429004207253456, -0.06089980527758598, -0.0782000944018364, -0.031705569475889206, -0.03484473377466202, -0.040948666632175446, 0.015285990200936794, 0.0780605748295784, -0.028304805979132652, 0.015285990200936794, -0.016402138397097588, -0.005667936988174915, 0.007860993035137653, -0.02975231036543846, 0.042064812034368515, 0.0017167309997603297, -0.008785302750766277, 0.022445030510425568, -0.0000026312989120924613, 0.02622946910560131, 0.019602341577410698, -0.0461457259953022, 0.017457246780395508, 0.09361688047647476, 0.06487607955932617, -0.0003556085575837642, -0.011632351204752922, 0.015852784737944603, -0.02874080091714859, 0.000386400701245293, -0.021363763138651848, 0.03522840887308121, 0.02300310507416725, -0.06330649554729462, 0.0461806058883667, -0.019061708822846413, 0.012774658389389515, 0.06232986971735954, 0.02591555193066597, -0.019079148769378662, 0.05866750702261925, 0.00781739316880703, -0.01043772418051958, 0.010019169189035892, -0.03857685253024101, -0.039937157183885574, -0.01668117567896843, 0.022497350350022316, -0.0889430120587349, -0.05538882687687874, 0.017099730670452118, 0.04579693078994751, 0.02312518283724785, -0.03986739739775658, 0.08740831166505814, -0.026107389479875565, 0.05524930730462074, -0.02270662784576416, 0.04154161736369133, -0.014911034144461155, 0.03683287277817726, 0.03329259157180786, 0.0389256477355957, 0.05151718854904175, 0.004205173347145319, -0.026770103722810745, 0.0782698541879654, -0.05828383192420006, 0.018189718946814537, 0.004316352307796478, 0.023317020386457443, -0.006627126596868038, 0.0031369852367788553, -0.02063129097223282, -0.026020191609859467, 0.03447849676012993, 0.01881755143404007, 0.05967901647090912, 0.0009504694608040154, 0.03592600300908089, -0.021102165803313255, -0.049180254340171814, 0.03327514976263046, 0.029612790793180466, -0.014823835343122482, 0.00425749272108078, -0.03261243924498558, 0.0029255275148898363, -0.06323673576116562, -0.0004101079539395869, -0.0745028555393219, -0.006805884651839733, 0.04042547196149826, 0.02588067203760147, -0.035001691430807114, -0.007472957018762827, 0.012120665051043034, -0.005881574936211109, -0.0230728629976511, 0.0636552944779396, 0.026578264310956, -0.03617015853524208, -0.020753368735313416, -0.04785482957959175, 0.05563298240303993, -0.06131836026906967, 0.007294198963791132, 0.012853137217462063, -0.03930932283401489, 0.020701050758361816, -0.048482660204172134, -0.02982206828892231, -0.023927414789795876, 0.05169158801436424, -0.0460062101483345, -0.027049139142036438, -0.03165324777364731, 0.014771516434848309, 0.04182065650820732, 0.025828354060649872, 0.028269926086068153, -0.021102165803313255, -0.005829255096614361, -0.039588361978530884, 0.020160416141152382, 0.0050924234092235565, -0.045587655156850815, -0.050610318779945374, -0.03327514976263046, 0.020387133583426476, 0.02345653995871544, 0.01672477461397648, 0.038158297538757324, 0.01880011148750782, 0.006217291112989187, 0.038541972637176514, -0.03582136332988739, -0.001592472312040627, -0.09033820033073425, 0.011981147341430187, -0.010803960263729095, 0.03217644244432449, 0.019637221470475197, -0.0354725681245327, 0.010891159065067768, 0.042064812034368515, 0.029595350846648216, 0.03941396251320839, 0.02514820173382759, -0.047017719596624374, -0.018590833991765976, 0.005794375669211149, -0.06131836026906967, 0.024345969781279564, -0.012338663451373577, -0.02699682116508484, -0.006866923999041319, -0.004551789257675409, 0.015015672892332077, -0.0022344752214848995, -0.021939275786280632, 0.003479241393506527, 0.05242405831813812, 0.0012807358289137483, -0.0354725681245327, 0.002997466828674078, -0.02624690905213356, 0.010821400210261345, -0.043494876474142075, 0.011205075308680534, 0.0038411172572523355, -0.10149967670440674, -0.01135331392288208, -0.04673868045210838, -0.026351546868681908, 0.02622946910560131, 0.041053302586078644, 0.01916634663939476, -0.048064105212688446, 0.026578264310956, -0.011379473842680454, 0.03236827999353409, 0.0023827136028558016, -0.034199461340904236, 0.009818610735237598, 0.06655029952526093, -0.003860737197101116, -0.02164280042052269, -0.016620134934782982, 0.06103932112455368, -0.049877844750881195, 0.024764524772763252, 0.051586948335170746, -0.022776387631893158, 0.01525983028113842, 0.012295063585042953, -0.05653985217213631, 0.02096264809370041, 0.007813033647835255, 0.030798697844147682, 0.019794180989265442, -0.044122710824012756, 0.03153117001056671, 0.03620503842830658, 0.013524569571018219, -0.028252486139535904, 0.018154839053750038, -0.00009162710921373218, -0.02694450132548809, 0.030415022745728493, -0.031426530331373215, 0.03053710050880909, -0.007852273061871529, -0.026700343936681747, -0.0012164264917373657, 0.00496162474155426, -0.049494169652462006, 0.01946282386779785, 0.05605153739452362, -0.051307909190654755, 0.008576025255024433, 0.042378731071949005, -0.0319148451089859, -0.024380849674344063, -0.03948372229933739, -0.028479203581809998, -0.006600966677069664, -0.10756872594356537, 0.012643859721720219, -0.11203331500291824, -0.04502958059310913, 0.011989867314696312, 0.036763112992048264, -0.07987431436777115, -0.025095881894230843, 0.0005782385705970228, -0.000030400444302358665, -0.03934420272707939, -0.07213103771209717, -0.023927414789795876, 0.06491096317768097, 0.01843387633562088, -0.02160792052745819, -0.03507145121693611, 0.02024761587381363, 0.048064105212688446, -0.041367221623659134, -0.021520720794796944, 0.042099691927433014, 0.0074555170722305775, -0.014945914037525654, 0.01366408821195364, -0.04175089672207832, 0.013149614445865154, 0.02905471809208393, -0.00783047266304493, -0.024625007063150406, 0.03379834443330765, -0.03718166798353195, -0.03721654787659645, -0.03569928556680679, -0.02347397990524769, 0.007656075060367584, 0.007712754420936108, -0.07875816524028778, 0.01702125184237957, -0.0922914519906044, 0.031007975339889526, 0.022968225181102753, -0.0460759699344635, -0.04872681945562363, 0.0025658314116299152, 0.006295769941061735, 0.007006442174315453, -0.014605837874114513, 0.03048478253185749, 0.009548294357955456, -0.02164280042052269, -0.02340422011911869, 0.011065557599067688, 0.025357479229569435, -0.04014643281698227, -0.013132174499332905, 0.030345262959599495, 0.03585624322295189, 0.02975231036543846, -0.053784362971782684, -0.003721218788996339, 0.035333048552274704, 0.019427943974733353, -0.03655383363366127, -0.015844063833355904, -0.01811995916068554, -0.013986724428832531, 0.00391087681055069, 0.019410504028201103, -0.044122710824012756, 0.010062768124043941, 0.017317727208137512, 0.04359951615333557, -0.03718166798353195, -0.030240625143051147, -0.06578294932842255, 0.04126258194446564, 0.0061562517657876015, 0.01736132800579071, 0.06323673576116562, -0.014684316702187061, -0.016541656106710434, -0.041297461837530136, -0.01706485077738762, 0.03217644244432449, -0.012678739614784718, -0.03787925839424133, 0.033484429121017456, 0.020858008414506912, 0.015477827750146389, -0.01473663654178381, 0.023351900279521942, -0.0026988100726157427, 0.0014998234109953046, 0.07178224623203278, 0.015495267696678638, -0.019270986318588257, -0.0266131442040205, 0.02303798496723175, 0.026194589212536812, 0.029891828075051308, 0.013271693140268326, -0.03256011754274368, 0.005968773737549782, 0.0782000944018364, -0.010507483035326004, 0.033170510083436966, 0.06920114904642105, 0.04576205089688301, 0.040948666632175446, 0.025287719443440437, -0.0424833670258522, 0.015033112838864326, 0.010708041489124298, 0.0637599304318428, -0.02026505582034588, -0.009182058274745941, 0.004490750376135111, -0.00022821621678303927, 0.044122710824012756, 0.0034770614001899958, 0.019410504028201103, -0.06330649554729462, 0.05364484339952469, -0.059469740837812424, 0.012172984890639782, 0.002921167528256774, 0.02762465365231037, -0.060481250286102295, 0.05828383192420006, 0.01743980683386326, 0.010769080370664597, -0.014780236408114433, -0.030240625143051147, 0.012042186222970486, 0.06355065107345581, 0.016506776213645935, -0.03801877796649933, 0.010934758931398392, -0.020125536248087883, -0.012678739614784718 ]
716,072
torch.optim.lr_scheduler
_init_scale_fn
null
def _init_scale_fn(self): if self._scale_fn_custom is not None: return if self.mode == 'triangular': self._scale_fn_ref = self._triangular_scale_fn self.scale_mode = 'cycle' elif self.mode == 'triangular2': self._scale_fn_ref = self._triangular2_scale_fn self.scale_mode = 'cycle' elif self.mode == 'exp_range': self._scale_fn_ref = partial(self._exp_range_scale_fn, self.gamma) self.scale_mode = 'iterations'
(self)
[ 0.03299327567219734, -0.058744125068187714, 0.04530889913439751, 0.029686950147151947, -0.029704444110393524, 0.05279623717069626, 0.008676916360855103, -0.015123375691473484, 0.00031352139194495976, 0.012997880578041077, 0.012210660614073277, 0.053950827568769455, 0.062452804297208786, 0.010006443597376347, -0.018246015533804893, 0.011694594286382198, -0.008204584009945393, 0.008169597014784813, -0.0072467997670173645, 0.030281739309430122, 0.020485220476984978, -0.00021074542019050568, -0.01206196378916502, 0.0336405448615551, 0.01499217189848423, 0.10790165513753891, 0.009175489656627178, -0.017476288601756096, 0.037506669759750366, -0.02317926287651062, -0.03294079378247261, 0.062452804297208786, 0.011099805124104023, 0.052691273391246796, 0.035110022872686386, -0.03406039625406265, -0.002298245672136545, 0.03904612362384796, -0.05975876376032829, 0.0009862120496109128, 0.034987565129995346, 0.008913083001971245, 0.0361771434545517, -0.009569099172949791, -0.012578030116856098, 0.02751772105693817, -0.019505567848682404, 0.0026284409686923027, 0.012455573305487633, -0.032905805855989456, 0.011327224783599377, -0.04212503135204315, 0.004268483258783817, 0.019243162125349045, -0.041915103793144226, 0.08928827196359634, 0.011265996843576431, 0.045833710581064224, 0.001209257752634585, -0.05346100032329559, -0.008965563960373402, -0.018998248502612114, -0.03943098708987236, -0.05157167464494705, -0.03098149038851261, -0.045203935354948044, -0.013251541182398796, 0.007343015633523464, 0.0009282638784497976, 0.05279623717069626, -0.01794862188398838, -0.001064387382939458, 0.0029498892836272717, -0.02884724922478199, -0.0066170236095786095, -0.0044784084893763065, -0.005291869398206472, -0.025803329423069954, -0.0013590482994914055, -0.028637323528528214, 0.0070456210523843765, 0.02708037570118904, -0.010321332141757011, -0.03810146078467369, 0.013330263085663319, -0.061508141458034515, 0.03677193075418472, -0.0036627608351409435, 0.024578765034675598, 0.00598287396132946, -0.050557032227516174, -0.044889047741889954, 0.02690543793141842, 0.01966301165521145, 0.021692290902137756, -0.005799189209938049, -0.024001469835639, -0.0038092713803052902, 0.06745602935552597, -0.03754165768623352, 0.006682625040411949, -0.07746247202157974, 0.021954698488116264, 0.023704076185822487, 0.03406039625406265, -0.012403092347085476, 0.01682027243077755, -0.012315623462200165, -0.04807291552424431, 0.01901574246585369, -0.002989250235259533, 0.0672810897231102, -0.015551973134279251, 0.028672311455011368, -0.07221433520317078, -0.0010791477980092168, -0.04873767867684364, 0.0027618310414254665, 0.009840252809226513, -0.010268851183354855, -0.0873289629817009, 0.015508239157497883, -0.017966115847229958, -0.016347941011190414, -0.007080608978867531, -0.013006627559661865, 0.039395999163389206, 0.05171162262558937, 0.01644415594637394, 0.015595708042383194, 0.004933246877044439, 0.016802778467535973, -0.011983241885900497, 0.02753521502017975, -0.012324370443820953, -0.08082127571105957, 0.017353832721710205, 0.0904778465628624, -0.040270689874887466, 0.09397660195827484, -0.0011895772768184543, 0.06553170830011368, -0.015761898830533028, -0.011747075244784355, 0.020625170320272446, 0.07375378906726837, 0.07956172525882721, 0.03736672177910805, -0.04453917220234871, 0.009341680444777012, -0.014222445897758007, 0.04943742975592613, 0.01689024828374386, 0.010172635316848755, 0.052131474018096924, -0.03922106325626373, 0.004373445641249418, -0.0017810858553275466, 0.0011950440239161253, -0.010251357220113277, -0.03299327567219734, 0.06770093739032745, -0.05632998049259186, -0.08557958900928497, 0.026800476014614105, 0.014528586529195309, 0.00046139853657223284, -0.07015006989240646, 0.03481262922286987, 0.0574495829641819, 0.006389604415744543, -0.05573519319295883, 0.027167845517396927, 0.02954700030386448, 0.037436697632074356, 0.09649571031332016, 0.05328606441617012, -0.02293434925377369, -0.005095064174383879, 0.06343245506286621, 0.012429333291947842, -0.03378049656748772, -0.024806184694170952, 0.007084982004016638, -0.006704492494463921, 0.08138108253479004, 0.01636543497443199, -0.016199244186282158, -0.03981585055589676, -0.029581988230347633, 0.051361747086048126, 0.023948989808559418, -0.021814746782183647, -0.026608044281601906, 0.0059522595256567, -0.011029830202460289, 0.006730732973664999, -0.048037927597761154, 0.02247951179742813, 0.01569192297756672, -0.0010594672057777643, 0.0054624336771667, -0.005348724313080311, 0.009892734698951244, -0.015070893801748753, 0.01284918375313282, 0.008571953512728214, 0.06003866344690323, -0.04296473041176796, 0.024911146610975266, -0.07098977267742157, -0.05346100032329559, -0.0032932045869529247, 0.05013718083500862, 0.012516802176833153, -0.030019331723451614, 0.0019046356901526451, 0.030754070729017258, -0.019190680235624313, 0.04376944527029991, 0.043559521436691284, -0.02097504585981369, -0.010758676566183567, -0.020870083943009377, 0.014379889704287052, 0.015569467097520828, 0.06430714577436447, -0.020065369084477425, -0.0036518273409456015, 0.015508239157497883, -0.04184512794017792, -0.019260656088590622, -0.015123375691473484, 0.003955781925469637, 0.02153484709560871, 0.0019221294205635786, 0.04495902359485626, 0.06010863929986954, 0.010732435621321201, 0.0062102931551635265, 0.0016761231236159801, 0.011012336239218712, 0.02041524462401867, -0.003511877031996846, -0.026922931894659996, 0.028374915942549706, 0.014196204952895641, 0.06444709748029709, -0.0468483529984951, -0.002965196268633008, 0.0204677265137434, -0.04971733316779137, -0.011038577184081078, 0.025103578343987465, -0.03393793851137161, -0.01332151610404253, -0.02116747759282589, 0.010470028966665268, 0.014143723994493484, -0.029372062534093857, -0.006857562810182571, -0.007609795778989792, -0.02361660823225975, 0.04590368643403053, -0.010531257838010788, -0.019925419241189957, -0.005431819707155228, 0.016487890854477882, -0.03691188246011734, 0.007609795778989792, 0.045518822968006134, 0.03614215552806854, -0.023529138416051865, 0.053076136857271194, 0.00464459927752614, -0.01563069596886635, -0.02790258452296257, -0.040480613708496094, 0.049472417682409286, 0.010207622312009335, 0.06948530673980713, -0.0464634895324707, 0.00976153090596199, 0.010006443597376347, -0.009411655366420746, -0.039081111550331116, 0.02116747759282589, -0.030474171042442322, 0.05125678330659866, -0.012131938710808754, -0.05790442228317261, 0.05612005665898323, -0.020397750660777092, 0.06147315353155136, 0.02179725468158722, -0.014887209981679916, 0.019225668162107468, -0.03332565724849701, 0.01630420610308647, 0.002792445244267583, -0.01181705016642809, -0.06444709748029709, -0.010846145451068878, 0.029372062534093857, 0.01927814818918705, -0.02809501625597477, 0.013339010067284107, -0.026817969977855682, 0.047093264758586884, 0.027552708983421326, -0.008213330991566181, 0.03098149038851261, -0.06829573214054108, 0.008117115125060081, 0.018036089837551117, 0.0009184236405417323, 0.03950096294283867, -0.003162001259624958, 0.01458106841892004, 0.0912475734949112, -0.046638425439596176, -0.0014148097252473235, -0.05730963498353958, 0.027570202946662903, -0.013400238007307053, -0.005755454767495394, 0.014528586529195309, -0.015508239157497883, 0.02947702445089817, 0.019575543701648712, -0.07550317049026489, -0.004467474762350321, 0.04341956973075867, -0.003925167489796877, -0.06035355105996132, -0.06045851483941078, 0.03754165768623352, 0.003997329622507095, -0.010338826104998589, -0.0357922799885273, 0.014161217957735062, 0.028130004182457924, -0.06360739469528198, -0.009472883306443691, 0.016024304553866386, 0.016111774370074272, 0.04642850160598755, -0.06301260739564896, 0.03131387010216713, -0.09327685087919235, -0.027237821370363235, -0.05535032972693443, -0.020450232550501823, 0.03570481017231941, 0.0326434001326561, 0.011729581281542778, -0.03406039625406265, -0.0574495829641819, 0.0007101382361724973, -0.03841634839773178, 0.07056992501020432, -0.013531440868973732, -0.04786299169063568, -0.001796392840333283, 0.09880489110946655, 0.014379889704287052, -0.0036233998835086823, -0.006337122991681099, 0.0723542869091034, -0.012403092347085476, 0.042544879019260406, -0.030719082802534103, -0.010408801026642323, -0.02652057446539402, -0.04688333719968796, -0.005908525083214045, -0.03161126747727394, -0.007447978015989065, 0.03582726791501045, -0.004797670058906078, 0.052621301263570786, 0.003063598880544305, -0.016724057495594025, 0.029197124764323235, 0.0037261757533997297, -0.0025125446263700724, 0.005523662082850933, 0.00258251978084445, 0.06038853898644447, -0.03528496250510216, 0.022497005760669708, 0.039780862629413605, 0.04691832512617111, -0.04590368643403053, 0.050172168761491776, 0.014152470976114273, -0.001649882411584258, 0.025960775092244148, 0.02702789567410946, 0.0511518232524395, -0.07648281753063202, -0.013986279256641865, 0.02545345388352871, 0.045378874987363815, 0.0218497347086668, -0.01265675202012062, 0.031523797661066055, 0.08383020758628845, 0.014274926856160164, 0.09530612826347351, -0.0003323818673379719, -0.02274191752076149, -0.0747334435582161, -0.04184512794017792, -0.020205318927764893, -0.03831138461828232, 0.011852038092911243, -0.03189116716384888, -0.0004917393089272082, -0.022059660404920578, -0.016347941011190414, 0.07032500952482224, -0.00894369650632143, 0.03918607532978058, 0.04121535271406174, -0.038766223937273026, 0.020817602053284645, 0.013094096444547176, 0.006420218385756016, 0.047653064131736755, -0.0535309761762619, 0.04786299169063568, -0.01945308782160282, -0.025838317349553108, 0.04373445734381676, -0.013478959910571575, -0.017100173979997635, 0.0409354530274868, -0.04058557748794556, -0.06402724981307983, 0.0417051799595356, -0.025960775092244148, -0.01070619560778141, -0.05807936191558838, -0.012420586310327053, 0.010618726722896099, -0.060213603079319, 0.038836199790239334, -0.08599943667650223, -0.045763738453388214, 0.01477350015193224, 0.06598655134439468, -0.022129636257886887, 0.01612926833331585, 0.04250989481806755, -0.020240306854248047, -0.03736672177910805, -0.05349598824977875, 0.016050545498728752, -0.044819071888923645, -0.06161310523748398, 0.028934717178344727, -0.052621301263570786, -0.04037564992904663, -0.017729949206113815, 0.05139673501253128, 0.044889047741889954, 0.02771015278995037, -0.0013459279434755445, -0.03066660277545452, 0.0015471064252778888, 0.004231308586895466, 0.011860785074532032, -0.04894760623574257, -0.001129442360252142, -0.027675164863467216, -0.05139673501253128, -0.008475737646222115, 0.017677467316389084, 0.004972607828676701, 0.028637323528528214, -0.01528081949800253, 0.054580602794885635, 0.02671300619840622, -0.01014639437198639, -0.014047508127987385, -0.013776354491710663, 0.022129636257886887, -0.040165726095438004, 0.024211395531892776, -0.05150169879198074, 0.058359261602163315, 0.05587514489889145, 0.061263229697942734, -0.055840156972408295, -0.020870083943009377, 0.047093264758586884, 0.00018341137911193073, 0.031191416084766388, 0.027990052476525307, 0.006918791215866804, 0.014432371594011784, -0.05199152231216431, 0.06973022222518921, 0.022322067990899086, 0.02669551409780979, -0.11070065945386887, 0.02785010263323784, -0.06665131449699402, -0.037751585245132446, 0.03243347257375717, -0.04296473041176796, -0.01361016370356083, -0.004710201174020767, -0.004456541500985622, -0.009376667439937592, -0.02562839165329933, -0.015298313461244106, -0.01588435471057892, -0.026380624622106552, -0.010531257838010788, 0.009464136324822903, -0.032975781708955765, -0.018945766612887383, 0.018001103773713112, 0.006826948840171099, -0.015237085521221161, -0.0007478592451661825, 0.06143816560506821, 0.009945215657353401, 0.002888660877943039, -0.05566521733999252, 0.026065737009048462, 0.03677193075418472, -0.019033236429095268, 0.020747626200318336, -0.04744314029812813, -0.08250068128108978, 0.015490745194256306, -0.051361747086048126, -0.04628854990005493, -0.028007546439766884, 0.04289475828409195, -0.008370775729417801, 0.009551605209708214, -0.032468460500240326, 0.018735840916633606, 0.0039186072535812855, 0.07445354014635086, -0.017476288601756096, 0.024001469835639, 0.013942545279860497, 0.01312908437103033, -0.03327317535877228, -0.007102475967258215, 0.025296010076999664, 0.0093504274263978, -0.004216001834720373, -0.017966115847229958, -0.04849276691675186, -0.06430714577436447, 0.005904152058064938, 0.04271981865167618, 0.030404195189476013, -0.06556669622659683, -0.04964735731482506, -0.02608323097229004, 0.04978730529546738, 0.015097134746611118, -0.037191782146692276, -0.013478959910571575, 0.02436883933842182, 0.020310282707214355, -0.030509157106280327, -0.03558235615491867, -0.012639258056879044, 0.04460914805531502, -0.07186446338891983, -0.014274926856160164, -0.02387901395559311, -0.04100542888045311, -0.01354893483221531, -0.008025272749364376, 0.016199244186282158, -0.02128993347287178, 0.004635852761566639, -0.020520208403468132, 0.03922106325626373, -0.03365803882479668, -0.029057173058390617, -0.021254947409033775, -0.004705827683210373, -0.04188011586666107, -0.05660988390445709, -0.051921550184488297, -0.01752002350986004, -0.02015283890068531, -0.02722032740712166, 0.014441117644309998, -0.01489595603197813, -0.08215080946683884, 0.05409077927470207, -0.038136448711156845, 0.02652057446539402, -0.0019090090645477176, -0.04195009171962738, 0.025226036086678505, 0.01689024828374386, 0.0020850403234362602, 0.016654081642627716, -0.015009665861725807, 0.03092900849878788, 0.010242610238492489, -0.004369072150439024, 0.06280267983675003, -0.05178159847855568, -0.041040416806936264, -0.03365803882479668, 0.04125034064054489, -0.04359450936317444, -0.10517262667417526, 0.06619647890329361, -0.01373261958360672, 0.02104502171278, -0.0010950014693662524, 0.01657535880804062, 0.05737960711121559, -0.05825429782271385, -0.01695147529244423, -0.041040416806936264, -0.014274926856160164, -0.025593405589461327, 0.0008965563611127436, -0.07907190173864365, 0.05702973157167435, -0.01237685140222311, 0.0005015795468352735, 0.04982229322195053, -0.005956633016467094, 0.0037502297200262547, 0.0188932865858078, -0.0204677265137434, 0.06210292875766754, -0.0444691963493824, 0.000366002757800743, -0.008047140203416348, 0.002901781350374222, 0.009639074094593525, 0.017406314611434937, 0.012446826323866844, -0.0202752947807312, -0.04156522825360298, -0.008410136215388775, 0.02751772105693817, 0.019313136115670204, -0.009901481680572033, 0.010951108299195766, -0.04062056541442871, 0.08320043236017227, -0.049297481775283813, -0.088168665766716, 0.016216736286878586, 0.003319445298984647, 0.06605652719736099, 0.021657302975654602, -0.03964091092348099, 0.008891215547919273, -0.03925605118274689, -0.06871557980775833, 0.011703341268002987, -0.031593773514032364, -0.022584473714232445, -0.027325289323925972, -0.012814195826649666, -0.024648740887641907, 0.03332565724849701, 0.03042168915271759, 0.0222345981746912, 0.027570202946662903, 0.05321608856320381, -0.019050730392336845, 0.012088203802704811, -0.06420218199491501, 0.043174657970666885, 0.027552708983421326, -0.02513856627047062, -0.007224932312965393, -0.007351762615144253, -0.0018423140281811357, 0.037436697632074356, 0.024018963798880577, -0.010163888335227966, -0.010531257838010788, -0.04209004342556, -0.022269586101174355, -0.03635208308696747, -0.08914832025766373, -0.017555011436343193, 0.042929742485284805, 0.0077409991063177586, 0.016487890854477882, -0.004762682598084211, -0.049927257001399994, -0.013094096444547176, 0.041670192033052444, -0.012508055195212364, -0.043559521436691284, -0.01649663783609867, 0.019872937351465225, 0.02734278328716755, 0.015079640783369541, 0.012962893582880497, 0.05563022941350937, 0.004522142931818962, -0.024141421541571617, 0.008034019730985165, -0.023406682536005974, 0.03880121186375618, -0.018613385036587715, 0.0011884839041158557, 0.05146671086549759, -0.03764662146568298, 0.049542393535375595, -0.028899729251861572, -0.014073748141527176, 0.029581988230347633, 0.011064818128943443, 0.057659510523080826, 0.026065737009048462, -0.03469017148017883, -0.008160850033164024, -0.0012715794146060944, -0.006787587888538837, 0.025226036086678505, 0.005357471294701099, -0.05979375168681145, 0.030754070729017258, 0.007461098488420248, -0.04786299169063568, -0.04831783100962639, -0.026100724935531616, -0.03477764129638672, -0.017983609810471535, 0.036562006920576096, 0.021062515676021576, 0.056399956345558167, 0.007911563850939274, -0.012560536153614521, 0.03869624808430672, 0.0008183810277841985, -0.007867828942835331, 0.03395543247461319, 0.0030373581685125828, 0.01738882064819336, 0.0005291869165375829, -0.09194732457399368, 0.025960775092244148, 0.008738144300878048, 0.006393977906554937, -0.036247119307518005, -0.023546632379293442, -0.053006164729595184, 0.005641744937747717, 0.04807291552424431, 0.07830217480659485, 0.009394161403179169, 0.0779522955417633, 0.003804897889494896 ]
716,074
torch.optim.lr_scheduler
_triangular2_scale_fn
null
@staticmethod def _triangular2_scale_fn(x): return 1 / (2. ** (x - 1))
(x)
[ -0.03319014981389046, -0.031165285035967827, 0.06222492456436157, 0.03979296237230301, -0.0045735496096313, -0.0030196872539818287, -0.014306098222732544, -0.023734917864203453, -0.04387790337204933, 0.04641338437795639, 0.044687848538160324, 0.03729269653558731, 0.034669179469347, 0.011955496855080128, -0.044723063707351685, 0.01949150860309601, 0.02026623860001564, -0.0031187294516712427, 0.03392966464161873, 0.040145114064216614, 0.034281812608242035, -0.00636071152985096, 0.038771726191043854, 0.024703331291675568, -0.04106070473790169, 0.03206326812505722, 0.0014999393606558442, -0.01970279961824417, 0.01722894422709942, -0.04320881888270378, -0.050744831562042236, 0.02484419010579586, 0.010969475843012333, 0.02283693477511406, 0.05377332121133804, -0.01729937456548214, -0.04056769236922264, -0.0010812109103426337, -0.08416387438774109, 0.008530836552381516, 0.025143519043922424, 0.004210394807159901, 0.020301453769207, 0.006910946220159531, 0.027978327125310898, 0.005114980507642031, 0.005203017964959145, 0.004164175130426884, -0.0574708990752697, -0.02804875746369362, 0.017017655074596405, -0.06430260837078094, 0.010766989551484585, -0.0083767706528306, -0.04514564573764801, 0.07402195781469345, 0.027009913697838783, 0.02551327645778656, 0.010388428345322609, -0.029774293303489685, 0.03616581857204437, 0.022467177361249924, -0.029950367286801338, -0.016859186813235283, 0.020635996013879776, -0.003919871058315039, -0.006589609198272228, 0.02362927235662937, 0.005365887191146612, 0.07472625374794006, -0.034211382269859314, 0.04183543473482132, -0.024562470614910126, -0.03139418363571167, 0.013619406148791313, 0.027643784880638123, 0.050110962241888046, 0.0055815791711211205, 0.011638561263680458, -0.04588516056537628, -0.01574110984802246, -0.02019581012427807, 0.03222173452377319, -0.005832486320286989, -0.002140412339940667, -0.035655200481414795, 0.047328975051641464, -0.024333573877811432, -0.07648700475692749, 0.04958273470401764, -0.07627571374177933, -0.05377332121133804, 0.0015670680440962315, 0.05377332121133804, 0.00734232971444726, 0.02290736511349678, -0.016744738444685936, -0.04074376821517944, 0.028383299708366394, -0.05250558257102966, 0.045462578535079956, 0.04268059507012367, -0.034176167100667953, 0.011136747896671295, 0.05419590324163437, -0.001985246315598488, 0.03195762261748314, -0.028471337631344795, -0.034281812608242035, 0.03929995372891426, -0.06088675558567047, 0.062436215579509735, -0.03009122796356678, -0.015864362940192223, -0.09874289482831955, -0.035038936883211136, -0.045497793704271317, 0.026640156283974648, 0.013364097103476524, 0.012122767977416515, -0.011550524272024632, 0.018628740683197975, -0.013144003227353096, 0.0027049530763179064, -0.03149982914328575, 0.029052384197711945, 0.024386394768953323, 0.036306675523519516, -0.030883565545082092, 0.03975774720311165, -0.038842156529426575, 0.019843658432364464, 0.019773229956626892, 0.05673138424754143, 0.002643326763063669, -0.017906833440065384, 0.0331549346446991, 0.04363140091300011, 0.04856150224804878, 0.07592356204986572, 0.012228412553668022, 0.03838436305522919, 0.017809992656111717, -0.001093866303563118, 0.03595452755689621, 0.042222797870635986, 0.08465688675642014, 0.05623837187886238, 0.006563197821378708, 0.015697091817855835, -0.02415749803185463, 0.09106601774692535, 0.10346170514822006, -0.02421032078564167, 0.04268059507012367, -0.02348841354250908, 0.026534510776400566, -0.0486319325864315, 0.0509561225771904, -0.011083925142884254, -0.031235715374350548, 0.017325785011053085, -0.054618481546640396, -0.03870129957795143, -0.0034136550966650248, -0.01800367422401905, 0.029879936948418617, 0.0013161610113456845, 0.014508584514260292, -0.008808154612779617, -0.041448067873716354, -0.06542949378490448, -0.054583266377449036, 0.022696075960993767, 0.034968506544828415, 0.027643784880638123, 0.006061383988708258, 0.05102655291557312, 0.027150774374604225, 0.03505654260516167, 0.020653603598475456, -0.07035959511995316, -0.01839984394609928, -0.03863086923956871, 0.017510663717985153, 0.05609751492738724, 0.02935171313583851, 0.003083514515310526, -0.03148221969604492, -0.030337732285261154, 0.023893386125564575, 0.007808928843587637, 0.027907896786928177, -0.02031906135380268, 0.03017926588654518, -0.0026807428803294897, 0.0167535413056612, -0.03269713744521141, 0.01825898326933384, -0.05232950672507286, -0.013099984265863895, -0.014957576058804989, 0.005735645070672035, 0.02612953819334507, 0.023400375619530678, -0.012598170898854733, 0.017070477828383446, 0.018681563436985016, -0.040180329233407974, 0.024703331291675568, -0.027784643694758415, -0.024562470614910126, -0.03968731686472893, 0.008354761637747288, -0.02026623860001564, -0.01841745153069496, -0.011260000057518482, -0.015256904065608978, -0.015116043388843536, 0.040250759571790695, 0.04954752326011658, -0.03989860787987709, 0.0091911181807518, -0.003087916411459446, 0.05511149391531944, 0.003994702827185392, 0.047469835728406906, 0.016198905184864998, -0.01755468361079693, -0.00912949163466692, 0.00944642722606659, -0.04239887371659279, 0.021991774439811707, -0.01509843673557043, 0.007707685697823763, -0.037010978907346725, 0.007725293282419443, -0.010362016968429089, 0.050040531903505325, 0.03961688652634621, -0.023224299773573875, -0.012008318677544594, 0.01950911618769169, 0.03463396430015564, 0.006004159338772297, 0.029844721779227257, 0.013892321847379208, 0.016260530799627304, -0.013293666765093803, 0.027608569711446762, -0.06518298387527466, -0.03061945177614689, -0.044089194387197495, 0.00012029502977384254, 0.03005601279437542, -0.0020193608943372965, 0.011260000057518482, 0.010740578174591064, 0.0301616583019495, -0.012932713143527508, -0.002539882669225335, -0.010626129806041718, -0.04243408888578415, -0.0013623808044940233, -0.035021327435970306, -0.015186473727226257, -0.032450634986162186, 0.05683702975511551, -0.005326270591467619, 0.029105206951498985, 0.07374023646116257, 0.02938692644238472, -0.017704347148537636, 0.011013494804501534, 0.015811540186405182, 0.03326058015227318, 0.04172978922724724, 0.012246020138263702, 0.051942143589258194, 0.002101896097883582, -0.010881438851356506, -0.04137763753533363, -0.031235715374350548, 0.018611133098602295, -0.024404002353549004, -0.020776856690645218, 0.03912387788295746, -0.05954858660697937, 0.030390555039048195, 0.018100516870617867, -0.023417983204126358, 0.04363140091300011, -0.02033666893839836, 0.03933516889810562, 0.008742126636207104, -0.03968731686472893, -0.028348084539175034, -0.042081937193870544, 0.05187171325087547, -0.009939436800777912, -0.009851399809122086, -0.0177131500095129, -0.010538091883063316, 0.009481641463935375, 0.005696028005331755, -0.0016121872467920184, 0.02951017953455448, -0.01276544202119112, 0.04370183125138283, 0.014209257438778877, -0.05574536323547363, 0.0009772165212780237, -0.07740259915590286, -0.014314902015030384, 0.042856670916080475, 0.014931164681911469, 0.015204081311821938, 0.028260046616196632, -0.0029954768251627684, 0.0808536633849144, 0.003435664577409625, 0.03986339271068573, -0.023682095110416412, 0.03142939880490303, -0.004665988963097334, 0.0046087647788226604, 0.005374690983444452, -0.030971603468060493, 0.04588516056537628, 0.01014192309230566, -0.025090696290135384, 0.013804284855723381, -0.003286000806838274, 0.011990711092948914, -0.07430367171764374, -0.031077247112989426, 0.08578377217054367, 0.06602814793586731, -0.01473748218268156, -0.033031679689884186, -0.0028964346274733543, -0.003578725503757596, -0.02299540303647518, -0.020037341862916946, 0.02737967111170292, 0.032327380031347275, -0.021956559270620346, -0.05511149391531944, 0.03789135441184044, 0.004205992911010981, -0.020442314445972443, -0.05507627874612808, 0.01045885868370533, -0.007109030615538359, -0.010599718429148197, 0.020671211183071136, -0.03785613924264908, -0.06704938411712646, 0.00505335396155715, 0.02553088404238224, 0.06912706792354584, -0.016947224736213684, -0.04303274303674698, -0.005550766363739967, 0.05940772593021393, -0.004124558065086603, -0.028418514877557755, 0.02028384618461132, 0.0117354029789567, 0.03137657418847084, 0.029140422120690346, -0.014165238477289677, -0.03352469205856323, -0.012923909351229668, -0.0052954573184251785, 0.038842156529426575, -0.0038472400046885014, 0.018699171021580696, -0.025055481120944023, 0.02229110151529312, 0.03841957822442055, -0.0038076231721788645, -0.0024034245871007442, 0.017123298719525337, 0.00816107913851738, 0.023717310279607773, 0.018822424113750458, 0.013795481063425541, 0.01822376810014248, -0.02165723219513893, 0.006004159338772297, -0.007227881345897913, 0.08268484473228455, -0.06490126997232437, -0.0009634607122279704, -0.018822424113750458, 0.004529531113803387, 0.029563002288341522, 0.034246597439050674, 0.031235715374350548, -0.08134667575359344, 0.030232086777687073, 0.004952110815793276, -0.003486286150291562, -0.03849000856280327, -0.028365692123770714, 0.025178734213113785, 0.09670042246580124, 0.03017926588654518, 0.03347186744213104, -0.009006239473819733, 0.0047100079245865345, 0.007602040655910969, -0.05507627874612808, 0.010722971521317959, -0.021815700456500053, -0.023013010621070862, 0.019086536020040512, -0.03609538823366165, 0.021111398935317993, 0.00911188405007124, -0.01244850642979145, 0.009877811186015606, 0.03343665227293968, 0.03218651935458183, -0.08127624541521072, -0.02623518370091915, -0.023118654265999794, 0.005696028005331755, 0.03186958655714989, -0.03125332295894623, -0.053949397057294846, 0.0076812743209302425, -0.07099346071481705, 0.02873544953763485, -0.03620103374123573, 0.0008721217745915055, 0.01175301056355238, 0.006409131921827793, 0.013478545472025871, 0.07859990745782852, 0.018435059115290642, 0.005167802795767784, -0.07366980612277985, 0.012298842892050743, -0.05680181458592415, -0.03799699619412422, -0.023734917864203453, -0.017563486471772194, -0.07599399238824844, -0.005383494775742292, 0.01630455069243908, 0.04067333787679672, -0.02491462044417858, 0.01042364351451397, -0.038313932716846466, -0.09353107213973999, -0.10451815277338028, 0.009420015849173069, 0.014623033814132214, -0.010001063346862793, 0.04010989889502525, -0.02350602112710476, -0.03711662068963051, -0.010995887219905853, -0.03711662068963051, 0.029879936948418617, 0.01894567720592022, 0.036236248910427094, -0.05761175975203514, 0.011990711092948914, 0.01277424581348896, -0.019209789112210274, -0.03961688652634621, 0.052646443247795105, 0.033084504306316376, -0.05571014806628227, 0.011568130925297737, 0.023347552865743637, -0.03982817754149437, -0.02429835870862007, -0.021252259612083435, 0.050639186054468155, 0.04820935055613518, -0.012580563314259052, 0.006651235278695822, -0.04877278953790665, 0.0429270975291729, -0.004377665929496288, 0.009701735340058804, -0.005335074383765459, 0.04662467539310455, 0.01503681018948555, 0.06218970939517021, -0.061731915920972824, -0.008473612368106842, 0.025055481120944023, -0.014526192098855972, -0.02148115634918213, 0.018734386190772057, 0.008790547028183937, -0.011779421009123325, -0.021357905119657516, 0.035690415650606155, 0.014464566484093666, 0.04926580190658569, -0.04856150224804878, 0.01599641889333725, -0.056555308401584625, -0.040215544402599335, -0.01834702119231224, -0.018118124455213547, -0.002346200169995427, 0.015265707857906818, 0.017431430518627167, -0.015494605526328087, -0.09550311416387558, -0.009481641463935375, 0.01766032911837101, -0.026023894548416138, -0.016058044508099556, -0.027080344036221504, -0.011233588680624962, -0.03222173452377319, 0.03584888204932213, -0.016401391476392746, -0.01403318252414465, -0.03385923430323601, 0.061872776597738266, 0.030372947454452515, -0.025971071794629097, -0.02350602112710476, 0.023699702695012093, 0.04275102540850639, -0.027925504371523857, 0.03683490306138992, -0.09761600941419601, -0.0768391564488411, -0.0013326681219041348, -0.04835021123290062, 0.00230218144133687, -0.07275421172380447, 0.01014192309230566, -0.00686252536252141, -0.020107772201299667, -0.02276650443673134, -0.016348568722605705, 0.02878827229142189, 0.003924272954463959, -0.02688666060566902, -0.023963814601302147, -0.01702645793557167, 0.0056828223168849945, -0.008227107115089893, -0.017017655074596405, 0.02283693477511406, -0.04754026606678963, 0.02750292420387268, -0.019755622372031212, 0.008860977366566658, -0.08557248115539551, -0.02612953819334507, 0.09015043079853058, -0.01468465942889452, -0.0748671144247055, 0.016586270183324814, -0.01950911618769169, 0.06137976422905922, 0.02885870262980461, -0.028999561443924904, -0.007241086568683386, 0.0021073983516544104, 0.07521926611661911, -0.00409374525770545, -0.03940559923648834, 0.01738741248846054, 0.06419696658849716, -0.10965954512357712, -0.03280278295278549, -0.05690746009349823, -0.03289082273840904, 0.009516856633126736, -0.03209848329424858, 0.02996797487139702, 0.007742900867015123, 0.0066336276941001415, -0.019368257373571396, 0.06680287420749664, -0.05088569223880768, -0.0016584069235250354, -0.06035853177309036, -0.0248089749366045, -0.010934260673820972, -0.03901823237538338, -0.04394833371043205, -0.046800751239061356, -0.011127944104373455, -0.017510663717985153, 0.01635737344622612, 0.006717263255268335, -0.048667147755622864, 0.03514458239078522, 0.009807380847632885, 0.03343665227293968, -0.010819812305271626, -0.0482797808945179, 0.06197842210531235, -0.06430260837078094, -0.0681762620806694, -0.04387790337204933, 0.002176727866753936, 0.03246824070811272, 0.0004674242518376559, -0.0026763409841805696, 0.0017211337108165026, -0.004428287502378225, -0.050075747072696686, -0.010326801799237728, 0.016639092937111855, -0.004038721788674593, -0.0915590301156044, 0.019227396696805954, -0.0002946506137959659, 0.014200453646481037, -0.001138985506258905, 0.02741488628089428, 0.09627784043550491, -0.05426633358001709, -0.013408116064965725, -0.06197842210531235, -0.013989163562655449, -0.02544284611940384, 0.012527740560472012, -0.07712087780237198, 0.02540763095021248, 0.01798606663942337, -0.017184926196932793, 0.025759780779480934, -0.03526783362030983, 0.0741628110408783, -0.00458675529807806, 0.015468194149434566, -0.004241208080202341, -0.0012820465490221977, 0.013011947274208069, 0.001742042601108551, -0.0025684949941933155, -0.001740942127071321, -0.006030570715665817, -0.006417935714125633, -0.025037873536348343, 0.06479562073945999, 0.00787055492401123, 0.02299540303647518, 0.053174667060375214, -0.020776856690645218, 0.02220306545495987, -0.004205992911010981, -0.01402437873184681, -0.03796178102493286, -0.006012963131070137, 0.012545348145067692, -0.004723213613033295, 0.07712087780237198, 0.024421609938144684, -0.005995355546474457, 0.035496730357408524, -0.033700767904520035, -0.07507840543985367, -0.07641657441854477, 0.06835233420133591, 0.010097905062139034, -0.029527787119150162, -0.008420789614319801, 0.002630121074616909, -0.004375465214252472, 0.019914088770747185, 0.0034620759543031454, -0.02558370679616928, 0.012906301766633987, -0.011066317558288574, 0.0010322399903088808, -0.04380747303366661, 0.0294925719499588, 0.05014617741107941, -0.05902035906910896, 0.0009282457176595926, 0.04398354887962341, -0.05370289459824562, 0.041553713381290436, 0.0003392196085769683, -0.036236248910427094, -0.04528650641441345, 0.020724033936858177, 0.02158680185675621, 0.023840563371777534, -0.06137976422905922, 0.0364123210310936, 0.06067546457052231, 0.0008181987795978785, 0.017651524394750595, -0.05475934222340584, -0.031218107789754868, 0.08345957845449448, 0.01970279961824417, -0.009279155172407627, 0.017290569841861725, -0.07909291982650757, 0.032926034182310104, 0.024016637355089188, 0.034405067563056946, -0.0009651114232838154, 0.06419696658849716, -0.00012559103197418153, -0.04183543473482132, 0.010925457812845707, -0.05447762459516525, 0.04518086090683937, 0.013188022188842297, 0.012140375562012196, -0.007637255825102329, -0.05810476839542389, 0.03403531014919281, -0.007060609757900238, -0.04782198742032051, 0.036236248910427094, 0.04637816920876503, 0.02023102343082428, -0.05419590324163437, -0.04838542640209198, -0.04324403405189514, -0.03616581857204437, -0.000548583862837404, 0.05542842671275139, 0.042786240577697754, 0.01013311930000782, 0.0035985340364277363, -0.022660860791802406, -0.04504000023007393, -0.046835966408252716, 0.06638029962778091, -0.05468891188502312, 0.021815700456500053, -0.042786240577697754, -0.023347552865743637, 0.06134454905986786, -0.012950320728123188, 0.018716778606176376, 0.006783291697502136, -0.02148115634918213, 0.05306902155280113, 0.03267953172326088, -0.014922360889613628, -0.06588728725910187, 0.037644848227500916, -0.07240206748247147, 0.06454911828041077, -0.03975774720311165, -0.03414095565676689, -0.01577632501721382, -0.012061141431331635, -0.012871086597442627, 0.021287474781274796, 0.06750717759132385, 0.0676480382680893, 0.014799108728766441, 0.069338358938694, 0.04380747303366661 ]
716,075
torch.optim.lr_scheduler
_triangular_scale_fn
null
@staticmethod def _triangular_scale_fn(x): return 1.
(x)
[ -0.035727858543395996, -0.040468670427799225, 0.06090912967920303, 0.04970981925725937, -0.007167042698711157, 0.006540087517350912, -0.01338076964020729, -0.012624988332390785, -0.03730813041329384, 0.04280472174286842, 0.036998946219682693, 0.034577008336782455, 0.04301084578037262, 0.006552970036864281, -0.055275119841098785, 0.009773630648851395, -0.0026430885773152113, 0.02382429875433445, 0.038854047656059265, 0.03741119056940079, 0.024030420929193497, 0.0068578594364225864, 0.046343155205249786, 0.028668170794844627, -0.03325439244508743, 0.03248143196105957, 0.026521064341068268, -0.021453892812132835, 0.030179733410477638, -0.028135688975453377, -0.06475674360990524, 0.04077785462141037, -0.0004431091947481036, 0.028960177674889565, 0.03923193737864494, -0.025198446586728096, -0.033065445721149445, -0.008356539532542229, -0.07612781971693039, -0.008300715126097202, 0.012908406555652618, 0.010984598658978939, 0.02061222679913044, -0.0000766248776926659, 0.022467326372861862, 0.0026495298370718956, 0.025370214134454727, 0.040468670427799225, -0.06176796928048134, -0.03473160043358803, 0.02731120027601719, -0.05579042434692383, 0.006157902535051107, 0.0065272049978375435, -0.05613396316766739, 0.08533461391925812, 0.035281259566545486, 0.006995274219661951, 0.004749400541186333, -0.020595049485564232, 0.02329181507229805, 0.02195202000439167, -0.012384512461721897, -0.024562902748584747, 0.013930429704487324, -0.018276173621416092, -0.012109682895243168, 0.033941466361284256, 0.015064101666212082, 0.05613396316766739, -0.023085692897439003, 0.037170715630054474, -0.0210588239133358, -0.03454265370965004, 0.013355004601180553, 0.02863381803035736, 0.0355217345058918, -0.00905220303684473, 0.0013505301903933287, -0.048576146364212036, -0.008339363150298595, -0.004405863117426634, 0.026074465364217758, 0.0031004224438220263, -0.008219124749302864, -0.046549275517463684, 0.03260166943073273, -0.0144113814458251, -0.031364936381578445, 0.05816083028912544, -0.05809212476015091, -0.03280779346823692, -0.002939389320090413, 0.0589166134595871, -0.008266361430287361, 0.03816697373986244, 0.0009318444062955678, -0.04469417780637741, 0.0378577895462513, -0.050019003450870514, 0.04775165766477585, 0.017966991290450096, -0.025301506742835045, 0.01119930949062109, 0.05345437303185463, -0.006930861156433821, 0.035281259566545486, -0.02284521795809269, -0.019959505647420883, 0.05970674753189087, -0.03881969302892685, 0.055721718817949295, -0.03471442312002182, 0.002245873911306262, -0.08114346116781235, -0.043938394635915756, -0.05159927159547806, 0.009086556732654572, 0.006003310903906822, 0.014308320358395576, -0.01672166772186756, 0.03471442312002182, -0.015235870145261288, 0.0006774122011847794, -0.021539775654673576, 0.029217829927802086, 0.03138211369514465, 0.04665233939886093, -0.03150235116481781, 0.04143057391047478, -0.01708238199353218, 0.03280779346823692, 0.027998274192214012, 0.050912197679281235, 0.010460704565048218, 0.005213175434619188, 0.017949813976883888, 0.05204587057232857, 0.04802648723125458, 0.06685231626033783, 0.010495058260858059, 0.049022745341062546, 0.02373841404914856, 0.011087659746408463, 0.053488727658987045, 0.04335438087582588, 0.0748910903930664, 0.04641186073422432, -0.021127531304955482, 0.020234335213899612, -0.02820439636707306, 0.08574686199426651, 0.0861591026186943, -0.03229248896241188, 0.032876498997211456, -0.030677862465381622, 0.031090106815099716, -0.05077478289604187, 0.051530566066503525, -0.0210588239133358, -0.04390404000878334, 0.01927243173122406, -0.04441934823989868, -0.03943805769085884, -0.011027541011571884, -0.0030145379714667797, 0.014179494231939316, -0.004951228387653828, -0.0023145813029259443, -0.00914667546749115, -0.019289609044790268, -0.06479109823703766, -0.05592783913016319, 0.03366663679480553, 0.05201151594519615, 0.023858651518821716, 0.0029715958517044783, 0.050019003450870514, 0.013956194743514061, 0.03675847128033638, 0.01944419927895069, -0.06200844794511795, -0.018001344054937363, -0.02820439636707306, 0.028943000361323357, 0.05187410116195679, 0.025833990424871445, -0.00847677793353796, -0.040468670427799225, -0.0419115275144577, 0.023446407169103622, 0.0071799252182245255, 0.014454323798418045, -0.005144468042999506, 0.017090970650315285, -0.006467085797339678, 0.019581614062190056, -0.051187027245759964, 0.018310528248548508, -0.049400635063648224, -0.019839268177747726, -0.04070914536714554, 0.007012451067566872, 0.027190960943698883, 0.012204155325889587, -0.029595721513032913, 0.007978648878633976, 0.01477209571748972, -0.03383840620517731, 0.026280587539076805, -0.012702284380793571, -0.04641186073422432, -0.03033432550728321, 0.03356357291340828, -0.015596584416925907, -0.02312004752457142, -0.007068275939673185, -0.016300834715366364, -0.013088763691484928, 0.035830918699502945, 0.03909452259540558, -0.026967663317918777, 0.025490453466773033, 0.0003816482494585216, 0.05671797692775726, -0.0054922993294894695, 0.04507206752896309, 0.02248450368642807, -0.01820746622979641, -0.0376516655087471, 0.01284828782081604, -0.042873430997133255, 0.01343230064958334, -0.007708113640546799, -0.010769887827336788, -0.05898531898856163, 0.014085020869970322, -0.00382399745285511, 0.05826389417052269, 0.017245562747120857, -0.03347769007086754, -0.0008572324295528233, 0.017425918951630592, 0.03390711173415184, 0.020990116521716118, 0.03218942508101463, 0.0004001670458819717, 0.04033125564455986, -0.0105294119566679, 0.025937050580978394, -0.06029076129198074, -0.04160234332084656, -0.04132751375436783, -0.007154160179197788, 0.04514077678322792, 0.020646579563617706, 0.023686883971095085, 0.03294520825147629, 0.03727377578616142, -0.007592170033603907, -0.01217839028686285, -0.01070976909250021, 0.0032163660507649183, 0.017692159861326218, -0.045106422156095505, -0.027620382606983185, -0.029595721513032913, 0.06073736026883125, -0.01582847163081169, 0.020303042605519295, 0.06410402059555054, 0.04754553362727165, -0.012401689775288105, -0.0031390702351927757, 0.006501439493149519, 0.028341811150312424, 0.027723444625735283, 0.030557624995708466, 0.07028768956661224, 0.01676461100578308, -0.012444631196558475, -0.05462240055203438, -0.03385557979345322, 0.03909452259540558, -0.05087784305214882, -0.006548676174134016, 0.03308262303471565, -0.05864178389310837, 0.013732895255088806, 0.012264274060726166, -0.034113235771656036, 0.031639765948057175, -0.014024902135133743, 0.02452854812145233, 0.01080424152314663, -0.06221456825733185, -0.022621918469667435, -0.053935326635837555, 0.050912197679281235, -0.008854668587446213, 0.013535361737012863, -0.034319356083869934, -0.005651185289025307, 0.004311390686780214, -0.003328015562146902, 0.008459601551294327, 0.023240284994244576, -0.028255926445126534, 0.0397815965116024, 0.022089434787631035, -0.05448498576879501, 0.008940553292632103, -0.06826081871986389, -0.011620142497122288, 0.05798906087875366, 0.017606277018785477, 0.009352797642350197, 0.02071528695523739, -0.004283478017896414, 0.08547203242778778, -0.005054289475083351, 0.04256424680352211, -0.034319356083869934, 0.034937724471092224, -0.018860187381505966, -0.003057480091229081, 0.017623452469706535, -0.026916131377220154, 0.007136983331292868, -0.005676950793713331, -0.029509836807847023, 0.004255565814673901, 0.0010977083584293723, 0.020371749997138977, -0.07434143126010895, -0.012934171594679356, 0.08258631825447083, 0.04833567142486572, -0.02088705636560917, -0.033065445721149445, 0.00521746976301074, 0.008846079930663109, -0.028943000361323357, 0.0023339050821959972, 0.013758661225438118, 0.034044526517391205, -0.0170136746019125, -0.04335438087582588, 0.06331388652324677, 0.006935155019164085, -0.01530457753688097, -0.04273601621389389, 0.022913925349712372, -0.008219124749302864, 0.0052432348020374775, 0.01575976423919201, -0.0271222535520792, -0.059912871569395065, 0.003304397454485297, 0.026486709713935852, 0.0685013011097908, -0.024665964767336845, -0.02195202000439167, 0.008451012894511223, 0.06245504319667816, -0.01502974797040224, -0.030677862465381622, 0.003147658659145236, 0.023755591362714767, 0.030128203332424164, 0.023429229855537415, -0.0227593332529068, -0.051977165043354034, -0.024957969784736633, -0.005917426664382219, 0.04771730303764343, -0.017065204679965973, 0.024700317531824112, -0.032618846744298935, 0.026898955926299095, 0.038785338401794434, -0.004405863117426634, 0.014978217892348766, 0.009077968075871468, -0.000235108207562007, 0.004740811884403229, 0.021574130281805992, 0.0059431917034089565, 0.018860187381505966, -0.018155936151742935, 0.014334085397422314, -0.01820746622979641, 0.0755094513297081, -0.041705403476953506, -0.014445735141634941, -0.030231265351176262, -0.005384943913668394, 0.018860187381505966, 0.0210588239133358, 0.035830918699502945, -0.06382919102907181, -0.0034332238137722015, -0.007257221266627312, 0.006415555253624916, -0.050637368112802505, -0.025232799351215363, 0.02720813825726509, 0.07379177212715149, 0.030557624995708466, 0.02160848304629326, 0.01990797556936741, 0.02267344854772091, -0.0040086484514176846, -0.04788907244801521, 0.009155264124274254, -0.01982209086418152, -0.012831110507249832, 0.006990979891270399, -0.02535303868353367, 0.020560694858431816, 0.02042328007519245, -0.010684004053473473, 0.01557081937789917, 0.05558430403470993, 0.04366356506943703, -0.0865713506937027, -0.011061894707381725, -0.02658977173268795, 0.014883744530379772, 0.026435179635882378, -0.04273601621389389, -0.06376048922538757, -0.0010751637164503336, -0.06238633766770363, 0.0378577895462513, -0.03182871267199516, -0.014703388325870037, 0.01908348686993122, -0.012350158765912056, 0.0004887352115474641, 0.08286114782094955, 0.004878226667642593, -0.013732895255088806, -0.08148699998855591, 0.00811606366187334, -0.0576455257833004, -0.04077785462141037, -0.025473276153206825, -0.035727858543395996, -0.07159312814474106, 0.008150417357683182, 0.018327703699469566, 0.03706765174865723, -0.025645043700933456, 0.010933068580925465, -0.03292803093791008, -0.08073122054338455, -0.11178696900606155, 0.001812158152461052, 0.010074225254356861, -0.004783754236996174, 0.05039689317345619, -0.026280587539076805, -0.049400635063648224, -0.016008829697966576, -0.028307456523180008, 0.027362730354070663, 0.018224643543362617, 0.031553883105516434, -0.06860435754060745, 0.04960675910115242, 0.02372123673558235, -0.02524997666478157, -0.037960849702358246, 0.057164572179317474, 0.0353156141936779, -0.056271377950906754, 0.03593398258090019, 0.0009833750082179904, -0.035556089133024216, -0.02454572543501854, -0.0259542278945446, 0.050637368112802505, 0.04964111000299454, -0.0026495298370718956, 0.029922081157565117, -0.04349179565906525, 0.05609960854053497, 0.003233542898669839, 0.011980856768786907, -0.02294827811419964, 0.05187410116195679, 0.015072690322995186, 0.07688360661268234, -0.04610268026590347, 0.0034053116105496883, 0.03820132464170456, -0.020749641582369804, -0.022432973608374596, 0.02463161014020443, 0.016884848475456238, -0.0015663144877180457, -0.03184588998556137, 0.038407448679208755, 0.023068515583872795, 0.038957107812166214, -0.03504078462719917, 0.025507628917694092, -0.06259246170520782, -0.04321696609258652, -0.021883312612771988, -0.01865406520664692, -0.015545053407549858, 0.012899817898869514, 0.029131947085261345, -0.0363805778324604, -0.08794549852609634, -0.026710009202361107, -0.00789276510477066, -0.04373227432370186, -0.008811726234853268, -0.01530457753688097, -0.018516650423407555, -0.02471749484539032, 0.019925151020288467, 0.017090970650315285, -0.020285865291953087, -0.016515545547008514, 0.05668362230062485, 0.0587104894220829, -0.01431690901517868, -0.012985702604055405, 0.02408195100724697, 0.060187701135873795, -0.02033739723265171, 0.026280587539076805, -0.10154956579208374, -0.08622781187295914, 0.029509836807847023, -0.03916322812438011, -0.0004868564719799906, -0.06286729127168655, 0.03086680918931961, -0.004788048565387726, -0.00193561683408916, -0.02586834318935871, -0.005685538984835148, 0.035659149289131165, 0.005127291195094585, -0.027173785492777824, -0.011706026270985603, -0.009842338040471077, -0.0009619038901291788, -0.010915891267359257, 0.002141739008948207, 0.028754055500030518, -0.04173975810408592, 0.016627196222543716, -0.027431437745690346, -0.0020751787815243006, -0.07434143126010895, -0.03816697373986244, 0.1112373098731041, -0.014359850436449051, -0.08306726813316345, 0.001667228527367115, -0.02214096672832966, 0.05816083028912544, 0.02463161014020443, -0.035126667469739914, -0.0054965936578810215, 0.006630266085267067, 0.0640353187918663, -0.004959817044436932, -0.051255736500024796, 0.011903560720384121, 0.047614242881536484, -0.09928222000598907, -0.06039382144808769, -0.06286729127168655, -0.05847001448273659, 0.0040086484514176846, -0.02167719043791294, 0.024202188476920128, 0.01614624448120594, 0.004929757211357355, -0.017408743500709534, 0.05262988433241844, -0.049400635063648224, -0.003991471603512764, -0.054828520864248276, -0.017692159861326218, -0.01361265778541565, -0.0397815965116024, -0.04586220160126686, -0.04246118664741516, -0.011980856768786907, -0.011800499632954597, 0.03335745260119438, -0.0018035697285085917, -0.05568736419081688, 0.04266730695962906, -0.00792282447218895, 0.035659149289131165, -0.001392398844473064, -0.04854179173707962, 0.06149313971400261, -0.04819825664162636, -0.04301084578037262, -0.056786682456731796, 0.0042147706262767315, 0.030746569857001305, -0.0021331505849957466, -0.01351818535476923, 0.010426350869238377, -0.01003987155854702, -0.057336341589689255, -0.005088643170893192, 0.0367928221821785, -0.018585357815027237, -0.08533461391925812, 0.03014538064599037, -0.01468621101230383, 0.00382399745285511, 0.006866447627544403, 0.02282804064452648, 0.08368563652038574, -0.08684618026018143, -0.02312004752457142, -0.08347951620817184, -0.005226057954132557, -0.022020727396011353, 0.0024348192382603884, -0.06808905303478241, 0.017133912071585655, 0.0073087518103420734, -0.012916995212435722, 0.014222435653209686, -0.035556089133024216, 0.04624009504914284, 0.004169681575149298, 0.02016562782227993, 0.003817555960267782, 0.0006618456682190299, 0.02944112941622734, 0.0006430585053749382, -0.022553211078047752, -0.0083479518070817, 0.007935707457363605, -0.005161644890904427, -0.046789754182100296, 0.06176796928048134, -0.010005517862737179, 0.01307158637791872, 0.05816083028912544, -0.011903560720384121, 0.015665290877223015, -0.004719340708106756, -0.016532722860574722, -0.033426158130168915, -0.04060608521103859, 0.011972268112003803, -0.014677622355520725, 0.06650878489017487, 0.0442475788295269, -0.013363593257963657, 0.00896631833165884, -0.03210354223847389, -0.06788293272256851, -0.07757067680358887, 0.04462546855211258, 0.02140236087143421, -0.03050609491765499, -0.02571375109255314, 0.004624868277460337, 0.004362921230494976, 0.01334641594439745, -0.0015652409056201577, -0.019512906670570374, -0.0038647924084216356, -0.007832645438611507, -0.002694619121029973, -0.042426832020282745, 0.03641493245959282, 0.05506899580359459, -0.05668362230062485, -0.00012922899622935802, 0.03220660239458084, -0.04435063898563385, 0.04239247739315033, -0.00326789659447968, -0.04101832956075668, -0.022879570722579956, 0.028444871306419373, 0.026624124497175217, 0.013896076008677483, -0.0642414391040802, 0.04039996489882469, 0.06980673968791962, 0.005015641450881958, 0.019839268177747726, -0.047614242881536484, -0.05043124780058861, 0.08134958893060684, 0.02571375109255314, -0.013724307529628277, 0.025026677176356316, -0.056614913046360016, 0.02140236087143421, 0.023257462307810783, 0.04122445359826088, 0.013226178474724293, 0.04926322028040886, -0.00751487398520112, -0.064653679728508, 0.016438249498605728, -0.04414451867341995, 0.03524690493941307, 0.017709337174892426, 0.010941656306385994, -0.005848719272762537, -0.050809137523174286, 0.031021399423480034, -0.008429541252553463, -0.05410709232091904, 0.0397815965116024, 0.038854047656059265, 0.01865406520664692, -0.06039382144808769, -0.03947241231799126, -0.017151089385151863, -0.0158456489443779, -0.0026903250254690647, 0.05139315128326416, 0.03737683594226837, 0.01810440607368946, 0.01186920702457428, -0.0182933509349823, -0.05166798084974289, -0.04307955130934715, 0.03078092448413372, -0.05798906087875366, 0.020096920430660248, -0.05726763606071472, -0.015441992320120335, 0.052698589861392975, 0.000606557703576982, 0.03768602013587952, 0.005676950793713331, -0.02810133434832096, 0.0521145798265934, 0.04280472174286842, -0.031983304768800735, -0.06523769348859787, 0.04703022912144661, -0.0708373486995697, 0.06029076129198074, -0.04668669030070305, -0.017194032669067383, -0.01990797556936741, -0.03926629200577736, -0.021831782534718513, 0.018791479989886284, 0.08664005994796753, 0.056443147361278534, 0.01848229579627514, 0.05953497812151909, 0.03772037476301193 ]
716,077
torch.optim.lr_scheduler
get_lr
Calculates the learning rate at batch index. This function treats `self.last_epoch` as the last batch index. If `self.cycle_momentum` is ``True``, this function has a side effect of updating the optimizer's momentum.
def get_lr(self): """Calculates the learning rate at batch index. This function treats `self.last_epoch` as the last batch index. If `self.cycle_momentum` is ``True``, this function has a side effect of updating the optimizer's momentum. """ if not self._get_lr_called_within_step: warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.", UserWarning) cycle = math.floor(1 + self.last_epoch / self.total_size) x = 1. + self.last_epoch / self.total_size - cycle if x <= self.step_ratio: scale_factor = x / self.step_ratio else: scale_factor = (x - 1) / (self.step_ratio - 1) lrs = [] for base_lr, max_lr in zip(self.base_lrs, self.max_lrs): base_height = (max_lr - base_lr) * scale_factor if self.scale_mode == 'cycle': lr = base_lr + base_height * self.scale_fn(cycle) else: lr = base_lr + base_height * self.scale_fn(self.last_epoch) lrs.append(lr) if self.cycle_momentum: momentums = [] for base_momentum, max_momentum in zip(self.base_momentums, self.max_momentums): base_height = (max_momentum - base_momentum) * scale_factor if self.scale_mode == 'cycle': momentum = max_momentum - base_height * self.scale_fn(cycle) else: momentum = max_momentum - base_height * self.scale_fn(self.last_epoch) momentums.append(momentum) for param_group, momentum in zip(self.optimizer.param_groups, momentums): if self.use_beta1: param_group['betas'] = (momentum, *param_group['betas'][1:]) else: param_group['momentum'] = momentum return lrs
(self)
[ 0.002002108609303832, -0.020226962864398956, -0.05388921871781349, 0.025057006627321243, -0.0050983792170882225, 0.04533948749303818, -0.02822151780128479, -0.037863098084926605, -0.06354930996894836, 0.03830724209547043, -0.022743767127394676, -0.025057006627321243, 0.04297073185443878, 0.0669914036989212, -0.007110897451639175, 0.06366034597158432, -0.010557623580098152, 0.01786745898425579, -0.026759551838040352, -0.010881477035582066, 0.009687845595180988, -0.036475155502557755, -0.017423316836357117, 0.05507360026240349, -0.040824044495821, 0.03860333561897278, 0.03388432785868645, -0.0063290223479270935, -0.042563602328300476, 0.028610141947865486, -0.0059126392006874084, -0.00307429488748312, 0.009863652288913727, -0.009289968758821487, 0.008350793272256851, -0.018829766660928726, -0.014554901048541069, 0.01017825212329626, -0.12221305072307587, -0.017821194604039192, 0.04704203084111214, -0.02015293948352337, 0.047671232372522354, 0.012371202930808067, -0.031478557735681534, -0.02687058597803116, -0.031145451590418816, 0.008993874303996563, 0.0026532853953540325, -0.05566578730940819, 0.02183697745203972, -0.03708584979176521, 0.019061090424656868, -0.01018750574439764, -0.01623893901705742, 0.0285361185669899, 0.042859695851802826, 0.0021339631639420986, 0.0329035148024559, -0.028054965659976006, 0.03136752173304558, -0.0921594500541687, -0.023335956037044525, 0.021966518834233284, 0.02376159280538559, -0.05733131989836693, -0.04108312726020813, -0.025334594771265984, 0.006944343913346529, 0.028054965659976006, 0.014536394737660885, -0.024816429242491722, 0.02737024612724781, -0.008688526228070259, -0.03584595397114754, -0.009872904978692532, -0.03771505132317543, -0.04467327520251274, -0.0004204312281217426, -0.016423998400568962, 0.022817790508270264, 0.05203862860798836, 0.02679656259715557, -0.04293372109532356, 0.014897260814905167, -0.08860631287097931, -0.017728665843605995, -0.012676551006734371, -0.032570406794548035, -0.034254446625709534, 0.015720773488283157, -0.023965157568454742, 0.042600613087415695, 0.03664170950651169, -0.01020601112395525, 0.007527280133217573, -0.08394282311201096, -0.022299624979496002, -0.008026939816772938, -0.05814557895064354, -0.004996596835553646, 0.039824724197387695, 0.007531906943768263, 0.045117415487766266, 0.011362630873918533, -0.01866321451961994, -0.023039862513542175, -0.04952182620763779, 0.005931145511567593, -0.001830928842537105, -0.0475601963698864, 0.06366034597158432, -0.0531119704246521, 0.009368618950247765, -0.043155789375305176, 0.024483323097229004, -0.027499787509441376, 0.02738875150680542, 0.002886922564357519, 0.039491619914770126, 0.007036873605102301, 0.04474730044603348, -0.008720912039279938, 0.005061367526650429, -0.015507955104112625, -0.017154982313513756, 0.021448353305459023, 0.024187229573726654, -0.010539118200540543, -0.027185186743736267, -0.0011120897252112627, 0.00545924436300993, -0.020282480865716934, -0.009835893288254738, 0.03997277468442917, -0.04356291890144348, -0.007962169125676155, 0.047634221613407135, -0.040083806961774826, -0.0006309360032901168, 0.04337786138057709, 0.06358631700277328, 0.042600613087415695, -0.018348613753914833, 0.026667021214962006, 0.03492065891623497, 0.050447121262550354, 0.06810176372528076, -0.009946928359568119, -0.003312558401376009, 0.016016868874430656, -0.008480334654450417, 0.057960521429777145, 0.004494623746722937, 0.04508040472865105, 0.028406577184796333, -0.04071300849318504, -0.0025561293587088585, -0.026630010455846786, -0.013796158134937286, -0.0519275926053524, 0.006726899649947882, -0.044007062911987305, -0.06784267723560333, 0.004816163796931505, 0.0380481593310833, -0.009248330257833004, 0.02909129671752453, -0.049558836966753006, 0.038640346378088, 0.024224240332841873, -0.03934357315301895, 0.006601984612643719, 0.025889772921800613, 0.017997000366449356, 0.09993193298578262, 0.03236684203147888, 0.01844114251434803, 0.003728941548615694, 0.06887900829315186, 0.03801114484667778, -0.023021357133984566, 0.005672062281519175, -0.10348507016897202, -0.03516123443841934, 0.05418531596660614, -0.021318811923265457, -0.012167638167738914, -0.041490256786346436, 0.05618395283818245, 0.04267463833093643, 0.014314323663711548, 0.011899302713572979, -0.0363641194999218, -0.05677614361047745, 0.011242342181503773, 0.004626478534191847, 0.03569790720939636, 0.05703522637486458, -0.006254998967051506, 0.05340806767344475, 0.03430996462702751, 0.02433527633547783, 0.027148175984621048, -0.016655322164297104, -0.04533948749303818, -0.03157109022140503, 0.015110078267753124, -0.03610503673553467, 0.034772612154483795, -0.0671764686703682, 0.006796296685934067, 0.02683357521891594, 0.051039308309555054, 0.020208457484841347, -0.02291032113134861, -0.038677360862493515, 0.018589189276099205, 0.04060197249054909, -0.007171041332185268, 0.032311324030160904, -0.06329022347927094, 0.02043052762746811, -0.01734929345548153, 0.03856632485985756, -0.04944780096411705, 0.04719007760286331, -0.03014613315463066, -0.02146686054766178, 0.03323661908507347, -0.00005522858555195853, -0.08927252888679504, 0.002244998700916767, 0.012408214621245861, 0.05999617278575897, 0.04322981461882591, -0.03214477002620697, 0.0519275926053524, -0.03345869109034538, 0.021688930690288544, -0.026407938450574875, 0.006699140649288893, 0.006278131157159805, -0.0077539775520563126, -0.034476518630981445, 0.024927465245127678, 0.0842389166355133, 0.026333915069699287, -0.07787288725376129, -0.009623074904084206, -0.023243427276611328, -0.01567450910806656, 0.0006916585261933506, 0.0293318722397089, -0.03738194704055786, -0.04075002297759056, 0.009761868976056576, 0.032533396035432816, 0.01877424865961075, -0.00964158121496439, -0.002493671840056777, 0.0014214854454621673, -0.06206883490085602, 0.027740364894270897, -0.044303156435489655, 0.02762932889163494, -0.007508774287998676, 0.0063567813485860825, -0.023095380514860153, 0.05174253508448601, 0.08964264392852783, 0.031719136983156204, -0.06251297891139984, -0.013546328991651535, 0.009396377950906754, 0.008892090991139412, -0.0008940669358707964, -0.012944886460900307, 0.010363311506807804, 0.00825826358050108, 0.04075002297759056, -0.040379904210567474, -0.037844594568014145, -0.021873990073800087, -0.030109120532870293, -0.01924614980816841, -0.02035650424659252, -0.008558984845876694, 0.013518569990992546, 0.04100910574197769, 0.032237302511930466, -0.038418278098106384, 0.03521675243973732, 0.025001488626003265, 0.10156045109033585, 0.03523525968194008, 0.0035184368025511503, -0.016895899549126625, 0.010289288125932217, 0.016692334786057472, 0.038640346378088, -0.026444951072335243, 0.04552454873919487, 0.021374329924583435, -0.025501148775219917, -0.04137922078371048, -0.006287384312599897, 0.005584159400314093, 0.04841146990656853, -0.014971284195780754, 0.016072385013103485, 0.01355558168143034, 0.04522845149040222, -0.012093614786863327, -0.021318811923265457, -0.053778186440467834, -0.02403918094933033, 0.011149812489748001, 0.025223560631275177, 0.030072109773755074, -0.055776823312044144, 0.06736152619123459, 0.05003999173641205, -0.009424136020243168, -0.004665803629904985, -0.023317450657486916, 0.03401386737823486, 0.03678975626826286, -0.04633880779147148, -0.012611780315637589, -0.0052926912903785706, -0.07554113864898682, -0.0010930055286735296, 0.028702672570943832, -0.023113885894417763, -0.04252658784389496, 0.03654918074607849, 0.0424155555665493, 0.042600613087415695, -0.043414872139692307, 0.08016761392354965, 0.034476518630981445, -0.026333915069699287, 0.04356291890144348, 0.00867002084851265, -0.02629690244793892, 0.08386880159378052, 0.03432846814393997, 0.01091848872601986, -0.00188760319724679, -0.03751148656010628, -0.004226287826895714, -0.0737275630235672, 0.0693601667881012, -0.030035097151994705, 0.012991150841116905, -0.036216072738170624, -0.08179613947868347, 0.05307495966553688, -0.05355611443519592, -0.05344507843255997, 0.036715731024742126, -0.031237982213497162, 0.07135879993438721, 0.05196460336446762, -0.0002770104038063437, -0.03403237462043762, -0.021281801164150238, 0.05884880572557449, -0.03432846814393997, -0.04744916409254074, -0.005019729025661945, 0.02013443410396576, 0.021374329924583435, -0.03741895779967308, 0.004520069342106581, -0.03658619150519371, -0.01620192639529705, 0.04030587896704674, 0.01117757149040699, 0.06110652536153793, 0.004679682664573193, 0.03386582061648369, 0.029165320098400116, 0.0659920871257782, -0.013629605062305927, 0.0021293365862220526, -0.059959158301353455, 0.03764102980494499, -0.05777546018362045, 0.023058367893099785, -0.0005065993755124509, -0.02405768819153309, -0.007124776486307383, -0.09978388249874115, 0.02764783427119255, 0.06210584565997124, 0.0653999000787735, -0.0136758703738451, -0.02015293948352337, -0.0027874531224370003, 0.014573406428098679, -0.03355121985077858, 0.030072109773755074, -0.03332915157079697, -0.01952373795211315, 0.0804637148976326, 0.07335744053125381, -0.04297073185443878, 0.07409767806529999, -0.02183697745203972, -0.005570279899984598, 0.004235540982335806, -0.000603755412157625, -0.010724176652729511, 0.02822151780128479, -0.02846209518611431, -0.030849358066916466, 0.02960946224629879, 0.024150216951966286, 0.015452438034117222, 0.03575342521071434, 0.028091976419091225, 0.037529993802309036, 0.05066918954253197, -0.03497617691755295, -0.013157704845070839, -0.014443865045905113, -0.07816898077726364, -0.004006530158221722, 0.007013741414994001, -0.028165999799966812, -0.025575172156095505, -0.0251680426299572, -0.011307112872600555, -0.028147494420409203, 0.012528503313660622, 0.05007700249552727, -0.012963392771780491, -0.039269547909498215, 0.04841146990656853, -0.008582117035984993, 0.02959095500409603, 0.02154088392853737, -0.010150493122637272, -0.03401386737823486, -0.012491491623222828, -0.021577894687652588, -0.09201139956712723, -0.010955500416457653, -0.03604951873421669, 0.015702268108725548, 0.05666510760784149, 0.032792478799819946, 0.003030343446880579, -0.019172126427292824, -0.005260305944830179, -0.04863354191184044, -0.002639405895024538, -0.027814388275146484, 0.027536800131201744, 0.04859652742743492, 0.01647026278078556, 0.015137837268412113, -0.008656141348183155, -0.02261422574520111, 0.05274185165762901, 0.025593677535653114, -0.022799285128712654, 0.018367119133472443, -0.0014689068775624037, 0.010724176652729511, 0.04348889738321304, -0.061328597366809845, -0.04156428202986717, -0.0003490099625196308, -0.03266293555498123, -0.023280439898371696, 0.02483493648469448, -0.050410106778144836, -0.013518569990992546, -0.04611673578619957, 0.03823321685194969, 0.04545052349567413, -0.015461690723896027, 0.014564153738319874, -0.050965286791324615, 0.03495766967535019, -0.0034929912071675062, -0.010437334887683392, -0.06595507264137268, 0.00794828962534666, 0.029757509008049965, 0.03375478461384773, -0.05681315436959267, -0.0380481593310833, 0.05536969378590584, 0.00935473944991827, 0.08549731969833374, 0.04800434038043022, 0.04978090897202492, -0.011057283729314804, 0.012324938550591469, -0.001818206044845283, 0.02762932889163494, 0.016683081164956093, -0.0719509944319725, 0.002667164895683527, -0.07646643370389938, 0.04489534720778465, -0.005491629708558321, -0.003937133122235537, -0.016127903014421463, 0.023372968658804893, -0.045413512736558914, -0.009882157668471336, -0.01981983333826065, 0.03941759467124939, 0.07228409498929977, 0.00373356812633574, 0.008489588275551796, 0.03556836396455765, -0.0009235607576556504, -0.07235812395811081, 0.022114567458629608, 0.0586637444794178, -0.03443950414657593, -0.04075002297759056, 0.03373628109693527, 0.020486045628786087, 0.01758061721920967, -0.018598442897200584, 0.012472985312342644, 0.028054965659976006, -0.000914307776838541, -0.005769218318164349, -0.0307198166847229, -0.05274185165762901, -0.06055134907364845, -0.022836297750473022, -0.034550540149211884, -0.019116608425974846, 0.05248276889324188, -0.010335552506148815, -0.014619671739637852, 0.014536394737660885, -0.006588105112314224, 0.05059516802430153, 0.022447673603892326, 0.012463732622563839, 0.021041223779320717, 0.03216327726840973, -0.033366162329912186, 0.010335552506148815, -0.02346549741923809, -0.016895899549126625, -0.024760913103818893, 0.01061314158141613, 0.045117415487766266, -0.002567695453763008, -0.029183825477957726, -0.029794521629810333, 0.014212541282176971, -0.03432846814393997, -0.015045307576656342, 0.02350251004099846, -0.009845145978033543, 0.023095380514860153, -0.03693780303001404, 0.045672595500946045, 0.0024520335718989372, -0.016275951638817787, 0.005986663047224283, -0.07483791559934616, -0.011954819783568382, -0.010307793505489826, 0.02235514298081398, -0.03325512632727623, -0.022003531455993652, -0.023076873272657394, 0.0237800981849432, -0.03638262674212456, 0.02013443410396576, -0.056257978081703186, -0.006310516502708197, 0.0373634397983551, -0.08512720465660095, 0.013361269608139992, -0.017127223312854767, 0.016710840165615082, -0.03047923929989338, 0.042341530323028564, -0.011529183946549892, -0.042304519563913345, 0.0023895760532468557, 0.02572321891784668, -0.07084063440561295, -0.0074902684427797794, 0.01495277788490057, 0.06236492842435837, -0.033643752336502075, 0.0018922296585515141, -0.0019627835135906935, 0.04060197249054909, -0.004917946644127369, -0.04385901615023613, 0.013860928826034069, -0.04015783220529556, 0.011223836801946163, -0.024168722331523895, -0.022743767127394676, -0.0013289558701217175, 0.023909639567136765, -0.015230366960167885, 0.007309835869818926, -0.04189739003777504, -0.006615864112973213, 0.007730845361948013, 0.07861311733722687, -0.049262743443250656, 0.007703086361289024, 0.023613546043634415, 0.002662538317963481, -0.028702672570943832, -0.05115034431219101, -0.02152237668633461, 0.02544563077390194, -0.07209903746843338, 0.01848740689456463, -0.06847187876701355, -0.006685261148959398, -0.031089935451745987, 0.011686484329402447, -0.07839105278253555, 0.052630819380283356, 0.015813302248716354, 0.020263975486159325, 0.0048485491424798965, -0.01478622481226921, -0.04508040472865105, 0.048189397901296616, 0.04271164909005165, -0.01956075057387352, -0.03266293555498123, -0.042304519563913345, -0.0037127488758414984, -0.009798881597816944, 0.05511061102151871, 0.0907529965043068, 0.0901608094573021, -0.03134901821613312, 0.007629062980413437, 0.007795616053044796, 0.027832893654704094, -0.02235514298081398, 0.027296222746372223, -0.0028915489092469215, 0.03654918074607849, 0.024760913103818893, -0.09001276642084122, -0.038159195333719254, -0.0009166210074909031, -0.02068961039185524, -0.0008264047210104764, -0.030904876068234444, -0.013601846061646938, -0.06861992925405502, 0.033958353102207184, 0.0025584425311535597, -0.017663894221186638, -0.049077682197093964, -0.018922297284007072, -0.03989874944090843, 0.042304519563913345, -0.0009709821315482259, 0.020486045628786087, -0.049336764961481094, -0.06662128865718842, 0.01872798427939415, 0.003536942647770047, -0.0016747851623222232, 0.02429826371371746, -0.07594826817512512, 0.0318116657435894, 0.0019084223313257098, -0.020300986245274544, 0.01061314158141613, 0.023854123428463936, 0.07080362737178802, 0.014906513504683971, -0.037048839032649994, 0.05400025472044945, -0.015841061249375343, 0.022466178983449936, 0.03162660449743271, -0.0329035148024559, -0.025297584012150764, -0.0008223565528169274, -0.00011031259055016562, -0.04319280385971069, 0.00551938870921731, -0.01678486354649067, -0.046005699783563614, 0.0107519356533885, 0.01845964789390564, 0.041786354035139084, 0.008369299583137035, -0.011011018417775631, -0.046190761029720306, 0.020486045628786087, 0.04526546597480774, 0.028110481798648834, 0.0339953638613224, -0.014841742813587189, 0.010853718034923077, -0.015989109873771667, 0.00692121172323823, -0.028425082564353943, -0.04167531803250313, 0.03158959373831749, -0.010687164962291718, 0.008087084628641605, 0.0380481593310833, 0.004360456019639969, -0.028128989040851593, -0.003951012622565031, 0.028721177950501442, 0.014064494520425797, 0.005473123863339424, -0.011020271107554436, 0.025371607393026352, 0.01814504899084568, 0.011233089491724968, -0.015785545110702515, 0.04722709208726883, 0.008683900348842144, 0.03945460915565491, 0.0018089530058205128, 0.01789521798491478, 0.03277397155761719, 0.01117757149040699, 0.025482643395662308, -0.05063217878341675, 0.008327661082148552, -0.015369161032140255, 0.030553262680768967, -0.02126329392194748, -0.04271164909005165, 0.07261720299720764, -0.05222368612885475, 0.04219348356127739, -0.07165489345788956, -0.01478622481226921, 0.0313120074570179, 0.015304390341043472, -0.0921594500541687, 0.040898069739341736, -0.0469680093228817, -0.025538161396980286, -0.04585765302181244, 0.018357865512371063, -0.062142856419086456, 0.07117374241352081, 0.05418531596660614, -0.022003531455993652, -0.012667297385632992, -0.004642670974135399, -0.010696417652070522 ]
716,078
torch.optim.lr_scheduler
load_state_dict
null
def load_state_dict(self, state_dict): fn = state_dict.pop('_scale_fn_custom') super().load_state_dict(state_dict) if fn is not None: self._scale_fn_custom.__dict__.update(fn) self._init_scale_fn()
(self, state_dict)
[ 0.007883761078119278, -0.0539962463080883, 0.02871665358543396, 0.036157894879579544, -0.0011299342149868608, 0.03328794613480568, -0.022203421220183372, 0.014736403711140156, 0.015217592939734459, -0.03055548295378685, -0.005091148428618908, 0.07657774537801743, 0.04464743658900261, -0.0005950413760729134, -0.049734290689229965, 0.029232213273644447, -0.003529433161020279, 0.05447743460536003, -0.05038733035326004, -0.020553631708025932, -0.01773524098098278, -0.01713375560939312, 0.017941463738679886, 0.045987892895936966, 0.016437750309705734, 0.020605187863111496, 0.00214171945117414, -0.046537820249795914, 0.05746768042445183, -0.041519708931446075, -0.02335483767092228, 0.03773894160985947, -0.012287497520446777, 0.07822753489017487, -0.015097294934093952, -0.04268831014633179, 0.027599608525633812, -0.00301817012950778, -0.05726145580410957, 0.023784469813108444, 0.018044576048851013, 0.021498823538422585, 0.023870397359132767, 0.006478861905634403, 0.04416624829173088, 0.05049044266343117, -0.03725775331258774, 0.0114368237555027, 0.03504084795713425, -0.032755203545093536, 0.002700241981074214, -0.05616159364581108, 0.01570737361907959, 0.04169156402349472, -0.03969806805253029, 0.04554107412695885, 0.014289585873484612, 0.008068502880632877, -0.009305845946073532, -0.01424662210047245, -0.01780398190021515, -0.024231288582086563, -0.058911245316267014, -0.08345186710357666, -0.001982755260542035, -0.07602781057357788, -0.009855776093900204, 0.004257660824805498, -0.037326496094465256, -0.011299341917037964, -0.00499662896618247, -0.006229674909263849, 0.023870397359132767, 0.007174867205321789, -0.022925203666090965, 0.01566440984606743, -0.040694814175367355, -0.015947967767715454, -0.004747441969811916, 0.005537966266274452, -0.02278772182762623, -0.043925654143095016, -0.017065012827515602, -0.005018110852688551, -0.06492610275745392, -0.06588847935199738, 0.0700816959142685, -0.005387594923377037, 0.005954710301011801, 0.005881672725081444, -0.021464452147483826, 0.037395235151052475, -0.018044576048851013, -0.015148851089179516, 0.05485551059246063, -0.014934035018086433, 0.015140258707106113, 0.05482114106416702, 0.02729027345776558, -0.018457023426890373, 0.004880628082901239, -0.12888982892036438, 0.029747772961854935, 0.0003104096686001867, 0.014891071245074272, -0.04870317131280899, 0.009941701777279377, -0.04918435961008072, -0.0592205785214901, 0.028218280524015427, 0.0025520187336951494, -0.004665812011808157, -0.004571292549371719, 0.015990931540727615, -0.010672077536582947, -0.002511203521862626, 0.011746159754693508, -0.0083391722291708, -0.005400483962148428, 0.039801180362701416, -0.05244956910610199, 0.041554082185029984, 0.0076388707384467125, 0.024059435352683067, -0.032634906470775604, 0.010165111161768436, 0.03328794613480568, 0.027273088693618774, 0.04969991743564606, 0.000690097629558295, 0.008859027177095413, -0.0021481637377291918, -0.017236866056919098, 0.026448193937540054, -0.022444015368819237, -0.07327816635370255, 0.04055733233690262, 0.05488988384604454, 0.008618433028459549, 0.052243344485759735, 0.058017607778310776, 0.040351107716560364, 0.001131008262746036, -0.017666500061750412, 0.04007614403963089, 0.050593554973602295, 0.030882002785801888, 0.041072893887758255, -0.045197367668151855, -0.015724558383226395, 0.004362920764833689, 0.03315046429634094, -0.04303201660513878, -0.000578393111936748, 0.012450757436454296, -0.04475054889917374, 0.021017635241150856, -0.049390584230422974, -0.005464928690344095, -0.008197393268346786, 0.007935317233204842, 0.032703645527362823, -0.030882002785801888, -0.10847368091344833, -0.05330883339047432, 0.0026207598857581615, 0.005340335424989462, -0.07774634659290314, 0.0024532030802220106, 0.04475054889917374, -0.02020992524921894, -0.09651270508766174, 0.0243687704205513, 0.048978134989738464, 0.03791079670190811, 0.07479047030210495, 0.010044814087450504, -0.034061286598443985, -0.031208524480462074, 0.031775638461112976, 0.062245193868875504, -0.010070592164993286, -0.05911746993660927, 0.035109590739011765, -0.014968405477702618, 0.059598658233881, -0.02402506396174431, 0.010843930765986443, -0.011445417068898678, 0.034061286598443985, 0.05492425337433815, -0.005185667425394058, -0.024987442418932915, -0.030314888805150986, 0.01424662210047245, 0.011419638991355896, -0.033683210611343384, -0.0686037614941597, 0.004652922973036766, 0.03746397793292999, 0.009030880406498909, -0.03481743857264519, 0.007922427728772163, -0.0049407766200602055, -0.04375379905104637, -0.0021610527765005827, -0.015337890014052391, 0.028665097430348396, -0.024248473346233368, -0.010251037776470184, -0.05729582533240318, -0.06801945716142654, -0.026980938389897346, 0.045644186437129974, 0.011591492220759392, -0.0637231320142746, -0.003477877238765359, 0.028321390971541405, -0.034473732113838196, -0.006255452986806631, 0.10654892772436142, 0.04059170186519623, 0.014590328559279442, -0.027994871139526367, -0.0022083125077188015, 0.031689710915088654, 0.032703645527362823, -0.024987442418932915, -0.004002029076218605, 0.055130477994680405, -0.030675780028104782, -0.031208524480462074, 0.0073596094734966755, -0.018663248047232628, 0.046056631952524185, 0.036192264407873154, 0.07169711589813232, 0.005787153262645006, 0.04409750550985336, 0.05674589425325394, 0.03156941384077072, 0.012029717676341534, -0.006006265990436077, -0.06451365351676941, -0.053927503526210785, -0.01776961050927639, 0.03382069244980812, 0.06200459972023964, -0.0704597756266594, -0.0007293015951290727, 0.06575100123882294, -0.02167067676782608, 0.01840546727180481, 0.04261957108974457, -0.011075932532548904, -0.03846072405576706, 0.012046902440488338, -0.001461825449950993, -0.005542262457311153, -0.03801390528678894, 0.0016841604374349117, -0.04330698400735855, -0.058051981031894684, 0.049356210976839066, 0.0011116748210042715, -0.0006192082073539495, 0.029180657118558884, 0.02065674401819706, -0.029679032042622566, -0.009658144786953926, 0.05121222510933876, -0.0008743026992306113, -0.035367369651794434, 0.03421595320105553, 0.028132352977991104, -0.0032437273766845465, 0.014779367484152317, -0.07341564446687698, 0.042344603687524796, 0.03206779062747955, 0.08255822956562042, -0.019436586648225784, 0.005082555580884218, 0.03595167025923729, 0.006414417177438736, -0.02002088725566864, -0.021945642307400703, -0.03797953575849533, 0.0337347649037838, -0.02036459371447563, 0.020072443410754204, 0.03382069244980812, -0.0141521031036973, 0.04581603780388832, -0.010371334850788116, -0.06606033444404602, -0.005159889347851276, -0.012966317124664783, 0.013043650425970554, 0.019213177263736725, 0.02185971476137638, -0.05708960071206093, 0.018422653898596764, 0.023182984441518784, 0.0281151682138443, -0.05073103681206703, 0.05121222510933876, -0.01897258311510086, -0.025142109021544456, 0.04884065315127373, 0.002988095860928297, 0.048565689474344254, -0.05478677153587341, -0.008901990950107574, 0.01218438521027565, -0.024506252259016037, 0.04014488682150841, -0.027565238997340202, 0.030641408637166023, 0.05897998437285423, -0.08338312804698944, -0.0072865718975663185, -0.07396557927131653, 0.022701796144247055, -0.0016755678225308657, -0.027376199141144753, 0.04409750550985336, -0.03504084795713425, 0.035333000123500824, -0.009512069635093212, -0.05320572108030319, -0.060457922518253326, 0.05671152472496033, -0.0033940989524126053, -0.01608545146882534, -0.026345081627368927, -0.0004768923681695014, 0.04554107412695885, -0.031655341386795044, -0.032823942601680756, -0.014598920941352844, 0.004657219164073467, -0.033081721514463425, 0.016523675993084908, -0.009176955558359623, -0.0018173465505242348, 0.015647225081920624, -0.030383629724383354, 0.03966369852423668, -0.06592284888029099, -0.06795071810483932, -0.06492610275745392, 0.01186645682901144, 0.05396187677979469, 0.048978134989738464, -0.013662321493029594, 0.005847301799803972, -0.04017925634980202, -0.005082555580884218, -0.03547048196196556, 0.06557914614677429, -0.04217275232076645, -0.08675144612789154, -0.001526270410977304, 0.06980673223733902, 0.016394786536693573, -0.0018817915115505457, -0.02414536103606224, 0.04096978157758713, -0.021533194929361343, 0.04547233134508133, -0.09142585098743439, -0.04203527048230171, 0.009383179247379303, 0.013662321493029594, -0.01979747787117958, -0.01776961050927639, 0.005267297849059105, 0.01342172734439373, 0.02823546528816223, 0.04450995475053787, 0.003391950624063611, -0.010500225238502026, 0.05203711986541748, 0.009718293324112892, 0.011737567372620106, 0.03705152869224548, -0.001358713605441153, 0.021498823538422585, -0.07334690541028976, 0.006135155912488699, 0.055852260440588, 0.021808158606290817, 0.0009548588423058391, 0.006001969799399376, 0.00793102104216814, 0.02411099150776863, 0.01761494390666485, 0.04169156402349472, 0.02837294712662697, -0.035298626869916916, -0.02132697030901909, -0.014865294098854065, 0.017374349758028984, 0.0363641157746315, -0.039045024663209915, -0.04371942952275276, 0.07692144811153412, -0.006874124053865671, 0.05506173521280289, 0.048187609761953354, 0.012536684051156044, -0.05107474327087402, -0.026121672242879868, -0.034628402441740036, -0.03096793033182621, 0.0112477857619524, -0.028819765895605087, -0.033494170755147934, -0.01735716313123703, 0.03519551455974579, 0.03832324221730232, -0.021567564457654953, 0.004077214747667313, 0.037876423448324203, -0.028974434360861778, -0.010147925466299057, -0.0009639885392971337, 0.03846072405576706, 0.06403246521949768, -0.024660920724272728, 0.05313698202371597, -0.04213838279247284, 0.01032837200909853, 0.07307194173336029, -0.0243687704205513, -0.007467017509043217, 0.0028914285358041525, -0.05423684045672417, -0.00916836317628622, 0.006723752710968256, -0.005172778386622667, 0.032188087701797485, -0.010869708843529224, 0.009761256165802479, 0.003194319549947977, -0.021017635241150856, 0.05379002168774605, 0.016128413379192352, -0.05028421804308891, 0.004725960548967123, -0.007759167812764645, -0.02316579781472683, 0.013894323259592056, 0.011015783995389938, 0.02935251034796238, -0.011118896305561066, -0.04045422002673149, 0.011557121761143208, 0.0013178985100239515, -0.08077096194028854, -0.009065251797437668, -0.09527536481618881, -0.01156571414321661, 0.013894323259592056, 0.040316738188266754, -0.004820479545742273, 0.00017306144582107663, -0.0009929887019097805, 0.016248710453510284, -0.007982577197253704, 0.026070116087794304, 0.036157894879579544, -0.05196838080883026, -0.02306268736720085, -0.014873886480927467, -0.011737567372620106, -0.008657100610435009, -0.04186341539025307, 0.007686130236834288, 0.10407423973083496, 0.011144674383103848, 0.0003584748483262956, -0.0028484652284532785, 0.0048677390441298485, -0.011333712376654148, 0.003344691125676036, 0.04904687777161598, 0.026895010843873024, 0.028097983449697495, -0.026310710236430168, 0.04750019684433937, 0.07644025981426239, 0.037773311138153076, -0.03246305137872696, -0.025692040100693703, 0.003495062468573451, -0.003611063351854682, 0.07822753489017487, -0.005383298732340336, -0.026637231931090355, 0.022358089685440063, -0.04660656303167343, 0.10242445021867752, 0.003129874588921666, 0.06038917973637581, -0.06901621073484421, 0.06231393665075302, -0.005971895530819893, -0.014014621265232563, -0.017632128670811653, 0.0007223201100714505, 0.0359860397875309, 0.013086614198982716, 0.014684847556054592, -0.03294423967599869, -0.02763397991657257, 0.04495677351951599, -0.02069111354649067, 0.0068612354807555676, 0.04330698400735855, 0.01986621879041195, -0.0038752874825149775, -0.045987892895936966, -0.0013383061159402132, -0.006929976399987936, -0.009872960858047009, -0.011806308291852474, 0.055474184453487396, -0.0003066503850277513, -0.006173823028802872, -0.03201623260974884, 0.013069428503513336, 0.03376913443207741, -0.03320201858878136, 0.05203711986541748, -0.006173823028802872, -0.06389498710632324, -0.04430373013019562, -0.0404885932803154, -0.016764270141720772, -0.030383629724383354, 0.05726145580410957, 0.03242868185043335, 0.03883880376815796, -0.015621447004377842, -0.021790973842144012, -0.00489351712167263, 0.03993866220116615, -0.020330222323536873, -0.011746159754693508, 0.0050438884645700455, -0.0016046783421188593, -0.05977050960063934, 0.023784469813108444, -0.048187609761953354, 0.015561298467218876, -0.019144436344504356, -0.03258334845304489, -0.024248473346233368, -0.014805144630372524, 0.0337347649037838, 0.039526212960481644, 0.03993866220116615, -0.05777701362967491, -0.015698781237006187, -0.07028792053461075, 0.06200459972023964, -0.00907384417951107, -0.009864368475973606, 0.024317214265465736, 0.031174153089523315, -0.031689710915088654, -0.0037506939843297005, -0.00928006786853075, 0.000728764571249485, 0.028768209740519524, -0.013395949266850948, 0.004459588322788477, -0.015372260473668575, -0.0010123222600668669, 0.01735716313123703, 0.01945377141237259, 0.03938873112201691, -0.054305583238601685, 0.023406393826007843, -0.05114348605275154, 0.06427305936813354, -0.0002605991321615875, -0.023268910124897957, -0.04509425535798073, -0.021017635241150856, -0.0006895606056787074, -0.03029770217835903, -0.04550670087337494, -0.047706421464681625, 0.021395711228251457, -0.006577677559107542, -0.023372022435069084, -0.020725484937429428, -0.05574914813041687, 0.03332231566309929, -0.015844855457544327, 0.012098458595573902, -0.007011606823652983, -0.018061760812997818, 0.02703249268233776, 0.08042725175619125, -0.014951219782233238, -0.018731988966464996, -0.01166023313999176, 0.00018084853945765644, 0.007961095310747623, 0.005907450336962938, 0.08331438899040222, -0.07582159340381622, -0.00042130862129852176, -0.03708590194582939, 0.025881078094244003, -0.04282579571008682, -0.08778256922960281, 0.01605108007788658, -0.029215028509497643, 0.04502551257610321, -0.016558047384023666, -0.020175553858280182, 0.0513497069478035, 0.008047021925449371, -0.02163630537688732, -0.06942865252494812, -0.034250322729349136, -0.004502551164478064, 0.006337083410471678, -0.08180207759141922, 0.03478306904435158, 0.0008538950933143497, 0.035264257341623306, 0.03418158367276192, -0.011084524914622307, 0.0091855488717556, 0.03849509730935097, -0.03210216015577316, 0.019299102947115898, -0.03756709024310112, -0.014504401944577694, 0.049012504518032074, -0.05420247092843056, 0.0068612354807555676, 0.05117785558104515, 0.005976191721856594, 0.005331742577254772, -0.060492292046546936, -0.0404885932803154, 0.01945377141237259, 0.028854137286543846, -0.03359728306531906, 0.03239431232213974, -0.03194749355316162, 0.05901435762643814, -0.021808158606290817, -0.09878116846084595, 0.01983184926211834, -0.03376913443207741, 0.07382809370756149, 0.057123973965644836, -0.030263332650065422, -0.028802581131458282, 0.003469284623861313, -0.007381090894341469, -0.019058508798480034, -0.0033597282599657774, -0.02754805237054825, -0.020072443410754204, -0.009812812320888042, -0.01878354512155056, 0.04255082830786705, 0.03071014955639839, 0.0031792824156582355, 0.08613277971744537, 0.046091001480817795, -0.0016143451211974025, 0.024179732427001, -0.03356290981173515, 0.044406842440366745, -0.017494646832346916, 0.008429395034909248, -0.007561536505818367, -0.007269386202096939, -0.01802739128470421, 0.048943765461444855, 0.04306638985872269, -0.03966369852423668, -0.00832198653370142, -0.040247999131679535, -0.026568491011857986, -0.050559185445308685, -0.06117970496416092, -0.03400972858071327, 0.01885228604078293, 0.0005896709626540542, 0.006882716901600361, 0.007870872505009174, -0.027943314984440804, -0.01916162110865116, 0.012974909506738186, -0.015681596472859383, -0.07953361421823502, -0.01332720834761858, 0.024609364569187164, 0.009795626625418663, 0.020175553858280182, -0.020519260317087173, 0.024918699637055397, 0.03632974624633789, 0.003417728701606393, 0.03227401152253151, 0.010448669083416462, -0.007033088244497776, -0.024574995040893555, -0.00813724473118782, -0.007045977283269167, -0.022615868598222733, -0.014504401944577694, 0.00832198653370142, 0.01175475213676691, 0.003991288598626852, 0.003452099161222577, -0.003909658174961805, 0.0042984760366380215, 0.041485339403152466, -0.00907384417951107, -0.008816064335405827, -0.023973507806658745, -0.004317809361964464, -0.027049679309129715, -0.019178805872797966, 0.034542474895715714, 0.044372472912073135, -0.016884567216038704, -0.009005102328956127, -0.013000687584280968, 0.0027023900765925646, 0.019556883722543716, 0.03478306904435158, 0.04746582731604576, 0.03663908317685127, -0.012003939598798752, 0.0021137932781130075, 0.008665692992508411, 0.07238452881574631, 0.01529492624104023, 0.08785130828619003, 0.00802554003894329, 0.011943791061639786, 0.012227348051965237, -0.07809004932641983, -0.01186645682901144, -0.023818841204047203, 0.022822093218564987, -0.026671601459383965, -0.02275335043668747, -0.09685640782117844, -0.012158607132732868, 0.0006063192267902195, 0.12428416311740875, 0.015372260473668575, 0.019436586648225784, -0.012442165054380894 ]
716,080
torch.optim.lr_scheduler
scale_fn
null
def scale_fn(self, x): if self._scale_fn_custom is not None: return self._scale_fn_custom(x) else: return self._scale_fn_ref(x) # static method
(self, x)
[ 0.04337717592716217, -0.06724805384874344, 0.062044136226177216, 0.0774880200624466, 0.009887444786727428, 0.008326269686222076, -0.0025536969769746065, 0.0019420267781242728, 0.029561614617705345, 0.013664482161402702, 0.012699239887297153, 0.003739267122000456, 0.08413560688495636, -0.014906708151102066, -0.000735997746232897, 0.039549779146909714, -0.0017731093103066087, 0.014487037435173988, 0.04032197594642639, 0.04388078302145004, 0.034648023545742035, 0.022645438089966774, 0.01701345667243004, -0.019858824089169502, 0.012153667397797108, 0.12167096883058548, 0.06311849504709244, -0.007021093275398016, 0.040288399904966354, -0.03343937173485756, -0.024307334795594215, 0.05915680155158043, -0.007881417870521545, 0.015166903845965862, 0.015301198698580265, 0.004286937415599823, -0.051166269928216934, 0.03340579941868782, -0.020211348310112953, -0.020563870668411255, 0.01127235870808363, 0.01576283574104309, 0.03589025139808655, -0.004738083574920893, 0.026976441964507103, 0.035554513335227966, -0.013748416677117348, 0.07010181993246078, 0.0027152702677994967, -0.028974074870347977, 0.02682535909116268, -0.04226924851536751, 0.005950932390987873, -0.0003905561752617359, -0.0003173760778736323, 0.1013924777507782, 0.03474874421954155, 0.0417320691049099, 0.03006521798670292, -0.027731848880648613, 0.06117122247815132, 0.04512300714850426, -0.018499091267585754, -0.07043755054473877, 0.005271065514534712, -0.03505090996623039, -0.011104490607976913, -0.019842037931084633, -0.029528040438890457, 0.04052341729402542, 0.011163244023919106, 0.023954810574650764, 0.00004796706707566045, -0.025230610743165016, 0.020362429320812225, 0.02648962289094925, 0.014302382245659828, -0.016954701393842697, 0.0038840535562485456, -0.0289069265127182, 0.03505090996623039, -0.01836479641497135, -0.03696460649371147, -0.038038965314626694, -0.008263318799436092, -0.0788981169462204, 0.053818587213754654, -0.03150888532400131, -0.02590208500623703, 0.07265341281890869, -0.01802905835211277, -0.0383075550198555, 0.007461747620254755, 0.03891187906265259, -0.011096096597611904, -0.0044149369932711124, -0.011859897524118423, 0.001709109521470964, 0.08218833804130554, 0.0004128511936869472, 0.020580658689141273, 0.012665665708482265, -0.0010150788584724069, 0.025633495301008224, 0.05539654940366745, 0.02138642594218254, 0.03911332041025162, -0.02219219319522381, -0.055866580456495285, 0.04132918268442154, 0.0016870767576619983, 0.028453683480620384, -0.04206780344247818, 0.008494137786328793, -0.06143981218338013, -0.02066459134221077, -0.04210137948393822, 0.004742280580103397, -0.026539983227849007, 0.008019909262657166, -0.05015905946493149, 0.025264184921979904, -0.0072183385491371155, -0.03719962388277054, -0.040825579315423965, 0.012690845876932144, 0.03619241341948509, 0.02400517277419567, 0.0035315300337970257, 0.033137209713459015, -0.040825579315423965, 0.029343385249376297, -0.001352389226667583, 0.04790962114930153, 0.001635667053051293, -0.04163134843111038, 0.03911332041025162, 0.06963178515434265, -0.0018675351748242974, 0.04868181794881821, -0.005501884501427412, 0.06473003327846527, 0.02831938862800598, -0.00919079128652811, 0.03266717866063118, 0.034815892577171326, 0.09534921497106552, 0.059828273952007294, -0.0447201244533062, -0.006895191967487335, -0.04519015550613403, 0.0729220062494278, 0.04317573457956314, -0.03958335518836975, 0.03342258557677269, -0.011146457865834236, 0.0015422903234139085, -0.005522868130356073, 0.030333807691931725, -0.0016241261037066579, -0.023921238258481026, 0.07883097231388092, -0.05220705270767212, -0.08964169025421143, -0.0017133061774075031, -0.025029169395565987, 0.009870657697319984, -0.012346715666353703, 0.017961911857128143, 0.02590208500623703, -0.0038756602443754673, -0.021487146615982056, 0.0023165829479694366, 0.03666244447231293, 0.06060047075152397, 0.05949253961443901, 0.012481010518968105, 0.010072099976241589, 0.012120094150304794, 0.041933510452508926, 0.03342258557677269, -0.047003135085105896, -0.005350803025066853, -0.06845670938491821, -0.021537506952881813, 0.06197698786854744, -0.009115250781178474, 0.03401012346148491, -0.06365567445755005, -0.021117836236953735, 0.05593372881412506, 0.016006246209144592, 0.0010323902824893594, -0.040053386241197586, -0.020882820710539818, -0.030904561281204224, -0.04203423112630844, -0.05019263178110123, 0.030333807691931725, -0.01699666865170002, 0.0028684502467513084, -0.005338212940841913, 0.0020805182866752148, 0.019204137846827507, -0.032952554523944855, -0.014990642666816711, 0.017172930762171745, 0.03511805459856987, -0.1022653877735138, -0.028218667954206467, -0.019657382741570473, -0.03810611367225647, -0.050796959549188614, 0.025398479774594307, -0.02121855691075325, -0.03077026642858982, 0.0011215703561902046, -0.011650062166154385, 0.0018528467044234276, 0.026187460869550705, 0.0390125997364521, -0.0006824897136539221, 0.009669216349720955, 0.025297757238149643, 0.05163630098104477, 0.017575815320014954, 0.05160272493958473, -0.011096096597611904, 0.025415265932679176, -0.0578138530254364, -0.005770474206656218, -0.013211238197982311, 0.010290329344570637, 0.004931132309138775, -0.01989239826798439, -0.04018767923116684, 0.05892178416252136, 0.02575100213289261, 0.02554956078529358, 0.012724420055747032, -0.01145701389759779, 0.03998623788356781, 0.06066761538386345, 0.013983432203531265, -0.00007967188867041841, 0.0008493088535033166, -0.015041003003716469, 0.06909460574388504, -0.04337717592716217, -0.0011645866325125098, 0.017794042825698853, -0.0242066141217947, -0.02197396568953991, 0.007797484286129475, -0.012153667397797108, 0.037636078894138336, -0.026707852259278297, 0.005950932390987873, -0.008502530865371227, 0.005468310788273811, 0.0052752625197172165, -0.03290219232439995, -0.00940062664449215, 0.008536105044186115, -0.03441300988197327, -0.02437448315322399, -0.030887773260474205, 0.03605811670422554, -0.011263965629041195, 0.02105068974196911, 0.036696016788482666, 0.002545303665101528, 0.004179921466857195, -0.007050469983369112, -0.008838267996907234, -0.005459917709231377, -0.030484890565276146, -0.014864740893244743, 0.06667730212211609, -0.03226429224014282, 0.04055698961019516, -0.033338651061058044, 0.0017636667471379042, 0.013345533050596714, -0.006391586735844612, -0.03244894742965698, 0.030904561281204224, -0.02403874509036541, -0.00751630449667573, 0.01952308788895607, -0.05767956003546715, 0.01549424696713686, -0.035185202956199646, 0.01878446713089943, -0.020194560289382935, -0.023988384753465652, 0.006274078972637653, -0.04599592462182045, 0.03548736497759819, 0.00849833432585001, -0.011297538876533508, -0.026523197069764137, -0.05784742906689644, 0.020362429320812225, 0.006030669901520014, -0.018834827467799187, 0.028638338670134544, -0.05005833879113197, -0.005585819017142057, 0.053415704518556595, 0.0007527845446020365, 0.020177774131298065, -0.09407341480255127, -0.0639578327536583, 0.04492156580090523, 0.004351986572146416, 0.029964497312903404, 0.03733391687273979, 0.014520610682666302, 0.07621222734451294, -0.014151300303637981, -0.004989886190742254, -0.04844680055975914, 0.03683031350374222, -0.013001402840018272, 0.01090304832905531, -0.003944905940443277, -0.0024823530111461878, -0.005006673280149698, -0.01950629986822605, -0.025834936648607254, -0.03505090996623039, 0.03437943384051323, -0.012732813134789467, -0.0840013176202774, -0.03730034455657005, 0.04616379365324974, 0.04247068986296654, 0.0035168416798114777, -0.00770095968618989, -0.026707852259278297, 0.05089768022298813, -0.03248252347111702, -0.009694396518170834, -0.004261757247149944, 0.038609717041254044, 0.03132423013448715, -0.04092629998922348, 0.03834112733602524, -0.06711375713348389, 0.00976993702352047, -0.04183278977870941, -0.017005061730742455, -0.03743463754653931, 0.007730336859822273, 0.001467798720113933, -0.007260305341333151, -0.04455225542187691, 0.0020605837926268578, -0.019674168899655342, 0.06083548441529274, -0.06556937098503113, -0.03659529611468315, -0.02761434204876423, 0.08057679980993271, 0.02103390172123909, -0.03511805459856987, -0.013479826971888542, 0.05989542230963707, 0.007075650151818991, 0.035185202956199646, -0.011263965629041195, -0.0656365156173706, -0.011096096597611904, -0.03249930962920189, 0.026741426438093185, -0.014856347814202309, 0.017525454983115196, -0.01078554056584835, 0.013286778703331947, 0.07238482683897018, -0.02101711556315422, -0.01136468630284071, 0.01710578426718712, 0.0394490584731102, 0.03234822675585747, 0.0071553876623511314, -0.029763055965304375, 0.028655124828219414, -0.04696955904364586, 0.015737656503915787, -0.005359196569770575, 0.02796686440706253, -0.02101711556315422, -0.014805987477302551, -0.03850899636745453, 0.0316767543554306, 0.014780807308852673, 0.03834112733602524, 0.013563761487603188, -0.04203423112630844, 0.03228108212351799, 0.006962339393794537, 0.016929522156715393, -0.0034622843377292156, -0.009367053396999836, -0.006345422938466072, 0.06882601976394653, -0.01494028139859438, 0.09890802204608917, 0.004545035306364298, 0.0012275371700525284, -0.0623798742890358, -0.043075013905763626, 0.007478534244000912, -0.01379038393497467, 0.006387390196323395, -0.011028949171304703, -0.02909158170223236, -0.03377510979771614, -0.02929302491247654, 0.004301626235246658, -0.03578953072428703, 0.02872227132320404, 0.007449157536029816, -0.08782871067523956, 0.004687723238021135, -0.029611974954605103, 0.0048723784275352955, 0.06614012271165848, -0.02252793125808239, -0.023988384753465652, -0.026405688375234604, -0.0021130426321178675, 0.03756893426179886, -0.03733391687273979, -0.029746269807219505, 0.004612182732671499, -0.034446582198143005, -0.030568823218345642, 0.046868838369846344, 0.01876767911016941, 0.012162060476839542, -0.06348780542612076, 0.0019178957445546985, -0.008620038628578186, -0.05093125253915787, 0.010349082760512829, -0.04418294504284859, -0.06761736422777176, 0.016895947977900505, 0.019640594720840454, 0.030317021533846855, 0.012170454487204552, 0.0015265527181327343, -0.05821673944592476, -0.052106332033872604, -0.1011238843202591, 0.03343937173485756, -0.0002793433959595859, -0.057377398014068604, 0.0015653722221031785, -0.02199075184762478, -0.08930595219135284, -0.06473003327846527, 0.045156583189964294, 0.008439580909907818, 0.014965462498366833, 0.04257141053676605, -0.02925945073366165, 0.04529087617993355, -0.00015986835933290422, -0.026607131585478783, -0.044955141842365265, 0.04505586251616478, -0.0008215056732296944, -0.062044136226177216, 0.01876767911016941, 0.030367381870746613, -0.001306225429289043, 0.02346799336373806, -0.0279836505651474, 0.06909460574388504, 0.04300786927342415, -0.0001142291584983468, -0.0006447193445637822, -0.011389866471290588, 0.01990918442606926, -0.024928446859121323, 0.03719962388277054, -0.027933290228247643, 0.09729648381471634, 0.05207275599241257, 0.040254827588796616, -0.08077824115753174, -0.03362402692437172, 0.047070279717445374, -0.024676645174622536, 0.024827726185321808, 0.013295171782374382, 0.009383839555084705, 0.02590208500623703, -0.04294072091579437, 0.046633824706077576, 0.026053166016936302, 0.045895203948020935, -0.05707523226737976, 0.024340908974409103, -0.060734763741493225, -0.05314711481332779, -0.03921404480934143, -0.021705375984311104, -0.01898590847849846, 0.004998279735445976, -0.008905415423214436, -0.05271065607666969, -0.030870987102389336, 0.020379215478897095, -0.007193158380687237, -0.07144476473331451, 0.007025289814919233, -0.003273432608693838, -0.01937200501561165, -0.03941548615694046, 0.024307334795594215, 0.03305327519774437, -0.021923605352640152, 0.02160465531051159, 0.04052341729402542, 0.03881115838885307, 0.0018832728965207934, -0.021722162142395973, -0.006127194035798311, 0.017424732446670532, 0.009199184365570545, 0.060197584331035614, -0.09279761463403702, -0.04408222436904907, -0.01917056366801262, -0.008141614496707916, -0.029964497312903404, -0.03224750608205795, 0.024156253784894943, 0.02424018830060959, -0.03491661325097084, -0.04975617304444313, -0.015997853130102158, 0.012522977776825428, 0.07466783374547958, -0.04545874521136284, -0.0005300967022776604, 0.004435920622199774, 0.024844514206051826, 0.027480047196149826, 0.03609169274568558, -0.006324439309537411, -0.013505007140338421, 0.015678903087973595, -0.041027020663022995, -0.03196213021874428, -0.04438438639044762, 0.026976441964507103, 0.12207385152578354, -0.010433017276227474, -0.09850513935089111, 0.002287206007167697, -0.002019665902480483, 0.03478232026100159, 0.04079200699925423, -0.06496504694223404, -0.005648769438266754, 0.0548257976770401, 0.01861659809947014, -0.035755954682826996, -0.04754031077027321, 0.020194560289382935, 0.03207963705062866, -0.08782871067523956, -0.07554075121879578, -0.012489404529333115, -0.059425391256809235, -0.04455225542187691, -0.0008089155307970941, 0.012606912292540073, -0.037266772240400314, -0.01078554056584835, -0.0318949818611145, 0.02778220921754837, -0.0729220062494278, 0.0010507508413866162, -0.03305327519774437, -0.04089272767305374, -0.060801912099123, -0.004182019736617804, -0.025398479774594307, -0.027194669470191002, -0.017021849751472473, -0.008473154157400131, 0.02479415386915207, -0.02872227132320404, -0.02180609665811062, 0.04898397997021675, -0.007486927788704634, 0.04508943483233452, 0.022964388132095337, 0.0048178210854530334, 0.004156839568167925, -0.014419890008866787, -0.003298612777143717, -0.020563870668411255, -0.024307334795594215, 0.04320931062102318, -0.0031622196547687054, 0.019237712025642395, 0.041799213737249374, -0.015804802998900414, -0.013303565792739391, 0.0011236686259508133, 0.010433017276227474, -0.04465297609567642, -0.07554075121879578, 0.051367711275815964, -0.0072938790544867516, 0.015099756419658661, 0.03471517190337181, 0.017147749662399292, 0.05915680155158043, -0.009140430949628353, -0.01605660654604435, -0.052274201065301895, -0.01895233429968357, -0.024844514206051826, 0.03736749291419983, -0.0630849227309227, 0.05590015649795532, 0.0013345532352104783, -0.019086629152297974, 0.03548736497759819, -0.06103692576289177, -0.0045534283854067326, 0.025834936648607254, 0.0011708816746249795, 0.021168196573853493, -0.024072319269180298, 0.003701496869325638, 0.005199721548706293, -0.018532663583755493, 0.005640375893563032, -0.003701496869325638, -0.0041610365733504295, -0.02588529698550701, -0.03609169274568558, -0.03790466859936714, 0.023132257163524628, 0.09736363589763641, -0.0017185520846396685, 0.02610352635383606, -0.02365264855325222, 0.021822882816195488, -0.05469150468707085, -0.0814497172832489, -0.007419780362397432, -0.011331113055348396, 0.1022653877735138, 0.01231314241886139, -0.0600968636572361, -0.010458197444677353, -0.04730529710650444, -0.07097472995519638, -0.027328964322805405, 0.016660932451486588, 0.00045849039452150464, -0.04539159685373306, -0.03271753713488579, 0.011809537187218666, -0.01677843928337097, 0.022846881300210953, 0.019422367215156555, -0.009409019723534584, 0.02120177075266838, 0.011121276766061783, -0.00013967169797979295, -0.057377398014068604, 0.06875886768102646, 0.015150117687880993, -0.03958335518836975, 0.0206478051841259, 0.007092437241226435, -0.05532940477132797, 0.04559303820133209, 0.020933181047439575, -0.04089272767305374, -0.0056068021804094315, -0.02136963978409767, -0.026607131585478783, 0.017407946288585663, -0.04425009340047836, 0.04602949693799019, 0.05536297708749771, 0.0017961912089958787, -0.0044149369932711124, -0.005967719480395317, -0.018818039447069168, 0.03666244447231293, 0.03703175485134125, -0.030669543892145157, -0.008154204115271568, -0.026153886690735817, 0.06587153673171997, 0.03941548615694046, 0.02549920044839382, -0.025448840111494064, 0.05220705270767212, 0.026137100532650948, 0.0016692407662048936, 0.005988702643662691, -0.049856893718242645, 0.014478644356131554, 0.0032251703087240458, 0.06049974635243416, 0.017055422067642212, -0.033338651061058044, 0.054926518350839615, -0.03854256868362427, -0.04294072091579437, 0.02121855691075325, 0.055127959698438644, 0.03041774220764637, -0.002103600185364485, 0.0025075331795960665, 0.007675779517740011, 0.005048640072345734, 0.019657382741570473, 0.011566128581762314, 0.02910836972296238, -0.027698274701833725, 0.009316693060100079, 0.007394600193947554, -0.04391435533761978, -0.05569871515035629, -0.0045240516774356365, -0.034648023545742035, -0.008573874831199646, -0.03286862000823021, 0.042705703526735306, 0.03730034455657005, -0.02217540703713894, 0.031995706260204315, 0.019304858520627022, -0.003271334106102586, 0.004754870664328337, 0.028201879933476448, -0.03817325830459595, -0.002333369804546237, 0.04109416902065277, -0.07627937197685242, 0.009795117191970348, -0.0010266198078170419, 0.03864328935742378, -0.014621332287788391, -0.029746269807219505, -0.009090070612728596, -0.011096096597611904, 0.01858302392065525, 0.06694589555263519, -0.004473691340535879, 0.04203423112630844, 0.05606802552938461 ]
716,081
torch.optim.lr_scheduler
state_dict
null
def state_dict(self): state = super().state_dict() # We are dropping the `_scale_fn_ref` attribute because it is a # `weakref.WeakMethod` and can't be pickled. state.pop('_scale_fn_ref') fn = state.pop('_scale_fn_custom') state['_scale_fn_custom'] = None if fn is not None and not isinstance(fn, types.FunctionType): # The _scale_fn_custom will only be saved if it is a callable object # and not if it is a function or lambda. state['_scale_fn_custom'] = fn.__dict__.copy() return state
(self)
[ 0.02883351966738701, -0.04760484769940376, 0.04215449094772339, 0.016951365396380424, -0.006574728526175022, 0.01144383940845728, -0.045584786683321, -0.0022320726420730352, 0.015083761885762215, -0.034302931278944016, -0.004335509613156319, 0.02974826470017433, 0.04017254337668419, 0.0030705889221280813, -0.03224475681781769, 0.019000012427568436, -0.02883351966738701, -0.009423777461051941, -0.04771919175982475, -0.03049149550497532, 0.010510037653148174, -0.01454063132405281, 0.006160235032439232, 0.013778344728052616, 0.011053167283535004, 0.0646800845861435, -0.004618985112756491, -0.03449350222945213, 0.05640926584601402, 0.006155470386147499, -0.06704317778348923, 0.024412253871560097, 0.0065080286003649235, 0.022487478330731392, 0.025517569854855537, -0.02896692045032978, 0.0016698858235031366, 0.04527987167239189, -0.005607576575130224, -0.025841541588306427, -0.04440324008464813, 0.0045236991718411446, -0.03998197242617607, -0.01112939603626728, 0.0574764683842659, 0.038590800017118454, -0.005035860929638147, 0.01710382290184498, 0.08164098113775253, -0.06856775283813477, 0.03731396794319153, -0.06620465964078903, 0.021534617990255356, 0.07226484268903732, -0.030567724257707596, 0.0035398721229285, 0.028033118695020676, 0.012949356809258461, -0.026813458651304245, -0.0002593563694972545, -0.002970538567751646, 0.008975934237241745, 0.002584630623459816, -0.11731602996587753, -0.0004213424399495125, -0.05999201536178589, -0.01190121192485094, -0.00895211286842823, -0.032092299312353134, 0.01617955043911934, 0.012053669430315495, -0.054770346730947495, 0.04348849505186081, 0.0018842790741473436, -0.021058188751339912, -0.06037316098809242, 0.015074232593178749, -0.031997013837099075, -0.010024079121649265, -0.045203641057014465, -0.033102329820394516, -0.02344033680856228, -0.03222569823265076, 0.01040522288531065, -0.016579750925302505, -0.049281880259513855, 0.07981149107217789, 0.0041139698587358, -0.03306421637535095, -0.004580870736390352, -0.01289218571037054, 0.029005033895373344, -0.011796397157013416, 0.016093792393803596, 0.0078086815774440765, -0.04527987167239189, -0.000024510070943506435, 0.0412016324698925, 0.06086864694952965, -0.058658014982938766, -0.009271319955587387, -0.07481850683689117, -0.023840537294745445, 0.03487464785575867, -0.004654717165976763, -0.016951365396380424, 0.020010042935609818, -0.056218694895505905, -0.04489872604608536, -0.01650352217257023, 0.028471434488892555, 0.03721868246793747, -0.016646450385451317, 0.04284055158495903, 0.019000012427568436, -0.008537618443369865, -0.044555697590112686, -0.0073656016029417515, -0.0027585274074226618, 0.021839533001184464, -0.06483253836631775, 0.04562290012836456, -0.033540643751621246, 0.019952872768044472, -0.045317985117435455, 0.018142439424991608, 0.03481747582554817, 0.038495514541864395, 0.028261804953217506, 0.03420764580368996, -0.030682066455483437, 0.003878137096762657, -0.003535107709467411, 0.06799603253602982, -0.01778988167643547, -0.03476030379533768, 0.05968710035085678, 0.07718160003423691, -0.024869626387953758, 0.06014447286725044, 0.035293906927108765, 0.044327009469270706, -0.022982964292168617, 0.01375928707420826, 0.061173561960458755, 0.04219260811805725, 0.038933828473091125, 0.03420764580368996, -0.06849151849746704, -0.04066803306341171, 0.04569912701845169, 0.005674276500940323, -0.01519810501486063, 0.021839533001184464, -0.012025083415210247, -0.027175545692443848, -0.0005794574972242117, -0.01728486642241478, -0.041468434035778046, -0.0013518690830096602, -0.02963392250239849, 0.038266826421022415, -0.016417764127254486, -0.1189168319106102, -0.011339024640619755, -0.004197345115244389, 0.06124979257583618, -0.08842533826828003, -0.004192580468952656, 0.03586561977863312, -0.06475631147623062, -0.0658235177397728, 0.02334505133330822, 0.09238923341035843, -0.008823476731777191, 0.0872056782245636, 0.036837536841630936, -0.02631797268986702, -0.017265809699892998, 0.0016413000412285328, 0.06567105650901794, -0.01795186847448349, -0.0872056782245636, 0.03424575924873352, -0.025517569854855537, 0.02355468086898327, -0.012511041946709156, -0.009095041081309319, 0.010510037653148174, 0.03998197242617607, 0.02629891410470009, 0.008747247979044914, 0.006498499773442745, -0.01608426310122013, -0.0038233476225286722, -0.010319465771317482, -0.057514581829309464, -0.05278840288519859, -0.016722679138183594, 0.02763291820883751, 0.013568715192377567, -0.0420401506125927, -0.0134829580783844, 0.004564195871353149, -0.0634223073720932, 0.0009671521256677806, -0.027499517425894737, -0.0012029848294332623, -0.01272067055106163, 0.03737113997340202, -0.03428387641906738, -0.05042530968785286, -0.046956904232501984, 0.033864617347717285, 0.02334505133330822, -0.08141229301691055, 0.0380762554705143, 0.05427486076951027, -0.021058188751339912, 0.04447946697473526, 0.08423275500535965, 0.026813458651304245, 0.023859595879912376, -0.029710151255130768, -0.021553676575422287, 0.020086271688342094, 0.013559186831116676, -0.03500804677605629, 0.007303665857762098, -0.03226381167769432, -0.016999008134007454, -0.033635929226875305, -0.04295489564538002, -0.0040020085871219635, 0.03472219035029411, 0.046728216111660004, 0.0309298112988472, -0.01861886866390705, 0.02277333475649357, 0.03424575924873352, 0.057324010878801346, 0.002639420097693801, 0.061173561960458755, -0.011882154271006584, -0.008275582455098629, -0.02687063068151474, 0.06437516957521439, 0.07699102908372879, -0.05141628533601761, -0.016951365396380424, 0.07683856785297394, -0.051797427237033844, -0.0035922792740166187, 0.049739252775907516, 0.010500508360564709, -0.026699114590883255, -0.004778589121997356, 0.0030777351930737495, -0.0035589293111115694, -0.021001016721129417, 0.01613190583884716, -0.03887665644288063, -0.016713151708245277, 0.02422168105840683, 0.041582778096199036, 0.007370366249233484, 0.02311636507511139, 0.014102316461503506, -0.08164098113775253, 0.01728486642241478, 0.09780146926641464, -0.05252160131931305, -0.04985359311103821, 0.022220676764845848, -0.0058410270139575005, -0.050044167786836624, -0.0051740254275500774, -0.057971954345703125, 0.024926796555519104, 0.0029610099736601114, 0.055646978318691254, -0.013292386196553707, 0.03224475681781769, -0.011167510412633419, 0.0037733225617557764, 0.0014007030986249447, -0.028128404170274734, -0.0032754535786807537, 0.07702913880348206, -0.03399801626801491, 0.008256524801254272, 0.03613242134451866, -0.03819059953093529, 0.01615096442401409, 0.05278840288519859, -0.019952872768044472, -0.06174527853727341, -0.01615096442401409, 0.04177334904670715, 0.03537013381719589, 0.026146456599235535, -0.01276831328868866, -0.008799655362963676, 0.051606856286525726, 0.02500302530825138, -0.02082950249314308, 0.05858178436756134, -0.013949858956038952, 0.0043879165314137936, 0.015064704231917858, 0.0068939365446567535, 0.012358584441244602, -0.021420275792479515, 0.009647700004279613, -0.0020117240492254496, -0.053550686687231064, 0.016770321875810623, -0.054999034851789474, 0.009271319955587387, 0.11388573795557022, -0.06971117854118347, -0.01920011267066002, -0.07058781385421753, 0.031977955251932144, -0.0004892336437478662, -0.028871634975075722, 0.014836017973721027, -0.04341226816177368, 0.05572320893406868, -0.009823978878557682, -0.07672422379255295, -0.06380345672369003, 0.051492512226104736, 0.006727186031639576, -0.05229291319847107, -0.01705618016421795, 0.03666602447628975, 0.03586561977863312, -0.01448346022516489, -0.061821505427360535, -0.023287879303097725, 0.029119377955794334, -0.04303112253546715, -0.004811939317733049, -0.056866638362407684, -0.009719164110720158, 0.0021820475813001394, 0.0010088396957144141, 0.05080645531415939, -0.05374126136302948, -0.043336037546396255, -0.01140572503209114, -0.033635929226875305, 0.09536214917898178, 0.05259782820940018, -0.045965928584337234, -0.019276341423392296, -0.03674225136637688, 0.0012601562775671482, -0.018857084214687347, 0.07135009765625, -0.019857585430145264, -0.05667606741189957, -0.0026775344740599394, 0.09863998740911484, 0.027004029601812363, -0.01193932630121708, -0.010595794767141342, 0.040477458387613297, -0.06753866374492645, 0.04066803306341171, -0.06830094754695892, -0.04291677847504616, 0.008942583575844765, 0.0028299919795244932, 0.0029610099736601114, -0.013692586682736874, 0.018237724900245667, -0.014292888343334198, 0.015607833862304688, 0.06246945261955261, -0.005555169191211462, -0.0016544018872082233, 0.035941850394010544, 0.03523673489689827, 0.04745239019393921, 0.05431297421455383, -0.010024079121649265, 0.049701135605573654, -0.030205637216567993, -0.049929823726415634, 0.005340775940567255, -0.03338818624615669, 0.015264804475009441, 0.03239721432328224, 0.01091023813933134, 0.02422168105840683, 0.014597803354263306, 0.009085512720048428, -0.0016329624922946095, -0.007337016053497791, -0.0015745998825877905, -0.004535609856247902, -0.02058175951242447, 0.03514144942164421, -0.013368614949285984, -0.02829991839826107, 0.08087868988513947, 0.020543644204735756, 0.022963907569646835, 0.013835515826940536, -0.01453110296279192, -0.03698999434709549, -0.04989171028137207, -0.006398449651896954, -0.02069610171020031, 0.016903722658753395, -0.05008228123188019, 0.02401205338537693, -0.03039621002972126, 0.016122378408908844, 0.06220265105366707, -0.03813342750072479, 0.01090070977807045, 0.019571729004383087, 0.00762287387624383, -0.02103913202881813, 0.008232703432440758, 0.029481464996933937, 0.09520969539880753, 0.026680057868361473, 0.026070227846503258, -0.01650352217257023, 0.005707626696676016, 0.014016559347510338, -0.025898713618516922, -0.0011529596522450447, -0.015131404623389244, -0.03458879142999649, 0.05122571066021919, -0.03277835622429848, 0.017666010186076164, 0.023268822580575943, 0.004228312987834215, 0.03733302280306816, 0.0002388103457633406, -0.027918774634599686, 0.03138718381524086, 0.03272118419408798, -0.025955885648727417, 0.04779541864991188, -0.009247498586773872, 0.015798406675457954, -0.017294395714998245, -0.006084006279706955, 0.022392190992832184, -0.0420401506125927, -0.07150255888700485, -0.007341780234128237, -0.010805423371493816, -0.03712339699268341, -0.02479339763522148, -0.08979745209217072, 0.007746745366603136, -0.0018247254192829132, 0.028242748230695724, 0.005083504132926464, -0.039791401475667953, -0.005331247579306364, 0.036951880902051926, 0.03622770681977272, 0.0218014195561409, -0.0022618495859205723, -0.07943034172058105, -0.05431297421455383, 0.015493490733206272, -0.03234004229307175, -0.002825227566063404, -0.053245771676301956, -0.04768107458949089, 0.047947876155376434, -0.017046650871634483, -0.025574741885066032, -0.01012889388948679, 0.020753273740410805, 0.0033040393609553576, 0.0136640015989542, 0.03798096999526024, 0.002901456318795681, 0.05473223328590393, -0.05183554068207741, 0.008385160937905312, 0.03874325752258301, 0.0440220944583416, -0.02277333475649357, 0.010224179364740849, 0.026279857382178307, 0.010195593349635601, 0.04413643851876259, -0.0015412498032674193, 0.0016663125716149807, -0.011205624788999557, -0.02963392250239849, 0.11076035350561142, 0.022658992558717728, -0.015588777139782906, -0.048176564276218414, 0.0037399723660200834, -0.025860600173473358, -0.009852563962340355, -0.011034109629690647, -0.010271822102367878, 0.05404617637395859, 0.00038709904765710235, -0.017637424170970917, -0.045584786683321, -0.026584772393107414, 0.020734217017889023, -0.019000012427568436, -0.0416208915412426, 0.019743243232369423, 0.04680444672703743, 0.02828086167573929, -0.02014344371855259, -0.019552670419216156, 0.0007908731349743903, 0.004811939317733049, -0.00181638787034899, 0.0506921112537384, -0.003239721292629838, 0.017599310725927353, -0.04752861708402634, -0.004616602789610624, 0.015846049413084984, -0.03140623867511749, 0.040706146508455276, 0.028604833409190178, -0.049281880259513855, -0.06639523059129715, -0.04436512663960457, 0.0016877518501132727, -0.010081250220537186, -0.004152084235101938, 0.025841541588306427, 0.041468434035778046, -0.004423649050295353, 0.018142439424991608, -0.019571729004383087, 0.0003038727736566216, -0.03632299229502678, -0.004992982372641563, -0.02984355017542839, 0.029462406411767006, -0.08186966180801392, 0.013292386196553707, -0.015550662763416767, 0.06734809279441833, -0.0038424048107117414, -0.006884407717734575, -0.03468407690525055, -0.044631924480199814, 0.039143458008766174, 0.03487464785575867, -0.01569359190762043, -0.0499679371714592, 0.027594802901148796, 0.0013018439058214426, 0.062393222004175186, -0.001074348809197545, -0.025384169071912766, 0.016932308673858643, 0.027270831167697906, 0.035198621451854706, -0.03428387641906738, 0.038362111896276474, 0.00181638787034899, 0.02709931693971157, -0.011682054027915001, -0.027175545692443848, -0.05305520072579384, 0.035617876797914505, 0.008432804606854916, -0.019466914236545563, 0.013120871968567371, -0.05282651633024216, 0.02191576175391674, -0.06605219841003418, 0.053474459797143936, -0.0014316709712147713, -0.018075739964842796, -0.03083452396094799, -0.030205637216567993, -0.015674535185098648, -0.01712287962436676, -0.03889571502804756, -0.026165515184402466, 0.00520737562328577, 0.006265049334615469, -0.03018658049404621, 0.014159488491714, -0.00859479047358036, -0.0036137185525149107, 0.009747750125825405, -0.019762299954891205, -0.028147460892796516, -0.012615855783224106, 0.034855589270591736, 0.06723374873399734, -0.010519566014409065, -0.026146456599235535, -0.03468407690525055, -0.0004728563944809139, -0.0011958383256569505, -0.0440220944583416, 0.06513745337724686, -0.06189773604273796, 0.023078249767422676, 0.0009457127889618278, -0.020791389048099518, -0.019876644015312195, -0.06220265105366707, -0.002810934791341424, -0.013340028934180737, 0.02410733886063099, 0.00429739523679018, -0.03702810779213905, 0.03708527982234955, 0.01562689058482647, -0.011558182537555695, -0.02454565279185772, -0.02443131059408188, 0.010081250220537186, 0.04066803306341171, -0.07664799690246582, 0.061173561960458755, 0.023745251819491386, 0.042002033442258835, 0.057857614010572433, -0.004935810808092356, 0.025403227657079697, 0.035846564918756485, -0.027442345395684242, 0.031787384301424026, -0.04703313112258911, -0.0376569963991642, 0.005693333689123392, 0.01892378367483616, -0.030262809246778488, 0.04886262118816376, -0.018237724900245667, -0.019161999225616455, -0.050920795649290085, -0.024259796366095543, -0.049701135605573654, 0.003218282014131546, 0.00003096792352152988, 0.0164558794349432, 0.015093290247023106, 0.04303112253546715, -0.04131597653031349, -0.12333809584379196, 0.02622268535196781, -0.05644737929105759, 0.04348849505186081, 0.06860586255788803, 0.017313452437520027, -0.04615649953484535, 0.06357476860284805, 0.004835760686546564, -0.018094796687364578, 0.012072726152837276, -0.013959387317299843, -0.019181055948138237, -0.018142439424991608, -0.026737229898571968, 0.04779541864991188, 0.035389192402362823, 0.025898713618516922, 0.03237815573811531, 0.0006842720322310925, -0.009871621616184711, 0.049510564655065536, -0.057095326483249664, 0.05778138339519501, 0.034950874745845795, 0.014359588734805584, 0.0013864102074876428, 0.010005021467804909, 0.012692084535956383, 0.03182549774646759, 0.03685659542679787, -0.033197615295648575, 0.017408737912774086, -0.03666602447628975, -0.021324990317225456, -0.022277848795056343, -0.04043934494256973, -0.05271217226982117, 0.04489872604608536, -0.03428387641906738, 0.0139784449711442, 0.02290673553943634, 0.003396943211555481, -0.01271114218980074, 0.060830533504486084, 0.0003064037882722914, -0.0341123603284359, -0.010862595401704311, 0.03933402895927429, 0.017408737912774086, 0.03874325752258301, -0.01887614093720913, 0.014073730446398258, 0.023364108055830002, -0.005631397943943739, -0.01959078572690487, 0.005674276500940323, -0.03283552825450897, -0.021210646256804466, 0.02883351966738701, -0.0227923933416605, 0.019628899171948433, 0.015379147604107857, 0.016284363344311714, -0.006736714858561754, 0.018952369689941406, 0.02170613408088684, 0.006379392463713884, -0.009566706605255604, 0.0047023603692650795, -0.0009284422267228365, 0.023916766047477722, -0.03819059953093529, 0.012110840529203415, -0.012206126935780048, -0.029443349689245224, 0.057857614010572433, 0.035617876797914505, -0.02995789423584938, 0.021115360781550407, 0.0072893728502094746, 0.03466501832008362, 0.008547146804630756, 0.06048750504851341, 0.03537013381719589, 0.024640940129756927, -0.025612855330109596, -0.007765802554786205, 0.0376569963991642, -0.024088282138109207, -0.0076466952450573444, 0.07302713394165039, -0.021629905328154564, -0.0035398721229285, 0.012234712019562721, -0.08552864193916321, -0.010243237018585205, -0.026165515184402466, 0.023745251819491386, -0.04493683949112892, -0.0227923933416605, -0.06765300780534744, -0.029233720153570175, 0.0188284981995821, 0.05541829392313957, 0.0024000140838325024, 0.004902460612356663, -0.006388921290636063 ]
716,083
pytorch_optimizer.optimizer.dadapt
DAdaptAdaGrad
AdaGrad with D-Adaptation. Leave LR set to 1 unless you encounter instability. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param eps: float. term added to the denominator to improve numerical stability.
class DAdaptAdaGrad(Optimizer, BaseOptimizer): r"""AdaGrad with D-Adaptation. Leave LR set to 1 unless you encounter instability. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1.0, momentum: float = 0.0, d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 0.0, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'k': 0, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'DAdaptAdaGrad' @torch.no_grad() def reset(self): for group in self.param_groups: for p in group['params']: if p.grad is None: continue state = self.state[p] state['alpha_k'] = torch.full_like(p, fill_value=1e-6) state['sk'] = torch.zeros_like(p) state['x0'] = torch.clone(p) if p.grad.is_sparse: state['weighted_sk'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] device = group['params'][0].device d, lr = group['d'], group['lr'] d_lr: float = d * lr g_sq = torch.tensor([0.0], device=device) sk_sq_weighted_change = torch.tensor([0.0], device=device) sk_l1_change = torch.tensor([0.0], device=device) if 'gsq_weighted' not in group: group['gsq_weighted'] = torch.tensor([0.0], device=device) if 'sk_sq_weighted' not in group: group['sk_sq_weighted'] = torch.tensor([0.0], device=device) if 'sk_l1' not in group: group['sk_l1'] = torch.tensor([0.0], device=device) gsq_weighted = group['gsq_weighted'] sk_sq_weighted = group['sk_sq_weighted'] sk_l1 = group['sk_l1'] for group in self.param_groups: eps = group['eps'] for p in group['params']: if p.grad is None: continue grad = p.grad state = self.state[p] if 'alpha_k' not in state: state['alpha_k'] = torch.full_like(p, fill_value=1e-6) state['sk'] = torch.zeros_like(p) state['x0'] = torch.clone(p) if grad.is_sparse: state['weighted_sk'] = torch.zeros_like(p) sk, alpha_k = state['sk'], state['alpha_k'] if grad.is_sparse: weighted_sk = state['weighted_sk'] grad = grad.coalesce() vk = grad._values().pow(2) sk_masked = sk.sparse_mask(grad).coalesce() old_sk_l1_masked = sk_masked._values().abs().sum() sk.add_(grad, alpha=d_lr) sk_masked = sk.sparse_mask(grad).coalesce() alpha_k_masked = alpha_k.sparse_mask(grad).coalesce() weighted_sk_masked = weighted_sk.sparse_mask(grad).coalesce() # update alpha before step alpha_k_p1_masked = alpha_k_masked._values() + vk alpha_k_delta_masked = alpha_k_p1_masked - alpha_k_masked._values() alpha_k_delta = torch.sparse_coo_tensor(grad.indices(), alpha_k_delta_masked, grad.shape) alpha_k.add_(alpha_k_delta) de_nom = torch.sqrt(alpha_k_p1_masked + eps) grad_sq = vk.div(de_nom).sum() g_sq.add_(grad_sq) # update weighted sk sq tracking weighted_sk_p1_masked = sk_masked._values().pow(2).div(de_nom) sk_sq_weighted_change.add_(weighted_sk_p1_masked.sum() - weighted_sk_masked._values().sum()) weighted_sk_p1_delta_masked = weighted_sk_p1_masked - weighted_sk_masked._values() weighted_sk_p1_delta = torch.sparse_coo_tensor( grad.indices(), weighted_sk_p1_delta_masked, grad.shape ) weighted_sk.add_(weighted_sk_p1_delta) sk_l1_masked = sk_masked._values().abs().sum() sk_l1_change.add_(sk_l1_masked - old_sk_l1_masked) else: self.apply_weight_decay( p=p, grad=grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) old_sk_sq_weighted_param = sk.pow(2).div(torch.sqrt(alpha_k) + eps).sum() old_sk_l1_param = sk.abs().sum() alpha_k.add_(grad.pow(2)) grad_sq = grad.pow(2).div(torch.sqrt(alpha_k) + eps).sum() g_sq.add_(grad_sq) sk.add_(grad, alpha=d_lr) sk_sq_weighted_param = sk.pow(2).div(torch.sqrt(alpha_k) + eps).sum() sk_l1_param = sk.abs().sum() sk_sq_weighted_change.add_(sk_sq_weighted_param - old_sk_sq_weighted_param) sk_l1_change.add_(sk_l1_param - old_sk_l1_param) sk_sq_weighted.add_(sk_sq_weighted_change) gsq_weighted.add_(g_sq, alpha=d_lr ** 2) # fmt: skip sk_l1.add_(sk_l1_change) if sk_l1 == 0: return loss if lr > 0.0: d_hat = (sk_sq_weighted - gsq_weighted) / sk_l1 d = group['d'] = max(d, min(d_hat.item(), d * group['growth_rate'])) for group in self.param_groups: group['gsq_weighted'] = gsq_weighted group['sk_sq_weighted'] = sk_sq_weighted group['sk_l1'] = sk_l1 group['d'] = d for p in group['params']: if p.grad is None: continue grad = p.grad state = self.state[p] alpha_k, sk, x0 = state['alpha_k'], state['sk'], state['x0'] if grad.is_sparse: grad = grad.coalesce() sk_masked = sk.sparse_mask(grad).coalesce()._values() alpha_k_masked = alpha_k.sparse_mask(grad).coalesce()._values() x0_masked = x0.sparse_mask(grad).coalesce()._values() p_masked = p.sparse_mask(grad).coalesce()._values() loc_masked = x0_masked - sk_masked.div(torch.sqrt(alpha_k_masked + group['eps'])) loc_delta_masked = loc_masked - p_masked loc_delta = torch.sparse_coo_tenso
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, momentum: float = 0.0, d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 0.0)
[ -0.009543197229504585, -0.04980834573507309, -0.003477908670902252, 0.051523059606552124, -0.00571571197360754, -0.010308695025742054, -0.05238041654229164, -0.037335846573114395, 0.0007514629978686571, -0.003868312109261751, -0.03672344982624054, 0.0032814310397952795, 0.04584817588329315, 0.06642473489046097, -0.02118896134197712, 0.04980834573507309, -0.010635307058691978, 0.03772369772195816, 0.035335347056388855, -0.010808819904923439, -0.03607022389769554, -0.09520743042230606, 0.004929801449179649, 0.07046656310558319, -0.05434009060263634, -0.030129967257380486, 0.04184717684984207, -0.011451836675405502, -0.0360293984413147, -0.01169679593294859, -0.019566107541322708, -0.05291116237640381, 0.015697794035077095, 0.01981106586754322, 0.035131216049194336, -0.028762279078364372, 0.020198917016386986, -0.0017593675293028355, -0.07389599084854126, -0.041234780102968216, 0.02961963601410389, -0.03202839940786362, 0.03239583969116211, -0.054299261420965195, 0.007588628213852644, 0.05760620906949043, -0.03527410700917244, 0.06756787747144699, -0.025986075401306152, 0.008726667612791061, 0.047195449471473694, -0.06434258818626404, 0.0009689917787909508, 0.018045319244265556, -0.027700789272785187, 0.01991313137114048, 0.05862687528133392, -0.0046491194516420364, 0.04213296249508858, -0.10018826276063919, 0.0720587968826294, -0.06895598024129868, 0.03337567672133446, 0.01718796230852604, -0.02951756864786148, -0.032232534140348434, -0.051768019795417786, -0.03604981303215027, 0.014197420328855515, 0.02641475386917591, 0.021046068519353867, -0.021617639809846878, 0.02153598517179489, -0.011217084713280201, -0.026455581188201904, -0.007563111837953329, -0.00921658519655466, -0.05356438457965851, -0.024904172867536545, -0.07503913342952728, 0.03406972438097, 0.014564858749508858, -0.018667923286557198, -0.030252447351813316, 0.004217889159917831, -0.012737872079014778, 0.012013201601803303, -0.002732824767008424, 0.00673637492582202, -0.04258205369114876, 0.019106809049844742, 0.02008664421737194, 0.03613146394491196, 0.056748852133750916, 0.06307696551084518, 0.020556150004267693, -0.027435416355729103, -0.07634557783603668, -0.008104062639176846, -0.02341400645673275, 0.015024157240986824, 0.0122683672234416, 0.007889723405241966, 0.039009734988212585, 0.016779696568846703, -0.0797341838479042, -0.03419220447540283, 0.002079600468277931, 0.021658465266227722, -0.06193382292985916, -0.03982626274228096, -0.01374832820147276, -0.016126472502946854, -0.013829981908202171, -0.03819320350885391, -0.02474086731672287, -0.024373428896069527, 0.014023907482624054, -0.03506997600197792, 0.04017328843474388, 0.04629726707935333, 0.03376352787017822, -0.06818027794361115, 0.0067618913017213345, 0.010472000576555729, -0.013278823345899582, 0.03651931509375572, 0.041316431015729904, 0.05360521376132965, -0.04172469675540924, -0.014615891501307487, 0.023332351818680763, -0.026782192289829254, 0.025761529803276062, 0.029762528836727142, -0.0363151840865612, -0.008685841225087643, 0.04245957359671593, -0.016953209415078163, 0.02539409138262272, 0.036233529448509216, 0.016749076545238495, 0.013166550546884537, -0.006394452881067991, 0.03741750121116638, -0.003868312109261751, 0.03229377046227455, 0.010395451448857784, -0.02641475386917591, -0.009701400063931942, 0.0037305227015167475, 0.03166096284985542, 0.01513643004000187, -0.022107556462287903, -0.01160493679344654, -0.03337567672133446, -0.04245957359671593, 0.003735625883564353, -0.003569768276065588, -0.02772120200097561, -0.04017328843474388, -0.05356438457965851, -0.028027402237057686, -0.02451632171869278, 0.010354624129831791, 0.018453584983944893, -0.00473332405090332, 0.028680626302957535, -0.02351607196033001, 0.0009147690725512803, 0.02974211610853672, -0.06773118674755096, -0.00654244888573885, 0.04335775598883629, -0.038540229201316833, 0.076835498213768, 0.0035008734557777643, -0.007037470117211342, -0.007772347424179316, -0.04707296937704086, 0.04401098191738129, -0.005187518894672394, -0.0026996531523764133, -0.035008735954761505, -0.003158951411023736, 0.036988820880651474, 0.007920343428850174, 0.008588877506554127, 0.017402300611138344, 0.0319671593606472, 0.023985575884580612, -0.03807072341442108, 0.005674885585904121, -0.037662457674741745, -0.02839484065771103, 0.02774161659181118, 0.032681625336408615, -0.01414638664573431, 0.0369684062898159, 0.04397015646100044, -0.0010825404897332191, -0.027802856639027596, 0.002149771200492978, -0.008410261943936348, -0.007165052928030491, -0.045235775411129, -0.015748826786875725, 0.03662138432264328, 0.0035672166850417852, 0.028047814965248108, -0.04474585875868797, 0.029578808695077896, 0.040663208812475204, 0.06417927891016006, 0.049971651285886765, -0.04862437769770622, 0.004095409531146288, 0.0487876832485199, 0.03662138432264328, -0.011809068731963634, -0.021678877994418144, -0.03470253571867943, 0.011349771171808243, 0.023679377511143684, 0.051890499889850616, -0.04801198095083237, 0.05695298686623573, -0.010890472680330276, 0.007011953741312027, -0.03715212643146515, 0.04825693741440773, -0.08034657686948776, 0.02761913649737835, -0.0026537233497947454, 0.06136225163936615, 0.037233781069517136, -0.036233529448509216, -0.0007202051929198205, -0.0106557197868824, -0.02796616218984127, -0.03786659240722656, -0.016504118219017982, -0.023577312007546425, 0.020045818760991096, -0.009339065290987492, 0.016943003982305527, 0.051441408693790436, 0.03947923704981804, -0.0058126747608184814, 0.02251582220196724, -0.02363855205476284, -0.01430969312787056, -0.048420246690511703, 0.036907169967889786, -0.0878586545586586, -0.03851981461048126, 0.026455581188201904, 0.030824018642306328, -0.008706253953278065, -0.07054821401834488, -0.015289529226720333, -0.020882761105895042, -0.08148971945047379, 0.047767020761966705, -0.017381887882947922, 0.03692758083343506, 0.0727120190858841, -0.0028706141747534275, -0.02186259813606739, 0.011543696746230125, 0.12060151994228363, 0.0865522101521492, -0.06177051365375519, 0.016698043793439865, -0.0301912073045969, 0.03439633920788765, -0.013717708177864552, 0.02961963601410389, 0.008165302686393261, 0.018167799338698387, 0.05356438457965851, -0.009094106033444405, -0.042663708329200745, 0.021903425455093384, -0.020576562732458115, 0.03166096284985542, -0.010767992585897446, -0.020729662850499153, 0.024271361529827118, 0.028558146208524704, 0.018198419362306595, -0.0014199971919879317, 0.08736874163150787, -0.01004332210868597, 0.0839393138885498, 0.014034113846719265, 0.02553698420524597, 0.03760121762752533, -0.011900928802788258, 0.016769491136074066, 0.0665472149848938, -0.00199794746004045, 0.04494998976588249, 0.0058126747608184814, -0.0045138816349208355, -0.03874436020851135, 0.024659214541316032, 0.0006685341359116137, 0.03990791738033295, -0.004807321820408106, -0.023026153445243835, -0.016453085467219353, 0.011451836675405502, 0.02741500362753868, -0.009813672862946987, -0.08696047216653824, 0.0013141033705323935, -0.03494749590754509, 0.04070403426885605, 0.07695797830820084, -0.04507246986031532, 0.02972170151770115, -0.0028476493898779154, 0.006078047212213278, -0.03447799012064934, -0.0487876832485199, 0.05111479386687279, 0.030558645725250244, -0.03231418505311012, -0.01991313137114048, -0.05638141557574272, -0.017024656757712364, 0.00973202008754015, -0.0004104978288523853, -0.05903513729572296, 0.003801969112828374, 0.025822769850492477, -0.004554708022624254, -0.02506748028099537, -0.04478668421506882, 0.06732291728258133, 0.04768536612391472, -0.05013496056199074, 0.051645539700984955, -0.023148633539676666, -0.031783439218997955, 0.05111479386687279, 0.0068129245191812515, 0.019382387399673462, 0.018300484865903854, -0.01553448848426342, 0.013595229014754295, -0.001959672663360834, 0.08687882125377655, 0.09422759711742401, 0.00018499513680581003, -0.025802357122302055, -0.007731521036475897, 0.03952006623148918, -0.052870336920022964, 0.0007074469467625022, 0.011880515143275261, -0.035029150545597076, 0.06279117614030838, 0.06111729145050049, -0.0027047565672546625, -0.030783191323280334, -0.05450339615345001, 0.046664703637361526, -0.056748852133750916, 0.002873165998607874, -0.08291865140199661, -0.015299735590815544, 0.017330855131149292, -0.029864594340324402, -0.012441880069673061, -0.04927760362625122, 0.014136180281639099, 0.026680126786231995, 0.028537733480334282, 0.017392095178365707, -0.008910386823117733, 0.0037381777074187994, 0.0684252381324768, 0.023679377511143684, -0.02931343764066696, 0.022127971053123474, -0.03880560025572777, 0.029354263097047806, -0.05658554658293724, 0.05483000725507736, 0.023944750428199768, 0.04772619530558586, 0.02649640664458275, -0.04315362498164177, 0.04450089856982231, 0.041765522211790085, 0.035559892654418945, -0.09136974066495895, -0.02331193909049034, -0.037131715565919876, -0.057524558156728745, -0.01770850084722042, 0.0038351407274603844, -0.00920637883245945, -0.05960670858621597, 0.06871102005243301, 0.07752954959869385, -0.020403049886226654, 0.09022659808397293, -0.05123727396130562, 0.015248702839016914, -0.051972150802612305, 0.029374675825238228, -0.02086234837770462, -0.04092857986688614, 0.00964526366442442, 0.03905056044459343, 0.012564359232783318, 0.04801198095083237, 0.028251947835087776, -0.03074236400425434, 0.026659714058041573, 0.019892718642950058, -0.013411509804427624, -0.044337593019008636, -0.06499581038951874, 0.023699790239334106, -0.03574361279606819, -0.02079090289771557, -0.012380640022456646, -0.030027899891138077, 0.01903536170721054, -0.03692758083343506, -0.026761779561638832, 0.013431922532618046, 0.021719705313444138, 0.04380685091018677, 0.022719955071806908, -0.041112300008535385, 0.039785437285900116, -0.03394724428653717, -0.004291887395083904, -0.013819774612784386, 0.005312549881637096, -0.029211370274424553, 0.006021910812705755, 0.0016254056245088577, -0.06724126636981964, -0.013513576239347458, 0.019198667258024216, 0.01868833601474762, 0.04846107214689255, 0.03153848275542259, -0.028047814965248108, 0.011451836675405502, -0.008246955461800098, -0.037315431982278824, 0.012890971265733242, -0.006205630023032427, 0.013299237005412579, 0.029048064723610878, -0.04162263125181198, 0.031334348022937775, 0.0065577588975429535, 0.06511829048395157, 0.05781034380197525, -0.023271113634109497, -0.031048564240336418, -0.008925696834921837, 0.016830729320645332, -0.022454582154750824, -0.01125791110098362, -0.05099231377243996, -0.020423462614417076, 0.005445236340165138, -0.037437912076711655, 0.03164054825901985, 0.0034983218647539616, -0.011564110405743122, 0.03406972438097, -0.08185715973377228, 0.02079090289771557, 0.03604981303215027, 0.02416929602622986, -0.01474857795983553, -0.0034830118529498577, 0.020178504288196564, -0.03219170495867729, 0.05625893548130989, -0.03319195657968521, -0.050869837403297424, 0.06413844972848892, -0.007415115367621183, -0.057769518345594406, -0.011707003228366375, 0.0029165439773350954, -0.01743292063474655, 0.06405679881572723, -0.01643267087638378, 0.007119123358279467, -0.010012702085077763, -0.09014493972063065, 0.006527138873934746, 0.03049740567803383, -0.01888226345181465, -0.050216611474752426, 0.055973149836063385, -0.02851731888949871, 0.013074691407382488, -0.020331604406237602, -0.005187518894672394, 0.06083150580525398, 0.012962417677044868, 0.019229287281632423, -0.018678130581974983, 0.004595534410327673, 0.06752705574035645, 0.02151557244360447, -0.07377351075410843, 0.015503868460655212, 0.05127809941768646, -0.013676881790161133, 0.012278573587536812, 0.013003244996070862, 0.06581234186887741, -0.007001746911555529, -0.02320987358689308, 0.04735875502228737, 0.012186714448034763, 0.006205630023032427, 0.025986075401306152, 0.02441425435245037, 0.049440909177064896, 0.01060468703508377, -0.014432172290980816, -0.00685375090688467, -0.05678968131542206, -0.09659553319215775, -0.04560321569442749, 0.009553404524922371, 0.0030875049997121096, 0.012462293729186058, -0.053972650319337845, -0.019147634506225586, 0.07810112088918686, -0.013166550546884537, 0.020709248259663582, -0.02817029505968094, -0.030334100127220154, -0.04482751339673996, 0.011176258325576782, 0.0035723198670893908, 0.03460047021508217, 0.08087732642889023, 0.005771848373115063, -0.02006623148918152, -0.013431922532618046, -0.006955817341804504, 0.02884393185377121, -0.03935676068067551, -0.050869837403297424, 0.038540229201316833, -0.027782442048192024, 0.0005387185956351459, -0.006593482103198767, -0.0028833725955337286, -0.010267868638038635, -0.029333850368857384, 0.02031118981540203, -0.03580485284328461, -0.03884642943739891, -0.006353626027703285, 0.02174011804163456, -0.0872054323554039, -0.011390597559511662, 0.02086234837770462, -0.056748852133750916, -0.02549615688621998, -0.02516954578459263, 0.05613645538687706, -0.007685591001063585, 0.014881264418363571, 0.01981106586754322, 0.05225793644785881, 0.057075466960668564, -0.047767020761966705, 0.04105105996131897, -0.0184127576649189, 0.007864207029342651, -0.014462792314589024, 0.0159835796803236, -0.00854294840246439, -0.04650139808654785, -0.029109304770827293, 0.02951756864786148, -0.035335347056388855, 0.023658964782953262, 0.07291615009307861, 0.031354762613773346, -0.04605230689048767, -0.03805031254887581, 0.046542227268218994, -0.009180862456560135, -0.015595728531479836, 0.007874413393437862, 0.01793304644525051, 0.012492912821471691, 0.03331443667411804, -0.04850189760327339, 0.00047237551189027727, 0.00798158347606659, 0.00034319786936976016, -0.04535825550556183, -0.03835650905966759, -0.042663708329200745, -0.028803104534745216, 0.026108555495738983, 0.08418427407741547, -0.0026537233497947454, -0.013278823345899582, 0.03462088480591774, 0.0014174454845488071, 0.019147634506225586, -0.009262515231966972, -0.019525280222296715, 0.01720837503671646, -0.0755290538072586, -0.00829288549721241, -0.013227790594100952, -0.0015105810016393661, -0.009451338090002537, 0.011972375214099884, 0.0034115654416382313, 0.006914990954101086, -0.013421716168522835, 0.052217110991477966, -0.017198169603943825, -0.03198757395148277, -0.01898432895541191, 0.007787657435983419, 0.05193132534623146, 0.014768991619348526, 0.0002755789610091597, -0.02031118981540203, -0.013431922532618046, 0.00543502951040864, -0.03917304053902626, 0.025149133056402206, 0.03817278891801834, -0.03282451629638672, 0.030762778595089912, -0.054870832711458206, -0.03539658710360527, 0.023230286315083504, 0.014258659444749355, 0.0013319649733603, 0.03651931509375572, 0.010716959834098816, -0.02796616218984127, -0.007512078620493412, 0.004692497197538614, 0.007343668956309557, 0.009716710075736046, -0.053278598934412, 0.0003623352968133986, 0.0104209678247571, 0.009231895208358765, 0.038764774799346924, -0.007292636204510927, -0.10974166542291641, -0.01225816085934639, -0.0510331429541111, 0.007149743381887674, 0.009196172468364239, -0.03164054825901985, 0.040214117616415024, -0.04723627492785454, -0.008221439085900784, -0.028803104534745216, 0.05356438457965851, 0.049890000373125076, 0.015269116498529911, 0.026210620999336243, 0.051972150802612305, -0.01768808625638485, -0.01698382943868637, -0.03141600266098976, 0.021780945360660553, -0.006496518850326538, -0.0342126190662384, -0.04450089856982231, 0.003465150250121951, -0.0037917625159025192, 0.05005330592393875, -0.09128808230161667, -0.02894599735736847, 0.005072694271802902, -0.009328857995569706, -0.052094630897045135, -0.004860906861722469, -0.008491914719343185, -0.03259997069835663, -0.0027864095754921436, 0.006920094136148691, 0.048216111958026886, -0.01798407919704914, -0.007221189793199301, 0.012788905762135983, -0.021923838183283806, 0.006971127353608608, 0.030129967257380486, -0.028558146208524704, -0.0036845928989350796, -0.0029369574040174484, -0.0006761891418136656, -0.002231424208730459, -0.03370228782296181, -0.018657715991139412, 0.061974648386240005, -0.010012702085077763, 0.025986075401306152, 0.023373179137706757, 0.008088752627372742, -0.06699630618095398, -0.019851891323924065, 0.0216380525380373, -0.03484543040394783, 0.012666425667703152, -0.027598723769187927, 0.02863979898393154, 0.0432761050760746, -0.004587879404425621, -0.004411815200001001, 0.004712910857051611, -0.0015577867161482573, 0.07005830109119415, 0.011492663994431496, -0.04127560555934906, 0.042663708329200745, -0.008308195509016514, 0.05225793644785881, -0.037131715565919876, -0.009834086522459984, -0.02717004530131817, 0.05348273366689682, -0.04237792268395424, -0.028231535106897354, 0.025251198559999466, -0.032436665147542953, 0.09022659808397293, 0.020944001153111458, -0.0019724308513104916, 0.012717459350824356, 0.059198446571826935, -0.04282701388001442, 0.016891969367861748, -0.047440409660339355, -0.057851169258356094, -0.09259453415870667, -0.001811676542274654, -0.02463880181312561, 0.03815237805247307, 0.04137767106294632, -0.00410306453704834, 0.007256912998855114, 0.01608564704656601, -0.0063893492333590984 ]
716,085
pytorch_optimizer.optimizer.dadapt
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, momentum: float = 0.0, d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 0.0, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'k': 0, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, momentum: float = 0.0, d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 0.0)
[ 0.018310828134417534, -0.011008736677467823, -0.019997350871562958, -0.0037668782752007246, -0.02351866476237774, -0.008460418321192265, -0.07665342837572098, -0.011018003337085247, -0.037029385566711426, 0.02103521302342415, -0.020127084106206894, 0.06364309787750244, 0.04273762181401253, 0.07116758823394775, -0.03449033573269844, 0.05129997059702873, 0.01089753769338131, 0.006143764592707157, -0.029023032635450363, -0.007978553883731365, 0.007844188250601292, -0.025927985087037086, -0.010045008733868599, 0.10497219860553741, -0.022721735760569572, 0.018264494836330414, -0.030505690723657608, 0.022814402356743813, -0.03943870589137077, -0.011814932338893414, -0.01165740005671978, -0.013195657171308994, -0.022128673270344734, 0.08480804413557053, 0.033674873411655426, -0.00886351615190506, -0.013418056070804596, -0.0004392953997012228, -0.0898490846157074, 0.04670373350381851, 0.047926925122737885, -0.02046068198978901, 0.04503574222326279, -0.03940163925290108, -0.004084259737282991, 0.018459094688296318, 0.021090812981128693, 0.045628804713487625, -0.004447974264621735, -0.03219221532344818, 0.020701615139842033, -0.028318770229816437, 0.013974052853882313, -0.036454856395721436, -0.06368016451597214, 0.032544344663619995, 0.07798781991004944, 0.033693406730890274, 0.026057716459035873, -0.003002382814884186, -0.007139925844967365, -0.043441884219646454, 0.013269790448248386, -0.006190097890794277, -0.012407995760440826, -0.009387079626321793, -0.07053746283054352, -0.041996292769908905, 0.020386548712849617, 0.03280381113290787, 0.09474185854196548, -0.017606565728783607, -0.004721339326351881, 0.026817578822374344, 0.011277468875050545, -0.008029520511627197, -0.07984114438295364, -0.05660047382116318, -0.038363780826330185, -0.011333067901432514, 0.03858617693185806, 0.027558907866477966, -0.02846703678369522, -0.03543553128838539, 0.014956314116716385, -0.0382155142724514, -0.03019062615931034, -0.04210749268531799, -0.001630923943594098, 0.01690230332314968, -0.03638072311878204, -0.003463396802544594, -0.007552289869636297, -0.03222928196191788, 0.09577971696853638, 0.016457505524158478, -0.0064171296544373035, -0.03323007747530937, 0.026354247704148293, -0.004628673195838928, -0.012750860303640366, 0.022110139951109886, -0.04099549725651741, 0.0055275349877774715, 0.007997087202966213, -0.04703732952475548, -0.05971405655145645, -0.026780512183904648, 0.020757213234901428, -0.06449563056230545, -0.048112258315086365, 0.05378342419862747, -0.018032830208539963, 0.022480804473161697, -0.04614773392677307, 0.04770452529191971, 0.03634365648031235, 0.03235901519656181, 0.018338628113269806, 0.011638866737484932, 0.029375163838267326, 0.021535608917474747, -0.049669049680233, 0.04281175509095192, 0.034342069178819656, -0.011648133397102356, 0.005411702208220959, 0.01726370118558407, 0.021480010822415352, -0.03241461515426636, 0.028745034709572792, 0.0006052256794646382, -0.027558907866477966, -0.011184802278876305, 0.022314004600048065, -0.04051363468170166, 0.011963197961449623, 0.04533227160573006, -0.03854911029338837, 0.029115699231624603, 0.06468096375465393, 0.014641249552369118, 0.036732856184244156, 0.020812813192605972, -0.010499073192477226, 0.029653163626790047, -0.0215170755982399, 0.02616891637444496, -0.006500529125332832, 0.051930103451013565, -0.005407068878412247, 0.026131849735975266, 0.036473389714956284, 0.03274821117520332, 0.025631451979279518, -0.03810431435704231, -0.0007511748699471354, -0.02550172060728073, -0.012250462546944618, 0.020961079746484756, -0.03500926494598389, 0.016420438885688782, 0.020905479788780212, -0.026039183139801025, -0.01588297449052334, -0.0008953865035437047, -0.03795604780316353, -0.028226103633642197, -0.009178580716252327, 0.016707703471183777, 0.011333067901432514, -0.09577971696853638, 0.001052339794114232, 0.01618877425789833, 0.012834259308874607, 0.06078898534178734, 0.03373047336935997, 0.004878872074186802, -0.02466772496700287, -0.004026343580335379, 0.08058246970176697, 0.006241064053028822, -0.027595974504947662, -0.06386549770832062, 0.012658193707466125, 0.04147736355662346, -0.056044477969408035, 0.040661901235580444, -0.027299443259835243, 0.039512839168310165, 0.05760126933455467, -0.0019066056702286005, 0.00325953122228384, 0.017652899026870728, -0.012037331238389015, 0.019626686349511147, 0.05941752344369888, -0.005115170497447252, 0.010082075372338295, 0.06186391040682793, 0.08176859468221664, 0.03371194005012512, 0.01892242394387722, -0.03456446900963783, 0.007825654931366444, -0.022110139951109886, -0.0382525809109211, 0.0070333597250282764, -0.03219221532344818, -0.024908656254410744, -0.016976436600089073, -0.005610934458673, 0.038178447633981705, 0.031784482300281525, -0.002346769906580448, -0.03784484788775444, -0.02703997865319252, 0.010879004374146461, 0.010860471054911613, -0.029282499104738235, 0.10467566549777985, -0.024037595838308334, 0.004357624799013138, -0.002657201373949647, 0.05378342419862747, 0.0012440428836271167, 0.03727031871676445, -0.06642308831214905, -0.06419909745454788, 0.040105901658535004, -0.008108287118375301, -0.07732062041759491, -0.012936192564666271, -0.02064601518213749, 0.062456972897052765, 0.007464257068932056, -0.021832142025232315, 0.048779454082250595, -0.07687582820653915, -0.007102859206497669, 0.014974847435951233, 0.029004499316215515, 0.00623643072322011, -0.0064217629842460155, 0.023351866751909256, 0.011916864663362503, 0.04889065399765968, 0.018422028049826622, -0.05378342419862747, -0.012889859266579151, -0.04310828447341919, -0.0174490325152874, -0.012111463584005833, 0.053746357560157776, -0.02036801539361477, 0.021758008748292923, 0.03365634009242058, -0.0019957968033850193, 0.006949960254132748, -0.002217037370428443, -0.016503838822245598, 0.003495829878374934, -0.01795869693160057, 0.09548318386077881, -0.005161503795534372, 0.007269658148288727, -0.0013830420793965459, -0.02159120887517929, 0.009113714098930359, -0.005638734437525272, 0.1262483447790146, 0.03124701976776123, -0.003609345993027091, 0.0008652700344100595, -0.0036301957443356514, -0.030264759436249733, 0.007394757587462664, -0.05370929092168808, -0.022981202229857445, 0.05263436585664749, 0.015345511958003044, -0.04959491640329361, 0.018801959231495857, 0.008821816183626652, -0.016698436811566353, 0.0195896215736866, -0.03020915947854519, 0.016818903386592865, -0.0014270584797486663, 0.015030447393655777, -0.006203997880220413, 0.0025205188430845737, 0.08043420314788818, 0.043145351111888885, 0.12002117931842804, -0.005319036077708006, 0.040291234850883484, 0.006936060264706612, 0.05148530378937721, -0.005189303308725357, 0.055191949009895325, -0.028448503464460373, 0.05133703723549843, -0.003590812673792243, -0.047259729355573654, -0.04937251657247543, 0.03182154893875122, 0.029653163626790047, 0.030357426032423973, 0.05359809100627899, 0.024704791605472565, 0.021072279661893845, 0.027744241058826447, 0.031024621799588203, 0.022517871111631393, -0.06038125231862068, 0.005374635569751263, -0.0477786585688591, 0.04388668015599251, 0.04618480056524277, 0.00688509363681078, 0.036751389503479004, 0.005434868857264519, -0.02368546463549137, -0.06990732997655869, -0.06753508001565933, 0.02294413559138775, 0.035305798053741455, -0.030357426032423973, -0.0055368016473948956, -0.02331480011343956, -0.025779718533158302, 0.021331744268536568, -0.023555731400847435, -0.03104315511882305, -0.026131849735975266, 0.02159120887517929, 0.05963992327451706, -0.01056393887847662, -0.03124701976776123, 0.09881916642189026, 0.0050178710371255875, -0.01761583238840103, 0.03623246029019356, -0.018153294920921326, -0.043145351111888885, 0.031209953129291534, -0.03686258941888809, 0.04518400877714157, -0.01871855929493904, -0.0160219743847847, 0.023166533559560776, -0.02227693796157837, 0.07209425419569016, 0.04451680928468704, -0.03747418522834778, -0.022907068952918053, -0.013658988289535046, 0.029301032423973083, -0.04359015077352524, -0.022870002314448357, 0.005842599552124739, -0.04147736355662346, 0.054413553327322006, 0.017764097079634666, -0.019348688423633575, -0.0022761118598282337, -0.015419644303619862, 0.023444531485438347, 0.006834127474576235, -0.00030695655732415617, -0.0697961300611496, -0.033304207026958466, -0.008613317273557186, 0.006945326924324036, -0.012815725989639759, -0.037047918885946274, 0.018431294709444046, 0.02943076379597187, 0.003461080137640238, -0.0033313476014882326, -0.006532962433993816, 0.057378869503736496, 0.002358353231102228, -0.006857294123619795, -0.025483187288045883, 0.0041537596844136715, 0.023296266794204712, 0.06219751015305519, -0.0050642043352127075, 0.004227892495691776, -0.01185199897736311, 0.012028064578771591, 0.001405050279572606, -0.06041831895709038, 0.052041299641132355, 0.053672224283218384, 0.046407200396060944, -0.06864707171916962, -0.03076515719294548, -0.02255493775010109, -0.05152237042784691, -0.023185066878795624, 0.03851204365491867, 0.006987026426941156, -0.018403494730591774, 0.03274821117520332, 0.053079161792993546, 0.013056658208370209, 0.08384431898593903, 0.017032034695148468, -0.02236960455775261, -0.023833729326725006, 0.02331480011343956, -0.025186656042933464, -0.05185597017407417, -0.008877415210008621, -0.020108550786972046, 0.014400317333638668, 0.005175403784960508, 0.02466772496700287, 0.001961047062650323, 0.07917394489049911, 0.027688641101121902, 0.04147736355662346, 0.03880857676267624, -0.014956314116716385, 0.03221074864268303, -0.0054719350300729275, -0.0487053208053112, -0.044887475669384, 0.024315593764185905, -0.029282499104738235, -0.031117288395762444, 0.020868413150310516, 0.00278230058029294, 0.0041329097002744675, 0.016476038843393326, 0.0032016148325055838, -0.010341540910303593, 0.021442944183945656, -0.08110140264034271, 0.03688112273812294, -0.036176860332489014, -0.039512839168310165, -0.015512310899794102, 0.008154619485139847, 0.003732128534466028, -0.040105901658535004, -0.0025390521623194218, 0.04288588836789131, -0.004776939284056425, 0.03373047336935997, -0.012528461404144764, -0.019923219457268715, -0.025056922808289528, -0.02494572289288044, -0.0034240137320011854, 0.04043950140476227, -0.05207836627960205, 0.03374900668859482, 0.003822478000074625, -0.008571617305278778, -0.026298649609088898, -0.05841673165559769, 0.045443471521139145, 0.050410378724336624, -0.031877148896455765, -0.0243526604026556, -0.005342202726751566, 0.011240402236580849, 0.023852262645959854, 0.028726501390337944, -0.06393963098526001, -0.053375694900751114, 0.022295471280813217, -0.023555731400847435, -0.027447709813714027, 0.007575456518679857, -0.029894094914197922, 0.028893301263451576, -0.0688324049115181, 0.020423615351319313, 0.07939634472131729, 0.004274225328117609, -0.011990997940301895, -0.05104050785303116, 0.0065839290618896484, 0.014687581919133663, 0.029949694871902466, -0.07598622888326645, -0.00045695988228544593, 0.019645219668745995, 0.026539580896496773, 0.0009724152623675764, -0.022703202441334724, 0.015197246335446835, 0.00563410110771656, 0.05578501150012016, 0.01588297449052334, 0.005105903837829828, -0.02312946692109108, -0.025446120649576187, -0.006820227485150099, 0.027558907866477966, -0.0191077571362257, -0.07806195318698883, 0.03067249059677124, -0.043997880071401596, -0.006671961862593889, -0.019941752776503563, 0.019144823774695396, -0.028541170060634613, 0.028411436825990677, -0.06727561354637146, -0.028615301474928856, -0.05148530378937721, 0.07568969577550888, -0.013825787231326103, -0.03634365648031235, 0.03936457261443138, 0.0640878975391388, 0.01634630560874939, -0.043441884219646454, -0.00033446683664806187, 0.03132115304470062, -0.0046240403316915035, -0.06434736400842667, 0.0726131796836853, 0.035787660628557205, -0.0068758269771933556, -0.04136616364121437, -0.03537993133068085, 0.05370929092168808, -0.04069896787405014, 0.030635423958301544, 0.022814402356743813, -0.045925337821245193, -0.07313211262226105, -0.03747418522834778, 0.015280645340681076, 0.029653163626790047, 0.0348980650305748, -0.035880327224731445, -0.01548451092094183, 0.006528329104185104, -0.019923219457268715, 0.054413553327322006, -0.04670373350381851, -0.0025205188430845737, -0.005768466740846634, -0.04129203036427498, -0.05534021556377411, 0.023463064804673195, 0.024111727252602577, -0.010082075372338295, 0.025724118575453758, -0.016494572162628174, 0.05571087822318077, 0.029653163626790047, -0.034064069390296936, -0.007538389880210161, 0.00738549092784524, 0.008228752762079239, -0.007056525908410549, 0.009118347428739071, -0.012435794807970524, -0.033322740346193314, -0.08577177673578262, 0.033952873200178146, 0.0010216441005468369, -0.006922160275280476, 0.01251919474452734, 0.017069101333618164, -0.05522901564836502, 0.009085914120078087, -0.003824794664978981, 0.02455652505159378, -0.03126555308699608, -0.04796399176120758, 0.005791633389890194, -0.014548582956194878, -0.06853587180376053, -0.08755096048116684, 0.02207307331264019, 0.006810960825532675, -0.05989938974380493, 0.027744241058826447, -0.025168122723698616, -0.008024887181818485, 0.009326846338808537, 0.02589091844856739, -0.02616891637444496, -0.041329097002744675, -0.045814137905836105, 0.020145617425441742, -0.028652368113398552, -0.019997350871562958, 0.051744770258665085, 0.05697114020586014, -0.07961874455213547, -0.014085252769291401, 0.021720942109823227, 0.011360867880284786, -0.020794279873371124, -0.027670107781887054, 0.00438542477786541, 0.0554514154791832, 0.018079163506627083, -0.07858087867498398, -0.000916815537493676, -0.01414085179567337, -0.014706115238368511, -0.026780512183904648, -0.009261979721486568, -0.047074396163225174, -0.03752978518605232, 0.03133968636393547, 0.0812496691942215, -0.019923219457268715, -0.002666468033567071, -0.04788985848426819, -0.011981731280684471, 0.02713264338672161, -0.07806195318698883, -0.005629467777907848, -0.005370002705603838, -0.10734444856643677, 0.007603256497532129, -0.040661901235580444, 0.031006088480353355, -0.010350807569921017, -0.03877151012420654, -0.054339420050382614, 0.017124701291322708, 0.027966639026999474, 0.015855176374316216, 0.007005559746176004, 0.039624039083719254, -0.0035514296032488346, 0.01648530550301075, 0.05048450827598572, 0.00020618214330170304, -0.019459888339042664, -0.03652898967266083, -0.030839288607239723, -0.006648795213550329, 0.005638734437525272, 0.06382843106985092, 0.035880327224731445, -0.01921895705163479, 0.04807519167661667, -0.026539580896496773, 0.01126820221543312, -0.004818638786673546, -0.008029520511627197, 0.010934603400528431, -0.006092798430472612, 0.040105901658535004, -0.03276674449443817, -0.009451945312321186, -0.00699629308655858, 0.026743445545434952, 0.01938575506210327, 0.007793222088366747, -0.01809769682586193, -0.03537993133068085, -0.01055467315018177, -0.00845115166157484, -0.017254434525966644, -0.04336775094270706, -0.02464919164776802, -0.0121763302013278, 0.03221074864268303, 0.009915276430547237, -0.0028402169700711966, -0.026613714173436165, -0.023333333432674408, 0.03363780677318573, -0.0015753243351355195, 0.06123378127813339, 0.04166269302368164, -0.004014760255813599, -0.036158327013254166, 0.01699496991932392, -0.016800370067358017, -0.0630129724740982, 0.022091606631875038, -0.006695128045976162, -0.017782630398869514, -0.04366428405046463, -0.002349086571484804, 0.01180566567927599, -0.023055333644151688, 0.028874767944216728, -0.045925337821245193, -0.0907386764883995, -0.0525231659412384, 0.004681956488639116, -0.03526873141527176, -0.01327905710786581, 0.026910245418548584, -0.0631241723895073, 0.06549642235040665, 0.014391050674021244, 0.0358617939054966, -0.0015313078183680773, 0.0012498344294726849, -0.0011148893972858787, -0.04989144578576088, 0.0497061125934124, 0.049854379147291183, 0.03334127366542816, -0.07976701110601425, -0.00004937367339152843, 0.01303812488913536, 0.04462800920009613, -0.009590945206582546, -0.032062482088804245, 0.0027197510935366154, -0.01869075931608677, -0.03593592718243599, 0.01738416589796543, 0.009813343174755573, -0.0013807254144921899, -0.06683081388473511, -0.030820757150650024, -0.00421399250626564, 0.021906273439526558, -0.035305798053741455, 0.027558907866477966, 0.03791898116469383, -0.018959490582346916, -0.01800503022968769, 0.03113582171499729, -0.032544344663619995, 0.025168122723698616, 0.020775746554136276, 0.050299178808927536, 0.07472597062587738, -0.009090547449886799, 0.04896478354930878, -0.052226632833480835, -0.00117570161819458, -0.003975376952439547, 0.04844585433602333, -0.016411172226071358, -0.03701085224747658, 0.07042626291513443, 0.01241726242005825, 0.00946121197193861, -0.038178447633981705, -0.0027290177531540394, 0.01758803240954876, 0.03699232265353203, -0.05293089523911476, -0.015225046314299107, -0.029838494956493378, -0.06664548069238663, -0.07991527765989304, -0.005365369375795126, -0.06416203081607819, 0.08428911864757538, 0.017717765644192696, -0.00022239872487261891, 0.0477786585688591, 0.05370929092168808, 0.007297458127140999 ]
716,088
pytorch_optimizer.optimizer.dadapt
__str__
null
def __str__(self) -> str: return 'DAdaptAdaGrad'
(self) -> str
[ 0.01769145578145981, -0.021808551624417305, 0.049784135073423386, 0.00981901679188013, -0.000385439459932968, -0.039620593190193176, 0.006675208453088999, -0.023066075518727303, 0.050748810172080994, -0.03179983049631119, -0.031524211168289185, 0.007971490733325481, 0.005495204124599695, 0.02506433054804802, 0.002898332430049777, -0.011317708529531956, -0.010508069768548012, -0.0074288612231612206, 0.0009420657297596335, 0.02856127917766571, -0.0076700299978256226, -0.0027153026312589645, -0.029388144612312317, -0.004659726284444332, -0.01658896915614605, 0.03741561993956566, 0.0365198515355587, -0.03848365321755409, -0.02608068473637104, -0.0008139447891153395, -0.018449414521455765, -0.0489228181540966, -0.019259052351117134, 0.02599455416202545, -0.03669211268424988, 0.002861726563423872, -0.01891452632844448, -0.008070542477071285, -0.05918971821665764, -0.01175697986036539, 0.00883711501955986, -0.004078336991369724, 0.005357393063604832, -0.022101400420069695, -0.01893175207078457, -0.02337615005671978, -0.05247144401073456, 0.002846653340384364, -0.026838645339012146, -0.007398714777082205, 0.020292634144425392, -0.01552093680948019, -0.04595988616347313, 0.031145231798291206, -0.01434954535216093, 0.04974968358874321, 0.03414261341094971, 0.0036799779627472162, -0.005999074317514896, 0.010887050069868565, -0.01715743914246559, -0.029026390984654427, 0.0660802572965622, -0.032471660524606705, -0.024719804525375366, 0.04354820027947426, -0.028147846460342407, 0.05071435868740082, 0.026287401095032692, 0.03975840285420418, 0.023341696709394455, -0.040654174983501434, -0.009629526175558567, -0.0013458081521093845, 0.047751426696777344, -0.027131492272019386, -0.05529656633734703, -0.024082429707050323, 0.008027476258575916, -0.058983005583286285, 0.023186659440398216, -0.006235936656594276, 0.0020090225152671337, -0.009870695881545544, 0.0053401668556034565, -0.09302225708961487, -0.0285785049200058, -0.04702791944146156, -0.023031622171401978, -0.013393483124673367, -0.004058957565575838, -0.03900044411420822, -0.04551200196146965, 0.058776289224624634, -0.029164200648665428, 0.00012044983304804191, -0.0015998966991901398, -0.05119669437408447, 0.018535546958446503, 0.015210862271487713, 0.021343441680073738, -0.0029715443961322308, -0.018156567588448524, 0.007971490733325481, -0.024237466976046562, -0.06263498961925507, -0.023565638810396194, 0.02658024989068508, 0.003772569354623556, -0.01208428107202053, -0.0337291844189167, 0.006490025203675032, 0.04689010977745056, -0.0008623938774690032, -0.010559748858213425, -0.037140000611543655, 0.020120371133089066, -0.012730268761515617, 0.023996297270059586, 0.005400458816438913, 0.03672656789422035, 0.024564767256379128, -0.06773398816585541, 0.04030964523553848, 0.038242485374212265, 0.08640734106302261, -0.028836900368332863, 0.02360009215772152, 0.015253928489983082, -0.0485093854367733, 0.07269517332315445, 0.006016300991177559, -0.06580463796854019, -0.015529549680650234, 0.07152378559112549, -0.0009027681080624461, 0.05808723345398903, 0.01496969349682331, 0.04668339341878891, 0.12933538854122162, 0.001233836985193193, 0.004123556427657604, 0.03865591809153557, 0.028612958267331123, 0.0019261206034570932, 0.04654558375477791, -0.04806150123476982, 0.07414218783378601, -0.020413218066096306, 0.015874076634645462, 0.002896179212257266, 0.04726909101009369, 0.010473617352545261, -0.028010036796331406, 0.004117096308618784, -0.0337291844189167, -0.008036090061068535, -0.009982666932046413, 0.022893812507390976, -0.02637353353202343, 0.0033548306673765182, -0.04778587818145752, 0.013824141584336758, 0.021085046231746674, 0.018363283947110176, 0.00021021523571107537, -0.011205737479031086, 0.01905233785510063, -0.028389016166329384, 0.00011735447333194315, -0.017984304577112198, -0.10549413412809372, -0.0793100893497467, 0.045615360140800476, -0.01191201712936163, 0.03255779296159744, 0.012592458166182041, 0.08930137008428574, 0.0271831713616848, -0.032764505594968796, 0.02966376580297947, 0.027717188000679016, -0.04961187392473221, 0.016494225710630417, 0.0457187183201313, -0.06387528777122498, -0.007773388177156448, 0.02168796770274639, 0.04881945997476578, -0.02995661273598671, 0.02943982370197773, 0.018139339983463287, -0.03519342094659805, -0.02957763336598873, 0.007118786685168743, -0.0670449361205101, 0.0010755698895081878, -0.057811614125967026, 0.023117754608392715, 0.025477763265371323, 0.013186766766011715, 0.007829373702406883, -0.0033699036575853825, 0.05726036801934242, 0.046063244342803955, 0.001639732625335455, 0.03293677046895027, -0.032833412289619446, 0.004633886739611626, -0.027717188000679016, 0.046580035239458084, 0.034590501338243484, 0.002061778213828802, 0.03741561993956566, 0.03450436890125275, -0.044168345630168915, 0.04974968358874321, 0.009870695881545544, -0.020774971693754196, 0.024495862424373627, 0.023066075518727303, -0.041825562715530396, 0.025391632691025734, -0.011489971540868282, -0.007415941450744867, -0.025374405086040497, 0.03453882038593292, -0.019620805978775024, -0.04068862646818161, -0.016933497041463852, 0.0017172512598335743, -0.09812125563621521, -0.02682141773402691, 0.025219367817044258, 0.03800131753087044, 0.07758745551109314, -0.04933625087141991, 0.009112736210227013, -0.05667467415332794, -0.023979071527719498, -0.024564767256379128, 0.029319237917661667, -0.007256597746163607, 0.04706237465143204, 0.060464467853307724, -0.05860402435064316, -0.012015375308692455, 0.0064727989956736565, -0.04902617633342743, -0.028802448883652687, 0.04017183557152748, -0.035899702459573746, -0.00730396993458271, 0.012876692228019238, -0.0272520761936903, -0.015615681186318398, -0.019861975684762, 0.019465768709778786, 0.01564152166247368, -0.03207545354962349, -0.041239868849515915, -0.04499521106481552, -0.04689010977745056, 0.04968077689409256, 0.00008606443589087576, 0.029026390984654427, 0.01555538922548294, 0.015899915248155594, 0.011007633991539478, -0.024495862424373627, 0.0842023715376854, 0.05016311630606651, -0.06945662200450897, 0.020137596875429153, -0.009035217575728893, 0.0025753385853022337, 0.022600963711738586, 0.03076625056564808, -0.05588226020336151, -0.03631313517689705, 0.0002565110335126519, -0.05588226020336151, -0.031748153269290924, 0.06752727180719376, -0.05085216835141182, -0.022979943081736565, 0.04361710324883461, -0.03054230846464634, 0.021946363151073456, 0.04871610179543495, 0.07565810531377792, 0.039792854338884354, 0.02163628861308098, 0.015279768034815788, 0.0662180706858635, 0.0427902415394783, 0.09384912252426147, 0.02346228063106537, -0.0213262140750885, 0.035968609154224396, 0.006214404013007879, -0.040137384086847305, 0.0227215476334095, -0.013324577361345291, -0.07703620940446854, -0.03755342960357666, 0.016451159492135048, -0.03083515726029873, 0.032247718423604965, 0.012394354678690434, -0.029267558827996254, 0.040585268288850784, 0.0225837379693985, 0.08875012397766113, -0.01496969349682331, 0.023720676079392433, -0.004668339155614376, -0.009250546805560589, 0.0394483283162117, 0.04747580736875534, -0.03807022050023079, 0.03097296692430973, -0.020688839256763458, -0.01460793986916542, 0.010292740538716316, 0.004758777562528849, -0.02921587973833084, 0.031972095370292664, 0.02594287507236004, 0.030869608744978905, -0.08006805181503296, -0.052333634346723557, 0.05071435868740082, -0.02499542571604252, -0.015727652236819267, 0.010344419628381729, 0.0455809086561203, -0.033574145287275314, -0.040723077952861786, -0.02105059288442135, 0.0727640762925148, -0.005835424177348614, -0.035761892795562744, 0.05574445053935051, 0.013970565050840378, 0.031662020832300186, -0.03054230846464634, -0.025253821164369583, 0.03324684500694275, 0.0275276992470026, -0.04027519375085831, -0.010344419628381729, -0.004302279558032751, 0.048027049750089645, 0.047682520002126694, 0.023772355169057846, -0.022463154047727585, 0.044168345630168915, -0.009440036490559578, 0.0021619063336402178, -0.022032495588064194, -0.0635652095079422, -0.0034215827472507954, 0.041308775544166565, -0.007958571426570415, -0.007084334269165993, -0.03975840285420418, -0.022842133417725563, 0.06442652642726898, -0.01663203537464142, -0.01652006432414055, 0.014659618958830833, -0.018828393891453743, -0.024581992998719215, -0.03527955338358879, 0.03786350414156914, 0.03216158598661423, 0.003139501204714179, 0.0012941291788592935, -0.017519192770123482, 0.003888847306370735, -0.022221984341740608, 0.0002096769167110324, 0.07510685920715332, 0.009517555125057697, -0.014401224441826344, 0.011317708529531956, 0.004487462807446718, 0.003802715567871928, -0.029715444892644882, -0.005249728448688984, -0.03603751212358475, -0.0020036392379552126, 0.0012402967549860477, -0.055641092360019684, -0.07455562055110931, -0.004250600468367338, 0.001423326670192182, -0.06459879130125046, 0.007614044472575188, -0.01701962761580944, -0.048681650310754776, -0.026718059554696083, 0.008974925614893436, -0.03241997957229614, -0.0057019200176000595, 0.021257309243083, 0.040068477392196655, -0.020585481077432632, -0.004250600468367338, 0.006963749881833792, 0.0028380402363836765, -0.04334148392081261, 0.008130834437906742, 0.039620593190193176, 0.026976455003023148, -0.06566682457923889, -0.03486612066626549, -0.031662020832300186, -0.006649368908256292, -0.010887050069868565, 0.018535546958446503, 0.01077507808804512, 0.046855658292770386, -0.014246187172830105, 0.017002401873469353, 0.01695072278380394, 0.08330660313367844, 0.04668339341878891, 0.01216179970651865, -0.0337291844189167, 0.04099870100617409, 0.0006583693320862949, -0.049715232104063034, -0.0033548306673765182, -0.04857829213142395, -0.019810296595096588, 0.0005991538055241108, -0.011636395938694477, -0.01900065876543522, 0.04375491663813591, -0.05595116689801216, 0.007045574951916933, -0.004140782635658979, -0.011541650630533695, -0.04623550921678543, -0.04354820027947426, -0.01891452632844448, -0.00158374710008502, -0.03324684500694275, -0.016761234030127525, 0.04344484210014343, 0.009982666932046413, -0.01183449849486351, 0.03841474652290344, -0.019706938415765762, -0.012936985120177269, -0.08061929047107697, 0.03440101072192192, 0.019086789339780807, -0.03519342094659805, 0.010421938262879848, -0.056502409279346466, 0.03243720531463623, 0.0244614090770483, 0.018018756061792374, 0.03009442426264286, 0.0036067659966647625, -0.05033537745475769, -0.00399005226790905, 0.020430443808436394, -0.028165074065327644, 0.005210969131439924, -0.042652428150177, -0.00863470509648323, 0.056950293481349945, -0.03720890358090401, 0.0068302457220852375, 0.024065203964710236, -0.0076700299978256226, -0.030215008184313774, -0.08158396929502487, 0.0030662892386317253, 0.07986133545637131, -0.011231577023863792, 0.04537419229745865, -0.07283298671245575, 0.011403840035200119, -0.04806150123476982, -0.004158008843660355, 0.02301439642906189, -0.0068388585932552814, -0.04720018431544304, -0.0019067410612478852, -0.02360009215772152, 0.05150676891207695, 0.00891463365405798, -0.06769953668117523, -0.08096382021903992, 0.03727781027555466, 0.02490929514169693, -0.028440695255994797, -0.03879372775554657, -0.014625166542828083, 0.05223027616739273, -0.032609470188617706, -0.010396098718047142, 0.01421173382550478, -0.0075537520460784435, -0.03810467571020126, -0.025184916332364082, -0.026115138083696365, 0.04368600994348526, 0.05574445053935051, 0.026993682608008385, -0.009293613024055958, 0.011162671260535717, 0.03083515726029873, -0.013453775085508823, 0.013272898271679878, -0.034728311002254486, -0.011972309090197086, -0.051024433225393295, -0.04816485941410065, -0.023427829146385193, 0.05247144401073456, -0.011309095658361912, 0.009577848017215729, -0.025805063545703888, 0.08199740201234818, 0.03238552808761597, 0.04926734417676926, 0.030352819710969925, 0.07538248598575592, -0.0142892524600029, 0.0723506435751915, -0.047303542494773865, 0.004399177618324757, -0.009190254844725132, 0.0013511914294213057, 0.0037768760230392218, -0.03241997957229614, 0.016485610976815224, -0.03965504467487335, 0.04785478487610817, -0.008303098380565643, 0.005891409702599049, 0.012566618621349335, 0.057535991072654724, -0.034004803746938705, 0.008854340761899948, 0.009147188626229763, -0.053952910006046295, -0.03734671324491501, 0.014719911850988865, 0.10129090398550034, -0.0010841831099241972, 0.016261668875813484, 0.050507642328739166, -0.008716530166566372, -0.05639905110001564, -0.05119669437408447, 0.09247101843357086, 0.04513302445411682, 0.00883711501955986, 0.02533995360136032, -0.010309967212378979, 0.03545181825757027, -0.005124837625771761, -0.06566682457923889, -0.015228088945150375, -0.08337550610303879, 0.024857616052031517, 0.04375491663813591, -0.08123943954706192, 0.043134767562150955, 0.06167031452059746, -0.001138015417382121, -0.03105909936130047, 0.007695869542658329, -0.01987920142710209, 0.03920716047286987, -0.004345345310866833, -0.02323833853006363, -0.015486483462154865, 0.023496733978390694, 0.001516995020210743, 0.01161055639386177, 0.032471660524606705, -0.08613172173500061, -0.06043001636862755, -0.012592458166182041, -0.02008591778576374, -0.017622550949454308, 0.009991279803216457, -0.03464217856526375, -0.037071093916893005, -0.009164415299892426, 0.031662020832300186, 0.003802715567871928, 0.0017861565575003624, 0.017071306705474854, 0.008070542477071285, 0.026356307789683342, 0.05667467415332794, 0.0662180706858635, 0.040068477392196655, 0.011808658950030804, -0.03248888626694679, -0.025253821164369583, 0.0067096613347530365, 0.020637160167098045, -0.014306479133665562, -0.026838645339012146, -0.008931859396398067, -0.03271282836794853, 0.022842133417725563, -0.010129090398550034, -0.037656787782907486, 0.08316878974437714, 0.0002312098367838189, 0.05243699252605438, -0.04582207649946213, 0.041756659746170044, -0.012222091667354107, 0.02871631644666195, -0.0028531132265925407, -0.0180532094091177, 0.03803576901555061, -0.07145487517118454, 0.019689712673425674, 0.015279768034815788, -0.011593329720199108, -0.08806107193231583, -0.04110205918550491, 0.011619169265031815, 0.03398757800459862, 0.023996297270059586, -0.013272898271679878, 0.01493524108082056, -0.022738775238394737, 0.05588226020336151, -0.030628440901637077, 0.04327257722616196, -0.02416856214404106, 0.0034388089552521706, -0.08475361764431, -0.06208374723792076, -0.028836900368332863, -0.024943746626377106, -0.04626996070146561, 0.019104016944766045, -0.010938729159533978, 0.0000226095780817559, 0.016149697825312614, -0.016967948526144028, -0.02644243836402893, 0.02556389570236206, -0.04027519375085831, -0.007958571426570415, -0.009560621343553066, -0.030421724542975426, 0.028888579457998276, -0.018363283947110176, 0.07145487517118454, 0.021171176806092262, 0.001974569633603096, -0.006003381218761206, 0.0033720568753778934, -0.06394419074058533, -0.04950851574540138, 0.03138640150427818, 0.01527115423232317, -0.03975840285420418, -0.016812913119792938, 0.02096446044743061, 0.04816485941410065, 0.00856580026447773, 0.09998170286417007, -0.031007420271635056, 0.019396863877773285, 0.003486181376501918, 0.024943746626377106, -0.040654174983501434, 0.02249760553240776, 0.03421152010560036, -0.0786210373044014, -0.00960368663072586, 0.002061778213828802, -0.01398779172450304, -0.0851670503616333, -0.049646325409412384, -0.008729450404644012, -0.029129749163985252, 0.08992151916027069, -0.025908421725034714, -0.016494225710630417, 0.014702685177326202, -0.03807022050023079, -0.025667253881692886, 0.02623572200536728, 0.02745879255235195, -0.017777588218450546, 0.04833712428808212, 0.02425469271838665, -0.011240189895033836, 0.010999021120369434, -0.001765700289979577, -0.020998913794755936, -0.05216136947274208, 0.0724884569644928, 0.03937942534685135, -0.04668339341878891, 0.04075752943754196, 0.042928051203489304, -0.056433506309986115, -0.028389016166329384, 0.01552093680948019, -0.007054188288748264, 0.010585588403046131, -0.017880946397781372, 0.0009458339773118496, 0.004745857790112495, 0.020413218066096306, 0.01085259672254324, 0.04637331888079643, -0.02082665078341961, -0.0076011247001588345, -0.049853041768074036, -0.02930201217532158, 0.007295357063412666, 0.03105909936130047, -0.024530313909053802, 0.02468535117805004, 0.00035260175354778767, 0.03538291156291962, 0.05367729067802429, 0.03769124299287796, 0.05850066617131233, 0.05722591653466225, 0.01994810625910759, 0.028010036796331406, -0.0013501147041097283, -0.011645008809864521, -0.014418450184166431, 0.05112779140472412, -0.008750982582569122, 0.02263541705906391, -0.0393105186522007, 0.010284127667546272, 0.09329788386821747, 0.04937070235610008, -0.018001530319452286, 0.03755342960357666, 0.02871631644666195, -0.08220411837100983, 0.026649154722690582, -0.0024418344255536795, 0.012713042087852955, -0.04044745862483978, 0.034969478845596313, -0.031748153269290924, 0.025305500254034996, -0.011860338039696217, -0.018811168149113655, 0.04740690067410469, -0.03741561993956566, -0.02621849626302719 ]
716,109
pytorch_optimizer.optimizer.dadapt
reset
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] device = group['params'][0].device d, lr = group['d'], group['lr'] d_lr: float = d * lr g_sq = torch.tensor([0.0], device=device) sk_sq_weighted_change = torch.tensor([0.0], device=device) sk_l1_change = torch.tensor([0.0], device=device) if 'gsq_weighted' not in group: group['gsq_weighted'] = torch.tensor([0.0], device=device) if 'sk_sq_weighted' not in group: group['sk_sq_weighted'] = torch.tensor([0.0], device=device) if 'sk_l1' not in group: group['sk_l1'] = torch.tensor([0.0], device=device) gsq_weighted = group['gsq_weighted'] sk_sq_weighted = group['sk_sq_weighted'] sk_l1 = group['sk_l1'] for group in self.param_groups: eps = group['eps'] for p in group['params']: if p.grad is None: continue grad = p.grad state = self.state[p] if 'alpha_k' not in state: state['alpha_k'] = torch.full_like(p, fill_value=1e-6) state['sk'] = torch.zeros_like(p) state['x0'] = torch.clone(p) if grad.is_sparse: state['weighted_sk'] = torch.zeros_like(p) sk, alpha_k = state['sk'], state['alpha_k'] if grad.is_sparse: weighted_sk = state['weighted_sk'] grad = grad.coalesce() vk = grad._values().pow(2) sk_masked = sk.sparse_mask(grad).coalesce() old_sk_l1_masked = sk_masked._values().abs().sum() sk.add_(grad, alpha=d_lr) sk_masked = sk.sparse_mask(grad).coalesce() alpha_k_masked = alpha_k.sparse_mask(grad).coalesce() weighted_sk_masked = weighted_sk.sparse_mask(grad).coalesce() # update alpha before step alpha_k_p1_masked = alpha_k_masked._values() + vk alpha_k_delta_masked = alpha_k_p1_masked - alpha_k_masked._values() alpha_k_delta = torch.sparse_coo_tensor(grad.indices(), alpha_k_delta_masked, grad.shape) alpha_k.add_(alpha_k_delta) de_nom = torch.sqrt(alpha_k_p1_masked + eps) grad_sq = vk.div(de_nom).sum() g_sq.add_(grad_sq) # update weighted sk sq tracking weighted_sk_p1_masked = sk_masked._values().pow(2).div(de_nom) sk_sq_weighted_change.add_(weighted_sk_p1_masked.sum() - weighted_sk_masked._values().sum()) weighted_sk_p1_delta_masked = weighted_sk_p1_masked - weighted_sk_masked._values() weighted_sk_p1_delta = torch.sparse_coo_tensor( grad.indices(), weighted_sk_p1_delta_masked, grad.shape ) weighted_sk.add_(weighted_sk_p1_delta) sk_l1_masked = sk_masked._values().abs().sum() sk_l1_change.add_(sk_l1_masked - old_sk_l1_masked) else: self.apply_weight_decay( p=p, grad=grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) old_sk_sq_weighted_param = sk.pow(2).div(torch.sqrt(alpha_k) + eps).sum() old_sk_l1_param = sk.abs().sum() alpha_k.add_(grad.pow(2)) grad_sq = grad.pow(2).div(torch.sqrt(alpha_k) + eps).sum() g_sq.add_(grad_sq) sk.add_(grad, alpha=d_lr) sk_sq_weighted_param = sk.pow(2).div(torch.sqrt(alpha_k) + eps).sum() sk_l1_param = sk.abs().sum() sk_sq_weighted_change.add_(sk_sq_weighted_param - old_sk_sq_weighted_param) sk_l1_change.add_(sk_l1_param - old_sk_l1_param) sk_sq_weighted.add_(sk_sq_weighted_change) gsq_weighted.add_(g_sq, alpha=d_lr ** 2) # fmt: skip sk_l1.add_(sk_l1_change) if sk_l1 == 0: return loss if lr > 0.0: d_hat = (sk_sq_weighted - gsq_weighted) / sk_l1 d = group['d'] = max(d, min(d_hat.item(), d * group['growth_rate'])) for group in self.param_groups: group['gsq_weighted'] = gsq_weighted group['sk_sq_weighted'] = sk_sq_weighted group['sk_l1'] = sk_l1 group['d'] = d for p in group['params']: if p.grad is None: continue grad = p.grad state = self.state[p] alpha_k, sk, x0 = state['alpha_k'], state['sk'], state['x0'] if grad.is_sparse: grad = grad.coalesce() sk_masked = sk.sparse_mask(grad).coalesce()._values() alpha_k_masked = alpha_k.sparse_mask(grad).coalesce()._values() x0_masked = x0.sparse_mask(grad).coalesce()._values() p_masked = p.sparse_mask(grad).coalesce()._values() loc_masked = x0_masked - sk_masked.div(torch.sqrt(alpha_k_masked + group['eps'])) loc_delta_masked = loc_masked - p_masked loc_delta = torch.sparse_coo_tensor(grad.indices(), loc_delta_masked, grad.shape) p.add_(loc_delta) else: z = x0 - sk.div(alpha_k.sqrt().add_(group['eps'])) if group['momentum'] > 0.0: p.mul_(group['momentum']).add_(z, alpha=1.0 - group['momentum']) else: p.copy_(z) group['k'] += 1 return loss
(self)
[ -0.008889179676771164, -0.05192222818732262, -0.012244697660207748, 0.06652167439460754, -0.011096757836639881, -0.001320867333561182, -0.050862591713666916, -0.029002666473388672, 0.010341275483369827, -0.0014324727235361934, -0.03579219430685043, 0.004194397944957018, 0.05070560798048973, 0.06632544845342636, -0.02168331854045391, 0.04819387570023537, 0.0049498798325657845, 0.019063660874962807, 0.049371249973773956, -0.018690824508666992, -0.022782202810049057, -0.07696107029914856, 0.0175428856164217, 0.08021847158670425, -0.0478406623005867, -0.023331644013524055, 0.032161954790353775, -0.003546841675415635, -0.02211502380669117, -0.010056743398308754, -0.029630599543452263, -0.04717348515987396, 0.02933625504374504, 0.009340506978332996, 0.04167906939983368, -0.03708730638027191, 0.01945611834526062, -0.001325773075222969, -0.06189066916704178, -0.05360979959368706, 0.011469593271613121, -0.027727177366614342, 0.020800288766622543, -0.029905321076512337, 0.0016838912852108479, 0.04815462976694107, -0.034183114767074585, 0.07837391644716263, -0.003551747417077422, 0.004844406619668007, 0.04297418147325516, -0.04756594076752663, 0.007863882929086685, 0.008575213141739368, -0.020133109763264656, 0.024940723553299904, 0.05494415760040283, -0.02849247120320797, 0.03732278198003769, -0.08524193614721298, 0.09152127057313919, -0.0489002987742424, 0.01787647418677807, 0.03167138248682022, -0.02170294150710106, -0.03777410835027695, -0.04540742188692093, -0.03218157961964607, 0.01647343672811985, 0.03133779391646385, 0.018553465604782104, 0.003985904157161713, 0.015109643340110779, -0.0053423382341861725, -0.04615309089422226, -0.014648504555225372, -0.013569245114922523, -0.05879024788737297, -0.008575213141739368, -0.07154514640569687, 0.02358674257993698, 0.009262015111744404, -0.023449381813406944, -0.02158520556986332, -0.007054437417536974, 0.003424198366701603, 0.020231224596500397, 0.002284843008965254, -0.0020236128475517035, -0.030749104917049408, -0.0007505764369852841, 0.04352362081408501, 0.029198896139860153, 0.05027390271425247, 0.0658544972538948, 0.029846452176570892, -0.025784509256482124, -0.06730659306049347, -0.025549033656716347, -0.024293167516589165, 0.027766423299908638, 0.02539204992353916, 0.010007685981690884, 0.04952823370695114, 0.03759750351309776, -0.060438573360443115, -0.02156558260321617, 0.0013907740358263254, 0.0233905129134655, -0.0552581250667572, -0.025235066190361977, -0.015600216574966908, -0.027982274070382118, -0.015963239595294, -0.039500925689935684, -0.04658479616045952, -0.0351053923368454, 0.009850702248513699, -0.04454401507973671, 0.040226973593235016, 0.0489395447075367, 0.00549932150170207, -0.0626755878329277, -0.0014766242820769548, 0.006823868025094271, 0.0008977482793852687, 0.05031314864754677, 0.03479142487049103, 0.06628619879484177, -0.05753438174724579, -0.026392819359898567, 0.016336075961589813, -0.017935343086719513, 0.02582375332713127, 0.018161006271839142, -0.03355518355965614, -0.011155626736581326, 0.025038838386535645, 0.017052311450242996, 0.014148120768368244, 0.029179273173213005, 0.012666590511798859, -0.006406881380826235, -0.014383595436811447, 0.035340867936611176, 0.009541641920804977, 0.04266021400690079, 0.0180530808866024, -0.018975356593728065, -0.018975356593728065, 0.018641768023371696, 0.030886465683579445, 0.02191879414021969, -0.016071166843175888, -0.020898403599858284, -0.01604173146188259, -0.02680489979684353, -0.0016924763331189752, 0.006504995748400688, -0.04101188853383064, -0.027805669233202934, -0.039697155356407166, -0.02370448037981987, -0.028433602303266525, 0.014000948518514633, 0.027589816600084305, -0.002972871297970414, 0.0414435938000679, -0.02656942419707775, 0.0002840723318513483, 0.009286544285714626, -0.05561133846640587, 0.01721910573542118, 0.050116922706365585, -0.04160057753324509, 0.08798914402723312, 0.005641587544232607, -0.012333001010119915, -0.022370120510458946, -0.039500925689935684, 0.014324726536870003, -0.015403986908495426, 0.0034266512375324965, -0.03496803343296051, 0.0014692656695842743, 0.04564289748668671, 0.021428221836686134, 0.0001634220825508237, 0.022703710943460464, 0.02488185465335846, 0.007814825512468815, -0.03018004074692726, 0.015001717023551464, -0.02095727249979973, -0.018739882856607437, 0.04430853947997093, 0.04387683421373367, -0.008683139458298683, 0.024646379053592682, 0.01880856230854988, -0.0045132702216506, -0.028786813840270042, -0.004388174042105675, -0.0022345592733472586, -0.02743283286690712, -0.040030743926763535, -0.013912646099925041, 0.06954360753297806, 0.0022725786548107862, 0.030454762279987335, -0.04866482689976692, 0.017385901883244514, 0.02933625504374504, 0.07696107029914856, 0.04803689196705818, -0.057887595146894455, -0.019299134612083435, 0.04623158276081085, 0.035026900470256805, -0.00840351264923811, -0.03359442949295044, -0.043013427406549454, 0.0034977842587977648, 0.012333001010119915, 0.039599038660526276, -0.039599038660526276, 0.05667097494006157, -0.019014602527022362, 0.0038657139521092176, -0.03840204328298569, 0.05255016312003136, -0.05659248307347298, 0.038225434720516205, -0.004199303686618805, 0.030140794813632965, 0.028570961207151413, -0.03516425937414169, 0.0006996794836595654, -0.012568475678563118, -0.022370120510458946, -0.03997187316417694, -0.04446552321314812, -0.023115791380405426, 0.0212516151368618, -0.016453813761472702, 0.037263911217451096, 0.06322503089904785, 0.02401844598352909, -0.0031936292070895433, 0.04128661006689072, -0.02539204992353916, -0.023331644013524055, -0.049175020307302475, 0.02605922892689705, -0.07397838681936264, -0.0744885802268982, 0.0521184578537941, 0.017670433968305588, 0.02317466028034687, -0.0701715424656868, -0.02223276160657406, -0.01968178153038025, -0.07130967080593109, 0.046624042093753815, -0.026824522763490677, 0.019112717360258102, 0.05910421535372734, 0.0016789855435490608, -0.0041036419570446014, 0.011803182773292065, 0.10109724849462509, 0.0840645581483841, -0.05388452112674713, 0.0095710763707757, -0.02539204992353916, 0.021840302273631096, -0.02305692248046398, 0.036204274743795395, 0.01020391471683979, 0.0024258827324956656, 0.07711804658174515, -0.005484604276716709, -0.047251977026462555, 0.013981325551867485, -0.03432047739624977, 0.027295472100377083, -0.02007424086332321, -0.0425424762070179, 0.03337857499718666, -0.0013539810897782445, 0.00263192318379879, -0.001309829531237483, 0.07452782243490219, -0.013412261381745338, 0.09128579497337341, 0.004282700829207897, 0.008168037980794907, 0.03306460753083229, -0.0037725050933659077, 0.018268931657075882, 0.08618383854627609, -0.010586561635136604, 0.037165798246860504, -0.0010001553455367684, 0.009909571148455143, -0.023135414347052574, 0.03335895389318466, -0.01301980298012495, 0.017925530672073364, -0.024921100586652756, -0.02615734376013279, -0.0075597274117171764, 0.025804130360484123, 0.015099831856787205, -0.010772979818284512, -0.08037545531988144, -0.009085409343242645, -0.04266021400690079, 0.04105113446712494, 0.08359361439943314, -0.03761712461709976, 0.001921819057315588, 0.0045623271726071835, 0.031102318316698074, -0.030258532613515854, -0.04913577437400818, 0.057455889880657196, 0.026942260563373566, -0.03371216729283333, -0.034085001796483994, -0.06518732011318207, -0.011685444973409176, 0.02509770728647709, 0.006338200997561216, -0.07264402508735657, 0.012774516828358173, 0.028453225269913673, -0.0013061502249911427, -0.009124654345214367, -0.04658479616045952, 0.07955129444599152, 0.03314309939742088, -0.05227544158697128, 0.048743318766355515, -0.009335600771009922, -0.02105538547039032, 0.054590944200754166, 0.0033579710870981216, 0.031651757657527924, 0.016718722879886627, -0.01483492273837328, 0.008428041823208332, -0.001729269279167056, 0.07939431071281433, 0.08539891988039017, 0.029061535373330116, -0.02146746776998043, -0.016031920909881592, 0.032986119389534, -0.04579988121986389, 0.029728714376688004, 0.020800288766622543, -0.034497082233428955, 0.08312266319990158, 0.07747126370668411, -0.01164619904011488, -0.016434190794825554, -0.0414828397333622, 0.04988144710659981, -0.05239317938685417, 0.005553284659981728, -0.0744100883603096, -0.0180628914386034, 0.0382646806538105, -0.037695616483688354, -0.000009682106792752165, -0.051608260720968246, 0.005401207134127617, 0.04132585600018501, 0.01773911342024803, 0.03494840860366821, -0.009531830437481403, -0.020800288766622543, 0.07040701061487198, 0.034516703337430954, -0.032495543360710144, 0.010302029550075531, -0.06138047203421593, 0.02755057066679001, -0.06247935816645622, 0.07923732697963715, 0.02784491516649723, 0.06899416446685791, 0.008526155725121498, -0.026628293097019196, 0.0489002987742424, 0.03989338502287865, 0.027609439566731453, -0.07790296524763107, -0.005764230620115995, -0.03388877213001251, -0.05019541457295418, -0.02890455164015293, -0.00779029680415988, -0.021526336669921875, -0.07079946994781494, 0.04124736413359642, 0.05945742875337601, -0.015070397406816483, 0.08618383854627609, -0.049802955240011215, 0.006004611495882273, -0.057455889880657196, -0.00526384636759758, -0.02105538547039032, -0.06365673243999481, 0.016394944861531258, 0.039697155356407166, 0.01585531421005726, 0.04509345442056656, 0.028649453073740005, -0.020584436133503914, 0.042267754673957825, 0.027256226167082787, -0.024430526420474052, -0.04352362081408501, -0.0702500268816948, 0.008344643749296665, -0.019632725045084953, 0.004684970714151859, -0.029198896139860153, -0.03836279734969139, 0.0276290625333786, -0.03382990136742592, -0.021526336669921875, 0.009477866813540459, 0.00690726563334465, 0.037381649017333984, 0.02305692248046398, -0.024430526420474052, 0.029591353610157967, -0.019691593945026398, -0.021526336669921875, 0.0007597747026011348, 0.0033285366371273994, -0.030886465683579445, 0.0063676354475319386, -0.01829836703836918, -0.07072097808122635, 0.0019671970512717962, 0.0036523148883134127, 0.03202459588646889, 0.05435546860098839, 0.027040375396609306, 0.0051412032917141914, 0.020859157666563988, -0.0361061617732048, -0.03381028026342392, -0.006706130690872669, -0.007971808314323425, 0.006627638824284077, 0.03245629742741585, -0.045760635286569595, 0.038755252957344055, 0.02062368206679821, 0.01977008581161499, 0.05090183764696121, 0.007942373864352703, -0.023881085216999054, -0.01976027339696884, 0.006593299098312855, -0.036714471876621246, -0.001833515940234065, -0.037695616483688354, -0.0090265404433012, -0.014452275820076466, -0.05749513581395149, 0.028315864503383636, 0.002715320559218526, -0.02209540084004402, 0.02274295687675476, -0.06503033638000488, 0.027491701766848564, 0.03891223669052124, 0.011214494705200195, -0.007736333645880222, 0.003075891640037298, 0.011214494705200195, -0.005754419602453709, 0.06177293136715889, -0.0435628667473793, -0.05690645053982735, 0.06495184451341629, 0.004635913297533989, -0.06177293136715889, -0.007868788205087185, 0.018043268471956253, -0.010478636249899864, 0.06220463663339615, -0.007648030761629343, 0.0033481596037745476, 0.022272007539868355, -0.08948048204183578, 0.012676401995122433, 0.016542116180062294, -0.014540579169988632, -0.035458605736494064, 0.04497571662068367, -0.02923814207315445, 0.030258532613515854, -0.0017893643816933036, -0.01798439957201481, 0.0584370382130146, -0.003733259392902255, 0.008638987317681313, -0.03349631279706955, 0.01659117266535759, 0.07558746635913849, 0.020044805482029915, -0.06942586600780487, 0.011577518656849861, 0.03793109208345413, 0.0010050610871985555, 0.017297597602009773, 0.004405343905091286, 0.06652167439460754, -0.002351070288568735, -0.0196523480117321, 0.03116118721663952, 0.008913708850741386, 0.004250813741236925, 0.021742187440395355, 0.015659084543585777, 0.045878373086452484, 0.009394469670951366, -0.02350825071334839, -0.025470541790127754, -0.07319346815347672, -0.10455088317394257, -0.05431622639298439, 0.01572776585817337, -0.015060585923492908, 0.01625758409500122, -0.02933625504374504, -0.03008192591369152, 0.06632544845342636, -0.004660442005842924, 0.01493303757160902, -0.040894150733947754, -0.021192746236920357, -0.047055747359991074, 0.0207414198666811, 0.0017059670062735677, 0.03155364468693733, 0.08791065216064453, 0.012264320626854897, -0.011469593271613121, -0.005656304769217968, -0.009988063015043736, 0.030906088650226593, -0.045132700353860855, -0.06255784630775452, 0.031200433149933815, -0.032063841819763184, -0.01636550948023796, -0.006328389514237642, 0.0022922016214579344, -0.01169525645673275, -0.02242898941040039, 0.009968440048396587, -0.030454762279987335, -0.007491047028452158, -0.003237780649214983, 0.016453813761472702, -0.06946511566638947, -0.023037301376461983, 0.0249799694865942, -0.055218879133462906, -0.02668716199696064, -0.01190129667520523, 0.049175020307302475, -0.010351086966693401, 0.028963420540094376, 0.02478373982012272, 0.043327394872903824, 0.07805994898080826, -0.07590142637491226, 0.04218926280736923, -0.026000360026955605, 0.03335895389318466, -0.023979200050234795, 0.01670891046524048, -0.030238909646868706, -0.05345281586050987, -0.023351266980171204, 0.019858388230204582, -0.01891648955643177, 0.013677170500159264, 0.057573627680540085, 0.033633675426244736, -0.04976370930671692, -0.020015371963381767, 0.05133354291319847, -0.005283469334244728, -0.03239743039011955, 0.0007223684806376696, 0.010910339653491974, 0.036302391439676285, 0.03155364468693733, -0.03133779391646385, -0.011626576073467731, -0.011204683221876621, 0.007721616420894861, -0.04156133159995079, -0.04293493553996086, -0.03732278198003769, -0.03486991673707962, 0.017670433968305588, 0.08123885840177536, -0.022703710943460464, -0.02521544322371483, 0.028531717136502266, -0.01057675015181303, 0.010753356851637363, 0.007353686727583408, -0.019299134612083435, 0.032495543360710144, -0.0850064605474472, -0.022998055443167686, -0.02957173064351082, -0.02562752552330494, -0.014206989668309689, 0.025254689157009125, -0.03222082555294037, 0.027982274070382118, -0.0033236308954656124, 0.04972446337342262, 0.0027889066841453314, -0.04352362081408501, -0.034595195204019547, -0.005366866942495108, 0.058633264154195786, 0.012725459411740303, -0.007108400575816631, -0.02796265110373497, -0.005631776060909033, -0.011028077453374863, -0.01997612603008747, 0.031121941283345222, 0.028963420540094376, -0.031651757657527924, 0.03575294837355614, -0.05031314864754677, -0.020133109763264656, 0.02680489979684353, 0.008168037980794907, 0.008442758582532406, 0.019289324060082436, 0.018416104838252068, -0.04199303314089775, -0.01239186991006136, 0.013451507315039635, -0.00030860098195262253, 0.016757968813180923, -0.048429351300001144, -0.014383595436811447, 0.021761810407042503, -0.012323189526796341, 0.023017678409814835, -0.009345412254333496, -0.108396977186203, -0.01890667714178562, -0.06663941591978073, 0.005675927735865116, 0.008344643749296665, -0.03008192591369152, 0.03530162200331688, -0.045446667820215225, -0.017513450235128403, -0.01879875175654888, 0.04819387570023537, 0.04399457201361656, -0.005440452601760626, 0.042267754673957825, 0.061301980167627335, -0.00031105385278351605, -0.011243929155170918, -0.025156574323773384, 0.017032688483595848, -0.0013748303754255176, -0.03473255783319473, -0.033849526196718216, -0.0028207937721163034, 0.030140794813632965, 0.0372246652841568, -0.08155282586812973, -0.03304498642683029, -0.008884274400770664, 0.00380193954333663, -0.04560365155339241, 0.0030464574228972197, -0.02709924429655075, -0.021840302273631096, -0.018474973738193512, -0.006176311988383532, 0.046741779893636703, -0.006706130690872669, -0.019171586260199547, 0.01025297213345766, -0.002409938955679536, -0.00967900175601244, 0.019593479111790657, -0.04933200404047966, -0.007294818293303251, -0.020466698333621025, -0.00497195590287447, -0.03498765453696251, -0.03410462290048599, -0.03426160663366318, 0.053021110594272614, 0.0031298547983169556, 0.01829836703836918, 0.021408598870038986, -0.005710267927497625, -0.06314653903245926, -0.003703824942931533, 0.0478406623005867, -0.03441859036684036, 0.016247771680355072, -0.016973819583654404, 0.018219875171780586, 0.030121171846985817, -0.011989600025117397, -0.0017354014562442899, 0.008849933743476868, -0.010184291750192642, 0.06648243218660355, 0.013314146548509598, -0.0489395447075367, 0.025666771456599236, 0.007363498210906982, 0.048978790640830994, -0.02531355805695057, -0.026863768696784973, -0.014982094056904316, 0.05510114133358002, -0.02935587801039219, -0.024430526420474052, 0.0233905129134655, -0.03848053514957428, 0.09913495928049088, 0.045014962553977966, 0.01339263841509819, 0.013225844129920006, 0.07005380094051361, -0.03473255783319473, 0.02594149112701416, -0.051608260720968246, -0.06220463663339615, -0.07727503031492233, -0.02615734376013279, -0.016944386065006256, 0.052157703787088394, 0.05812307074666023, 0.01493303757160902, 0.009046163409948349, 0.03245629742741585, 0.0028551339637488127 ]
716,124
pytorch_optimizer.optimizer.dadapt
DAdaptAdam
Adam with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. betas. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. use AdamW style weight decay. :param fixed_decay: bool. fix weight decay. :param bias_correction: bool. Turn on Adam's bias correction. :param eps: float. term added to the denominator to improve numerical stability.
class DAdaptAdam(Optimizer, BaseOptimizer): r"""Adam with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. betas. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. use AdamW style weight decay. :param fixed_decay: bool. fix weight decay. :param bias_correction: bool. Turn on Adam's bias correction. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.9, 0.999), d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, bias_correction: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'bias_correction': bias_correction, 'step': 0, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'DAdaptAdam' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: if p.grad is None: continue state = self.state[p] state['s'] = torch.zeros_like(p) state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] device = group['params'][0].device beta1, beta2 = group['betas'] beta2_sq: float = math.sqrt(beta2) d: float = group['d'] lr: float = group['lr'] bias_correction1: float = 1.0 - beta1 ** (group['step'] + 1) bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** (group['step'] + 1)) bias_correction: float = bias_correction1 / bias_correction2_sq # it's not Adam Debias d_lr: float = self.apply_adam_debias( not group['bias_correction'], step_size=d * lr, bias_correction1=bias_correction ) sk_l1 = torch.tensor([0.0], device=device) numerator_acc = torch.tensor([0.0], device=device) if 'numerator_weighted' not in group: group['numerator_weighted'] = torch.tensor([0.0], device=device) numerator_weighted = group['numerator_weighted'] for group in self.param_groups: for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if 'step' not in state: state['s'] = torch.zeros_like(p) state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) exp_avg, exp_avg_sq, s = state['exp_avg'], state['exp_avg_sq'], state['s'] de_nom = exp_avg_sq.sqrt().add_(group['eps']) numerator_acc.add_(torch.dot(grad.flatten(), s.div(de_nom).flatten()), alpha=d_lr) exp_avg.mul_(beta1).add_(grad, alpha=d_lr * (1.0 - beta1)) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) s.mul_(beta2_sq).add_(grad, alpha=d_lr * (1.0 - beta2_sq)) sk_l1.add_(s.abs().sum()) if sk_l1 == 0: return loss numerator_weighted.mul_(beta2_sq).add_(numerator_acc, alpha=1.0 - beta2_sq) # fmt: skip if lr > 0.0: d_hat = numerator_weighted / (1.0 - beta2_sq) * sk_l1 d = max(d, min(d_hat.item(), d * group['growth_rate'])) for group in self.param_groups: group['numerator_weighted'] = numerator_weighted group['d'] = d for p in group['params']: if p.grad is None: continue state = self.state[p] exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq'] de_nom = exp_avg_sq.sqrt().add_(group['eps']) self.apply_weight_decay( p=p, grad=None, lr=d_lr, weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) p.addcdiv_(exp_avg, de_nom, value=-1.0) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, bias_correction: bool = False, eps: float = 1e-08)
[ 0.006423634011298418, -0.030336394906044006, -0.004451870918273926, 0.027851151302456856, -0.0026546912267804146, -0.009638017974793911, -0.035676587373018265, -0.08080120384693146, -0.03789481893181801, 0.03261624649167061, -0.039496876299381256, 0.0029217007104307413, 0.024051399901509285, 0.09242638945579529, -0.02472919411957264, 0.05981014296412468, 0.00048555945977568626, 0.06851876527070999, -0.003643140196800232, -0.008703485131263733, -0.04974593594670296, -0.08071904629468918, -0.02345576323568821, 0.05837239697575569, -0.05323759838938713, -0.013145086355507374, 0.026557182893157005, -0.02470865473151207, -0.05870102718472481, -0.00023347290698438883, -0.006336342543363571, -0.05944043770432472, -0.002439029747620225, 0.008159196004271507, 0.013340208679437637, -0.034279920160770416, 0.013884497806429863, 0.0029525095596909523, -0.11501950770616531, -0.03485501930117607, 0.03491663560271263, -0.039784424006938934, 0.05163554102182388, -0.04391280189156532, 0.0032734344713389874, 0.03399237245321274, -0.016513515263795853, 0.039763886481523514, -0.02483188919723034, 0.0051861475221812725, 0.04674721136689186, -0.0668756291270256, 0.03255462646484375, 0.007075753528624773, -0.018834443762898445, 0.05225171893835068, 0.06568435579538345, -0.01500388327986002, 0.057674065232276917, -0.08987952768802643, 0.047609858214855194, -0.08392316102981567, 0.028857572004199028, 0.001991018420085311, -0.041037317365407944, -0.02327091060578823, -0.06732749193906784, -0.04167403280735016, -0.013566140085458755, 0.030808795243501663, 0.03002830594778061, -0.045884568244218826, 0.013792070560157299, 0.00007413366256514564, -0.022819047793745995, -0.004364579450339079, -0.025694536045193672, -0.06075494363903999, -0.009252908639609814, -0.02462649717926979, 0.02598208375275135, 0.0028010329697281122, -0.01374072302132845, -0.035840898752212524, 0.017653439193964005, -0.048924367874860764, -0.022469881922006607, -0.025448065251111984, 0.005448021925985813, -0.05089613050222397, 0.033006489276885986, -0.017797214910387993, 0.04966377839446068, 0.06268563121557236, 0.043625254184007645, 0.040893543511629105, -0.03491663560271263, -0.05562014505267143, -0.011912734247744083, -0.007029540371149778, -0.0025892225094139576, 0.0209089033305645, 0.012077048420906067, 0.030356934294104576, -0.001911428989842534, -0.06671131402254105, -0.041817806661129, -0.013412095606327057, 0.025263212621212006, -0.06712209433317184, -0.056564949452877045, -0.001480105915106833, -0.026783112436532974, 0.00027230483829043806, -0.022346647456288338, 0.002011557575315237, 0.000872915901709348, 0.04027736559510231, -0.021853705868124962, 0.05467534437775612, 0.043584175407886505, 0.048883289098739624, -0.0575508289039135, 0.011748421005904675, 0.01675998419523239, -0.027953848242759705, 0.03791535645723343, 0.016616210341453552, 0.024380026385188103, -0.04641858488321304, -0.010439046658575535, 0.010577686131000519, -0.025673996657133102, 0.002539158333092928, 0.0497870147228241, -0.03637491911649704, -0.009263178333640099, 0.044775448739528656, -0.03134281560778618, 0.017899909988045692, 0.03481394052505493, 0.023825468495488167, 0.018844714388251305, -0.007974343374371529, 0.022983361035585403, -0.002539158333092928, 0.05483965575695038, 0.019923022016882896, -0.016164347529411316, 0.0040282499976456165, 0.003483961336314678, 0.007994882762432098, 0.011964082717895508, -0.005427483003586531, 0.021668853238224983, -0.025119438767433167, -0.03662138804793358, 0.01243648398667574, -0.03551227226853371, -0.02485242858529091, -0.03222599998116493, -0.055209361016750336, -0.02869325876235962, 0.009458300657570362, 0.0156816765666008, 0.0042824228294193745, -0.016523784026503563, 0.03984604403376579, -0.024380026385188103, 0.004726582672446966, 0.03727864474058151, -0.05184093490242958, -0.008513497188687325, 0.017263194546103477, -0.028015464544296265, 0.09250854700803757, 0.0021925594191998243, -0.0011476275976747274, -0.006326072849333286, -0.022675273939967155, 0.06732749193906784, 0.0019820325542241335, -0.009617479518055916, -0.0519641675055027, -0.0206008143723011, 0.026536643505096436, 0.005163040477782488, 0.02460595779120922, -0.008708619512617588, 0.03658030927181244, 0.030685560777783394, -0.02725551463663578, 0.01809503324329853, -0.03409506753087044, -0.028097622096538544, 0.009119403548538685, 0.019933290779590607, -0.004808739759027958, 0.08252649754285812, 0.04674721136689186, 0.0167189072817564, 0.004197698552161455, 0.02454434148967266, -0.0014775384915992618, 0.004125811159610748, -0.016595670953392982, -0.025283752009272575, 0.015455746091902256, -0.003784347092732787, 0.00009940650488715619, -0.06539680063724518, 0.016328662633895874, 0.054059166461229324, 0.03610790893435478, 0.04019520804286003, -0.026598259806632996, 0.030131002888083458, 0.03413614630699158, 0.06116572767496109, -0.012898615561425686, 0.0017689383821561933, -0.051265835762023926, 0.00587934534996748, 0.02078566700220108, 0.06071386858820915, -0.04317339137196541, 0.052539266645908356, -0.017530204728245735, -0.009889623150229454, 0.00843134056776762, 0.027933308854699135, -0.06876523047685623, 0.017252925783395767, -0.015876799821853638, 0.05981014296412468, 0.04198211804032326, -0.04563809558749199, -0.022634195163846016, -0.02729659341275692, -0.029309434816241264, -0.027645759284496307, -0.006726587191224098, -0.018906330689787865, 0.026680417358875275, -0.01831069402396679, -0.008436474949121475, 0.05603092908859253, 0.029001345857977867, -0.021545618772506714, 0.012118126265704632, -0.023743312805891037, -0.012190013192594051, -0.033335115760564804, 0.04830819368362427, -0.09694501012563705, -0.017324812710285187, 0.03403345122933388, 0.04031844437122345, -0.007353032473474741, -0.06445199996232986, -0.004218237474560738, -0.04074976593255997, -0.08318375051021576, 0.04555593803524971, -0.022593116387724876, 0.05812592804431915, 0.0642876848578453, -0.027768995612859726, 0.009293986484408379, 0.015065501444041729, 0.10187441855669022, 0.09612344205379486, -0.0629321038722992, -0.0015032124938443303, -0.027686838060617447, 0.04629535228013992, 0.010700921528041363, -0.0059769065119326115, -0.0017445480916649103, 0.005329921841621399, 0.03530687838792801, -0.04674721136689186, -0.05492181330919266, 0.01793072000145912, -0.016154078766703606, 0.04062653332948685, -0.00835431832820177, 0.0109987398609519, 0.03532741963863373, 0.04974593594670296, 0.03937363997101784, -0.004385118838399649, 0.09760226309299469, 0.003111688420176506, 0.056647107005119324, 0.021607235074043274, 0.02098079025745392, 0.015404397621750832, -0.025694536045193672, 0.0196149330586195, 0.017971796914935112, 0.011851117014884949, 0.046089958399534225, 0.021833166480064392, -0.03512202575802803, -0.027686838060617447, 0.011378714814782143, 0.01678052358329296, 0.04040060192346573, -0.0014415949117392302, -0.005219523329287767, 0.007543020416051149, -0.0067060478031635284, 0.023784389719367027, 0.005073181819170713, -0.09727364033460617, 0.003997441381216049, -0.017581552267074585, 0.04247505962848663, 0.06083710119128227, -0.031671442091464996, 0.05948151648044586, 0.00419513089582324, -0.02071378007531166, -0.02982291392982006, -0.03265732526779175, 0.06071386858820915, 0.035779282450675964, -0.017252925783395767, -0.018762556836009026, -0.05097828805446625, -0.02877541445195675, 0.006783070042729378, -0.0020500686950981617, -0.03789481893181801, -0.03349943086504936, 0.023743312805891037, -0.0024749732110649347, 0.003329917322844267, -0.03130173683166504, 0.06321965157985687, 0.04530946910381317, -0.034608546644449234, 0.03750457242131233, -0.011214401572942734, -0.05816700682044029, 0.04654182121157646, 0.038510993123054504, -0.0011469858000054955, 0.026598259806632996, -0.014418516308069229, 0.007424919866025448, 0.00020073856285307556, 0.09127619117498398, 0.055127207189798355, -0.0006562915514223278, -0.02337360568344593, 0.0010949959978461266, 0.032000068575143814, -0.06071386858820915, -0.017879370599985123, 0.01933765411376953, -0.03929148614406586, 0.04933515191078186, 0.08700404316186905, -0.004726582672446966, -0.025345370173454285, -0.06601297855377197, 0.055003970861434937, -0.0521695613861084, 0.005766379646956921, -0.0786651223897934, -0.009596940129995346, 0.0002841790555976331, -0.03370482102036476, -0.01667782850563526, -0.03214384242892265, 0.004896031226962805, 0.04313231259584427, 0.05726328119635582, 0.01311427727341652, -0.013350478373467922, 0.02723497524857521, 0.04023628681898117, 0.03616952523589134, -0.01694483682513237, 0.036744624376297, -0.022408263757824898, 0.032000068575143814, -0.057756222784519196, 0.04272152855992317, 0.022860126569867134, 0.0011424928670749068, 0.019748438149690628, -0.08864717185497284, 0.051224756985902786, 0.026249093934893608, 0.04514515399932861, -0.0903724655508995, -0.03883962333202362, -0.038428839296102524, -0.03113742358982563, 0.0061977026052773, 0.017191307619214058, -0.0031270927283912897, -0.06523249298334122, 0.047486625611782074, 0.08716835081577301, -0.015168197453022003, 0.07661120593547821, -0.04543270543217659, 0.017406970262527466, -0.033252961933612823, 0.02879595384001732, -0.010824156925082207, -0.03128119558095932, -0.011799768544733524, 0.013453174382448196, 0.008534036576747894, 0.021340226754546165, 0.03725810348987579, -0.025139978155493736, 0.029412129893898964, 0.017448047176003456, 0.0064903865568339825, -0.044980842620134354, -0.06457523256540298, 0.013638027012348175, -0.06260347366333008, -0.04276260733604431, 0.0019460889743641019, -0.010084745474159718, -0.02203855849802494, -0.04313231259584427, -0.0169756468385458, 0.0061668939888477325, 0.019799785688519478, 0.052703581750392914, 0.04196158051490784, -0.0274814460426569, 0.020169490948319435, -0.01584598980844021, 0.022428803145885468, -0.021504539996385574, -0.015424937009811401, -0.04255721718072891, 0.043543096631765366, 0.015568711794912815, -0.07599502801895142, -0.025304291397333145, 0.03284217789769173, -0.0024749732110649347, 0.06757395714521408, 0.010536608286201954, -0.02466757595539093, 0.0083594536408782, 0.02733767218887806, -0.022387724369764328, 0.017858831211924553, 0.004277287982404232, 0.012939694337546825, 0.009586670435965061, -0.022819047793745995, 0.03883962333202362, -0.019861403852701187, 0.07463943958282471, 0.07221581786870956, -0.01681133359670639, 0.002124523278325796, 0.031815215945243835, 0.008025690913200378, 0.004041086882352829, 0.010459586046636105, -0.042187511920928955, -0.04674721136689186, 0.0024274764582514763, -0.0036380053497850895, -0.000314025062834844, 0.026885809376835823, 0.0064903865568339825, 0.043584175407886505, -0.08051365613937378, 0.026433946564793587, 0.03789481893181801, 0.017951257526874542, 0.00548396585509181, -0.003270867047831416, 0.024030860513448715, -0.0038048862479627132, 0.04502192139625549, -0.051224756985902786, -0.04563809558749199, 0.06683454662561417, 0.01369964424520731, -0.07151748239994049, -0.042433980852365494, 0.007291415240615606, -0.017797214910387993, 0.08905795961618423, -0.03586144000291824, 0.026783112436532974, -0.023969242349267006, -0.0698743462562561, -0.03341727331280708, 0.03524526208639145, -0.017499396577477455, -0.06379474699497223, 0.03750457242131233, -0.03680624067783356, 0.01439797692000866, -0.033109184354543686, 0.0030064249876886606, 0.01964574307203293, 0.031609825789928436, -0.002314510755240917, -0.0084878234192729, 0.011327367275953293, 0.07159963995218277, 0.04580241069197655, -0.04522731155157089, 0.04175618663430214, 0.03358158841729164, -0.02071378007531166, -0.02859056182205677, 0.01957385428249836, 0.046048879623413086, -0.01818745955824852, -0.023907626047730446, 0.039558492600917816, 0.005735571030527353, -0.004400522913783789, -0.002332482486963272, 0.03485501930117607, 0.04966377839446068, -0.00022400562011171132, -0.01504496205598116, 0.015147658064961433, -0.04900652542710304, -0.12832890450954437, -0.02094998210668564, 0.0023093759082257748, 0.001993585843592882, 0.017971796914935112, -0.05635955557227135, -0.011923003941774368, 0.06917601823806763, -0.030500708147883415, 0.03916824981570244, -0.021525079384446144, -0.02064189314842224, -0.013463444076478481, -0.0010609779274091125, -0.029083503410220146, 0.035779282450675964, 0.047650936990976334, -0.009139942936599255, -0.030808795243501663, 0.010557147674262524, 0.003201547311618924, 0.014613638631999493, -0.03734026104211807, -0.03547119349241257, 0.017848562449216843, -0.042187511920928955, 0.024975663051009178, 0.006423634011298418, 0.003142497269436717, -0.007712468504905701, -0.06740964204072952, 0.025612378492951393, -0.03245193138718605, -0.0471990741789341, 0.004996159579604864, 0.004572538658976555, -0.07073699682950974, 0.014480134472250938, 0.01504496205598116, -0.041016776114702225, -0.008154061622917652, -0.030767718330025673, 0.061987295746803284, -0.024380026385188103, -0.022695813328027725, -0.010279867798089981, 0.03491663560271263, 0.026926888152956963, -0.06363043189048767, 0.030480168759822845, 0.0039204191416502, 0.0005330563290044665, -0.03941471874713898, 0.016318392008543015, -0.024975663051009178, -0.042105354368686676, -0.007727873045951128, 0.0416124127805233, -0.05192309245467186, 0.019183609634637833, 0.0439949594438076, 0.027974385768175125, -0.043666332960128784, -0.02616693638265133, 0.05492181330919266, -0.001970479264855385, 0.014777952805161476, -0.0036251682322472334, 0.007902456447482109, -0.0004242628056090325, 0.02583830989897251, -0.05307328701019287, -0.013976924121379852, -0.001672660931944847, -0.002279850887134671, -0.029227277263998985, -0.05582553893327713, -0.03370482102036476, -0.023188753053545952, 0.01929657533764839, 0.09530187398195267, 0.0038254254031926394, 0.00006374371878337115, 0.023846007883548737, -0.005304247606545687, 0.01489091757684946, -0.01968681998550892, -0.01804368570446968, 0.010916583240032196, -0.08088336139917374, 0.0016238802345469594, -0.022736892104148865, 0.009607209824025631, 0.02320929244160652, 0.021093755960464478, -0.011512219905853271, 0.014664987102150917, 0.004205400589853525, 0.06338395923376083, -0.010510934516787529, -0.0260847806930542, -0.02207963727414608, 0.00973557960242033, 0.02982291392982006, -0.013915305957198143, -0.001014122855849564, -0.006921709515154362, -0.020251648500561714, -0.015969226136803627, -0.01227217074483633, 0.04707584157586098, 0.04592564329504967, -0.02098079025745392, 0.016277313232421875, -0.04711692035198212, -0.020210569724440575, 0.02195640094578266, 0.0026855000760406256, 0.006783070042729378, 0.05373053997755051, 0.010444181971251965, -0.02990507148206234, 0.010023128241300583, -0.017263194546103477, 0.009160482324659824, 0.0013825447531417012, -0.048883289098739624, 0.0141823161393404, -0.021278608590364456, 0.00833891425281763, 0.013422365300357342, -0.013309399597346783, -0.09497325122356415, -0.02203855849802494, -0.0439949594438076, 0.01357640977948904, 0.0020449338480830193, -0.014747143723070621, 0.02187424525618553, -0.044857606291770935, -0.02068297192454338, -0.008195139467716217, 0.04444682225584984, 0.03378697857260704, 0.03154820576310158, -0.0067573958076536655, 0.02842624858021736, -0.0444057434797287, -0.020056525245308876, -0.009273447096347809, 0.01800260692834854, -0.020118143409490585, -0.035943593829870224, -0.028241395950317383, 0.0066187563352286816, -0.014695795252919197, 0.04329662770032883, -0.07102454453706741, -0.014572560787200928, -0.003211817005649209, -0.012066778726875782, -0.06239807978272438, -0.010926852934062481, -0.02331198938190937, -0.027501985430717468, 0.011224671266973019, 0.01954304613173008, 0.06194622069597244, 0.0009724026313051581, 0.005288843065500259, 0.014901187270879745, -0.023702234029769897, 0.004608482588082552, 0.026947427541017532, -0.005273438990116119, 0.0027958981227129698, 0.03814128786325455, -0.0065057906322181225, 0.02462649717926979, -0.030336394906044006, -0.0260847806930542, 0.0726676806807518, -0.02746090665459633, 0.014079620130360126, 0.018978217616677284, 0.022757429629564285, -0.05742759630084038, -0.0359230563044548, 0.001262518810108304, -0.01675998419523239, 0.037032172083854675, -0.02094998210668564, 0.03672408312559128, 0.04079084470868111, -0.021001329645514488, -0.005234927870333195, -0.006670104339718819, 0.004254181403666735, 0.06100141629576683, -0.0002844999835360795, 0.001573815941810608, 0.054018087685108185, -0.0006193851586431265, 0.05048534646630287, -0.030665021389722824, -0.011368446052074432, -0.024051399901509285, 0.04547378420829773, -0.02980237454175949, -0.021833166480064392, 0.04313231259584427, -0.053812697529792786, 0.06334288418292999, -0.015147658064961433, 0.008960224688053131, 0.03419776260852814, 0.057879459112882614, -0.05184093490242958, 0.025673996657133102, -0.06321965157985687, -0.055086128413677216, -0.09883461892604828, 0.014747143723070621, -0.04543270543217659, 0.07311954349279404, 0.017899909988045692, -0.012652145698666573, 0.012292709201574326, 0.013432634994387627, 0.0005876136128790677 ]
716,126
pytorch_optimizer.optimizer.dadapt
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.9, 0.999), d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, bias_correction: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'bias_correction': bias_correction, 'step': 0, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, bias_correction: bool = False, eps: float = 1e-08)
[ 0.009992132894694805, -0.04065566882491112, -0.021415801718831062, -0.010030306875705719, -0.05527643859386444, -0.022713730111718178, -0.08864080905914307, -0.02973780781030655, -0.02947058714926243, 0.02532867155969143, -0.03800255060195923, 0.060735367238521576, 0.01557512953877449, 0.07035530358552933, -0.06146068125963211, 0.04771792143583298, 0.026683861389756203, 0.020690489560365677, -0.009195243008434772, -0.006823662668466568, 0.001560376025736332, -0.005315776448696852, -0.03760172054171562, 0.1152101457118988, 0.00044049604912288487, 0.027714567258954048, -0.012378028593957424, 0.007377190515398979, -0.02767639420926571, 0.005950424820184708, 0.007883000187575817, -0.018934471532702446, -0.017875133082270622, 0.052222490310668945, 0.040770191699266434, -0.0229809507727623, -0.0007050322601571679, 0.005816814489662647, -0.0794026181101799, 0.041304633021354675, 0.06142250820994377, -0.03550213202834129, 0.06314035505056381, -0.049015846103429794, -0.018963102251291275, 0.0012991203693673015, 0.026531163603067398, 0.04859593138098717, -0.019812479615211487, -0.029642371460795403, 0.02710377797484398, -0.03680006042122841, 0.03296354040503502, -0.025805851444602013, -0.05733785405755043, 0.043098825961351395, 0.05684158578515053, 0.06195694953203201, 0.041877247393131256, 0.014324919320642948, 0.0039534298703074455, -0.0336315892636776, 0.018600445240736008, -0.019545260816812515, 0.001461361302062869, -0.002057835226878524, -0.07947897166013718, -0.030940299853682518, 0.016548573970794678, 0.03674279898405075, 0.10261261463165283, -0.0016164445551112294, -0.03004320338368416, 0.03763989731669426, -0.007033621426671743, 0.000390094006434083, -0.08199847489595413, -0.04168637469410896, -0.0625295639038086, -0.0037983465008437634, 0.051344480365514755, 0.032238226383924484, -0.01735023595392704, -0.056879762560129166, 0.01045022439211607, -0.050771865993738174, -0.03258179500699043, -0.04500754177570343, 0.02765730582177639, 0.02028965950012207, -0.05653619021177292, -0.02649298869073391, 0.017197538167238235, -0.026263942942023277, 0.07218766957521439, 0.009033001959323883, 0.010412050411105156, -0.04817601293325424, 0.024068918079137802, -0.006499180570244789, -0.016376789659261703, 0.0015591830015182495, -0.047183480113744736, 0.0016665483126416802, 0.004275525454431772, -0.03645649179816246, -0.0528714545071125, -0.03231457620859146, 0.03792620450258255, -0.07695946097373962, -0.03179922327399254, 0.05882665142416954, -0.01762699894607067, 0.024775143712759018, -0.04993203282356262, 0.028630752116441727, 0.021988417953252792, 0.024507923051714897, 0.008603541180491447, 0.019287582486867905, 0.041380979120731354, 0.029336977750062943, -0.041342806071043015, 0.05539096146821976, 0.04229716584086418, -0.009691509418189526, 0.0061460682190954685, 0.009982588700950146, 0.014601683244109154, -0.022866427898406982, 0.042220816016197205, -0.005196481477469206, -0.04210629314184189, -0.016138199716806412, 0.031360216438770294, -0.024240704253315926, 0.004406749736517668, 0.05035195127129555, -0.030768515542149544, 0.017407497391104698, 0.06485819816589355, 0.00579772749915719, 0.04126645624637604, -0.018066003918647766, -0.0016462682979181409, 0.03326893225312233, -0.00419201934710145, -0.01998426578938961, -0.010726988315582275, 0.04523658752441406, 0.02059505507349968, 0.008708520792424679, -0.00986806582659483, 0.03710545599460602, 0.009066404774785042, -0.055123742669820786, 0.010860598646104336, -0.01912534236907959, -0.009209558367729187, 0.02088136225938797, -0.018132809549570084, 0.022465595975518227, 0.03034859709441662, -0.031131170690059662, -0.012234875001013279, 0.022790078073740005, -0.055696357041597366, 0.009090263396501541, -0.009772630408406258, -0.009080720134079456, 0.002155657159164548, -0.08642669767141342, -0.03905234485864639, 0.021835720166563988, 0.003478636499494314, 0.04706895723938942, 0.02819174714386463, -0.0014804485253989697, -0.00986806582659483, -0.015699196606874466, 0.0653926357626915, 0.004261210095137358, -0.016605835407972336, -0.062224168330430984, 0.01132823433727026, 0.019545260816812515, -0.043709613382816315, 0.0483287088572979, -0.04183907434344292, 0.02735191211104393, 0.04038844630122185, 0.013446910306811333, 0.01885812170803547, 0.013437366113066673, -0.010736532509326935, 0.024794232100248337, 0.044854845851659775, -0.01680625230073929, 0.01472575031220913, 0.051955271512269974, 0.07963166385889053, 0.031245693564414978, 0.025462282821536064, -0.03292536363005638, 0.016052307561039925, -0.00477417791262269, -0.01857181452214718, -0.0023131261114031076, -0.01909671165049076, -0.030787602066993713, -0.006284450180828571, -0.015097949653863907, 0.029795069247484207, 0.017588825896382332, -0.01616683229804039, -0.04416770860552788, -0.01087968610227108, 0.01614774391055107, 0.008622628636658192, -0.004442538600414991, 0.10513212531805038, -0.029833244159817696, -0.01590915396809578, -0.0119103929027915, 0.04504571855068207, 0.020461443811655045, 0.04061749204993248, -0.04493119195103645, -0.07050799578428268, 0.019946090877056122, -0.021244017407298088, -0.04821418598294258, -0.027600044384598732, -0.015498780645430088, 0.02947058714926243, 0.006752085871994495, -0.03641831502318382, 0.026722034439444542, -0.08283831179141998, -0.03214279189705849, 0.04909219592809677, 0.03855608031153679, 0.0036623503547161818, -0.010908316820859909, 0.02032783441245556, -0.001895594410598278, 0.030138637870550156, 0.012263505719602108, -0.0670723095536232, -0.03727724030613899, -0.03916686773300171, -0.013065166771411896, 0.0007193476194515824, 0.041648201644420624, -0.03479590639472008, 0.01767471805214882, 0.044854845851659775, 0.000024045359168667346, 0.025118712335824966, -0.00958175864070654, -0.0057070632465183735, -0.010030306875705719, -0.020938623696565628, 0.08421258628368378, -0.009180927649140358, 0.03032951056957245, 0.006217645015567541, -0.018123265355825424, 0.02175937220454216, 0.00031285060686059296, 0.13536620140075684, 0.03611292317509651, -0.01649131253361702, -0.008527192287147045, -0.0028726188465952873, -0.009691509418189526, 0.011566824279725552, -0.036074746400117874, -0.008761010132730007, 0.050161078572273254, 0.03973948583006859, -0.04619094729423523, 0.02353447861969471, 0.013332386501133442, 0.011939023621380329, 0.0031422250904142857, -0.02735191211104393, 0.025366846472024918, 0.0025791535153985023, 0.014458529651165009, 0.012607074342668056, 0.01159545499831438, 0.07470717281103134, 0.030234074220061302, 0.09848979115486145, -0.01763654313981533, 0.045160241425037384, -0.0017548265168443322, 0.059017524123191833, -0.006231960374861956, 0.039357740432024, -0.043671440333127975, 0.06203329563140869, -0.0013981350930407643, -0.0547419972717762, -0.042831603437662125, 0.037506286054849625, 0.013914545997977257, 0.03328802064061165, 0.0495121143758297, 0.031035736203193665, 0.03116934560239315, 0.06527811288833618, 0.013361017219722271, 0.03200918063521385, -0.06745405495166779, 0.008636943995952606, -0.06230051815509796, 0.03118843212723732, 0.038040727376937866, -0.007486941758543253, 0.039624959230422974, 0.006976359989494085, -0.030405858531594276, -0.06527811288833618, -0.05905569717288017, 0.029489675536751747, 0.028936147689819336, -0.043136999011039734, -0.007830510847270489, -0.03529217466711998, -0.020480532199144363, 0.026244856417179108, -0.031589262187480927, -0.03206644207239151, -0.0015818490646779537, 0.008069099858403206, 0.05268058553338051, -0.005854988936334848, -0.038403380662202835, 0.09650472551584244, -0.021606674417853355, -0.012120352126657963, 0.03771624341607094, 0.00016969685384538025, -0.03498677909374237, 0.0181996151804924, -0.018037373200058937, 0.03905234485864639, 0.005282373633235693, -0.015708738937973976, 0.012110807932913303, -0.005764324683696032, 0.08734288066625595, 0.02380169928073883, -0.02908884361386299, -0.014258114621043205, -0.0003334289649501443, 0.034872256219387054, -0.04000670462846756, -0.029775982722640038, 0.0031875569839030504, -0.054551128298044205, 0.05004655569791794, 0.021912068128585815, -0.014143591746687889, -0.00020071350445505232, -0.03742993623018265, 0.021816633641719818, 0.011070557869970798, 0.02475605718791485, -0.06523994356393814, -0.03349798172712326, -0.004316085949540138, 0.017207082360982895, -0.012769315391778946, -0.03796437755227089, 0.010688814334571362, 0.043938662856817245, 0.0026125560980290174, 0.001557990093715489, -0.008040469139814377, 0.05844490975141525, 0.02769548073410988, 0.012998361140489578, -0.028039049357175827, 0.007863913662731647, 0.01593778468668461, 0.06695778667926788, -0.005048555787652731, 0.0042826831340789795, -0.010392962954938412, 0.015794631093740463, -0.007806651759892702, -0.06886650621891022, 0.03349798172712326, 0.05180257558822632, 0.04829053580760956, -0.04878680035471916, -0.03771624341607094, -0.015050232410430908, -0.03888056054711342, -0.021530326455831528, 0.03525399789214134, -0.004795650951564312, -0.011223254725337029, 0.020060613751411438, 0.038403380662202835, 0.015097949653863907, 0.06737770140171051, -0.008493789471685886, -0.003531126072630286, -0.02063322812318802, 0.0015484464820474386, -0.03004320338368416, -0.02735191211104393, -0.010049394331872463, -0.006895239464938641, 0.016033221036195755, -0.012091721408069134, 0.028344444930553436, 0.010478855110704899, 0.07069887220859528, 0.021568499505519867, 0.06279678642749786, 0.06180424988269806, -0.026855645701289177, 0.0023751594126224518, -0.0027867264579981565, -0.05680341273546219, -0.03670462593436241, 0.000013131748346495442, -0.03931956738233566, -0.02645481564104557, 0.02473697066307068, 0.007100426591932774, -0.007253123912960291, 0.005172622390091419, -0.0003214994794689119, -0.020461443811655045, 0.006031545344740152, -0.06764492392539978, 0.01675853319466114, -0.03090212494134903, -0.05565818399190903, -0.028439881280064583, 0.027733655646443367, -0.009075948037207127, -0.03702910616993904, -0.013943176716566086, 0.03178013488650322, 0.0070145344361662865, 0.043633267283439636, -0.005105817690491676, -0.02882162295281887, -0.03241001069545746, -0.015966415405273438, -0.012797946110367775, 0.04065566882491112, -0.017808327451348305, 0.04554198309779167, -0.020671403035521507, -0.01116599328815937, -0.010192547924816608, -0.05054282024502754, 0.029031582176685333, 0.06585072726011276, -0.02351539023220539, -0.009376571513712406, 0.00795457698404789, 0.002715149661526084, 0.019850654527544975, 0.0347195602953434, -0.02971872128546238, -0.05294780433177948, 0.012712053954601288, -0.007887772284448147, -0.026989255100488663, -0.01788467727601528, -0.015107493847608566, 0.007806651759892702, -0.05562000721693039, 0.006289221812039614, 0.07737938314676285, 0.009142753668129444, -0.014916622079908848, -0.0642092302441597, 0.013227407820522785, 0.02324817143380642, 0.040770191699266434, -0.07879182696342468, -0.016825338825583458, 0.0167680773884058, 0.0540548600256443, -0.03437598794698715, -0.014286745339632034, 0.027771828696131706, 0.011757695116102695, 0.03702910616993904, 0.00941951759159565, 0.010326158255338669, -0.03821251168847084, -0.03267723321914673, -0.03029133565723896, 0.023114560171961784, -0.04416770860552788, -0.08337274938821793, 0.01249255146831274, -0.034242380410432816, -0.0029656686820089817, -0.025099625810980797, -0.002770025283098221, -0.02849714271724224, 0.011958111077547073, -0.043633267283439636, -0.024660620838403702, -0.04699260741472244, 0.06069719418883324, -0.0005812639137730002, -0.02147306501865387, 0.04790879040956497, 0.06485819816589355, 0.04183907434344292, -0.03674279898405075, 0.010622008703649044, 0.04141915589570999, 0.020156050100922585, -0.04798514023423195, 0.07615780085325241, 0.024813318625092506, -0.0007068216800689697, -0.06703413277864456, -0.03916686773300171, 0.04588555172085762, -0.00958175864070654, 0.04554198309779167, 0.02265646867454052, -0.04027392342686653, -0.05913204699754715, -0.029489675536751747, 0.015117037110030651, 0.023668088018894196, 0.012855207547545433, -0.04558015614748001, -0.014086330309510231, 0.0021616218145936728, -0.03847973048686981, 0.07169140130281448, -0.0440913587808609, -0.016682185232639313, 0.02614942006766796, -0.03624653071165085, -0.04084654152393341, 0.02088136225938797, 0.02088136225938797, -0.018342768773436546, 0.008121590130031109, 0.0016820566961541772, 0.059628311544656754, 0.02265646867454052, -0.022446509450674057, -0.0024741741362959146, -0.00205425638705492, -0.000720540585462004, -0.005234655924141407, 0.010307070799171925, 0.008489018306136131, -0.019001275300979614, -0.06817936152219772, 0.01907762512564659, 0.0007342594908550382, 0.0013361017918214202, 0.0036241761408746243, 0.011356865055859089, -0.04168637469410896, 0.013198777101933956, -0.015117037110030651, 0.0229809507727623, -0.053711291402578354, -0.03746810927987099, 0.01910625584423542, -0.02857349067926407, -0.11948566883802414, -0.08657939732074738, 0.03477682173252106, 0.0045880782417953014, -0.06947728991508484, 0.01674899086356163, -0.01292201317846775, 0.019459368661046028, -0.0070431651547551155, 0.05233701318502426, -0.03120752051472664, -0.024660620838403702, -0.04420588165521622, 0.027714567258954048, -0.02822992205619812, -0.02324817143380642, 0.036609187722206116, 0.05737602710723877, -0.07623414695262909, -0.013905001804232597, 0.02032783441245556, 0.018877210095524788, 0.0007760126609355211, -0.01164317224174738, -0.003784031141549349, 0.04447310045361519, 0.02410709299147129, -0.06829388439655304, 0.016577204689383507, -0.010765163227915764, 0.0029418098274618387, -0.015422431752085686, -0.026283031329512596, -0.051955271512269974, -0.04374779015779495, 0.014916622079908848, 0.0858159065246582, -0.0077637056820094585, 0.003998761530965567, -0.04214446619153023, -0.013198777101933956, 0.04317517578601837, -0.07409638911485672, -0.028287183493375778, 0.006570757832378149, -0.11551554501056671, 0.004688285756856203, -0.03508221358060837, 0.049855682998895645, -0.01089877262711525, -0.01101329643279314, -0.05493286997079849, 0.0008666767389513552, 0.029222454875707626, 0.023419955745339394, 0.013322843238711357, 0.02910793200135231, -0.008531964384019375, 0.019020363688468933, 0.04412953183054924, -0.008069099858403206, -0.006093578413128853, -0.006995446979999542, -0.04244986176490784, -0.02788635343313217, -0.00044556608190760016, 0.04088471457362175, 0.03947226330637932, -0.02237016148865223, 0.05172622576355934, -0.0469544343650341, -0.006985903717577457, -0.01031661406159401, -0.011690890416502953, 0.01674899086356163, 0.027733655646443367, 0.05012290179729462, -0.021587587893009186, -0.022751905024051666, -0.022866427898406982, 0.034910429269075394, 0.007859141565859318, 0.009500637650489807, 0.002598240738734603, -0.03851790353655815, -0.0016104797832667828, -0.021110408008098602, -0.01971704512834549, -0.050466474145650864, -0.016644010320305824, -0.04107558727264404, 0.006084034685045481, 0.017187993973493576, 0.004537974018603563, -0.04672538861632347, -0.02769548073410988, 0.03292536363005638, -0.013733217492699623, 0.05111543461680412, 0.048710454255342484, -0.002379931276664138, -0.047527048736810684, 0.01971704512834549, -0.0011577560799196362, -0.06298765540122986, 0.037239063531160355, -0.012502094730734825, -0.02143489010632038, -0.05176439881324768, -0.017168907448649406, 0.019888829439878464, -0.0005803692038170993, 0.03508221358060837, -0.04065566882491112, -0.06081171706318855, -0.07566153258085251, 0.005177394486963749, -0.03063490428030491, 0.0020065384451299906, 0.0014231869718059897, -0.05909387394785881, 0.07432543486356735, -0.018161440268158913, 0.02794361487030983, 0.014744837768375874, 0.0022141113877296448, 0.008050013333559036, -0.052489712834358215, 0.035998400300741196, 0.05180257558822632, 0.029566023498773575, -0.08444163203239441, -0.008054784499108791, 0.031131170690059662, 0.03681914880871773, -0.015212472528219223, -0.04947394132614136, 0.006107893772423267, -0.03670462593436241, -0.006670965347439051, 0.027542782947421074, -0.008531964384019375, 0.01517429854720831, -0.07947897166013718, -0.020423270761966705, 0.011471387930214405, 0.030787602066993713, -0.02590128779411316, 0.04267890751361847, 0.03256271034479141, -0.02908884361386299, -0.026951082050800323, 0.007582377642393112, -0.03821251168847084, 0.04317517578601837, 0.011767239309847355, 0.06394201517105103, 0.07260758429765701, 0.0056879762560129166, 0.03324984759092331, -0.04000670462846756, -0.008059556595981121, 0.00257438188418746, 0.04767974466085434, -0.017999200150370598, -0.018896296620368958, 0.06863745301961899, -0.008761010132730007, 0.00371961179189384, -0.021816633641719818, 0.008574910461902618, 0.03029133565723896, 0.06760674715042114, -0.04802331328392029, 0.02053779363632202, -0.030081376433372498, -0.06852293014526367, -0.09085492044687271, -0.0029847559053450823, -0.05493286997079849, 0.08520511537790298, 0.015155211091041565, 0.01514566782861948, 0.02878344990313053, 0.038365207612514496, 0.00279865600168705 ]
716,129
pytorch_optimizer.optimizer.dadapt
__str__
null
def __str__(self) -> str: return 'DAdaptAdam'
(self) -> str
[ 0.02774806320667267, -0.010418678633868694, 0.03648291528224945, -0.027905922383069992, 0.004898006562143564, -0.058232344686985016, 0.02830933965742588, -0.0030892083887010813, 0.0654587671160698, -0.03792118281126022, -0.0770350769162178, 0.0011444760020822287, -0.018066057935357094, 0.03602688014507294, 0.009603074751794338, 0.008831321261823177, -0.008774316869676113, -0.019206149503588676, -0.005766230169683695, 0.036938950419425964, 0.0077701592817902565, 0.009515375830233097, 0.00759037584066391, -0.003863154910504818, -0.02103029564023018, 0.06370478123426437, -0.005209339316934347, -0.04360409826040268, -0.023626195266842842, 0.00953291542828083, -0.015128131955862045, -0.06103872135281563, -0.005318963434547186, 0.014979043044149876, -0.04434077441692352, 0.02888815477490425, -0.029923006892204285, 0.017469704151153564, -0.0496378131210804, -0.027081549167633057, -0.0007553103496320546, 0.004264379385858774, 0.02832687832415104, -0.03211548924446106, -0.007752619218081236, -0.012619931250810623, -0.00036943337181583047, 0.01711890660226345, -0.007156264036893845, 0.013777562417089939, -0.008989179506897926, 0.021574031561613083, -0.04220091179013252, 0.006125797051936388, -0.049006376415491104, 0.0363776758313179, 0.04328837990760803, 0.031168336048722267, -0.01104134414345026, 0.013540774583816528, -0.0412888377904892, -0.0342378132045269, 0.06682687997817993, -0.03553576394915581, -0.0427972637116909, 0.03883325681090355, -0.01196218654513359, 0.031203415244817734, 0.01917107030749321, 0.040131207555532455, 0.022503644227981567, -0.057074714452028275, -0.007186959031969309, 0.03544806316494942, 0.05732027068734169, -0.031168336048722267, -0.08615580946207047, -0.016706719994544983, 0.01644362136721611, -0.04974305257201195, 0.03388701379299164, -0.012190205045044422, -0.028782915323972702, -0.005757459904998541, -0.01606651395559311, -0.08636628836393356, -0.041218679398298264, -0.056092482060194016, -0.03211548924446106, -0.003231719834730029, -0.019135991111397743, -0.010778245516121387, -0.02062687836587429, 0.0858050063252449, -0.04612984135746956, -0.009331206791102886, -0.005345273297280073, -0.04507744684815407, 0.011856947094202042, 0.033904556185007095, 0.013409225270152092, 0.027572665363550186, -0.024836445227265358, 0.010190660133957863, -0.0496378131210804, -0.017978359013795853, -0.03665831312537193, 0.02239840477705002, -0.01595250517129898, 0.00915580801665783, -0.053005464375019073, 0.02413485199213028, 0.021363552659749985, -0.0033150340896099806, 0.02394191361963749, -0.05809202790260315, 0.021433712914586067, -0.004154754802584648, 0.0235384963452816, -0.008590147830545902, 0.023292938247323036, 0.02239840477705002, -0.05205831304192543, -0.016899658367037773, 0.0342378132045269, 0.06219635531306267, -0.04630523920059204, -0.015215830877423286, 0.030992938205599785, -0.04195535182952881, 0.04163963347673416, -0.0013538581551983953, -0.06416081637144089, -0.018066057935357094, 0.08440182358026505, -0.010357288643717766, 0.057355351746082306, 0.024450568482279778, 0.02304738014936447, 0.15505239367485046, -0.021626651287078857, 0.01966218650341034, 0.0579867884516716, 0.05486468970775604, -0.021942367777228355, 0.0006495230481959879, -0.023503417149186134, 0.05539088696241379, -0.01484749373048544, 0.006016172934323549, 0.02324031852185726, 0.00919088814407587, 0.014365147799253464, 0.00017402833327651024, -0.013102277182042599, 0.02110045589506626, -0.025029383599758148, -0.030817538499832153, 0.01741708442568779, -0.04427061229944229, -0.014277448877692223, -0.06605512648820877, -0.007121184375137091, 0.032343506813049316, -0.00009133061394095421, 0.005937243811786175, -0.015461388975381851, 0.021819589659571648, -0.014777334406971931, 0.01634715311229229, -0.01051514782011509, -0.060091570019721985, -0.08138496428728104, 0.028186559677124023, -0.002788838231936097, 0.047533027827739716, 0.020977675914764404, 0.09183872491121292, 0.037605464458465576, -0.023503417149186134, 0.014663325622677803, 0.006086332257837057, -0.031291116029024124, 0.02210022695362568, 0.06521321088075638, -0.05360182002186775, 0.012567311525344849, 0.041499316692352295, 0.05188291519880295, 0.005226879380643368, 0.012523462064564228, 0.00516110472381115, -0.029607288539409637, -0.020223461091518402, -0.02492414601147175, -0.06500273197889328, -0.005625911056995392, -0.04876082018017769, -0.010190660133957863, 0.022223006933927536, -0.0017682374455034733, 0.041990432888269424, -0.011260592378675938, 0.03865785896778107, 0.08012209087610245, 0.018522094935178757, 0.022433483973145485, -0.0280287005007267, 0.013146127574145794, -0.03981548920273781, 0.03992072865366936, 0.01298826839774847, -0.005981093272566795, 0.009243507869541645, 0.0346587710082531, -0.051812756806612015, 0.009006720036268234, -0.014391457661986351, 0.0073316628113389015, 0.006559908855706453, 0.04009612649679184, -0.02218792587518692, 0.007024715188890696, -0.01838177628815174, -0.028870614245533943, -0.021924829110503197, 0.03942961245775223, -0.03418519347906113, -0.020995216444134712, -0.010374829173088074, 0.0025520501658320427, -0.09345238655805588, -0.03329065814614296, 0.027379725128412247, 0.029730068519711494, 0.040867879986763, -0.04367426037788391, -0.006520444061607122, -0.07542140781879425, -0.03890341520309448, -0.017592482268810272, 0.026011615991592407, 0.007134339306503534, 0.024485649541020393, 0.03320296108722687, -0.0603371299803257, -0.024503188207745552, -0.0051917992532253265, -0.015934964641928673, -0.03064214065670967, 0.04893621802330017, -0.04349885880947113, -0.016689179465174675, -0.001071027829311788, -0.013119817711412907, -0.06465193629264832, -0.052303873002529144, 0.013303985819220543, 0.0027186786755919456, -0.020469019189476967, -0.06338906288146973, -0.03971024975180626, -0.05377722159028053, 0.056092482060194016, 0.002926964545622468, 0.029116172343492508, -0.022451024502515793, 0.018715033307671547, 0.03841229900717735, -0.019153529778122902, 0.10264328122138977, 0.03665831312537193, -0.0605476051568985, 0.0246084276586771, -0.03844738006591797, -0.01172539871186018, -0.002473120577633381, 0.012093735858798027, -0.10979954153299332, -0.04662095382809639, -0.01831161603331566, -0.04409521445631981, -0.011076423339545727, 0.038271982222795486, -0.0144966971129179, -0.05342642217874527, 0.033729154616594315, -0.0024292711168527603, -0.009471526369452477, 0.04370933771133423, 0.06840546429157257, 0.04069248214364052, -0.01143599022179842, -0.004117482807487249, 0.028256719931960106, 0.027274487540125847, 0.046761274337768555, 0.024503188207745552, -0.01606651395559311, 0.016855807974934578, -0.031764693558216095, -0.04058724269270897, 0.023906832560896873, -0.011155352927744389, -0.0515671968460083, -0.009278587065637112, -0.03220319002866745, -0.010681776329874992, 0.021854668855667114, 0.018662413582205772, -0.01400558091700077, 0.0389384962618351, 0.0022889520041644573, 0.08727835863828659, 0.015049202367663383, 0.07149247825145721, -0.015321070328354836, 0.017224146053195, 0.037605464458465576, 0.054548975080251694, -0.04798906669020653, 0.033413439989089966, -0.03746514767408371, -0.028186559677124023, 0.018855351954698563, 0.0028940774500370026, -0.03016856499016285, 0.04465649276971817, 0.02071457728743553, 0.04619999974966049, -0.04293758422136307, -0.02937927097082138, 0.033536218106746674, -0.010979954153299332, -0.03397471457719803, 0.0020368166733533144, 0.037710703909397125, -0.03785102441906929, -0.023713894188404083, -0.01606651395559311, 0.11064145714044571, -0.008568222634494305, -0.039254214614629745, 0.021065374836325645, 0.013575853779911995, 0.04114851728081703, -0.0412888377904892, -0.0067396922968328, 0.011821867898106575, 0.012953189201653004, -0.012979498133063316, -0.009085648693144321, 0.007292198017239571, 0.033343277871608734, 0.026502732187509537, 0.00987494271248579, -0.02578359842300415, 0.059495214372873306, -0.033238038420677185, 0.013154896907508373, -0.012698860839009285, -0.07661411911249161, 0.009857403114438057, 0.017960820347070694, -0.027099087834358215, 0.0008484908612444997, -0.01976742595434189, -0.01711890660226345, 0.07885922491550446, -0.0410783588886261, -0.02492414601147175, 0.00831389520317316, -0.01772403158247471, -0.02101275511085987, -0.02820410020649433, 0.05146195739507675, 0.04255170747637749, 0.01367232296615839, -0.06966833770275116, 0.006138951983302832, 0.03476400673389435, 0.0020554526709020138, 0.0311332568526268, 0.037324827164411545, -0.0006846027681604028, -0.015049202367663383, 0.027362186461687088, 0.026537813246250153, -0.019977902993559837, -0.026064235717058182, -0.003216372337192297, -0.042762186378240585, -0.019100910052657127, 0.006103872321546078, -0.05602232366800308, -0.07012437283992767, -0.031168336048722267, -0.017101366072893143, -0.07166787981987, 0.018697494640946388, 0.013637243770062923, -0.039464689791202545, -0.005003246013075113, 0.012339293956756592, -0.022030068561434746, 0.025660820305347443, 0.03648291528224945, 0.015198291279375553, -0.02267904207110405, 0.0028853074181824923, 0.03367653861641884, -0.0046261390671133995, -0.05826742574572563, -0.05226879194378853, 0.06759863346815109, 0.024976765736937523, -0.04406013712286949, -0.00415694760158658, 0.0067923120222985744, -0.015057972632348537, -0.01839931681752205, 0.03550068289041519, 0.024661047384142876, 0.04883097857236862, 0.0014821183867752552, 0.010050341486930847, 0.008028872311115265, 0.06510797142982483, 0.05591708421707153, -0.021047836169600487, -0.033816855400800705, 0.030396582558751106, 0.0027647209353744984, -0.04584920033812523, 0.023766513913869858, -0.030536901205778122, 0.008484908379614353, -0.024362869560718536, -0.031782232224941254, 0.0032689920626580715, 0.027379725128412247, -0.07500045746564865, -0.0025038153398782015, -0.007406207267194986, 0.019995443522930145, -0.038973573595285416, -0.06030204892158508, 0.007910477928817272, 0.03276446461677551, -0.0162594523280859, -0.012312984094023705, 0.04469157010316849, -0.0009860692080110312, -0.04504236951470375, 0.015452619642019272, -0.034115035086870193, 0.009945102035999298, -0.04956765100359917, 0.005744304973632097, 0.01985512487590313, -0.056583598256111145, 0.015803417190909386, -0.029133712872862816, 0.015601707622408867, 0.034588608890771866, 0.03492186591029167, 0.000505093252286315, 0.0204339399933815, -0.038307059556245804, 0.0021859053522348404, 0.02811639942228794, -0.01672425866127014, -0.005998633336275816, -0.03415011242032051, -0.001988581847399473, 0.05286514759063721, -0.030694760382175446, -0.00827881507575512, 0.016084054484963417, 0.01318120677024126, -0.026993848383426666, -0.0537070594727993, 0.018469475209712982, 0.07696492224931717, -0.02062687836587429, 0.009699543938040733, -0.02287198044359684, 0.011953416280448437, -0.04570888355374336, -0.0029730068054050207, 0.04690159484744072, 0.027116628363728523, -0.05335626378655434, -0.012058655731379986, 0.008524373173713684, 0.05107608065009117, -0.0024424258153885603, -0.03316788002848625, -0.06777402758598328, 0.007436901796609163, 0.019328929483890533, -0.03911389410495758, -0.023415716364979744, -0.024941684678196907, 0.040236447006464005, -0.014382687397301197, 0.020118223503232002, -0.000021479479983099736, -0.01504043210297823, -0.03686879202723503, -0.003994703758507967, -0.03074738010764122, 0.018697494640946388, 0.031466513872146606, 0.026257174089550972, 0.011690318584442139, -0.013242596760392189, 0.015128131955862045, -0.010830865241587162, 0.040902961045503616, -0.0006336275255307555, -0.03457107022404671, -0.03550068289041519, -0.043358542025089264, -0.02169680967926979, 0.022415945306420326, -0.03027380257844925, 0.030782459303736687, -0.03267676383256912, 0.09674988687038422, 0.012277903966605663, 0.04360409826040268, 0.023135079070925713, 0.05907425656914711, 0.009927562437951565, 0.09611845016479492, -0.10025785863399506, 0.012655011378228664, -0.004181064665317535, 0.03337835893034935, 0.016882117837667465, -0.050058767199516296, -0.0018975939601659775, -0.043007742613554, 0.021188154816627502, -0.03453598916530609, -0.021644189953804016, 0.012365603819489479, 0.059810932725667953, -0.005722380243241787, 0.007015945389866829, -0.01683826930820942, -0.0427972637116909, -0.032080408185720444, -0.004683143459260464, 0.061845555901527405, 0.0017046554712578654, 0.012400683015584946, 0.04479680955410004, 0.02744988538324833, -0.03939453139901161, -0.01504043210297823, 0.08748883754014969, 0.04911161586642265, 0.05265466868877411, 0.039184052497148514, -0.01917107030749321, 0.04230615124106407, -0.007792084012180567, -0.048795897513628006, -0.013067197985947132, -0.07850842922925949, 0.0363776758313179, 0.0813148021697998, -0.08748883754014969, 0.056969475001096725, 0.059109337627887726, 0.0340273343026638, -0.02364373579621315, 0.01420728862285614, -0.038482461124658585, 0.051707517355680466, 0.00032859836937859654, -0.013751252554357052, -0.0577763095498085, -0.005972323473542929, -0.011313211172819138, -0.01275148056447506, 0.030694760382175446, -0.0776665136218071, -0.06465193629264832, -0.0024862755089998245, -0.03229088708758354, -0.000942767655942589, 0.05623279884457588, -0.05409293621778488, -0.024836445227265358, -0.023889293894171715, 0.03513234481215477, 0.0056434511207044125, 0.01595250517129898, 0.02355603501200676, 0.017487242817878723, 0.03792118281126022, 0.08433166146278381, 0.055425968021154404, 0.006222266238182783, 0.004069248214364052, -0.03388701379299164, 0.020030522719025612, -0.03250136598944664, 0.003448775503784418, -0.007849088869988918, -0.009261047467589378, -0.013303985819220543, -0.04318314418196678, 0.028467196971178055, -0.023433256894350052, -0.014759794808924198, 0.02627471461892128, 0.02452072873711586, 0.07921002060174942, -0.01867995411157608, 0.03385193645954132, -0.04163963347673416, 0.020205922424793243, -0.005753075238317251, -0.004479242488741875, 0.04837494343519211, -0.06468701362609863, 0.016084054484963417, -0.008756776340305805, -0.014777334406971931, -0.06356446444988251, -0.034711387008428574, 0.011015034280717373, 0.027362186461687088, 0.012400683015584946, -0.010111730545759201, 0.023976992815732956, -0.01040990836918354, 0.024152390658855438, -0.02306492067873478, 0.021837130188941956, -0.04960273206233978, 0.028081320226192474, -0.07310614734888077, -0.06328382343053818, -0.021749429404735565, -0.038201820105314255, -0.034588608890771866, 0.009594305418431759, 0.0024972378741949797, 0.011655238457024097, 0.029221411794424057, -0.008550683036446571, -0.04142915457487106, 0.02890569344162941, -0.03243120759725571, -0.019293848425149918, 0.016294533386826515, -0.06089840456843376, 0.028835535049438477, -0.06745830923318863, 0.08419134467840195, 0.02015330269932747, -0.014444077387452126, -0.023433256894350052, -0.021153075620532036, -0.031466513872146606, -0.019995443522930145, 0.030922777950763702, 0.011111503466963768, -0.046866513788700104, -0.016189293935894966, 0.0021661731880158186, 0.022924600169062614, 0.0024292711168527603, 0.0727553516626358, -0.05342642217874527, 0.02208268828690052, -0.034500911831855774, 0.027099087834358215, -0.06331890821456909, 0.018223917111754417, 0.04391981661319733, -0.06801959127187729, -0.024082232266664505, 0.018276536837220192, -0.06668655574321747, -0.0513567179441452, -0.04486696794629097, -0.025748519226908684, 0.027712984010577202, 0.08776947110891342, 0.0124094532802701, -0.0034641230013221502, -0.009331206791102886, -0.020451480522751808, 0.002613439690321684, 0.03281708434224129, 0.04837494343519211, 0.004202989861369133, 0.004273149184882641, 0.006489749066531658, -0.004696298390626907, -0.012093735858798027, 0.020591799169778824, 0.007406207267194986, -0.03588655963540077, 0.07998177409172058, 0.06079316511750221, -0.016426080837845802, 0.009866172447800636, 0.0776665136218071, -0.08812027424573898, -0.012462073005735874, 0.04125375673174858, 0.022258086130023003, 0.01565432734787464, 0.0016586133278906345, -0.012120045721530914, -0.01711890660226345, 0.011716628447175026, 0.04388473555445671, 0.052023231983184814, -0.05360182002186775, -0.00812534149736166, -0.040867879986763, -0.013882801868021488, 0.002580552361905575, 0.04318314418196678, -0.046270158141851425, 0.03485170751810074, 0.02531002275645733, 0.02024100162088871, 0.03474646806716919, 0.02539772167801857, 0.06759863346815109, 0.052409108728170395, 0.018855351954698563, 0.03844738006591797, 0.01415466982871294, 0.0030300114303827286, -0.00013812641554977745, 0.03579885885119438, 0.020205922424793243, 0.029116172343492508, -0.025029383599758148, 0.026607971638441086, 0.07977129518985748, 0.025625739246606827, -0.011330751702189445, 0.024748746305704117, 0.0013966115657240152, -0.06682687997817993, 0.011251822113990784, 0.03346605971455574, 0.02110045589506626, -0.029449429363012314, 0.01565432734787464, -0.03911389410495758, 0.01484749373048544, -0.024503188207745552, -0.018171297386288643, 0.04837494343519211, 0.009392596781253815, 0.0054680523462593555 ]
716,165
pytorch_optimizer.optimizer.dadapt
DAdaptAdan
Adan with D-Adaptation. Leave LR set to 1 unless you encounter instability. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. decoupled weight decay. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. Default is inf, for unrestricted. :param eps: float. term added to the denominator to improve numerical stability.
class DAdaptAdan(Optimizer, BaseOptimizer): r"""Adan with D-Adaptation. Leave LR set to 1 unless you encounter instability. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. decoupled weight decay. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. Default is inf, for unrestricted. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, d0: float = 1e-6, growth_rate: float = float('inf'), eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'd': d0, 'growth_rate': growth_rate, 'k': 0, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'DAdaptAdan' @torch.no_grad() def reset(self): for group in self.param_groups: for p in group['params']: if p.grad is None: continue state = self.state[p] state['step'] = 0 state['s'] = torch.zeros_like(p) state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['exp_avg_diff'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] beta1, beta2, beta3 = group['betas'] growth_rate = group['growth_rate'] d, lr = group['d'], group['lr'] d_lr = float(d * lr) g_sq = torch.tensor([0.0], device=group['params'][0].device) sk_sq_weighted = torch.tensor([0.0], device=group['params'][0].device) sk_l1 = torch.tensor([0.0], device=group['params'][0].device) if 'gsq_weighted' not in group: group['gsq_weighted'] = torch.tensor([0.0], device=group['params'][0].device) gsq_weighted = group['gsq_weighted'] for group in self.param_groups: for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if 'step' not in state: state['step'] = 0 state['s'] = torch.zeros_like(p) state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['exp_avg_diff'] = torch.zeros_like(p) state['previous_grad'] = -grad.clone() grad_diff = state['previous_grad'] grad_diff.add_(grad) exp_avg, exp_avg_sq, exp_avg_diff = state['exp_avg'], state['exp_avg_sq'], state['exp_avg_diff'] exp_avg.mul_(beta1).add_(grad, alpha=d_lr * (1.0 - beta1)) exp_avg_diff.mul_(beta2).add_(grad_diff, alpha=d_lr * (1.0 - beta2)) grad_diff.mul_(beta2).add_(grad) grad_diff = to_real(grad_diff * grad_diff.conj()) exp_avg_sq.mul_(beta3).addcmul_(grad_diff, grad_diff, value=1.0 - beta3) grad_power = to_real(grad * grad.conj()) de_nom = exp_avg_sq.sqrt().add_(group['eps']) g_sq.add_(grad_power.div_(de_nom).sum()) s = state['s'] s.mul_(beta3).add_(grad, alpha=d_lr * (1.0 - beta3)) sk_sq_weighted.add_(to_real(s * s.conj()).div_(de_nom).sum()) sk_l1.add_(s.abs().sum()) state['previous_grad'].copy_(-grad) if sk_l1 == 0: return loss gsq_weighted.mul_(beta3).add_(g_sq, alpha=(d_lr ** 2) * (1.0 - beta3)) # fmt: skip if lr > 0.0: d_hat = (sk_sq_weighted / (1.0 - beta3) - gsq_weighted) / sk_l1 d = max(d, min(d_hat, d * growth_rate)) for group in self.param_groups: group['gsq_weighted'] = gsq_weighted group['d'] = d for p in group['params']: if p.grad is None: continue state = self.state[p] state['step'] += 1 exp_avg, exp_avg_sq, exp_avg_diff = state['exp_avg'], state['exp_avg_sq'], state['exp_avg_diff'] de_nom = exp_avg_sq.sqrt().add_(group['eps']) if group['weight_decouple']: p.mul_(1.0 - d_lr * group['weight_decay']) p.addcdiv_(exp_avg, de_nom, value=-1.0) p.addcdiv_(exp_avg_diff, de_nom, value=-beta2) if not group['weight_decouple']: p.div_(1.0 + d_lr * group['weight_decay']) group['k'] += 1 return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, d0: float = 1e-06, growth_rate: float = inf, eps: float = 1e-08)
[ -0.005270675290375948, -0.04715404286980629, 0.0010796216083690524, 0.032788410782814026, 0.0009036737028509378, -0.005423335824161768, -0.04814762994647026, -0.06400364637374878, -0.03444439172744751, 0.011612562462687492, -0.03361640125513077, 0.01865047961473465, 0.028896858915686607, 0.07489171624183655, -0.035168882459402084, 0.056386131793260574, -0.0017426606500521302, 0.04574646055698395, 0.024736206978559494, -0.0129683967679739, -0.05473015457391739, -0.08230222761631012, -0.01935427077114582, 0.04814762994647026, -0.048354629427194595, -0.013258193619549274, 0.04092341661453247, -0.02221083827316761, -0.03624527156352997, -0.00390966609120369, -0.014458779245615005, -0.061809469014406204, -0.01040162704885006, -0.000016869087630766444, 0.015462717041373253, -0.04346948489546776, 0.015514466911554337, 0.003236924298107624, -0.11053669452667236, -0.03127732872962952, 0.027654873207211494, -0.0410890132188797, 0.047816433012485504, -0.03632806986570358, 0.0018707403214648366, 0.03968143090605736, -0.0370318628847599, 0.05170798674225807, -0.031111732125282288, -0.005004165694117546, 0.05212198197841644, -0.05274297669529915, 0.025274401530623436, 0.010360227897763252, -0.01727394573390484, 0.04628465324640274, 0.07468471676111221, -0.004662619903683662, 0.06743980199098587, -0.0955500677227974, 0.05377796292304993, -0.06959258019924164, 0.02664058469235897, 0.004766118712723255, -0.027240877971053123, -0.015224670059978962, -0.0693855807185173, -0.04868582263588905, -0.006649796385318041, 0.03231231868267059, 0.02324582450091839, -0.030118143185973167, 0.014293180778622627, -0.002861741231754422, -0.02384611777961254, -0.008517948910593987, -0.02548139914870262, -0.0635482519865036, -0.01990281417965889, -0.04195840284228325, 0.026267988607287407, -0.0012859723065048456, -0.010117005556821823, -0.022479934617877007, 0.019074823707342148, -0.038087550550699234, 0.0011766516836360097, -0.017894938588142395, 0.007689958903938532, -0.03684556484222412, 0.024032415822148323, -0.008595573715865612, 0.04860302433371544, 0.04417327791452408, 0.04972081258893013, 0.024467110633850098, -0.0367213673889637, -0.05646893382072449, -0.009097542613744736, -0.013372042216360569, 0.006246150936931372, 0.008750821463763714, 0.013827436603605747, 0.026371488347649574, 0.0024425711017102003, -0.07480891793966293, -0.031049633398652077, -0.007508836220949888, 0.03133942931890488, -0.06950977444648743, -0.045953456312417984, -0.005187876056879759, -0.014665776863694191, -0.009573636576533318, -0.023121627047657967, -0.00958398636430502, -0.022107338532805443, 0.03601757436990738, -0.03607967495918274, 0.046657249331474304, 0.04632605239748955, 0.046947043389081955, -0.06710860878229141, 0.030449340119957924, 0.02471550740301609, -0.016104409471154213, 0.047236841171979904, 0.014282830990850925, 0.04146160930395126, -0.041647907346487045, -0.004779056180268526, 0.020006313920021057, -0.030387241393327713, 0.011229617521166801, 0.030387241393327713, -0.028234466910362244, -0.017543042078614235, 0.03771495446562767, -0.025543497875332832, 0.012378453277051449, 0.03701116144657135, 0.019530219957232475, 0.012595800682902336, -0.01623895764350891, 0.03959863260388374, 0.012481952086091042, 0.04175140708684921, 0.030035344883799553, -0.022873230278491974, -0.0037699430249631405, 0.001605524797923863, 0.006349649745970964, 0.005275850184261799, -0.01752234250307083, 0.016363156959414482, -0.024632709100842476, -0.04092341661453247, 0.026143791154026985, -0.027468575164675713, -0.029538551345467567, -0.030407940968871117, -0.03746655583381653, -0.02452920936048031, 0.0055371844209730625, 0.003420634660869837, 0.0088129211217165, -0.009635736234486103, 0.042517296969890594, -0.031567126512527466, 0.01990281417965889, 0.028710560873150826, -0.054067760705947876, -0.002910903189331293, 0.02891755849123001, -0.04872722551226616, 0.09008533507585526, 0.012864897958934307, 0.019457770511507988, -0.01688065007328987, -0.027302976697683334, 0.05386076495051384, -0.008347176015377045, -0.016766801476478577, -0.04055082052946091, -0.014458779245615005, 0.032664213329553604, 0.009107892401516438, 0.004732481669634581, -0.013392741791903973, 0.02937295287847519, 0.006173701956868172, -0.044918470084667206, 0.01692204922437668, -0.04657445102930069, -0.02815166674554348, 0.02208663895726204, 0.012430203147232533, -0.006153002381324768, 0.07257334142923355, 0.052204784005880356, 0.0018125222995877266, -0.006861968897283077, 0.015980210155248642, -0.02879335917532444, -0.01375498715788126, -0.02330792509019375, -0.026392187923192978, 0.015607615001499653, 0.0020221073646098375, 0.016652952879667282, -0.053488168865442276, 0.020006313920021057, 0.04032312333583832, 0.058373309671878815, 0.04698844254016876, -0.024218713864684105, 0.024819007143378258, 0.04057152196764946, 0.05104559659957886, -0.014303530566394329, 0.0007827095105312765, -0.06657041609287262, 0.004411635454744101, 0.018753977492451668, 0.06371384859085083, -0.03982632979750633, 0.06031908839941025, -0.010468901135027409, -0.009563286788761616, -0.023349324241280556, 0.035293083637952805, -0.0629686564207077, 0.03661786764860153, -0.014065483585000038, 0.05129399523139, 0.04175140708684921, -0.03647296875715256, -0.010681074112653732, -0.0012529820669442415, -0.015690414234995842, -0.02885545790195465, -0.018350332975387573, -0.03489978611469269, 0.0212793480604887, -0.009314890019595623, 0.009025093168020248, 0.05568234249949455, 0.03624527156352997, -0.024260113015770912, 0.011881659738719463, -0.01755339279770851, -0.00874564703553915, -0.03725956007838249, 0.031049633398652077, -0.09165851771831512, -0.01961301825940609, 0.0367213673889637, 0.039495132863521576, 0.001824165927246213, -0.08308881521224976, -0.0024154027923941612, -0.04355228319764137, -0.0810188427567482, 0.04220680147409439, -0.033140309154987335, 0.05319837108254433, 0.07791388034820557, -0.037156060338020325, 0.00840927567332983, 0.022417834028601646, 0.09662646055221558, 0.1054859533905983, -0.07505731284618378, 0.00018613607971929014, -0.018308933824300766, 0.05468875169754028, 0.007146590389311314, 0.0024542147293686867, 0.0080108055844903, 0.002380471909418702, 0.0594496987760067, -0.0410890132188797, -0.03338870406150818, 0.023908216506242752, -0.021776141598820686, 0.04367648437619209, -0.01643560640513897, 0.0029548900201916695, 0.03771495446562767, 0.03974353149533272, 0.04061292111873627, 0.004843742586672306, 0.09132731705904007, -0.0004929129499942064, 0.07712728530168533, 0.024922505021095276, 0.03183622285723686, 0.03107033297419548, -0.018609080463647842, 0.025916093960404396, 0.037093959748744965, -0.004199462942779064, 0.04599485546350479, 0.015928462147712708, -0.04218610003590584, -0.03152572736144066, 0.021258648484945297, -0.001328665530309081, 0.04669864848256111, -0.0088129211217165, -0.01086737122386694, 0.007032741792500019, 0.013568689115345478, 0.03206392005085945, -0.006127127446234226, -0.09728884696960449, -0.005459560547024012, -0.0361417718231678, 0.032788410782814026, 0.05862170830368996, -0.03912253677845001, 0.0483960285782814, 0.018474532291293144, -0.007808982860296965, -0.023121627047657967, -0.036990463733673096, 0.045953456312417984, 0.028586361557245255, -0.024632709100842476, -0.023390723392367363, -0.0541919581592083, -0.040654320269823074, 0.028544962406158447, 0.001355833956040442, -0.01727394573390484, -0.010179104283452034, 0.028400063514709473, 0.0007801220053806901, -0.005588933825492859, -0.04628465324640274, 0.059242699295282364, 0.057503920048475266, -0.045084066689014435, 0.05286717414855957, -0.007700309157371521, -0.0600292906165123, 0.0518735870718956, 0.020627306774258614, 0.0036328069400042295, 0.03071843646466732, -0.020523807033896446, 0.010981219820678234, 0.003322310745716095, 0.09455648064613342, 0.07261474430561066, -0.005030040629208088, -0.018505580723285675, 0.0001363272895105183, 0.038149647414684296, -0.05940829589962959, -0.012761399149894714, 0.030263042077422142, -0.047071244567632675, 0.06520422548055649, 0.08052204549312592, -0.014200031757354736, -0.01752234250307083, -0.0571313239634037, 0.04243449866771698, -0.04218610003590584, 0.013154694810509682, -0.07671329379081726, -0.020430658012628555, 0.012337054125964642, -0.04454587399959564, -0.017284296452999115, -0.03639017045497894, 0.0062720258720219135, 0.03065633773803711, 0.03084263578057289, 0.013185744173824787, -0.011798860505223274, 0.016797851771116257, 0.06338264793157578, 0.038087550550699234, -0.022521333768963814, 0.03537588194012642, -0.032374415546655655, 0.03607967495918274, -0.05758671835064888, 0.05357096716761589, 0.01752234250307083, 0.011229617521166801, 0.032084621489048004, -0.06458323448896408, 0.03906043991446495, 0.04582925885915756, 0.04574646055698395, -0.09116172045469284, -0.017936337739229202, -0.03384409844875336, -0.030407940968871117, -0.007762408349663019, 0.009697834961116314, -0.008564523421227932, -0.07774828374385834, 0.047485239803791046, 0.0839582085609436, -0.018371032550930977, 0.08437220007181168, -0.043096888810396194, 0.007136240601539612, -0.04856162518262863, 0.035065386444330215, -0.02709597907960415, -0.03125663101673126, -0.013154694810509682, 0.03415459766983986, 0.0004935598117299378, 0.027365077286958694, 0.036038272082805634, -0.021879641339182854, 0.036038272082805634, 0.016104409471154213, -0.0011591862421482801, -0.03297470882534981, -0.08205383270978928, 0.004098551347851753, -0.05824911221861839, -0.028255166485905647, 0.005495784804224968, -0.010572399944067001, -0.013372042216360569, -0.025564197450876236, -0.005971879232674837, -0.0006623921799473464, 0.011726411059498787, 0.04773363471031189, 0.026267988607287407, -0.024094514548778534, 0.02156914584338665, -0.021062001585960388, 0.02192104049026966, -0.007891781628131866, -0.015928462147712708, -0.03473418951034546, 0.040840618312358856, -0.003389584831893444, -0.06814359128475189, -0.024819007143378258, 0.029062455520033836, 0.00568208284676075, 0.07294593751430511, 0.02599889226257801, -0.017263595014810562, -0.004432335030287504, 0.01238880306482315, -0.017760390415787697, 0.011571163311600685, 0.0057907565496861935, 0.007840032689273357, 0.020627306774258614, -0.03030444122850895, 0.03980562835931778, -0.02744787558913231, 0.061105675995349884, 0.07422932237386703, -0.01439667958766222, -0.014489828608930111, 0.015131521038711071, 0.00591495493426919, 0.0013118470087647438, -0.012864897958934307, -0.039950527250766754, -0.0442974753677845, -0.007529535796493292, -0.0113641656935215, 0.008849144913256168, 0.010339527390897274, -0.009257965721189976, 0.05224618315696716, -0.08230222761631012, 0.021320747211575508, 0.0431382916867733, 0.018629780039191246, 0.003174824872985482, 0.007420862093567848, 0.015172920189797878, -0.0033119607251137495, 0.03974353149533272, -0.050093408674001694, -0.051790788769721985, 0.065866619348526, -0.001290500396862626, -0.07551270723342896, -0.03740445896983147, -0.00037971112760715187, -0.020171912387013435, 0.08611097931861877, -0.029103856533765793, 0.02885545790195465, -0.01361008919775486, -0.07729288935661316, -0.01526606921106577, 0.03247791528701782, -0.018257183954119682, -0.037445858120918274, 0.05568234249949455, -0.0483960285782814, 0.01701519824564457, -0.03053213842213154, 0.00781933218240738, 0.018826426938176155, 0.03297470882534981, 0.007426036987453699, -0.024901805445551872, 0.022065939381718636, 0.07422932237386703, 0.04150300845503807, -0.044794268906116486, 0.03427879512310028, 0.049638014286756516, -0.02548139914870262, -0.009646086022257805, 0.018546979874372482, 0.05390216410160065, -0.01174711063504219, -0.013920585624873638, 0.03659716621041298, 0.00911824218928814, 0.004753181245177984, 0.005110252182930708, 0.01987176574766636, 0.044504474848508835, -0.00528878765180707, -0.01561796572059393, 0.01247160229831934, -0.04611905291676521, -0.11674661934375763, -0.025729795917868614, -0.006391049362719059, -0.00584250595420599, 0.007048266474157572, -0.052535977214574814, -0.02413591369986534, 0.07278034090995789, -0.021838242188096046, 0.035934776067733765, -0.011995508335530758, -0.02471550740301609, -0.014117233455181122, 0.0036638567689806223, -0.013941285200417042, 0.03463068976998329, 0.0670672059059143, 0.007700309157371521, -0.042765695601701736, 0.015845661982893944, 0.005733832251280546, 0.017853539437055588, -0.04086131602525711, -0.04810623079538345, 0.022169437259435654, -0.030035344883799553, 0.012316354550421238, 0.005249975249171257, 0.0054647354409098625, -0.007213864475488663, -0.06201646849513054, 0.014044784009456635, -0.040716417133808136, -0.025605596601963043, -0.02092745341360569, 0.0022239298559725285, -0.059366896748542786, 0.0006999104516580701, 0.013237493112683296, -0.03245721757411957, -0.013299592770636082, -0.014086183160543442, 0.0577109158039093, -0.02452920936048031, -0.019820015877485275, 0.001193470205180347, 0.036038272082805634, 0.052370380610227585, -0.0699651762843132, 0.038149647414684296, -0.005141301546245813, 0.013806737028062344, -0.019809665158391, 0.026474986225366592, -0.0274064764380455, -0.04175140708684921, -0.013806737028062344, 0.04624325409531593, -0.04003332555294037, 0.0179156381636858, 0.04483566805720329, 0.021382847800850868, -0.05402636155486107, -0.01672540232539177, 0.04752663895487785, -0.019861415028572083, 0.008647322654724121, 0.001703848596662283, 0.02069975435733795, 0.00744673702865839, 0.02260413207113743, -0.06553542613983154, -0.009728885255753994, -0.0005087611498311162, -0.00911824218928814, -0.03158782795071602, -0.05630333349108696, -0.03328520804643631, -0.025957493111491203, 0.030925434082746506, 0.08503459393978119, 0.0025357201229780912, -0.0071724653244018555, 0.03839804604649544, -0.0013881773920729756, 0.017760390415787697, -0.004579820670187473, -0.030925434082746506, 0.021900340914726257, -0.08317161351442337, -0.0021734742913395166, -0.012947697192430496, -0.0004220809496473521, 0.014489828608930111, 0.02512950263917446, -0.019664768129587173, 0.022624831646680832, -0.009822034277021885, 0.06329984962940216, -0.011974808759987354, -0.030511438846588135, -0.03767355531454086, 0.006996517069637775, 0.02227293699979782, -0.0050585027784109116, -0.005454385653138161, -0.004401285666972399, -0.014044784009456635, -0.012699299491941929, -0.011105419136583805, 0.03829454630613327, 0.026392187923192978, -0.011943758465349674, 0.037963349372148514, -0.05191498622298241, -0.027261577546596527, 0.012833848595619202, 0.002108787652105093, -0.00042563871829770505, 0.048230428248643875, 0.017543042078614235, -0.024218713864684105, 0.00648419838398695, -0.013216793537139893, 0.00951671227812767, 0.0076589095406234264, -0.04818902909755707, 0.018888527527451515, -0.01691170036792755, 0.016570154577493668, 0.021672643721103668, 0.0012290480080991983, -0.10126320272684097, -0.027530673891305923, -0.044670071452856064, 0.00879739597439766, 0.0004563649126794189, -0.016777152195572853, 0.03752865642309189, -0.04471147060394287, -0.022252237424254417, -0.016621902585029602, 0.04073711857199669, 0.05386076495051384, 0.0355621799826622, 0.006370349787175655, 0.030635638162493706, -0.025191601365804672, -0.010515475645661354, -0.018816078081727028, 0.027882570400834084, -0.009780634194612503, -0.04388348013162613, -0.027779070660471916, 0.005454385653138161, -0.024984603747725487, 0.042641494423151016, -0.0862765833735466, -0.019561268389225006, -0.01947847008705139, -0.025336500257253647, -0.07075176388025284, -0.007462261710315943, -0.016611553728580475, -0.03537588194012642, 0.017708640545606613, 0.020461708307266235, 0.056510332971811295, 0.01241985335946083, 0.008352351374924183, 0.016228608787059784, -0.031028933823108673, -0.0013014971045777202, 0.02231433615088463, -0.018671179190278053, 0.002737542614340782, 0.022417834028601646, -0.015379917807877064, 0.03835664689540863, -0.02879335917532444, -0.04061292111873627, 0.07033776491880417, -0.018929926678538322, 0.005925304722040892, 0.02535719983279705, 0.010660373605787754, -0.060526084154844284, -0.03508608415722847, 0.026040291413664818, -0.030635638162493706, 0.02931085415184498, -0.024860406294465065, 0.026826882734894753, 0.05096279829740524, -0.0026430999860167503, -0.012088657356798649, -0.010582749731838703, -0.01047925092279911, 0.05717272311449051, 0.011488364078104496, -0.007508836220949888, 0.03899833932518959, -0.003167062532156706, 0.04529106616973877, -0.023266524076461792, -0.025895394384860992, -0.024053115397691727, 0.04160650819540024, -0.03887414187192917, -0.02827586606144905, 0.021900340914726257, -0.049099817872047424, 0.06686020642518997, -0.0025383075699210167, 0.017708640545606613, 0.03345080465078354, 0.059822291135787964, -0.04150300845503807, 0.012233555316925049, -0.06603221595287323, -0.06495583057403564, -0.09306609630584717, 0.009832384064793587, -0.035355180501937866, 0.0611884780228138, 0.015007322654128075, -0.0023610659409314394, 0.017418844625353813, 0.0026379250921308994, -0.005728657357394695 ]
716,167
pytorch_optimizer.optimizer.dadapt
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, d0: float = 1e-6, growth_rate: float = float('inf'), eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'd': d0, 'growth_rate': growth_rate, 'k': 0, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.98, 0.92, 0.99), weight_decay: float = 0.0, weight_decouple: bool = False, d0: float = 1e-06, growth_rate: float = inf, eps: float = 1e-08)
[ 0.010330839082598686, -0.043121688067913055, -0.02777848020195961, -0.013831846415996552, -0.048975832760334015, -0.021216483786702156, -0.08700862526893616, -0.027319330722093582, -0.02909853123128414, 0.028677644208073616, -0.03217865154147148, 0.06095195189118385, 0.02077646553516388, 0.06707393378019333, -0.0585031621158123, 0.03864499181509018, 0.034034375101327896, 0.01754329539835453, -0.008145101368427277, -0.0018186582019552588, -0.0032259959261864424, -0.011344792321324348, -0.03529703617095947, 0.11065477132797241, 0.0007048645638860762, 0.034531787037849426, -0.01072302833199501, 0.017179803922772408, -0.029366368427872658, 0.006715045776218176, 0.010359535925090313, -0.014625790528953075, -0.02435399778187275, 0.054791711270809174, 0.04025201126933098, -0.012894418090581894, -0.009996043518185616, 0.008565987460315228, -0.07357853651046753, 0.04331300035119057, 0.07920309901237488, -0.03263780102133751, 0.062138088047504425, -0.04273906722664833, -0.025903623551130295, 0.0051558539271354675, 0.024908801540732384, 0.05280206725001335, -0.011163045652210712, -0.03828150033950806, 0.030801206827163696, -0.02647755853831768, 0.027338461950421333, -0.025731442496180534, -0.059344932436943054, 0.042930375784635544, 0.05972755700349808, 0.05597784370183945, 0.04258601740002632, 0.013430091552436352, 0.007910744287073612, -0.03535442799329758, 0.020240793004631996, -0.014501437544822693, -0.010177790187299252, -0.009723423980176449, -0.07989182323217392, -0.03036118857562542, 0.012597884982824326, 0.03280998021364212, 0.10376754403114319, -0.004259079694747925, -0.027988921850919724, 0.03818584233522415, -0.014558831229805946, -0.0013009204994887114, -0.07434377819299698, -0.04514959454536438, -0.059344932436943054, 0.002007578732445836, 0.047521863132715225, 0.024411391466856003, -0.028830694034695625, -0.061640676110982895, 0.010589110665023327, -0.043427787721157074, -0.025712311267852783, -0.05257249251008034, 0.017122410237789154, 0.029366368427872658, -0.06615563482046127, -0.020852990448474884, 0.022287828847765923, -0.02567404881119728, 0.07732824981212616, 0.006394598167389631, 0.009699510410428047, -0.050085440278053284, 0.023760931566357613, 0.0027548905927687883, -0.014625790528953075, -0.012741368263959885, -0.04400172457098961, -0.0028983743395656347, -0.0020613851957023144, -0.04511133208870888, -0.05429429933428764, -0.034206558018922806, 0.03719102218747139, -0.07415246963500977, -0.032389093190431595, 0.058732736855745316, -0.010206487029790878, 0.029595941305160522, -0.045876581221818924, 0.026879314333200455, 0.01981990598142147, 0.026898445561528206, 0.00836032722145319, 0.01935119368135929, 0.038224104791879654, 0.034053508192300797, -0.03259953856468201, 0.058388374745845795, 0.0422799177467823, -0.006471123080700636, 0.0117656784132123, 0.004859320819377899, 0.02418181672692299, -0.014587528072297573, 0.04484349489212036, -0.0020027959253638983, -0.035985756665468216, -0.02402876690030098, 0.02288089692592621, -0.018251148983836174, -0.001842572120949626, 0.047024451196193695, -0.02699410170316696, 0.017342418432235718, 0.07024970650672913, -0.002599449595436454, 0.03933371603488922, -0.01605106331408024, 0.00008534301741747186, 0.031107304617762566, -0.004326038993895054, -0.023646144196391106, -0.011756112799048424, 0.04583831876516342, 0.02242174744606018, 0.016940664499998093, -0.009355149231851101, 0.025042720139026642, 0.010254315100610256, -0.04844015836715698, 0.005189333576709032, -0.016452819108963013, -0.008365110494196415, 0.012310916557908058, -0.014654487371444702, 0.023818323388695717, 0.02791239693760872, -0.02450704760849476, -0.014721446670591831, 0.024736620485782623, -0.04511133208870888, 0.011727415956556797, -0.014884061180055141, -0.015811923891305923, 0.009197317063808441, -0.08310586214065552, -0.027166280895471573, 0.02291915938258171, 0.0029438110068440437, 0.041170306503772736, 0.030667288228869438, -0.003869282081723213, -0.0027261937502771616, -0.014903192408382893, 0.07105321437120438, -0.0008931871852837503, -0.022517403587698936, -0.05747007578611374, 0.01836593635380268, 0.014539700001478195, -0.0389702208340168, 0.0503532774746418, -0.039678074419498444, 0.035469215363264084, 0.03701884299516678, 0.01357357483357191, 0.016031932085752487, 0.015563217923045158, -0.008790778927505016, 0.026764526963233948, 0.04599136859178543, -0.018729429692029953, -0.009254710748791695, 0.057240504771471024, 0.07943267375230789, 0.02207738719880581, 0.02159910649061203, -0.03933371603488922, 0.021159090101718903, -0.0015639743069186807, -0.01897813379764557, -0.0011538495309650898, -0.019217275083065033, -0.03139427304267883, -0.00940775964409113, -0.01605106331408024, 0.03766930103302002, 0.025712311267852783, -0.012932680547237396, -0.04576179385185242, -0.009613419882953167, 0.016806745901703835, 0.00949385017156601, -0.010617807507514954, 0.10116570442914963, -0.029442893341183662, -0.006341987755149603, -0.0026711917016655207, 0.04576179385185242, 0.013784018345177174, 0.0454939566552639, -0.049281928688287735, -0.08134579658508301, 0.031776897609233856, -0.02695583924651146, -0.0519985593855381, -0.015572783537209034, -0.01404228899627924, 0.016931097954511642, 0.007939441129565239, -0.037918008863925934, 0.030475975945591927, -0.08723820000886917, -0.026534952223300934, 0.05111852288246155, 0.034971803426742554, -0.005543260835111141, -0.020680809393525124, 0.017763303592801094, 0.0005628752987831831, 0.03983112424612045, 0.00746594462543726, -0.06592606008052826, -0.03170037269592285, -0.042968638241291046, -0.01227265503257513, 0.0009888430358842015, 0.03382393345236778, -0.049167145043611526, 0.016165850684046745, 0.03929545357823372, -0.010369101539254189, 0.016624998301267624, -0.014070985838770866, -0.010914340615272522, -0.005849359557032585, -0.025080982595682144, 0.08517203480005264, -0.005275424104183912, 0.026515820994973183, 0.012263089418411255, -0.02048949897289276, 0.018805954605340958, -0.00011956990056205541, 0.13835673034191132, 0.037439726293087006, -0.006801135838031769, -0.006255897227674723, -0.008154666982591152, -0.016682391986250877, 0.006193720735609531, -0.04109378531575203, -0.009613419882953167, 0.0503915399312973, 0.03529703617095947, -0.04304516315460205, 0.01552495639771223, 0.011976120993494987, 0.006451991852372885, 0.006466340273618698, -0.020374711602926254, 0.011172611266374588, 0.0005024925339967012, 0.014587528072297573, 0.011909161694347858, 0.008738168515264988, 0.07193325459957123, 0.03139427304267883, 0.09802819043397903, -0.024277472868561745, 0.05153940990567207, -0.00617458950728178, 0.0632094293832779, -0.0012082539033144712, 0.046220939606428146, -0.041323356330394745, 0.07384636998176575, -0.007312895264476538, -0.05329947918653488, -0.04476696997880936, 0.04759838804602623, 0.014855364337563515, 0.0276254303753376, 0.05161593481898308, 0.029787253588438034, 0.0373058095574379, 0.05490649864077568, 0.020011218264698982, 0.028161102905869484, -0.06672956794500351, 0.007618993986397982, -0.06405120342969894, 0.03378567099571228, 0.04082594811916351, -0.006050236988812685, 0.027721086516976357, 0.003039466915652156, -0.023971373215317726, -0.07277502119541168, -0.05502128601074219, 0.026190591976046562, 0.028486333787441254, -0.041017260402441025, -0.006155458278954029, -0.04120856896042824, -0.018098101019859314, 0.023167863488197327, -0.030648157000541687, -0.0374014638364315, 0.005347165744751692, 0.012320482172071934, 0.05226639658212662, -0.009881257079541683, -0.03168123960494995, 0.09481415152549744, -0.028543727472424507, -0.012884852476418018, 0.04006069898605347, -0.008188147097826004, -0.0422033928334713, 0.0251766387373209, -0.01950424164533615, 0.042930375784635544, 0.00828858558088541, -0.0178780909627676, 0.015831055119633675, -0.005959363654255867, 0.08211104571819305, 0.021388662979006767, -0.02808457799255848, -0.017954615876078606, 0.0005180365988053381, 0.029481153935194016, -0.03797540068626404, -0.031241223216056824, 0.005528912413865328, -0.050774164497852325, 0.05945971980690956, 0.017170237377285957, -0.022345222532749176, 0.012731802649796009, -0.03805192559957504, 0.025234032422304153, 0.01072302833199501, 0.02550186775624752, -0.05877099931240082, -0.03495267406105995, -0.0005090688355267048, 0.018777256831526756, -0.007566383108496666, -0.03168123960494995, 0.008977307938039303, 0.04801927134394646, -0.0027740218210965395, -0.006848963908851147, -0.0037688433658331633, 0.06481645256280899, 0.03261866793036461, 0.006380249746143818, -0.02469835802912712, 0.005677178967744112, 0.015371906571090221, 0.056781355291604996, -0.006179372314363718, 0.005911536049097776, -0.008494245819747448, 0.01900683157145977, -0.006815484259277582, -0.06795396655797958, 0.034531787037849426, 0.0519985593855381, 0.03835802525281906, -0.0535673163831234, -0.027855003252625465, -0.011354357935488224, -0.04690966382622719, -0.02223043516278267, 0.035641394555568695, -0.010952603071928024, -0.008609033189713955, 0.011335226707160473, 0.04568526893854141, 0.009359931573271751, 0.06910184025764465, -0.011823072098195553, -0.007834220305085182, -0.027013232931494713, 0.0017469162121415138, -0.03282911330461502, -0.028696775436401367, -0.00475649069994688, -0.00046512691187672317, 0.022364353761076927, -0.003950589336454868, 0.02957681007683277, 0.006753308232873678, 0.07575949281454086, 0.011392620392143726, 0.06519907712936401, 0.058732736855745316, -0.0276254303753376, -0.0007640516851097345, 0.004581918474286795, -0.05261075496673584, -0.04438434913754463, -0.003481875406578183, -0.043466050177812576, -0.03085860051214695, 0.028390677645802498, 0.00661938963457942, -0.007217239122837782, 0.002716628136113286, -0.0052706412971019745, -0.022995684295892715, 0.0020948646124452353, -0.0666530430316925, 0.018959004431962967, -0.030954256653785706, -0.05437082424759865, -0.023646144196391106, 0.025884492322802544, -0.0032953463960438967, -0.03141340613365173, -0.018605075776576996, 0.036961447447538376, 0.012444835156202316, 0.048325370997190475, -0.001371466787531972, -0.033690016716718674, -0.02257479727268219, -0.009345583617687225, -0.01739024557173252, 0.046718351542949677, -0.017017187550663948, 0.04534090682864189, -0.020661678165197372, -0.009120792150497437, -0.01169871911406517, -0.05601610615849495, 0.029194187372922897, 0.06278854608535767, -0.02079559676349163, -0.00559587124735117, 0.003804714186117053, 0.0014946237206459045, 0.02324438840150833, 0.03363262116909027, -0.0374014638364315, -0.05134809762239456, 0.015649309381842613, -0.00479236152023077, -0.030112484470009804, -0.009101660922169685, -0.021541712805628777, 0.010923906229436398, -0.04886104539036751, 0.007461161818355322, 0.07373158633708954, 0.010235183872282505, -0.008609033189713955, -0.061985038220882416, 0.010780422016978264, 0.025272294878959656, 0.04270080476999283, -0.08050402253866196, -0.014109248295426369, 0.02921331860125065, 0.04606788977980614, -0.029481153935194016, -0.012110039591789246, 0.03189168497920036, 0.012712671421468258, 0.042318180203437805, 0.017093712463974953, 0.0066098240204155445, -0.03384306654334068, -0.028352415189146996, -0.03311607986688614, 0.01900683157145977, -0.04128509387373924, -0.0746116191148758, 0.009034701623022556, -0.04044332355260849, -0.006270245648920536, -0.027721086516976357, 0.004498219583183527, -0.028161102905869484, 0.014893626794219017, -0.04254775494337082, -0.026936708018183708, -0.04503480717539787, 0.07063233107328415, 0.002640103455632925, -0.02699410170316696, 0.060186706483364105, 0.062138088047504425, 0.03787974640727043, -0.03292476758360863, 0.0056676133535802364, 0.04128509387373924, 0.02127387747168541, -0.047024451196193695, 0.07824654132127762, 0.02550186775624752, -0.0007813893025740981, -0.059536244720220566, -0.05169245973229408, 0.051080260425806046, -0.013860543258488178, 0.03585183992981911, 0.01606062985956669, -0.026209723204374313, -0.05819706246256828, -0.02515750750899315, 0.018786823377013206, 0.023913979530334473, 0.016825877130031586, -0.05023849010467529, -0.009890821762382984, 0.008097273297607899, -0.036923184990882874, 0.07116800546646118, -0.045417431741952896, -0.019552070647478104, 0.027089755982160568, -0.03365175426006317, -0.04503480717539787, 0.020508630201220512, 0.03101165033876896, -0.020585153251886368, 0.007781608961522579, -0.006069368217140436, 0.05555696040391922, 0.0227278470993042, -0.014788405038416386, -0.005983277689665556, -0.01007256843149662, -0.004462348762899637, 0.0029270711820572615, 0.0012889634817838669, 0.003434047568589449, -0.02062341570854187, -0.07269849628210068, 0.015821488574147224, -0.0011221634922549129, 0.0004971118760295212, 0.004931062925606966, 0.011057824827730656, -0.03455092012882233, 0.010589110665023327, -0.015381472185254097, 0.025731442496180534, -0.057240504771471024, -0.03545008599758148, 0.007905961945652962, -0.031279485672712326, -0.1170063242316246, -0.07487945258617401, 0.035794444382190704, 0.0004639312101062387, -0.06917836517095566, 0.011335226707160473, -0.013937067240476608, 0.025941886007785797, -0.003190124873071909, 0.048325370997190475, -0.021197352558374405, -0.019839037209749222, -0.044920019805431366, 0.022995684295892715, -0.03120296075940132, -0.019523372873663902, 0.03753538429737091, 0.056628305464982986, -0.07652473449707031, -0.007231587544083595, 0.02113995887339115, 0.021235615015029907, -0.0006139914621599019, -0.006743742618709803, -0.005509781185537577, 0.047827959060668945, 0.020910384133458138, -0.07235413789749146, 0.013277041725814342, -0.011411751620471478, -0.00046183873200789094, -0.012205695733428001, -0.018911175429821014, -0.04939671605825424, -0.04074942320585251, 0.012291786260902882, 0.08172842115163803, -0.011287398636341095, 0.003386219497770071, -0.039410240948200226, -0.005404559429734945, 0.047330550849437714, -0.0697140321135521, -0.02875416912138462, 0.00965168233960867, -0.11356271058320999, 0.005485867150127888, -0.0405963733792305, 0.04469044506549835, -0.018911175429821014, -0.015534522011876106, -0.057393550872802734, 0.0038214540109038353, 0.02194346860051155, 0.023340044543147087, 0.010015174746513367, 0.02988290973007679, -0.0195138081908226, 0.013047467917203903, 0.0503532774746418, -0.007719432935118675, -0.012808327563107014, -0.01047432329505682, -0.044728707522153854, -0.028295021504163742, -0.0002155247493647039, 0.04633572697639465, 0.042624279856681824, -0.024640964344143867, 0.03908500820398331, -0.04403998702764511, -0.009862125851213932, -0.012970943003892899, -0.0011664043413475156, 0.018088534474372864, 0.01835637167096138, 0.055480435490608215, -0.025291426107287407, -0.027357593178749084, -0.01885378174483776, 0.0389702208340168, 0.018002444878220558, 0.004309299401938915, 0.001744524808600545, -0.04415477439761162, -0.0056436993181705475, -0.019217275083065033, -0.02906026877462864, -0.0632859542965889, -0.005901970434933901, -0.03918066620826721, 0.006050236988812685, 0.008121187798678875, 0.011746547184884548, -0.0519602969288826, -0.024717489257454872, 0.03346044197678566, -0.018624207004904747, 0.05747007578611374, 0.043619100004434586, 0.0032451271545141935, -0.0470627136528492, 0.01299007423222065, -0.008805127814412117, -0.06619389355182648, 0.03349870443344116, -0.012951811775565147, -0.027089755982160568, -0.04778969660401344, -0.015285816043615341, 0.01978164352476597, -0.007408550940454006, 0.02664973959326744, -0.03634924814105034, -0.05945971980690956, -0.07266023755073547, 0.0068776607513427734, -0.024487916380167007, -0.007585514336824417, 0.0024894452653825283, -0.059038832783699036, 0.07671605050563812, -0.020661678165197372, 0.022938290610909462, 0.01080911885946989, 0.003338391659781337, 0.017495468258857727, -0.05429429933428764, 0.02777848020195961, 0.041667718440294266, 0.026056673377752304, -0.08142232149839401, -0.011411751620471478, 0.03233170136809349, 0.040519848465919495, -0.009967346675693989, -0.046718351542949677, 0.006246331613510847, -0.035813577473163605, -0.009709076024591923, 0.029595941305160522, -0.003139905631542206, 0.008250323124229908, -0.08019792288541794, -0.015161463059484959, 0.01087607815861702, 0.03510572388768196, -0.026056673377752304, 0.03860672935843468, 0.02400963567197323, -0.02971072867512703, -0.022440878674387932, 0.014979717321693897, -0.03655969351530075, 0.03963981196284294, 0.01201438345015049, 0.07376984506845474, 0.07564470171928406, 0.004553221631795168, 0.04136161878705025, -0.047024451196193695, -0.009001222439110279, 0.007116800639778376, 0.04698618873953819, -0.016481515020132065, -0.014070985838770866, 0.07074712216854095, -0.009996043518185616, -0.0031733852811157703, -0.0259801484644413, 0.008135535754263401, 0.028295021504163742, 0.06787744164466858, -0.04434608668088913, 0.017007622867822647, -0.03680839762091637, -0.0681835412979126, -0.09504372626543045, -0.0022228043526411057, -0.05081242695450783, 0.07874395698308945, 0.01477883942425251, 0.014597093686461449, 0.025922754779458046, 0.04771317169070244, 0.004089290741831064 ]
716,170
pytorch_optimizer.optimizer.dadapt
__str__
null
def __str__(self) -> str: return 'DAdaptAdan'
(self) -> str
[ 0.012147052213549614, -0.00791556853801012, 0.06405441462993622, -0.02535414882004261, 0.005786793306469917, -0.05341922491788864, 0.015483581461012363, 0.006112626288086176, 0.06457574665546417, -0.04003835469484329, -0.07093600928783417, 0.01565735973417759, -0.016752157360315323, 0.024311482906341553, 0.012346896342933178, 0.00436398945748806, -0.015570471063256264, -0.018872244283556938, -0.016595758497714996, 0.04254075139760971, 0.0071770139038562775, 0.00916676688939333, -0.005113405175507069, -0.0032214017119258642, -0.01911553367972374, 0.06474952399730682, -0.004739783238619566, -0.044278524816036224, -0.02511085942387581, 0.008436901494860649, -0.0135894063860178, -0.03934324160218239, -0.01237296313047409, 0.0072769359685480595, -0.03260067477822304, 0.03063698671758175, -0.023911794647574425, 0.004665927961468697, -0.05022171884775162, -0.011399809271097183, -0.0009438294800929725, -0.006686092354357243, 0.026275169104337692, -0.01633509248495102, -0.022156640887260437, -0.015596536919474602, -0.021444153040647507, 0.02314717322587967, -0.01758629083633423, 0.01779482327401638, 0.007959012873470783, 0.019132910296320915, -0.040455419570207596, -0.0014412677846848965, -0.040316399186849594, 0.02735259011387825, 0.044591326266527176, 0.027665389701724052, 0.0008270726539194584, 0.012468541041016579, -0.04104626178741455, -0.022938640788197517, 0.06520134955644608, -0.038821909576654434, -0.0415675975382328, 0.03948226571083069, -0.0035385459195822477, 0.03816155716776848, 0.03298298269510269, 0.044348038733005524, 0.030289432033896446, -0.04615532234311104, -0.01262494083493948, 0.030080897733569145, 0.06262943893671036, -0.03254853934049606, -0.07368168979883194, -0.013207095675170422, 0.011104387231171131, -0.051264382898807526, 0.022921262308955193, -0.015361937694251537, -0.015075204893946648, 0.010244187898933887, -0.012103607878088951, -0.08709731698036194, -0.025666948407888412, -0.04938758537173271, -0.018125001341104507, 0.0032257463317364454, -0.026431569829583168, -0.01871584542095661, -0.024554770439863205, 0.07694870978593826, -0.05741611123085022, 0.0005053125787526369, 0.004865772090852261, -0.052446071058511734, 0.025475792586803436, 0.019775887951254845, 0.01194720808416605, 0.019602110609412193, -0.00526980496942997, -0.004025123082101345, -0.05296740308403969, -0.02549317106604576, -0.0271788127720356, 0.038960933685302734, -0.018385667353868484, 0.011921141296625137, -0.05602588877081871, 0.008584612049162388, 0.033400051295757294, -0.0011458458611741662, 0.008028523996472359, -0.06016179546713829, 0.011495386250317097, -0.014510427601635456, 0.010174676775932312, 0.004883149638772011, 0.028412632644176483, 0.02453739382326603, -0.06620925664901733, -0.015570471063256264, 0.022191395983099937, 0.07764381915330887, -0.03659755736589432, -0.02250419557094574, 0.04233221709728241, -0.02874281071126461, 0.05425335839390755, 0.014336650259792805, -0.05995326489210129, -0.014640760608017445, 0.07152684777975082, -0.007255213800817728, 0.05029122903943062, 0.009027744643390179, 0.023842282593250275, 0.14583414793014526, -0.0205405093729496, 0.020071309059858322, 0.07729626446962357, 0.04476510360836983, -0.013910895213484764, 0.011729986406862736, -0.024520015344023705, 0.05838926509022713, -0.024971837177872658, -0.0048092943616211414, 0.011286853812634945, 0.018767978996038437, 0.013832694850862026, -0.004600761458277702, -0.017447268590331078, -0.006755603011697531, -0.01982802152633667, -0.01864633336663246, 0.02606663666665554, -0.029368409886956215, -0.008562889881432056, -0.05366251617670059, -0.00831960141658783, 0.038821909576654434, -0.0032952572219073772, 0.010409276932477951, -0.019480466842651367, 0.021548420190811157, 0.0018974338890984654, 0.009679410606622696, -0.013850072398781776, -0.06200383976101875, -0.09105944633483887, 0.044591326266527176, -0.01627426967024803, 0.021617930382490158, 0.018628956750035286, 0.09133749455213547, 0.03826582059264183, -0.03586769104003906, 0.014823227189481258, 0.010444032028317451, -0.034390583634376526, 0.022834373638033867, 0.06280321627855301, -0.05355824902653694, 0.018698466941714287, 0.029072988778352737, 0.05237656086683273, -0.020314598456025124, 0.014649449847638607, 0.021948108449578285, -0.037709735333919525, -0.0272135678678751, -0.027196191251277924, -0.06408917158842087, 0.0012283902615308762, -0.05922339856624603, -0.008210990577936172, 0.008119757287204266, -0.0013619817327708006, 0.04424377158284187, 0.0003975162107963115, 0.04264501854777336, 0.0613434836268425, 0.021339885890483856, 0.02660534717142582, -0.021374640986323357, 0.012598874047398567, -0.03412991389632225, 0.06294223666191101, 0.010565676726400852, 0.007798268459737301, 0.006134348455816507, 0.03704937919974327, -0.06116970628499985, 0.0014760232297703624, -0.008019834756851196, -0.0017171396175399423, 0.001398909487761557, 0.04090724140405655, -0.011981964111328125, 0.016891179606318474, -0.011139142327010632, -0.027769656851887703, -0.02043624222278595, 0.03459911420941353, -0.02785654552280903, -0.02935103327035904, -0.023668505251407623, -0.008445589803159237, -0.08925215899944305, -0.046051058918237686, 0.021982863545417786, 0.034686002880334854, 0.03452960401773453, -0.04358341544866562, -0.006277714855968952, -0.07326462864875793, -0.03718839958310127, -0.0036493290681391954, 0.015787692740559578, -0.00109479867387563, 0.016491491347551346, 0.03663231432437897, -0.048727232962846756, -0.02806507796049118, 0.00918414443731308, -0.027300456538796425, -0.04062919691205025, 0.05084731802344322, -0.0546356700360775, -0.018159756436944008, -0.004020778462290764, -0.015718182548880577, -0.058180730789899826, -0.04365292564034462, 0.01836828887462616, 0.011999341659247875, -0.027074545621871948, -0.07340364903211594, -0.0343036949634552, -0.05383629351854324, 0.04924856498837471, 0.0014108567265793681, 0.03063698671758175, -0.021565796807408333, 0.027404723688960075, 0.03996884077787399, -0.03331316262483597, 0.09418744593858719, 0.032896094024181366, -0.07409875839948654, 0.028499523177742958, -0.03680609166622162, 0.008597645908594131, 0.00998352188616991, 0.0205405093729496, -0.09905321896076202, -0.03426893800497055, -0.012572807259857655, -0.0414285734295845, -0.01847255602478981, 0.03798777610063553, -0.02453739382326603, -0.0413590632379055, 0.037883512675762177, -0.019602110609412193, 0.001767100766301155, 0.04497363790869713, 0.08570709824562073, 0.0406639538705349, -0.0023720639292150736, 0.005061272066086531, 0.027769656851887703, 0.023008150979876518, 0.05727708712220192, 0.02507610432803631, -0.00650797039270401, 0.006069181952625513, -0.04413950443267822, -0.045946791768074036, 0.030584853142499924, -0.014475671574473381, -0.06005752831697464, -0.015544404275715351, -0.018854867666959763, -0.012129674665629864, 0.029681209474802017, 0.007333413697779179, -0.014527805149555206, 0.0343036949634552, 0.0338866263628006, 0.08654123544692993, 0.003875239985063672, 0.06144775077700615, -0.009340544231235981, 0.011417186819016933, 0.033400051295757294, 0.0686073899269104, -0.04219319671392441, 0.03784875571727753, -0.04636385664343834, -0.0034690347965806723, 0.01864633336663246, 0.005799826700240374, -0.02186121977865696, 0.04646812379360199, 0.02471117116510868, 0.04090724140405655, -0.04660714417695999, -0.03972555324435234, 0.027161434292793274, -0.02639681287109852, -0.018993888050317764, 0.028308367356657982, 0.029229387640953064, -0.03555489331483841, -0.02474592626094818, -0.020488375797867775, 0.09154602885246277, 0.010461409576237202, -0.0476498119533062, 0.03277445212006569, 0.02610139176249504, 0.04612056910991669, -0.04257550463080406, 0.006920692045241594, 0.018246645107865334, 0.02332095056772232, -0.03378235921263695, -0.016665268689393997, 0.010774210095405579, 0.03784875571727753, 0.03199245035648346, 0.008350012823939323, -0.017429890111088753, 0.06794703006744385, -0.022121885791420937, 0.009679410606622696, -0.009662033058702946, -0.07472435384988785, -0.0042944783344864845, 0.028395256027579308, -0.016595758497714996, -0.00914938934147358, -0.021913351491093636, -0.009757610969245434, 0.07402924448251724, -0.03558964654803276, -0.01986277662217617, 0.013042006641626358, -0.01630033738911152, -0.01634378172457218, -0.016856424510478973, 0.043096840381622314, 0.03843959793448448, 0.026188280433416367, -0.03850911185145378, 0.0007461574859917164, 0.04097675159573555, -0.006221237126737833, 0.014762405306100845, 0.05984899774193764, 0.013311361894011497, -0.019480466842651367, 0.029437921941280365, 0.02125299721956253, -0.02193072997033596, -0.0308107640594244, -0.004203245043754578, -0.03268756344914436, -0.01789909042418003, 0.005717282183468342, -0.0549137145280838, -0.07024089246988297, -0.024311482906341553, -0.017846956849098206, -0.07263902574777603, 0.028690677136182785, 0.004796260967850685, -0.048414431512355804, -0.028308367356657982, 0.01836828887462616, -0.0308107640594244, 0.026431569829583168, 0.040281642228364944, 0.01704758033156395, -0.03498142585158348, -0.012902985326945782, 0.01829877868294716, 0.00003794596341322176, -0.050047941505908966, -0.03816155716776848, 0.06287273019552231, 0.03520733490586281, -0.039099954068660736, -0.006912003271281719, -0.008376078680157661, -0.026622723788022995, -0.02863854356110096, 0.018125001341104507, 0.014249761588871479, 0.043062083423137665, 0.016187380999326706, 0.022921262308955193, 0.012781340628862381, 0.06151726096868515, 0.052724115550518036, -0.008128446526825428, -0.02935103327035904, 0.01857682317495346, -0.01653493568301201, -0.05849353224039078, 0.022869128733873367, -0.028290988877415657, 0.005295871756970882, -0.02521512657403946, -0.024971837177872658, -0.0019006922375410795, 0.005217671860009432, -0.05279362574219704, -0.0028217134531587362, 0.007094469387084246, -0.004913561046123505, -0.038856666535139084, -0.039065197110176086, -0.007381202653050423, 0.029802853241562843, -0.030445830896496773, -0.015570471063256264, 0.03558964654803276, 0.00872797891497612, -0.03857862204313278, 0.039134711027145386, -0.03732742369174957, -0.004783227574080229, -0.05334971472620964, 0.012772651389241219, 0.028308367356657982, -0.05049976333975792, 0.023164549842476845, -0.03470338135957718, 0.019237177446484566, 0.020175576210021973, 0.025910235941410065, -0.0000263721049122978, 0.023129794746637344, -0.04365292564034462, 0.0023568584583699703, 0.027752278372645378, -0.022660596296191216, -0.014623383060097694, -0.022382551804184914, 0.006286403629928827, 0.038856666535139084, -0.03237476199865341, -0.012816095724701881, -0.0006500367308035493, 0.0023221028968691826, -0.041602350771427155, -0.054218605160713196, -0.0023568584583699703, 0.06328979134559631, -0.027022412046790123, 0.0004770737432409078, -0.029785476624965668, 0.023008150979876518, -0.05626918002963066, -0.0014803677331656218, 0.0415675975382328, 0.029698587954044342, -0.047267500311136246, -0.025162992998957634, -0.0063385372050106525, 0.07138782739639282, -0.01932406611740589, -0.044382791966199875, -0.08459492027759552, 0.006221237126737833, 0.019376199692487717, -0.039030443876981735, -0.03459911420941353, -0.01565735973417759, 0.03246165066957474, -0.0022808306384831667, 0.013824006542563438, 0.007194391451776028, -0.010470098815858364, -0.030584853142499924, -0.003571129171177745, -0.03480764850974083, 0.028395256027579308, 0.029003476724028587, 0.03260067477822304, 0.008467311970889568, -0.004235828295350075, 0.0169433131814003, -0.01793384552001953, 0.0308455191552639, 0.0028542967047542334, -0.029576942324638367, -0.03386924788355827, -0.05063878372311592, -0.0119298305362463, 0.0408724844455719, -0.02107921987771988, 0.0241377055644989, -0.03331316262483597, 0.08355225622653961, 0.008258779533207417, 0.03823106735944748, 0.021200863644480705, 0.06144775077700615, 0.01921979896724224, 0.0824400782585144, -0.08584611862897873, 0.02403343841433525, -0.005334971472620964, 0.046016301959753036, -0.004009917378425598, -0.0616910383105278, -0.009549077600240707, -0.06012704223394394, 0.03781399875879288, -0.029333654791116714, -0.011191275902092457, 0.0019810644444078207, 0.052724115550518036, 0.0059431931003928185, 0.001063844538293779, -0.01735169067978859, -0.030584853142499924, -0.021426774561405182, 0.015231604687869549, 0.07048418372869492, -0.00984449964016676, 0.009383989498019218, 0.05015220865607262, 0.02104446478188038, -0.04466083645820618, -0.020905442535877228, 0.07806088775396347, 0.05710330978035927, 0.03837008774280548, 0.04254075139760971, -0.00987925473600626, 0.034008271992206573, -0.0017388619016855955, -0.05192473903298378, -0.009436122141778469, -0.05901486426591873, 0.013989094644784927, 0.06627877056598663, -0.09849712997674942, 0.06666107475757599, 0.06023130565881729, 0.01769055798649788, -0.023685883730649948, 0.029194632545113564, -0.0408724844455719, 0.05209851637482643, -0.009105945006012917, -0.006781669799238443, -0.031001919880509377, 0.00729431351646781, -0.0037818343844264746, -0.009262344799935818, 0.03239214047789574, -0.08973874151706696, -0.05237656086683273, -0.01627426967024803, -0.036354269832372665, -0.0054044825956225395, 0.041532840579748154, -0.05334971472620964, -0.02650108002126217, -0.020922819152474403, 0.04386145994067192, -0.006073526106774807, 0.012859540991485119, 0.02342521771788597, -0.004526905715465546, 0.028238855302333832, 0.0952996239066124, 0.06238614767789841, 0.019237177446484566, -0.001693245256319642, -0.032722316682338715, 0.01239034067839384, -0.014910115860402584, 0.014102050103247166, -0.011564897373318672, -0.0238596610724926, -0.01670871302485466, -0.03979506343603134, 0.046016301959753036, -0.03555489331483841, -0.028430011123418808, 0.04222794994711876, 0.015396692790091038, 0.09349233657121658, -0.03412991389632225, 0.041532840579748154, -0.03673657774925232, 0.013215784914791584, -0.0021179141476750374, -0.007989424280822277, 0.05786793306469917, -0.05710330978035927, 0.03916946426033974, 0.005938848480582237, -0.017125779762864113, -0.06123921647667885, -0.05960570648312569, 0.003933889791369438, 0.029611699283123016, 0.015613915398716927, -0.002797818975523114, 0.029907120391726494, -0.0058041708543896675, 0.021513663232326508, -0.014249761588871479, 0.03195769712328911, -0.036250002682209015, 0.012468541041016579, -0.07006711512804031, -0.07611458003520966, -0.05171620473265648, -0.04521692544221878, -0.0479973666369915, 0.020888064056634903, -0.017734002321958542, 0.02043624222278595, 0.01996704377233982, -0.027752278372645378, -0.019463088363409042, 0.05178571864962578, -0.028482144698500633, -0.015500959940254688, 0.010730764828622341, -0.05508749186992645, 0.016126558184623718, -0.06381112337112427, 0.0953691303730011, 0.029889743775129318, -0.007537602446973324, -0.018229268491268158, -0.031140942126512527, -0.04789309948682785, -0.020158199593424797, 0.03280920535326004, 0.019132910296320915, -0.06516659259796143, -0.0016476286109536886, 0.01772531308233738, 0.021513663232326508, 0.004277100786566734, 0.08800096064805984, -0.04685043543577194, 0.01640460267663002, -0.01445829402655363, 0.03183605149388313, -0.05567833408713341, 0.015909336507320404, 0.04970038682222366, -0.06280321627855301, -0.021809086203575134, 0.01398040633648634, -0.062455661594867706, -0.06016179546713829, -0.045842524617910385, -0.031401608139276505, 0.0065427254885435104, 0.09898370504379272, 0.0027543746400624514, 0.001070361235179007, -0.011182586662471294, -0.04532119259238243, -0.0068555255420506, 0.048449188470840454, 0.03979506343603134, -0.0003206739202141762, 0.003065001918002963, 0.006586170289665461, -0.018854867666959763, -0.011921141296625137, 0.012103607878088951, 0.014762405306100845, -0.016361158341169357, 0.08362177014350891, 0.06801654398441315, -0.04236697405576706, 0.004177178256213665, 0.04549496993422508, -0.07548897713422775, -0.005573915783315897, 0.04396572709083557, 0.008662812411785126, 0.03258329629898071, -0.009071188978850842, -0.02399868331849575, -0.005660804454237223, 0.01756022311747074, 0.041637107729911804, 0.06287273019552231, -0.024971837177872658, -0.010174676775932312, -0.07451582700014114, -0.021461529657244682, -0.004948316607624292, 0.03996884077787399, -0.03520733490586281, 0.03164489567279816, 0.011078320443630219, 0.02670961245894432, 0.054079581052064896, 0.030324187129735947, 0.06315077096223831, 0.04598154500126839, 0.02867330051958561, 0.03247902914881706, 0.014805849641561508, -0.0017714451532810926, -0.0025675636716187, 0.04229746013879776, 0.008363045752048492, 0.018681088462471962, -0.029090365394949913, 0.023407839238643646, 0.0678427666425705, 0.03965604305267334, -0.011008809320628643, 0.028412632644176483, 0.008736667223274708, -0.06457574665546417, 0.009210211224853992, 0.01640460267663002, 0.010913231410086155, -0.03195769712328911, 0.013545962050557137, -0.03694511204957962, 0.02610139176249504, -0.01864633336663246, -0.016430670395493507, 0.04549496993422508, -0.002858641091734171, -0.0009134183637797832 ]
716,206
pytorch_optimizer.optimizer.dadapt
DAdaptLion
Lion with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay.
class DAdaptLion(Optimizer, BaseOptimizer): r"""Lion with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. """ def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.9, 0.999), d0: float = 1e-6, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'd': d0, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'step': 0, } super().__init__(params, defaults) def __str__(self) -> str: return 'DAdaptLion' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: if p.grad is None: continue state = self.state[p] state['exp_avg'] = torch.zeros_like(p) state['s'] = torch.zeros_like(p) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] device = group['params'][0].device if 'numerator_weighted' not in group: group['numerator_weighted'] = torch.tensor([0.0], device=device) numerator_weighted = group['numerator_weighted'] sk_l1 = torch.tensor([0.0], device=device) numerator_accumulator = torch.tensor([0.0], device=device) beta1, beta2 = group['betas'] beta2_sq = math.sqrt(beta2) d, lr = group['d'], group['lr'] d_lr: float = d * lr for group in self.param_groups: for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['s'] = torch.zeros_like(p) self.apply_weight_decay( p=p, grad=grad, lr=d_lr, weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) exp_avg, s = state['exp_avg'], state['s'] update = exp_avg.clone().mul_(beta1).add_(grad, alpha=1.0 - beta1).sign_() p.add_(update, alpha=-d_lr) exp_avg.mul_(beta2).add_(grad, alpha=(1.0 - beta2) * d_lr) numerator_accumulator.add_(torch.dot(update.flatten(), s.flatten()), alpha=d_lr) s.mul_(beta2_sq).add_(update, alpha=(1.0 - beta2_sq) * d_lr) sk_l1.add_(s.abs().sum()) numerator_weighted.mul_(beta2_sq).add_(numerator_accumulator, alpha=1.0 - beta2_sq) if sk_l1 == 0: return loss if lr > 0.0: d_hat: float = (numerator_weighted / ((1.0 - beta2_sq) * sk_l1)).item() d = max(d, d_hat) for group in self.param_groups: group['step'] += 1 group['numerator_weighted'] = numerator_weighted group['d'] = d return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), d0: float = 1e-06, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ -0.011289899237453938, -0.029957355931401253, -0.02101486176252365, -0.0019244146533310413, 0.009806257672607899, 0.0000967764644883573, -0.04804558306932449, -0.04893983155488968, -0.03859499469399452, 0.024388620629906654, -0.044753119349479675, 0.021441662684082985, 0.013332446105778217, 0.07808423787355423, -0.021583929657936096, 0.05776038393378258, -0.0022394342813640833, 0.04580996185541153, -0.004148606210947037, -0.015100621618330479, -0.027620114386081696, -0.06845073401927948, -0.021726196631789207, 0.06125608831644058, -0.07056441158056259, -0.012600787915289402, 0.028107885271310806, -0.01987672597169876, -0.05263877287507057, -0.00027484833844937384, -0.01592373661696911, -0.03572933003306389, 0.004135903902351856, 0.0016754474490880966, 0.016126975417137146, -0.03298560902476311, 0.015374992974102497, 0.00635120365768671, -0.08950623869895935, -0.021299395710229874, 0.017092358320951462, -0.043452393263578415, 0.04139968380331993, -0.026685215532779694, -0.012255282141268253, 0.027294931933283806, -0.04536283388733864, 0.05251683294773102, -0.018311789259314537, 0.008586826734244823, 0.04893983155488968, -0.06438595801591873, 0.01917555369436741, -0.008220997639000416, -0.019267011433839798, 0.046053845435380936, 0.07280003279447556, -0.005782135762274265, 0.06426401436328888, -0.07881589233875275, 0.05377690866589546, -0.06215033680200577, 0.028615981340408325, 0.005995536223053932, -0.025384489446878433, -0.02595355734229088, -0.05832945182919502, -0.031176786869764328, 0.000737374706659466, 0.04593190178275108, 0.042802032083272934, -0.02786399982869625, 0.019785268232226372, -0.00046109737013466656, -0.031054845079779625, -0.020374661311507225, -0.03652196004986763, -0.07706804573535919, 0.0077840350568294525, -0.03164423629641533, 0.018951991572976112, -0.005898997653275728, -0.005675435531884432, -0.02737622708082199, 0.005370577797293663, -0.04207037016749382, -0.0075147440657019615, -0.02818918228149414, -0.004110498819500208, -0.040525760501623154, 0.005284201353788376, -0.004374708980321884, 0.026827482506632805, 0.03166456148028374, 0.03184747323393822, 0.05324849113821983, -0.040708672255277634, -0.06536150723695755, 0.0017440405208617449, -0.016817986965179443, 0.003571916837245226, 0.027030721306800842, -0.012245120480656624, 0.03442860394716263, 0.006955837830901146, -0.05003732070326805, -0.052272945642471313, 0.008993304334580898, -0.003637969261035323, -0.08446592837572098, -0.04135903716087341, 0.006635737139731646, -0.029937032610177994, 0.008292131125926971, -0.03322949633002281, 0.009150814265012741, -0.007743387017399073, 0.02085227146744728, -0.029388288035988808, 0.051419343799352646, 0.03308723121881485, 0.03288399055600166, -0.05987406522035599, -0.000873925571795553, 0.00956745259463787, -0.010852936655282974, 0.035302530974149704, 0.023108217865228653, 0.0404038168489933, -0.04353369027376175, -0.008424236439168453, 0.0019142527598887682, -0.03322949633002281, 0.009465833194553852, 0.02247818000614643, -0.04381822422146797, -0.033981479704380035, 0.04259879142045975, -0.018880857154726982, 0.021116482093930244, 0.030932901427149773, 0.01231625396758318, 0.03095322474837303, 0.005279120523482561, 0.011594757437705994, 0.0172955971211195, 0.03670487552881241, 0.03306690603494644, 0.010730993002653122, 0.013972647488117218, -0.001366778975352645, 0.02003931626677513, 0.011747186072170734, 0.007336910348385572, 0.004699890501797199, -0.011106984689831734, -0.04841141402721405, -0.0025951017159968615, -0.03392050787806511, -0.011604919098317623, -0.025323517620563507, -0.060402486473321915, -0.022722065448760986, -0.008922170847654343, 0.0008129540365189314, 0.0009006006293930113, -0.009918039664626122, 0.035587064921855927, -0.0015839901752769947, 0.017519159242510796, 0.04007863253355026, -0.04841141402721405, 0.03280269727110863, 0.025811290368437767, -0.0018494704272598028, 0.0995868667960167, -0.0012257822090759873, -0.02235623635351658, -0.015537584200501442, -0.022295264527201653, 0.05621577054262161, -0.020334012806415558, 0.008861199021339417, -0.08909976482391357, -0.023270810022950172, 0.048208173364400864, 0.0003404245071578771, 0.019490573555231094, -0.007733225356787443, 0.052272945642471313, 0.04111514985561371, -0.03867628797888756, 0.0046668644063174725, -0.038086898624897, -0.025160927325487137, 0.0401599295437336, 0.02855501137673855, 0.018515028059482574, 0.07385687530040741, 0.02377890609204769, 0.02235623635351658, 0.01613713800907135, 0.017448026686906815, 0.0043950327672064304, -0.013139369897544384, -0.01738705486059189, -0.03125808387994766, 0.022437531501054764, 0.001538261421956122, 0.0010155574418604374, -0.044590529054403305, 0.024104086682200432, 0.04239555448293686, 0.03666422888636589, 0.04300526902079582, -0.020913243293762207, -0.00000797869961388642, 0.034001801162958145, 0.04487506300210953, -0.03916406258940697, 0.01133054681122303, -0.058451395481824875, -0.0019764944445341825, 0.028453391045331955, 0.0571100227534771, -0.0390014685690403, 0.056988079100847244, -0.03648131340742111, 0.00692535238340497, 0.01771223545074463, 0.007164157461374998, -0.06841008365154266, 0.014145400375127792, 0.004402654245495796, 0.07645832747220993, 0.03583094850182533, -0.04103385657072067, -0.02056773751974106, -0.028656629845499992, -0.03290431573987007, -0.03782268613576889, -0.019907211884856224, -0.02656327374279499, 0.0033890020567923784, -0.014724629931151867, 0.007728144526481628, 0.04808622971177101, 0.02883954532444477, -0.0443466417491436, 0.02723396010696888, -0.018616648390889168, -0.017681749537587166, -0.018057741224765778, 0.05300460383296013, -0.0854414701461792, -0.0007386449724435806, 0.02365696243941784, 0.03241654112935066, -0.024571536108851433, -0.07999467849731445, -0.007926302030682564, -0.0531671941280365, -0.08036050945520401, 0.035485442727804184, -0.03440827876329422, 0.027762381359934807, 0.0633697658777237, -0.032518163323402405, 0.012610949575901031, 0.01785450242459774, 0.08763644844293594, 0.07845006138086319, -0.07588925957679749, -0.0005751014687120914, -0.01931782066822052, 0.045728664845228195, 0.015893250703811646, 0.001478560152463615, 0.0106801837682724, 0.0021721115335822105, 0.04495636001229286, -0.045728664845228195, -0.05202905833721161, 0.009714800864458084, -0.015446126461029053, 0.036623578518629074, -0.007865330204367638, 0.008922170847654343, 0.04139968380331993, 0.04755781218409538, 0.0485333576798439, 0.001538261421956122, 0.10039982199668884, 0.018230494111776352, 0.08446592837572098, 0.031217435374855995, 0.0022851629182696342, 0.03731459006667137, -0.0033813808113336563, 0.006198774557560682, 0.035769976675510406, -0.012610949575901031, 0.026299063116312027, 0.005375658627599478, -0.013200340792536736, -0.04139968380331993, 0.030709339305758476, -0.008119378238916397, 0.028290800750255585, 0.0021340043749660254, 0.009547129273414612, -0.00802284013479948, 0.011777671985328197, 0.007275938522070646, 0.009191461838781834, -0.09462784975767136, -0.01754964515566826, -0.015364831313490868, 0.031176786869764328, 0.06353235989809036, -0.008205754682421684, 0.06149997189640999, 0.0024680776987224817, 0.002135274698957801, -0.03264010325074196, -0.04788299277424812, 0.05080962926149368, 0.03916406258940697, -0.04808622971177101, -0.01959219202399254, -0.035587064921855927, -0.03408309817314148, 0.004577947314828634, -0.006356284487992525, -0.02329113334417343, -0.0203136894851923, 0.036115482449531555, 0.030262215062975883, 0.010294030420482159, -0.03944859653711319, 0.06597121804952621, 0.05515893176198006, -0.02723396010696888, 0.054386626929044724, 0.00591424060985446, -0.04731392487883568, 0.058451395481824875, 0.037599124014377594, 0.00941502396017313, 0.02426667883992195, -0.01806790381669998, 0.0012454709503799677, -0.011940262280404568, 0.07861265540122986, 0.04861465096473694, 0.005472196731716394, -0.02837209589779377, 0.0005252445116639137, 0.04414340481162071, -0.06979210674762726, -0.031217435374855995, 0.018951991572976112, -0.046053845435380936, 0.07532019168138504, 0.08739256113767624, -0.0006941865431144834, -0.02249850332736969, -0.06377624720335007, 0.026969749480485916, -0.03721297159790993, -0.009999334812164307, -0.0851975828409195, -0.01134070847183466, 0.012265443801879883, -0.01866745762526989, -0.03064836747944355, -0.018393084406852722, 0.0012257822090759873, 0.052760716527700424, 0.03353435546159744, 0.021583929657936096, -0.00828704982995987, 0.030749985948204994, 0.033188849687576294, 0.04074932262301445, -0.01644199527800083, 0.018515028059482574, -0.02463250793516636, 0.03266042843461037, -0.06690611690282822, 0.02802659012377262, 0.016330214217305183, 0.0005792297306470573, 0.017742721363902092, -0.0856853574514389, 0.04646032303571701, 0.03083128109574318, 0.051256753504276276, -0.07889719307422638, -0.03782268613576889, -0.02721363678574562, -0.04174518957734108, -0.0026395602617412806, 0.023677285760641098, -0.01817968487739563, -0.06584927439689636, 0.04731392487883568, 0.10974879562854767, -0.02739655040204525, 0.0631665289402008, -0.04743586853146553, 0.017803693190217018, -0.03361564874649048, 0.04103385657072067, -0.004908210132271051, -0.018423570320010185, 0.0017503916751593351, 0.031014196574687958, 0.0013235907536000013, 0.043086566030979156, 0.03491637483239174, -0.030424805358052254, 0.04406210780143738, 0.027010397985577583, -0.0015153971035033464, -0.031115815043449402, -0.05609383061528206, 0.01198090985417366, -0.04219231382012367, -0.0427207350730896, -0.006381689105182886, -0.013830380514264107, -0.021421339362859726, -0.05430532991886139, -0.02444959245622158, -0.01713300682604313, 0.02967282198369503, 0.03735523670911789, 0.03654228523373604, -0.01794596016407013, 0.0048675620928406715, -0.007260695565491915, 0.02707136981189251, -0.008190511725842953, -0.027681084349751472, -0.02605517767369747, 0.035139936953783035, 0.002410916844382882, -0.08214900642633438, -0.01917555369436741, 0.005370577797293663, -0.004415356554090977, 0.06174385920166969, 0.02379922941327095, -0.004821833688765764, -0.0043975734151899815, -0.01133054681122303, -0.02168554998934269, 0.0004893602454103529, -0.008993304334580898, 0.009724962525069714, 0.012905645184218884, -0.002835177117958665, 0.034448929131031036, -0.02605517767369747, 0.04076964408159256, 0.06609316170215607, -0.034184716641902924, -0.01713300682604313, 0.02150263451039791, -0.001512856688350439, 0.0033077066764235497, 0.026278739795088768, -0.035648033022880554, -0.034306660294532776, 0.007911059074103832, -0.003267059102654457, -0.019998669624328613, 0.04743586853146553, -0.015984708443284035, 0.042151667177677155, -0.07727128267288208, 0.006513794418424368, 0.03700973093509674, 0.005134312901645899, 0.011381356976926327, -0.027782704681158066, 0.02688845433294773, 0.00471259281039238, 0.05121610313653946, -0.04520024359226227, -0.037721067667007446, 0.06414207071065903, -0.010802126489579678, -0.06812554597854614, -0.03129873052239418, -0.0010536646004766226, -0.018769076094031334, 0.0840594470500946, -0.01475511584430933, 0.02444959245622158, -0.005604302044957876, -0.06251616775989532, -0.016381023451685905, 0.027965618297457695, -0.019023124128580093, -0.06393883377313614, 0.04337109997868538, -0.06536150723695755, 0.010258464142680168, -0.02674618735909462, -0.00024102817405946553, 0.03603418916463852, 0.02184814028441906, -0.01019241102039814, -0.033351439982652664, 0.007646848913282156, 0.10478977859020233, 0.07011728733778, -0.06141867861151695, 0.038574669510126114, 0.030363833531737328, -0.000013010043403482996, -0.02024255506694317, 0.019490573555231094, 0.04316785931587219, 0.0029088512528687716, -0.026827482506632805, 0.04739522188901901, -0.002194975968450308, -0.002177192596718669, 0.004537299741059542, 0.005766892805695534, 0.03768042102456093, -0.0020120611879974604, 0.0008650338859297335, 0.019582031294703484, -0.04987473040819168, -0.11113081872463226, -0.030587395653128624, 0.009120328351855278, -0.0034093260765075684, 0.03438795730471611, -0.02855501137673855, -0.028798896819353104, 0.0647924393415451, -0.031542617827653885, 0.051256753504276276, -0.036420341581106186, -0.01653345301747322, -0.03981442376971245, 0.00811429787427187, -0.017488673329353333, 0.03184747323393822, 0.05906111001968384, -0.017813855782151222, -0.036217100918293, 0.0004074297030456364, 0.00648838933557272, 0.03493670001626015, -0.05593123659491539, -0.035648033022880554, 0.007184481248259544, -0.030892252922058105, 0.027924971655011177, 0.026969749480485916, 0.011442327871918678, -0.030119948089122772, -0.052557479590177536, 0.03597321733832359, -0.007535067852586508, -0.0024769692681729794, 0.004567785654217005, 0.009816420264542103, -0.06958886235952377, -0.003683697897940874, 0.021258749067783356, -0.03605451062321663, -0.009511562064290047, -0.0466635636985302, 0.06462984532117844, -0.033351439982652664, -0.013779571279883385, -0.010720831342041492, 0.034164395183324814, 0.028961487114429474, -0.08438462764024734, 0.046541620045900345, 0.009399781003594398, 0.007560472469776869, -0.0021124102640897036, 0.022701742127537727, -0.031095491722226143, -0.052272945642471313, 0.0018164442153647542, 0.03066869080066681, -0.07109282910823822, 0.008515693247318268, 0.05280136317014694, 0.03164423629641533, -0.04926501587033272, -0.03168488293886185, 0.04239555448293686, -0.013037750497460365, 0.0020946268923580647, -0.007087943144142628, 0.015588393434882164, 0.016126975417137146, 0.02688845433294773, -0.062231630086898804, -0.00928799994289875, -0.0008262915653176606, 0.006762761622667313, -0.05889851972460747, -0.04646032303571701, -0.026339711621403694, 0.0027589628007262945, 0.029246021062135696, 0.10291998088359833, -0.024246353656053543, -0.0009679233771748841, 0.01883004792034626, 0.0056500304490327835, 0.009714800864458084, -0.028819220140576363, -0.03672519698739052, 0.018565837293863297, -0.07552342861890793, -0.004257846623659134, -0.037395887076854706, 0.006696708966046572, -0.004760862328112125, 0.021604252979159355, -0.009511562064290047, 0.017153330147266388, 0.01231625396758318, 0.06519891321659088, -0.013576332479715347, -0.024226030334830284, -0.022234292700886726, 0.020516928285360336, 0.02446991577744484, 0.00541630620136857, -0.0024591858964413404, -0.012905645184218884, -0.040342845022678375, 0.006447741761803627, 0.015110783278942108, 0.05576864629983902, 0.03680649399757385, -0.022559475153684616, 0.032863665372133255, -0.05280136317014694, -0.0057719736360013485, 0.01296661701053381, -0.015598556026816368, 0.02365696243941784, 0.032335247844457626, 0.03487572818994522, -0.030749985948204994, 0.013952324166893959, -0.006910109426826239, 0.004331520758569241, 0.03192877024412155, -0.02753881737589836, -0.003358516376465559, -0.015801794826984406, 0.00023070746101439, 0.004725295584648848, -0.013271474279463291, -0.09072566777467728, -0.03485540300607681, -0.053411081433296204, 0.015537584200501442, 0.008515693247318268, -0.04357433691620827, 0.013718599453568459, -0.02491704188287258, 0.0005722434143535793, -0.013901514001190662, 0.05365496501326561, 0.023595990613102913, 0.039570536464452744, -0.007723063230514526, 0.043777573853731155, -0.02168554998934269, -0.0315832644701004, -0.014572201296687126, 0.014704306609928608, -0.0032924639526754618, -0.035485442727804184, -0.01222479622811079, -0.0006227354751899838, -0.011025689542293549, 0.04674485698342323, -0.08975012600421906, -0.02804691530764103, -0.011858967132866383, -0.015578231774270535, -0.0798727348446846, 0.005782135762274265, -0.019886888563632965, -0.038086898624897, 0.0077535491436719894, 0.012570302002131939, 0.04629773274064064, 0.005065720062702894, -0.031562939286231995, 0.022274941205978394, -0.008978061378002167, 0.00643757963553071, 0.018565837293863297, -0.011269574984908104, 0.005238472484052181, 0.03473346307873726, -0.007524905726313591, 0.02003931626677513, -0.03818851709365845, -0.02544546127319336, 0.04975278675556183, -0.009343890473246574, -0.028168857097625732, 0.01572049967944622, 0.04349303990602493, -0.04174518957734108, -0.03696908429265022, 0.0313393771648407, -0.028595658019185066, 0.005675435531884432, -0.007865330204367638, 0.038534022867679596, 0.04446858540177345, -0.005228310823440552, -0.022234292700886726, 0.015913575887680054, 0.0065544419921934605, 0.06946692615747452, 0.017478512600064278, 0.009770691394805908, 0.03615613281726837, -0.010487107560038567, 0.04487506300210953, -0.012041881680488586, -0.020354336127638817, -0.010233058594167233, 0.0698734000325203, -0.037253618240356445, -0.032701075077056885, 0.050321854650974274, -0.02739655040204525, 0.08251483738422394, 0.0008497910457663238, -0.0018050119979307055, 0.008724013343453407, 0.06633704900741577, -0.05690678209066391, 0.02152295783162117, -0.06625575572252274, -0.0780029371380806, -0.10015593469142914, 0.010100954212248325, -0.03341241180896759, 0.09137603640556335, 0.02916472591459751, 0.001544612692669034, 0.012387387454509735, 0.021279072389006615, -0.007032052613794804 ]
716,208
pytorch_optimizer.optimizer.dadapt
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.9, 0.999), d0: float = 1e-6, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'd': d0, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'step': 0, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), d0: float = 1e-06, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.008189604617655277, -0.025704527273774147, -0.027717186138033867, -0.011740509420633316, -0.04788210988044739, -0.015382463112473488, -0.08610346168279648, -0.018880655989050865, -0.033103443682193756, 0.03546113148331642, -0.034502722322940826, 0.0683920606970787, 0.005846294574439526, 0.06708862632513046, -0.04795878380537033, 0.04240000993013382, 0.0330459401011467, 0.02691212296485901, -0.0005391050362959504, -0.0024103985633701086, 0.006373419426381588, -0.007715192157775164, -0.0407898835837841, 0.11186549067497253, -0.0016197111690416932, 0.03064991720020771, -0.017059680074453354, 0.008558591827750206, -0.031033281236886978, 0.004322424530982971, 0.010341232642531395, -0.014797833748161793, -0.026375414803624153, 0.06551683694124222, 0.03917975723743439, -0.02662460133433342, -0.007681647781282663, 0.01451031118631363, -0.07989297062158585, 0.04366511106491089, 0.08073636889457703, -0.0346752367913723, 0.06693527847528458, -0.03879639506340027, -0.027583008632063866, -0.0023816463071852922, 0.016024596989154816, 0.048265475779771805, -0.018238522112369537, -0.03471357375383377, 0.03716709837317467, -0.04013816639780998, 0.033620987087488174, -0.0229826457798481, -0.04305173084139824, 0.03822134807705879, 0.05006728321313858, 0.05658446252346039, 0.039333101361989975, 0.016963837668299675, 0.005395842250436544, -0.03990814834833145, 0.017002174630761147, -0.014117363840341568, -0.00553481187671423, -0.012047200463712215, -0.07096059620380402, -0.023135991767048836, 0.023231832310557365, 0.03442604839801788, 0.09499749541282654, 0.0022247068118304014, -0.03074575960636139, 0.03471357375383377, -0.011692589148879051, -0.008668809197843075, -0.06574685126543045, -0.05014395713806152, -0.05980471894145012, 0.0009823691798374057, 0.05393925681710243, 0.01061917096376419, -0.03697541728615761, -0.05489766597747803, 0.004470977932214737, -0.040866557508707047, -0.024880295619368553, -0.058654628694057465, 0.012574325315654278, 0.023231832310557365, -0.058002907782793045, -0.022637618705630302, 0.01387776155024767, -0.022235088050365448, 0.07145897299051285, 0.00850587897002697, 0.010101630352437496, -0.05148572847247124, 0.017970167100429535, 0.0029111672192811966, -0.01102170255035162, -0.009871612302958965, -0.04726872965693474, 0.005501267500221729, 0.004334404598921537, -0.04861050099134445, -0.05746620148420334, -0.04121158644556999, 0.0319533534348011, -0.07222569733858109, -0.027410496026277542, 0.05064233019948006, -0.01974322460591793, 0.03718626871705055, -0.058884646743535995, 0.027506336569786072, 0.028943950310349464, 0.029442323371767998, 0.014079027809202671, 0.023845214396715164, 0.04071321338415146, 0.034847747534513474, -0.035959504544734955, 0.04608030244708061, 0.03983147442340851, -0.0007966774282976985, -0.002168400213122368, 0.016743404790759087, 0.02601121924817562, -0.01331230066716671, 0.05025896430015564, -0.0023061714600771666, -0.03783798590302467, -0.01827685907483101, 0.01974322460591793, -0.014692408964037895, 0.010427488945424557, 0.06360001862049103, -0.0288289412856102, 0.020375773310661316, 0.06751032918691635, 0.004286483861505985, 0.040444858372211456, -0.020624959841370583, -0.0008991073700599372, 0.03879639506340027, -0.003943852614611387, -0.014769081957638264, -0.011970527470111847, 0.0504506453871727, 0.02587704174220562, 0.0225034411996603, -0.013024777173995972, 0.03893057256937027, 0.004717768169939518, -0.04991393908858299, 0.004998102784156799, -0.016609227284789085, -0.009282190352678299, 0.016839245334267616, -0.01831519417464733, 0.02376854233443737, 0.0290972962975502, -0.03172333538532257, -0.006876584142446518, 0.02578120119869709, -0.049070537090301514, 0.014098195359110832, -0.0011860310332849622, -0.00834294967353344, 0.007561846636235714, -0.0810430571436882, -0.030209049582481384, 0.025608686730265617, 0.011980111710727215, 0.038106340914964676, 0.023174328729510307, -0.01427070889621973, -0.006129025015980005, -0.023979391902685165, 0.07050056010484695, 0.004499730188399553, -0.018449371680617332, -0.06191321834921837, 0.022100910544395447, 0.01363815926015377, -0.0447385311126709, 0.05156240239739418, -0.04539024829864502, 0.025992050766944885, 0.043166738003492355, 0.021410856395959854, 0.017931832000613213, 0.00921989418566227, -0.015507056377828121, 0.02282930165529251, 0.046348657459020615, -0.02877143584191799, 0.004839965142309666, 0.04815046489238739, 0.0857967659831047, 0.019149011000990868, 0.021084995940327644, -0.03854720667004585, 0.016513386741280556, -0.009162389673292637, -0.01721302419900894, -0.005429386626929045, -0.026701273396611214, -0.03555697202682495, -0.0041690790094435215, -0.01092586200684309, 0.04692370072007179, 0.0179509986191988, -0.013015193864703178, -0.0435117669403553, -0.008625680580735207, 0.014136532321572304, 0.007336620707064867, -0.008999460376799107, 0.10312480479478836, -0.023691868409514427, -0.009502625092864037, 0.0019563522655516863, 0.04864883795380592, 0.0100632943212986, 0.05075733736157417, -0.05666113644838333, -0.08326657116413116, 0.030113209038972855, -0.02353852428495884, -0.050603993237018585, -0.03601700812578201, -0.010159134864807129, 0.02681628242135048, 0.013149370439350605, -0.02718047797679901, 0.024113569408655167, -0.08065969496965408, -0.03116745874285698, 0.05217578262090683, 0.03312261402606964, 0.003907912410795689, -0.023691868409514427, 0.022848470136523247, 0.011165464296936989, 0.03346763923764229, 0.004689015913754702, -0.07011719793081284, -0.029959863051772118, -0.03147415071725845, -0.01567956991493702, -0.003189105773344636, 0.04523690044879913, -0.0437801219522953, 0.01593834161758423, 0.03887306526303291, -0.009291774593293667, 0.011798013933002949, -0.008405246771872044, -0.014376134611666203, -0.010542497970163822, -0.027774691581726074, 0.07498591393232346, -0.0027170893736183643, 0.025397837162017822, 0.0061721536330878735, -0.02240760065615177, 0.022445937618613243, -0.0019875005818903446, 0.13962101936340332, 0.028886444866657257, -0.007135354448109865, -0.002544575836509466, -0.005616276524960995, -0.016503801569342613, 0.01099295075982809, -0.030439067631959915, 0.0002198350557591766, 0.053785908967256546, 0.03707125782966614, -0.0479971207678318, 0.01193219143897295, 0.005141864065080881, 0.004147514700889587, 0.005151448305696249, -0.016906334087252617, 0.023749373853206635, -0.00011014215124305338, 0.013015193864703178, 0.017299281433224678, 0.012612661346793175, 0.08924704045057297, 0.030611582100391388, 0.0815797671675682, -0.02877143584191799, 0.04853383079171181, 0.0014915239298716187, 0.06647524237632751, 0.0024942592717707157, 0.042131658643484116, -0.04159494861960411, 0.0648651197552681, 0.0019563522655516863, -0.05236746370792389, -0.0522141195833683, 0.045083556324243546, 0.015459136106073856, 0.039754804223775864, 0.04523690044879913, 0.03925643116235733, 0.02691212296485901, 0.042706701904535294, 0.012852263636887074, 0.03187668323516846, -0.060993146151304245, 0.006723238620907068, -0.060111407190561295, 0.02854141779243946, 0.044661857187747955, -0.0036467460449784994, 0.03314178064465523, -0.0036563300527632236, -0.016599642112851143, -0.07345246523618698, -0.04305173084139824, 0.0379338264465332, 0.020701633766293526, -0.0489555299282074, -0.0024870713241398335, -0.03730127587914467, -0.009574505500495434, 0.01847812533378601, -0.03396601229906082, -0.0388922356069088, -0.0001587364822626114, 0.010609586723148823, 0.05014395713806152, -0.010264559648931026, -0.02240760065615177, 0.0942307710647583, -0.024305250495672226, -0.004969350527971983, 0.033812668174505234, -0.0014687617076560855, -0.03551863506436348, 0.015459136106073856, -0.011567995883524418, 0.04259169474244118, 0.010149550624191761, -0.013858593069016933, 0.004514106083661318, -0.006675318349152803, 0.08487669378519058, 0.025340331718325615, -0.032125867903232574, -0.007950002327561378, 0.006905336398631334, 0.032969266176223755, -0.04872551187872887, -0.03893057256937027, -0.0007361778989434242, -0.049722254276275635, 0.05531936511397362, 0.02811971865594387, -0.013130202889442444, 0.009493040852248669, -0.041249919682741165, 0.025206156075000763, 0.016647564247250557, 0.021276678889989853, -0.06083979830145836, -0.02905895933508873, -0.00519457645714283, 0.023691868409514427, -0.010916277766227722, -0.035116102546453476, 0.012190962210297585, 0.061184827238321304, -0.0012051992816850543, -0.003912704531103373, -0.009996205568313599, 0.06260327249765396, 0.03239422291517258, 0.0071688988246023655, -0.02811971865594387, -0.002091727452352643, 0.019149011000990868, 0.07188066840171814, -0.012507236562669277, 0.01480741798877716, -0.007782280445098877, 0.019877402111887932, -0.022810133174061775, -0.06624522805213928, 0.034464385360479355, 0.05010562017560005, 0.04071321338415146, -0.046540338546037674, -0.03687957674264908, -0.016829660162329674, -0.04186330363154411, -0.014098195359110832, 0.0379338264465332, -0.012478484772145748, -0.0024918632116168737, 0.013130202889442444, 0.04987560212612152, 0.009459496475756168, 0.06639856845140457, -0.01653255522251129, -0.0006106861983425915, -0.02039494179189205, 0.00244753691367805, -0.02442025952041149, -0.037320442497730255, 0.0007409699028357863, -0.0014184452593326569, 0.0180851761251688, -0.008328573778271675, 0.02919313684105873, 0.0071641067042946815, 0.06873708963394165, 0.017002174630761147, 0.06555517017841339, 0.060341428965330124, -0.025704527273774147, 0.01125172059983015, 0.0024894671514630318, -0.049070537090301514, -0.03442604839801788, -0.004116366617381573, -0.05137072131037712, -0.04029151052236557, 0.02610705979168415, 0.016417544335126877, -0.0008895233040675521, 0.0036443499848246574, -0.0028392865788191557, -0.01770181395113468, 0.004185851197689772, -0.07257072627544403, 0.02484196051955223, -0.028886444866657257, -0.0489555299282074, -0.0237302053719759, 0.026547927409410477, -0.006790327373892069, -0.03626619279384613, -0.019954074174165726, 0.020222429186105728, 0.0012327535077929497, 0.0387580581009388, 0.002173192333430052, -0.03795299306511879, -0.028158055618405342, -0.024765286594629288, -0.013091865926980972, 0.04289838299155235, -0.023040151223540306, 0.04393346607685089, -0.02652875892817974, -0.019398197531700134, -0.009239062666893005, -0.0576578825712204, 0.03199169039726257, 0.05934468284249306, -0.023423515260219574, -0.018238522112369537, 0.006886168383061886, 0.003047740552574396, 0.01581374742090702, 0.038106340914964676, -0.03691791370511055, -0.04872551187872887, 0.0180851761251688, -0.0037234188057482243, -0.0349435918033123, -0.017184272408485413, -0.014280293136835098, 0.011788429692387581, -0.05029730126261711, 0.004935806151479483, 0.06697361916303635, 0.010092046111822128, -0.009766187518835068, -0.07406584173440933, 0.020011579617857933, 0.022426769137382507, 0.04807379096746445, -0.07881955057382584, -0.012670165859162807, 0.025417005643248558, 0.04347342997789383, -0.028158055618405342, -0.014280293136835098, 0.029825685545802116, 0.020203260704874992, 0.04669368267059326, 0.021410856395959854, 0.0021540240850299597, -0.038815561681985855, -0.03425353392958641, -0.02700796350836754, 0.010044125840067863, -0.04048319533467293, -0.09101051092147827, 0.014069443568587303, -0.029173968359827995, -0.0033807875588536263, -0.021353350952267647, 0.003831239650025964, -0.027544673532247543, 0.010044125840067863, -0.030822431668639183, -0.02587704174220562, -0.04071321338415146, 0.05999640002846718, -0.004250543657690287, -0.03130163624882698, 0.050412312150001526, 0.06275662034749985, 0.03396601229906082, -0.04098156467080116, 0.013676495291292667, 0.04435516521334648, 0.01691591739654541, -0.05156240239739418, 0.08272986114025116, 0.02236926555633545, 0.006708862725645304, -0.060341428965330124, -0.0447385311126709, 0.057811226695775986, -0.007988338358700275, 0.03879639506340027, 0.017165103927254677, -0.03743545338511467, -0.06762533634901047, -0.030496573075652122, 0.018612300977110863, 0.021123332902789116, 0.01941736601293087, -0.04343509301543236, -0.014634904451668262, 0.0011710559483617544, -0.03883473202586174, 0.08142642676830292, -0.04811212792992592, -0.016695484519004822, 0.009229478426277637, -0.02905895933508873, -0.03940977528691292, 0.018190601840615273, 0.019264020025730133, -0.02171754650771618, -0.00021624102373607457, 0.00008797894406598061, 0.06049477308988571, 0.027257150039076805, -0.02110416442155838, -0.010657507926225662, -0.0023169536143541336, 0.0008140485733747482, 0.004502126015722752, -0.004418265074491501, 0.01331230066716671, -0.03457939624786377, -0.07272407412528992, 0.024861127138137817, 0.0015885628527030349, -0.00588463107123971, -0.00023915298515930772, 0.01652297005057335, -0.03584449365735054, 0.01501826848834753, -0.012171793729066849, 0.013657327741384506, -0.04818880185484886, -0.03906475007534027, 0.006440508179366589, -0.024956969544291496, -0.11424234509468079, -0.07889622449874878, 0.03664955869317055, -0.005755245685577393, -0.060993146151304245, 0.007235987577587366, -0.013321883976459503, 0.01727052964270115, -0.014606152661144733, 0.0392947681248188, -0.037876322865486145, -0.018037255853414536, -0.0489555299282074, 0.026835450902581215, -0.036477044224739075, -0.02058662474155426, 0.041671622544527054, 0.058884646743535995, -0.06927379965782166, -0.009641594253480434, 0.023231832310557365, 0.026567095890641212, 0.00125192163977772, -0.007389333099126816, -0.009157597087323666, 0.0504506453871727, 0.015324958600103855, -0.06904377788305283, 0.0093157347291708, -0.007911666296422482, 0.004382324870675802, -0.010753348469734192, -0.021583369001746178, -0.0534408837556839, -0.0363045297563076, 0.017356786876916885, 0.0792795866727829, -0.009162389673292637, 0.0015346523141488433, -0.039754804223775864, -0.012459316290915012, 0.0479971207678318, -0.07065390795469284, -0.02143002487719059, 0.010207055136561394, -0.10826187580823898, 0.001692789839580655, -0.03392767533659935, 0.04937722906470299, -0.006751990877091885, -0.015104524791240692, -0.05508934706449509, 0.0005160433356650174, 0.020318269729614258, 0.01928318850696087, 0.006598645821213722, 0.03367849066853523, -0.018267273902893066, 0.017883911728858948, 0.05240580067038536, -0.0036443499848246574, -0.004585986956954002, -0.015123693272471428, -0.04151827469468117, -0.024132737889885902, -0.006718446500599384, 0.04186330363154411, 0.044010140001773834, -0.028943950310349464, 0.0373971164226532, -0.04795878380537033, -0.004118762444704771, 0.0030645125079900026, -0.010408321395516396, 0.027525505051016808, 0.023366009816527367, 0.05175408348441124, -0.03022821806371212, -0.03204919397830963, -0.01873689517378807, 0.04247668385505676, 0.009334903210401535, -0.0032298380974680185, -0.001924005919136107, -0.02802387811243534, -0.011807598173618317, -0.020529119297862053, -0.0334484726190567, -0.05873129889369011, -0.013149370439350605, -0.041901640594005585, 0.001442405511625111, 0.02292514219880104, -0.004600362852215767, -0.050987355411052704, -0.021966733038425446, 0.02765968255698681, -0.02672044187784195, 0.05727452039718628, 0.03967813029885292, -0.0011381106451153755, -0.05006728321313858, 0.018621886149048805, -0.010753348469734192, -0.06521014124155045, 0.0345410592854023, -0.016676316037774086, -0.023174328729510307, -0.05048898234963417, -0.021027492359280586, 0.021219173446297646, -0.010983366519212723, 0.023078488186001778, -0.05382424592971802, -0.06172153726220131, -0.06655191630125046, 0.008108139969408512, -0.026260405778884888, -0.004209811333566904, 0.0002670067478902638, -0.05202243849635124, 0.07379748672246933, -0.019139425829052925, 0.026126228272914886, 0.013657327741384506, -0.007494757883250713, 0.012737254612147808, -0.05455263704061508, 0.036342866718769073, 0.03873888775706291, 0.027487168088555336, -0.07671105116605759, -0.020337438210844994, 0.0331801176071167, 0.029078127816319466, -0.00951220840215683, -0.05447596311569214, 0.010657507926225662, -0.03557613864541054, -0.01300560962408781, 0.019685719162225723, -0.0003405346651561558, 0.010331648401916027, -0.07782280445098877, -0.025052810087800026, 0.017222609370946884, 0.03672623261809349, -0.02451610006392002, 0.04918554797768593, 0.02273346111178398, -0.02152586542069912, -0.014136532321572304, 0.015986261889338493, -0.022963479161262512, 0.04289838299155235, 0.0021252718288451433, 0.06777868419885635, 0.06869875639677048, 0.007398916874080896, 0.032164204865694046, -0.03548029810190201, -0.009675138629972935, 0.0034957965835928917, 0.055051010102033615, -0.019369443878531456, -0.0195802953094244, 0.06900544464588165, -0.015765827149152756, 0.0005939140683040023, -0.01766347698867321, 0.0024439427070319653, 0.02708463743329048, 0.06290996074676514, -0.04151827469468117, 0.01287143211811781, -0.03983147442340851, -0.07046222686767578, -0.0924672931432724, -0.0022450729738920927, -0.051409054547548294, 0.0870235338807106, 0.009282190352678299, 0.027333823963999748, 0.02432441897690296, 0.04608030244708061, 0.006881376262754202 ]
716,211
pytorch_optimizer.optimizer.dadapt
__str__
null
def __str__(self) -> str: return 'DAdaptLion'
(self) -> str
[ 0.018565108999609947, -0.0213454756885767, 0.020747167989611626, -0.035053741186857224, 0.019955292344093323, -0.050116993486881256, 0.015652762725949287, 0.027363738045096397, 0.06042898818850517, -0.028226003050804138, -0.05064491182565689, 0.00765480799600482, -0.0037218204233795404, 0.03720060735940933, 0.019497763365507126, 0.0009771977784112096, 0.007082896772772074, -0.04086083546280861, -0.02600874938070774, 0.01775563508272171, 0.016910966485738754, 0.024776941165328026, 0.011675781570374966, -0.0208879467099905, -0.028014836832880974, 0.06602491438388824, -0.009678492322564125, -0.030883189290761948, -0.02979215979576111, -0.0028419573791325092, -0.03801007941365242, -0.034314654767513275, 0.0023668312933295965, 0.007659207098186016, -0.04568248614668846, 0.041318364441394806, -0.03192142769694328, 0.015793539583683014, -0.021046321839094162, -0.017738036811351776, -0.011570197530090809, -0.0037944091018289328, -0.00032472441671416163, -0.02799723856151104, -0.03352277725934982, -0.023685911670327187, -0.016215873882174492, 0.03420907258987427, -0.008869018405675888, 0.01686697266995907, -0.0018180168699473143, 0.00844668410718441, -0.057472649961709976, -0.007905568927526474, -0.04251497983932495, 0.04561209678649902, 0.04758298769593239, 0.016611812636256218, 0.005934675689786673, 0.0213454756885767, -0.024724150076508522, 0.003787809982895851, 0.06088651716709137, -0.023597924038767815, -0.02271806076169014, 0.03966422379016876, 0.01009202841669321, 0.0336635559797287, 0.030830398201942444, 0.04737182334065437, 0.03632074221968651, -0.04441548138856888, -0.00536716403439641, 0.027909252792596817, 0.03797488659620285, -0.05163035914301872, -0.09340625256299973, -0.017007751390337944, 0.041388753801584244, -0.041775893419981, 0.009467325173318386, -0.0018092181999236345, -0.00047842549975030124, 0.0006983912317082286, -0.030672023072838783, -0.0915057510137558, -0.03730618953704834, -0.0523342490196228, -0.0326957069337368, 0.0011273244163021445, -0.0558537021279335, -0.008402691222727299, -0.04582326486706734, 0.06792542338371277, -0.06201274320483208, 0.006185436621308327, 0.010347188450396061, -0.06430038809776306, 0.02361552231013775, 0.017350897192955017, 0.011447017081081867, 0.049765050411224365, -0.0336635559797287, -0.005177993327379227, -0.05134880170226097, -0.02447778731584549, -0.048005323857069016, 0.04719584807753563, -0.028454767540097237, 0.001824615872465074, -0.05289736017584801, 0.023668313398957253, 0.029897743836045265, 0.022383714094758034, 0.010197611525654793, -0.04994102194905281, -0.008319104090332985, -0.016805382445454597, 0.028437171131372452, -0.014614523388445377, 0.013153951615095139, -0.0018444127636030316, -0.06254065781831741, -0.020395223051309586, 0.03688385710120201, 0.08383334428071976, -0.04740701615810394, -0.012696422636508942, 0.02342195250093937, -0.04082564264535904, 0.03969941660761833, 0.0011526205344125628, -0.06349091231822968, -0.022348519414663315, 0.07545704394578934, -0.009687291458249092, 0.029968133196234703, 0.002758370479568839, 0.03260772302746773, 0.1372586190700531, -0.03413868322968483, 0.013347521424293518, 0.06739750504493713, 0.05947873741388321, -0.03030247986316681, 0.02511128969490528, -0.027557307854294777, 0.04955388233065605, -0.0006901425076648593, 0.016875771805644035, 0.015696754679083824, 0.02307000756263733, 0.01574074849486351, 0.003620636183768511, -0.012538047507405281, 0.012133310548961163, -0.007461237721145153, -0.041987061500549316, 0.02834918536245823, -0.025322455912828445, 0.0006725452258251607, -0.06401883065700531, -0.001965393777936697, 0.026730237528681755, -0.008609458804130554, 0.01932178996503353, -0.020131263881921768, 0.00898780021816492, 0.009080185554921627, 0.014359363354742527, -0.009308950044214725, -0.04716065526008606, -0.0729934349656105, 0.020148862153291702, 0.02275325544178486, 0.033452391624450684, -0.00019315742247272283, 0.07454199343919754, 0.030020924285054207, -0.015555976890027523, 0.004944829735904932, -0.022436505183577538, -0.03280129283666611, 0.0016508428379893303, 0.061062488704919815, -0.041987061500549316, 0.011570197530090809, 0.049483492970466614, 0.061062488704919815, 0.0016827379586175084, 0.011130266822874546, 0.0171133354306221, -0.04181108623743057, -0.017676446586847305, -0.006906924303621054, -0.041036807000637054, -0.0031675067730247974, -0.05078569054603577, 0.011385426856577396, -0.00349965482018888, 0.0022810448426753283, 0.06827736645936966, -0.010136021301150322, 0.03969941660761833, 0.0602882094681263, 0.019603347405791283, 0.021750211715698242, -0.008684247732162476, 0.025955956429243088, -0.03762293979525566, 0.049413103610277176, 0.021063920110464096, -0.0038999926764518023, -0.000766580633353442, 0.037130217999219894, -0.05979548767209053, -0.008921810425817966, -0.029000282287597656, -0.02444259263575077, -0.008217919617891312, 0.05726148188114166, -0.0041463542729616165, -0.0007049901760183275, -0.0110686756670475, -0.045893650501966476, -0.012916387990117073, 0.02687101438641548, -0.03577522933483124, -0.01728050783276558, -0.011517406441271305, -0.014104203321039677, -0.09228003025054932, -0.035335294902324677, 0.03434985131025314, 0.03317083418369293, 0.03966422379016876, -0.052263859659433365, 0.004205745179206133, -0.08369256556034088, -0.048392463475465775, -0.024389801546931267, 0.02303481288254261, -0.00655057979747653, -0.0009667494450695813, 0.04082564264535904, -0.05170074850320816, -0.027821267023682594, 0.021803004667162895, -0.038115665316581726, -0.011631788685917854, 0.05595928430557251, -0.048040516674518585, -0.015573574230074883, 0.00691132340580225, -0.010998287238180637, -0.044837817549705505, -0.06271663308143616, 0.0006791442283429205, 0.006942118983715773, -0.025199275463819504, -0.062470268458127975, -0.023527534678578377, -0.038115665316581726, 0.061344046145677567, -0.015265622176229954, 0.008785431273281574, -0.039241887629032135, 0.030408063903450966, 0.026325499638915062, -0.03582802042365074, 0.10523161292076111, 0.037165410816669464, -0.07235992699861526, 0.034314654767513275, -0.0351417250931263, -0.011684579774737358, 0.004148554056882858, 0.022084560245275497, -0.09228003025054932, -0.046632736921310425, 0.003196102101355791, -0.04494339972734451, -0.009880861267447472, 0.0321853868663311, -0.01916341483592987, -0.045189760625362396, 0.035687241703271866, 0.0026307902298867702, 0.021521447226405144, 0.04364120215177536, 0.0750347152352333, 0.04163511469960213, -0.010628744959831238, 0.02280604839324951, 0.04934271425008774, 0.04054408520460129, 0.03378673642873764, 0.04255017265677452, -0.018582705408334732, -0.00005908142338739708, -0.020113667473196983, -0.05236944183707237, -0.0022227538283914328, -0.030372869223356247, -0.033223625272512436, -0.006418600212782621, 0.00255160266533494, -0.02021925151348114, 0.018793873488903046, 0.005688313860446215, 0.0011636187555268407, 0.02863074094057083, 0.034701794385910034, 0.09636259078979492, 0.0014781698118895292, 0.07235992699861526, -0.014473745599389076, 0.01587272807955742, 0.038573190569877625, 0.055290587246418, -0.021134307608008385, 0.027645293623209, -0.05060971900820732, -0.0036844261921942234, 0.0213454756885767, -0.020201653242111206, -0.03772852197289467, 0.044485870748758316, 0.016998952254652977, 0.042726144194602966, -0.02968657575547695, -0.036743078380823135, 0.02944021485745907, -0.026343097910284996, -0.014244981110095978, 0.0044169118627905846, 0.031023968011140823, -0.007958360947668552, -0.0029959334060549736, -0.03625035285949707, 0.1011490449309349, 0.011517406441271305, -0.040649667382240295, 0.023509938269853592, 0.03987538814544678, 0.04423950985074043, -0.02204936556518078, 0.009176970459520817, 0.026325499638915062, 0.0109278978779912, -0.016682201996445656, -0.023439548909664154, 0.002421822864562273, 0.013523493893444538, 0.01284599956125021, 0.014403356239199638, -0.027434127405285835, 0.04726623743772507, -0.02166222594678402, -0.001194413984194398, -0.01788761466741562, -0.06894606351852417, -0.005657518748193979, 0.04438028857111931, -0.01935698464512825, 0.0015188634861260653, -0.00674414960667491, -0.014297773130238056, 0.06972034275531769, -0.032748498022556305, -0.022471699863672256, 0.011622989550232887, -0.021169502288103104, -0.0024416197557002306, -0.006515385117381811, 0.04086083546280861, 0.04515456780791283, 0.028208406642079353, -0.02905307523906231, -0.028683532029390335, 0.041775893419981, -0.003061923198401928, 0.014904878102242947, 0.027082182466983795, 0.011306239292025566, -0.005195590667426586, 0.027205362915992737, 0.02201417088508606, -0.016585417091846466, -0.03209739923477173, -0.012546845711767673, -0.03762293979525566, -0.008024349808692932, 0.007940763607621193, -0.05884523317217827, -0.06781983375549316, -0.023298772051930428, -0.017262911424040794, -0.07411965727806091, 0.02854275517165661, 0.028208406642079353, -0.034121084958314896, -0.0326957069337368, 0.009924854151904583, -0.020043278113007545, 0.031147148460149765, 0.020043278113007545, 0.038115665316581726, -0.039241887629032135, -0.028489962220191956, 0.014561732299625874, -0.011455816216766834, -0.06503947079181671, -0.03663749247789383, 0.06651763617992401, 0.025744790211319923, -0.03508893400430679, -0.01830114983022213, -0.009273755364120007, -0.01374345924705267, -0.03938266634941101, 0.015635164454579353, 0.0342266708612442, 0.057472649961709976, -0.0008408190333284438, 0.04174070060253143, 0.03874916583299637, 0.06739750504493713, 0.08087700605392456, -0.009000997990369797, -0.057859789580106735, 0.021908586844801903, -0.025076095014810562, -0.047301433980464935, 0.012221296317875385, -0.05951393023133278, 0.014324168674647808, -0.032519735395908356, -0.030161703005433083, 0.01728050783276558, 0.003488656599074602, -0.03456101566553116, 0.01010962575674057, 0.020324833691120148, 0.012775610201060772, -0.025621609762310982, -0.060006655752658844, 0.008512673899531364, 0.03197421878576279, -0.02095833607017994, -0.04508417844772339, 0.05134880170226097, 0.000039593833207618445, -0.03931227698922157, 0.06556738913059235, -0.05205269157886505, -0.023474743589758873, -0.05078569054603577, 0.017130931839346886, -0.00068299361737445, -0.05564253404736519, 0.02131028100848198, -0.014297773130238056, 0.013224340043962002, 0.03132311999797821, 0.005362764932215214, -0.009379339404404163, 0.012221296317875385, -0.05039855092763901, -0.003444663481786847, 0.025551220402121544, -0.01830114983022213, 0.006510986015200615, -0.035335294902324677, 0.009643297642469406, 0.043781980872154236, -0.01865309476852417, -0.009968847036361694, 0.04438028857111931, -0.023017214611172676, -0.04515456780791283, -0.06373727321624756, -0.014526537619531155, 0.0628926008939743, -0.04247978329658508, 0.022542089223861694, -0.03741177171468735, 0.01020641066133976, -0.02549842931330204, 0.001954395556822419, 0.03288927674293518, 0.022066963836550713, -0.05940834805369377, -0.049377910792827606, -0.009176970459520817, 0.0633501335978508, -0.03508893400430679, -0.031534288078546524, -0.07848377525806427, 0.004097961820662022, 0.02467135712504387, -0.017456481233239174, -0.009097782894968987, -0.02354513294994831, 0.03776371851563454, -0.01554717868566513, 0.01343550719320774, -0.006431798450648785, -0.03148149698972702, -0.04191667214035988, 0.005125201772898436, -0.04462664946913719, 0.060358598828315735, 0.020008083432912827, 0.030443258583545685, -0.0054375529289245605, -0.007668005768209696, 0.05560733750462532, 0.03688385710120201, 0.027874058112502098, 0.00281556136906147, -0.042796533554792404, -0.0067925420589745045, -0.043817173689603806, -0.01587272807955742, 0.023562729358673096, -0.019216207787394524, 0.029229046776890755, -0.02291163243353367, 0.094462089240551, 0.010232806205749512, 0.045893650501966476, 0.0130835622549057, 0.04860363155603409, 0.005402358714491129, 0.1005859300494194, -0.0719727873802185, 0.022137351334095, 0.022506894543766975, 0.03183344379067421, 0.00272757513448596, -0.06912203133106232, 0.020500807091593742, -0.034860171377658844, 0.02521687187254429, -0.022894034162163734, -0.01010962575674057, 0.006044658366590738, 0.05138399824500084, 0.0063702077604830265, -0.008336701430380344, -0.0076768044382333755, -0.04515456780791283, -0.047055069357156754, 0.0036052383948117495, 0.040684863924980164, -0.0008182725287042558, 0.0009975446155294776, 0.04107200354337692, 0.032044608145952225, -0.043852370232343674, -0.009458526968955994, 0.07228954136371613, 0.0432540625333786, 0.05001141130924225, 0.05641681328415871, -0.03832682967185974, 0.03755255043506622, 0.0035832419525831938, -0.055079422891139984, 0.005345167592167854, -0.03931227698922157, 0.04860363155603409, 0.05979548767209053, -0.08115855604410172, 0.06014743074774742, 0.07137448340654373, 0.03058403730392456, -0.03141110762953758, 0.004223342053592205, -0.03461381047964096, 0.04582326486706734, 0.0055959285236895084, -0.014728905633091927, -0.03544088080525398, -0.015142441727221012, -0.010769522748887539, 0.0009920455049723387, 0.03581042215228081, -0.0794692263007164, -0.027856461703777313, 0.006251426413655281, -0.028560351580381393, -0.0045752874575555325, 0.06489869207143784, -0.0803842768073082, -0.0412127822637558, -0.0341738760471344, 0.03007371537387371, 0.00019398228323552758, 0.022260533645749092, 0.031023968011140823, -0.009643297642469406, 0.03496575355529785, 0.0694739818572998, 0.05286216735839844, 0.02658945880830288, -0.0020984732545912266, -0.0352473109960556, 0.010021639056503773, -0.010769522748887539, -0.0014979667030274868, -0.01391943171620369, -0.044133927673101425, -0.011895746923983097, -0.026290304958820343, 0.04642156884074211, -0.02546323463320732, -0.017544467002153397, 0.01127984281629324, 0.019568152725696564, 0.09368781000375748, -0.026131929829716682, 0.021222295239567757, -0.044873010367155075, 0.0001601625554030761, -0.004918433725833893, -0.006981712765991688, 0.041353560984134674, -0.07953961193561554, 0.041283171623945236, -0.022348519414663315, -0.012256490997970104, -0.07609055191278458, -0.04740701615810394, 0.01794920489192009, 0.02979215979576111, 0.025938360020518303, -0.006532982457429171, 0.03461381047964096, -0.008011152036488056, 0.009009797126054764, -0.022260533645749092, 0.039241887629032135, -0.043746788054704666, 0.00827071163803339, -0.06841814517974854, -0.039593834429979324, -0.022946825250983238, -0.04388756304979324, -0.02264767326414585, 0.013831445947289467, -0.00037806612090207636, 0.0346841961145401, 0.0056707169860601425, -0.032044608145952225, -0.02041282132267952, 0.013945828191936016, -0.024301815778017044, -0.017518071457743645, 0.019849708303809166, -0.03542328253388405, 0.01791401021182537, -0.02451298199594021, 0.09453247487545013, 0.016242269426584244, -0.0016090493882074952, -0.023333964869379997, -0.040649667382240295, -0.03776371851563454, -0.005842289887368679, 0.008574264124035835, 0.011710976250469685, -0.059337958693504333, -0.004971225745975971, -0.000595007324591279, 0.009924854151904583, 0.025428039953112602, 0.10030438005924225, -0.04152953252196312, 0.015204031951725483, -0.02940502017736435, 0.009643297642469406, -0.05490344762802124, 0.026184720918536186, 0.057894982397556305, -0.07119850814342499, -0.005292375572025776, 0.016004707664251328, -0.05831731855869293, -0.06940358877182007, -0.012423665262758732, -0.042726144194602966, 0.0223661158233881, 0.09143535792827606, 0.002753971144556999, -0.009124179370701313, -0.029422616586089134, -0.03174545615911484, -0.01622467301785946, 0.057543039321899414, 0.03688385710120201, -0.006251426413655281, -0.012318081222474575, 0.003611837513744831, -0.01916341483592987, -0.006722153164446354, -0.014667315408587456, 0.011323836632072926, -0.025199275463819504, 0.07637210190296173, 0.05145438760519028, -0.0426909513771534, 0.009124179370701313, 0.04642156884074211, -0.09382858872413635, 0.002901348052546382, 0.02783886343240738, 0.002599995117634535, 0.014007418416440487, -0.00008448059088550508, -0.03206220641732216, -0.0012021127622574568, 0.015591171570122242, 0.0603937953710556, 0.058282122015953064, -0.014174592681229115, -0.01791401021182537, -0.06056976690888405, -0.008728240616619587, -0.0003535949217621237, 0.031199941411614418, -0.03730618953704834, 0.018547510728240013, 0.026325499638915062, 0.0154679911211133, 0.05039855092763901, 0.030126508325338364, 0.07060020416975021, 0.013593882322311401, 0.022242935374379158, 0.028789116069674492, 0.0029211449436843395, -0.023914676159620285, 0.018353940919041634, 0.03266051411628723, 0.0010706832399591804, 0.017430085688829422, -0.02361552231013775, 0.050187382847070694, 0.07510510087013245, 0.04339484125375748, -0.016726195812225342, 0.0023184388410300016, -0.0002361882070545107, -0.05282697081565857, 0.026131929829716682, 0.030918383970856667, 0.009027393534779549, -0.014385759830474854, 0.011095072142779827, -0.03426186367869377, 0.0362151600420475, -0.013444306328892708, -0.011561399325728416, 0.05768381431698799, -0.0019708930049091578, -0.0014704709174111485 ]
716,247
pytorch_optimizer.optimizer.dadapt
DAdaptSGD
SGD with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay.
class DAdaptSGD(Optimizer, BaseOptimizer): r"""SGD with D-Adaptation. Leave LR set to 1 unless you encounter instability. This implementation is based on V3. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param growth_rate: float. prevent the D estimate from growing faster than this multiplicative rate. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. """ def __init__( self, params: PARAMETERS, lr: float = 1.0, momentum: float = 0.9, d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'step': 0, } super().__init__(params, defaults) def __str__(self) -> str: return 'DAdaptSGD' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: if p.grad is None: continue state = self.state[p] state['z'] = p.clone() state['s'] = torch.zeros_like(p) state['x0'] = p.clone() @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() group = self.param_groups[0] device = group['params'][0].device sk_sq = torch.tensor([0.0], device=device) if 'numerator_weighted' not in group: group['numerator_weighted'] = torch.tensor([0.0], device=device) numerator_weighted = group['numerator_weighted'] if group['step'] == 0: group['g0_norm'] = get_global_gradient_norm(self.param_groups, device).sqrt_().item() g0_norm = group['g0_norm'] if g0_norm == 0: return loss d, lr = group['d'], group['lr'] d_lr: float = d * lr / g0_norm for group in self.param_groups: for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['z'] = p.clone() state['s'] = torch.zeros_like(p) state['x0'] = p.clone() self.apply_weight_decay( p=p, grad=None, lr=d_lr, weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) s = state['s'] numerator_weighted.add_(torch.dot(grad.flatten(), s.flatten()), alpha=d_lr) s.add_(grad, alpha=d_lr) sk_sq.add_(s.pow(2).sum()) if lr > 0.0: d_hat = 2.0 * numerator_weighted / sk_sq.sqrt() d = max(d, min(d_hat.item(), d * group['growth_rate'])) for group in self.param_groups: group['step'] += 1 group['numerator_weighted'] = numerator_weighted group['d'] = d for p in group['params']: if p.grad is None: continue state = self.state[p] z = state['z'] z.copy_(state['x0'] - state['s']) p.mul_(group['momentum']).add_(z, alpha=1.0 - group['momentum']) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, momentum: float = 0.9, d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.0056644584983587265, -0.027482928708195686, -0.013429843820631504, 0.012404510751366615, 0.0029679350554943085, -0.005217132158577442, -0.04073183238506317, -0.03872137516736984, -0.011288708075881004, 0.02390431798994541, -0.04030963405966759, 0.026437491178512573, 0.01766185276210308, 0.05866509675979614, -0.027603555470705032, 0.08182554692029953, -0.006146967876702547, 0.04073183238506317, -0.004405410960316658, 0.002494221553206444, -0.027824705466628075, -0.07438685745000839, 0.008574592880904675, 0.07382392883300781, -0.06389228254556656, -0.03335345908999443, 0.020154817029833794, -0.027040628716349602, -0.046361107379198074, -0.022617625072598457, -0.014223973266780376, -0.042058732360601425, -0.019772831350564957, 0.03309210017323494, 0.018757551908493042, -0.005227184854447842, 0.0063329352997243404, 0.011791322380304337, -0.10197030752897263, -0.02478891797363758, 0.020335758104920387, -0.027784496545791626, 0.028990769758820534, -0.0484117716550827, 0.02995578944683075, 0.04189789667725563, -0.02480902150273323, 0.054603975266218185, -0.03019704297184944, 0.004232008941471577, 0.062565378844738, -0.05621233955025673, -0.007428633514791727, -0.01509852148592472, -0.02653801441192627, 0.02911139838397503, 0.08017697185277939, 0.0021511875092983246, 0.06111785024404526, -0.09223970770835876, 0.05476481094956398, -0.0657016932964325, 0.01525935810059309, 0.01652594469487667, -0.03112185373902321, -0.03470046445727348, -0.03886210545897484, -0.04873344302177429, 0.0048753549344837666, 0.02736230194568634, 0.024105362594127655, -0.031785301864147186, 0.010715728625655174, 0.0037469866219908, -0.008690194226801395, -0.010655415244400501, -0.006815444678068161, -0.0855649933218956, -0.016063541173934937, -0.042058732360601425, 0.038962628692388535, 0.0011158029083162546, -0.023783689364790916, -0.031282689422369, -0.013791725970804691, -0.031785301864147186, 0.011318865232169628, -0.018063943833112717, -0.016887826845049858, -0.046361107379198074, 0.03451952338218689, 0.001465119537897408, 0.02909129299223423, 0.050301600247621536, 0.06164056807756424, 0.0427824966609478, -0.05022118240594864, -0.053518328815698624, -0.005553883500397205, -0.009544637985527515, 0.0029880397487431765, 0.026578223332762718, -0.0013909839326515794, 0.035182975232601166, 0.005825295113027096, -0.062846839427948, -0.025150800123810768, -0.013198641128838062, -0.00377714354544878, -0.07663857191801071, -0.02824690192937851, 0.016696833074092865, -0.026397282257676125, -0.00019240689289290458, -0.02993568405508995, -0.0042621660977602005, -0.0005425089038908482, 0.035564959049224854, -0.011610381305217743, 0.034660253673791885, 0.016425423324108124, 0.049738671630620956, -0.0685565397143364, 0.0034001830499619246, 0.009896467439830303, -0.015339776873588562, 0.03313230723142624, 0.035544853657484055, 0.035786110907793045, -0.016988350078463554, -0.0013784186448901892, 0.002947830595076084, -0.025231217965483665, 0.007810620125383139, 0.03534381091594696, -0.04055089130997658, -0.022456789389252663, 0.04451148584485054, -0.019179746508598328, 0.028347425162792206, 0.04672298952937126, 0.017772426828742027, 0.005257341545075178, 0.027583451941609383, 0.056051503866910934, 0.030739866197109222, 0.050663482397794724, 0.05593087524175644, -0.008785691112279892, 0.01857661083340645, -0.007448737975209951, 0.032669905573129654, 0.04085245728492737, 0.0029880397487431765, -0.011127871461212635, -0.032066766172647476, -0.04221956804394722, 0.010786094702780247, -0.043466050177812576, -0.0025005042552948, -0.03168478235602379, -0.06602336466312408, -0.029774848371744156, -0.009283279068768024, -0.0006508849910460413, -0.0020619735587388277, -0.01026840228587389, 0.026316864416003227, -0.01910938136279583, 0.034097328782081604, 0.036911964416503906, -0.05532773956656456, -0.008308207616209984, 0.02482912689447403, 0.003226781263947487, 0.09754730761051178, 0.011801374144852161, 0.0033725393004715443, -0.010132696479558945, -0.04676319658756256, 0.07571376115083694, -0.01141938753426075, -0.012213517911732197, -0.052030593156814575, -0.020747901871800423, 0.04700445383787155, -0.012585451826453209, -0.0007099421345628798, -0.005372942890971899, 0.04169685021042824, 0.03614799305796623, -0.032106976956129074, 0.010454369708895683, -0.03226781263947487, -0.01624448224902153, 0.0213912483304739, 0.024969859048724174, -0.01963209919631481, 0.06453562527894974, 0.05448334664106369, 0.03232812508940697, -0.005584040656685829, 0.02621634118258953, -0.013922405429184437, -0.02428630366921425, -0.03279053047299385, -0.029995998367667198, 0.010956983081996441, 0.0044632116332650185, 0.019863301888108253, -0.051749128848314285, 0.017229605466127396, 0.048934489488601685, 0.03226781263947487, 0.04394856095314026, -0.020667484030127525, 0.009031971916556358, 0.02909129299223423, 0.053799793124198914, -0.03447931259870529, 0.015862494707107544, -0.049457207322120667, 0.014535593800246716, 0.03455973044037819, 0.04418981447815895, -0.047446753829717636, 0.04410939663648605, -0.05733819305896759, -0.0031036408618092537, -0.01913953758776188, 0.023602748289704323, -0.08781670033931732, 0.04599922522902489, -0.021049469709396362, 0.07792525738477707, 0.0029779872857034206, -0.03568558767437935, 0.00039360951632261276, 0.0057046678848564625, -0.014746692031621933, -0.048331353813409805, -0.021813442930579185, -0.03850022703409195, 0.015219149179756641, 0.00042470876360312104, 0.00971552636474371, 0.04708487167954445, 0.030739866197109222, -0.003214215859770775, 0.026638537645339966, -0.016998402774333954, -0.014726587571203709, -0.062846839427948, 0.028126273304224014, -0.07285891473293304, -0.015711709856987, 0.03397670015692711, 0.035826317965984344, -0.02135103940963745, -0.06397269666194916, -0.039766810834407806, -0.058021750301122665, -0.08982715755701065, 0.04708487167954445, -0.040369950234889984, 0.032086871564388275, 0.049819089472293854, -0.028950560837984085, -0.0020481515675783157, 0.033514294773340225, 0.1227986291050911, 0.08709293603897095, -0.07249703258275986, 0.005734824575483799, -0.030619239434599876, 0.039465244859457016, 0.003452957607805729, -0.006885810289531946, 0.025191009044647217, 0.002920186845585704, 0.04071172699332237, -0.0314636304974556, -0.027040628716349602, 0.014203868806362152, -0.024728603661060333, 0.0628870502114296, -0.009373749606311321, 0.00008143916056724265, 0.03232812508940697, 0.0542823001742363, 0.03218739479780197, 0.014465228654444218, 0.10028152912855148, 0.004591377917677164, 0.07889027893543243, 0.02484923228621483, 0.012082838453352451, 0.027482928708195686, -0.0031086669769138098, 0.009248095564544201, 0.04394856095314026, -0.000834967358969152, 0.02623644657433033, 0.04471253231167793, -0.021170098334550858, -0.041455596685409546, 0.015591083094477654, -0.017611591145396233, 0.023542435839772224, 0.002917673671618104, -0.005840373691171408, 0.006689791101962328, -0.002799559384584427, 0.021592292934656143, 0.026437491178512573, -0.07663857191801071, -0.013269007205963135, -0.02651790902018547, 0.02219543047249317, 0.06650587171316147, -0.023823898285627365, 0.0485324002802372, -0.00038387137465178967, -0.009816049598157406, -0.040892668068408966, -0.01525935810059309, 0.02649780549108982, 0.023321285843849182, -0.04302375018596649, -0.0015882599400356412, -0.027844810858368874, -0.0341978520154953, 0.02251710370182991, 0.00798653531819582, -0.013349425047636032, -0.02625655010342598, 0.052673935890197754, 0.01224367506802082, -0.0028749515768140554, -0.05054285377264023, 0.0771612897515297, 0.05158829316496849, -0.03218739479780197, 0.037273846566677094, -0.03480098769068718, -0.04157622158527374, 0.03817855194211006, 0.013470052741467953, 0.0228588804602623, -0.0004595775972120464, -0.008670089766383171, 0.003161441534757614, -0.009941702708601952, 0.09473267197608948, 0.05572982877492905, -0.004757240414619446, -0.015520717017352581, 0.013781673274934292, 0.045476507395505905, -0.06417374312877655, -0.017591487616300583, 0.018395669758319855, -0.04022921621799469, 0.05396062880754471, 0.07563333958387375, -0.008931448683142662, -0.028568575158715248, -0.040952980518341064, 0.035544853657484055, -0.038057923316955566, -0.007901090197265148, -0.08644959330558777, -0.02080821618437767, 0.0008161193109117448, -0.03675112873315811, -0.01936068758368492, -0.04242061451077461, -0.0061922031454741955, 0.028628887608647346, 0.031785301864147186, 0.005614197347313166, -0.021230410784482956, 0.04016890376806259, 0.03817855194211006, 0.03250906616449356, -0.011349022388458252, 0.03679133951663971, -0.006574189756065607, 0.043466050177812576, -0.07643752545118332, 0.025874564424157143, 0.007292927708476782, 0.01123844739049673, 0.03612788766622543, -0.06252516806125641, 0.0314636304974556, 0.05050264671444893, 0.06702858954668045, -0.07893048971891403, -0.028166484087705612, -0.031805407255887985, -0.044913578778505325, -0.016696833074092865, 0.023321285843849182, -0.003226781263947487, -0.0800161361694336, 0.0626860037446022, 0.09843190759420395, -0.009398880414664745, 0.06602336466312408, -0.02567351795732975, 0.004470750689506531, -0.04242061451077461, 0.023482121527194977, -0.00252814800478518, -0.03574590012431145, -0.01963209919631481, 0.06634503602981567, 0.013811830431222916, 0.03196624293923378, 0.03451952338218689, -0.035766005516052246, 0.040952980518341064, 0.026980314403772354, -0.009388827718794346, -0.030016101896762848, -0.056895893067121506, 0.019772831350564957, -0.03287094831466675, -0.015711709856987, -0.011097715236246586, -0.01096703577786684, -0.014756744727492332, -0.018104152753949165, -0.012876967899501324, -0.004327505826950073, 0.03387617692351341, 0.05850425735116005, 0.015430246479809284, -0.003274529706686735, 0.01968236081302166, -0.03564537689089775, 0.005699641536921263, -0.02764376439154148, -0.008152397349476814, -0.020205078646540642, 0.03673102334141731, 0.0071471696719527245, -0.068355493247509, -0.02251710370182991, 0.028347425162792206, -0.015912756323814392, 0.04756737872958183, 0.008700246922671795, -0.03936472162604332, 0.0012226083781570196, 0.006523928605020046, -0.019320478662848473, -0.014022927731275558, -0.02820669300854206, 0.005393047351390123, 0.012937282212078571, -0.020044242963194847, 0.016646573320031166, -0.036047469824552536, 0.05384000018239021, 0.056373175233602524, -0.035182975232601166, -0.015168887563049793, 0.004443106707185507, 0.01309811882674694, 0.027543241158127785, 0.0015053286915645003, -0.05524732172489166, -0.042058732360601425, -0.0007916169124655426, -0.04113392159342766, 0.0009562229388393462, -0.0010812481632456183, -0.008217737078666687, 0.05243268236517906, -0.08307202905416489, 0.01410334650427103, 0.03858064487576485, 0.008006639778614044, -0.016053488478064537, -0.000735701119992882, 0.0284881554543972, 0.011017296463251114, 0.050663482397794724, -0.028648993000388145, -0.03821876272559166, 0.06216328963637352, -0.018616819754242897, -0.03733416274189949, -0.012685975059866905, -0.008504227735102177, -0.020114608108997345, 0.08902297168970108, -0.02082831971347332, 0.009941702708601952, -0.027241673320531845, -0.06353040039539337, -0.012997595593333244, 0.030981121584773064, -0.016395265236496925, -0.042661868035793304, 0.06389228254556656, -0.04527546092867851, 0.00627764780074358, -0.0213912483304739, 0.01621432416141033, 0.0023560025729238987, 0.03962608054280281, 0.005136714316904545, -0.023622853681445122, -0.005448334850370884, 0.07575396448373795, 0.031262584030628204, -0.0485324002802372, 0.03785688057541847, 0.03568558767437935, -0.03447931259870529, 0.0053628901951014996, 0.016626467928290367, 0.03882189840078354, -0.02054685726761818, -0.04611985385417938, 0.06151994317770004, 0.012665870599448681, 0.004616508726030588, 0.011942106299102306, 0.014505437575280666, 0.06928030401468277, 0.011198237538337708, -0.011037400923669338, 0.02223563939332962, -0.05842383950948715, -0.11218342185020447, -0.050301600247621536, 0.0033725393004715443, 0.012625661678612232, 0.01908927597105503, -0.030981121584773064, -0.0072728232480585575, 0.05472460389137268, -0.019732622429728508, 0.02338159829378128, -0.023763585835695267, -0.028347425162792206, -0.053437910974025726, 0.0019488853868097067, -0.023542435839772224, 0.034680359065532684, 0.06111785024404526, -0.019521523267030716, -0.044913578778505325, 0.033856071531772614, -0.002611079253256321, 0.026357073336839676, -0.05496585741639137, -0.03447931259870529, 0.03759552165865898, -0.03078007511794567, 0.010725780390202999, 0.01200241968035698, 0.002212757710367441, -0.02876961976289749, -0.06079617887735367, 0.04997992515563965, -0.020114608108997345, -0.020707692950963974, -0.004370227921754122, 0.02969442866742611, -0.05367916449904442, -0.0045486558228731155, 0.033574607223272324, -0.03401691094040871, -0.0013859578175470233, -0.04334542155265808, 0.05162850022315979, -0.02621634118258953, -0.003030761843547225, 0.011952158994972706, 0.018033787608146667, 0.03355450555682182, -0.07334142178297043, 0.02768397331237793, -0.008604750037193298, -0.0036213332787156105, -0.004003319889307022, 0.019813040271401405, -0.007740254048258066, -0.05166871100664139, -0.004983416758477688, 0.020727798342704773, -0.0485726073384285, 0.0071270652115345, 0.06988343596458435, 0.035524751991033554, -0.05934865027666092, -0.022738253697752953, 0.0485324002802372, 0.0011974776862189174, 0.005669484846293926, -0.019049067050218582, 0.005644354037940502, 0.009816049598157406, 0.020908739417791367, -0.06875757873058319, -0.008212711662054062, 0.002000403357669711, 0.0017176830442622304, -0.03160436078906059, -0.062806636095047, -0.025854459032416344, -0.011328916996717453, 0.031162062659859657, 0.09022925049066544, -0.02623644657433033, 0.0022441709879785776, 0.009660239331424236, -0.004485829267650843, -0.005443308502435684, -0.03110174834728241, -0.010157827287912369, 0.002298202132806182, -0.06465625017881393, -0.010092487558722496, -0.03166467696428299, -0.005724772345274687, -0.00228689331561327, 0.017802584916353226, 0.0008758047479204834, 0.023783689364790916, -0.008750508539378643, 0.04302375018596649, -0.017852846533060074, -0.03114195726811886, -0.012303988449275494, 0.036389246582984924, 0.0400080680847168, 0.014877371490001678, -0.006523928605020046, -0.0369722805917263, -0.03186572343111038, 0.02569362334907055, -0.00505629600957036, 0.034961823374032974, 0.04077203944325447, -0.028890246525406837, 0.04085245728492737, -0.058624885976314545, -0.02567351795732975, 0.043827932327985764, -0.016646573320031166, 0.008348416537046432, 0.022175325080752373, 0.022617625072598457, -0.028186587616801262, 0.020969051867723465, 0.006287700030952692, 0.022456789389252663, 0.0099869379773736, -0.08226784318685532, 0.003339869435876608, -0.009243070147931576, -0.004611482378095388, 0.009725579060614109, -0.03506234660744667, -0.08870130032300949, -0.018395669758319855, -0.05279456451535225, 0.007684966549277306, -0.0029930658638477325, -0.03630882874131203, 0.026698850095272064, -0.0371331162750721, -0.02084842510521412, -0.016023332253098488, 0.05367916449904442, 0.03049861267209053, 0.030176939442753792, -0.0026563145220279694, 0.03860074654221535, -0.03908325731754303, -0.029493384063243866, -0.04055089130997658, 0.021833548322319984, -0.0015957991126924753, -0.024145571514964104, -0.027322091162204742, 0.002389929024502635, -0.0314435251057148, 0.04917574301362038, -0.09489350765943527, -0.022356266155838966, 0.0017943315906450152, 0.0021587267983704805, -0.06706880033016205, -0.0052774460054934025, 0.002208988182246685, -0.03339366614818573, 0.018908334895968437, 0.03051871620118618, 0.04905511811375618, 0.0011943363351747394, -0.007725175935775042, 0.03886210545897484, -0.01738038845360279, 0.019159642979502678, 0.003628872334957123, -0.010042225942015648, -0.004106355831027031, 0.011027349159121513, -0.023823898285627365, 0.014947737567126751, -0.02078811079263687, -0.0171290822327137, 0.05331728234887123, -0.01740049384534359, -0.022698044776916504, 0.002480399562045932, 0.027322091162204742, -0.05182954668998718, -0.028307214379310608, 0.022356266155838966, -0.006574189756065607, 0.033514294773340225, -0.012505033984780312, 0.020476490259170532, 0.04071172699332237, -0.014384809881448746, -0.014656221494078636, 0.02026539295911789, 0.016375161707401276, 0.06976281106472015, 0.025593100115656853, -0.02878972515463829, 0.056373175233602524, -0.019752725958824158, 0.06168077886104584, -0.011178133077919483, -0.03256938233971596, -0.01879776082932949, 0.061761196702718735, -0.04334542155265808, -0.04628068953752518, 0.03570569306612015, -0.04153601452708244, 0.08339370042085648, -0.022999612614512444, -0.0042219567112624645, -0.0034102352801710367, 0.035806216299533844, -0.06533981114625931, -0.014113398268818855, -0.04447127878665924, -0.05963011458516121, -0.08628875762224197, -0.0015983121702447534, -0.050663482397794724, 0.08492164313793182, 0.0242460947483778, 0.0036137939896434546, 0.027221569791436195, 0.023019716143608093, 0.000019535189494490623 ]
716,249
pytorch_optimizer.optimizer.dadapt
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, momentum: float = 0.9, d0: float = 1e-6, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0, range_type='[)') self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'd': d0, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'step': 0, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 1.0, momentum: float = 0.9, d0: float = 1e-06, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.01757049560546875, -0.0029052479658275843, -0.026059193536639214, -0.007594420108944178, -0.023779477924108505, -0.002355011645704508, -0.07384055852890015, -0.007469313684850931, -0.0445193350315094, 0.02500274032354355, -0.015188840217888355, 0.06961474567651749, 0.041590917855501175, 0.06757597625255585, -0.03269446641206741, 0.0484115332365036, 0.015448320657014847, 0.007441512309014797, -0.027134181931614876, -0.006486997008323669, 0.010203119367361069, -0.023705340921878815, -0.014753284864127636, 0.10445918887853622, -0.026059193536639214, 0.02053597941994667, -0.033695317804813385, 0.024094561114907265, -0.04107195883989334, -0.00822458602488041, -0.007487847935408354, -0.019627800211310387, -0.02678203023970127, 0.08599904924631119, 0.03262032940983772, -0.014577209018170834, -0.012204822152853012, 0.0011693970300257206, -0.09267138689756393, 0.04778136685490608, 0.05178477242588997, -0.018599146977066994, 0.047373611479997635, -0.03467763215303421, -0.010749881155788898, 0.010203119367361069, 0.016782788559794426, 0.042295221239328384, -0.0048142788000404835, -0.030581558123230934, 0.029858721420168877, -0.03313928842544556, 0.014503072015941143, -0.03562287986278534, -0.054564911872148514, 0.03654959425330162, 0.07532330602407455, 0.035196591168642044, 0.03193455934524536, -0.002949266927316785, -0.0066584390588104725, -0.048930492252111435, 0.010573805309832096, -0.00841919519007206, -0.010796216316521168, -0.009438580833375454, -0.06742770224809647, -0.03873664140701294, 0.02359413541853428, 0.02756047062575817, 0.08992831408977509, -0.012232623063027859, -0.006547233555465937, 0.02865399233996868, 0.003366288263350725, -0.00953588541597128, -0.07903015613555908, -0.05942089483141899, -0.03732803463935852, -0.007172765210270882, 0.043555550277233124, 0.020498910918831825, -0.02967337891459465, -0.03625304624438286, 0.012473568320274353, -0.04162798821926117, -0.029321227222681046, -0.047744300216436386, -0.0034450588282197714, 0.01382657140493393, -0.03606770560145378, -0.00362113444134593, -0.005685389507561922, -0.03173068165779114, 0.09897304326295853, 0.015930211171507835, -0.00827555451542139, -0.03158240765333176, 0.021888982504606247, 0.002379337791353464, -0.012482835911214352, 0.02209285832941532, -0.03895905241370201, 0.010082647204399109, 0.00837286002933979, -0.043555550277233124, -0.062126897275447845, -0.03256472572684288, 0.020591583102941513, -0.06865096092224121, -0.049078766256570816, 0.05030202865600586, -0.02077692560851574, 0.024094561114907265, -0.05015375465154648, 0.05374940484762192, 0.0406271368265152, 0.03341730311512947, 0.02162950113415718, 0.014002646319568157, 0.03490004315972328, 0.016847658902406693, -0.045334842056035995, 0.03803233802318573, 0.038625434041023254, -0.007066193502396345, 0.00034549052361398935, 0.021425625309348106, 0.022074325010180473, -0.02811649814248085, 0.028135033324360847, 0.0013437351444736123, -0.030600091442465782, -0.014957161620259285, 0.02023943141102791, -0.03480737283825874, 0.01307593286037445, 0.04663224145770073, -0.03742070496082306, 0.03021087311208248, 0.05975450947880745, 0.017079336568713188, 0.04084954783320427, 0.017728036269545555, -0.00961002241820097, 0.03719829395413399, -0.018376735970377922, 0.035956498235464096, -0.010434797964990139, 0.05137701705098152, -0.003804160514846444, 0.030118200927972794, 0.03693881630897522, 0.03756897896528244, 0.024409644305706024, -0.03328756242990494, -0.00746004655957222, -0.017320282757282257, -0.015401984564960003, 0.024891534820199013, -0.03176775202155113, 0.020888131111860275, 0.019182976335287094, -0.024891534820199013, -0.014002646319568157, -0.000007389276106550824, -0.03693881630897522, -0.024539383128285408, -0.008738911710679531, 0.022611819207668304, 0.014493805356323719, -0.09052141010761261, 0.004042789340019226, 0.015059100463986397, 0.019423922523856163, 0.06353550404310226, 0.03117465414106846, 0.0020051770843565464, -0.0214812271296978, -0.004939384758472443, 0.07858533412218094, 0.006324822083115578, -0.025206618010997772, -0.06879923492670059, 0.015216642059385777, 0.04170212522149086, -0.05927262082695961, 0.040256451815366745, -0.026893235743045807, 0.04177626222372055, 0.05771574005484581, 0.0008531559724360704, 0.007376642432063818, 0.009878769516944885, -0.011259573511779308, 0.01808018796145916, 0.05842004343867302, -0.011695128865540028, 0.0076500228606164455, 0.05715971067547798, 0.08599904924631119, 0.031823355704545975, 0.01625456102192402, -0.03821767866611481, 0.007951204665005207, -0.01983167603611946, -0.03793966770172119, 0.005662221927195787, -0.03124879114329815, -0.027819950133562088, -0.019312717020511627, -0.002935366239398718, 0.04262883961200714, 0.028524253517389297, -0.0020978485699743032, -0.03929266706109047, -0.02874666452407837, 0.006343356333673, 0.01507763471454382, -0.030118200927972794, 0.10942637175321579, -0.02546609751880169, 0.0007963947136886418, -0.0016993616009131074, 0.054861459881067276, 0.0007483214722014964, 0.037754323333501816, -0.07157938182353973, -0.06605616211891174, 0.0429624542593956, -0.01194534171372652, -0.07821465283632278, -0.01745002157986164, -0.020832527428865433, 0.06368377804756165, 0.010916689410805702, -0.01810798980295658, 0.048782218247652054, -0.0757681280374527, -0.003264349652454257, 0.01425285916775465, 0.033231958746910095, 0.008989124558866024, -0.003134609665721655, 0.024242835119366646, 0.014447469264268875, 0.049560658633708954, 0.015578060410916805, -0.06131139025092125, -0.01292765885591507, -0.043296072632074356, -0.020573047921061516, -0.011583923362195492, 0.056121792644262314, -0.02068425342440605, 0.023853614926338196, 0.03649399057030678, -0.0018545861821621656, 0.0024673757143318653, -0.0018082504393532872, -0.016458438709378242, -0.007033758331090212, -0.020350636914372444, 0.08992831408977509, -0.005676122382283211, 0.008970590308308601, -0.003236548276618123, -0.023149313405156136, 0.009702694602310658, -0.006440661381930113, 0.12425379455089569, 0.026744961738586426, -0.003597966628149152, 0.0019182977266609669, -0.002370070666074753, -0.03208283334970474, 0.01194534171372652, -0.05093219503760338, -0.02405749261379242, 0.05178477242588997, 0.01635649986565113, -0.0523407980799675, 0.01983167603611946, 0.006116311531513929, -0.01920151151716709, 0.018923496827483177, -0.025410493835806847, 0.0195351280272007, 0.0009047044441103935, 0.015513190068304539, -0.0037531910929828882, 0.0035632147919386625, 0.08021635562181473, 0.04522363841533661, 0.11832282692193985, -0.004478344693779945, 0.04396330565214157, 0.013715364970266819, 0.048856355249881744, -0.0030743733514100313, 0.05919848382472992, -0.02811649814248085, 0.04818912222981453, -0.0029052479658275843, -0.049783069640398026, -0.05460198223590851, 0.03232378140091896, 0.025892386212944984, 0.028802266344428062, 0.05493559688329697, 0.026837633922696114, 0.018923496827483177, 0.02022089622914791, 0.029191486537456512, 0.02109200693666935, -0.06253465265035629, 0.004242032766342163, -0.041516780853271484, 0.041516780853271484, 0.044333990663290024, 0.007177399005740881, 0.031026380136609077, 0.00515252910554409, -0.01983167603611946, -0.07317332923412323, -0.060570020228624344, 0.024428177624940872, 0.03732803463935852, -0.0363086499273777, -0.005430543329566717, -0.02209285832941532, -0.024891534820199013, 0.021777775138616562, -0.024854466319084167, -0.029006144031882286, -0.025243686512112617, 0.020498910918831825, 0.05801228806376457, -0.009179101325571537, -0.02794969081878662, 0.0984540805220604, 0.004158628638833761, -0.011658060364425182, 0.037457775324583054, -0.012473568320274353, -0.042295221239328384, 0.03402893245220184, -0.03015526942908764, 0.044333990663290024, -0.019034702330827713, -0.018432339653372765, 0.015086902305483818, -0.025188082829117775, 0.07169058173894882, 0.039329737424850464, -0.04014524444937706, -0.019739005714654922, -0.013066665269434452, 0.02804236114025116, -0.04492709040641785, -0.030099665746092796, 0.0035608981270343065, -0.04348141327500343, 0.054564911872148514, 0.01997995190322399, -0.018719621002674103, -0.00589853385463357, -0.012584774754941463, 0.025836782529950142, 0.012195554561913013, 0.0026411344297230244, -0.06657512485980988, -0.02959924191236496, -0.007038391660898924, 0.004758675582706928, -0.013335412368178368, -0.037290968000888824, 0.0181728582829237, 0.03326902911067009, 0.0034126238897442818, -0.0026388177648186684, -0.009030826389789581, 0.05530628561973572, 0.002761607291176915, -0.00589390005916357, -0.023779477924108505, 0.0018453190568834543, 0.01839527115225792, 0.0624975822865963, -0.010861086659133434, 0.01031432580202818, -0.013724632561206818, 0.01023092120885849, -0.0041956971399486065, -0.06535185873508453, 0.050635647028684616, 0.05426836386322975, 0.04718827083706856, -0.06338723003864288, -0.02835744433104992, -0.018256263807415962, -0.05159942805767059, -0.02374240942299366, 0.03766165301203728, 0.0020584631711244583, -0.015568792819976807, 0.03236084803938866, 0.05971744284033775, 0.011166902258992195, 0.08310770243406296, 0.013326145708560944, -0.0218519140034914, -0.0261518657207489, 0.023001037538051605, -0.02179631032049656, -0.05586231127381325, -0.007209833711385727, -0.025521699339151382, 0.006899384781718254, 0.00976756401360035, 0.026522550731897354, 0.003607233753427863, 0.07391469925642014, 0.029506569728255272, 0.04210987687110901, 0.04044179245829582, -0.014781086705625057, 0.034640565514564514, -0.004925484303385019, -0.04477881267666817, -0.03973748907446861, 0.026059193536639214, -0.03532633185386658, -0.032212574034929276, 0.021277351304888725, 0.001809408888220787, 0.001863853307440877, 0.02146269381046295, 0.004218864720314741, -0.010082647204399109, 0.024094561114907265, -0.0835525244474411, 0.041442643851041794, -0.03701295331120491, -0.039403874427080154, -0.014169455505907536, 0.009656358510255814, 0.0007767020724713802, -0.04129436984658241, -0.00789560191333294, 0.035734087228775024, -0.006505531258881092, 0.027616074308753014, -0.007070826832205057, -0.020591583102941513, -0.026689359918236732, -0.026652291417121887, -0.0030836404766887426, 0.04266590625047684, -0.05582524463534355, 0.0328056700527668, 0.003211063565686345, -0.009373710490763187, -0.020832527428865433, -0.057752810418605804, 0.04344434663653374, 0.050487373024225235, -0.03226817771792412, -0.030729832127690315, -0.002101323800161481, 0.010138249956071377, 0.021573899313807487, 0.03521512821316719, -0.06828027963638306, -0.04818912222981453, 0.021666569635272026, -0.02179631032049656, -0.03211990371346474, 0.009239337407052517, -0.027597539126873016, 0.029117349535226822, -0.06831734627485275, 0.021147610619664192, 0.07903015613555908, 0.0033292195294052362, -0.01238089706748724, -0.05801228806376457, 0.008595271036028862, 0.015207374468445778, 0.029488034546375275, -0.07799223810434341, -0.000780177244450897, 0.019257115200161934, 0.02757900580763817, 0.0008873285260051489, -0.023779477924108505, 0.015170305967330933, 0.004888415802270174, 0.06175621226429939, 0.02179631032049656, 0.0032156971283257008, -0.020350636914372444, -0.023223450407385826, -0.005708557553589344, 0.02133295312523842, -0.017144206911325455, -0.07484140992164612, 0.029506569728255272, -0.04930117726325989, -0.00739981047809124, -0.01858988031744957, 0.0222596675157547, -0.03148973733186722, 0.027597539126873016, -0.06746476888656616, -0.030803969129920006, -0.04930117726325989, 0.07369228452444077, -0.011139100417494774, -0.0379025973379612, 0.03925560042262077, 0.06060708686709404, 0.015022031962871552, -0.046817585825920105, 0.006769645027816296, 0.026744961738586426, -0.003945484291762114, -0.0694664716720581, 0.07283970713615417, 0.03215697035193443, -0.00046046095667406917, -0.04070127382874489, -0.0304703526198864, 0.055639900267124176, -0.03717976063489914, 0.027764348313212395, 0.024094561114907265, -0.04989427328109741, -0.07387763261795044, -0.037606049329042435, 0.013103733770549297, 0.02646694891154766, 0.03334316611289978, -0.030433284118771553, -0.017394419759511948, 0.003266666317358613, -0.01863621547818184, 0.05523214861750603, -0.041516780853271484, 0.00027613178826868534, -0.015439053066074848, -0.039552148431539536, -0.056974370032548904, 0.028172101825475693, 0.01586534082889557, -0.012584774754941463, 0.019479526206851006, -0.015754135325551033, 0.06186741963028908, 0.028950542211532593, -0.03421427682042122, -0.009832434356212616, 0.008539668284356594, 0.008826949633657932, -0.00441115815192461, 0.011278107762336731, -0.008711110800504684, -0.03239791840314865, -0.0843680277466774, 0.03527073189616203, 0.004202647600322962, -0.00420959759503603, 0.011352244764566422, 0.019572196528315544, -0.04859687387943268, 0.007209833711385727, -0.00470770662650466, 0.02140709012746811, -0.025947988033294678, -0.05030202865600586, 0.004202647600322962, -0.014493805356323719, -0.07002250105142593, -0.08703696727752686, 0.020443307235836983, 0.0074739474803209305, -0.06257171928882599, 0.02857985533773899, -0.022852763533592224, -0.010749881155788898, 0.006899384781718254, 0.02279716171324253, -0.029098816215991974, -0.04348141327500343, -0.04414865002036095, 0.023760944604873657, -0.03449229151010513, -0.021499762311577797, 0.050413236021995544, 0.0546761192381382, -0.07521209865808487, -0.011120566166937351, 0.01997995190322399, 0.0165974460542202, -0.019664868712425232, -0.023872150108218193, 0.00835895910859108, 0.05489853024482727, 0.01656964421272278, -0.07784396409988403, -0.0026527184527367353, -0.012139951810240746, -0.01565219648182392, -0.02281569503247738, -0.015253710560500622, -0.045965008437633514, -0.03582675755023956, 0.027541935443878174, 0.0812542736530304, -0.01975753903388977, -0.004883782006800175, -0.0491899736225605, -0.013604159466922283, 0.030118200927972794, -0.07858533412218094, -0.006222883705049753, -0.0014468320878222585, -0.10349540412425995, 0.005791961681097746, -0.0421840138733387, 0.03165654465556145, -0.007483214605599642, -0.03717976063489914, -0.05927262082695961, 0.018432339653372765, 0.028153566643595695, 0.010110448114573956, 0.0076778242364525795, 0.038773708045482635, -0.009225436486303806, 0.016588177531957626, 0.049004629254341125, 0.0005484987632371485, -0.019182976335287094, -0.04366675764322281, -0.035715553909540176, -0.006116311531513929, 0.005398108158260584, 0.05867952108383179, 0.03649399057030678, -0.020443307235836983, 0.047670163214206696, -0.02841304801404476, 0.0152351763099432, -0.0003860342549160123, -0.01104642916470766, 0.014160187914967537, -0.00589853385463357, 0.038625434041023254, -0.036827608942985535, -0.008572103455662727, -0.004879148676991463, 0.026985907927155495, 0.0202950332313776, 0.007376642432063818, -0.017829975113272667, -0.029580706730484962, -0.01217702031135559, -0.006074609234929085, -0.02014675922691822, -0.04548311606049538, -0.026911770924925804, -0.01292765885591507, 0.02843158133327961, 0.014790353365242481, -0.004656737204641104, -0.028987610712647438, -0.018506476655602455, 0.03569701686501503, -0.0028079431504011154, 0.060088127851486206, 0.03545607253909111, -0.004638202954083681, -0.03567848354578018, 0.017774371430277824, -0.017366617918014526, -0.06364671140909195, 0.02250061370432377, -0.004851347301155329, -0.01425285916775465, -0.04155385121703148, -0.003319952404126525, 0.009888037107884884, -0.026300139725208282, 0.03158240765333176, -0.04818912222981453, -0.09400585293769836, -0.04944945126771927, 0.002812576713040471, -0.03515952453017235, -0.010184585116803646, 0.025317823514342308, -0.061422593891620636, 0.06386911869049072, 0.013187138363718987, 0.03402893245220184, 0.003901465330272913, -0.0015267611015588045, -0.003994136583060026, -0.050413236021995544, 0.05100633203983307, 0.05015375465154648, 0.030803969129920006, -0.07350694388151169, -0.0007355791167356074, 0.00605144165456295, 0.037995267659425735, -0.007483214605599642, -0.03406600281596184, 0.002075839089229703, -0.01922004483640194, -0.03273153305053711, 0.017283214256167412, 0.010295791551470757, -0.0031508272513747215, -0.067946657538414, -0.030173804610967636, 0.0036836876533925533, 0.019868744537234306, -0.03638278692960739, 0.03147120401263237, 0.033695317804813385, -0.016949595883488655, -0.017626097425818443, 0.03649399057030678, -0.025707043707370758, 0.021036405116319656, 0.020869595929980278, 0.05222959443926811, 0.06983716040849686, -0.009206902235746384, 0.049004629254341125, -0.05030202865600586, -0.0025438296142965555, -0.0009626240353100002, 0.05319337546825409, -0.019164443016052246, -0.041109029203653336, 0.06831734627485275, 0.006602836307138205, 0.00961002241820097, -0.03695734962821007, -0.002087423112243414, 0.015995081514120102, 0.03438108414411545, -0.05100633203983307, -0.016375035047531128, -0.031044915318489075, -0.06842855364084244, -0.07836292684078217, -0.003743923967704177, -0.06186741963028908, 0.08503526449203491, 0.012316027656197548, 0.005754893179982901, 0.045334842056035995, 0.0515252910554409, 0.008738911710679531 ]
716,252
pytorch_optimizer.optimizer.dadapt
__str__
null
def __str__(self) -> str: return 'DAdaptSGD'
(self) -> str
[ 0.03497512266039848, -0.03116508387029171, 0.01107018906623125, -0.03112996742129326, 0.006092554423958063, -0.03574766591191292, 0.010999957099556923, 0.007409388665109873, 0.06563103199005127, -0.024844277650117874, -0.068440280854702, 0.025335894897580147, -0.011772500351071358, 0.023474769666790962, 0.009902595542371273, 0.015284058637917042, -0.011640816926956177, -0.032815515995025635, 0.003136260900646448, 0.024475563317537308, -0.008418961428105831, 0.011939299292862415, -0.009437314234673977, -0.00829605758190155, -0.010885831899940968, 0.06882654875516891, 0.01214999333024025, -0.04979390278458595, -0.0376087948679924, -0.014959239400923252, -0.022614438086748123, -0.06475314497947693, -0.02054261788725853, 0.016644788905978203, -0.03513314574956894, 0.047616735100746155, -0.014766104519367218, -0.010666359215974808, -0.05386731028556824, -0.010025500319898129, -0.010991178452968597, -0.020384598523378372, 0.03155135363340378, -0.03309644013643265, 0.0011917352676391602, 0.015617657452821732, -0.031200198456645012, 0.016513105481863022, -0.012729399837553501, 0.019313571974635124, 0.02124493010342121, 0.00836189929395914, -0.07163579761981964, 0.00573700899258256, -0.040558502078056335, 0.04877554997801781, 0.044105175882577896, 0.048986244946718216, 0.0024756488855928183, 0.0019906149245798588, -0.016074160113930702, -0.012852304615080357, 0.057975832372903824, -0.016873039305210114, -0.03565987944602966, 0.03474687412381172, -0.01789139211177826, 0.027319926768541336, 0.009665565565228462, 0.03669578954577446, 0.028900127857923508, -0.07026629149913788, -0.038592029362916946, 0.019594497978687286, 0.045228876173496246, -0.024861834943294525, -0.059801843017339706, -0.024405332282185555, 0.0104820029810071, -0.0664035752415657, 0.0354316271841526, -0.0022912919521331787, -0.0014166944893077016, -0.018681492656469345, 0.0012345323339104652, -0.06731657683849335, -0.02073575370013714, -0.03320178762078285, -0.02386104129254818, -0.013458048924803734, -0.019717402756214142, -0.030568117275834084, -0.02809247002005577, 0.08708665519952774, -0.035870570689439774, 0.004354332573711872, -0.020612848922610283, -0.07121440768241882, 0.00887985434383154, 0.00629885820671916, 0.008309225551784039, 0.018628818914294243, -0.029655111953616142, 0.004494795110076666, -0.03509802743792534, -0.02849629893898964, -0.025757282972335815, 0.04617699608206749, -0.030550559982657433, -0.007067011669278145, -0.010833158157765865, 0.031937625259160995, 0.03718740493059158, -0.01758413016796112, -0.0013837736332789063, -0.05829187482595444, 0.027460388839244843, 0.002350549679249525, 0.016829144209623337, -0.0018095501000061631, -0.013879435136914253, 0.031516239047050476, -0.08160862326622009, 0.024229755625128746, 0.012106098234653473, 0.06524475663900375, -0.022825131192803383, 0.021929683163762093, 0.017311984673142433, -0.04048827290534973, 0.05562308803200722, -0.01125454530119896, -0.0663684606552124, -0.0012433112133294344, 0.07381296157836914, -0.03206053003668785, 0.055166587233543396, 0.012948872521519661, 0.03025207854807377, 0.14292043447494507, -0.028601644560694695, 0.006746582221239805, 0.04280589893460274, 0.039891306310892105, -0.0008219241863116622, 0.04133104532957077, -0.01259771641343832, 0.05428869649767876, -0.00836189929395914, 0.002451506908982992, -0.006184732541441917, 0.03729275241494179, 0.00983236450701952, -0.012755736708641052, -0.023123614490032196, -0.009296851232647896, -0.005043475888669491, -0.023966386914253235, 0.021280044689774513, -0.029058147221803665, -0.019366245716810226, -0.05572843551635742, -0.015837129205465317, 0.006079385988414288, -0.018488356843590736, -0.020402155816555023, -0.03562476113438606, 0.027249695733189583, -0.030638348311185837, 0.023562557995319366, -0.0057896822690963745, -0.06208435818552971, -0.0882805809378624, 0.02013878896832466, 0.0025129590649157763, 0.046528153121471405, 0.022245723754167557, 0.09670832753181458, 0.027548177167773247, -0.03404456004500389, 0.04245474562048912, 0.015231385827064514, -0.04178754612803459, 0.03954014927148819, 0.03838133439421654, -0.03509802743792534, 0.006566614843904972, 0.028145141899585724, 0.05197106674313545, -0.0013662157580256462, 0.04881066456437111, 0.02275490015745163, -0.028110027313232422, -0.046738844364881516, -0.002837778301909566, -0.04287613183259964, 0.0034084066282957792, -0.07599012553691864, -0.03337736427783966, 0.038311105221509933, 0.025019856169819832, 0.0321132056415081, -0.009112494997680187, 0.047406040132045746, 0.05850256606936455, 0.005407800432294607, 0.03469419851899147, -0.036344632506370544, 0.010253751650452614, -0.011026293970644474, 0.03662555664777756, 0.011096525005996227, 0.011228208430111408, 0.011298440396785736, 0.049161821603775024, -0.03887295350432396, -0.00733915762975812, 0.013879435136914253, -0.01006939448416233, -0.023545000702142715, 0.040804311633110046, -0.038100410252809525, 0.008976422250270844, 0.004626478534191847, -0.06078508123755455, -0.006465657148510218, 0.044526562094688416, -0.035484299063682556, -0.02365034818649292, -0.028777223080396652, 0.002699510660022497, -0.06777308136224747, 0.0029277619905769825, 0.037889719009399414, 0.052287109196186066, 0.05102294683456421, -0.03662555664777756, 0.0043762801215052605, -0.03069102205336094, -0.033921655267477036, -0.031024619936943054, 0.013747751712799072, -0.003467664122581482, 0.009762133471667767, 0.03448350727558136, -0.0486350879073143, -0.029444418847560883, -0.005399021320044994, -0.01737343706190586, -0.02809247002005577, 0.06752727180719376, -0.05836210399866104, -0.030638348311185837, -0.007650808431208134, -0.027109233662486076, -0.060433924198150635, -0.052462685853242874, 0.013019103556871414, 0.007887838408350945, -0.03574766591191292, -0.07697336375713348, -0.033675845712423325, -0.0884912759065628, 0.05063667520880699, -0.0020805986132472754, 0.043402865529060364, -0.006658792961388826, 0.01631118915975094, 0.018892185762524605, -0.020841101184487343, 0.10927970707416534, 0.07051210105419159, -0.08034446090459824, 0.02386104129254818, -0.028443625196814537, -0.0016317773843184114, 0.002978240605443716, 0.01435349602252245, -0.06345386803150177, -0.05695747956633568, 0.030094057321548462, -0.027355041354894638, -0.008462856523692608, 0.05776514112949371, -0.016223400831222534, -0.04017223045229912, 0.03137577697634697, -0.027723755687475204, 0.008111700415611267, 0.04329751804471016, 0.04161196947097778, 0.07226787507534027, 0.008717444725334644, -0.0005360613577067852, 0.03950503468513489, 0.038311105221509933, 0.0619087778031826, 0.01920822635293007, -0.007545461878180504, 0.027477946132421494, -0.013405375182628632, -0.033921655267477036, 0.022157935425639153, 0.02737260051071644, -0.05365661531686783, -0.007321599870920181, 0.005952091887593269, -0.02363278903067112, 0.02630157396197319, 0.015424521639943123, -0.039224110543727875, 0.04800300672650337, 0.019612055271863937, 0.07493665814399719, 0.027091674506664276, 0.06742192804813385, -0.016600893810391426, 0.021701432764530182, 0.01969984360039234, 0.06303247809410095, -0.04087454453110695, 0.04371890425682068, -0.03406211733818054, -0.009885037317872047, 0.014362274669110775, 0.01810208521783352, -0.03827599063515663, 0.018383009359240532, 0.01876928098499775, 0.03866226226091385, -0.05176037549972534, -0.0331842303276062, 0.04989925026893616, -0.012079761363565922, 0.01836545206606388, 0.011904183775186539, 0.049583207815885544, -0.04403494670987129, -0.037433214485645294, -0.04280589893460274, 0.0995878055691719, 0.01691693440079689, -0.046282343566417694, 0.04691442474722862, 0.011833952739834785, 0.03471175581216812, -0.031726934015750885, -0.035045355558395386, 0.01107018906623125, 0.007001169957220554, -0.02389615587890148, -0.010130846872925758, 0.00044854675070382655, 0.05720328912138939, 0.04909158870577812, 0.0187517236918211, -0.025072528049349785, 0.057800255715847015, -0.014019898138940334, 0.011052630841732025, -0.008256552740931511, -0.04754650592803955, -0.003788093803450465, 0.01691693440079689, -0.02185945212841034, -0.01370385754853487, -0.012334349565207958, -0.012755736708641052, 0.07198695093393326, -0.019067764282226562, -0.029251283034682274, 0.0015209438279271126, -0.029655111953616142, 0.00502152880653739, -0.033921655267477036, 0.0464579202234745, 0.015521089546382427, -0.009130052290856838, -0.04505329579114914, -0.02052506059408188, 0.010051836259663105, -0.00012407050235196948, 0.01691693440079689, 0.03939968720078468, 0.03936457261443138, -0.010903389193117619, 0.013062997721135616, 0.044772371649742126, -0.0012575769796967506, -0.05590401217341423, -0.003390848869457841, -0.03827599063515663, -0.0044355373829603195, 0.01737343706190586, -0.04877554997801781, -0.08448810130357742, -0.013756531290709972, 0.01194807793945074, -0.05723840743303299, 0.022667111828923225, -0.015275279991328716, -0.04775719717144966, -0.03841645270586014, 0.024861834943294525, -0.01789139211177826, -0.03697671368718147, 0.03551941737532616, 0.025792397558689117, -0.012316792272031307, -0.014537853188812733, 0.026617614552378654, -0.011737384833395481, -0.06956397742033005, -0.03848668187856674, 0.027302367612719536, 0.026231342926621437, -0.064156174659729, 0.025265663862228394, -0.009999163448810577, 0.002809247002005577, -0.017250532284379005, 0.023106055334210396, 0.02652982622385025, 0.02493206597864628, -0.002605137648060918, 0.008642823435366154, 0.0027807154692709446, 0.07493665814399719, 0.06208435818552971, 0.0008504556026309729, -0.05035575106739998, 0.052287109196186066, -0.02012123167514801, -0.03341247886419296, 0.0041282763704657555, -0.044105175882577896, 0.010323982685804367, -0.014256928116083145, -0.023773252964019775, 0.002149732317775488, 0.01610049605369568, -0.07641151547431946, -0.02029680833220482, -0.017935285344719887, 0.012992766685783863, -0.03474687412381172, -0.05885372310876846, -0.007549851201474667, 0.029461978003382683, -0.037257637828588486, -0.020279251039028168, 0.019102878868579865, 0.008576981723308563, -0.022596880793571472, 0.018189873546361923, -0.046528153121471405, 0.02294803597033024, -0.06264620274305344, -0.022930478677153587, -0.009472429752349854, -0.0686158537864685, 0.001963180722668767, -0.03495756536722183, 0.017390994355082512, 0.02386104129254818, 0.03929433971643448, 0.022386185824871063, 0.0030309141147881746, -0.03155135363340378, 0.006887044291943312, 0.028443625196814537, -0.01014840416610241, 0.0026336689479649067, -0.04680907726287842, 0.014063792303204536, 0.05727352201938629, -0.03715229034423828, 0.010841937735676765, -0.003087976947426796, 0.016074160113930702, -0.01748756133019924, -0.08448810130357742, 0.009648007340729237, 0.08153839409351349, -0.0276359673589468, 0.0005525217857211828, -0.023685462772846222, 0.007615692913532257, -0.04017223045229912, -0.004797666799277067, 0.053832195699214935, 0.009753353893756866, -0.05983695760369301, -0.039048533886671066, 0.033026210963726044, 0.06612265110015869, -0.01566155068576336, -0.04157685488462448, -0.05123364180326462, 0.005653609521687031, 0.007874670438468456, -0.04052338749170303, -0.04133104532957077, -0.02523054927587509, 0.0441402904689312, -0.01922578364610672, 0.008717444725334644, 0.027671081945300102, -0.02561682090163231, -0.024861834943294525, -0.005644830409437418, -0.031516239047050476, 0.019787633791565895, 0.03925922513008118, 0.030550559982657433, -0.002745599951595068, -0.0054999785497784615, 0.0320780873298645, -0.02080598473548889, 0.030673464760184288, 0.005640441086143255, -0.027706198394298553, -0.027688639238476753, -0.033500269055366516, -0.015047028660774231, 0.005640441086143255, -0.02008611522614956, 0.012079761363565922, -0.012430917471647263, 0.08912336081266403, 0.03232389688491821, 0.0683700442314148, 0.02565193548798561, 0.06819447129964828, 0.03673090413212776, 0.09607624262571335, -0.05664144083857536, 0.021964799612760544, -0.01469587255269289, -0.00032262445893138647, 0.005732619669288397, -0.054920777678489685, 0.0046835411339998245, -0.03530872240662575, 0.02493206597864628, -0.014072570949792862, 0.006329584401100874, -0.009323188103735447, 0.07437480986118317, -0.03599347546696663, 0.0011807616101577878, -0.0024449226912111044, -0.029778016731142998, -0.046773962676525116, 0.030778812244534492, 0.06808912009000778, -0.005605325568467379, 0.015582541935145855, 0.02607332356274128, 0.011544249020516872, -0.06714100390672684, -0.029532209038734436, 0.08856151252985, 0.04989925026893616, 0.020454829558730125, 0.043894484639167786, -0.02345721237361431, 0.03574766591191292, -0.009103715419769287, -0.05695747956633568, -0.0042665437795221806, -0.06749215722084045, 0.029479535296559334, 0.06545545160770416, -0.0907386764883995, 0.043648675084114075, 0.07697336375713348, 0.027758870273828506, -0.031252872198820114, 0.00862087681889534, -0.01968228630721569, 0.03838133439421654, 0.01768069714307785, 0.014766104519367218, -0.039891306310892105, 0.01834789477288723, -0.010253751650452614, -0.012843525968492031, 0.0057150619104504585, -0.07437480986118317, -0.03518581762909889, -0.005126875825226307, -0.009911374188959599, -0.004424564074724913, 0.020665522664785385, -0.05695747956633568, -0.019348688423633575, -0.024580910801887512, 0.05607959255576134, 0.01271184254437685, 0.006900212727487087, 0.037257637828588486, 0.024247312918305397, 0.025458799675107002, 0.09930688142776489, 0.03474687412381172, 0.005829187575727701, -0.001706397975794971, -0.029005475342273712, -0.005565820261836052, -0.013835540972650051, 0.021806778386235237, -0.012053425423800945, -0.013677520677447319, -0.020454829558730125, -0.03253459185361862, 0.03253459185361862, -0.02781154401600361, 0.0002836681087501347, 0.012808410450816154, 0.018224989995360374, 0.0861736461520195, -0.028987916186451912, 0.014634421095252037, -0.02496718242764473, 0.025125201791524887, -0.01943647675216198, 0.002238618675619364, 0.0354316271841526, -0.06264620274305344, 0.030761253088712692, -0.016082938760519028, 0.023913715034723282, -0.08540110290050507, -0.033675845712423325, 0.004073407966643572, 0.007225031964480877, 0.028900127857923508, -0.022245723754167557, 0.05277872830629349, 0.020226577296853065, 0.04466702789068222, -0.010596128180623055, 0.017592908814549446, -0.049829017370939255, 0.014046235010027885, -0.06584172695875168, -0.05593913048505783, -0.034623969346284866, -0.021824337542057037, -0.03623928502202034, 0.010525897145271301, -0.028566529974341393, -0.006544667296111584, 0.03669578954577446, -0.0013365870108827949, -0.029233725741505623, 0.007058233022689819, -0.021367834880948067, -0.022368628531694412, 0.018383009359240532, -0.02960244007408619, 0.057378869503736496, -0.021806778386235237, 0.04996947944164276, 0.0035181427374482155, 0.021139582619071007, -0.0341850221157074, -0.023738136515021324, -0.050496213138103485, -0.02582751400768757, -0.009604113176465034, -0.015231385827064514, -0.04003176838159561, -0.029005475342273712, -0.0028268047608435154, 0.023913715034723282, 0.005820408463478088, 0.06587684154510498, -0.03534383699297905, 0.022456416860222816, -0.029321514070034027, 0.03249947354197502, -0.07901006937026978, 0.01811964251101017, 0.010841937735676765, -0.06527987867593765, -0.023808367550373077, -0.008278499357402325, -0.04024246335029602, -0.06032857671380043, -0.04600141942501068, -0.018224989995360374, -0.005113707389682531, 0.09038752317428589, -0.01748756133019924, 0.021262487396597862, -0.010086951777338982, -0.02142050862312317, -0.019945653155446053, 0.036801133304834366, 0.025142759084701538, -0.010359098203480244, 0.02672296203672886, 0.027302367612719536, 0.004657204728573561, -0.021771663799881935, -0.007058233022689819, 0.01789139211177826, -0.02184189483523369, 0.08097654581069946, 0.031691815704107285, -0.026828307658433914, 0.027056559920310974, 0.049829017370939255, -0.07613059133291245, -0.0507771372795105, 0.048599973320961, 0.009586554951965809, 0.021754106506705284, -0.013695078901946545, -0.01346682757139206, 0.005482420790940523, 0.015433300286531448, 0.02254420705139637, 0.06499894708395004, -0.01903264783322811, 0.017285646870732307, -0.014634421095252037, -0.007598135154694319, -0.01758413016796112, 0.027319926768541336, -0.060012537986040115, 0.009577776305377483, 0.018611261621117592, 0.025371011346578598, 0.04480748996138573, 0.04259520769119263, 0.0464228056371212, 0.04572049528360367, 0.03799506276845932, 0.030181847512722015, 0.024791603907942772, -0.022631995379924774, 0.0024778435472398996, 0.06499894708395004, -0.007071401458233595, 0.019401362165808678, -0.030901717022061348, 0.022912919521331787, 0.1081560030579567, 0.03176204860210419, -0.005126875825226307, 0.004079992417246103, -0.003283307421952486, -0.0950930118560791, 0.014687093906104565, 0.01060490682721138, 0.0029979932587593794, -0.03232389688491821, 0.024036619812250137, -0.05211152881383896, 0.03848668187856674, -0.025125201791524887, 0.00036542158341035247, 0.057975832372903824, -0.021929683163762093, -0.023369422182440758 ]
716,288
pytorch_optimizer.loss.dice
DiceLoss
Dice loss for image segmentation task. It supports binary, multiclass and multilabel cases. Reference : https://github.com/BloodAxe/pytorch-toolbelt :param mode: CLASS_MODE. loss mode 'binary', 'multiclass', or 'multilabel. :param classes: Optional[List[int]]. List of classes that contribute in loss computation. By default, all channels are included. :param log_loss: bool. If True, loss computed as `-log(dice_coeff)`, otherwise `1 - dice_coeff`. :param from_logits: bool. If True, assumes input is raw logits. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param ignore_index: Optional[int]. Label that indicates ignored pixels (does not contribute to loss). :param eps: float. epsilon.
class DiceLoss(_Loss): r"""Dice loss for image segmentation task. It supports binary, multiclass and multilabel cases. Reference : https://github.com/BloodAxe/pytorch-toolbelt :param mode: CLASS_MODE. loss mode 'binary', 'multiclass', or 'multilabel. :param classes: Optional[List[int]]. List of classes that contribute in loss computation. By default, all channels are included. :param log_loss: bool. If True, loss computed as `-log(dice_coeff)`, otherwise `1 - dice_coeff`. :param from_logits: bool. If True, assumes input is raw logits. :param label_smooth: float. Smoothness constant for dice coefficient (a). :param ignore_index: Optional[int]. Label that indicates ignored pixels (does not contribute to loss). :param eps: float. epsilon. """ def __init__( self, mode: CLASS_MODE = 'binary', classes: Optional[List[int]] = None, log_loss: bool = False, from_logits: bool = True, label_smooth: float = 0.0, ignore_index: Optional[int] = None, eps: float = 1e-6, ): super().__init__() if classes is not None: if mode == 'binary': raise ValueError('[-] Masking classes is not supported with mode=binary') classes = torch.LongTensor(classes) self.mode = mode self.classes = classes self.from_logits = from_logits self.label_smooth = label_smooth self.eps = eps self.log_loss = log_loss self.ignore_index = ignore_index def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: if self.from_logits: # Apply activations to get [0..1] class probabilities # Using Log-Exp as this gives more numerically stable result and does not cause vanishing gradient on # extreme values 0 and 1 y_pred = y_pred.log_softmax(dim=1).exp() if self.mode == 'multiclass' else logsigmoid(y_pred).exp() bs: int = y_true.size(0) num_classes: int = y_pred.size(1) dims: Tuple[int, ...] = (0, 2) if self.mode == 'binary': y_true = y_true.view(bs, 1, -1) y_pred = y_pred.view(bs, 1, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask y_true = y_true * mask if self.mode == 'multiclass': y_true = y_true.view(bs, -1) y_pred = y_pred.view(bs, num_classes, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask.unsqueeze(1) y_true = one_hot((y_true * mask).to(torch.long), num_classes) y_true = y_true.permute(0, 2, 1) * mask.unsqueeze(1) else: y_true = one_hot(y_true, num_classes) y_true = y_true.permute(0, 2, 1) if self.mode == 'multilabel': y_true = y_true.view(bs, num_classes, -1) y_pred = y_pred.view(bs, num_classes, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask y_true = y_true * mask scores = self.compute_score( y_pred, y_true.type_as(y_pred), label_smooth=self.label_smooth, eps=self.eps, dims=dims ) loss = -torch.log(scores.clamp_min(self.eps)) if self.log_loss else 1.0 - scores # Dice loss is undefined for non-empty classes # So we zero contribution of channel that does not have true pixels # NOTE: A better workaround would be to use loss term `mean(y_pred)` # for this case, however it will be a modified jaccard loss mask = y_true.sum(dims) > 0 loss *= mask.to(loss.dtype) if self.classes is not None: loss = loss[self.classes] return self.aggregate_loss(loss) @staticmethod def aggregate_loss(loss: torch.Tensor) -> torch.Tensor: return loss.mean() @staticmethod def compute_score( output: torch.Tensor, target: torch.Tensor, label_smooth: float = 0.0, eps: float = 1e-6, dims: Optional[Tuple[int, ...]] = None, ) -> torch.Tensor: return soft_dice_score(output, target, label_smooth, eps, dims)
(mode: Literal['binary', 'multiclass', 'multilabel'] = 'binary', classes: Optional[List[int]] = None, log_loss: bool = False, from_logits: bool = True, label_smooth: float = 0.0, ignore_index: Optional[int] = None, eps: float = 1e-06)
[ -0.058986861258745193, -0.0766109824180603, 0.005375157576054335, -0.00867218803614378, 0.04424014687538147, -0.028294511139392853, -0.039384521543979645, 0.03870513290166855, 0.05155355855822563, -0.008966921828687191, -0.011050045490264893, 0.03412925451993942, 0.078489288687706, 0.03299028053879738, -0.004513434134423733, 0.0031771378125995398, 0.0582675077021122, 0.029573358595371246, 0.006124482490122318, -0.011369757354259491, 0.03285040706396103, 0.002677587792277336, 0.037825923413038254, 0.05371161177754402, -0.051073990762233734, -0.029413502663373947, 0.01067038718611002, -0.023598741739988327, -0.026256347075104713, -0.0028499325271695852, -0.07337389886379242, -0.007368362043052912, 0.011189919896423817, 0.03205112740397453, -0.03630729392170906, -0.02903384529054165, 0.009271647781133652, 0.05391143262386322, -0.06985706835985184, 0.006833843886852264, -0.01138973981142044, -0.05319208279252052, -0.0013100698124617338, -0.01537614781409502, -0.057148516178131104, 0.0032645592000335455, -0.026476148515939713, 0.0001473672455176711, -0.037686049938201904, -0.05239280313253403, -0.007068632170557976, -0.03087218850851059, 0.012718542478978634, 0.028394419699907303, 0.0030847210437059402, 0.07129577547311783, 0.025836724787950516, 0.03448893129825592, -0.03277047723531723, -0.027435284107923508, -0.014996490441262722, -0.02669594995677471, 0.04400036111474037, 0.013347974978387356, 0.009951035492122173, -0.011409721337258816, -0.05974617600440979, 0.016165437176823616, 0.011289829388260841, -0.014766696840524673, -0.008167642168700695, -0.03846534714102745, 0.07365364581346512, 0.05243276432156563, -0.015695860609412193, -0.052712514996528625, -0.014836634509265423, -0.033529795706272125, 0.05383150652050972, -0.02144068479537964, 0.016754906624555588, -0.00716354651376605, 0.021840324625372887, -0.027555176988244057, 0.023878488689661026, -0.06973717361688614, 0.018003780394792557, 0.03330999240279198, 0.0011339784832671285, -0.01653510332107544, -0.04252169281244278, 0.044919535517692566, 0.014067327603697777, 0.016844825819134712, 0.0040838210843503475, 0.047277409583330154, -0.0286342054605484, 0.035567957907915115, 0.026376238092780113, -0.02717551775276661, -0.011729433201253414, 0.04280144348740578, 0.01254869531840086, 0.06689973175525665, -0.028254546225070953, -0.029593341052532196, -0.08496346324682236, 0.060545455664396286, -0.007663096766918898, -0.05079424008727074, -0.039584338665008545, -0.010630423203110695, -0.0028998875059187412, -0.04428010806441307, 0.02295931614935398, -0.09447488933801651, -0.018323492258787155, -0.004575877916067839, -0.06913771480321884, 0.04563888534903526, 0.010055940598249435, -0.011379748582839966, -0.05339189991354942, -0.004041359294205904, -0.0048681143671274185, -0.007283438462764025, 0.025636903941631317, 0.021580558270215988, 0.052952297031879425, -0.02277947962284088, -0.008507336489856243, -0.011379748582839966, -0.003679185640066862, 0.03822556510567665, 0.041362736374139786, -0.044999461621046066, 0.043480828404426575, 0.06829847395420074, -0.002309169853106141, 0.04082322493195534, 0.04803672432899475, 0.013557786121964455, 0.04076327756047249, 0.03910477086901665, 0.06905778497457504, -0.018463367596268654, 0.05151359364390373, 0.010170837864279747, 0.06809864938259125, 0.009246669709682465, 0.033529795706272125, -0.04108298942446709, 0.013098200783133507, 0.04232187569141388, 0.0000409006534027867, -0.006958730984479189, -0.021960217505693436, -0.056788839399814606, -0.0004086943226866424, -0.011219892650842667, -0.007313411682844162, -0.08048748970031738, -0.025796759873628616, -0.008377453312277794, -0.03660702332854271, -0.0056998650543391705, 0.0030772278551012278, 0.03614743798971176, 0.03678686171770096, 0.05566984787583351, 0.009061836637556553, -0.07425311207771301, 0.03682682290673256, 0.045598920434713364, -0.0581875815987587, 0.0760514885187149, 0.0061544557102024555, -0.007443294860422611, -0.04062340408563614, 0.033509813249111176, 0.04819658026099205, -0.02104104496538639, -0.04555895924568176, -0.024597840383648872, 0.0005616815178655088, 0.03466876968741417, 0.05231287330389023, 0.006494149565696716, -0.03289037197828293, 0.056589022278785706, -0.00849234964698553, -0.027635104954242706, -0.013417912647128105, 0.0039464449509978294, 0.04579874128103256, 0.009186724200844765, -0.02001197263598442, -0.009171737357974052, 0.05934653803706169, -0.041482631117105484, -0.039744194597005844, 0.054510895162820816, 0.05067434906959534, 0.004820657428354025, -0.03644716739654541, -0.022200001403689384, -0.006264356896281242, 0.09487453103065491, -0.03418920189142227, -0.10062934458255768, -0.0064242128282785416, 0.006569082383066416, -0.016904771327972412, 0.07073627412319183, 0.06933753937482834, -0.021620523184537888, 0.028434384614229202, 0.00765810115262866, -0.04443996399641037, 0.006379253230988979, 0.003509338479489088, -0.0012007933109998703, -0.07449289411306381, 0.05622934550046921, -0.00362173723988235, -0.007328398060053587, 0.032011162489652634, 0.010470567271113396, 0.10598452389240265, 0.010820252820849419, -0.0017209496581926942, -0.004870612174272537, 0.009901080280542374, 0.03103204444050789, 0.056988660246133804, 0.07409325242042542, -0.009656300768256187, 0.02491755224764347, 0.013477858155965805, 0.018143655732274055, -0.03580774366855621, -0.022699551656842232, -0.0014124775771051645, 0.003806570777669549, 0.06270351260900497, -0.02120090089738369, 0.026076508685946465, 0.04440000280737877, -0.03402934595942497, 0.03478866070508957, -0.007797975093126297, -0.022080108523368835, 0.005490054376423359, -0.012868407182395458, -0.02335895597934723, -0.05059442296624184, -0.02132079377770424, -0.029573358595371246, 0.015046445652842522, -0.02533717453479767, -0.04635823890566826, -0.028194600716233253, -0.05011485517024994, 0.0014424505643546581, -0.05207309126853943, -0.008742124773561954, 0.016305310651659966, 0.006649010349065065, -0.008487354032695293, 0.02297929860651493, 0.028134655207395554, 0.06394239515066147, -0.04991503432393074, 0.004438501317054033, -0.03093213401734829, 0.006913771852850914, 0.013018272817134857, 0.009726238436996937, 0.015056435950100422, 0.018793070688843727, 0.016864806413650513, -0.03149162977933884, -0.024657785892486572, -0.03490855172276497, 0.05562988668680191, 0.01067038718611002, 0.004480963107198477, -0.0055000451393425465, 0.03670693188905716, -0.017134563997387886, 0.06813861429691315, 0.009871107526123524, 0.0973522961139679, -0.006968722213059664, -0.01248874980956316, -0.010870207101106644, -0.058387402445077896, 0.018543295562267303, -0.03075229562819004, -0.04002394527196884, -0.0029073809273540974, -0.013897480443120003, 0.04839640110731125, -0.04775697737932205, -0.027435284107923508, -0.03806570917367935, 0.013018272817134857, 0.00854230485856533, 0.06486156582832336, -0.0030322682578116655, 0.05582970380783081, -0.01009590458124876, 0.05419117957353592, 0.02475769631564617, -0.015246265567839146, -0.020801261067390442, 0.04260162264108658, -0.004763208795338869, 0.03291035071015358, 0.07429306954145432, -0.021640505641698837, 0.04483960568904877, -0.018303511664271355, 0.08320504426956177, 0.025556975975632668, -0.04188226908445358, 0.06582070142030716, 0.006888794247061014, -0.021960217505693436, -0.02319910004734993, -0.011399730108678341, -0.025716831907629967, 0.01847335882484913, -0.003059743670746684, -0.03536813706159592, -0.00959135964512825, 0.02313915453851223, 0.017714042216539383, 0.011199910193681717, -0.04851629212498665, 0.0057698022574186325, 0.009471467696130276, -0.041682448238134384, 0.05239280313253403, 0.08192619681358337, -0.023718632757663727, -0.007817957550287247, 0.03660702332854271, 0.03309018909931183, 0.05227290838956833, 0.021800361573696136, -0.02001197263598442, 0.04999496042728424, 0.037526194006204605, 0.051273807883262634, -0.021980198100209236, 0.0023603737354278564, -0.007628127932548523, 0.02689577080309391, -0.07053645700216293, -0.039504412561655045, -0.060785241425037384, -0.027814943343400955, 0.04571881517767906, 0.009346580132842064, 0.041682448238134384, -0.010270747356116772, -0.033369939774274826, -0.011010081507265568, 0.0023915953934192657, -0.033729612827301025, -0.02291935309767723, -0.07261458784341812, -0.015166337601840496, 0.005624932702630758, -0.026496130973100662, -0.0387650765478611, 0.01807371899485588, 0.04044356569647789, 0.018623223528265953, 0.022679569199681282, -0.004066336899995804, -0.06773898005485535, 0.04380054026842117, 0.026276329532265663, -0.014167237095534801, 0.015675878152251244, -0.022080108523368835, 0.0022379839792847633, -0.05191323533654213, 0.03512835502624512, -0.011319802142679691, 0.03213105350732803, -0.04827651008963585, -0.058387402445077896, -0.01805373653769493, -0.0144270034506917, 0.09271647781133652, -0.03490855172276497, -0.05147362872958183, -0.01659505069255829, -0.01718451827764511, 0.06146463006734848, 0.007523222826421261, -0.04272151365876198, 0.06382250785827637, 0.033729612827301025, 0.023958416655659676, -0.03980414196848869, 0.03522826358675957, -0.04651809483766556, 0.0576680488884449, -0.02513735555112362, 0.016974708065390587, -0.006359271239489317, 0.0015348673332482576, 0.0032295905984938145, 0.0006850078934803605, -0.0047157518565654755, 0.018892979249358177, 0.023698650300502777, 0.012538704089820385, 0.07493249326944351, -0.014387039467692375, -0.0288140419870615, 0.011969217099249363, -0.04779694229364395, 0.018813051283359528, -0.011219892650842667, 0.011329793371260166, -0.09119784086942673, -0.05163348466157913, -0.06218397989869118, -0.05167344957590103, 0.01849333941936493, -0.06945742666721344, -0.01259865052998066, -0.01152961328625679, -0.03412925451993942, 0.02106102742254734, -0.015995590016245842, -0.03466876968741417, 0.06654005497694016, 0.06410225480794907, 0.02126084640622139, -0.04380054026842117, -0.03301026299595833, 0.0007974066538736224, -0.05063438415527344, -0.0055999550968408585, 0.005914671812206507, 0.007338389288634062, 0.03684680536389351, 0.04200216010212898, 0.0028849011287093163, -0.011889289133250713, -0.08416417986154556, -0.01019581500440836, 0.012898379936814308, -0.0010696613462641835, -0.028394419699907303, 0.03065238706767559, -0.05339189991354942, 0.049075789749622345, -0.011219892650842667, -0.04611845314502716, 0.023958416655659676, -0.058946896344423294, -0.03988407179713249, 0.011289829388260841, 0.015516022220253944, -0.06765905022621155, 0.07309415191411972, -0.010330693796277046, -0.05043456703424454, 0.03456885740160942, 0.04004392772912979, 0.011379748582839966, -0.0013875000877305865, -0.0008011532481759787, 0.045598920434713364, -0.014996490441262722, 0.0065391091629862785, -0.06937750428915024, -0.028194600716233253, 0.009921062737703323, -0.011729433201253414, 0.027475249022245407, 0.03061242215335369, 0.011249865405261517, -0.03426912799477577, -0.0019544893875718117, 0.004288636613637209, -0.02893393486738205, -0.06434203684329987, -0.0390048623085022, -0.007388344034552574, 0.004833145998418331, -0.009791179560124874, -0.041482631117105484, 0.007907875813543797, 0.006314311642199755, -0.026056526228785515, -0.023898471146821976, 0.053232043981552124, -0.003966426942497492, 0.008647209964692593, 0.03628731146454811, -0.011209901422262192, -0.0071235825307667255, -0.033609721809625626, 0.00522529287263751, 0.004216201603412628, -0.01803375408053398, 0.026336275041103363, -0.021760396659374237, 0.009071827866137028, 0.057028625160455704, 0.041722413152456284, -0.029773179441690445, 0.02291935309767723, 0.04072331264615059, 0.007528217975050211, 0.05934653803706169, -0.027555176988244057, 0.05638920143246651, 0.045319173485040665, -0.005480063147842884, 0.052552659064531326, 0.026576058939099312, -0.003943947143852711, -0.0053851488046348095, -0.01171944197267294, 0.04591863229870796, -0.02307920902967453, -0.003386948723345995, -0.05015481635928154, -0.04412025213241577, 0.0013625225983560085, -0.004660801496356726, 0.022200001403689384, -0.002521478570997715, 0.0143770482391119, -0.014746715314686298, -0.004171242471784353, 0.05387146770954132, -0.014057336375117302, 0.0769306942820549, -0.025676868855953217, -0.013887489214539528, -0.05163348466157913, -0.0005626181373372674, -0.00574982026591897, -0.029653286561369896, 0.0967128723859787, 0.06414221972227097, -0.015715843066573143, 0.03692673519253731, -0.012618632055819035, 0.051073990762233734, -0.06697966158390045, -0.08576273918151855, 0.03478866070508957, -0.0775301530957222, -0.02305922657251358, 0.003459383500739932, 0.007298425305634737, 0.010550495237112045, -0.051273807883262634, -0.015755806118249893, -0.05650909245014191, 0.02343888394534588, -0.04412025213241577, 0.03129180893301964, -0.03402934595942497, 0.04014383628964424, 0.023618722334504128, -0.05375157669186592, 0.03414923697710037, 0.0029923042748123407, 0.004685778636485338, -0.02707560919225216, 0.04651809483766556, -0.013367957435548306, -0.012878398410975933, 0.024677768349647522, -0.002143069403246045, 0.007383348420262337, 0.002580175641924143, 0.02491755224764347, 0.04088316857814789, 0.029992980882525444, 0.030452566221356392, -0.003416921943426132, 0.015066427178680897, -0.019212692975997925, -0.0291337538510561, 0.013427902944386005, 0.09055841714143753, 0.03317011892795563, 0.021680468693375587, 0.018323492258787155, -0.00815765094012022, -0.02529721148312092, 0.02659604139626026, -0.031711433082818985, -0.0003737258375622332, 0.015915662050247192, 0.0029948020819574594, -0.04436003789305687, -0.07065635174512863, 0.04034365713596344, 0.024098290130496025, -0.024078309535980225, -0.02503744512796402, -0.04068335145711899, 0.0058697122149169445, 0.023518813773989677, 0.012338884174823761, -0.0036492126528173685, -0.019652295857667923, 0.01817362755537033, -0.016904771327972412, 0.016674978658556938, -0.0028449371457099915, -0.04799676313996315, -0.003244577208533883, -0.03319010138511658, 0.007548199966549873, -0.011249865405261517, -0.0021530603989958763, 0.03396939858794212, 0.015615932643413544, -0.0027375337667763233, -0.010330693796277046, -0.004508438520133495, 0.02521728351712227, 0.010630423203110695, 0.0012913367245346308, -0.027994779869914055, 0.0023703647311776876, -0.029553376138210297, -0.015795771032571793, 0.03638722002506256, -0.02150063030421734, -0.046957697719335556, -0.012898379936814308, 0.002577677834779024, 0.04663798585534096, -0.020701350644230843, -0.0006600304041057825, 0.007728038355708122, -0.02325904741883278, -0.003222097409889102, -0.017883889377117157, 0.05990603193640709, 0.03077227808535099, 0.03245076537132263, 0.012298920191824436, -0.03253069519996643, -0.022659586742520332, 0.004813164006918669, 0.041722413152456284, 0.03650711104273796, -0.0142671475186944, 0.02699568122625351, 0.041362736374139786, -0.05558992177248001, 0.004563388880342245, -0.007932853884994984, -0.03914473578333855, 0.006114491727203131, -0.06410225480794907, -0.056429166346788406, 0.024038344621658325, -0.043161116540431976, 0.021800361573696136, 0.01849333941936493, 0.013148155063390732, -0.05147362872958183, 0.04483960568904877, 0.019772188737988472, -0.037126556038856506, -0.02009190060198307, 0.03970423340797424, 0.024437984451651573, -0.00025477047893218696, -0.03221098333597183, -0.04054347425699234, -0.08280540257692337, -0.04372061416506767, 0.029693251475691795, 0.023918453603982925, 0.010880198329687119, 0.024477949365973473, -0.05223294720053673, -0.060625385493040085, -0.012988299131393433, -0.04240180179476738, -0.03802574425935745, -0.03988407179713249, -0.04400036111474037, -0.060585420578718185, 0.006574077531695366, -0.029433485120534897, 0.05247272923588753, -0.06026570871472359, -0.0008748368709348142, 0.04368064925074577, -0.007987803779542446, 0.008372457697987556, 0.07173537462949753, 0.044919535517692566, -0.003991404082626104, -0.03842538595199585, -0.016345275565981865, 0.011859316378831863, -0.020601440221071243, -0.06506139039993286, 0.02090117149055004, 0.010840234346687794, 0.013118182308971882, 0.010360666550695896, 0.023658687248826027, -0.060625385493040085, -0.04228191077709198, 0.031991180032491684, -0.07093609869480133, 0.02675589732825756, 0.009691269136965275, 0.04839640110731125, -0.01240882184356451, -0.021940235048532486, -0.0055000451393425465, -0.009221692569553852, -0.024078309535980225, 0.06022574380040169, -0.05634923651814461, 0.03135175630450249, -0.018932944163680077, -0.028054727241396904, -0.04436003789305687, 0.03137173876166344, 0.026156436651945114, -0.019582359120249748, 0.008272547274827957, 0.026556076481938362, 0.05231287330389023, 0.03436903655529022, -0.035707831382751465, 0.04567885026335716, 0.01952241361141205, -0.024657785892486572, -0.009336588904261589, 0.0949544608592987, -0.03674689680337906, 0.027754995971918106, -0.07277444005012512, -0.035328175872564316, -0.07896886020898819, 0.011959226801991463, -0.0287540964782238, 0.01710459031164646, 0.0048681143671274185, 0.024058327078819275, 0.03426912799477577, 0.033629704266786575, 0.025856707245111465 ]
716,294
pytorch_optimizer.loss.dice
__init__
null
def __init__( self, mode: CLASS_MODE = 'binary', classes: Optional[List[int]] = None, log_loss: bool = False, from_logits: bool = True, label_smooth: float = 0.0, ignore_index: Optional[int] = None, eps: float = 1e-6, ): super().__init__() if classes is not None: if mode == 'binary': raise ValueError('[-] Masking classes is not supported with mode=binary') classes = torch.LongTensor(classes) self.mode = mode self.classes = classes self.from_logits = from_logits self.label_smooth = label_smooth self.eps = eps self.log_loss = log_loss self.ignore_index = ignore_index
(self, mode: Literal['binary', 'multiclass', 'multilabel'] = 'binary', classes: Optional[List[int]] = None, log_loss: bool = False, from_logits: bool = True, label_smooth: float = 0.0, ignore_index: Optional[int] = None, eps: float = 1e-06)
[ -0.008326061069965363, -0.04253401607275009, 0.011101414449512959, -0.02701038494706154, -0.010321563109755516, -0.020331185311079025, -0.0459103137254715, 0.0023739596363157034, 0.03128580376505852, -0.001805126783438027, -0.023909328505396843, 0.0350290909409523, 0.041433047503232956, 0.024331364780664444, 0.008670113049447536, 0.013450143858790398, 0.0168631412088871, -0.0060553173534572124, -0.0013142790412530303, 0.030423380434513092, 0.031505998224020004, 0.0233404953032732, 0.011835392564535141, 0.11655568331480026, 0.01592731848359108, 0.002607915084809065, -0.02603786438703537, -0.009142611175775528, -0.033652883023023605, -0.01853294111788273, -0.030937165021896362, 0.01536766067147255, -0.00945913977921009, 0.053066596388816833, -0.038350339978933334, -0.06297529488801956, 0.004344231449067593, 0.08022377640008926, -0.051451846957206726, -0.0036400712560862303, -0.023542338982224464, -0.06723237037658691, -0.06356248259544373, 0.007179220672696829, -0.02794620580971241, -0.012046411633491516, 0.03827694430947304, -0.017642991617321968, -0.007238856516778469, -0.021909238770604134, -0.062204621732234955, 0.01120233628898859, -0.004770855884999037, 0.020844969898462296, -0.06436985731124878, 0.06983798742294312, -0.002230604412034154, 0.029872898012399673, -0.03367123380303383, 0.015468582510948181, -0.09270139783620834, -0.007422350812703371, 0.044185467064380646, 0.009229770861566067, 0.011055541224777699, -0.02291845716536045, -0.11508772522211075, 0.011596850119531155, 0.02455155923962593, 0.019505461677908897, 0.0071241725236177444, -0.04374507814645767, 0.04847923666238785, 0.07537952065467834, -0.015202515758574009, -0.036497049033641815, -0.04671768844127655, 0.02534058503806591, -0.006027793046087027, -0.008220551535487175, -0.0017615468241274357, 0.043194595724344254, 0.01388135552406311, -0.01043166033923626, -0.009179309941828251, -0.052002329379320145, 0.0037065879441797733, 0.0036010786425322294, 0.04513963684439659, -0.04829574003815651, -0.08176513016223907, 0.038130149245262146, -0.04033208265900612, -0.0009444230236113071, -0.035652972757816315, 0.06319548934698105, 0.022000985220074654, 0.004697458352893591, -0.01657872460782528, -0.024881849065423012, -0.02697368524968624, -0.006142477039247751, -0.01853294111788273, 0.036497049033641815, -0.010633504018187523, -0.015541980974376202, -0.054754745215177536, 0.0026629632338881493, -0.027450770139694214, -0.02403777465224266, 0.020569728687405586, 0.0666084885597229, -0.014752954244613647, 0.012101459316909313, -0.008688462898135185, -0.010670202784240246, 0.021945936605334282, -0.020551379770040512, -0.05765395984053612, 0.017175082117319107, 0.03996509313583374, 0.013165727257728577, -0.05728697031736374, 0.011917965486645699, 0.0157896988093853, 0.017624642699956894, 0.04135965183377266, -0.004562131129205227, 0.04293770343065262, -0.05071786791086197, 0.015964018180966377, -0.009160961024463177, -0.0016537437913939357, 0.02137710526585579, 0.016872314736247063, -0.027175528928637505, -0.012165682390332222, 0.037616364657878876, -0.05350698530673981, 0.0699847862124443, 0.02455155923962593, 0.013523541390895844, 0.07750806212425232, 0.020514680072665215, 0.0047020455822348595, -0.0022501007188111544, 0.025358933955430984, -0.04513963684439659, 0.05567221716046333, 0.010000447742640972, 0.030937165021896362, -0.015578679740428925, -0.017964107915759087, 0.07838883250951767, -0.030111441388726234, -0.0065553393214941025, 0.04381847754120827, -0.06007608398795128, 0.06679198145866394, 0.01956050843000412, 0.015569504350423813, -0.0020379354245960712, 0.016184210777282715, -0.025267187505960464, -0.05479144677519798, -0.019872449338436127, -0.01956050843000412, -0.0320381335914135, 0.012826262973248959, 0.01919352076947689, 0.03603831306099892, -0.0813247412443161, 0.06172753497958183, 0.024936897680163383, -0.04811224713921547, 0.07159953564405441, -0.0033235433511435986, 0.015872269868850708, 0.0012901953887194395, 0.02827649563550949, 0.038350339978933334, 0.02022108994424343, -0.01770721562206745, -0.023652436211705208, 0.019633907824754715, 0.06051647290587425, -0.0008383403182961047, -0.016037415713071823, -0.018707260489463806, 0.012312478385865688, 0.020147692412137985, -0.0250653438270092, -0.009404091164469719, -0.01891827955842018, 0.0056103430688381195, -0.0007546209380961955, 0.00038017757469788194, -0.02403777465224266, -0.007592083420604467, 0.04825904220342636, 0.004023116081953049, 0.07035177201032639, 0.024514859542250633, -0.00020614455570466816, -0.024441462010145187, 0.026166310533881187, 0.0389375239610672, 0.08440744876861572, 0.017587943002581596, -0.03904762119054794, 0.017175082117319107, -0.04686448350548744, -0.001270699081942439, 0.09402255713939667, 0.04029538482427597, 0.002074634190648794, -0.059965990483760834, 0.04811224713921547, 0.012587719596922398, 0.03178124129772186, 0.03499239310622215, -0.010284864343702793, -0.10627999156713486, 0.059819191694259644, -0.003913019318133593, 0.05332348868250847, 0.012028061784803867, -0.03871732950210571, 0.0562594011425972, -0.0008371934527531266, -0.03473550081253052, -0.0027386548463255167, -0.04257071390748024, 0.01801915653049946, 0.014028151519596577, 0.06939760595560074, 0.033377643674612045, 0.021303705871105194, -0.07057196646928787, -0.03022153675556183, 0.0057479641400277615, -0.030863767489790916, -0.014661206863820553, -0.012606069445610046, 0.07027837634086609, -0.013119854032993317, -0.019083423539996147, 0.02719387784600258, 0.0041102757677435875, 0.026331454515457153, -0.03996509313583374, 0.014165772125124931, -0.003704294329509139, 0.002752416767179966, 0.023358844220638275, -0.031652793288230896, -0.058387935161590576, -0.04033208265900612, -0.012495972216129303, -0.013844656758010387, -0.04359828308224678, -0.05178213492035866, -0.013468493707478046, 0.004163030534982681, 0.01178034394979477, -0.009816953912377357, -0.038827426731586456, 0.027964554727077484, 0.0018968739314004779, -0.00828936230391264, 0.06792964786291122, 0.015964018180966377, -0.00011325048399157822, 0.029359113425016403, -0.016881490126252174, -0.036075010895729065, -0.03934121131896973, -0.014826351776719093, -0.027652615681290627, 0.014028151519596577, 0.0459103137254715, 0.006092016119509935, -0.016055764630436897, -0.03301065415143967, 0.007390239275991917, 0.008812321349978447, 0.03412996977567673, 0.008326061069965363, 0.011725296266376972, -0.06213122233748436, 0.017991632223129272, 0.08374687284231186, 0.08235231041908264, 0.01672551967203617, 0.02152390033006668, -0.0333409421145916, 0.015468582510948181, 0.01076195016503334, -0.03956140577793121, -0.05185553431510925, -0.004991049412637949, -0.09505012631416321, 0.024900197982788086, -0.04381847754120827, 0.0006428040214814246, -0.04106605798006058, -0.0022260171826928854, 0.029322413727641106, 0.10261010378599167, 0.055598821491003036, 0.0528097040951252, 0.03115735948085785, 0.021780792623758316, -0.01315655279904604, -0.022845059633255005, 0.030955515801906586, 0.052516113966703415, -0.022716613486409187, 0.0293958131223917, 0.04613050818443298, -0.015330961905419827, 0.04191013425588608, -0.03361618518829346, 0.026019513607025146, -0.0699847862124443, -0.03941461071372032, 0.05332348868250847, -0.013973102904856205, -0.038827426731586456, -0.023212049156427383, -0.018101727589964867, 0.026716792955994606, 0.020331185311079025, -0.011413355357944965, -0.1090691089630127, -0.00035896102781407535, 0.04932330921292305, 0.02734067477285862, 0.009422440081834793, -0.03622180595993996, 0.05332348868250847, 0.0028556324541568756, -0.07027837634086609, 0.06125045195221901, 0.031083961948752403, -0.013523541390895844, -0.02458825707435608, 0.005738789215683937, 0.04157984256744385, 0.04598371312022209, 0.018037505447864532, -0.06191103160381317, 0.0276709645986557, -0.004644703585654497, 0.07978338748216629, -0.03563462197780609, -0.01769804023206234, -0.020202739164233208, 0.011477578431367874, -0.05574561655521393, -0.029175618663430214, -0.04381847754120827, -0.008385696448385715, 0.006275510415434837, -0.0008194174151867628, 0.03330424427986145, 0.0053259264677762985, 0.0042570712976157665, 0.004378636367619038, -0.006165413651615381, -0.019597208127379417, -0.05090136453509331, -0.06980129331350327, -0.01593649387359619, 0.013624463230371475, 0.0012397344689816236, -0.059268709272146225, -0.004103394690901041, -0.021230308338999748, 0.03012979030609131, 0.01867973618209362, -0.0000012633163350983523, -0.0011669100495055318, 0.00009095877612708136, 0.017165906727313995, 0.010963793843984604, 0.03490064665675163, 0.022276226431131363, 0.05691998079419136, -0.018991677090525627, 0.020367885008454323, -0.010917920619249344, 0.02067982591688633, -0.04642409831285477, -0.05662639066576958, 0.012193206697702408, -0.006564514245837927, 0.06572771817445755, 0.01052340678870678, -0.046644292771816254, -0.024881849065423012, -0.020973416045308113, 0.019321966916322708, 0.05236931890249252, 0.003394647501409054, 0.05005728825926781, 0.014734605327248573, -0.03684568777680397, 0.01047753356397152, -0.028606785461306572, 0.030294934287667274, 0.06227801740169525, 0.010615154169499874, 0.03904762119054794, -0.02794620580971241, 0.020037595182657242, 0.03297395259141922, -0.051305051892995834, -0.01745949685573578, -0.012092284858226776, 0.006270923186093569, 0.0255240797996521, 0.0778016522526741, -0.04532312974333763, 0.02710213139653206, 0.037983354181051254, 0.009440789930522442, 0.008316886611282825, 0.0072939046658575535, 0.0037386994808912277, -0.13813462853431702, -0.005743376445025206, -0.062167923897504807, -0.027964554727077484, 0.0068626925349235535, -0.033047351986169815, -0.028606785461306572, -0.02845999039709568, -0.052332621067762375, -0.0021285356488078833, 0.0022718908730894327, -0.06198442727327347, 0.05497493967413902, 0.03181793913245201, -0.017863186076283455, -0.03611170873045921, -0.03890082612633705, 0.046644292771816254, -0.06591121107339859, -0.020936718210577965, 0.006610387936234474, 0.030056392773985863, 0.01625760830938816, 0.015551155433058739, 0.008188440464437008, -0.03857053443789482, -0.11090405285358429, -0.009514187462627888, 0.005514008458703756, -0.024147870019078255, -0.012220731005072594, -0.007968246936798096, -0.07024168223142624, -0.022056033834815025, -0.0009277938515879214, -0.006770945619791746, 0.07328768819570541, -0.02957930602133274, -0.03319414705038071, -0.026111261919140816, 0.006628737319260836, -0.056846581399440765, 0.048882924020290375, -0.0380200520157814, -0.01719343103468418, 0.04642409831285477, 0.02845999039709568, 0.007954484783113003, 0.000748886785004288, -0.015055720694363117, 0.02752416953444481, -0.037139277905225754, 0.023652436211705208, -0.02897377498447895, -0.0105968052521348, 0.009890351444482803, 0.007674655877053738, 0.01769804023206234, 0.014156597666442394, 0.01383548229932785, -0.009945400059223175, 0.020386233925819397, -0.032111529260873795, 0.025175439193844795, 0.04290100559592247, 0.009468314237892628, 0.001256937044672668, 0.041616544127464294, 0.0116702476516366, -0.0276709645986557, -0.0056103430688381195, 0.0063718450255692005, -0.0675259605050087, -0.016193386167287827, 0.041249554604291916, 0.0001214934018207714, -0.053727176040410995, -0.004500201437622309, -0.015165816992521286, -0.003440521191805601, -0.015404359437525272, 0.006243398878723383, -0.014129073359072208, 0.03945130854845047, 0.01807420328259468, -0.007715941872447729, -0.04616720601916313, 0.021597297862172127, 0.007949897088110447, -0.007014075759798288, 0.00831229891628027, 0.04829574003815651, 0.050460975617170334, -0.02537728287279606, -0.04444235935807228, 0.05247941613197327, 0.05057107284665108, -0.013578590005636215, 0.08103115111589432, 0.04121285676956177, -0.0045896549709141254, -0.01485387608408928, 0.0020494037307798862, 0.08954529464244843, 0.020844969898462296, -0.003541443031281233, 0.010312388651072979, 0.0009977511363103986, 0.024294666945934296, 0.012606069445610046, 0.005578231532126665, 0.009706856682896614, 0.02412952110171318, 0.010376611724495888, 0.016661297529935837, 0.07574651390314102, -0.019597208127379417, 0.09945399314165115, 0.005376387853175402, -0.027267277240753174, -0.017175082117319107, -0.02198263630270958, -0.02603786438703537, -0.014863051474094391, 0.06723237037658691, 0.021413803100585938, -0.0024771750904619694, 0.007500336039811373, -0.023505639284849167, 0.017771437764167786, -0.051121555268764496, -0.03290055692195892, 0.0432312935590744, -0.02468000538647175, -0.06796634942293167, -0.03214823082089424, -0.019321966916322708, 0.006523227784782648, -0.010624329559504986, -0.005582818761467934, -0.010890396311879158, 0.0194687619805336, -0.04917651414871216, 0.019083423539996147, -0.035799767822027206, 0.025083692744374275, 0.017679691314697266, 0.01677139289677143, -0.0021595004945993423, 0.0009748142911121249, -0.028423290699720383, -0.00917472317814827, 0.013624463230371475, -0.038350339978933334, 0.022514769807457924, 0.010220641270279884, -0.024955246597528458, -0.025028644129633904, 0.03926781564950943, 0.005243354011327028, 0.06429646164178848, 0.04029538482427597, 0.062021125108003616, 0.0007368449587374926, -0.030203187838196754, -0.010312388651072979, -0.037231024354696274, -0.029927946627140045, 0.06451664865016937, 0.041102759540081024, -0.03223997727036476, 0.03484559804201126, -0.03618510812520981, -0.0038327404763549566, -0.013661161996424198, -0.057507164776325226, -0.039010923355817795, 0.06969119608402252, -0.003624015487730503, -0.02007429301738739, -0.010183942504227161, 0.040221985429525375, 0.013991452753543854, -0.013294173404574394, 0.0012122102780267596, -0.017918234691023827, -0.004284595604985952, 0.003633190179243684, 0.03706588223576546, -0.01970730535686016, -0.03842373937368393, -0.014514411799609661, -0.015184166841208935, 0.020202739164233208, -0.035799767822027206, -0.019854100421071053, -0.052149124443531036, -0.06649839133024216, -0.021175259724259377, 0.030716972425580025, 0.02398272603750229, 0.0048671904951334, -0.014496061950922012, -0.021322056651115417, -0.011220686137676239, -0.01099131815135479, -0.0157896988093853, 0.022716613486409187, 0.02790950797498226, 0.026790190488100052, -0.04891962185502052, -0.050277482718229294, 0.0050185732543468475, -0.024184569716453552, -0.01501902099698782, -0.08624239265918732, 0.013193251565098763, -0.0032707888167351484, 0.025505729019641876, 0.0028648071456700563, -0.012073935009539127, 0.007720529567450285, -0.03517588600516319, 0.01658789813518524, 0.010615154169499874, 0.04858933389186859, -0.014890574850142002, 0.03959810361266136, 0.07545292377471924, -0.04502953961491585, -0.07457214593887329, 0.006706722546368837, 0.07115915417671204, 0.018844880163669586, -0.03693743422627449, 0.0021331231109797955, 0.005270878318697214, -0.067599356174469, 0.0020815152674913406, 0.016294308006763458, -0.05035087838768959, -0.004729569889605045, -0.07743465900421143, -0.006344320718199015, -0.016083288937807083, 0.02225787751376629, -0.0018005393212661147, -0.031010562554001808, 0.022533118724822998, -0.026386503130197525, 0.029285715892910957, 0.013734560459852219, -0.017670515924692154, -0.04400197044014931, 0.04297440126538277, 0.03354278579354286, -0.05482814460992813, 0.027322323992848396, 0.005582818761467934, -0.024239618331193924, -0.029469210654497147, 0.037139277905225754, 0.04425886273384094, 0.031230757012963295, 0.030918816104531288, -0.012716165743768215, -0.07185643166303635, -0.062021125108003616, 0.017670515924692154, -0.004190554842352867, -0.01276203989982605, -0.009119674563407898, -0.07244361191987991, -0.007532447576522827, -0.04308449849486351, 0.012606069445610046, -0.051121555268764496, 0.016294308006763458, -0.020459631457924843, 0.023835930973291397, 0.036075010895729065, 0.08147154003381729, 0.03805674985051155, -0.03218492865562439, -0.027744362130761147, 0.053360190242528915, 0.024569908156991005, -0.03394647315144539, -0.0623147189617157, 0.012376701459288597, 0.00538097508251667, -0.011486752890050411, 0.011862916871905327, 0.057543862611055374, 0.0044359783641994, -0.051121555268764496, -0.03018483892083168, -0.01532178744673729, 0.03614840656518936, -0.0354878269135952, 0.07838883250951767, 0.02295515686273575, -0.08800394088029861, -0.02049633115530014, -0.013340047560632229, -0.016092464327812195, 0.06506713479757309, -0.00978025421500206, 0.003222621511667967, 0.03842373937368393, -0.014477713033556938, -0.027799410745501518, 0.006275510415434837, 0.06058986857533455, -0.04396527260541916, 0.014670382253825665, 0.017597118392586708, 0.03438686206936836, 0.002690487541258335, 0.0022936807945370674, 0.004158443305641413, -0.010422484949231148, 0.050424277782440186, -0.009991273283958435, 0.07071876525878906, -0.05236931890249252, 0.01792740821838379, -0.045433226972818375, -0.032111529260873795, -0.08521482348442078, -0.018652211874723434, -0.03055182658135891, 0.0028395766858011484, 0.018505416810512543, -0.0009266469860449433, 0.04880952462553978, 0.05611260607838631, -0.006252573803067207 ]
716,313
pytorch_optimizer.loss.dice
aggregate_loss
null
@staticmethod def aggregate_loss(loss: torch.Tensor) -> torch.Tensor: return loss.mean()
(loss: torch.Tensor) -> torch.Tensor
[ -0.09443610906600952, -0.05296897143125534, 0.015554380603134632, 0.07486281543970108, 0.061074066907167435, -0.012342611327767372, 0.0023436667397618294, -0.021507084369659424, 0.07042350620031357, 0.024113493040204048, -0.012863893061876297, -0.023255901411175728, 0.031899090856313705, -0.022482385858893394, -0.024365726858377457, 0.039180222898721695, 0.005704674404114485, 0.04133261367678642, 0.02249920181930065, -0.000018063576135318726, 0.00328113348223269, -0.039785582572221756, -0.034101929515600204, -0.032756686210632324, -0.052027300000190735, 0.01957329548895359, 0.016849176958203316, -0.04170255735516548, -0.011930630542337894, -0.025307398289442062, -0.02655174769461155, -0.05744190886616707, 0.043821316212415695, 0.01204833947122097, -0.0001431948912795633, -0.003747764974832535, -0.013149757869541645, 0.029074080288410187, -0.09766469150781631, -0.013948495499789715, -0.06235204637050629, -0.014192321337759495, 0.0275943111628294, 0.02391170710325241, 0.05236361175775528, 0.014789273031055927, 0.010745134204626083, 0.017774032428860664, -0.01767314039170742, -0.019220169633626938, -0.040895409882068634, 0.021607978269457817, 0.01950603350996971, 0.04348500445485115, -0.012914340011775494, 0.0967230275273323, 0.05088384449481964, 0.0011991587234660983, -0.01895112171769142, 0.023205453529953957, 0.018799781799316406, -0.01657172106206417, 0.013813971541821957, -0.03052021749317646, 0.041568029671907425, -0.01994323916733265, -0.08239617943763733, 0.02777928300201893, 0.009467152878642082, 0.008727268315851688, -0.016529683023691177, -0.015302147716283798, 0.021624792367219925, 0.0010825007921084762, -0.010728319175541401, -0.021624792367219925, 0.017521800473332405, -0.028973186388611794, 0.06995267421007156, 0.002726220525801182, 0.03218495473265648, -0.0442921482026577, 0.008710453286767006, 0.09349443763494492, 0.04520018771290779, -0.10116232931613922, -0.01755543053150177, 0.002058853395283222, -0.04136624559760094, -0.03297528624534607, -0.015512341633439064, 0.037767719477415085, -0.012973194010555744, 0.024079862982034683, -0.05639934167265892, 0.012325795367360115, -0.07903306931257248, -0.02789699099957943, 0.006213344633579254, -0.052262719720602036, -0.01689121685922146, 0.09214919805526733, 0.04092904180288315, 0.03622068837285042, 0.029578546062111855, -0.017286382615566254, 0.04472935572266579, -0.03188227489590645, 0.011030999012291431, 0.06880921870470047, 0.005183392204344273, -0.007609034888446331, -0.023827629163861275, -0.010375192388892174, -0.03149551898241043, -0.05491957440972328, -0.004460323601961136, 0.033362045884132385, -0.08838251233100891, 0.04950496926903725, 0.03830581530928612, 0.05461689457297325, 0.007247500587254763, 0.0028018904849886894, 0.030368877574801445, 0.0382721833884716, 0.03527901694178581, -0.03045295551419258, 0.0035270608495920897, -0.00402101781219244, -0.026215437799692154, 0.015915915369987488, -0.002070414135232568, 0.0020977393724024296, 0.03823855146765709, -0.04385494440793991, 0.07795687764883041, 0.0018318436341360211, 0.04331684857606888, -0.0063058300875127316, 0.016411973163485527, 0.029208604246377945, 0.045233819633722305, -0.01526010874658823, 0.05071568861603737, -0.0001431948912795633, 0.01042563933879137, 0.03344612196087837, 0.020161841064691544, -0.05552493408322334, 0.01339358277618885, 0.016899624839425087, 0.014452962204813957, 0.012645291164517403, 0.03337886184453964, 0.02819967083632946, 0.0017225425690412521, -0.020447704941034317, -0.01400735042989254, -0.04644453898072243, -0.02592957206070423, 0.007873879745602608, -0.012796631082892418, -0.03487544506788254, -0.03295847028493881, -0.020212287083268166, 0.048596929758787155, 0.02776246704161167, -0.0577445887029171, 0.0011318965116515756, -0.015285331755876541, -0.060838647186756134, -0.006368888076394796, 0.03796950355172157, 0.01152705680578947, 0.07667889446020126, -0.050614796578884125, 0.05115289241075516, -0.036792416125535965, 0.021439822390675545, 0.015108768828213215, -0.014217544347047806, -0.004170255735516548, -0.02214607410132885, -0.013376767747104168, -0.015646865591406822, 0.023827629163861275, -0.021137142553925514, -0.01827850006520748, -0.030906975269317627, 0.005111926235258579, -0.023272717371582985, -0.038877543061971664, -0.0316636748611927, 0.027476603165268898, -0.028485536575317383, -0.03975195065140724, 0.025004718452692032, 0.030352061614394188, -0.0009059375734068453, -0.05633208155632019, 0.011896999552845955, 0.0027724632527679205, 0.05085021257400513, -0.009753016754984856, -0.03285757824778557, -0.03665789216756821, 0.08407773077487946, -0.07957116514444351, -0.05209456384181976, 0.003539672587066889, 0.009534414857625961, 0.004691537469625473, 0.08010926097631454, 0.055323150008916855, -0.037767719477415085, 0.009870725683867931, 0.009971619583666325, 0.04557013139128685, 0.03601890057325363, -0.03504360094666481, -0.05690380930900574, -0.04469572380185127, 0.010030473582446575, 0.042173389345407486, 0.0016521274810656905, 0.026888059452176094, -0.019337879493832588, 0.042913276702165604, -0.01109826099127531, 0.00412821676582098, -0.017589062452316284, -0.05481868237257004, 0.010930105112493038, 0.0053893825970590115, 0.06514342874288559, -0.022734619677066803, -0.023222269490361214, 0.05619755759835243, -0.023424057289958, -0.04728531837463379, -0.07452650368213654, -0.019825529307127, 0.05855173245072365, -0.007239092607051134, 0, 0.030352061614394188, 0.08750810474157333, -0.03796950355172157, 0.079302117228508, -0.05249813571572304, 0.02947765402495861, 0.0029006816912442446, 0.021977920085191727, 0.0036048328038305044, -0.04029005020856857, -0.02312137745320797, 0.014696788042783737, 0.01404098141938448, -0.0486978217959404, -0.013200203888118267, -0.026686271652579308, 0.007970568723976612, 0.031344179064035416, -0.05939251184463501, -0.015882283449172974, 0.02152390033006668, 0.02643403969705105, 0.020145025104284286, 0.019253801554441452, 0.022885959595441818, 0.058080896735191345, -0.03272305428981781, -0.06289014220237732, 0.011291639879345894, 0.015638457611203194, 0.011947445571422577, 0.09759743511676788, 0.03682604804635048, 0.011308454908430576, 0.053607963025569916, 0.005990538280457258, -0.06968362629413605, -0.020044131204485893, -0.03541354089975357, 0.035817112773656845, 0.005591169465333223, -0.09248550981283188, 0.0027850749902427197, -0.020481334999203682, 0.038373079150915146, 0.00405464880168438, 0.03534628078341484, 0.022280599921941757, -0.006028373260051012, -0.014049389399588108, -0.01945558749139309, 0.016807138919830322, 0.017891742289066315, 0.0417361855506897, 0.013847602531313896, 0.03944927081465721, 0.006570674944669008, -0.05505409836769104, -0.05417969077825546, -0.020767200738191605, 0.026888059452176094, 0.021372560411691666, 0.028283748775720596, -0.01853073202073574, -0.00008539144619135186, 0.016588537022471428, 0.013494475744664669, 0.04062636196613312, -0.0010888066608458757, -0.00620914064347744, 0.006448762025684118, -0.006242771632969379, 0.019707821309566498, 0.05878715217113495, 0.0007241194834932685, 0.005032052285969257, 0.028670506551861763, 0.032638974487781525, -0.017959004268050194, -0.04395584017038345, 0.007630054373294115, -0.014318438246846199, -0.007310559041798115, -0.02214607410132885, -0.0489332415163517, -0.043283216655254364, -0.000030297542252810672, 0.0006016812985762954, -0.08360689878463745, -0.02660219557583332, 0.047554366290569305, 0.0230709295719862, 0.019606927409768105, 0.0016332099912688136, -0.023457687348127365, 0.05364159494638443, -0.0016184963751584291, 0.09712659567594528, 0.04906776547431946, -0.03706146404147148, -0.0044098771177232265, -0.005780344363301992, 0.014360477216541767, -0.012300572358071804, -0.01975826732814312, -0.005372567102313042, -0.030537033453583717, 0.027123477309942245, 0.07062529772520065, 0.03260534629225731, -0.011476610787212849, -0.01864844188094139, 0.006032577250152826, -0.02757749706506729, 0.014814496971666813, -0.006621121428906918, 0.005158168729394674, 0.0267871655523777, 0.03504360094666481, 0.06968362629413605, -0.006183917168527842, -0.017286382615566254, -0.029141342267394066, -0.02323908545076847, -0.01663898304104805, -0.038675758987665176, -0.02495427057147026, 0.03075563535094261, -0.042240653187036514, 0.008811346255242825, -0.017168672755360603, -0.043283216655254364, 0.025055164471268654, 0.0027619535103440285, 0.02379399910569191, 0.014276399277150631, -0.029090896248817444, -0.016428789123892784, 0.03655700013041496, 0.036119792610406876, -0.04304780066013336, -0.06201573461294174, -0.0686410591006279, -0.007045714184641838, 0.004943770822137594, -0.015159214846789837, 0.016916440799832344, -0.04062636196613312, -0.10452543944120407, -0.01743772253394127, -0.015403040684759617, 0.011560688726603985, -0.013713078573346138, -0.03655700013041496, -0.001647923607379198, -0.05323801934719086, 0.007070937193930149, -0.008844977244734764, -0.051724620163440704, -0.04039094224572182, -0.05014396086335182, 0.012746184132993221, 0.0065328399650752544, -0.013898049481213093, -0.0032790314871817827, 0.025862310081720352, -0.017824480310082436, 0.046579062938690186, 0.020212287083268166, -0.026988951489329338, 0.052565399557352066, -0.051220156252384186, -0.027880176901817322, 0.04570465534925461, 0.008945871144533157, 0.029393576085567474, 0.03598526865243912, 0.04604096710681915, 0.01177088264375925, -0.06346186995506287, -0.04086177796125412, -0.01999368518590927, -0.005940091796219349, -0.02428164891898632, -0.014108243398368359, -0.029679439961910248, -0.0424424409866333, -0.049034133553504944, 0.005040460266172886, -0.023962153121829033, 0.01864844188094139, 0.021994734182953835, 0.0032685219775885344, 0.05448237061500549, 0.030385693535208702, 0.053305283188819885, 0.04772252216935158, 0.04641090705990791, 0.031226471066474915, -0.04900050163269043, -0.019657373428344727, 0.001255911192856729, -0.03729688376188278, -0.0046999454498291016, -0.003295847214758396, -0.026131359860301018, 0.04287964478135109, 0.05690380930900574, 0.04644453898072243, 0.011611134745180607, -0.06948184221982956, -0.06268835812807083, 0.015697313472628593, 0.003514449344947934, -0.03188227489590645, 0.06558062881231308, -0.0333956740796566, 0.004430896602571011, -0.02606409788131714, -0.035817112773656845, 0.05525588616728783, -0.047857046127319336, 0.015924323350191116, 0.038675758987665176, 0.0670267716050148, -0.04738621041178703, -0.009189696051180363, -0.06645504385232925, 0.012393058277666569, -0.00507829524576664, 0.031344179064035416, 0.026820797473192215, 0.028115594759583473, 0.005805567372590303, -0.004918547347187996, -0.00506147975102067, -0.025677340105175972, 0.007247500587254763, -0.004308983683586121, 0.11004094034433365, -0.02708984538912773, -0.008449812419712543, 0.0786294937133789, -0.000501313479617238, -0.030906975269317627, 0.04735257849097252, 0.0076216463930904865, -0.0024067251943051815, -0.05646660551428795, -0.03460639342665672, -0.0010814497945830226, 0.021002618595957756, 0.025677340105175972, 0.0014062001137062907, 0.04600733518600464, 0.01275459211319685, -0.1015659049153328, 0.001656331354752183, 0.004304780159145594, -0.012847078032791615, -0.04146713763475418, 0.023339979350566864, -0.014898573979735374, -0.0018213338917121291, -0.0328071303665638, 0.04520018771290779, -0.02490382455289364, 0.04533471539616585, 0.009114026091992855, -0.04385494440793991, -0.019371509552001953, 0.05317075923085213, 0.08427952229976654, 0.0002827113785315305, 0.0033652111887931824, 0.022986851632595062, -0.025526000186800957, 0.015209661796689034, -0.039852846413850784, 0.01969100534915924, -0.024971086531877518, 0.019842345267534256, -0.01499105989933014, 0.021927472203969955, -0.032638974487781525, 0.035077229142189026, -0.0005302152130752802, 0.020145025104284286, -0.041500769555568695, 0.023339979350566864, -0.014848127961158752, -0.074661023914814, -0.10109506547451019, 0.021607978269457817, -0.01526010874658823, -0.017639508470892906, 0.04459482803940773, -0.0165801290422678, -0.008710453286767006, 0.08945871144533157, -0.03568258881568909, 0.02507198043167591, -0.02912452630698681, -0.009408297948539257, -0.025357844308018684, 0.014864942990243435, -0.0299148578196764, 0.03016708977520466, 0.06658956408500671, 0.02660219557583332, -0.06615236401557922, -0.026282699778676033, -0.017605876550078392, 0.004582236520946026, 0.007012082729488611, -0.07688067853450775, 0.04355226457118988, 0.03907933086156845, -0.057408276945352554, 0.010778765194118023, -0.03248763456940651, 0.057475537061691284, -0.02428164891898632, -0.02085127867758274, -0.07244137674570084, -0.013107718899846077, 0.004943770822137594, -0.062486570328474045, -0.02537466026842594, 0.05653386935591698, 0.025004718452692032, -0.07795687764883041, -0.021187588572502136, -0.011669989675283432, -0.008340511471033096, -0.049202289432287216, 0.02831738069653511, -0.006923801265656948, 0.005570149980485439, 0.03759956359863281, -0.06436990946531296, 0.018816595897078514, 0.023659473285079002, 0.06147763878107071, 0.020767200738191605, -0.009921172633767128, -0.0037898037116974592, 0.0025874923449009657, 0.03608616441488266, -0.015234884805977345, -0.03699420392513275, -0.0017477659275755286, 0.009980026632547379, 0.007974772714078426, 0.008802938275039196, 0.026400407776236534, 0.001701523084193468, -0.00147241132799536, 0.006835519801825285, -0.044325780123472214, 0.014083020389080048, 0.0155964195728302, 0.012847078032791615, -0.042106129229068756, -0.0760735347867012, 0.030368877574801445, -0.006814500316977501, -0.0128134461119771, 0.039415642619132996, -0.00529269315302372, -0.028838662430644035, -0.03371516987681389, 0.05273355543613434, 0.05273355543613434, 0.027661575004458427, 0.040222786366939545, -0.05475141853094101, -0.019438771530985832, 0.02912452630698681, -0.02808196283876896, 0.03497633710503578, -0.060535967350006104, -0.03423645347356796, -0.060535967350006104, -0.04109719768166542, 0.01603362336754799, 0.04160166159272194, -0.05898893624544144, 0.0165801290422678, -0.015873875468969345, 0.02300366759300232, 0.028216486796736717, -0.047083530575037, -0.052565399557352066, -0.005914868321269751, -0.007516549434512854, -0.024987902492284775, -0.0235417652875185, 0.03558169677853584, -0.011930630542337894, -0.07331578433513641, 0.03371516987681389, -0.001234891708008945, -0.02979714795947075, 0.007512345444411039, 0.025761418044567108, 0.013401990756392479, 0.07149970531463623, 0.04812609404325485, 0.06827112287282944, 0.04624275490641594, -0.006234364118427038, 0.032756686210632324, 0.004456120077520609, -0.04873145371675491, -0.010812396183609962, -0.0352453850209713, 0.09504146873950958, 0.022667357698082924, -0.026652641594409943, -0.0714324414730072, -0.03665789216756821, 0.015159214846789837, 0.003964265342801809, 0.009887541644275188, 0.041265349835157394, -0.0230709295719862, -0.013662631623446941, 0.027728836983442307, 0.015991585329174995, 0.05724012106657028, -0.018211236223578453, -0.0012853383086621761, -0.03665789216756821, 0.01712663471698761, 0.03719598799943924, -0.007012082729488611, -0.046949006617069244, 0.008844977244734764, 0.0008386753615923226, -0.028603244572877884, 0.030553847551345825, 0.025862310081720352, -0.06921278685331345, -0.016134517267346382, -0.0449984036386013, 0.002650550566613674, 0.026988951489329338, -0.048596929758787155, 0.030368877574801445, -0.027123477309942245, -0.00654545146971941, -0.004456120077520609, 0.0032264830078929663, -0.004615867510437965, 0.02207881212234497, -0.06537884473800659, -0.0028922739438712597, 0.019724635407328606, 0.012073562480509281, 0.006839723791927099, -0.026131359860301018, -0.010879659093916416, 0.016781914979219437, 0.013015232980251312, 0.032689422369003296, -0.00899631716310978, 0.03193272277712822, 0.02592957206070423, 0.0005444033304229379, 0.03337886184453964, 0.011173930950462818, -0.052027300000190735, 0.012275349348783493, -0.05468415841460228, -0.018009450286626816, 0.052565399557352066, 0.03823855146765709, -0.015445079654455185, -0.004901731852442026, 0.08172355592250824, -0.04580554738640785, -0.01085443515330553, 0.003621648298576474, 0.04836151376366615, -0.0027535457629710436, 0.035009969025850296, -0.005401994567364454, 0.042980536818504333, 0.05919072404503822, 0.002480293158441782, 0.005200207699090242, 0.011829736642539501, -0.017420906573534012, 0.06692587584257126, -0.05834994837641716, 0.03632158041000366, -0.015545972622931004, 0.035749852657318115, -0.04459482803940773, -0.0009101414470933378, 0.04563739523291588, -0.015999993309378624, -0.009980026632547379, 0.03706146404147148, 0.042173389345407486, 0.012317388318479061, -0.014251175336539745, 0.051287416368722916, -0.016916440799832344, 0.022785065695643425, -0.06605146825313568, -0.0029301089234650135, -0.02831738069653511, -0.013065679930150509, -0.036792416125535965, -0.004321595653891563, 0.016479235142469406, -0.013326320797204971, 0.03743140771985054, 0.0011718333698809147, -0.007768782787024975 ]
716,319
pytorch_optimizer.loss.dice
compute_score
null
@staticmethod def compute_score( output: torch.Tensor, target: torch.Tensor, label_smooth: float = 0.0, eps: float = 1e-6, dims: Optional[Tuple[int, ...]] = None, ) -> torch.Tensor: return soft_dice_score(output, target, label_smooth, eps, dims)
(output: torch.Tensor, target: torch.Tensor, label_smooth: float = 0.0, eps: float = 1e-06, dims: Optional[Tuple[int, ...]] = None) -> torch.Tensor
[ -0.053706973791122437, -0.05936214327812195, -0.03487354516983032, -0.00793437473475933, 0.04171115905046463, 0.024745650589466095, -0.020667074248194695, 0.008954018354415894, 0.06090446189045906, -0.0032410118728876114, -0.007955795153975487, 0.012252867221832275, 0.05031387135386467, -0.019398946315050125, -0.007981500588357449, 0.04140269756317139, 0.06244678050279617, 0.04794898256659508, -0.015320368111133575, 0.031171981245279312, 0.04784616082906723, -0.034924957901239395, 0.049217112362384796, 0.03554188460111618, -0.04904574528336525, -0.010573453269898891, 0.02902987040579319, -0.010256420820951462, -0.04997113347053528, -0.027898836880922318, -0.047606244683265686, -0.02304910123348236, 0.01244137343019247, 0.09644635021686554, -0.010950464755296707, 0.014334998093545437, -0.001973954029381275, 0.0337425135076046, -0.06779348850250244, -0.026168012991547585, -0.06446893513202667, -0.01045349519699812, 0.008761228993535042, 0.02064993791282177, -0.05346705764532089, -0.003309559542685747, -0.0096737677231431, -0.005286726634949446, 0.006906161550432444, -0.047160688787698746, -0.023734575137495995, -0.055797673761844635, -0.024557145312428474, -0.0031853171531111, -0.03124052844941616, 0.06203549727797508, 0.054186806082725525, -0.022809183225035667, -0.018644923344254494, -0.022363625466823578, 0.04205389693379402, -0.07293455302715302, 0.001378447632305324, 0.04750342294573784, -0.018713470548391342, -0.0012531342217698693, -0.056585971266031265, 0.00830710120499134, -0.0015787348384037614, 0.0009275334887206554, -0.006687666289508343, -0.0037101339548826218, 0.07684175670146942, -0.004316350910812616, -0.004468441009521484, 0.00007303255551960319, 0.019467493519186974, -0.0676906630396843, 0.04918283969163895, -0.05816256254911423, 0.025859547778964043, -0.02798452042043209, -0.017213992774486542, -0.04832599312067032, -0.021369686350226402, -0.05034814774990082, 0.033536870032548904, 0.011892993003129959, 0.007548794616013765, 0.015320368111133575, 0.0012981184991076589, 0.0734829306602478, -0.004798325709998608, 0.0367414653301239, 0.004258513916283846, 0.03622736036777496, -0.023546069860458374, 0.005599474534392357, 0.016554223373532295, 0.00717178313061595, 0.019775956869125366, 0.08506745845079422, 0.029389744624495506, 0.07053539156913757, 0.03914062678813934, -0.06484594196081161, -0.021900929510593414, 0.032234467566013336, 0.046029653400182724, -0.004297072067856789, -0.042739372700452805, 0.009408146142959595, -0.031171981245279312, -0.02229507826268673, -0.006661961320787668, -0.07992639392614365, 0.031034884974360466, 0.02902987040579319, -0.04082004353404045, 0.026545023545622826, -0.02121545374393463, -0.023700302466750145, -0.04013456776738167, -0.009202503599226475, -0.03029800020158291, -0.007458826061338186, 0.015851611271500587, 0.03377678617835045, 0.024968430399894714, -0.029938125982880592, 0.02630510739982128, -0.029612524434924126, 0.04743487760424614, 0.010487768799066544, 0.061932675540447235, -0.017650984227657318, 0.07965220510959625, 0.04051157832145691, 0.03965473547577858, 0.000052347804739838466, 0.043150659650564194, 0.0030567904468625784, -0.029389744624495506, 0.007574500050395727, 0.08246265351772308, 0.0017629562644287944, 0.05038242042064667, 0.034582220017910004, 0.08547874540090561, 0.03254292905330658, 0.03591889515519142, 0.01376948133111, 0.01305830106139183, 0.017668120563030243, -0.01352099608629942, -0.011661645025014877, 0.03653582185506821, -0.08945450186729431, 0.005462379660457373, -0.04249945655465126, 0.0027718900237232447, -0.06738220155239105, -0.024197271093726158, -0.0017094035865738988, 0.00354519160464406, -0.039826102554798126, 0.0005794406752102077, 0.05106789618730545, 0.0001922543451655656, 0.01699121482670307, -0.02529403194785118, -0.0900714322924614, -0.032234467566013336, 0.023477522656321526, 0.01563740149140358, -0.001366665936075151, -0.020324336364865303, 0.0018143669003620744, -0.05449527129530907, 0.01960458792746067, 0.05963633581995964, -0.026168012991547585, -0.032337289303541183, -0.04342484846711159, -0.010590590536594391, 0.04575546458363533, 0.023186195641756058, 0.03422234579920769, -0.05243884399533272, 0.03715275228023529, -0.0010721258586272597, -0.04620102047920227, 0.0064606028608977795, 0.0005644459160976112, 0.04222526773810387, -0.011601665988564491, -0.035747528076171875, 0.002223509829491377, 0.014043671078979969, -0.012664152309298515, 0.002521263202652335, 0.0389692597091198, 0.010539179667830467, -0.003922203090041876, -0.0036501549184322357, -0.0013034737203270197, -0.015963001176714897, 0.06645680963993073, -0.045515548437833786, -0.056585971266031265, -0.06813622266054153, -0.02296341583132744, -0.017719531431794167, 0.05473518744111061, 0.06902734190225601, 0.011815876699984074, 0.019364671781659126, -0.00419853487983346, -0.027778878808021545, -0.012895500287413597, -0.008928312920033932, -0.03938054293394089, 0.017822353169322014, 0.04986831545829773, 0.041951075196266174, -0.029132692143321037, 0.021266864612698555, -0.02735045738518238, 0.05816256254911423, -0.010504906065762043, 0.0266307070851326, -0.023477522656321526, 0.007745868526399136, -0.02570531703531742, 0.040237389504909515, 0.03728984668850899, -0.03770112991333008, 0.023957354947924614, 0.02304910123348236, 0.027367593720555305, -0.03228587657213211, -0.02861858531832695, -0.01496049389243126, 0.03835233300924301, 0.025756727904081345, 0.013169690035283566, 0.022586405277252197, 0.0019193303305655718, -0.02846435457468033, 0.08383360505104065, -0.008444196544587612, -0.05315859615802765, -0.002632652875036001, -0.004164261277765036, -0.0013730922946706414, 0.008148585446178913, -0.012167182750999928, 0.008555586449801922, 0.005552348215132952, 0.002315620658919215, -0.07320874184370041, 0.013898007571697235, -0.025276893749833107, -0.024008765816688538, -0.08102315664291382, 0.00624639168381691, -0.04123132675886154, 0.03759830817580223, -0.010359242558479309, 0.010162168182432652, -0.034736450761556625, 0.06015044078230858, 0.01881629228591919, -0.029338333755731583, 0.010110758244991302, 0.010830506682395935, -0.0001706993643892929, 0.04205389693379402, 0.04853163659572601, 0.03405097499489784, 0.03951764106750488, -0.024248681962490082, -0.07704740017652512, 0.0027954531833529472, 0.01095903292298317, 0.019433218985795975, 0.019518904387950897, 0.00584367522969842, 0.03494209423661232, -0.050553787499666214, -0.00047394176363013685, 0.03516487404704094, 0.10323254764080048, 0.005912222899496555, -0.018079405650496483, -0.0029668218921869993, -0.0071974885649979115, -0.01979309320449829, 0.007210341282188892, 0.0285843126475811, 0.04164261370897293, -0.028738543391227722, 0.00044984303531236947, -0.030503641813993454, -0.02027292549610138, -0.0067990561947226524, 0.020255789160728455, -0.00781870074570179, 0.023546069860458374, -0.03852370008826256, -0.014617756940424442, 0.015354642644524574, -0.0019718119874596596, 0.03341691195964813, 0.000026977193556376733, -0.009785156697034836, -0.017308246344327927, -0.03134334832429886, 0.04664658010005951, 0.042705100029706955, -0.013872302137315273, 0.038215238600969315, 0.019433218985795975, 0.06625116616487503, -0.0058136857114732265, -0.059087954461574554, 0.018764881417155266, -0.0006592342397198081, 0.031291939318180084, -0.019964462146162987, 0.000599790713749826, -0.029732482507824898, 0.05158200114965439, -0.027590373530983925, -0.0510336197912693, -0.020667074248194695, 0.07039829343557358, 0.042328089475631714, -0.01799372211098671, -0.0008327451650984585, 0.002416299656033516, -0.016639908775687218, -0.0060621704906225204, 0.04949130117893219, 0.049217112362384796, 0.007741584442555904, -0.025791000574827194, -0.020512841641902924, 0.0571686252951622, -0.023957354947924614, -0.0072874571196734905, -0.007977216504514217, 0.05223320424556732, 0.025054115802049637, 0.0572371706366539, 0.044727250933647156, 0.009733746759593487, 0.004408461973071098, 0.01710260473191738, -0.0676906630396843, -0.0469893179833889, -0.07135795801877975, 0.00852988101541996, 0.030280862003564835, 0.020118694752454758, 0.031291939318180084, -0.010539179667830467, -0.0107019804418087, 0.013606680557131767, 0.0017094035865738988, -0.07327728718519211, -0.07910382747650146, -0.052952952682971954, -0.015663105994462967, 0.011755897663533688, -0.01979309320449829, -0.05847102776169777, -0.02304910123348236, 0.0900028795003891, 0.0367414653301239, 0.01601441204547882, 0.031446170061826706, -0.039928924292325974, 0.012895500287413597, 0.0032967068254947662, -0.0018550669774413109, 0.0017790221609175205, 0.007733015809208155, 0.04133414849638939, -0.04342484846711159, 0.06213831901550293, 0.010376379825174809, 0.08040622621774673, -0.037392668426036835, -0.062378235161304474, -0.020358610898256302, 0.005950780585408211, -0.004072150681167841, -0.057854097336530685, -0.010007936507463455, -0.04267082363367081, 0.010359242558479309, 0.02061566337943077, 0.0015444611199200153, -0.057065803557634354, 0.026990581303834915, -0.024848472326993942, 0.018319321796298027, 0.0014673451660200953, 0.046406663954257965, -0.03629590570926666, 0.02529403194785118, -0.042739372700452805, 0.01571451686322689, -0.028892775997519493, -0.008816923946142197, -0.011121833696961403, 0.019021933898329735, -0.030692147091031075, 0.012732700444757938, 0.04897719621658325, -0.054186806082725525, 0.057477086782455444, 0.021763835102319717, 0.00843562837690115, -0.06206976994872093, -0.05596904084086418, -0.0028125899843871593, 0.02226080372929573, -0.030812105163931847, -0.07944656163454056, -0.04979976639151573, -0.03398242965340614, -0.06206976994872093, 0.04623529687523842, -0.027847426012158394, -0.025002704933285713, 0.04431596398353577, -0.011867287568747997, -0.00800292193889618, 0.056620243936777115, -0.010479200631380081, 0.049696944653987885, 0.016485676169395447, 0.0029282639734447002, -0.03722129762172699, -0.022432172670960426, 0.00869696494191885, -0.0900714322924614, -0.036981381475925446, 0.05836820602416992, -0.010384947992861271, 0.07464823871850967, 0.08081751316785812, -0.024402914568781853, -0.014857673086225986, -0.09219640493392944, -0.016134370118379593, 0.02214084565639496, 0.019518904387950897, -0.041128505021333694, 0.051239263266325, -0.014840535819530487, 0.029132692143321037, -0.04541272670030594, -0.02570531703531742, -0.017231130972504616, -0.02981816790997982, 0.016142938286066055, -0.027436140924692154, 0.06296088546514511, -0.06625116616487503, 0.05922504886984825, -0.050827980041503906, 0.023511795327067375, 0.0168369822204113, -0.015911590307950974, 0.044384513050317764, 0.03842087835073471, 0.03763258457183838, 0.030143767595291138, -0.012304278090596199, -0.0065205818973481655, -0.006289233919233084, 0.002778316382318735, 0.0469207726418972, -0.03022945299744606, 0.03643300011754036, 0.027436140924692154, 0.00676049804314971, 0.013246806338429451, 0.010162168182432652, 0.03852370008826256, -0.06854750961065292, -0.03547333553433418, -0.03958618640899658, 0.06117865443229675, 0.034736450761556625, -0.007373141590505838, -0.025122663006186485, -0.032491520047187805, -0.006113580893725157, -0.07725304365158081, 0.008195711299777031, 0.039003532379865646, 0.01699121482670307, -0.015166136436164379, 0.07224907726049423, -0.0033052752260118723, 0.012749836780130863, -0.011284633539617062, 0.015483168885111809, 0.0014469950692728162, 0.04609820246696472, 0.0408543162047863, -0.02181524597108364, -0.044418785721063614, 0.05627750605344772, 0.01187585573643446, -0.0530557744204998, 0.03807814046740532, 0.04945702850818634, -0.0315832644701004, -0.013812323100864887, 0.009433851577341557, 0.02428295463323593, 0.02412872388958931, 0.0337425135076046, 0.031137706711888313, 0.026682117953896523, -0.00873552355915308, 0.022654952481389046, 0.003513059811666608, 0.058608122169971466, -0.03247438371181488, 0.010025073774158955, -0.04328775405883789, -0.07320874184370041, -0.009965094737708569, -0.019330397248268127, 0.00926248263567686, 0.03415379673242569, 0.03951764106750488, 0.008581291884183884, 0.055866219103336334, 0.0696442723274231, -0.008499891497194767, 0.06090446189045906, -0.026322243735194206, -0.029304061084985733, -0.03629590570926666, -0.002315620658919215, -0.003840802703052759, -0.013049731962382793, 0.06296088546514511, 0.0817086324095726, -0.062343962490558624, -0.016185780987143517, -0.03322840481996536, 0.004354909062385559, -0.03173749893903732, -0.07951511442661285, 0.10001081973314285, -0.021866654977202415, -0.018953386694192886, -0.0316518135368824, -0.017702395096421242, -0.005291011184453964, -0.03516487404704094, -0.050039682537317276, -0.04818889871239662, 0.013375332579016685, 0.05069088563323021, 0.043938953429460526, 0.001628003316000104, 0.0612129271030426, 0.04938847944140434, -0.11488562822341919, 0.031480442732572556, 0.007026119623333216, -0.06395483016967773, -0.043116383254528046, 0.05069088563323021, 0.014574914239346981, -0.006486308295279741, 0.0173939298838377, -0.03732411935925484, -0.010881917551159859, -0.0235632061958313, 0.020410021767020226, -0.029235513880848885, -0.013041163794696331, 0.0012306419666856527, 0.00709038320928812, -0.017419636249542236, -0.06138429418206215, -0.02950970269739628, 0.030555052682757378, 0.0939786359667778, -0.037495486438274384, -0.05877948924899101, 0.02988671511411667, -0.007900100201368332, 0.019690271466970444, 0.01429215632379055, -0.015594558790326118, -0.01223573088645935, 0.0009355664369650185, -0.010359242558479309, -0.05559203028678894, -0.05559203028678894, 0.03494209423661232, 0.0024527155328541994, 0.01232998352497816, 0.03093206323683262, -0.0067862034775316715, 0.02529403194785118, 0.020341474562883377, 0.02479706145823002, -0.010993306525051594, 0.014814830385148525, -0.005526643246412277, 0.005676590837538242, 0.0157916322350502, 0.012124340981245041, -0.006190697196871042, 0.015483168885111809, -0.06652536243200302, -0.002949685091152787, -0.0028018795419484377, -0.033536870032548904, 0.04709213972091675, -0.005963633302599192, -0.0107019804418087, -0.0036244497168809175, 0.003583749523386359, 0.07677321135997772, 0.02735045738518238, -0.04506998881697655, -0.04945702850818634, -0.01878201775252819, 0.04373330995440483, -0.01232998352497816, 0.016562791541218758, 0.00220208871178329, -0.01859351247549057, -0.031171981245279312, 0.019741682335734367, 0.0630979835987091, 0.00905684009194374, 0.000753487111069262, 0.000638348690699786, -0.006486308295279741, 0.023700302466750145, 0.029458291828632355, 0.038249511271715164, 0.05984197556972504, -0.02267208881676197, 0.005860812030732632, -0.044692978262901306, -0.018867703154683113, 0.024899883195757866, 0.018799154087901115, 0.009176798164844513, -0.048497363924980164, -0.007822984829545021, 0.009810862131416798, -0.04321920499205589, -0.06254960596561432, -0.05877948924899101, -0.03124052844941616, 0.03725557029247284, -0.07382567226886749, -0.03048650547862053, 0.006332076154649258, -0.05350133031606674, 0.013949418440461159, 0.008928312920033932, -0.02406017668545246, -0.05288440361618996, 0.04770906642079353, 0.014669166877865791, -0.02274063602089882, -0.0005756919854320586, 0.025054115802049637, -0.04709213972091675, -0.007557363249361515, -0.043904680758714676, -0.03082924336194992, -0.04243090748786926, -0.056208956986665726, -0.021763835102319717, 0.008461332879960537, 0.0044255987741053104, 0.007484531495720148, -0.035404790192842484, -0.07828125357627869, 0.024008765816688538, 0.01239853072911501, -0.00864127092063427, -0.004896862898021936, 0.027247635647654533, -0.01915902830660343, 0.012004382908344269, -0.03082924336194992, -0.0025298316031694412, -0.05031387135386467, 0.007180351763963699, 0.018919112160801888, -0.004468441009521484, 0.03670719265937805, -0.03137762472033501, -0.0026176581159234047, 0.03564470633864403, -0.020187241956591606, -0.016142938286066055, 0.006957572419196367, -0.004033592529594898, -0.045618366450071335, 0.014934788458049297, 0.013101142831146717, -0.01470344141125679, 0.04812035337090492, -0.033571142703294754, -0.05733999237418175, -0.02027292549610138, 0.03951764106750488, -0.013820892199873924, 0.03348545730113983, 0.035404790192842484, 0.013572406955063343, -0.044418785721063614, -0.0032153066713362932, -0.03415379673242569, -0.017685256898403168, 0.039449092000722885, 0.041505519300699234, -0.03708420321345329, 0.07314019650220871, -0.03007522039115429, 0.014360703527927399, 0.007857258431613445, 0.01253562606871128, -0.03257720544934273, 0.010539179667830467, 0.012218593619763851, -0.006340644787997007, 0.006957572419196367, 0.03173749893903732, -0.0014984057052060962, 0.06652536243200302, 0.03852370008826256, 0.023546069860458374, -0.022312214598059654, 0.0856158435344696, -0.025448262691497803, 0.016819845885038376, -0.0859585776925087, 0.003123195841908455, -0.03019517846405506, 0.01054774783551693, -0.021609602496027946, -0.017239699140191078, 0.009211071766912937, -0.01862778514623642, 0.02200375124812126, 0.027487551793456078, 0.02495129406452179 ]
716,326
pytorch_optimizer.loss.dice
forward
null
def forward(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor: if self.from_logits: # Apply activations to get [0..1] class probabilities # Using Log-Exp as this gives more numerically stable result and does not cause vanishing gradient on # extreme values 0 and 1 y_pred = y_pred.log_softmax(dim=1).exp() if self.mode == 'multiclass' else logsigmoid(y_pred).exp() bs: int = y_true.size(0) num_classes: int = y_pred.size(1) dims: Tuple[int, ...] = (0, 2) if self.mode == 'binary': y_true = y_true.view(bs, 1, -1) y_pred = y_pred.view(bs, 1, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask y_true = y_true * mask if self.mode == 'multiclass': y_true = y_true.view(bs, -1) y_pred = y_pred.view(bs, num_classes, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask.unsqueeze(1) y_true = one_hot((y_true * mask).to(torch.long), num_classes) y_true = y_true.permute(0, 2, 1) * mask.unsqueeze(1) else: y_true = one_hot(y_true, num_classes) y_true = y_true.permute(0, 2, 1) if self.mode == 'multilabel': y_true = y_true.view(bs, num_classes, -1) y_pred = y_pred.view(bs, num_classes, -1) if self.ignore_index is not None: mask = y_true != self.ignore_index y_pred = y_pred * mask y_true = y_true * mask scores = self.compute_score( y_pred, y_true.type_as(y_pred), label_smooth=self.label_smooth, eps=self.eps, dims=dims ) loss = -torch.log(scores.clamp_min(self.eps)) if self.log_loss else 1.0 - scores # Dice loss is undefined for non-empty classes # So we zero contribution of channel that does not have true pixels # NOTE: A better workaround would be to use loss term `mean(y_pred)` # for this case, however it will be a modified jaccard loss mask = y_true.sum(dims) > 0 loss *= mask.to(loss.dtype) if self.classes is not None: loss = loss[self.classes] return self.aggregate_loss(loss)
(self, y_pred: torch.Tensor, y_true: torch.Tensor) -> torch.Tensor
[ -0.0353698655962944, -0.0548015721142292, -0.0004951167502440512, 0.0018482784507796168, 0.03774925693869591, -0.013473784551024437, -0.04660588875412941, 0.039203330874443054, 0.03695612773299217, 0.024662597104907036, 0.0060098557732999325, -0.013549321331083775, 0.06333717703819275, 0.019696086645126343, 0.043811045587062836, 0.04388657957315445, 0.04037414491176605, -0.0027263876982033253, 0.026796497404575348, 0.002132719848304987, 0.030497774481773376, -0.02498362585902214, -0.005188398528844118, 0.052573252469301224, -0.020526984706521034, -0.04585052281618118, -0.02581452578306198, -0.02432268299162388, -0.030894339084625244, 0.02232097089290619, -0.047927770763635635, -0.006340326741337776, 0.040562983602285385, 0.014861763454973698, 0.008006845600903034, 0.0017833644524216652, -0.021999942138791084, 0.024719249457120895, -0.04566168412566185, -0.004468443337827921, -0.030327817425131798, -0.09857484698295593, -0.009829158894717693, 0.01861025206744671, -0.04637927934527397, 0.0365217924118042, -0.05374406650662422, 0.0024454870726913214, 0.017071200534701347, -0.041091740131378174, -0.012690095230937004, -0.03353811055421829, -0.0312342531979084, 0.039505477994680405, -0.0075677912682294846, 0.05650113895535469, 0.030497774481773376, 0.00770470080897212, -0.06851141154766083, -0.04199817404150963, 0.002387654734775424, -0.03129090368747711, 0.04615266993641853, 0.010914992541074753, 0.039845388382673264, 0.0029907647985965014, -0.04917411878705025, 0.0406385213136673, 0.004376383498311043, -0.004985394887626171, -0.036200765520334244, -0.031253136694431305, 0.04467971250414848, 0.04411318898200989, -0.03757930174469948, -0.03376471996307373, -0.017533859238028526, -0.033084891736507416, 0.03198961541056633, -0.04388657957315445, -0.021546725183725357, 0.01507893018424511, 0.006921011954545975, -0.050080556422472, -0.016060901805758476, -0.04637927934527397, 0.014616270549595356, 0.015815408900380135, -0.035313211381435394, 0.02792954072356224, -0.03627629950642586, 0.051704585552215576, 0.024719249457120895, 0.0312342531979084, 0.030497774481773376, 0.0671517550945282, -0.0459638275206089, 0.009914137423038483, 0.01761883869767189, 0.011547609232366085, 0.009427872486412525, 0.11813874542713165, -0.029270309954881668, 0.03223510831594467, 0.011330442503094673, -0.013407690450549126, -0.06473459303379059, 0.024020537734031677, -0.027646278962492943, -0.05295093357563019, -0.03316042944788933, -0.043093450367450714, 0.0002401817764621228, -0.02245316095650196, 0.031007643789052963, -0.07395002245903015, -0.033387038856744766, 0.007799121085554361, -0.07444100826978683, 0.04094066470861435, 0.03782479465007782, -0.013341596350073814, -0.01749609224498272, -0.033028241246938705, -0.016230858862400055, 0.01673128642141819, 0.055179256945848465, -0.0036705913953483105, 0.044453103095293045, -0.025361306965351105, -0.03958101198077202, 0.01873299852013588, -0.011689240112900734, 0.04422649368643761, 0.03722050413489342, -0.017524417489767075, -0.006047623697668314, 0.06020241975784302, 0.008559205569326878, 0.010150187648832798, 0.06582987308502197, 0.012520139105618, 0.034387893974781036, 0.041393883526325226, 0.01755274459719658, -0.021962175145745277, 0.0371260829269886, 0.06265734881162643, 0.03799474984407425, 0.0053583551198244095, 0.060768939554691315, -0.02039479650557041, 0.034671153873205185, -0.005759641528129578, -0.03412351757287979, 0.01089610904455185, -0.02186775393784046, -0.018053172156214714, 0.01755274459719658, 0.003937328699976206, -0.023831697180867195, -0.08739548176527023, -0.03340592235326767, -0.006869080942124128, -0.0023829336278140545, -0.019308961927890778, 0.028439410030841827, 0.06288395822048187, 0.01685403287410736, 0.055519167333841324, 0.057936329394578934, -0.0760272666811943, 0.06005134433507919, 0.051100295037031174, -0.07293028384447098, 0.050344932824373245, 0.02215101569890976, -0.03916556388139725, -0.022056594491004944, 0.05990027263760567, 0.04094066470861435, -0.03574754670262337, -0.05721873417496681, -0.09630876034498215, 0.03763595223426819, 0.0253424234688282, 0.027325250208377838, 0.02940249815583229, -0.019696086645126343, 0.0724392980337143, -0.024813668802380562, -0.05857838690280914, -0.0001962172973435372, -0.014540734700858593, 0.05298870429396629, -0.024360451847314835, 0.01850638911128044, 0.024832554161548615, 0.061184391379356384, -0.025361306965351105, -0.05174235254526138, 0.0009495146805420518, 0.04501962661743164, -0.0009300404926761985, -0.06443244963884354, 0.0005187218193896115, -0.015985365957021713, 0.10408899933099747, -0.00913044810295105, -0.1025027334690094, -0.029024817049503326, -0.0023569681216031313, -0.013889234513044357, 0.057709719985723495, 0.03570977970957756, -0.006864359602332115, -0.010291818529367447, 0.003868873929604888, -0.030441122129559517, -0.00636393204331398, -0.014389662072062492, -0.0512513667345047, -0.07840666174888611, 0.04921188950538635, 0.008153197355568409, -0.031970731914043427, 0.022755306214094162, -0.005381960421800613, 0.028250569477677345, -0.008346759714186192, -0.007213714998215437, 0.015418844297528267, 0.03540763258934021, 0.02220766805112362, 0.08505385369062424, 0.03965654969215393, 0.013794814236462116, 0.008120150305330753, -0.03491664677858353, 0.03629518300294876, -0.021641144528985023, -0.02792954072356224, 0.011358768679201603, -0.010452332906425, 0.02192440629005432, -0.001544953091070056, 0.03329261764883995, 0.06556549668312073, -0.015588800422847271, 0.035558704286813736, -0.023000799119472504, -0.014540734700858593, -0.03210292011499405, -0.018695229664444923, -0.0036233810242265463, -0.07194831222295761, -0.012624001130461693, -0.04864536598324776, 0.03999646380543709, -0.006170370150357485, -0.02615443803369999, 0.024775901809334755, -0.022018827497959137, 0.01731669344007969, -0.04471747949719429, -0.012406834401190281, 0.01613643951714039, 0.008077661506831646, 0.02893039584159851, 0.04316898435354233, 0.034387893974781036, 0.03835354745388031, -0.05990027263760567, -0.0035360422916710377, -0.031309790909290314, 0.015683220699429512, 0.03040335327386856, -0.049816180020570755, 0.003722522407770157, 0.007888820953667164, 0.017987078055739403, -0.10816796123981476, -0.013539878651499748, -0.04033637419342995, 0.04989171400666237, 0.031611934304237366, 0.02757074311375618, -0.014550176449120045, 0.06609424948692322, -0.004260718356817961, 0.0595225915312767, 0.029326962307095528, 0.07802898436784744, 0.015569916926324368, 0.001458794460631907, -0.022283203899860382, -0.05521702393889427, -0.008181523531675339, -0.00047947835992090404, -0.002783040050417185, -0.00801628828048706, -0.009012422524392605, 0.012822284363210201, -0.04736125096678734, -0.038617923855781555, -0.04826768487691879, 0.021395651623606682, 0.04452864080667496, 0.02745743840932846, -0.015003394335508347, 0.05344191938638687, 0.009408988058567047, 0.0019674841314554214, -0.0006034050602465868, -0.042149245738983154, -0.029081469401717186, 0.05026939511299133, -0.014323567971587181, 0.05374406650662422, 0.06031572073698044, -0.00773302698507905, 0.0359175018966198, -0.014276357367634773, 0.05230887606739998, 0.008176802657544613, -0.028911512345075607, 0.0418471023440361, -0.0025611522141844034, -0.03548317030072212, -0.003330677980557084, 0.034029096364974976, -0.02056475356221199, -0.007855773903429508, 0.0054527753964066505, -0.03969431668519974, -0.020583637058734894, 0.011358768679201603, 0.041318345814943314, 0.029969019815325737, -0.0037154408637434244, -0.03376471996307373, -0.014956183731555939, -0.05189342796802521, 0.03295270353555679, 0.03542651608586311, 0.0038759554736316204, -0.034085746854543686, 0.03807028755545616, 0.03457673266530037, 0.020942434668540955, -0.008214570581912994, -0.01234074030071497, 0.056350067257881165, 0.06345047801733017, 0.01673128642141819, -0.021017970517277718, -0.013473784551024437, 0.000642058439552784, 0.007463929243385792, -0.045397307723760605, -0.0006273052422329783, -0.026022249832749367, -0.04018530249595642, 0.036030806601047516, -0.003505355678498745, 0.03506771847605705, -0.01231241412460804, -0.027854004874825478, -0.022547580301761627, 0.001972205238416791, -0.03304712474346161, -0.00910212192684412, -0.017184505239129066, 0.010169072076678276, -0.013898676261305809, 0.03363253176212311, -0.04116727411746979, -0.004862648434937, 0.04690803214907646, 0.0005939630209468305, 0.008545042015612125, 0.006486678496003151, -0.07901095598936081, 0.016060901805758476, 0.025890061631798744, -0.0014694167766720057, -0.0025304656010121107, -0.046114902943372726, 0.02462482824921608, -0.038901187479496, 0.014248031191527843, -0.019186215475201607, -0.02162226103246212, -0.06178867816925049, -0.044453103095293045, -0.003760290564969182, 0.007978520356118679, 0.10688383877277374, -0.0324050672352314, -0.029666874557733536, -0.01642914116382599, -0.009012422524392605, 0.04316898435354233, 0.01973385363817215, -0.0359175018966198, 0.06522557884454727, 0.04128057882189751, 0.05196896195411682, -0.05521702393889427, 0.06239296868443489, -0.02934584580361843, 0.054235052317380905, -0.04033637419342995, 0.009196542203426361, -0.040978435426950455, 0.01813814975321293, -0.02368062548339367, 0.005825736094266176, 0.03221622481942177, 0.037333808839321136, 0.020829129964113235, 0.03818359225988388, 0.06175091117620468, -0.03351922705769539, -0.05895606800913811, 0.013162197545170784, -0.040676288306713104, 0.04524623230099678, -0.004329173360019922, 0.007029595319181681, -0.050571542233228683, -0.05344191938638687, -0.019714970141649246, -0.03878788277506828, -0.00954589806497097, -0.03217845782637596, 0.00871971994638443, -0.0014068633317947388, -0.038447968661785126, 0.044981855899095535, -0.022075477987527847, -0.04165825992822647, 0.03370806574821472, 0.07315689325332642, 0.004914579447358847, -0.031441979110240936, -0.037088315933942795, -0.030554426833987236, -0.06854917854070663, -0.003722522407770157, -0.05291316658258438, 0.01528665516525507, 0.03259390592575073, 0.04441533610224724, 0.013643741607666016, -0.006486678496003151, -0.07938863337039948, -0.03493553027510643, 0.02921365760266781, 0.0029506359715014696, -0.017524417489767075, 0.032612789422273636, -0.063601553440094, 0.057596415281295776, -0.007487534079700708, -0.017250599339604378, 0.02079136297106743, -0.03669175133109093, -0.04146942123770714, -0.005580242723226547, 0.008422295562922955, -0.04709687456488609, 0.06345047801733017, 0.004749343730509281, -0.07742469012737274, 0.04452864080667496, 0.014096958562731743, 0.013624857179820538, 0.03253725543618202, -0.008025730028748512, -0.0041922638192772865, 0.007648048922419548, -0.02656988799571991, -0.05313977599143982, -0.008422295562922955, 0.006278953514993191, -0.007232598960399628, -0.006916291080415249, 0.03882564976811409, 0.04736125096678734, -0.013181081041693687, -0.0276840478181839, 0.03786256164312363, -0.0072609251365065575, -0.09411820769309998, -0.030271165072917938, 0.006571656558662653, 0.008474227041006088, 0.00643946835771203, 0.01838364265859127, 0.01578708365559578, 0.0057832468301057816, -0.07976631820201874, -0.01372871920466423, 0.02137676812708378, 0.011321000754833221, 0.0063308849930763245, 0.020111534744501114, -0.05804963409900665, 0.030629962682724, -0.030648846179246902, -0.0008338497718796134, -0.020829129964113235, -0.012557907029986382, 0.012803399935364723, -0.031441979110240936, 0.0279861930757761, 0.036200765520334244, 0.010169072076678276, -0.011321000754833221, 0.0064253052696585655, 0.044037654995918274, 0.003059219568967819, 0.02809949778020382, -0.023000799119472504, 0.07742469012737274, 0.03227287903428078, 0.0006815969245508313, 0.05332861468195915, -0.016278069466352463, -0.024832554161548615, -0.03905225917696953, -0.013114986941218376, 0.040676288306713104, -0.033594761043787, 0.008271222934126854, -0.008087103255093098, -0.028609367087483406, -0.033198196440935135, -0.004803635645657778, 0.014861763454973698, -0.02910035289824009, 0.0027075037360191345, -0.021131275221705437, -0.01950724609196186, 0.0014835798647254705, -0.02079136297106743, 0.04441533610224724, -0.01219910942018032, -0.002957717515528202, -0.09562893211841583, -0.000621994084212929, -0.0006166829261928797, 0.01950724609196186, 0.08052168041467667, 0.09411820769309998, 0.03669175133109093, 0.08784870058298111, 0.025059161707758904, 0.05903160572052002, -0.029270309954881668, -0.04430203139781952, 0.031064296141266823, -0.058465082198381424, -0.00874804612249136, 0.008582809939980507, -0.011859196238219738, 0.04105396941304207, -0.02945915050804615, 0.01749609224498272, -0.03523767739534378, 0.04146942123770714, -0.04207371175289154, 0.03193296492099762, 0.011151043698191643, 0.014087516814470291, 0.0471346415579319, -0.04894751310348511, 0.024435987696051598, -0.011755334213376045, -0.014805112034082413, -0.043508898466825485, 0.04101620241999626, 0.023529551923274994, -0.025644568726420403, -0.009914137423038483, -0.017751026898622513, 0.04373550787568092, -0.007548907306045294, -0.019998231902718544, -0.006217580288648605, 0.033028241246938705, 0.018544157966971397, 0.003156000282615423, 0.032726094126701355, -0.03021451272070408, -0.032367296516895294, -0.0034180169459432364, 0.08293884247541428, 0.06311056762933731, 0.01920510083436966, 0.0011967780301347375, 0.0033519226126372814, -0.030252281576395035, 0.0274007860571146, -0.05672774836421013, -0.02362397313117981, 0.03752264752984047, -0.024813668802380562, -0.04422649368643761, -0.02904370054602623, 0.03310377523303032, 0.022830842062830925, -0.011179369874298573, -0.016476351767778397, -0.015126140788197517, -0.004279602784663439, 0.053404152393341064, -0.0023970967158675194, 0.018572483211755753, 0.029421381652355194, -0.007308135274797678, -0.01626862771809101, 0.03965654969215393, -0.031441979110240936, -0.03204626962542534, 0.005212003365159035, -0.06382816284894943, 0.008667788468301296, 0.01785488985478878, -0.006892685778439045, 0.02014930360019207, 0.012387950904667377, -0.0061042760498821735, -0.00015623618673998863, -0.014370777644217014, 0.005778525490313768, 0.04207371175289154, 0.00478711212053895, -0.07440324127674103, -0.048229917883872986, -0.011557050980627537, 0.014767343178391457, -0.002934112446382642, -0.023435132578015327, -0.048154380172491074, -0.012690095230937004, 0.017184505239129066, 0.04664365574717522, -0.026324395090341568, -0.009914137423038483, 0.021357884630560875, 0.02940249815583229, 0.03129090368747711, 0.019337289035320282, 0.02237762324512005, -0.011878080666065216, 0.06277064979076385, 0.012945030815899372, -0.03848573565483093, -0.030308933928608894, -0.014729575254023075, 0.05797409638762474, -0.0009560061153024435, -0.013643741607666016, 0.022585349157452583, 0.02428491599857807, -0.057180967181921005, -0.0318196602165699, -0.0636393204331398, -0.047399017959833145, 0.03722050413489342, -0.055708009749650955, -0.02132011577486992, 0.030837688595056534, -0.06953115016222, 0.025493495166301727, 0.01755274459719658, 0.014540734700858593, -0.060013577342033386, 0.040978435426950455, 0.02745743840932846, -0.006647192873060703, 0.013067777268588543, 0.05461273342370987, -0.03021451272070408, -0.03132867440581322, -0.027060873806476593, -0.040865130722522736, -0.07232598960399628, -0.0536307618021965, 0.018884070217609406, 0.010461775586009026, -0.01967720128595829, 0.0010775723494589329, -0.0167973805218935, -0.04188486933708191, 0.020281491801142693, -0.014587944373488426, -0.017807679250836372, -0.06945561617612839, -0.031120948493480682, -0.03901449218392372, -0.030592195689678192, 0.00856864731758833, 0.06975775957107544, -0.02874155528843403, -0.010150187648832798, -0.030384469777345657, -0.028193917125463486, 0.021357884630560875, 0.03304712474346161, -0.011547609232366085, 0.004643120802938938, -0.04864536598324776, 0.00017689063679426908, -0.019601665437221527, -0.007917147129774094, -0.01678793877363205, 0.02757074311375618, 0.021716682240366936, 0.006042902823537588, -0.011594819836318493, 0.05019386112689972, -0.05710542947053909, -0.06258180737495422, 0.03344368934631348, -0.05548140034079552, 0.03310377523303032, -0.0018199523910880089, 0.02904370054602623, 0.019280636683106422, -0.026966452598571777, 0.02751409076154232, -0.03570977970957756, -0.020829129964113235, 0.06031572073698044, -0.07376118004322052, 0.06337494403123856, 0.024851437658071518, 0.014295241795480251, -0.005093978252261877, 0.05038269981741905, 0.03493553027510643, 0.0019556814804673195, 0.013266059570014477, -0.006208138540387154, 0.021490072831511497, 0.010537311434745789, -0.04041191190481186, 0.041205041110515594, -0.005962645169347525, -0.02326517552137375, -0.0054527753964066505, 0.13339707255363464, 0.016476351767778397, 0.024908090010285378, -0.057936329394578934, -0.05366852879524231, -0.06994660198688507, 0.0033660857006907463, -0.032310646027326584, 0.004220589995384216, 0.024832554161548615, -0.003278746735304594, 0.05585908144712448, 0.04316898435354233, 0.018931280821561813 ]
716,360
pytorch_optimizer.optimizer.diffgrad
DiffGrad
An Optimization Method for Convolutional Neural Networks. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param rectify: bool. perform the rectified update similar to RAdam. :param n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: bool. degenerated to SGD. :param ams_bound: bool. whether to use the AMSBound variant. :param r: float. EMA factor. between 0.9 ~ 0.99 is preferred. :param adanorm: bool. whether to use the AdaNorm variant. :param adam_debias: bool. Only correct the denominator to avoid inflating step sizes early in training. :param eps: float. term added to the denominator to improve numerical stability.
class DiffGrad(Optimizer, BaseOptimizer): r"""An Optimization Method for Convolutional Neural Networks. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param fixed_decay: bool. fix weight decay. :param rectify: bool. perform the rectified update similar to RAdam. :param n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: bool. degenerated to SGD. :param ams_bound: bool. whether to use the AMSBound variant. :param r: float. EMA factor. between 0.9 ~ 0.99 is preferred. :param adanorm: bool. whether to use the AdaNorm variant. :param adam_debias: bool. Only correct the denominator to avoid inflating step sizes early in training. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, rectify: bool = False, n_sma_threshold: int = 5, degenerated_to_sgd: bool = True, ams_bound: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') self.n_sma_threshold = n_sma_threshold self.degenerated_to_sgd = degenerated_to_sgd defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'rectify': rectify, 'ams_bound': ams_bound, 'adanorm': adanorm, 'adam_debias': adam_debias, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults) def __str__(self) -> str: return 'diffGrad' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['previous_grad'] = torch.zeros_like(p) if group['ams_bound']: state['max_exp_avg_sq'] = torch.zeros_like(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=p.dtype, device=p.device) @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] step_size, n_sma = self.get_rectify_step_size( is_rectify=group['rectify'], step=group['step'], lr=group['lr'], beta2=beta2, n_sma_threshold=self.n_sma_threshold, degenerated_to_sgd=self.degenerated_to_sgd, ) step_size = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=step_size, bias_correction1=bias_correction1, ) for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['previous_grad'] = torch.zeros_like(p) if group['ams_bound']: state['max_exp_avg_sq'] = torch.zeros_like(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) s_grad = self.get_adanorm_gradient( grad=grad, adanorm=group['adanorm'], exp_grad_norm=state.get('exp_grad_norm', None), r=group.get('r', None), ) exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq'] exp_avg.mul_(beta1).add_(s_grad, alpha=1.0 - beta1) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) de_nom = self.apply_ams_bound( ams_bound=group['ams_bound'], exp_avg_sq=exp_avg_sq, max_exp_avg_sq=state.get('max_exp_avg_sq', None), eps=group['eps'], ) # compute diffGrad coefficient (dfc) dfc = state['previous_grad'].clone() dfc.sub_(grad).abs_().sigmoid_().mul_(exp_avg) state['previous_grad'].copy_(grad) if not group['rectify']: p.addcdiv_(exp_avg, de_nom, value=-step_size) continue self.apply_weight_decay( p=p, grad=None, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) if n_sma >= self.n_sma_threshold: p.addcdiv_(dfc, de_nom, value=-step_size) elif step_size > 0: p.add_(exp_avg, alpha=-step_size) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, rectify: bool = False, n_sma_threshold: int = 5, degenerated_to_sgd: bool = True, ams_bound: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-08)
[ -0.003256900003179908, -0.06754594296216965, 0.0021043792366981506, 0.04400159418582916, -0.013922861777245998, -0.022494735196232796, -0.061207082122564316, -0.0626065731048584, -0.0442897230386734, 0.008726228028535843, -0.028195595368742943, -0.0032851984724402428, 0.03583104535937309, 0.06890427321195602, -0.028421983122825623, 0.0435488186776638, -0.019109204411506653, 0.03939151018857956, 0.014180121012032032, -0.022494735196232796, -0.04243746027350426, -0.07997670769691467, -0.04235513508319855, 0.034102264791727066, -0.039988353848457336, -0.010876914486289024, 0.040276482701301575, -0.018677009269595146, -0.042272813618183136, 0.016217613592743874, -0.013634731993079185, -0.07701308280229568, 0.00969352200627327, -0.011854498647153378, 0.005273811519145966, -0.08528653532266617, 0.008067645132541656, 0.005417876411229372, -0.10603190213441849, -0.032867420464754105, 0.012585114687681198, -0.0397208034992218, 0.04184061661362648, -0.013109923340380192, 0.006827656179666519, 0.01856381632387638, -0.040729258209466934, 0.027989787980914116, -0.04321952536702156, -0.016968809068202972, 0.03354658558964729, -0.07602520287036896, 0.03578988462686539, 0.0358927883207798, 0.006915124133229256, 0.057996489107608795, 0.05276898294687271, 0.004471162799745798, 0.039597317576408386, -0.0755724310874939, 0.04235513508319855, -0.07227951288223267, 0.03488433361053467, -0.013583280146121979, -0.01604267582297325, -0.014066927134990692, -0.06038385257124901, -0.024326419457793236, 0.011926530860364437, 0.018532944843173027, 0.005808910354971886, -0.02175382897257805, 0.026281587779521942, -0.008849713020026684, -0.017380423843860626, -0.005942685063928366, -0.020282305777072906, -0.02696075290441513, -0.010491025634109974, -0.05297479033470154, 0.0210129227489233, 0.03259987011551857, -0.0027012203354388475, 0.0035038688220083714, 0.05091672018170357, -0.04848819226026535, -0.016505742445588112, -0.010027959011495113, -0.005320117808878422, -0.0640883818268776, 0.026302170008420944, -0.013068761676549911, 0.04122319445014, 0.03305264934897423, 0.046018507331609726, 0.02809269167482853, -0.04988768324255943, -0.02702249400317669, 0.014735800214111805, -0.019057752564549446, 0.016536613926291466, 0.04212874919176102, -0.00044441508362069726, 0.05206923931837082, 0.03237348422408104, -0.06404722481966019, -0.024717453867197037, -0.039741385728120804, 0.04766496270895004, -0.06009572371840477, -0.04466017708182335, 0.006241105496883392, -0.015939773991703987, -0.016660097986459732, -0.02428525872528553, 0.0048210350796580315, 0.0011853212490677834, 0.013593570329248905, -0.02152744121849537, 0.031426768749952316, 0.04840587079524994, 0.019212108105421066, -0.055938415229320526, 0.03237348422408104, 0.0213833749294281, -0.01595006324350834, 0.04107913002371788, 0.030274249613285065, 0.029677407816052437, -0.04212874919176102, -0.0022432992700487375, 0.005345843732357025, -0.026528557762503624, 0.0031925851944833994, 0.045318759977817535, -0.015548739582300186, -0.003915483132004738, 0.04873516038060188, -0.025293713435530663, 0.010547623038291931, 0.020199984312057495, 0.03422575071454048, 0.003254327457398176, -0.003172004595398903, -0.006307992618530989, -0.0035373123828321695, 0.014982769265770912, 0.03093283250927925, -0.01779203861951828, 0.02817501500248909, -0.002719228621572256, 0.0175553597509861, 0.005474473349750042, -0.011031270027160645, 0.02887476049363613, -0.007141512352973223, -0.04338417202234268, 0.02811327390372753, -0.02259763889014721, -0.006446912884712219, -0.03976196423172951, -0.04293139651417732, 0.0024015135131776333, -0.02076595276594162, 0.029512763023376465, -0.007656030356884003, 0.017452456057071686, 0.03758040815591812, -0.0534275658428669, 0.03803318366408348, 0.0190989151597023, -0.060136884450912476, 0.0011325831292197108, 0.013768506236374378, -0.051122527569532394, 0.11656923592090607, 0.031344447284936905, 0.014396218582987785, -0.016835033893585205, -0.009724393486976624, 0.03383471444249153, -0.004995971452444792, -0.021568601951003075, -0.04560689255595207, -0.013377472758293152, 0.015301770530641079, -0.014529992826282978, 0.0005997352418489754, 0.0003350799670442939, 0.015270899049937725, 0.00130366045050323, -0.045154113322496414, 0.018893107771873474, -0.027969207614660263, -0.019459078088402748, 0.015301770530641079, -0.006179363466799259, 0.0011518775718286633, 0.11500510573387146, 0.035007815808057785, -0.023708997294306755, -0.0007994326297193766, 0.008314613252878189, -0.014221282675862312, -0.017894942313432693, -0.02222718484699726, -0.01610441878437996, 0.013809667900204659, 0.012821792624890804, 0.004442864563316107, -0.05565028637647629, 0.010671107098460197, 0.03788911923766136, 0.05811997130513191, 0.04992884397506714, -0.04544224590063095, 0.05408615246415138, 0.04190235957503319, 0.043631140142679214, 0.008870293386280537, 0.005706006661057472, -0.07602520287036896, -0.006652719806879759, -0.01939733512699604, 0.05359221249818802, -0.02146569825708866, 0.02955392375588417, -0.0005289890104904771, -0.002853003330528736, -0.017009971663355827, 0.03525478392839432, -0.057379066944122314, 0.011854498647153378, -0.008504985831677914, 0.06779291480779648, 0.03482259064912796, -0.03527536615729332, 0.003166859271004796, 0.005417876411229372, -0.014005185104906559, -0.03406110405921936, -0.004823607858270407, -0.005433312151581049, 0.05923133343458176, 0.013428924605250359, -0.02115698717534542, 0.08331078290939331, 0.01256453339010477, -0.03292916342616081, 0.020632179453969002, -0.024223515763878822, -0.025334874168038368, -0.03136502951383591, 0.0519045926630497, -0.06890427321195602, -0.004288509022444487, 0.05145181715488434, 0.05437428131699562, 0.028216177597641945, -0.06993331015110016, 0.025231970474123955, -0.04544224590063095, -0.06935705244541168, 0.04239629581570625, -0.01763768307864666, 0.04445436969399452, 0.07392597198486328, -0.035234205424785614, -0.006513800006359816, 0.029986118897795677, 0.06519974023103714, 0.07528430223464966, -0.0954122468829155, 0.00421647634357214, -0.00886000320315361, 0.04060577601194382, 0.014550574123859406, -0.0036093450617045164, 0.020189693197607994, 0.0043065170757472515, 0.04293139651417732, -0.05704977363348007, -0.04680057242512703, 0.010244056582450867, -0.03836247697472572, 0.044330887496471405, -0.02428525872528553, -0.028586629778146744, 0.037909697741270065, 0.020560145378112793, 0.05083439499139786, 0.0006039157160557806, 0.08602743595838547, -0.005122028291225433, 0.05742022767663002, 0.02687842957675457, 0.02566416747868061, 0.025787651538848877, -0.03313497081398964, 0.004280791152268648, 0.04085274413228035, -0.005870652385056019, 0.04597734287381172, 0.015023930929601192, -0.06363561004400253, -0.04634779691696167, 0.006097040604799986, -0.0008322331705130637, 0.06063082069158554, -0.012276403605937958, -0.026919590309262276, 0.0037328293547034264, 0.003115407656878233, 0.023029834032058716, 0.0027681076899170876, -0.08022367209196091, -0.006956285797059536, -0.04474250227212906, 0.04671825096011162, 0.0725676417350769, -0.039288606494665146, 0.05231620743870735, 0.009029793553054333, -0.0034652799367904663, -0.019304722547531128, -0.04367230087518692, 0.05766719579696655, 0.023338545113801956, 0.009997088462114334, -0.012091177515685558, -0.07392597198486328, -0.04206700623035431, 0.04167597368359566, 0.013552408665418625, -0.02969798818230629, -0.023647256195545197, 0.02566416747868061, -0.013007019646465778, -0.00393349165096879, -0.04873516038060188, 0.05589725449681282, 0.050587426871061325, -0.04023532196879387, 0.04132609814405441, 0.018069878220558167, -0.04184061661362648, 0.0435488186776638, 0.01894455961883068, 0.007393626030534506, 0.01741129532456398, -0.025993458926677704, 0.0035964820999652147, -0.01711287535727024, 0.10331524908542633, 0.0572967454791069, 0.0014560864074155688, -0.019428206607699394, -0.025705328211188316, 0.05128717049956322, -0.06960401684045792, -0.03323787450790405, 0.041346680372953415, -0.03918570280075073, 0.05289246886968613, 0.06902775913476944, -0.006354299373924732, -0.02580823190510273, -0.06746362149715424, 0.014457960613071918, -0.043260689824819565, 0.009184149093925953, -0.05322175845503807, 0.004797881934791803, -0.025684747844934464, -0.0465947650372982, -0.02969798818230629, -0.0389387346804142, -0.0016683251596987247, 0.04260210320353508, 0.05029929801821709, 0.020714500918984413, 0.010557913221418858, -0.01042928360402584, 0.05552680045366287, 0.045689214020967484, -0.02490267902612686, 0.022844607010483742, -0.02879243716597557, 0.06363561004400253, -0.057543713599443436, 0.03338193893432617, 0.00935394037514925, -0.006488074082881212, 0.008299178443849087, -0.08578047156333923, 0.033772971481084824, 0.032496966421604156, 0.05235736817121506, -0.07985322177410126, -0.03467852622270584, -0.03229115903377533, -0.01008455641567707, 0.016690969467163086, 0.012955567799508572, -0.02457338757812977, -0.06655807048082352, 0.03634556382894516, 0.05923133343458176, -0.010223476216197014, 0.08849712461233139, -0.02741352841258049, 0.017277520149946213, -0.04626547545194626, 0.041490744799375534, -0.014303605072200298, -0.02986263483762741, -0.036160338670015335, -0.00498310849070549, -0.008021337911486626, 0.016546905040740967, 0.03961789980530739, 0.013840539380908012, 0.044865984469652176, 0.023009253665804863, 0.007887563668191433, -0.011093012057244778, -0.07540778070688248, 0.008180839009582996, -0.09483598917722702, -0.02825733833014965, 0.018296265974640846, 0.005541360937058926, -0.013686183840036392, -0.01703055202960968, -0.00958032812923193, 0.0016258774558082223, -0.010557913221418858, 0.05021697282791138, 0.053262922912836075, -0.014437380246818066, 0.01887252740561962, -0.030727025121450424, 0.04147016629576683, -0.009410537779331207, -0.005106593016535044, -0.04626547545194626, 0.024799775332212448, -0.03572814166545868, -0.08005902916193008, -0.013367182575166225, 0.03961789980530739, 0.01885194517672062, 0.041881781071424484, 0.008453533984720707, -0.01894455961883068, -0.01015658862888813, 0.008829131722450256, -0.030191926285624504, -0.003295488888397813, 0.016299935057759285, -0.00039328483399003744, 0.02572590857744217, -0.04918793588876724, 0.03327903524041176, -0.025478940457105637, 0.0397002212703228, 0.09113145619630814, -0.008345484733581543, -0.0187078807502985, 0.030191926285624504, 0.005531070288270712, -0.02589055523276329, 0.008618179708719254, -0.023914804682135582, -0.05173994600772858, 0.005459037609398365, -0.025293713435530663, -0.005273811519145966, -0.0022613073233515024, -0.0050860121846199036, 0.030603541061282158, -0.07207370549440384, 0.017575940117239952, 0.04009125754237175, 0.017905233427882195, 0.016238193958997726, 0.0020580727141350508, 0.009420827962458134, -0.005927249323576689, 0.03601627051830292, -0.07376132905483246, -0.0695216953754425, 0.046018507331609726, 0.038074344396591187, -0.06664039194583893, -0.04671825096011162, 0.016907067969441414, -0.005325262900441885, 0.07746585458517075, -0.04342533275485039, 0.020570436492562294, -0.01802871748805046, -0.045401085168123245, -0.010444719344377518, 0.042190492153167725, -0.02772223949432373, -0.07038608938455582, 0.03655137121677399, -0.03245580568909645, 0.01202943455427885, -0.044166240841150284, -0.021403955295681953, 0.04466017708182335, 0.02803095057606697, -0.0020580727141350508, -0.05437428131699562, 0.000941568287089467, 0.035933949053287506, 0.028751276433467865, -0.04144958406686783, 0.020899727940559387, 0.030377153307199478, -0.03914454206824303, -0.04122319445014, 0.03239406272768974, 0.036386724561452866, -0.007023172918707132, -0.013830248266458511, 0.05029929801821709, -0.012399887666106224, -0.0015023930463939905, -0.006657865364104509, 0.05173994600772858, 0.04873516038060188, -0.004033822566270828, -0.011813336983323097, 0.010876914486289024, -0.045689214020967484, -0.11821569502353668, -0.029800891876220703, -0.0009171286365017295, 0.005834636278450489, 0.01034696027636528, -0.024532226845622063, -0.04169655218720436, 0.05243969336152077, 0.01080488134175539, 0.03375239297747612, -0.032949745655059814, -0.021198147907853127, -0.01763768307864666, 0.030191926285624504, -0.013634731993079185, 0.03560465946793556, 0.01042928360402584, 0.02068363130092621, -0.03696298599243164, 0.022206604480743408, 0.03556349501013756, -0.004826180636882782, -0.04107913002371788, -0.057831842452287674, 0.014324186369776726, -0.03809492662549019, 0.002642050851136446, 0.03865060582756996, 0.037456922233104706, -0.006873962935060263, -0.06956285983324051, 0.03146793320775032, -0.020632179453969002, -0.017812618985772133, -0.0010354678379371762, -0.0002601532614789903, -0.039288606494665146, 0.011823628097772598, 0.014036055654287338, -0.012893825769424438, -0.0005498913233168423, -0.03144735097885132, 0.06170101836323738, -0.02879243716597557, -0.017678843811154366, -0.021794989705085754, 0.03070644475519657, 0.055691447108983994, -0.06318283081054688, 0.04239629581570625, 0.015528158284723759, 0.004697551019489765, -0.04610082879662514, 0.02811327390372753, -0.026302170008420944, -0.05704977363348007, -0.029800891876220703, 0.05597957596182823, -0.03266161307692528, 0.02160976268351078, 0.02755759283900261, 0.04223165288567543, -0.03618091717362404, -0.02121873013675213, 0.06017804518342018, -0.025787651538848877, 0.006596122868359089, -0.018378589302301407, 0.007434787694364786, 0.00915842317044735, 0.03319671377539635, -0.041264358907938004, -0.0048210350796580315, -0.012379307299852371, -0.003349513281136751, -0.020879147574305534, -0.032496966421604156, -0.03235290199518204, -0.015939773991703987, 0.036242660135030746, 0.08792086690664291, 0.032270580530166626, -0.001215549185872078, 0.015445835888385773, -0.02144511789083481, 0.020107369869947433, -0.003033084562048316, -0.016680678352713585, 0.03202361240983009, -0.0664757490158081, -0.025520101189613342, -0.04007067531347275, -0.01191624067723751, 0.011936821974813938, 0.03101515583693981, -0.04019416123628616, 0.034781429916620255, 0.0017828054260462523, 0.06836917251348495, 0.00870050210505724, -0.03780679404735565, -0.01924297958612442, 0.0073113031685352325, 0.010866624303162098, -0.009096681140363216, 0.00939510203897953, -0.03385529667139053, -0.00391291081905365, -0.0009460703004151583, 0.005947830155491829, 0.055691447108983994, 0.04902329295873642, -0.0032131660263985395, 0.05276898294687271, -0.053633373230695724, -0.03788911923766136, -0.010228621773421764, 0.013583280146121979, 0.0022831743117421865, 0.039350349456071854, 0.007954451255500317, -0.02383248135447502, -0.0035759012680500746, 0.0014509411994367838, 0.002621470019221306, -0.0009177717729471624, -0.023091575130820274, 0.006138201802968979, -0.006431477144360542, 0.038609445095062256, 0.041943520307540894, 0.015486996620893478, -0.0984582006931305, -0.02901882492005825, -0.0503816194832325, 0.025231970474123955, 0.003773990785703063, -0.011123882606625557, 0.05128717049956322, -0.03093283250927925, -0.00924589205533266, -0.016073547303676605, 0.034164007753133774, 0.07771282643079758, -0.006333718542009592, 0.00780524080619216, 0.0328262597322464, -0.007836111821234226, -0.02115698717534542, 0.0021931338123977184, 0.037004146724939346, 0.010223476216197014, -0.04671825096011162, -0.008808551356196404, 0.019520819187164307, -0.023462029173970222, 0.03480200842022896, -0.07318506389856339, -0.044083915650844574, -0.0164028387516737, -0.01686590537428856, -0.06203031167387962, -0.0071363672614097595, -0.023400286212563515, -0.044413208961486816, 0.0210129227489233, 0.04552456736564636, 0.04869399964809418, 0.011185625568032265, -0.008119096979498863, 0.002217573346570134, -0.028771856799721718, 0.006251395680010319, 0.011967692524194717, 0.02617868408560753, 0.02290634997189045, 0.043343011289834976, -0.011792756617069244, 0.02718714065849781, -0.02864837273955345, -0.034555040299892426, 0.05614422261714935, -0.028751276433467865, 0.030274249613285065, 0.04305488243699074, 0.014262443408370018, -0.049352582544088364, -0.04167597368359566, 0.03169431909918785, -0.03560465946793556, 0.0213833749294281, -0.027207721024751663, 0.030665284022688866, 0.02910114824771881, 0.006107330787926912, 0.007151802536100149, -0.015486996620893478, -0.0015589901013299823, 0.04449553042650223, 0.00006230493454495445, -0.02015882171690464, 0.049064453691244125, 0.007218690123409033, 0.019037172198295593, -0.05482705682516098, -0.006822511088103056, -0.02282402664422989, 0.039741385728120804, -0.021403955295681953, -0.025602424517273903, 0.0097398292273283, -0.05787300318479538, 0.07466688007116318, -0.01694822870194912, 0.016680678352713585, 0.035707563161849976, 0.05840810388326645, -0.03445213660597801, 0.02381190098822117, -0.057543713599443436, -0.05762603506445885, -0.07503733038902283, 0.04680057242512703, -0.024449903517961502, 0.054785896092653275, 0.00909153651446104, -0.003411255544051528, 0.014293314889073372, -0.002224004827439785, 0.0036865228321403265 ]
716,362
pytorch_optimizer.optimizer.diffgrad
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, rectify: bool = False, n_sma_threshold: int = 5, degenerated_to_sgd: bool = True, ams_bound: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') self.n_sma_threshold = n_sma_threshold self.degenerated_to_sgd = degenerated_to_sgd defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'rectify': rectify, 'ams_bound': ams_bound, 'adanorm': adanorm, 'adam_debias': adam_debias, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, rectify: bool = False, n_sma_threshold: int = 5, degenerated_to_sgd: bool = True, ams_bound: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-08)
[ 0.007275568321347237, -0.036022357642650604, -0.025158774107694626, 0.00762631231918931, -0.03642050176858902, -0.030315658077597618, -0.09722244739532471, -0.026277363300323486, -0.04235471040010452, 0.023528287187218666, -0.04595694690942764, 0.06484024226665497, 0.025651711970567703, 0.06294433027505875, -0.06669823825359344, 0.05919042229652405, 0.023414533585309982, 0.025746507570147514, -0.018854860216379166, -0.008095551282167435, 0.006896385923027992, -0.000007827124136383645, -0.05062089487910271, 0.09873917698860168, 0.016010990366339684, 0.04231679067015648, -0.0067304931581020355, 0.0009538815356791019, -0.03858184069395065, 0.016902070492506027, 0.009185701608657837, -0.02493126317858696, -0.000726371887139976, 0.04629820957779884, 0.030467331409454346, -0.025822343304753304, -0.018437759950757027, 0.005858372896909714, -0.1224001795053482, 0.03289410099387169, 0.052478887140750885, -0.03264763206243515, 0.09145887196063995, -0.033462874591350555, -0.0192056056112051, -0.015271584503352642, 0.027718257158994675, 0.03905582055449486, -0.009441649541258812, -0.023035351186990738, 0.03327328339219093, -0.028173275291919708, 0.020286275073885918, -0.00026290988898836076, -0.06025213375687599, 0.06965586543083191, 0.03668592870235443, 0.07856666296720505, 0.05312350019812584, -0.006005306262522936, 0.019584788009524345, -0.029197068884968758, 0.024552080780267715, -0.004019336774945259, -0.007109676022082567, -0.00018203732906840742, -0.0911555290222168, -0.02201155759394169, 0.008536350913345814, 0.037747640162706375, 0.10829458385705948, 0.0005755875026807189, -0.011659868992865086, 0.04144467040896416, -0.006474544759839773, 0.01838088221848011, -0.08319269120693207, -0.04997628182172775, -0.043492257595062256, -0.013991842046380043, 0.06787370890378952, 0.055474430322647095, -0.00826618354767561, -0.0493316724896431, -0.004957814235240221, -0.05611904338002205, -0.024988140910863876, -0.0445539690554142, 0.014560616575181484, -0.01789742521941662, -0.04053463414311409, -0.0050336504355072975, 0.020892968401312828, 0.0021435674279928207, 0.05232721567153931, 0.005645082797855139, 0.007503077853471041, -0.06089674308896065, 0.014465820975601673, -0.013546302914619446, -0.03676176443696022, 0.0011659868760034442, -0.04235471040010452, 0.017982739955186844, 0.02407810278236866, -0.0227888822555542, -0.0431889109313488, -0.030543169006705284, 0.03232532739639282, -0.04842163249850273, -0.029519375413656235, 0.052478887140750885, -0.0358896441757679, 0.02732011489570141, -0.0704142302274704, 0.0053986138664186, 0.017802629619836807, 0.01405819971114397, -0.008005495183169842, 0.014304667711257935, 0.04076214134693146, 0.022826800122857094, -0.035339828580617905, 0.04224095493555069, 0.04637404531240463, -0.010427525267004967, 0.011972694657742977, 0.017101140692830086, 0.014228831976652145, -0.03395581245422363, 0.029367702081799507, -0.019253002479672432, -0.01986917480826378, -0.01833348535001278, 0.01830504648387432, -0.0352071151137352, 0.026068812236189842, 0.0510379932820797, -0.027907848358154297, 0.004763483069837093, 0.06510567665100098, 0.013555781915783882, 0.03505544364452362, -0.030543169006705284, -0.012494070455431938, -0.0013318792916834354, -0.009451129473745823, -0.015119911171495914, -0.012996487319469452, 0.037140946835279465, 0.021461741998791695, -0.003320218762382865, -0.012674182653427124, 0.03742533549666405, 0.004891457036137581, -0.05619487911462784, 0.027718257158994675, -0.01529054343700409, -0.013072323985397816, 0.01774575188755989, -0.042468465864658356, 0.005592945031821728, 0.026789259165525436, -0.0489904060959816, -0.0033533971291035414, 0.015461175702512264, -0.032003022730350494, 0.013385149650275707, -0.01774575188755989, -0.009659679606556892, -0.004761112853884697, -0.08258599787950516, -0.06370269507169724, 0.016513407230377197, -0.030998187139630318, 0.05801495537161827, 0.029519375413656235, 0.008972411043941975, -0.025158774107694626, -0.018399842083454132, 0.06468857079744339, -0.004332162439823151, -0.014901881106197834, -0.07644324004650116, 0.00653142249211669, 0.004002747591584921, -0.0236420426517725, 0.035681094974279404, -0.030543169006705284, 0.026201525703072548, 0.061048418283462524, -0.008602707646787167, 0.01908237114548683, 0.01135652232915163, -0.012418233789503574, 0.006194897927343845, 0.02826807089149952, -0.024988140910863876, 0.008531611412763596, 0.05244097113609314, 0.07481274753808975, 0.03460042178630829, 0.011726225726306438, -0.026030894368886948, 0.02656175009906292, -0.007076497655361891, -0.02003980614244938, 0.0013235847000032663, -0.015328461304306984, -0.014664892107248306, -0.017195936292409897, -0.038354333490133286, 0.050848402082920074, 0.03408852592110634, 0.012693141587078571, -0.044212706387043, 0.0063702696934342384, 0.032780345529317856, 0.025898179039359093, 0.008332540281116962, 0.0802350640296936, -0.03528295084834099, -0.02561379224061966, -0.013754853047430515, 0.04019336774945259, 0.015603369101881981, 0.02760450169444084, -0.049066245555877686, -0.05767369270324707, 0.005896291229873896, -0.007251869421452284, -0.04633612930774689, -0.025689629837870598, -0.018172331154346466, 0.009100385010242462, 0.00490567646920681, -0.016911549493670464, 0.02826807089149952, -0.08357187360525131, -0.044212706387043, 0.03693239763379097, 0.041861772537231445, 0.000224991628783755, 0.010854105465114117, 0.018617872148752213, -0.012920651584863663, 0.026258403435349464, 0.012996487319469452, -0.04978669062256813, -0.035358790308237076, -0.0328182652592659, -0.023509329184889793, -0.006526682525873184, 0.05361643806099892, -0.041255079209804535, -0.0060669234953820705, 0.042468465864658356, 0.014361545443534851, 0.02732011489570141, -0.010285330936312675, 0.0018959136214107275, -0.006275474093854427, -0.029500415548682213, 0.06108633801341057, 0.0012430083006620407, 0.03333016112446785, -0.0052185021340847015, 0.0028367608319967985, 0.0222769845277071, -0.003438713261857629, 0.08948712050914764, 0.041520506143569946, -0.03547254204750061, -0.002604511333629489, -0.017442405223846436, 0.009868230670690536, 0.0012145696673542261, -0.04337850213050842, -0.006161719094961882, 0.0483078770339489, 0.043568093329668045, -0.027452828362584114, 0.03427811712026596, 0.026163607835769653, 0.007318226620554924, 0.005701960064470768, -0.02108255960047245, -0.012702621519565582, 0.0031282573472708464, 0.00949378777295351, -0.016665080562233925, 0.011640909127891064, 0.07098300755023956, 0.012048531323671341, 0.10321353375911713, -0.015555971302092075, 0.04887665435671806, -0.018143892288208008, 0.04895249009132385, -0.01813441328704357, 0.05786328390240669, -0.040913816541433334, 0.06161719188094139, 0.007318226620554924, -0.06203429400920868, -0.03488481044769287, 0.037311580032110214, 0.011877899058163166, 0.032003022730350494, 0.03194614499807358, 0.015830878168344498, 0.043492257595062256, 0.07978004217147827, 0.0023189394269138575, 0.047170329838991165, -0.05740826204419136, 0.0017181717557832599, -0.058924995362758636, 0.03118777833878994, 0.054981496185064316, -0.021366946399211884, 0.01340410951524973, 0.020020848140120506, -0.03924541175365448, -0.03681864216923714, -0.0588112398982048, 0.017347609624266624, 0.01405819971114397, -0.02912123315036297, -0.015072513371706009, -0.03719782456755638, -0.020627539604902267, 0.023187022656202316, -0.03092235140502453, -0.046563636511564255, 0.009541185572743416, -0.0019468662794679403, 0.039700429886579514, 0.002599771600216627, -0.03715990483760834, 0.09274809062480927, -0.00844629481434822, -0.010598156601190567, 0.06912501156330109, -0.009015069343149662, -0.023016391322016716, 0.024229776114225388, -0.02999335341155529, 0.027642419561743736, -0.00026246553170494735, -0.011565073393285275, 0.02201155759394169, -0.0028912683483213186, 0.11656076461076736, 0.04140675440430641, -0.007645271718502045, -0.0072186910547316074, 0.01704426296055317, 0.028912682086229324, -0.05346476286649704, -0.01876954548060894, 0.0015084362821653485, -0.03816474229097366, 0.04637404531240463, 0.013176599517464638, -0.012494070455431938, -0.024533122777938843, -0.034865852445364, 0.03854392468929291, -0.019120289012789726, 0.01083514653146267, -0.07924918830394745, -0.02912123315036297, -0.00947008840739727, 0.019831256940960884, -0.003865293925628066, -0.03958667442202568, 0.001455113640986383, 0.03863871842622757, -0.001233528833836317, 0.005896291229873896, 0.011242767795920372, 0.05046921968460083, 0.02877996861934662, 0.024874387308955193, -0.034657299518585205, 0.0107972277328372, 0.012513029389083385, 0.060365889221429825, -0.01928144134581089, 0.0062375557608902454, -0.015186267904937267, 0.011726225726306438, -0.01559388916939497, -0.07541944086551666, 0.021708210930228233, 0.03314056992530823, 0.05543651431798935, -0.056763652712106705, -0.036799684166908264, -0.019101329147815704, -0.05039338394999504, -0.01689258962869644, 0.015906715765595436, -0.02331973798573017, -0.025670669972896576, 0.03205990046262741, 0.02149965986609459, 0.00882547814399004, 0.06681199371814728, -0.00790121965110302, 0.004227887373417616, -0.042278874665498734, -0.009323155507445335, -0.047701187431812286, -0.03187030926346779, 0.00011723559146048501, 0.011707266792654991, 0.011517675593495369, -0.017802629619836807, 0.030391495674848557, 0.022656166926026344, 0.059000831097364426, 0.031396329402923584, 0.06362686306238174, 0.038354333490133286, -0.03958667442202568, 0.005280119366943836, -0.02860933542251587, -0.06650865077972412, -0.028912682086229324, 0.00347900134511292, -0.04944542795419693, -0.028836846351623535, 0.01750876195728779, 0.019926052540540695, -0.029500415548682213, -0.0031661756802350283, 0.010844625532627106, -0.025727547705173492, 0.024286653846502304, -0.06510567665100098, -0.000962176127359271, -0.03435395285487175, -0.04637404531240463, -0.04971085488796234, -0.0012607825919985771, -0.014655412174761295, -0.03992794081568718, -0.029064355418086052, 0.02785097062587738, 0.025007100775837898, 0.04842163249850273, 0.005242201033979654, -0.04110340774059296, -0.03359558805823326, 0.006540901958942413, -0.027907848358154297, 0.024988140910863876, -0.026239443570375443, 0.04360601305961609, -0.016769355162978172, -0.03505544364452362, 0.010778268799185753, -0.018219729885458946, 0.05570194125175476, 0.06908708810806274, -0.028571417555212975, -0.012702621519565582, -0.0067304931581020355, 0.010200015269219875, -0.006365529727190733, 0.037501171231269836, -0.026770299300551414, -0.02098776400089264, 0.016665080562233925, -0.027737215161323547, -0.02398330718278885, -0.03399373218417168, 0.010247413069009781, 0.017461365088820457, -0.042620137333869934, 0.0006280213710851967, 0.08781871944665909, 0.019177166745066643, -0.011147972196340561, -0.047511596232652664, -0.004678166937083006, -0.0023971458431333303, 0.04053463414311409, -0.07268932461738586, -0.024362489581108093, 0.030201904475688934, 0.06696366518735886, -0.03403164818882942, 0.00010634890350047499, 0.02665654569864273, 0.01157455239444971, 0.04087589681148529, -0.011991653591394424, 0.009351593442261219, -0.04849746823310852, -0.06317184120416641, -0.030656922608613968, 0.030884431675076485, -0.02510189637541771, -0.0986633449792862, 0.01001990307122469, -0.03348183259367943, 0.01371693518012762, -0.03101714700460434, -0.004545453004539013, -0.02502605877816677, 0.029671048745512962, -0.01616266369819641, -0.022504493594169617, -0.04398519545793533, 0.042809728533029556, -0.027528665959835052, -0.034145403653383255, 0.04883873462677002, 0.04303723946213722, 0.03547254204750061, -0.02553795650601387, 0.006033745128661394, 0.04371976852416992, 0.00799601525068283, -0.027376992627978325, 0.09608490020036697, 0.025424201041460037, 0.02003980614244938, -0.05191011354327202, -0.037216782569885254, 0.04663947597146034, 0.020703377202153206, 0.06082090735435486, 0.013726414181292057, -0.025310447439551353, -0.04368184879422188, -0.035700052976608276, 0.010787748731672764, 0.02443832717835903, 0.012626784853637218, -0.039472922682762146, -0.025253569707274437, 0.01918664574623108, -0.0236420426517725, 0.05558818578720093, -0.039548758417367935, -0.03321640565991402, 0.04883873462677002, -0.011678827926516533, -0.021537577733397484, 0.0365721732378006, 0.04371976852416992, -0.02519669197499752, -0.0012761869002133608, -0.01662716269493103, 0.05323725566267967, 0.01640913262963295, -0.022125311195850372, -0.005265899933874607, 0.00021714135073125362, -0.000573217635974288, -0.036970313638448715, 0.028400786221027374, 0.032344285398721695, -0.015394818037748337, -0.0680253803730011, 0.021916761994361877, -0.005569246131926775, -0.0025784424506127834, -0.004066734574735165, 0.0030879692640155554, -0.051113829016685486, 0.029064355418086052, -0.0035382488276809454, 0.0022833908442407846, -0.06772203743457794, -0.021366946399211884, 0.02184092439711094, -0.030277740210294724, -0.08008339256048203, -0.0802350640296936, 0.013555781915783882, 0.0072186910547316074, -0.06931459903717041, 0.017707832157611847, -0.013982363045215607, 0.0309413094073534, -0.008166647516191006, 0.04550192505121231, -0.02561379224061966, -0.03374726325273514, -0.049407508224248886, 0.03152904286980629, -0.0033913154620677233, -0.031661756336688995, 0.03378517925739288, 0.058394137769937515, -0.07033839821815491, -0.010465443134307861, 0.018835902214050293, 0.0302587803453207, 0.010522320866584778, -0.010218974202871323, -0.005896291229873896, 0.03905582055449486, 0.02057066187262535, -0.04500898718833923, 0.0001701878645690158, -0.011868419125676155, 0.01850411668419838, -0.03642050176858902, 0.0021340877283364534, -0.04952126368880272, -0.04633612930774689, 0.03033461794257164, 0.11140388250350952, 0.0008721202611923218, 0.027566583827137947, -0.02263720892369747, -0.02750970609486103, 0.040989652276039124, -0.06813913583755493, -0.022732004523277283, 0.013764332979917526, -0.11853251606225967, 0.0038771433755755424, -0.04735992103815079, 0.03446770831942558, -0.02477959170937538, 0.01696842722594738, -0.08698451519012451, 0.014598534442484379, 0.036022357642650604, 0.029064355418086052, 0.047701187431812286, 0.022845758125185966, -0.002162526361644268, 0.033387038856744766, 0.03784243389964104, -0.0025144554674625397, 0.004763483069837093, -0.017271772027015686, -0.0200587660074234, -0.035681094974279404, -0.00645084585994482, 0.052478887140750885, 0.05331309139728546, -0.036799684166908264, 0.061730947345495224, -0.0704142302274704, -0.016342775896191597, 0.0033439176622778177, 0.014304667711257935, 0.011062655597925186, 0.021746128797531128, 0.036704886704683304, -0.025746507570147514, -0.03829745575785637, -0.014295188710093498, 0.038866229355335236, 0.0059342095628380775, 0.002411365043371916, -0.007114415988326073, -0.032268449664115906, 0.005156884901225567, -0.01290169171988964, -0.010465443134307861, -0.05156885087490082, -0.006365529727190733, -0.04224095493555069, 0.02407810278236866, 0.005768317263573408, 0.015641286969184875, -0.044212706387043, -0.06813913583755493, 0.018485156819224358, -0.014124556444585323, 0.04466772451996803, 0.056005287915468216, -0.005517108365893364, -0.06302016973495483, 0.02072233520448208, -0.0022454727441072464, -0.06760828197002411, 0.02057066187262535, -0.016010990366339684, -0.02417289838194847, -0.04917999729514122, -0.013318792916834354, 0.01838088221848011, 0.00011323640501359478, 0.040913816541433334, -0.028514539822936058, -0.06586404144763947, -0.059342097491025925, 0.02117735520005226, -0.01037064753472805, -0.0017786039970815182, -0.01670299842953682, -0.05081048607826233, 0.05926625803112984, -0.03221157193183899, 0.02553795650601387, 0.008820737712085247, 0.01572660356760025, 0.027035728096961975, -0.04527441784739494, 0.033292241394519806, 0.05828038230538368, 0.04106548801064491, -0.05183427780866623, -0.007962836883962154, 0.015641286969184875, 0.016541846096515656, 0.003732579993084073, -0.04337850213050842, 0.016371214762330055, -0.04061046987771988, 0.012200203724205494, 0.03308369219303131, -0.004704235587269068, 0.005578725598752499, -0.06442314386367798, -0.0037065111100673676, 0.008541090413928032, 0.05391978099942207, -0.03456250578165054, 0.039472922682762146, 0.02337661385536194, -0.031055064871907234, -0.005853633396327496, 0.006991181522607803, -0.01619110256433487, 0.04144467040896416, 0.014001321978867054, 0.057977039366960526, 0.08182763308286667, 0.02468479424715042, 0.031680718064308167, -0.038771431893110275, -0.018703186884522438, -0.014968237839639187, 0.05767369270324707, -0.017328649759292603, -0.0031377370469272137, 0.055815696716308594, -0.011252246797084808, 0.02811639942228794, -0.02699781022965908, 0.016077347099781036, 0.046563636511564255, 0.03348183259367943, -0.03810786455869675, 0.02493126317858696, -0.025917138904333115, -0.04129299893975258, -0.08615031093358994, -0.00086975033627823, -0.046487800776958466, 0.06317184120416641, 0.023016391322016716, 0.012569907121360302, 0.031244656071066856, 0.026921972632408142, 0.005545547232031822 ]
716,365
pytorch_optimizer.optimizer.diffgrad
__str__
null
def __str__(self) -> str: return 'diffGrad'
(self) -> str
[ 0.035769835114479065, -0.046259231865406036, 0.06098409742116928, 0.024734461680054665, -0.014096161350607872, -0.04430694878101349, -0.00793322641402483, 0.005356375593692064, 0.04725192114710808, -0.003110420424491167, -0.0001839315373217687, -0.01760365627706051, 0.019539397209882736, 0.011018830351531506, -0.0009973406558856368, -0.016519973054528236, -0.008801828138530254, -0.05158665403723717, -0.008710832335054874, 0.006899177562445402, -0.0013380598975345492, -0.007515470962971449, -0.021491682156920433, -0.00659723486751318, -0.014749680645763874, 0.04238774999976158, 0.02875484526157379, -0.05588829889893532, -0.011283546686172485, -0.0009151336853392422, -0.04070018231868744, -0.04966745898127556, -0.005476325284689665, -0.0057906764559447765, -0.05843619629740715, -0.04364515468478203, -0.03342047706246376, -0.002870521042495966, -0.05519342049956322, -0.010191590525209904, 0.03219616040587425, -0.005236425902694464, -0.02049899473786354, -0.0016772281378507614, -0.018993418663740158, -0.020449360832571983, -0.06244003772735596, -0.004371960647404194, -0.05185137316584587, -0.029879890382289886, 0.04086562991142273, -0.017471298575401306, -0.043016452342271805, 0.027795247733592987, -0.012474771589040756, 0.036795612424612045, 0.04271864891052246, -0.010911288671195507, -0.007511334493756294, 0.037821389734745026, -0.01285530161112547, -0.008239305578172207, 0.06253930926322937, -0.009976508095860481, -0.025578245520591736, 0.017504388466477394, -0.014336060732603073, 0.05320804566144943, 0.037490494549274445, 0.03864862769842148, 0.01265676412731409, -0.008437843061983585, -0.01224314421415329, 0.004723537713289261, 0.022136928513646126, -0.01674332655966282, -0.023195795714855194, -0.01561000943183899, 0.013996892608702183, -0.048542413860559464, 0.0065682814456522465, 0.007192847318947315, 0.013293738476932049, -0.015204661525785923, 0.020383181050419807, -0.0924522876739502, -0.026124224066734314, -0.06432614475488663, -0.025727149099111557, -0.016586152836680412, -0.043512798845767975, -0.029615173116326332, -0.040435466915369034, 0.005902353674173355, -0.004204444587230682, -0.0037453267723321915, -0.024751005694270134, -0.03960822895169258, 0.017355484887957573, -0.0009849320631474257, 0.05218226835131645, 0.030905667692422867, -0.01897687464952469, 0.027861425653100014, 0.018927238881587982, -0.06948811560869217, -0.03117038495838642, -0.012871846556663513, 0.016114626079797745, -0.01806691102683544, -0.0162718016654253, 0.018017277121543884, 0.046259231865406036, 0.010125411674380302, 0.013806627131998539, -0.01876179128885269, 0.005964396987110376, -0.0014342265203595161, 0.03676252439618111, 0.010117138735949993, 0.03375137224793434, 0.022649817168712616, -0.05502797290682793, 0.05827074870467186, 0.02293107844889164, 0.09701865166425705, 0.0009140996262431145, 0.025793327018618584, 0.029367001727223396, -0.03211343660950661, 0.0682968944311142, -0.00183233548887074, -0.06601370871067047, 0.009380895644426346, 0.07167202979326248, 0.027712523937225342, 0.06641078740358353, 0.025247350335121155, 0.10343802720308304, 0.11488702148199081, 0.008595018647611141, 0.007958044297993183, 0.03087257780134678, 0.036299269646406174, -0.025478975847363472, 0.059031810611486435, -0.07167202979326248, 0.1015850082039833, -0.009174086153507233, 0.04222230240702629, -0.0006064699846319854, 0.0469210259616375, 0.04079945385456085, -0.05727806314826012, 0.03467787802219391, -0.014360877685248852, -0.015750639140605927, -0.010001325979828835, 0.023228885605931282, -0.036299269646406174, 0.00744929164648056, -0.04228848218917847, 0.04149433225393295, -0.0018064843025058508, 0.04675557464361191, 0.01361636258661747, 0.026620566844940186, 0.023576324805617332, -0.05049470067024231, 0.0035674702376127243, -0.03467787802219391, -0.08762120455503464, -0.03375137224793434, 0.04328117147088051, 0.001762020168825984, 0.05224844813346863, 0.02084643580019474, 0.08464314788579941, -0.003362728515639901, -0.007465836592018604, 0.020614808425307274, 0.008743921294808388, -0.06634461134672165, 0.016503427177667618, 0.0462261438369751, -0.06836307048797607, -0.023410877212882042, 0.022897988557815552, 0.030789854004979134, -0.034545522183179855, 0.029433181509375572, 0.005625228397548199, -0.036464717239141464, -0.003739122534170747, 0.015651371330022812, -0.03924424201250076, -0.016222165897488594, -0.036795612424612045, 0.06607989221811295, 0.003087671473622322, -0.005029615946114063, 0.002866384806111455, -0.030194241553544998, 0.03752358257770538, 0.0364978052675724, -0.010125411674380302, 0.018861060962080956, -0.01285530161112547, 0.012309323996305466, -0.04261937737464905, 0.0471857413649559, 0.03504186496138573, 0.001278085052035749, 0.04321499168872833, 0.04103107750415802, -0.04113034904003143, 0.05605374649167061, 0.009339533746242523, -0.05641773343086243, 0.019870292395353317, 0.0469210259616375, -0.0557890310883522, 0.0036501942668110132, -0.016569606959819794, -0.007838094606995583, -0.015113665722310543, 0.04735118895769119, -0.014104433357715607, -0.05459780618548393, -0.01791800744831562, 0.021657129749655724, -0.08788592368364334, 0.0010133683681488037, 0.006262203212827444, -0.002343155909329653, 0.08940804749727249, -0.05949506536126137, 0.022103838622570038, -0.012549223378300667, -0.009728336706757545, -0.03381755203008652, 0.017107313498854637, 0.0156844612210989, 0.05724497139453888, 0.07537806034088135, -0.05757587030529976, 0.02845703810453415, -0.005414282437413931, -0.05671554058790207, 0.012946298345923424, 0.03467787802219391, -0.034049179404973984, -0.018563253805041313, 0.007883592508733273, 0.0017878713551908731, 0.009686974808573723, 0.004752491135150194, 0.01153999101370573, 0.03570365533232689, -0.0277621578425169, -0.025561699643731117, -0.0455312617123127, -0.04841005429625511, 0.027464350685477257, -0.02157440595328808, 0.011548263020813465, 0.005571458023041487, 0.014410511590540409, -0.008636380545794964, 0.0007134940824471414, 0.03891334682703018, 0.016627514734864235, -0.08014295995235443, 0.007809140719473362, -0.0029511768370866776, -0.024734461680054665, 0.031236562877893448, 0.04070018231868744, -0.024519378319382668, -0.048542413860559464, -0.0007259026751853526, -0.07928263396024704, -0.025098446756601334, 0.035736747086048126, -0.04960127919912338, -0.0026244171895086765, 0.022451279684901237, -0.05727806314826012, 0.02531352825462818, 0.025114990770816803, 0.07835612446069717, 0.019704844802618027, 0.019919926300644875, 0.010621755383908749, 0.051619745790958405, 0.05171901360154152, 0.09490091353654861, 0.007552696391940117, -0.0157920029014349, 0.06402833759784698, 0.004855895880609751, -0.03208034858107567, 0.006729593500494957, -0.005195064004510641, -0.08358427882194519, -0.03841700404882431, 0.032642871141433716, -0.0455312617123127, 0.03131928667426109, -0.006828862242400646, -0.052314624190330505, 0.03725886717438698, -0.00029961581458337605, 0.0599583201110363, -0.010745841078460217, 0.03428080305457115, 0.0061877514235675335, -0.014096161350607872, 0.02086297981441021, 0.06488866358995438, -0.012640219181776047, 0.029681352898478508, -0.02582641690969467, 0.036266177892684937, 0.004165150690823793, -0.016040174290537834, -0.01843089610338211, 0.025644425302743912, 0.036795612424612045, 0.02705073170363903, -0.08669470250606537, -0.06700640171766281, 0.08219451457262039, -0.02794414944946766, -0.010017869994044304, 0.015734095126390457, 0.05866782367229462, -0.029069196432828903, -0.03292413055896759, -0.018133088946342468, 0.06657623499631882, -0.03808610513806343, -0.02668674662709236, 0.03530658036470413, 0.024056125432252884, 0.03669634461402893, -0.03467787802219391, -0.004946892149746418, 0.05615301802754402, 0.04258628934621811, -0.04520036652684212, 0.0003908706712536514, -0.018381262198090553, 0.037986837327480316, 0.032510511577129364, 0.02364250458776951, -0.029962614178657532, 0.014509780332446098, -0.00659723486751318, -0.014625594019889832, -0.03563747927546501, -0.02963171899318695, 0.013062112033367157, 0.029036106541752815, 0.0040327925235033035, -0.017372028902173042, -0.008801828138530254, -0.02604150027036667, 0.005033752415329218, -0.003960409201681614, -0.02842394821345806, 0.03239469975233078, -0.023692138493061066, -0.025230804458260536, -0.04950201138854027, 0.017206581309437752, 0.017504388466477394, 0.005265379324555397, 0.03279177471995354, -0.020647898316383362, -0.01051421370357275, -0.012813939712941647, -0.013996892608702183, 0.07332650572061539, 0.012284506112337112, 0.007391384802758694, -0.004405050538480282, -0.014302970841526985, 0.04539890214800835, -0.030640950426459312, 0.009438802488148212, -0.04685484617948532, 0.006233249790966511, 0.0057824039831757545, -0.056781720370054245, -0.054928701370954514, -0.005501142702996731, -0.00668409513309598, -0.061083365231752396, 0.006634460762143135, -0.014269880950450897, -0.028870658949017525, -0.058171480894088745, 0.009099634364247322, -0.03931042179465294, 0.007701599504798651, -0.008011814206838608, 0.07359122484922409, -0.029515905305743217, -0.014865493401885033, -0.030574772506952286, -0.004967573098838329, -0.04156051203608513, 0.002560306340456009, 0.04132888466119766, 0.006349063012748957, -0.0729956105351448, -0.04430694878101349, -0.03375137224793434, 0.025098446756601334, -0.005021343939006329, 0.01709076762199402, 0.05426691100001335, 0.04152742400765419, 0.0016058787005022168, 0.030061883851885796, 0.012797394767403603, 0.05393601581454277, 0.034578610211610794, 0.044737111777067184, -0.02827504649758339, 0.050229981541633606, -0.001007164129987359, -0.023692138493061066, 0.018215814605355263, -0.06346581131219864, -0.019737934693694115, -0.0006530021782964468, 0.014501508325338364, 0.011887431144714355, 0.03636544942855835, -0.045597441494464874, 0.03977367654442787, 0.010497668758034706, -0.02104497328400612, -0.06700640171766281, -0.04308263212442398, -0.05320804566144943, -0.01042321790009737, -0.02190530113875866, 0.012160420417785645, 0.050395429134368896, 0.0032076211646199226, -0.015047486871480942, 0.05893254280090332, -0.010671389289200306, -0.03085603378713131, -0.07570895552635193, 0.015767185017466545, 0.015361837111413479, -0.03620000183582306, 0.05013071373105049, -0.05532577633857727, 0.05446545034646988, -0.006729593500494957, -0.031633637845516205, 0.042817916721105576, -0.009926874190568924, -0.036233089864254, -0.005348103120923042, 0.01722312718629837, -0.03373482823371887, -0.005662454292178154, -0.02566096931695938, -0.04036928713321686, 0.06641078740358353, -0.06015685573220253, -0.01319446973502636, 0.0041341292671859264, -0.02981371060013771, -0.055259596556425095, -0.08351810276508331, -0.009802788496017456, 0.07458391040563583, -0.00013313385716173798, 0.03138546645641327, -0.07617221027612686, -0.0015914019895717502, -0.020730622112751007, -0.0213758684694767, -0.024784095585346222, -0.013500548899173737, -0.03394990786910057, -0.00780086824670434, -0.05446545034646988, 0.03360246866941452, 0.02139241248369217, -0.0399722121655941, -0.07517952471971512, 0.051255758851766586, 0.020813345909118652, 0.008801828138530254, 0.005269515793770552, 0.01068793423473835, 0.04738427698612213, -0.029036106541752815, 0.013657724484801292, 0.011498629115521908, -0.014584232121706009, -0.0282419566065073, -0.02686873823404312, -0.03219616040587425, 0.0627378448843956, 0.0710764154791832, -0.001077479450032115, -0.06220841035246849, 0.0001853533467510715, 0.040931809693574905, 0.02448628842830658, 0.008752194233238697, -0.028159232810139656, -0.0025727148167788982, -0.07292943447828293, -0.06849543005228043, 0.001138488412834704, 0.01300420518964529, -0.021954936906695366, -0.016040174290537834, 0.0011136712273582816, 0.05449853837490082, 0.035604387521743774, 0.04099798947572708, 0.03801992908120155, 0.05327422544360161, -0.034413162618875504, 0.05982596054673195, -0.04010457172989845, -0.013847989030182362, -0.03229542821645737, -0.004678039345890284, -0.0068412707187235355, -0.027431262657046318, 0.018116544932127, 0.0026637110859155655, 0.02309652604162693, 0.019440127536654472, 0.00504202488809824, 0.02584296278655529, 0.020879525691270828, -0.021657129749655724, -0.0072052557952702045, 0.0051288846880197525, -0.07531188428401947, -0.048873309046030045, -0.010042687878012657, 0.10985740274190903, -0.007958044297993183, 0.0392773300409317, 0.07656928896903992, -0.009678701870143414, -0.044042229652404785, -0.06657623499631882, 0.09675393253564835, 0.04192449897527695, -0.007151485420763493, 0.040236927568912506, 0.012069424614310265, 0.030293511226773262, -0.03408226743340492, -0.054002195596694946, -0.0010211237240582705, -0.036266177892684937, 0.051288850605487823, 0.025280438363552094, -0.0371926873922348, 0.035736747086048126, 0.05939579755067825, 0.007705735974013805, -0.02880447916686535, -0.0009585637599229813, -0.028986472636461258, 0.04013765975832939, 0.011589624918997288, -0.023493601009249687, -0.012623675167560577, 0.0413619764149189, -0.004138265736401081, 0.006253930740058422, 0.026107678189873695, -0.03917806223034859, -0.0666424110531807, -0.03166672959923744, -0.021921847015619278, -0.014542870223522186, 0.005443235859274864, -0.03401608765125275, -0.038549359887838364, -0.01723967120051384, -0.003302753670141101, 0.025263894349336624, 0.019258135929703712, -0.005736906081438065, 0.03428080305457115, 0.026339305564761162, 0.02480063959956169, 0.04606069624423981, 0.03709341958165169, 0.008801828138530254, -0.03914497420191765, -0.010497668758034706, 0.016337979584932327, 0.002622349187731743, 0.0033213666174560785, -0.023394333198666573, 0.012375502847135067, -0.021293144673109055, 0.031633637845516205, 0.005286060273647308, -0.0325436033308506, 0.07921645790338516, -0.012979387305676937, 0.0385824516415596, -0.039707496762275696, 0.037325046956539154, -0.004860031884163618, 0.03944277763366699, -0.006733729504048824, -0.01387280598282814, 0.022798720747232437, -0.10555575788021088, -0.0010133683681488037, 0.005691407714039087, 0.0010754113318398595, -0.10747495293617249, -0.023195795714855194, -0.00407622242346406, 0.03424771502614021, 0.004462956916540861, -0.029499361291527748, 0.015907814726233482, -0.026852194219827652, 0.04119652882218361, -0.0348433293402195, 0.036266177892684937, -0.07048080861568451, 0.0009368487517349422, -0.07266471534967422, -0.0444062165915966, -0.001980204600840807, -0.027977239340543747, -0.019225046038627625, 0.04103107750415802, 0.0011674417182803154, 0.009653884917497635, -0.014418784528970718, -0.0242877509444952, -0.012979387305676937, 0.0007362431497313082, -0.009190631099045277, -0.013831444084644318, -0.015816818922758102, 0.0010542133823037148, 0.020465904846787453, 0.016040174290537834, 0.05221535637974739, 0.026074588298797607, 0.027530530467629433, -0.020300457254052162, 0.01795109733939171, -0.07048080861568451, -0.057807497680187225, 0.036266177892684937, 0.00724248168990016, -0.02086297981441021, -0.04304954409599304, 0.009339533746242523, 0.05810530111193657, 0.020548628643155098, 0.07213528454303741, -0.026273125782608986, 0.007387248799204826, 0.04331425949931145, -0.00966215692460537, -0.0220707505941391, 0.024751005694270134, 0.06148044019937515, -0.07974588871002197, 0.023162705823779106, 0.017653290182352066, -0.002367973094806075, -0.10515868663787842, -0.031947989016771317, -0.010836837813258171, -0.02617385797202587, 0.06472321599721909, -0.013773537240922451, -0.02514808066189289, -0.010596937499940395, -0.02875484526157379, -0.024205027148127556, 0.018033821135759354, 0.02344396710395813, -0.018530163913965225, 0.05618610605597496, 0.0348433293402195, -0.014096161350607872, 0.02395685575902462, -0.05651700124144554, -0.01583336479961872, -0.07001755386590958, 0.04417458921670914, 0.014749680645763874, -0.019870292395353317, 0.04582906886935234, 0.03398299962282181, -0.04036928713321686, -0.019092688336968422, -0.010630027391016483, -0.002316270489245653, -0.00047230205382220447, -0.004187900107353926, -0.0019522851798683405, 0.023162705823779106, 0.022021114826202393, -0.01499785203486681, 0.029780622571706772, 0.00012822212011087686, -0.025809872895479202, -0.04589524865150452, -0.03328811749815941, -0.013153107836842537, 0.021127697080373764, 0.0009151336853392422, 0.008586745709180832, 0.02501572296023369, 0.024585558101534843, 0.012640219181776047, 0.01690877601504326, 0.05810530111193657, 0.05105722323060036, 0.018927238881587982, 0.01760365627706051, -0.01678469032049179, -0.007689191028475761, -0.0094718923792243, 0.02981371060013771, 0.006427650805562735, 0.035405851900577545, -0.0444062165915966, -0.019572487100958824, 0.09318025410175323, 0.02121042087674141, -0.023195795714855194, 0.009364350698888302, 0.04142815247178078, -0.03338738530874252, 0.0364978052675724, -0.01998610608279705, -0.012301051057875156, -0.013591544702649117, 0.0427517369389534, -0.013111745938658714, 0.04407532140612602, -0.002045349683612585, -0.015113665722310543, 0.04156051203608513, -0.036795612424612045, -0.022666363045573235 ]
716,386
pytorch_optimizer.optimizer.diffgrad
reset
null
@torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2 = group['betas'] bias_correction1: float = 1.0 - beta1 ** group['step'] step_size, n_sma = self.get_rectify_step_size( is_rectify=group['rectify'], step=group['step'], lr=group['lr'], beta2=beta2, n_sma_threshold=self.n_sma_threshold, degenerated_to_sgd=self.degenerated_to_sgd, ) step_size = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=step_size, bias_correction1=bias_correction1, ) for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) state = self.state[p] if len(state) == 0: state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) state['previous_grad'] = torch.zeros_like(p) if group['ams_bound']: state['max_exp_avg_sq'] = torch.zeros_like(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) s_grad = self.get_adanorm_gradient( grad=grad, adanorm=group['adanorm'], exp_grad_norm=state.get('exp_grad_norm', None), r=group.get('r', None), ) exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq'] exp_avg.mul_(beta1).add_(s_grad, alpha=1.0 - beta1) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) de_nom = self.apply_ams_bound( ams_bound=group['ams_bound'], exp_avg_sq=exp_avg_sq, max_exp_avg_sq=state.get('max_exp_avg_sq', None), eps=group['eps'], ) # compute diffGrad coefficient (dfc) dfc = state['previous_grad'].clone() dfc.sub_(grad).abs_().sigmoid_().mul_(exp_avg) state['previous_grad'].copy_(grad) if not group['rectify']: p.addcdiv_(exp_avg, de_nom, value=-step_size) continue self.apply_weight_decay( p=p, grad=None, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=group['fixed_decay'], ) if n_sma >= self.n_sma_threshold: p.addcdiv_(dfc, de_nom, value=-step_size) elif step_size > 0: p.add_(exp_avg, alpha=-step_size) return loss
(self)
[ -0.002234948566183448, -0.02192201465368271, -0.02003423124551773, 0.058709096163511276, 0.0001717290433589369, -0.0032294944394379854, -0.03368360176682472, -0.04230217635631561, -0.034434761852025986, 0.012631351128220558, -0.018610980361700058, 0.009987465105950832, 0.03135105222463608, 0.07732995599508286, -0.022001085802912712, 0.037340566515922546, 0.005638642702251673, 0.055150967091321945, 0.033367324620485306, -0.015695292502641678, -0.016397034749388695, -0.06562767177820206, -0.029295245185494423, 0.03465220332145691, -0.06432303041219711, -0.0022979569621384144, 0.05491375923156738, -0.00023396537289954722, -0.016792383044958115, 0.012443561106920242, -0.012147050350904465, -0.07705321907997131, 0.021190622821450233, -0.004059724044054747, 0.026448743417859077, -0.06250443309545517, -0.00035951906465925276, 0.004986319690942764, -0.09614849835634232, -0.04006846249103546, -0.026468511670827866, -0.015487736091017723, 0.013174953870475292, 0.009893570095300674, 0.005213644355535507, 0.004583559464663267, -0.03862544521689415, 0.02840571291744709, -0.014281926676630974, -0.007798228412866592, 0.018472610041499138, -0.05467655137181282, 0.05028819292783737, 0.007773519027978182, 0.03067896142601967, 0.09061363339424133, 0.06001374125480652, -0.05269981548190117, 0.03170686587691307, -0.055150967091321945, 0.061634667217731476, -0.06412535160779953, 0.03241848945617676, -0.009137467481195927, 0.003404929768294096, -0.006048815790563822, -0.061397455632686615, -0.027239438146352768, 0.014825529418885708, 0.030560357496142387, 0.007323811296373606, 0.005781956482678652, 0.00822322629392147, -0.0048775989562273026, -0.041630085557699203, -0.017069125548005104, -0.019965045154094696, -0.05432073771953583, 0.03413825109601021, -0.0361347571015358, 0.012255771085619926, 0.005193877033889294, -0.023997589945793152, 0.014914481900632381, 0.012374375015497208, -0.032971978187561035, -0.009750256314873695, -0.02613246627151966, -0.008055204525589943, -0.03514638915657997, 0.04503007233142853, 0.006365093868225813, 0.024116193875670433, 0.03753823786973953, 0.043527752161026, 0.03888241946697235, -0.042025431990623474, -0.01300693117082119, -0.02496619150042534, -0.0138075090944767, 0.018116796389222145, 0.04807424917817116, 0.019816789776086807, 0.05147423595190048, 0.042539384216070175, -0.0459393709897995, -0.008806364610791206, -0.035897549241781235, 0.04791611060500145, -0.062030013650655746, -0.02510456182062626, -0.011899958364665508, -0.036945220082998276, -0.010802868753671646, -0.04526728019118309, -0.01261158287525177, -0.0031578377820551395, 0.008994154632091522, -0.044792864471673965, 0.029295245185494423, 0.04688820615410805, -0.016654010862112045, -0.05214632675051689, 0.002108931541442871, 0.02482781931757927, 0.016367383301258087, 0.054360274225473404, 0.022910384461283684, 0.026982462033629417, -0.06851371377706528, 0.00044445699313655496, -0.0002873990451917052, -0.006992707960307598, -0.008801422081887722, 0.025677816942334175, -0.014094136655330658, 0.0001948939316207543, 0.023720845580101013, -0.006958114914596081, 0.0023127824533730745, -0.007570903282612562, 0.011781353503465652, -0.007684566080570221, 0.00788718182593584, 0.01386681105941534, 0.021269692108035088, 0.04022660106420517, 0.050762612372636795, -0.0009556288714520633, 0.005129633005708456, 0.018798770383000374, 0.015349363908171654, 0.013688905164599419, 0.006488639861345291, 0.00934996735304594, 0.016950521618127823, -0.038546375930309296, 0.050090521574020386, -0.015072621405124664, -0.023701079189777374, -0.02814873866736889, -0.02749641425907612, -0.013333092443645, -0.001347887679003179, 0.019540047273039818, -0.00044198607793077826, 0.0010285211028531194, 0.04827192425727844, -0.04763936623930931, 0.029097571969032288, 0.007733984384685755, -0.01977725513279438, 0.043725427240133286, 0.026092931628227234, -0.041748691350221634, 0.1319669783115387, 0.01633773371577263, 0.013787741772830486, -0.03247779235243797, -0.01087205484509468, 0.007284276653081179, -0.003115832107141614, -0.02269294299185276, -0.03967311605811119, 0.0004487811238504946, 0.026349907740950584, 0.0009784848662093282, -0.003535888623446226, 0.028998734429478645, 0.007570903282612562, -0.013669137842953205, -0.02787199430167675, 0.045306816697120667, -0.019599350169301033, -0.007595612667500973, 0.022080155089497566, 0.010170312598347664, 0.006938347592949867, 0.0978880226612091, 0.005198818631470203, -0.018354004248976707, -0.01458832062780857, 0.03162779659032822, -0.00663689523935318, -0.042144037783145905, -0.006750557571649551, -0.027792925015091896, 0.055941663682460785, -0.010338335298001766, 0.010783101432025433, -0.0757090374827385, -0.006063641514629126, 0.0355219691991806, 0.07634159177541733, 0.059539325535297394, -0.07219044119119644, 0.028208039700984955, 0.025915024802088737, 0.06863231211900711, 0.002619176870211959, -0.036945220082998276, -0.07385089993476868, 0.015023202635347843, -0.011040077544748783, 0.06052769348025322, -0.02828710898756981, 0.0246894471347332, -0.03739986941218376, -0.009335141628980637, -0.0022300067357718945, 0.004558850079774857, -0.037498705089092255, 0.021546434611082077, -0.018393538892269135, 0.04182776063680649, 0.028563853353261948, -0.046255651861429214, -0.023048756644129753, 0.017602844163775444, -0.00037619780050590634, -0.03807196021080017, -0.023997589945793152, -0.02134876139461994, 0.05720677599310875, -0.0017321159830316901, 0.02733827568590641, 0.06989742815494537, 0.014321461319923401, -0.021605737507343292, 0.037913817912340164, -0.03425685688853264, -0.0350080169737339, -0.027555717155337334, 0.039890557527542114, -0.052383534610271454, -0.020083649083971977, 0.07701367884874344, 0.04843006283044815, 0.04423937946557999, -0.04894401133060455, 0.04087892547249794, -0.06274163722991943, -0.04578123241662979, 0.044278912246227264, -0.0464533232152462, 0.01805749349296093, 0.05906490609049797, -0.046018440276384354, 0.036708008497953415, 0.040839388966560364, 0.054597482085227966, 0.08428807556629181, -0.06712999194860458, -0.030619658529758453, 0.007210148964077234, 0.04038473963737488, 0.01240402553230524, 0.00736828800290823, 0.004469897132366896, -0.02666618488729, 0.06305791437625885, -0.05546724423766136, -0.06665557622909546, 0.007763635367155075, -0.06325559318065643, 0.03488941118121147, -0.022989453747868538, -0.022870849817991257, 0.05949978902935982, 0.0038818176835775375, 0.04166961833834648, 0.007561019621789455, 0.08934852480888367, 0.0027575483545660973, 0.08144157379865646, 0.0057868980802595615, -0.0036470801569521427, 0.012087748385965824, -0.04463472589850426, 0.01520110946148634, 0.08128343522548676, -0.014370879158377647, 0.007274392992258072, 0.0077389259822666645, -0.040167298167943954, -0.03172663226723671, 0.0036470801569521427, -0.0028885072097182274, 0.02364177629351616, -0.028168505057692528, -0.023167360574007034, 0.001648104633204639, 0.00214105355553329, 0.020231904461979866, -0.00810462236404419, -0.08389272540807724, -0.005292713642120361, -0.04961610212922096, 0.03917893022298813, 0.060330018401145935, -0.027970831841230392, 0.03267546743154526, 0.026646416634321213, 0.02840571291744709, -0.01427204255014658, -0.016169710084795952, 0.07938576489686966, 0.020518532022833824, -0.014944133348762989, -0.02680455707013607, -0.09069270640611649, -0.015853432938456535, 0.05511143431067467, 0.026606881991028786, -0.0371626578271389, -0.020637135952711105, 0.03441499546170235, -0.014499367214739323, 0.018017958849668503, -0.05890676751732826, 0.06250443309545517, 0.03396034613251686, -0.022218525409698486, 0.02747664786875248, 0.04020683467388153, -0.030362684279680252, 0.052225396037101746, 0.0203010905534029, 0.02492665685713291, 0.018284820020198822, -0.014370879158377647, -0.01726679876446724, -0.025262702256441116, 0.06756487488746643, 0.03255686163902283, 0.03077779896557331, -0.002604351146146655, -0.02759525179862976, 0.03079756535589695, -0.07748809456825256, 0.010536009445786476, 0.027278972789645195, -0.04649285972118378, 0.09322292357683182, 0.08460435271263123, -0.008460435084998608, -0.048350993543863297, -0.040562648326158524, 0.04526728019118309, -0.02255457080900669, 0.021427830681204796, -0.03712312504649162, 0.004203037358820438, 0.01458832062780857, -0.04159054905176163, -0.029670825228095055, -0.030718496069312096, -0.012581932358443737, 0.06309745460748672, 0.05843235179781914, 0.029374314472079277, -0.0310545414686203, -0.03437545895576477, 0.04313240572810173, 0.04779750481247902, -0.02599409408867359, 0.024056890979409218, -0.05839281529188156, 0.03301151096820831, -0.06807883083820343, 0.06764394789934158, 0.018788887187838554, -0.005154342390596867, 0.0006906225462444127, -0.06784161925315857, 0.027812693268060684, 0.02573711797595024, 0.04317194223403931, -0.04767890274524689, -0.008252877742052078, -0.02546037547290325, 0.00491713359951973, 0.020676670596003532, 0.0074720666743814945, -0.022515036165714264, -0.07634159177541733, 0.005856084171682596, 0.035660337656736374, 0.014034833759069443, 0.07076719403266907, -0.010051708668470383, 0.013105767779052258, -0.05910444259643555, 0.010328452102839947, 0.012937745079398155, -0.04285566136240959, -0.029631290584802628, -0.009522931650280952, -0.016950521618127823, 0.0022856025025248528, 0.043092869222164154, 0.01886795647442341, 0.029235942289233208, 0.03184523805975914, -0.03228011727333069, -0.038151029497385025, -0.061002109199762344, -0.0050703310407698154, -0.06799975782632828, -0.0046181525103747845, -0.01630808226764202, -0.02947315201163292, -0.020261555910110474, -0.01401506643742323, -0.023542940616607666, 0.004225275944918394, -0.021032484248280525, 0.04775797203183174, 0.051157958805561066, 0.0014553727814927697, -0.00159374438226223, -0.007012475281953812, 0.009453745558857918, -0.008598807267844677, 0.002212710212916136, -0.039218466728925705, 0.049971915781497955, -0.04894401133060455, -0.08776713162660599, 0.009839209727942944, 0.012305188924074173, 0.016397034749388695, 0.054202135652303696, 0.015991803258657455, 0.016080757603049278, -0.004603326786309481, -0.035502199083566666, -0.03305104747414589, -0.015626108273863792, 0.03040221892297268, 0.004356234800070524, 0.02043946273624897, -0.038566142320632935, 0.020538300275802612, -0.003847224870696664, 0.006206954829394817, 0.08072994649410248, 0.046137046068906784, -0.02097318135201931, 0.008964503183960915, -0.002165762707591057, -0.030837099999189377, 0.029354548081755638, -0.023839451372623444, -0.016278430819511414, -0.02243596687912941, -0.036945220082998276, -0.006187187507748604, 0.023048756644129753, -0.02842548117041588, 0.018017958849668503, -0.062030013650655746, 0.022633640095591545, 0.03091616928577423, -0.0018396010855212808, 0.039752185344696045, 0.0025598746724426746, 0.009068282321095467, 0.03370336815714836, 0.05704863741993904, -0.05748351663351059, -0.07539276033639908, 0.04969517141580582, 0.0344940647482872, -0.05167191103100777, -0.05538817495107651, 0.0411161333322525, 0.0012873500818386674, 0.0899810791015625, -0.04182776063680649, 0.010447056032717228, 0.03190453723073006, -0.05776026099920273, -0.007877297699451447, 0.004642861429601908, -0.018680166453123093, -0.05558585003018379, 0.022455735132098198, -0.051276564598083496, 0.015981920063495636, -0.014281926676630974, -0.017197614535689354, 0.009409269317984581, 0.009873802773654461, -0.008331947028636932, -0.04329054430127144, 0.03981148824095726, 0.058709096163511276, 0.04131380841135979, -0.05052540451288223, 0.01818598248064518, 0.0014578436966985464, -0.020202254876494408, -0.011435424908995628, -0.011682516895234585, 0.047441691160202026, 0.0038052191957831383, 0.0007882239297032356, 0.0030169952660799026, -0.0011675104033201933, -0.012690653093159199, 0.01977725513279438, 0.06582535058259964, 0.07408811151981354, -0.008801422081887722, -0.03488941118121147, -0.015981920063495636, -0.07270439714193344, -0.13070186972618103, -0.035225458443164825, 0.004304345231503248, -0.011277285404503345, 0.02429410070180893, -0.01228542160242796, -0.047164950519800186, 0.031153379008173943, 0.022534804418683052, 0.017355753108859062, -0.022337131202220917, -0.011969143524765968, -0.025025492534041405, 0.03860567882657051, -0.016001688316464424, 0.024887122213840485, 0.027555717155337334, 0.0192237701267004, -0.033920809626579285, 0.02642897702753544, 0.010565659962594509, -0.007308985572308302, -0.055150967091321945, -0.06507419049739838, 0.01102031022310257, -0.04550449177622795, -0.0018606039229780436, 0.03162779659032822, 0.035640571266412735, -0.028306877240538597, -0.05364864692091942, 0.012957512401044369, -0.027931297197937965, 0.003970770630985498, -0.004598384723067284, -0.009631652384996414, -0.032971978187561035, 0.008000844158232212, 0.01581389829516411, -0.03836846724152565, 0.000702977180480957, -0.030342916026711464, 0.04408124089241028, -0.04285566136240959, -0.00982932560145855, -0.003518592333421111, 0.003963358234614134, 0.06301838159561157, -0.10658566653728485, 0.04570216313004494, -0.004922075662761927, 0.018116796389222145, -0.040285903960466385, 0.011119146831333637, -0.06535093486309052, -0.07665786892175674, 0.004620623309165239, 0.03162779659032822, -0.03419755399227142, 0.01421274058520794, 0.010377869941294193, 0.021309226751327515, -0.049181222915649414, 0.004289519507437944, 0.0469672754406929, -0.002920629223808646, -0.012730187736451626, -0.0021348760928958654, -0.009048514999449253, 0.033228952437639236, 0.021072018891572952, -0.038427770137786865, -0.0493788942694664, -0.024353401735424995, -0.0056139337830245495, -0.02401735633611679, -0.06286024302244186, -0.02814873866736889, -0.015448201447725296, 0.005297655705362558, 0.07290206849575043, 0.011326704174280167, -0.023938287049531937, -0.00815898273140192, -0.045583561062812805, -0.003983125556260347, 0.03222081810235977, -0.022139456123113632, 0.05609980225563049, -0.06535093486309052, -0.03451383113861084, -0.037913817912340164, -0.04178822413086891, 0.03821032866835594, 0.034968480467796326, -0.04914168640971184, 0.06388814747333527, 0.006893870886415243, 0.05412306636571884, 0.032319653779268265, -0.03360453248023987, -0.06420442461967468, -0.025974327698349953, 0.034849878400564194, -0.01726679876446724, -0.024373169988393784, -0.029571987688541412, -0.004719459917396307, -0.02059760130941868, 0.034177787601947784, 0.05479515343904495, 0.01738540455698967, -0.015280178748071194, 0.053292833268642426, -0.04483240097761154, 0.006468872539699078, 0.01646622084081173, 0.010704032145440578, 0.03063942678272724, 0.030224312096834183, 0.002984873251989484, -0.034988246858119965, -0.011366238817572594, -0.015448201447725296, -0.018680166453123093, -0.013105767779052258, -0.013165069743990898, -0.0045143733732402325, 0.0011551558272913098, -0.011059844866394997, 0.0012663472443819046, -0.012107515707612038, -0.09630663692951202, -0.027180137112736702, -0.06653697788715363, 0.008776713162660599, 0.02095341496169567, -0.02095341496169567, 0.046097513288259506, -0.03726149722933769, -0.02190224826335907, 0.01725691556930542, 0.02694292739033699, 0.050367262214422226, -0.015230759978294373, 0.034711506217718124, 0.03382197394967079, -0.00842584203928709, 0.010476707480847836, 0.010832520201802254, 0.006355210207402706, 0.007857530377805233, -0.039099860936403275, -0.015280178748071194, 0.015349363908171654, 0.01939179189503193, 0.023997589945793152, -0.0729416012763977, -0.03890218958258629, -0.01426215935498476, 0.009695895947515965, -0.05519050359725952, 0.010852287523448467, -0.02854408510029316, -0.01805749349296093, 0.0031825469341129065, 0.0371626578271389, 0.03382197394967079, 0.023424336686730385, -0.0067900922149419785, 0.0041956244967877865, 0.014954016543924809, 0.0014652564423158765, 0.025144096463918686, -0.02587549015879631, 0.02059760130941868, 0.008450551889836788, -0.024234797805547714, -0.015764478594064713, -0.031509190797805786, -0.06155559793114662, 0.05246260389685631, -0.02640920877456665, -0.007017416879534721, 0.03554173558950424, -0.005604050122201443, -0.06064629554748535, -0.023127825930714607, 0.04020683467388153, -0.02204062044620514, 0.03380220755934715, -0.0018383655697107315, 0.018472610041499138, 0.011662749573588371, 0.0038348701782524586, 0.023068523034453392, -0.017286567017436028, 0.0006109353271313012, 0.04408124089241028, 0.023542940616607666, -0.026982462033629417, 0.0050703310407698154, 0.021803410723805428, 0.021170854568481445, -0.0008870608289726079, -0.02826734259724617, 0.0056089917197823524, 0.04898354783654213, -0.020478997379541397, -0.023819683119654655, 0.017415054142475128, -0.06989742815494537, 0.07420671731233597, 0.031015006825327873, 0.03210221230983734, 0.04526728019118309, 0.06459977477788925, -0.04206496849656105, 0.01427204255014658, -0.08001831918954849, -0.05827421322464943, -0.06602302193641663, -0.004141264595091343, -0.022080155089497566, 0.0669323205947876, 0.025440607219934464, 0.014766226522624493, 0.01978714019060135, 0.03437545895576477, 0.024630146101117134 ]