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
717,411
pytorch_optimizer.optimizer.pcgrad
retrieve_grad
Get the gradient of the parameters of the network with specific objective.
def retrieve_grad(self) -> Tuple[List[torch.Tensor], List[int], List[torch.Tensor]]: r"""Get the gradient of the parameters of the network with specific objective.""" grad, shape, has_grad = [], [], [] for group in self.optimizer.param_groups: for p in group['params']: if p.grad is None: shape.append(p.shape) grad.append(torch.zeros_like(p, device=p.device)) has_grad.append(torch.zeros_like(p, device=p.device)) continue shape.append(p.grad.shape) grad.append(p.grad.clone()) has_grad.append(torch.ones_like(p, device=p.device)) return grad, shape, has_grad
(self) -> Tuple[List[torch.Tensor], List[int], List[torch.Tensor]]
[ 0.004100251942873001, -0.018913038074970245, -0.02976209484040737, 0.0023800574708729982, -0.006653239019215107, -0.018294131383299828, -0.009010542184114456, -0.05344434827566147, 0.0451437272131443, -0.01264206413179636, -0.010002612136304379, -0.04568982124328613, -0.0008418941288255155, -0.014116516336798668, 0.007417770102620125, 0.019113272428512573, -0.04244966804981232, 0.020205458626151085, 0.0023937097284942865, 0.0000943575578276068, -0.03054482862353325, -0.06265512853860855, -0.0030831529293209314, 0.020715147256851196, -0.023918895050883293, -0.03323889151215553, 0.05082309991121292, -0.02005983330309391, 0.03693412244319916, 0.026467330753803253, -0.0657496526837349, -0.04918482154607773, -0.014717219397425652, 0.0020762928761541843, -0.006120797712355852, 0.04663638398051262, 0.015372531488537788, 0.04554419592022896, -0.006826168857514858, -0.005847751162946224, -0.03553248196840286, -0.04896638169884682, 0.018985850736498833, 0.007417770102620125, 0.033166076987981796, 0.0042709060944616795, -0.027286471799016, -0.004603113047778606, -0.055519506335258484, -0.017520500347018242, 0.07128340005874634, 0.004823825787752867, -0.019167881458997726, -0.018021084368228912, -0.0012446381151676178, -0.02937982976436615, 0.04434278979897499, 0.005219743587076664, 0.04161232337355614, -0.006361989304423332, 0.07037324458360672, -0.06280075013637543, -0.0023368250112980604, -0.006480309646576643, -0.015035774558782578, -0.04106622934341431, -0.05249778926372528, -0.03607857599854469, 0.0022970058489590883, 0.06764277815818787, 0.023846082389354706, 0.0011018574004992843, 0.012232494540512562, -0.038590606302022934, -0.0002549858472775668, -0.05133278667926788, 0.0706280916929245, -0.06756997108459473, -0.003674754174426198, -0.05508263036608696, -0.048456694930791855, 0.034039828926324844, -0.02976209484040737, 0.009447417221963406, 0.011486166156828403, -0.03689771518111229, -0.045944664627313614, -0.017784444615244865, 0.0070719108916819096, -0.06389293819665909, -0.014316750690340996, -0.007850093767046928, 0.012250697240233421, 0.020005224272608757, 0.014453274197876453, -0.021388661116361618, -0.04601747915148735, 0.007226637098938227, -0.011249525472521782, -0.009520229883491993, -0.027104441076517105, 0.005642965901643038, -0.01860358566045761, 0.042267635464668274, 0.07477840036153793, -0.09531151503324509, 0.023336395621299744, -0.04102982580661774, 0.04434278979897499, -0.01584581285715103, -0.03485896810889244, 0.0004360215098131448, 0.02157069370150566, -0.014717219397425652, 0.008118590340018272, -0.014953860081732273, -0.04481607303023338, 0.011832025833427906, -0.05712137743830681, -0.005797692574560642, 0.004696404095739126, 0.07117418199777603, -0.02127944305539131, 0.05541028454899788, -0.011522572487592697, 0.008701089769601822, 0.029452642425894737, 0.012532845139503479, 0.05981544032692909, -0.04470685496926308, -0.00363152171485126, -0.009583940729498863, -0.043905917555093765, 0.005315309856086969, 0.014025500975549221, -0.016874289140105247, 0.011759213171899319, 0.01934991218149662, 0.011167611926794052, -0.013934485614299774, 0.01022105012089014, 0.03880904242396355, -0.014617102220654488, 0.01689249277114868, -0.025921238586306572, 0.01792096719145775, 0.01428944617509842, 0.018985850736498833, 0.0036019417457282543, -0.02766873687505722, -0.0015631925780326128, -0.0012571527622640133, -0.02976209484040737, -0.06265512853860855, -0.024264754727482796, -0.03431287407875061, -0.048675134778022766, 0.004025164060294628, -0.008487203158438206, -0.029398033395409584, -0.045070916414260864, -0.0037157111801207066, -0.04499810189008713, -0.02899756468832493, 0.04492529109120369, 0.03189186006784439, 0.05024060234427452, 0.0108490576967597, -0.012378118932247162, 0.012105071917176247, -0.0374620147049427, -0.0480562262237072, 0.000754291657358408, 0.04638154059648514, -0.05562872439622879, 0.07710839807987213, -0.019404521211981773, 0.00658042635768652, -0.006293727550655603, 0.008496304973959923, 0.056575287133455276, -0.02357303537428379, 0.013870774768292904, -0.04204919934272766, 0.03158240765333176, 0.029325220733880997, -0.009838784113526344, 0.01726565510034561, -0.0025643641129136086, 0.024501394480466843, 0.004466589540243149, 0.003706609597429633, 0.0048101735301315784, 0.02005983330309391, -0.010002612136304379, 0.025484362617135048, 0.0358419343829155, 0.029161391779780388, 0.026467330753803253, 0.028287643566727638, 0.024264754727482796, -0.03551428020000458, -0.03005334548652172, 0.03975560516119003, -0.035787325352430344, -0.015536359511315823, -0.007863746024668217, 0.03811732679605484, 0.0034881720785051584, 0.050495445728302, -0.004493894521147013, 0.052097320556640625, 0.00480562262237072, 0.024647019803524017, 0.037716858088970184, -0.035750921815633774, 0.015490852296352386, 0.022972332313656807, 0.02260827086865902, -0.007822789251804352, -0.0008680610917508602, -0.10230151563882828, 0.039427950978279114, 0.0060070282779634, 0.014316750690340996, -0.02064233459532261, 0.012150580063462257, -0.03289303183555603, -0.014389563351869583, -0.03698873147368431, 0.07055527716875076, -0.09210776537656784, -0.00009442866576137021, 0.011103901080787182, 0.06185419112443924, 0.048129040747880936, -0.05628403648734093, 0.002059227554127574, 0.05020419508218765, -0.02064233459532261, -0.03760764002799988, -0.024064520373940468, -0.007941109128296375, 0.08154996484518051, 0.020278271287679672, -0.014225735329091549, 0.06290996819734573, 0.005028611049056053, -0.0021479676943272352, 0.017939170822501183, -0.026430925354361534, 0.03354834392666817, -0.012742181308567524, 0.013106243684887886, -0.07543371617794037, -0.013515814207494259, 0.00372481276281178, 0.022626474499702454, -0.0002111845969920978, -0.0630555972456932, 0.02399170771241188, -0.029907720163464546, -0.013907181099057198, 0.029307017102837563, 0.0002771708823274821, 0.03964638710021973, 0.06658700108528137, -0.01684698462486267, -0.03378498554229736, 0.022080380469560623, 0.06349246948957443, 0.049621693789958954, -0.04528935253620148, -0.03025357984006405, 0.016919797286391258, -0.005288005340844393, -0.00005603146928478964, 0.055228255689144135, 0.03489537537097931, 0.0017315713921561837, 0.03456771746277809, -0.014653508551418781, -0.03527763858437538, -0.03815373033285141, -0.03276560828089714, 0.04670919477939606, 0.006648688111454248, 0.0014391838340088725, 0.013734251260757446, 0.033621154725551605, 0.041648730635643005, 0.0002589677751529962, 0.007922906428575516, -0.037006936967372894, 0.06542199850082397, 0.06105325371026993, 0.046490758657455444, 0.03092709556221962, 0.052424974739551544, 0.04073857516050339, 0.03485896810889244, 0.005797692574560642, -0.023518426343798637, -0.03888185694813728, -0.03205568715929985, -0.02357303537428379, 0.05857762694358826, -0.03808091953396797, 0.00033249129774048924, -0.01174101047217846, -0.04521654173731804, -0.03363936021924019, 0.06014309823513031, 0.026267096400260925, -0.012933313846588135, -0.08489933609962463, -0.007745426148176193, -0.029234204441308975, 0.010494096204638481, 0.05741262808442116, 0.0012287104036659002, 0.012842298485338688, 0.032365139573812485, 0.012287103570997715, -0.009583940729498863, 0.007727222982794046, -0.04244966804981232, 0.04609028995037079, 0.0493304468691349, 0.04183076322078705, -0.040228888392448425, -0.01796647533774376, -0.019732177257537842, 0.011568080633878708, 0.05217013135552406, 0.030945297330617905, 0.08278777450323105, 0.04143029451370239, 0.004723708610981703, -0.02009624056518078, 0.008059429936110973, -0.017393076792359352, -0.0012059564469382167, 0.050459038466215134, 0.019732177257537842, -0.0036633771378546953, 0.026139674708247185, 0.03243795409798622, 0.03591474890708923, -0.009392808191478252, -0.04292294755578041, 0.014498782344162464, -0.06254591047763824, 0.04798341542482376, 0.05646606534719467, 0.01560917217284441, -0.028178423643112183, -0.013952688314020634, 0.07230278104543686, 0.022972332313656807, -0.024592410773038864, 0.03169162571430206, 0.0009681782685220242, 0.07703559100627899, 0.059451378881931305, -0.024264754727482796, -0.01220518909394741, -0.029598267748951912, 0.0010387153597548604, -0.05176966264843941, 0.01015733927488327, -0.01592772640287876, 0.006648688111454248, -0.03715256229043007, -0.018913038074970245, -0.05358997359871864, 0.010839955881237984, -0.03591474890708923, 0.05133278667926788, -0.01483554020524025, -0.027486706152558327, -0.034167248755693436, 0.03322068601846695, 0.07321293652057648, 0.00243011605925858, -0.0019670743495225906, -0.0022321571595966816, -0.03760764002799988, -0.016610343009233475, -0.004612214397639036, 0.005501891952008009, -0.003210574621334672, -0.0007264181040227413, 0.012150580063462257, -0.01630089059472084, -0.006166305858641863, 0.04860232025384903, 0.013060735538601875, -0.0842440202832222, -0.020114444196224213, -0.049876537173986435, -0.06778840720653534, -0.08176840096712112, 0.046745602041482925, -0.027432097122073174, -0.05486419424414635, -0.0004977414500899613, 0.08067621290683746, 0.029998736456036568, 0.04317779093980789, -0.04157591611146927, -0.01015733927488327, 0.010148237459361553, 0.05024060234427452, 0.03252897039055824, 0.025011081248521805, -0.007440523710101843, 0.07674434036016464, 0.04780138283967972, 0.07324934005737305, 0.02708623744547367, -0.054937005043029785, 0.027359284460544586, -0.016319094225764275, -0.04379669949412346, 0.00004774762783199549, -0.028615299612283707, 0.015199602581560612, -0.03438568860292435, -0.00046617042971774936, 0.0071219694800674915, -0.0012605658266693354, 0.019022256135940552, -0.038517795503139496, -0.02679498679935932, -0.024628816172480583, 0.005237946752458811, 0.0706280916929245, 0.01651022583246231, -0.014280344359576702, 0.027140846475958824, -0.004298211075365543, -0.007950210943818092, 0.008537261746823788, -0.03982841968536377, -0.03935513645410538, 0.009492925368249416, -0.008632827550172806, -0.029871314764022827, -0.02051491290330887, 0.025138502940535545, 0.017447687685489655, 0.0790015235543251, -0.005856852512806654, 0.023591239005327225, -0.00815044529736042, -0.03556888923048973, -0.05133278667926788, 0.030908891931176186, 0.004489343613386154, 0.05431810021400452, 0.010275659151375294, -0.016774171963334084, -0.0016974406316876411, -0.05173325538635254, -0.03398521989583969, 0.0790015235543251, -0.03722537308931351, -0.038044512271881104, 0.01734757050871849, 0.00439832778647542, -0.04325060546398163, -0.0463087297976017, -0.08329746127128601, -0.017820850014686584, 0.021916551515460014, -0.0016462443163618445, 0.058905284851789474, 0.055774349719285965, -0.05027700588107109, -0.0216981153935194, -0.054572943598032, -0.0109946820884943, 0.032747406512498856, 0.010685229673981667, -0.017957374453544617, -0.052424974739551544, 0.02825123630464077, -0.056102003902196884, 0.018403351306915283, 0.0071128676645457745, -0.033493734896183014, 0.018230421468615532, -0.03975560516119003, -0.032619982957839966, -0.001108114724047482, 0.026758581399917603, -0.006721500772982836, 0.03158240765333176, 0.056902941316366196, 0.004673650022596121, -0.036715686321258545, 0.016810577362775803, 0.040010448545217514, -0.00954753439873457, -0.10011713951826096, -0.0352594368159771, 0.06818887591362, -0.002216229448094964, -0.0017349845729768276, -0.02248084917664528, 0.024392176419496536, -0.007918355986475945, 0.05417247489094734, -0.04008326306939125, -0.04743732139468193, 0.010275659151375294, 0.07477840036153793, 0.03227412700653076, -0.01207776740193367, 0.01967756822705269, 0.07208433747291565, -0.027341080829501152, -0.002773699816316366, -0.020824365317821503, 0.03564170002937317, -0.04568982124328613, -0.035459671169519424, 0.0011285932268947363, -0.029197799041867256, 0.022134989500045776, 0.012478236109018326, 0.035878341645002365, -0.014598899520933628, -0.010339369997382164, -0.025484362617135048, 0.05304387956857681, -0.055264662951231, -0.13273712992668152, -0.023645848035812378, 0.03172803297638893, 0.021115614101290703, -0.01567288301885128, 0.015945930033922195, -0.0084644490852952, 0.04499810189008713, 0.0030968051869422197, 0.012523744255304337, -0.022717488929629326, -0.01796647533774376, 0.01080354955047369, 0.009647651575505733, -0.04940325766801834, -0.008428042754530907, 0.01381616573780775, 0.026521939784288406, -0.04033810645341873, 0.0054472824558615685, -0.03398521989583969, 0.0100936284288764, -0.030107954517006874, -0.11963088065385818, 0.0021491055376827717, 0.07397746294736862, -0.044233571738004684, 0.00827786698937416, 0.012023158371448517, 0.020751552656292915, -0.047837790101766586, -0.01562737487256527, -0.039063889533281326, -0.024792645126581192, -0.010102729313075542, -0.016683155670762062, 0.05027700588107109, -0.01596413366496563, 0.012532845139503479, -0.02679498679935932, -0.029853111132979393, -0.003142312867566943, 0.03154600039124489, 0.0036201446782797575, 0.00972046423703432, 0.00946562085300684, 0.01517229713499546, 0.043359823524951935, -0.06189059466123581, 0.018330538645386696, 0.030708657577633858, -0.0022253310307860374, 0.028906548395752907, 0.03869982436299324, 0.0017691153334453702, -0.06047075241804123, -0.022553661838173866, 0.03496818616986275, -0.05712137743830681, 0.01268757227808237, 0.002898846287280321, 0.02461061254143715, -0.05034982040524483, -0.035459671169519424, 0.05308028683066368, 0.009938901290297508, -0.050495445728302, 0.009875190444290638, -0.011249525472521782, 0.005319860763847828, 0.01579120382666588, -0.055555909872055054, -0.016473820433020592, -0.05020419508218765, -0.0011604486498981714, -0.05431810021400452, -0.044488415122032166, -0.006139000877737999, -0.03160060942173004, 0.0801665261387825, 0.011959447525441647, 0.04707325994968414, -0.015063079074025154, 0.006434801500290632, 0.035459671169519424, 0.01086726039648056, 0.015509054996073246, -0.0249018631875515, 0.024046316742897034, -0.06520356237888336, -0.003413084428757429, 0.005906911101192236, -0.02708623744547367, -0.010812651365995407, 0.044197168201208115, -0.00827331654727459, -0.02144327014684677, -0.012824095785617828, 0.05428169295191765, -0.021807333454489708, -0.05821356549859047, -0.049548882991075516, -0.024974675849080086, 0.10936432331800461, 0.004432458896189928, 0.0027554966509342194, -0.003986482508480549, -0.007982066832482815, 0.0019204288255423307, -0.03615139052271843, 0.045726228505373, -0.04973091557621956, -0.032619982957839966, 0.046782009303569794, -0.024428581818938255, 0.003265183884650469, -0.002973934169858694, 0.014780930243432522, -0.0005426803836598992, 0.0290885791182518, -0.014935657382011414, -0.009374604560434818, -0.005338063929229975, -0.029179595410823822, 0.04346904158592224, -0.05169685184955597, -0.03354834392666817, 0.032747406512498856, -0.05723059922456741, 0.026758581399917603, 0.07601621747016907, -0.06123528257012367, -0.041648730635643005, 0.03469514101743698, 0.00961124524474144, 0.05122356861829758, 0.01011183112859726, 0.01641921140253544, 0.02615787833929062, -0.023918895050883293, 0.0021616199519485235, -0.0011268866946920753, 0.08693808317184448, 0.046199508011341095, -0.005265251267701387, 0.06418418884277344, 0.01776624098420143, -0.011750111356377602, -0.004773767199367285, -0.027978189289569855, 0.04998575896024704, 0.06181778386235237, -0.044524822384119034, -0.02186194248497486, 0.0758705884218216, 0.02386428602039814, 0.0551554411649704, -0.05621122196316719, -0.019040459766983986, 0.018330538645386696, 0.005128728225827217, -0.027013424783945084, -0.05810434743762016, -0.01980498991906643, -0.0492212250828743, 0.06982715427875519, 0.04015607386827469, 0.014744523912668228, 0.04547138512134552, -0.02390069141983986, -0.020551318302750587, -0.015900421887636185, -0.03280201554298401, -0.033584751188755035, -0.004664548672735691, -0.026612956076860428, 0.016319094225764275, -0.008682886138558388, 0.013315579853951931, -0.05373559892177582, -0.05500981584191322, 0.02260827086865902, 0.003231053240597248, 0.04128466919064522, 0.04973091557621956, 0.022007567808032036, -0.00511052506044507, 0.027468502521514893, 0.03212850168347359, -0.05115075781941414, -0.060252316296100616, -0.012605657801032066, 0.004550779238343239, 0.01889483444392681, 0.05176966264843941, 0.01633729599416256, 0.013433899730443954, 0.02118842676281929, 0.0705188736319542, 0.022753896191716194, -0.06979075074195862, 0.0427045114338398, 0.016146164387464523, 0.07321293652057648, -0.006671442184597254, 0.03260178118944168, -0.02624889463186264, 0.0031445883214473724, -0.012587455101311207, -0.0570121593773365, 0.026813190430402756, -0.08140433579683304, 0.0937824547290802, 0.01314265001565218, 0.07284887135028839, -0.0060934931971132755, 0.03493177890777588, -0.039682794362306595, 0.01559096947312355, -0.0801665261387825, -0.020878974348306656, -0.05264341086149216, -0.012168783694505692, 0.027486706152558327, -0.008478101342916489, 0.042777322232723236, -0.03480435907840729, 0.012933313846588135, -0.040847793221473694, -0.011722806841135025 ]
717,412
pytorch_optimizer.optimizer.pcgrad
set_grad
null
def set_grad(self, grads: List[torch.Tensor]): idx: int = 0 for group in self.optimizer.param_groups: for p in group['params']: p.grad = grads[idx] idx += 1
(self, grads: List[torch.Tensor])
[ -0.01965370774269104, 0.0022653841879218817, -0.033673956990242004, 0.044125743210315704, -0.08071605861186981, 0.020015988498926163, -0.020323926582932472, -0.021845504641532898, 0.012100162915885448, 0.03443474695086479, -0.054269593209028244, -0.0329856239259243, 0.04108259081840515, 0.04629942774772644, -0.0007624868885613978, -0.016039961948990822, -0.04133618623018265, 0.08136816322803497, 0.026047956198453903, -0.007032766938209534, -0.03434417396783829, -0.06778264790773392, 0.0025857759173959494, 0.01680980809032917, -0.03644540160894394, -0.017842305824160576, 0.04615451395511627, 0.0304134339094162, 0.005968568380922079, 0.020360155031085014, -0.019708050414919853, -0.08187535405158997, -0.01728077232837677, 0.014889721758663654, 0.025087913498282433, -0.03122856467962265, -0.017842305824160576, 0.011112948879599571, -0.030685143545269966, 0.04358232393860817, 0.06336282938718796, -0.006928611546754837, 0.023041028529405594, 0.0024453923106193542, 0.027026113122701645, 0.03262334316968918, -0.017869478091597557, 0.030214179307222366, -0.014047419652342796, 0.008364147506654263, 0.0020332983694970608, -0.03403623774647713, 0.012408100999891758, -0.03756847232580185, 0.04774854704737663, 0.03742355853319168, 0.025087913498282433, 0.012471500784158707, 0.06118914857506752, -0.052240822464227676, 0.06285563856363297, -0.10817690938711166, -0.015913164243102074, -0.015478427521884441, 0.003627331927418709, -0.03124667890369892, -0.07357913255691528, -0.012181675992906094, 0.034797027707099915, 0.0029752273112535477, -0.004360949620604515, 0.054269593209028244, -0.004401706159114838, -0.061116691678762436, -0.02458072081208229, 0.022388923913240433, -0.018603095784783363, 0.007159565109759569, -0.041481100022792816, -0.01529728714376688, -0.014400643296539783, 0.021610021591186523, -0.029598303139209747, 0.03398189693689346, 0.0027623875066637993, -0.009555144235491753, -0.05589985474944115, -0.05358126014471054, 0.05347257852554321, -0.09462762624025345, 0.04760363698005676, -0.02237081155180931, 0.013123605400323868, -0.023819932714104652, -0.007535431068390608, 0.04340118542313576, -0.008241877891123295, -0.02871071733534336, -0.03847417235374451, 0.010234419256448746, -0.01665583811700344, -0.04941503703594208, -0.01284283772110939, 0.004419819917529821, 0.04441557079553604, -0.07397764176130295, -0.0029005068354308605, -0.0631454586982727, 0.03490570932626724, -0.018512524664402008, -0.010922752320766449, -0.0030590046662837267, 0.04724135622382164, -0.016230158507823944, -0.012525842525064945, -0.022914230823516846, 0.012779438868165016, -0.03648163005709648, 0.012063935399055481, 0.02836655080318451, 0.01789664849638939, 0.04611828550696373, -0.03233351930975914, 0.06267450004816055, 0.011149177327752113, -0.00285295769572258, 0.03456154465675354, 0.09151200950145721, 0.07557167857885361, -0.06832607090473175, 0.020794890820980072, -0.016864148899912834, -0.06992010772228241, -0.01999787427484989, 0.05767503008246422, -0.032261062413454056, -0.03108365274965763, -0.023222168907523155, -0.009002665989100933, -0.031137995421886444, -0.02503357082605362, 0.022588178515434265, 0.0052077798172831535, 0.02918168157339096, 0.0037586584221571684, 0.04220565780997276, -0.014581783674657345, -0.001314398366957903, -0.05394354090094566, -0.011765053495764732, 0.014862550422549248, 0.020088445395231247, 0.0037858295254409313, -0.024363351985812187, -0.047639865428209305, 0.005864412989467382, -0.07810764014720917, 0.06053704395890236, 0.020976031199097633, 0.007127865683287382, -0.02887374348938465, -0.042386800050735474, -0.05495792627334595, 0.030974969267845154, -0.0072048502042889595, -0.03030475042760372, 0.001224960433319211, 0.004064332693815231, -0.03492382541298866, 0.02284177578985691, 0.002680874429643154, -0.08064360171556473, 0.007145979441702366, 0.035557813942432404, 0.007422218564897776, 0.052059683948755264, -0.01546031329780817, 0.02204475924372673, -0.026192868128418922, 0.010334046557545662, 0.03260523080825806, 0.01195525098592043, 0.03626426309347153, -0.06774642318487167, 0.01934576965868473, -0.0005618175491690636, -0.03191689774394035, -0.0024408637546002865, 0.010895580984652042, -0.0352136492729187, 0.040502943098545074, -0.0013744010357186198, 0.016601495444774628, -0.03376452624797821, 0.010261590592563152, 0.010497072711586952, 0.022280240431427956, -0.014183275401592255, 0.030340978875756264, 0.04582846164703369, 0.021283969283103943, -0.03282259777188301, -0.005678744055330753, 0.002115943469107151, 0.036046892404556274, 0.026863086968660355, -0.012100162915885448, -0.00018665927927941084, 0.02566756121814251, 0.006285563576966524, 0.025106027722358704, 0.025921158492565155, 0.04959617927670479, 0.03832925856113434, 0.019074060022830963, -0.010814067907631397, 0.011592970229685307, 0.041444871574640274, 0.0598849393427372, 0.007213907316327095, -0.03421737626194954, -0.05781994014978409, 0.050320737063884735, -0.020378269255161285, 0.007200321648269892, -0.020396383479237556, 0.004526239819824696, -0.06452212482690811, -0.03157272934913635, 0.012389987707138062, 0.04550240933895111, -0.030196065083146095, 0.00846830289810896, 0.001941596157848835, 0.07586149871349335, 0.010723497718572617, -0.03218860924243927, 0.013177947141230106, 0.01229941751807928, 0.01536974310874939, -0.010886523872613907, 0.012380930595099926, -0.02503357082605362, 0.05289292708039284, -0.007159565109759569, 0.059667572379112244, 0.01963559351861477, 0.0009158899774774909, 0.007444860879331827, 0.055573802441358566, -0.011801281943917274, 0.020849233493208885, -0.024037299677729607, 0.03505062311887741, -0.06886949390172958, 0.017842305824160576, 0.03401812165975571, 0.05216836929321289, 0.007526373956352472, -0.0662248432636261, 0.013431543484330177, -0.0373511016368866, -0.07919447869062424, -0.006629730109125376, 0.027497077360749245, 0.062384672462940216, 0.0798465833067894, -0.015043690800666809, -0.05006714165210724, 0.0034733626525849104, 0.07397764176130295, 0.053001612424850464, -0.01885669119656086, 0.012743210420012474, 0.04680661857128143, 0.08020886778831482, 0.011556742712855339, 0.01663772389292717, 0.026844972744584084, -0.01967182196676731, 0.10788708180189133, -0.02934470772743225, -0.04028557240962982, 0.029127338901162148, 0.0002892581978812814, 0.03832925856113434, 0.021483223885297775, 0.05926906317472458, -0.020414497703313828, 0.0053572203032672405, 0.05256687477231026, -0.006027439143508673, 0.08252745866775513, -0.030721371993422508, 0.04311136156320572, 0.020541295409202576, 0.03340224549174309, 0.048581793904304504, -0.03278636932373047, 0.016773579642176628, 0.05916037783026695, -0.027660103514790535, 0.010171020403504372, 0.05282047390937805, 0.000671916815917939, -0.04832819476723671, 0.023548221215605736, -0.017063403502106667, 0.049378808587789536, -0.01776985079050064, 0.005053810775279999, 0.018911033868789673, -0.03380075469613075, 0.014935006387531757, 0.022878002375364304, -0.09658394008874893, -0.027189139276742935, -0.04785723239183426, 0.0040348973125219345, 0.03166330233216286, -0.0119733652099967, -0.01419233251363039, 0.0022687804885208607, 0.014762924052774906, 0.0008745673694647849, 0.07789026945829391, 0.03459777310490608, 0.05108152702450752, -0.03401812165975571, 0.011094835586845875, -0.0929611325263977, -0.05340012162923813, 0.005678744055330753, 0.02459883503615856, 0.019780505448579788, 0.047639865428209305, 0.03436229005455971, -0.02093980275094509, -0.002110282890498638, -0.00451265461742878, 0.028583917766809464, -0.010515186935663223, -0.05955888703465462, 0.01403836254030466, 0.004306607414036989, 0.04140864312648773, -0.004981354810297489, 0.014310073107481003, 0.00973628368228674, 0.04470539465546608, -0.005212308373302221, -0.013458714820444584, -0.02378370426595211, 0.037966977804899216, 0.031627073884010315, 0.026355894282460213, -0.0006662561791017652, 0.0230048019438982, 0.03887268155813217, -0.024616949260234833, -0.05090038850903511, -0.012471500784158707, 0.02838466502726078, 0.06959405541419983, 0.04470539465546608, 0.0209035761654377, -0.031771983951330185, -0.02727970853447914, 0.0248886588960886, -0.016112416982650757, 0.031464047729969025, -0.01571390964090824, 0.013014920987188816, 0.02267874963581562, -0.03530421853065491, -0.02188173308968544, 0.0023616149555891752, -0.023747475817799568, 0.056515730917453766, -0.00841396115720272, -0.06481195241212845, -0.049559950828552246, 0.09977200627326965, 0.07962922006845474, 0.015252002514898777, -0.0013472300488501787, 0.03880022466182709, -0.03760469704866409, 0.031445931643247604, -0.021954188123345375, 0.0659712478518486, 0.0020095237996429205, 0.03349281847476959, 0.011330317705869675, -0.03789452463388443, -0.025486420840024948, 0.03691636770963669, 0.009052479639649391, -0.027297822758555412, -0.04405329003930092, -0.03945232927799225, -0.07151413708925247, -0.024671290069818497, 0.05307406932115555, 0.014627068303525448, 0.002683138707652688, 0.019092174246907234, 0.07897711545228958, 0.02646457776427269, 0.013395315036177635, -0.02392861619591713, 0.009383060969412327, 0.015668625012040138, 0.014608954079449177, 0.05897923931479454, 0.02898242697119713, -0.010469901375472546, 0.007245606742799282, 0.06415984779596329, 0.0370975062251091, 0.06767396628856659, -0.05227705091238022, -0.003971497993916273, 0.008984552696347237, -0.02267874963581562, -0.0490889847278595, -0.020849233493208885, -0.020813005045056343, -0.08259991556406021, -0.005742143373936415, 0.00935588963329792, -0.024472037330269814, 0.04021311551332474, -0.00855887308716774, 0.015523712150752544, -0.012435272336006165, -0.028909970074892044, 0.08752693235874176, -0.009672884829342365, -0.050501879304647446, 0.05912414938211441, -0.042749080806970596, -0.03934364393353462, -0.06444966793060303, -0.03213426470756531, -0.011656370013952255, 0.025939272716641426, -0.010488015599548817, -0.05861695855855942, 0.005968568380922079, -0.03380075469613075, 0.018766121938824654, 0.025758132338523865, 0.012226961553096771, 0.01725360006093979, 0.015587111003696918, 0.001282698824070394, -0.05470433086156845, 0.009482687339186668, 0.045248813927173615, 0.030667031183838844, -0.04792968928813934, -0.01885669119656086, 0.017552481964230537, -0.03503250703215599, 0.042531710118055344, 0.06263826787471771, 0.00872189924120903, -0.025250939652323723, -0.016547154635190964, -0.013857223093509674, -0.050175826996564865, -0.027315936982631683, -0.06477572023868561, -0.04803837090730667, -0.0034484558273106813, -0.022388923913240433, 0.04213320463895798, -0.0163207296282053, -0.023367080837488174, -0.028131067752838135, -0.0514075793325901, 0.05474055930972099, 0.0389813631772995, 0.00764864357188344, 0.004763986449688673, -0.0339275524020195, 0.0000044842804527434055, -0.055718716233968735, 0.03142781928181648, 0.033347904682159424, -0.10252533107995987, -0.0005332313594408333, -0.014781037345528603, 0.02566756121814251, -0.0004596431681420654, 0.02237081155180931, 0.0071867359802126884, 0.03457965701818466, -0.0099174240604043, -0.018349498510360718, -0.0008819262147881091, -0.014482156373560429, -0.008576987311244011, 0.02249760925769806, -0.03407246619462967, -0.0030657972674816847, 0.04807459935545921, -0.021791161969304085, -0.0014978027902543545, 0.004990411456674337, -0.00023123674327507615, -0.07223869860172272, 0.060645729303359985, -0.0012804345460608602, -0.04079276695847511, -0.02724348194897175, 0.022570064291357994, 0.02345765195786953, -0.019055945798754692, 0.013141718693077564, 0.04466916620731354, -0.017498139292001724, 0.022533835843205452, 0.020251471549272537, 0.02470751851797104, 0.006004796363413334, -0.02014278620481491, 0.005438733380287886, -0.011112948879599571, -0.0028054083231836557, 0.03847417235374451, 0.0018793292110785842, 0.04666170850396156, 0.003704316448420286, -0.016909435391426086, 0.0596313439309597, -0.058725643903017044, -0.053545031696558, -0.02110282890498638, 0.010334046557545662, 0.01631167158484459, 0.015233888290822506, -0.04079276695847511, 0.0004955881740897894, 0.008436603471636772, -0.04691530391573906, -0.03202558308839798, 0.014962177723646164, -0.02566756121814251, -0.04361855238676071, 0.006425947416573763, -0.08136816322803497, 0.01994353160262108, -0.02836655080318451, -0.013277574442327023, -0.04332872852683067, -0.01632978580892086, -0.017217373475432396, 0.027859358116984367, -0.01806873083114624, -0.07307194173336029, 0.04169846698641777, 0.031608957797288895, -0.002400107216089964, -0.0230048019438982, 0.012489614076912403, -0.038908906280994415, -0.03505062311887741, 0.004109617322683334, -0.021446995437145233, -0.04865424707531929, -0.02633778005838394, 0.02613852545619011, -0.038111891597509384, 0.009170221164822578, 0.029127338901162148, -0.024363351985812187, 0.008903039619326591, -0.04072031006217003, -0.012978692539036274, -0.005479489918798208, -0.030033038929104805, 0.009097765199840069, 0.03200746700167656, 0.06684072315692902, -0.018820462748408318, 0.0532914362847805, 0.02026958391070366, -0.027605760842561722, -0.03360150009393692, 0.005298350006341934, -0.00879888329654932, -0.03985083848237991, -0.056696873158216476, 0.033836983144283295, -0.06397870928049088, -0.022606292739510536, 0.017307942733168602, 0.014373471960425377, -0.03293128311634064, -0.02693554200232029, 0.03631860390305519, 0.0012906236806884408, -0.03251466155052185, 0.01571390964090824, -0.014011192135512829, 0.025269053876399994, 0.020668093115091324, -0.019128400832414627, -0.0313553623855114, 0.004197923466563225, 0.02537773735821247, -0.023892387747764587, -0.05702292546629906, -0.05401599779725075, -0.01808684505522251, 0.0934683233499527, 0.024363351985812187, 0.041481100022792816, -0.04014066234230995, 0.002884657122194767, -0.0015193131985142827, 0.004111881833523512, 0.004634924232959747, -0.023693133145570755, 0.004886256065219641, -0.07046352326869965, 0.005153437610715628, -0.0020933011546730995, -0.06274695694446564, -0.0070554097183048725, 0.0408652201294899, -0.01515237521380186, 0.011067664250731468, -0.06321791559457779, 0.03372829779982567, -0.059196606278419495, -0.007105222903192043, -0.08955569565296173, -0.01006233599036932, 0.06187748163938522, 0.03789452463388443, 0.008373204618692398, -0.013485885225236416, 0.02249760925769806, -0.028746943920850754, -0.01856686733663082, 0.009881196543574333, -0.035738956183195114, 0.011266917921602726, 0.041626010090112686, -0.0664784386754036, 0.01298774965107441, 0.035901982337236404, 0.035720840096473694, 0.0056108166463673115, 0.027062341570854187, 0.01885669119656086, -0.022388923913240433, 0.008744541555643082, 0.004836442414671183, 0.04101013392210007, -0.03137347847223282, -0.018521582707762718, 0.032895054668188095, -0.03249654546380043, 0.010089507326483727, 0.03988706320524216, -0.03774961084127426, -0.06800001859664917, -0.006539159920066595, -0.06361642479896545, 0.040502943098545074, 0.04296644777059555, -0.04582846164703369, 0.014065533876419067, -0.03999574854969978, -0.020867347717285156, 0.002198588801547885, 0.007653172127902508, 0.023222168907523155, 0.020740550011396408, 0.028131067752838135, -0.002599361352622509, 0.046226970851421356, 0.005565531551837921, 0.005017582792788744, 0.04474162310361862, 0.06774642318487167, -0.026863086968660355, -0.045248813927173615, 0.04995845630764961, 0.010207248851656914, 0.016701122745871544, -0.04481407627463341, 0.006371605210006237, -0.03438040241599083, 0.006996538955718279, -0.027026113122701645, -0.02709856815636158, -0.017398513853549957, -0.06198616698384285, 0.06560897082090378, -0.0010177813237532973, -0.020160900428891182, 0.05597231164574623, 0.005710443947464228, -0.04166223853826523, -0.03173575550317764, -0.018485354259610176, -0.017163030803203583, -0.006869740784168243, 0.023077256977558136, 0.03601066395640373, -0.0149712348356843, 0.04673416167497635, -0.07260097563266754, -0.03343847393989563, 0.009926481172442436, 0.030485890805721283, 0.026681946590542793, -0.0063806623220443726, 0.01631167158484459, 0.0006464439793489873, -0.05361748859286308, 0.03851040080189705, 0.06213107705116272, -0.015768252313137054, -0.04553863778710365, 0.02883751504123211, -0.003169952891767025, 0.04767609015107155, -0.04640810936689377, -0.04521258547902107, 0.00610442366451025, 0.06607992947101593, 0.015487484633922577, -0.07774536311626434, 0.059377748519182205, -0.04441557079553604, 0.012779438868165016, -0.051914770156145096, -0.006054610013961792, -0.05829090625047684, 0.029362821951508522, -0.025287168100476265, -0.012960579246282578, 0.0021748142316937447, -0.04568355157971382, 0.08636762946844101, 0.054921697825193405, 0.005094567313790321, 0.0320436954498291, 0.05916037783026695, -0.07213001698255539, 0.04137241467833519, -0.044125743210315704, -0.024761861190199852, -0.06636975705623627, -0.033366017043590546, 0.013304744847118855, 0.01506180502474308, -0.02867448888719082, -0.01229941751807928, 0.013159832917153835, 0.00825093500316143, -0.015650510787963867 ]
717,414
pytorch_optimizer.optimizer.pcgrad
step
null
def step(self): return self.optimizer.step()
(self)
[ -0.010952540673315525, 0.014465141110122204, -0.030064471065998077, 0.05698029696941376, -0.005298524163663387, -0.001983772497624159, 0.017199043184518814, -0.02784687653183937, -0.04174492508172989, 0.010351589880883694, -0.019264282658696175, -0.018214736133813858, 0.014329715631902218, 0.05779284983873367, -0.014338179491460323, 0.009843744337558746, 0.019501278176903725, 0.03219742327928543, -0.04154178500175476, 0.04313303530216217, 0.011731238104403019, 0.0037728711031377316, 0.01987369917333126, -0.011434994637966156, -0.04106779769062996, 0.0068559180945158005, 0.053933221846818924, -0.032976120710372925, -0.007698095869272947, 0.011248784139752388, -0.0679159089922905, -0.03243441879749298, -0.022480640560388565, -0.018621012568473816, 0.0221420768648386, -0.024088818579912186, -0.02302234247326851, -0.004234164021909237, -0.024749018251895905, -0.03397488221526146, -0.052578967064619064, -0.02078782021999359, -0.01665734127163887, 0.029708977788686752, -0.0017700542230159044, -0.010647833347320557, -0.0026746545918285847, -0.028236225247383118, 0.020686252042651176, -0.05633702501654625, 0.04181263595819473, -0.037038885056972504, 0.050987716764211655, -0.0032227046322077513, 0.03465200960636139, 0.02876099944114685, 0.031334083527326584, -0.10894984751939774, 0.004236280452460051, 0.010834043845534325, 0.0397135391831398, -0.04340388625860214, 0.022057434543967247, 0.044758141040802, 0.028625573962926865, -0.04282832890748978, -0.015252301469445229, 0.03417802229523659, 0.019027289003133774, 0.035921625792980194, 0.01719057932496071, -0.00947978813201189, 0.036395613104104996, 0.006034900899976492, -0.04171106591820717, -0.01850251480937004, -0.027051251381635666, -0.005239275749772787, 0.05271439254283905, -0.03944268822669983, -0.01678430289030075, 0.03582005575299263, -0.013771085068583488, -0.026170985773205757, -0.007516117766499519, -0.03588777035474777, -0.004744125995784998, -0.029285773634910583, -0.05041215941309929, -0.005692104808986187, -0.0041579874232411385, 0.02879485674202442, 0.022548353299498558, 0.0505814403295517, 0.012239083647727966, 0.03896870091557503, -0.07109840959310532, -0.02168501541018486, -0.0416094996035099, -0.039341121912002563, 0.0423881933093071, 0.09886064380407333, 0.021989721804857254, 0.040052104741334915, 0.052409686148166656, -0.016809696331620216, 0.0015140152536332607, -0.040289100259542465, -0.0046425568871200085, -0.008988870307803154, -0.0068813106045126915, 0.05687872692942619, -0.06547825038433075, 0.017960812896490097, -0.03879941999912262, -0.006229574792087078, 0.005603231955319643, 0.007723487913608551, -0.000008819522008707281, 0.08369298279285431, -0.01850251480937004, 0.0045960042625665665, -0.043742451816797256, -0.011020253412425518, -0.022853059694170952, 0.0173344686627388, 0.04929489642381668, 0.030166039243340492, -0.00925125740468502, -0.043742451816797256, 0.031841930001974106, -0.058063700795173645, -0.023580972105264664, 0.007152161560952663, -0.021160241216421127, 0.023868752643465996, 0.05630316957831383, -0.007985875010490417, -0.009776031598448753, 0.04086465761065483, 0.007829288952052593, 0.02669575996696949, 0.028693286702036858, -0.00611530989408493, 0.02644183672964573, 0.017910027876496315, -0.019010361284017563, 0.0685591846704483, 0.01987369917333126, 0.0025519251357764006, 0.0004946206463500857, -0.005573607515543699, 0.08626607060432434, -0.03700502961874008, 0.018384017050266266, 0.007478029001504183, -0.028913352638483047, 0.004031025804579258, -0.02239600010216236, -0.060569074004888535, -0.04858391359448433, -0.05156327411532402, -0.00923432968556881, -0.005717497318983078, 0.0017488938756287098, 0.03141872584819794, -0.00741031626239419, 0.09547501057386398, -0.08626607060432434, 0.00741031626239419, 0.011908983811736107, -0.019704416394233704, 0.01824859157204628, 0.03145258128643036, -0.028168512508273125, 0.1005534678697586, 0.03446580097079277, 0.061043065041303635, 0.01565011404454708, 0.0005956607637926936, 0.020652394741773605, 0.004896479658782482, -0.03424573317170143, -0.044825855642557144, -0.012052873149514198, -0.02168501541018486, 0.0015404655132442713, -0.012298332527279854, 0.02488444373011589, 0.04387787729501724, 0.015167661011219025, 0.006508890073746443, 0.02987826056778431, -0.038020722568035126, 0.0017340817721560597, -0.002638682024553418, 0.011375745758414268, 0.027474457398056984, 0.10739245265722275, 0.02916727587580681, -0.03170650452375412, -0.024935228750109673, 0.02011069282889366, 0.020381543785333633, -0.03165572136640549, 0.02441045455634594, -0.04215120151638985, 0.04123707860708237, -0.02281920425593853, 0.025409217923879623, -0.050784580409526825, -0.025460002943873405, 0.03646332770586014, 0.033196184784173965, 0.0298613328486681, -0.07908851653337479, -0.011502707377076149, -0.014744455926120281, 0.03825771436095238, 0.024952156469225883, 0.013051636517047882, -0.05887625366449356, 0.030182968825101852, -0.035684630274772644, 0.021972794085741043, -0.0885683074593544, -0.004166451282799244, -0.04353931173682213, -0.051664844155311584, -0.04797449707984924, -0.02852400578558445, -0.04936261102557182, 0.02644183672964573, -0.004871087614446878, 0.05501662567257881, 0.05640473961830139, -0.06236346438527107, 0.007046360522508621, -0.028811784461140633, -0.009318970143795013, -0.053526945412158966, -0.043945588171482086, -0.011426529847085476, 0.025933992117643356, -0.0799010694026947, 0.03588777035474777, 0.06442870199680328, -0.027948446571826935, 0.024105746299028397, 0.03537992388010025, 0.021143313497304916, -0.044622715562582016, -0.043911732733249664, 0.013542554341256618, 0.011206463910639286, 0.027254391461610794, 0.08965171128511429, 0.022192860022187233, 0.025629283860325813, 0.025036796927452087, -0.01013152301311493, -0.03758058696985245, -0.04855005815625191, 0.02075396478176117, -0.06260045617818832, 0.056946441531181335, -0.004473275039345026, -0.022294430062174797, 0.037546731531620026, 0.05024287477135658, 0.13149820268154144, 0.037749871611595154, -0.07184325158596039, -0.02193893864750862, -0.004777982365339994, 0.007156393490731716, -0.012721536681056023, 0.058097559958696365, -0.0635145828127861, -0.04590925946831703, 0.05711572244763374, -0.029048779979348183, -0.09445931762456894, -0.030182968825101852, -0.13027937710285187, 0.023106982931494713, 0.01074093859642744, 0.02009376510977745, 0.02095710299909115, -0.010114595293998718, 0.0034766276367008686, 0.03104630671441555, 0.055118195712566376, -0.0012918327702209353, 0.09378218650817871, -0.013280167244374752, -0.06155090779066086, -0.020940175279974937, -0.000033542288292665035, 0.07482261210680008, 0.012840034440159798, -0.06026436761021614, -0.1025848463177681, 0.03328082710504532, -0.015523153357207775, 0.07346835732460022, 0.027931518852710724, 0.016699662432074547, 0.0017721701879054308, -0.025629283860325813, -0.0483807735145092, 0.006123773753643036, -0.013500234112143517, 0.013195526786148548, -0.016301849856972694, -0.06341300904750824, -0.03761444613337517, -0.011358817107975483, -0.02622177079319954, 0.05677716061472893, -0.023327050730586052, 0.044351864606142044, -0.016945121809840202, 0.009801424108445644, -0.026424909010529518, -0.017673034220933914, 0.04807606711983681, -0.016301849856972694, -0.021058671176433563, -0.06232960522174835, -0.014541317708790302, -0.031130947172641754, 0.027559097856283188, 0.030182968825101852, -0.004731429740786552, -0.009175080806016922, 0.04834691807627678, 0.026340268552303314, -0.008273654617369175, 0.0043039931915700436, 0.06632465869188309, 0.008464096114039421, 0.013424056582152843, 0.009200473316013813, 0.0579959899187088, -0.012865426950156689, 0.03720816969871521, -0.019789056852459908, 0.08315128087997437, -0.00007280445424839854, -0.031841930001974106, 0.0021519965957850218, -0.03670032322406769, -0.010343126021325588, -0.021600374951958656, 0.017436038702726364, -0.006987111642956734, -0.02579856663942337, -0.0178084596991539, -0.034584298729896545, -0.016149496659636497, 0.031841930001974106, -0.01174816582351923, 0.07279122620820999, 0.055287476629018784, -0.025663141161203384, -0.05572761222720146, 0.0007300283177755773, -0.008066283538937569, 0.009420539252460003, -0.03060617297887802, -0.029302701354026794, 0.01345791295170784, 0.042320482432842255, -0.02805001474916935, 0.02168501541018486, 0.0014759268378838897, 0.029488911852240562, 0.016141032800078392, 0.035955481231212616, 0.03907027095556259, 0.024054961279034615, -0.043471600860357285, 0.01005534641444683, 0.035041358321905136, 0.021955866366624832, -0.028422435745596886, -0.041406359523534775, 0.024071890860795975, -0.07949479669332504, 0.019704416394233704, -0.019298139959573746, -0.061280056834220886, -0.03265448287129402, -0.016428811475634575, -0.015497760847210884, 0.01846865937113762, 0.01939970999956131, -0.06656165421009064, 0.002350902883335948, -0.011925911530852318, -0.00637769652530551, -0.010478551499545574, 0.03326389938592911, -0.009894528426229954, -0.08497952669858932, 0.015345406718552113, 0.06293901801109314, 0.00627612741664052, -0.0043717059306800365, -0.015861716121435165, 0.003146527800709009, -0.04242205247282982, 0.01777460239827633, -0.004896479658782482, -0.03724202513694763, -0.006229574792087078, 0.00993684958666563, 0.008142461068928242, 0.03338239714503288, 0.03967968374490738, 0.056032318621873856, 0.020601611584424973, 0.02121102623641491, 0.011054109781980515, -0.033873312175273895, -0.00880266074091196, -0.007118305191397667, -0.02574778161942959, 0.020635467022657394, -0.0642932802438736, -0.03907027095556259, -0.012992387637495995, 0.0428621843457222, -0.0196197759360075, -0.0014156200923025608, -0.01916271448135376, -0.009403611533343792, 0.03582005575299263, 0.01758839190006256, 0.016555773094296455, -0.0024461238645017147, 0.0178084596991539, -0.008514881134033203, -0.0064919618889689445, -0.03849470987915993, 0.0416094996035099, -0.07570287585258484, -0.0502767339348793, 0.03781758248806, 0.02461359277367592, -0.02622177079319954, 0.03497364744544029, -0.0416094996035099, -0.009623677469789982, 0.01982291415333748, -0.08166160434484482, -0.038900986313819885, -0.010470087639987469, -0.0055905357003211975, 0.03328082710504532, 0.05772513896226883, -0.00912429578602314, -0.005844458471983671, -0.002712742891162634, -0.015683971345424652, 0.0027148588560521603, 0.06974415481090546, -0.004409794230014086, 0.022853059694170952, 0.012366045266389847, 0.015421583317220211, -0.03944268822669983, -0.05907939374446869, 0.03863013535737991, 0.011426529847085476, -0.04100008308887482, 0.020195333287119865, 0.022751491516828537, -0.039374977350234985, -0.03839313983917236, -0.061720192432403564, 0.031334083527326584, 0.02554464340209961, 0.01484602503478527, 0.03791915252804756, -0.037716012448072433, -0.007059056311845779, 0.045265987515449524, 0.00005862048055860214, -0.010664761997759342, -0.028625573962926865, 0.03326389938592911, -0.021126383915543556, -0.027305174618959427, 0.00424262834712863, 0.0534253753721714, 0.012272940017282963, 0.05518591031432152, 0.03622633218765259, -0.0013330952497199178, 0.02713589370250702, 0.029065707698464394, -0.014304323121905327, -0.010554728098213673, -0.01119800005108118, 0.01323784701526165, 0.0020334990695118904, -0.04546912759542465, 0.04817763715982437, 0.052172690629959106, -0.005764049477875233, -0.03863013535737991, 0.02283613197505474, 0.043437741696834564, -0.02896413765847683, -0.0029603177681565285, 0.0433361753821373, 0.04536755755543709, -0.023411691188812256, 0.007135233376175165, -0.03394102677702904, 0.018079310655593872, -0.03353475034236908, -0.008392151445150375, 0.019061144441366196, -0.027339031919836998, -0.03165572136640549, 0.008392151445150375, 0.021955866366624832, 0.058300696313381195, 0.02141416445374489, 0.03510907292366028, 0.10461623221635818, 0.021549589931964874, 0.028185442090034485, -0.0020895737688988447, -0.043234605342149734, -0.05450878292322159, 0.0056836409494280815, -0.00043352044303901494, -0.04868548363447189, 0.0067670452408492565, -0.001652614795602858, 0.0036670698318630457, 0.04154178500175476, -0.01987369917333126, 0.018671797588467598, -0.039137981832027435, 0.0006242271047085524, -0.028828712180256844, 0.04729736968874931, -0.002281073946505785, 0.025019869208335876, 0.07698941975831985, 0.05081843584775925, 0.014118112623691559, 0.049633461982011795, 0.03785143792629242, 0.013305559754371643, -0.022023579105734825, -0.06354843825101852, 0.04719580337405205, -0.029302701354026794, 0.03531220927834511, -0.008409080095589161, 0.006026436574757099, 0.012484542094171047, -0.01960284821689129, 0.00851064920425415, 0.0241903867572546, 0.007651543244719505, -0.013576410710811615, 0.00992838479578495, 0.0015182472998276353, 0.0013553134631365538, -0.005780977662652731, 0.01565011404454708, -0.0589439682662487, -0.03670032322406769, 0.014507461339235306, 0.00673318887129426, 0.04882090911269188, 0.019501278176903725, -0.04452114552259445, 0.012611503712832928, -0.07353606820106506, 0.008172085508704185, -0.0239533931016922, -0.0036035890225321054, -0.041169364005327225, -0.013085492886602879, -0.08579207956790924, -0.031097089871764183, -0.014482068829238415, -0.01140113826841116, -0.021346451714634895, -0.020398473367094994, 0.03394102677702904, 0.029133420437574387, -0.029150348156690598, -0.018993431702256203, 0.03126637265086174, 0.05545676127076149, 0.01594635844230652, 0.017046689987182617, -0.04448729008436203, 0.03378867357969284, -0.009471324272453785, -0.03124944493174553, 0.008481024764478207, -0.04814378172159195, 0.014515925198793411, -0.029370414093136787, -0.09405303746461868, -0.012298332527279854, 0.054610349237918854, -0.02810079976916313, 0.04110165312886238, 0.016352634876966476, 0.00031079104519449174, -0.0029370414558798075, -0.016953585669398308, -0.0028735606465488672, 0.011434994637966156, -0.004816070664674044, 0.05047987028956413, -0.035041358321905136, 0.02832086756825447, -0.05928253009915352, -0.053019098937511444, 0.009065046906471252, 0.012247547507286072, -0.09276649355888367, 0.013855725526809692, -0.00019864176283590496, -0.02121102623641491, 0.0330946184694767, -0.05081843584775925, -0.046654101461172104, -0.01845172978937626, 0.0924956426024437, -0.013347879983484745, -0.013652587309479713, -0.021600374951958656, -0.052375830709934235, -0.04337003082036972, 0.030538460239768028, 0.06273588538169861, 0.033433180302381516, -0.016124103218317032, 0.04810992255806923, -0.02080474980175495, 0.020669324323534966, 0.02486751601099968, -0.05095386132597923, 0.029133420437574387, 0.02122795395553112, 0.0070167360827326775, -0.08660463243722916, -0.024139603599905968, 0.0214310921728611, -0.02080474980175495, -0.04865162819623947, 0.009649069979786873, 0.009268186055123806, -0.010182308033108711, -0.03350089490413666, -0.02598477527499199, -0.05139399319887161, -0.05108928680419922, -0.030961664393544197, -0.011536563746631145, 0.029336558654904366, -0.0013891698326915503, -0.0013066448736935854, 0.01917964220046997, -0.0669679343700409, -0.0029074172489345074, -0.025493858382105827, -0.007901233620941639, -0.0009141224436461926, -0.02832086756825447, -0.008624914102256298, 0.014744455926120281, 0.012543790973722935, -0.03446580097079277, 0.01678430289030075, 0.023597901687026024, 0.010977933183312416, -0.05725114792585373, -0.02303927019238472, 0.001250570290721953, 0.03383945673704147, 0.027085108682513237, -0.04008596017956734, 0.011011789552867413, -0.012670752592384815, 0.07279122620820999, -0.028913352638483047, 0.028371650725603104, -0.004938800353556871, -0.023817967623472214, -0.02551078610122204, 0.023360906168818474, 0.05938410013914108, 0.013449449092149734, -0.022243645042181015, -0.010233093053102493, -0.012645360082387924, 0.02945505641400814, -0.004892247729003429, -0.06872846186161041, 0.012213691137731075, 0.012459149584174156, 0.023090055212378502, -0.08552122861146927, 0.0006776567315682769, -0.03282376751303673, 0.04844848811626434, -0.054847344756126404, -0.04313303530216217, 0.002175272675231099, 0.005734425503760576, -0.05318838357925415, 0.042117342352867126, -0.005878314841538668, -0.005027673207223415, 0.0065596746280789375, 0.037749871611595154, -0.06801748275756836, -0.01472752820700407, 0.013965759426355362, -0.01414350513368845, -0.021955866366624832, 0.022649921476840973, 0.01572629064321518, 0.005467806477099657, 0.06290516257286072, -0.010580120608210564, 0.06459798663854599, 0.037038885056972504, 0.015489296056330204, -0.03951040282845497, 0.061009205877780914, 0.02468130551278591, -0.030673885717988014, -0.0017235015984624624, 0.02327626571059227, -0.07238495349884033, 0.0654105395078659, 0.015023771673440933, 0.06134777143597603, 0.006352304480969906, 0.01438896358013153, -0.02508758194744587, 0.03055538795888424, -0.016792766749858856, -0.008701090700924397, 0.005353541113436222, -0.03135101497173309, -0.0698118656873703, 0.060602929443120956, 0.0321466401219368, -0.024342741817235947, 0.02854093350470066, 0.03355167806148529, 0.02689889818429947 ]
717,424
pytorch_optimizer.optimizer.pcgrad
zero_grad
null
def zero_grad(self): return self.optimizer.zero_grad(set_to_none=True)
(self)
[ -0.05114216357469559, 0.0024147555232048035, 0.06340371072292328, 0.011239748448133469, -0.03633049875497818, -0.0083184614777565, -0.047439247369766235, 0.003563183592632413, 0.024296021088957787, 0.0002138292184099555, -0.04132594168186188, 0.03825182467699051, 0.022357231006026268, 0.007567398715764284, -0.0029911529272794724, 0.05337788909673691, -0.004672311712056398, 0.0024758887011557817, 0.05648694187402725, -0.012366343289613724, -0.0026985874865204096, -0.0853068083524704, 0.028278402984142303, 0.04656592011451721, -0.06822448968887329, -0.06256531178951263, -0.019807109609246254, -0.007899263873696327, -0.00020605113240890205, -0.004672311712056398, -0.030950790271162987, -0.029291465878486633, -0.01671552285552025, 0.009466889314353466, 0.0467405840754509, -0.014348800294101238, 0.00012096975842723623, 0.02525668404996395, -0.0063185375183820724, -0.023544957861304283, 0.05124696344137192, -0.026479344815015793, -0.057045869529247284, 0.011868545785546303, 0.0053753419779241085, -0.026479344815015793, 0.021728433668613434, 0.008838092908263206, -0.007065234240144491, 0.015798527747392654, 0.03521263971924782, 0.04478432610630989, 0.013396871276199818, 0.025868013501167297, -0.013265872374176979, 0.012034477666020393, 0.04555285722017288, -0.04261847212910652, -0.0012237527407705784, -0.010418818332254887, 0.006410236936062574, -0.015938259661197662, 0.01105634868144989, -0.04181500896811485, 0.03926488757133484, -0.017615051940083504, -0.037168893963098526, 0.03695929795503616, 0.05058323219418526, 0.03474104031920433, -0.009632822126150131, -0.004528212361037731, -0.009798754937946796, 0.04443499445915222, 0.03453144058585167, -0.07203219830989838, -0.013973268680274487, 0.02548374980688095, -0.03563183546066284, -0.08600547164678574, -0.02876746840775013, 0.012899073772132397, -0.06116798520088196, 0.036260634660720825, 0.02649681083858013, -0.02796400524675846, -0.012095610611140728, 0.0045020123943686485, -0.00140933517832309, -0.026234813034534454, 0.029920263215899467, 0.026584144681692123, -0.0009431956568732858, -0.014427400194108486, 0.04062727838754654, 0.011903478763997555, -0.0426534041762352, -0.013929602690041065, 0.0009421039721928537, -0.01840978115797043, 0.0426534041762352, 0.04950030520558357, -0.016278859227895737, 0.049011241644620895, 0.04289793595671654, -0.04244380444288254, 0.01105634868144989, -0.04918590560555458, 0.0362955667078495, -0.010261619463562965, -0.004351363517343998, 0.03769289329648018, 0.01760631985962391, -0.007143833674490452, -0.0367496982216835, -0.005074043292552233, -0.030426792800426483, -0.006012872327119112, -0.007322866469621658, 0.046530984342098236, 0.012820473872125149, 0.04977977275848389, -0.09669502079486847, -0.05652187392115593, 0.03449650853872299, 0.01033148542046547, -0.0044845459051430225, 0.018863912671804428, 0.08062576502561569, -0.07999696582555771, 0.034356776624917984, 0.0009104458149522543, -0.031754255294799805, -0.006493203341960907, -0.04198967292904854, -0.004943043924868107, 0.048906441777944565, -0.009720155037939548, 0.013449271209537983, 0.06123785302042961, 0.005170109681785107, -0.04558778926730156, 0.028627734631299973, 0.04363153129816055, 0.023405225947499275, 0.0983019471168518, 0.032994382083415985, 0.04614672064781189, 0.013449271209537983, -0.018130317330360413, 0.02120443619787693, 0.02583308145403862, -0.0022051564883440733, -0.013492938131093979, -0.02075030468404293, 0.02572828158736229, -0.034461576491594315, -0.001835083239711821, -0.02607761323451996, -0.021186968311667442, -0.01804298348724842, 0.008659060113132, 0.019562575966119766, -0.05627734214067459, -0.006366570480167866, -0.021483901888132095, 0.0372038297355175, -0.0057814400643110275, -0.04478432610630989, 0.0372038297355175, -0.02841813676059246, -0.09047691524028778, -0.0053185755386948586, 0.027806805446743965, 0.029308931902050972, 0.09893074631690979, -0.0050216433592140675, 0.0217808336019516, -0.05627734214067459, 0.04335206747055054, 0.05987545847892761, -0.010183019563555717, -0.028488002717494965, -0.027370139956474304, 0.05446081608533859, -0.001578542753122747, -0.02572828158736229, -0.033448513597249985, 0.003945264965295792, -0.003205118468031287, 0.031073056161403656, 0.00794729683548212, 0.03432184085249901, 0.0018459998536854982, 0.03089839033782482, -0.00014355350867845118, 0.031754255294799805, 0.018811512738466263, 0.03138745576143265, -0.03512530401349068, 0.0026330878026783466, -0.020243773236870766, -0.01054108515381813, -0.02233976311981678, -0.08411908149719238, 0.024854952469468117, -0.05180589482188225, 0.03926488757133484, -0.014191601425409317, 0.02165856771171093, -0.006091471761465073, 0.0031243355479091406, 0.012226610444486141, -0.0028405035845935345, -0.00639713741838932, -0.02560601569712162, 0.013126139529049397, 0.02108217030763626, 0.02527415007352829, 0.048102978616952896, -0.074407659471035, -0.09159477800130844, 0.0049517774023115635, -0.0440157987177372, 0.016837788745760918, 0.012453676201403141, -0.0011877279030159116, -0.03881075605750084, -0.017955651506781578, -0.05991039052605629, 0.04904617369174957, -0.05159629508852959, -0.028924666345119476, -0.01860191486775875, 0.04261847212910652, 0.04897630959749222, -0.011903478763997555, -0.009012758731842041, -0.015134797431528568, -0.05033870041370392, -0.029413731768727303, -0.03982381522655487, -0.006322904024273157, 0.04097661003470421, 0.013361938297748566, 0.06011999025940895, 0.027806805446743965, 0.012541009113192558, 0.013929602690041065, 0.031003190204501152, 0.003329568076878786, -0.05023390054702759, -0.027702005580067635, 0.018654314801096916, 0.05540401116013527, -0.04300273582339287, 0.04244380444288254, 0.0108904168009758, -0.02606014721095562, -0.0220078993588686, -0.024296021088957787, -0.06780529022216797, -0.06990128010511398, 0.027125608175992966, 0.0071525671519339085, 0.03556197136640549, 0.02887226641178131, -0.015772327780723572, -0.04412059858441353, 0.053412821143865585, 0.11940158158540726, 0.003964914940297604, -0.006676602642983198, -0.031003190204501152, -0.01675918884575367, 0.036714766174554825, -0.0222349651157856, -0.009335890412330627, 0.049465373158454895, 0.05819866433739662, 0.05411148443818092, -0.04656592011451721, -0.045867256820201874, 0.02279389463365078, -0.011108748614788055, 0.03360571339726448, 0.008921058848500252, -0.01793818362057209, -0.004355730023235083, -0.010139353573322296, 0.07741191238164902, 0.0751761868596077, 0.08418894559144974, 0.001361302100121975, 0.07412819564342499, 0.012331410311162472, 0.04017314687371254, 0.0013875019503757358, 0.007004101295024157, 0.028138671070337296, 0.05393681675195694, -0.011178615503013134, -0.04478432610630989, -0.010942816734313965, 0.04513365775346756, 0.003187651978805661, 0.02368469163775444, 0.04576245695352554, 0.05470534786581993, 0.010628418065607548, -0.071089006960392, -0.04806804656982422, 0.00855426024645567, -0.0030566526111215353, -0.017091054469347, -0.004681045189499855, 0.003613400040194392, -0.03566676750779152, 0.05267922580242157, 0.049116041511297226, -0.017658717930316925, 0.005991038866341114, -0.02190309949219227, 0.013711269944906235, -0.06039945408701897, -0.009231090545654297, -0.002740070689469576, 0.021239368245005608, -0.05952612683176994, 0.009685222059488297, 0.008720193058252335, -0.043142467737197876, 0.009554223157465458, -0.014409933239221573, -0.019929375499486923, -0.010680817067623138, 0.08006682991981506, 0.02052323892712593, -0.04726458340883255, 0.0015698093920946121, 0.0031527187675237656, 0.034234508872032166, -0.04188487306237221, 0.029378797858953476, -0.01861938089132309, 0.024994684383273125, 0.0026243545580655336, -0.030828524380922318, 0.044504862278699875, -0.019457777962088585, 0.010488685220479965, 0.049011241644620895, -0.011414414271712303, 0.048102978616952896, 0.0945291668176651, 0.010418818332254887, -0.048661909997463226, 0.03647023066878319, 0.02066297084093094, -0.022986028343439102, -0.017973117530345917, 0.033553313463926315, -0.04576245695352554, 0.028051337227225304, 0.06312423944473267, -0.035090371966362, 0.0014966680901125073, -0.0071089006960392, -0.05694106966257095, -0.02640947885811329, -0.029623329639434814, -0.10018833726644516, -0.03741342946887016, -0.012340143322944641, -0.056696537882089615, -0.01544919516891241, -0.018794046714901924, -0.013126139529049397, 0.05987545847892761, 0.007637264672666788, -0.03510783985257149, -0.017824651673436165, -0.018898846581578255, 0.0041526807472109795, 0.026130013167858124, 0.007711498066782951, -0.02909933216869831, -0.014907731674611568, 0.07629404962062836, -0.05956105887889862, 0.061761848628520966, -0.029640797525644302, -0.012444943189620972, 0.010130619630217552, 0.02085510455071926, 0.02504708431661129, 0.052294958382844925, 0.03633049875497818, -0.020138973370194435, -0.030496658757328987, -0.02323056012392044, -0.047648847103118896, 0.0013896853197366, 0.040906745940446854, -0.011571613140404224, -0.048452310264110565, 0.015204663388431072, 0.03386770933866501, 0.04715978354215622, 0.0282085370272398, 0.019999241456389427, 0.009929753839969635, -0.03295945003628731, 0.026898542419075966, 0.055683478713035583, -0.017283186316490173, 0.029518531635403633, -0.003969281911849976, 0.053657352924346924, 0.03912515193223953, 0.0417451411485672, 0.022479496896266937, 0.04422539472579956, 0.016095459461212158, 0.04635632038116455, 0.0057814400643110275, -0.04555285722017288, -0.026828676462173462, -0.0107768839225173, 0.045972056686878204, -0.024854952469468117, -0.07433778792619705, 0.04513365775346756, -0.0017477503279224038, -0.04230407252907753, 0.05526427924633026, 0.02031363919377327, 0.012261543422937393, -0.021186968311667442, 0.01963244378566742, 0.07412819564342499, -0.04160540923476219, 0.019580043852329254, -0.035946235060691833, -0.018933778628706932, -0.008768226020038128, -0.0032466016709804535, -0.013912135735154152, -0.04097661003470421, 0.016025593504309654, 0.022287363186478615, 0.022846294566988945, 0.003648333251476288, -0.004375379998236895, -0.06567436456680298, 0.03428690880537033, -0.04848724231123924, -0.031160390004515648, -0.01364140398800373, -0.01516973040997982, -0.02176336571574211, 0.050827767699956894, -0.05620747432112694, -0.028348268941044807, 0.02401655539870262, 0.017684917896986008, 0.04988456889986992, -0.009554223157465458, -0.05603281036019325, -0.02099483646452427, -0.019946841523051262, -0.02188563346862793, -0.029867863282561302, -0.07929830253124237, 0.017807183787226677, -0.016156591475009918, -0.0491509735584259, 0.0217808336019516, 0.04852217808365822, -0.03695929795503616, -0.051386695355176926, -0.044504862278699875, 0.015527795068919659, 0.030706258490681648, 0.017431654036045074, 0.021152036264538765, -0.06197144836187363, -0.02529161609709263, 0.0033121013548225164, 0.02357989177107811, -0.019929375499486923, -0.051491495221853256, 0.0046155452728271484, -0.0435616672039032, -0.0139907356351614, 0.03126518800854683, 0.026007747277617455, -0.014462333172559738, 0.017702385783195496, 0.029972661286592484, -0.0022510061971843243, 0.040312882512807846, -0.0871233344078064, 0.024523086845874786, -0.04286300390958786, -0.06515036523342133, -0.03601609915494919, 0.0026221713051199913, -0.031859055161476135, 0.01195587869733572, 0.007982229813933372, 0.011982077732682228, -0.03461877256631851, 0.02585054747760296, 0.0021058153361082077, 0.015134797431528568, -0.0270732082426548, 0.004943043924868107, 0.019824575632810593, -0.06431197375059128, -0.03654009848833084, 0.0898481234908104, -0.06487090140581131, 0.007855596952140331, -0.039544351398944855, 0.03636543080210686, -0.017658717930316925, -0.023055894300341606, 0.03409477695822716, -0.005886239465326071, 0.0523298941552639, -0.030880924314260483, 0.000591134768910706, 0.10410085320472717, -0.030933324247598648, -0.01246240921318531, 0.013955802656710148, -0.10612697899341583, -0.09879101067781448, -0.04782351478934288, 0.023544957861304283, 0.016208991408348083, 0.03467117249965668, -0.01128341443836689, -0.009912287816405296, 0.020488305017352104, -0.0316145196557045, 0.048557110130786896, -0.005488874856382608, 0.003940898459404707, -0.038880620151758194, 0.0024147555232048035, 0.018008049577474594, -0.0102092195302248, 0.07150820642709732, 0.04226914048194885, 0.0027007709722965956, 0.05075789988040924, -0.007632898166775703, 0.04939550533890724, -0.016890188679099083, -0.06665249168872833, 0.07664337754249573, -0.010672084055840969, -0.038181956857442856, 0.04164034128189087, -0.0024387720040977, 0.022654162719845772, 0.006960434839129448, 0.018863912671804428, -0.06392770260572433, -0.05159629508852959, -0.03528250381350517, 0.035806503146886826, -0.002654921030625701, 0.023667223751544952, 0.0025392048992216587, -0.031422387808561325, -0.0018863913137465715, -0.039893683046102524, 0.03156211972236633, -0.036609966307878494, -0.05226002633571625, -0.03189398720860481, -0.016994988545775414, 0.033221445977687836, -0.05515947937965393, 0.022496962919831276, 0.0201913733035326, -0.057604800909757614, 0.014069335535168648, -0.0013067190302535892, 0.005554374307394028, -0.020156441256403923, -0.049465373158454895, 0.011178615503013134, -0.04321233555674553, -0.0133095383644104, 0.08824119716882706, 0.019370444118976593, -0.010610951110720634, -0.0002884715795516968, 0.05044350028038025, 0.02356242574751377, -0.030968258157372475, 0.05875759571790695, -0.045308325439691544, 0.055229347199201584, -0.003956181928515434, -0.06008505821228027, -0.022811362519860268, 0.0004972518654540181, -0.03407730907201767, -0.024400820955634117, -0.028819866478443146, -0.05121203139424324, 0.02017390727996826, 0.04625152051448822, -0.029029466211795807, 0.01963244378566742, -0.03351837769150734, -0.028715068474411964, -0.03138745576143265, 0.03261011838912964, -0.009632822126150131, 0.022130165249109268, 0.038181956857442856, -0.043282199651002884, -0.030828524380922318, 0.06466130167245865, -0.03337864577770233, -0.039439551532268524, -0.062460511922836304, 0.028295869007706642, 0.020558172836899757, -0.04331713542342186, 0.012899073772132397, 0.034583840519189835, 0.039299819618463516, 0.010017087683081627, -0.024505620822310448, 0.01715218834578991, 0.02785920538008213, -0.03407730907201767, -0.07454738765954971, -0.04216434061527252, -0.01352787110954523, -0.00003670712249004282, 0.00634910399094224, -0.026025213301181793, -0.024854952469468117, 0.007990962825715542, 0.03002506121993065, 0.00657616974785924, -0.02502961829304695, 0.009737621992826462, -0.013431805185973644, 0.007261733058840036, 0.04569258913397789, -0.0496051050722599, 0.005475774873048067, -0.016497191041707993, -0.0050216433592140675, 0.036714766174554825, 0.039998482912778854, -0.0028492368292063475, -0.014252734370529652, 0.003971464931964874, 0.01364140398800373, -0.010610951110720634, -0.043282199651002884, 0.042932868003845215, -0.05302855744957924, 0.019580043852329254, -0.015466662123799324, -0.03640036657452583, 0.037064097821712494, 0.004589345771819353, 0.009929753839969635, 0.003678899724036455, 0.03241798281669617, 0.021169502288103104, -0.0013929601991549134, 0.026025213301181793, 0.035579435527324677, 0.027038276195526123, -0.039753951132297516, 0.0010561826638877392, 0.05875759571790695, -0.04240887239575386, -0.04904617369174957, -0.08055589348077774, 0.06088852137327194, 0.04034781455993652, 0.05610267445445061, -0.03295945003628731, -0.050478436052799225, -0.04656592011451721, 0.028732534497976303, -0.023824423551559448, 0.04034781455993652, 0.049465373158454895, -0.06668742746114731, 0.04286300390958786, 0.00009217717888532206, 0.035352371633052826, 0.04059234634041786, -0.018811512738466263, -0.06011999025940895, -0.019684841856360435, -0.004384113010019064, 0.014200334437191486, -0.030042529106140137, -0.00014969409676268697, 0.03283718228340149, -0.0009382831631228328, -0.03692436218261719, -0.031981319189071655, -0.029640797525644302, 0.0027247874531894922, 0.033902645111083984, 0.0028230370953679085, -0.012706941924989223, 0.06431197375059128, 0.013248405419290066, -0.0016112925950437784, -0.059735726565122604, -0.06308931112289429, -0.021641099825501442, 0.0026309045497328043, 0.00844072736799717, -0.019440310075879097, 0.07587485015392303, -0.03058399260044098, 0.03577156737446785, 0.011746278963983059, 0.04499392583966255, 0.02876746840775013, -0.03978888317942619, -0.003938715439289808, -0.04178007319569588, 0.007750797551125288, -0.017475320026278496, 0.03647023066878319, 0.05044350028038025, 0.018217649310827255, -0.016540857031941414, 0.0009191791177727282, 0.0011517030652612448, -0.0012368526076897979, 0.04509872570633888, 0.03262758255004883, 0.039299819618463516, 0.02480255253612995, 0.04712485149502754, -0.03598116710782051, -0.020034175366163254, -0.01172881294041872, -0.04059234634041786, -0.05655680596828461, -0.029501063749194145, -0.010838016867637634, 0.004576245788484812, 0.016671856865286827, -0.003886315505951643, 0.031107990071177483, 0.03523010388016701, -0.024435754865407944 ]
717,426
pytorch_optimizer.optimizer.pid
PID
A PID Controller Approach for Stochastic Optimization of Deep Networks. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param dampening: float. dampening for momentum. :param derivative: float. D part of the PID. :param integral: float. I part of the PID. :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 PID(Optimizer, BaseOptimizer): r"""A PID Controller Approach for Stochastic Optimization of Deep Networks. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param dampening: float. dampening for momentum. :param derivative: float. D part of the PID. :param integral: float. I part of the PID. :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, momentum: float = 0.0, dampening: float = 0.0, derivative: float = 10.0, integral: float = 5.0, 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) self.validate_non_negative(derivative, 'derivative') self.validate_non_negative(integral, 'integral') self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'dampening': dampening, 'derivative': derivative, 'integral': integral, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, } super().__init__(params, defaults) def __str__(self) -> str: return 'PID' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 0 for p in group['params']: state = self.state[p] if group['momentum'] > 0.0: state['grad_buffer'] = torch.zeros_like(p) state['i_buffer'] = torch.zeros_like(p) state['d_buffer'] = 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 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 group['momentum'] > 0.0: state['grad_buffer'] = torch.zeros_like(p) state['i_buffer'] = torch.zeros_like(p) state['d_buffer'] = 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'], ) if group['momentum'] > 0.0: i_buf = state['i_buffer'] i_buf.mul_(group['momentum']).add_(grad, alpha=1.0 - group['dampening']) g_buf, d_buf = state['grad_buffer'], state['d_buffer'] d_buf.mul_(group['momentum']) if group['step'] > 1: d_buf.add_(grad - g_buf, alpha=1.0 - group['momentum']) g_buf.copy_(grad) grad.add_(i_buf, alpha=group['integral']).add_(d_buf, alpha=group['derivative']) p.add_(grad, alpha=-group['lr']) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, momentum: float = 0.0, dampening: float = 0.0, derivative: float = 10.0, integral: float = 5.0, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ -0.007638423703610897, -0.019863814115524292, -0.05085762217640877, 0.005159114487469196, -0.010425812564790249, 0.02227955125272274, -0.051757410168647766, -0.022749004885554314, -0.021692732349038124, 0.007985624484717846, -0.053517866879701614, 0.008166560903191566, 0.005926868878304958, 0.07425212860107422, -0.03309657424688339, 0.03843662515282631, 0.03016248159110546, 0.061302997171878815, -0.019208533689379692, -0.01728181168437004, -0.02435297705233097, -0.05649108067154884, 0.00154039915651083, 0.06494127213954926, -0.06075529754161835, -0.04127291589975357, 0.046397801488637924, -0.026895858347415924, -0.07479982823133469, -0.004623642656952143, -0.013271883130073547, -0.026387281715869904, 0.004987959284335375, 0.044832948595285416, 0.02314021810889244, -0.01828918419778347, 0.0018998256418853998, 0.04451997950673103, -0.10664452612400055, -0.0018007999751716852, 0.025291886180639267, -0.05551305040717125, 0.015306188724935055, -0.03792804852128029, -0.014093429781496525, 0.022240430116653442, -0.012861110270023346, 0.05394820123910904, -0.016939500346779823, -0.01394672505557537, 0.01200044248253107, -0.06490214914083481, 0.0062789604999125, -0.0072667719796299934, -0.021986141800880432, 0.052657198160886765, 0.07894667983055115, -0.022905491292476654, 0.02607431262731552, -0.05915132537484169, 0.014034748077392578, -0.05441765487194061, 0.05985550954937935, -0.015306188724935055, -0.01828918419778347, -0.03812365606427193, -0.036050230264663696, -0.01535508967936039, 0.004557625390589237, 0.02758047915995121, 0.04980134963989258, -0.06994879245758057, 0.03741947561502457, 0.013222982175648212, 0.017389394342899323, -0.04338546469807625, -0.021438444033265114, -0.04056873545050621, 0.024118250235915184, -0.026348160579800606, 0.01935523748397827, -0.011491866782307625, -0.012929572723805904, -0.025722220540046692, 0.011227798648178577, -0.010220426134765148, 0.01773170568048954, -0.019990958273410797, -0.02732619270682335, -0.06458918005228043, 0.019668206572532654, -0.0010098172351717949, 0.021047230809926987, 0.022944612428545952, 0.056295476853847504, 0.04041225090622902, -0.0212232768535614, -0.042759522795677185, 0.0009199606138281524, -0.021555807441473007, -0.016157075762748718, 0.043776676058769226, -0.016743894666433334, 0.031942497938871384, 0.0083377156406641, -0.06259399652481079, -0.03976674750447273, 0.007980735041201115, 0.011266919784247875, -0.06740590929985046, -0.03642188385128975, 0.050583772361278534, -0.04890156164765358, -0.012460117228329182, -0.009838993661105633, 0.0012665503891184926, 0.0055209859274327755, 0.01950194127857685, -0.032098982483148575, 0.030534133315086365, -0.0026577997487038374, 0.039121247828006744, -0.08450189232826233, -0.00494883768260479, -0.009188603609800339, -0.0059073083102703094, 0.020167004317045212, 0.030573256313800812, 0.01914007030427456, -0.05320489779114723, -0.055082716047763824, 0.016841696575284004, 0.01141362451016903, 0.02364879474043846, 0.03440713882446289, -0.026406843215227127, -0.02454858273267746, 0.02965390682220459, -0.026661131531000137, 0.019384577870368958, 0.05336138233542442, 0.009931907057762146, 0.008391507901251316, 0.01596147008240223, 0.02071470022201538, 0.014973658137023449, 0.025018038228154182, 0.008953875862061977, -0.0017372278962284327, -0.005027080420404673, -0.006528358440846205, 0.030534133315086365, 0.06157684326171875, 0.04354194924235344, 0.019726889207959175, -0.00893920473754406, -0.005789944902062416, -0.0016284219454973936, -0.03661748766899109, -0.01570718176662922, -0.03061237744987011, -0.048823319375514984, -0.0048828208819031715, -0.009491792879998684, -0.008724038489162922, 0.005755713675171137, 0.009144592098891735, 0.005056421272456646, -0.015012779273092747, 0.04299425333738327, 0.02087118662893772, -0.058368902653455734, 0.03878871724009514, 0.03966894745826721, -0.027913009747862816, 0.11024367809295654, 0.00816167052835226, 0.0002043168351519853, 0.005848626606166363, 0.012890451587736607, 0.05394820123910904, -0.006914680823683739, -0.029027966782450676, -0.05085762217640877, -0.0016589853912591934, 0.05171829089522362, -0.0052031259983778, 0.001325232326053083, 0.012812208384275436, 0.03282272815704346, 0.0203626099973917, -0.0006186047103255987, 0.03233371302485466, 0.006239838898181915, -0.01697862148284912, 0.038319263607263565, 0.03732167184352875, -0.02429429441690445, 0.06619314849376678, 0.03681309521198273, 0.06560633331537247, 0.002655354794114828, 0.01878798007965088, 0.013369686901569366, -0.02758047915995121, -0.006939131300896406, -0.04631955921649933, 0.05414380878210068, -0.006900010164827108, -0.0029267584905028343, -0.03616759553551674, -0.0004758732975460589, 0.07746007293462753, 0.0755431279540062, 0.028558511286973953, -0.023766158148646355, 0.006851108744740486, 0.0317077711224556, 0.05476974695920944, -0.05097498744726181, 0.03779112547636032, -0.020695140585303307, 0.009521134197711945, 0.030240725725889206, 0.013477269560098648, -0.024059567600488663, 0.03470054641366005, -0.009662948548793793, 0.0024401878472417593, -0.011325601488351822, 0.04854946956038475, -0.0676015168428421, -0.013457708992064, 0.023785719648003578, 0.09428220987319946, -0.00624961918219924, -0.065058633685112, -0.008142109960317612, -0.04295513033866882, -0.01113977562636137, -0.03957114368677139, -0.03802585229277611, 0.005027080420404673, 0.0001838393072830513, -0.011129994876682758, 0.01894446462392807, 0.05848626419901848, 0.03096446767449379, -0.010875706560909748, 0.01712532714009285, -0.017663244158029556, -0.06447181850671768, -0.051953017711639404, 0.028402026742696762, -0.04612395167350769, -0.004232429899275303, 0.018367426469922066, 0.01727203093469143, -0.011980881914496422, -0.045185040682554245, -0.038006290793418884, -0.030788421630859375, -0.08043328672647476, 0.061655085533857346, 0.012450337409973145, 0.03096446767449379, 0.041546765714883804, -0.02920401096343994, -0.008562663570046425, 0.009609156288206577, 0.07362619042396545, 0.04557625576853752, -0.061146512627601624, 0.003469565650448203, -0.034231092780828476, -0.0027384874410927296, -0.0031150293070822954, 0.03765420243144035, -0.017360053956508636, 0.01369243673980236, 0.034622304141521454, -0.044167887419462204, -0.045537132769823074, -0.029829951003193855, -0.024665946140885353, 0.058368902653455734, 0.006049123127013445, 0.040842581540346146, 0.025546174496412277, 0.03198162093758583, 0.008044306188821793, 0.0203626099973917, 0.07182661443948746, 0.00871425773948431, 0.056608445942401886, 0.04436349496245384, -0.03213810548186302, 0.017849069088697433, -0.017907751724123955, -0.02636772207915783, 0.03667616844177246, -0.0009059014264494181, 0.005320489872246981, -0.008132329210639, -0.03636319935321808, -0.005755713675171137, 0.03348778933286667, 0.009545584209263325, 0.05394820123910904, -0.014210793189704418, 0.02243603579699993, -0.009628716856241226, -0.003229947993531823, 0.048823319375514984, 0.04056873545050621, -0.08426716923713684, -0.011667911894619465, -0.04127291589975357, 0.03933641314506531, 0.08825753629207611, -0.03499395772814751, 0.07178749144077301, 0.011022411286830902, 0.014161892235279083, -0.03323350101709366, -0.02799125388264656, 0.040803462266922, 0.017653463408350945, -0.04631955921649933, -0.005467194598168135, -0.04052961245179176, 0.00651857815682888, 0.024216052144765854, 0.010288888588547707, -0.02783476747572422, -0.04874507337808609, 0.05242247134447098, 0.018924903124570847, 0.0034866812638938427, -0.01843588799238205, 0.07781216502189636, 0.028578070923686028, -0.03677397221326828, 0.07452597469091415, -0.015325749292969704, -0.04647604376077652, 0.02742399461567402, 0.009354868903756142, 0.03904300555586815, 0.013271883130073547, 0.012509019114077091, 0.02773696556687355, 0.0008490533218719065, 0.0831717699766159, 0.0753084048628807, -0.02859763242304325, -0.004755676724016666, 0.009912346489727497, 0.005149334203451872, -0.06310257315635681, -0.03779112547636032, -0.015922347083687782, -0.015540915541350842, 0.06674084812402725, 0.05864275246858597, 0.00284118065610528, -0.007335233967751265, -0.04185973480343819, 0.024587703868746758, -0.020636457949876785, -0.023981325328350067, -0.08356298506259918, -0.03495483472943306, -0.012059125117957592, -0.02020612545311451, 0.0026895857881754637, -0.04201621934771538, -0.003516022115945816, 0.0424465537071228, 0.019961616024374962, 0.010826805606484413, -0.02419649250805378, 0.04835386201739311, 0.02924313209950924, 0.015042119659483433, -0.007090726401656866, 0.020890746265649796, -0.012773087248206139, 0.04886243864893913, -0.04401140287518501, 0.031238317489624023, 0.013751118443906307, -0.00414196215569973, -0.008606674149632454, -0.04972310736775398, 0.03313569724559784, 0.05336138233542442, 0.03726298734545708, -0.05324401706457138, -0.07229606807231903, -0.03284228965640068, -0.067679762840271, 0.008547992445528507, 0.06388499587774277, 0.014484642073512077, -0.06556721031665802, 0.07734270393848419, 0.07350882887840271, -0.014836733229458332, 0.04741495102643967, -0.004491608124226332, 0.0022665872238576412, -0.004315562546253204, 0.032959651201963425, 0.015599597245454788, -0.04835386201739311, -0.0083377156406641, -0.011442964896559715, 0.02243603579699993, 0.010269328020513058, 0.04905804619193077, 0.008616454899311066, 0.06920548528432846, 0.00785359088331461, -0.012450337409973145, -0.012567700818181038, -0.022572960704565048, 0.03350735083222389, -0.007530840113759041, 0.0071738590486347675, -0.03534604609012604, -0.015413771383464336, -0.017095984891057014, -0.02505715936422348, -0.02368791587650776, -0.002125995233654976, 0.033174820244312286, 0.05985550954937935, 0.046710770577192307, 0.007345014251768589, 0.022142626345157623, -0.002628458896651864, 0.017653463408350945, -0.008347496390342712, 0.011892859824001789, -0.023766158148646355, 0.04721934720873833, -0.008768050000071526, -0.08544080704450607, -0.01209824625402689, 0.02930181473493576, -0.03374207764863968, 0.049331892281770706, -0.02763916179537773, -0.006322971545159817, -0.0032837397884577513, -0.020225685089826584, -0.01849457062780857, -0.009980808012187481, -0.022964172065258026, 0.01204934436827898, 0.03630451858043671, -0.044167887419462204, 0.016900379210710526, -0.0580950528383255, 0.021947020664811134, 0.06990966945886612, -0.03544384986162186, -0.034739669412374496, 0.028656315058469772, 0.038730036467313766, 0.017643682658672333, 0.01878798007965088, -0.041194673627614975, -0.07526928186416626, 0.016352681443095207, -0.026348160579800606, -0.006181157194077969, 0.007731336634606123, -0.008264363743364811, 0.03970806673169136, -0.07749919593334198, 0.017369834706187248, 0.04389404132962227, -0.019120510667562485, 0.0009150704718194902, 0.004242210183292627, 0.04209446161985397, 0.016205977648496628, 0.022083943709731102, -0.03309657424688339, -0.06568457931280136, 0.06541072577238083, -0.021281959488987923, -0.01627443917095661, -0.01083658542484045, 0.021340640261769295, 0.004386469721794128, 0.0710441842675209, -0.039375536143779755, -0.0029487640131264925, -0.014543323777616024, -0.03460274264216423, -0.029184451326727867, 0.05566953495144844, -0.022455597296357155, -0.061968058347702026, 0.05218774452805519, -0.06247663497924805, 0.040842581540346146, -0.01682213693857193, -0.02511584199965, 0.004286221694201231, 0.005789944902062416, -0.0036529465578496456, -0.01394672505557537, -0.007007593754678965, 0.06474566459655762, -0.005643240176141262, -0.07362619042396545, 0.054574139416217804, 0.024587703868746758, -0.023981325328350067, -0.03438757732510567, 0.018778199329972267, 0.061302997171878815, -0.04444173723459244, -0.05015344172716141, 0.05484798923134804, 0.0018961579771712422, -0.011276699602603912, -0.004176193382591009, 0.013066496700048447, 0.07601258158683777, 0.0003083854680880904, -0.051248833537101746, 0.025780903175473213, -0.07483895123004913, -0.079807348549366, -0.029321376234292984, -0.0059806606732308865, 0.006914680823683739, 0.010787684470415115, -0.02486155368387699, 0.029536541551351547, 0.06689733266830444, -0.019159631803631783, 0.05042728781700134, -0.04287688806653023, -0.0062789604999125, -0.0442461334168911, -0.0003346700395923108, -0.04045137017965317, 0.022162187844514847, 0.04060785472393036, 0.029673466458916664, -0.02192745916545391, 0.007838919758796692, 0.0026846956461668015, 0.04408964514732361, -0.039903674274683, -0.062163662165403366, 0.03610891103744507, -0.06494127213954926, 0.011628790758550167, 0.0021651166025549173, -0.01571696065366268, -0.06400236487388611, -0.05492623150348663, 0.036187153309583664, -0.0011149555211886764, -0.032529316842556, -0.010953949764370918, 0.004237320274114609, -0.05320489779114723, -0.00946734193712473, 0.023727037012577057, -0.017516538500785828, 0.022318672388792038, -0.03016248159110546, 0.044480860233306885, 0.00949668325483799, -0.014201013371348381, -0.019374798983335495, 0.028812799602746964, 0.043581072241067886, -0.05868187174201012, 0.028734557330608368, 0.04964486509561539, -0.024724628776311874, -0.02789345011115074, 0.011482086032629013, -0.006557699292898178, -0.05895572155714035, -0.011032192036509514, 0.04631955921649933, -0.06881427764892578, 0.0013288998743519187, 0.07249167561531067, 0.01874885894358158, -0.06157684326171875, -0.018670614808797836, 0.032607559114694595, -0.0007555290940217674, 0.005252027418464422, -0.012724186293780804, -0.01641136407852173, 0.036343637853860855, 0.026543766260147095, -0.07210046052932739, -0.008904973976314068, -0.0197073295712471, 0.01490519568324089, -0.03344866633415222, -0.051131471991539, -0.02652420662343502, -0.006792426574975252, 0.025096280500292778, 0.07100506871938705, -0.026837175711989403, -0.007349904626607895, -0.02499847672879696, -0.0012207052204757929, -0.02464638650417328, -0.014259695075452328, -0.0027800537645816803, -0.007012483663856983, -0.10820937156677246, -0.005012409761548042, -0.01980513148009777, -0.015198605135083199, 0.0013081167126074433, 0.0009688621503300965, 0.004943947773426771, 0.01772192493081093, 0.005384061951190233, 0.03472010791301727, -0.012636163271963596, -0.01632334105670452, -0.01712532714009285, 0.010416032746434212, 0.03955158218741417, -0.03338998556137085, -0.030749300494790077, -0.006450115703046322, -0.048666831105947495, 0.008000295609235764, 0.013311004266142845, 0.05758647620677948, 0.0363827608525753, -0.020069200545549393, 0.02196658030152321, -0.05426117032766342, -0.015873447060585022, 0.017350273206830025, 0.004071054980158806, 0.017496978864073753, 0.027776086702942848, 0.024685507640242577, -0.039473339915275574, 0.03522868454456329, 0.0059806606732308865, 0.006122475489974022, -0.0027556028217077255, -0.05324401706457138, -0.012675284408032894, -0.006675063166767359, -0.01893468387424946, 0.01787840947508812, -0.013369686901569366, -0.047962650656700134, -0.018856441602110863, -0.04886243864893913, 0.0039683617651462555, -0.0037434145342558622, -0.028167298063635826, 0.0203626099973917, -0.021340640261769295, -0.02314021810889244, -0.009892785921692848, 0.05430029332637787, 0.003437779610976577, 0.025331007316708565, -0.005110213067382574, 0.04808001220226288, -0.025194084271788597, -0.01209824625402689, -0.01888578198850155, 0.009648277424275875, -0.026563327759504318, -0.045185040682554245, -0.0037996512837707996, 0.04408964514732361, -0.015531135722994804, 0.05535656586289406, -0.1004633679986, -0.046202193945646286, 0.00022448872914537787, 0.004097950644791126, -0.09827257692813873, -0.035482972860336304, -0.014269474893808365, -0.02697410061955452, -0.02445078082382679, 0.0106116384267807, 0.06419796496629715, -0.020225685089826584, -0.012166707776486874, 0.043072495609521866, -0.021281959488987923, 0.013526171445846558, 0.02343362756073475, 0.006098024547100067, -0.01883688010275364, 0.034876592457294464, 0.014562884345650673, 0.00779001833871007, -0.018269622698426247, -0.011061533354222775, 0.032059863209724426, 0.0011381838703528047, 0.004995294380933046, 0.025702660903334618, 0.042055342346429825, -0.058016810566186905, -0.03540473058819771, 0.02161449007689953, -0.00723743112757802, 0.03855399042367935, -0.02429429441690445, 0.030534133315086365, 0.034270212054252625, -0.03923861309885979, -0.06799273192882538, 0.002787388861179352, 0.00177145900670439, 0.09115251153707504, -0.003956136293709278, -0.014885635115206242, 0.04651516303420067, -0.019325897097587585, 0.041351158171892166, -0.0330183319747448, 0.002377838362008333, 0.030573256313800812, 0.04878419637680054, 0.0018863776931539178, -0.02550705336034298, 0.050544653087854385, -0.059581659734249115, 0.09232614189386368, 0.019619306549429893, -0.027560919523239136, -0.029282255098223686, 0.04827561974525452, -0.06368938833475113, 0.01919875293970108, -0.02368791587650776, -0.07593434303998947, -0.10523615777492523, -0.014494422823190689, -0.062359269708395004, 0.06975318491458893, 0.028930163010954857, 0.002231133636087179, 0.0364610031247139, 0.02834334410727024, 0.012489458546042442 ]
717,428
pytorch_optimizer.optimizer.pid
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, momentum: float = 0.0, dampening: float = 0.0, derivative: float = 10.0, integral: float = 5.0, 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) self.validate_non_negative(derivative, 'derivative') self.validate_non_negative(integral, 'integral') self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'dampening': dampening, 'derivative': derivative, 'integral': integral, '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, momentum: float = 0.0, dampening: float = 0.0, derivative: float = 10.0, integral: float = 5.0, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.008143833838403225, -0.01712055876851082, -0.005751582328230143, 0.014066621661186218, -0.028744030743837357, -0.011225534602999687, -0.07632993161678314, -0.029169730842113495, -0.048900019377470016, 0.03499997407197952, -0.025782637298107147, 0.04730826988816261, 0.012150969356298447, 0.06722364574670792, -0.05341614410281181, 0.03625856712460518, 0.0036577843129634857, 0.025319918990135193, -0.021322036162018776, -0.014075876213610172, -0.0017999722622334957, -0.04334740340709686, -0.017583277076482773, 0.12771011888980865, -0.004407387226819992, 0.009689310565590858, -0.012595178559422493, 0.008467735722661018, -0.04212582856416702, -0.018471695482730865, -0.0008855262422002852, -0.006649254821240902, 0.0067556798458099365, 0.07018503546714783, 0.02881806530058384, -0.027152281254529953, -0.0320015624165535, -0.01023531798273325, -0.09920670092105865, 0.0633368119597435, 0.05152825638651848, -0.027022719383239746, 0.06252243369817734, -0.03797987848520279, -0.010679527185857296, 0.007634843699634075, 0.007856948301196098, 0.035666290670633316, -0.012086189351975918, -0.01995239220559597, 0.016324684023857117, -0.03214963525533676, 0.00978185422718525, -0.035999447107315063, -0.05141720175743103, 0.05863559991121292, 0.07773659378290176, 0.03229770436882973, 0.03105762042105198, 0.00356292724609375, -0.009328391402959824, -0.05015861243009567, 0.009596767835319042, -0.010244572535157204, 0.015408502891659737, -0.0017513869097456336, -0.07377573102712631, -0.018369896337389946, 0.03135376051068306, 0.04542038217186928, 0.10638807713985443, -0.013409562408924103, -0.01007799431681633, 0.002653686562553048, 0.016065562143921852, -0.012983862310647964, -0.07459010928869247, -0.05312000587582588, -0.025430971756577492, -0.021636685356497765, 0.045457396656274796, 0.026911668479442596, -0.020933354273438454, -0.005635902751237154, 0.023339485749602318, -0.0384611040353775, -0.0450131893157959, -0.07536748051643372, -0.0008548711775802076, 0.030002623796463013, -0.054304562509059906, -0.015241924673318863, -0.0064687952399253845, -0.03424111753702164, 0.07544150948524475, 0.0066168648190796375, -0.0003357595996931195, -0.05341614410281181, 0.03462979942560196, -0.013409562408924103, -0.01984133943915367, 0.027448421344161034, -0.04686405882239342, -0.0009098189184442163, 0.04786353185772896, -0.05933893099427223, -0.046160727739334106, -0.0320015624165535, 0.041792672127485275, -0.06381803750991821, -0.02228448912501335, 0.05937594920396805, -0.048011600971221924, 0.018286608159542084, -0.04701213166117668, 0.03644365444779396, 0.03116867132484913, 0.027596490457654, 0.010910886339843273, 0.00516393082216382, 0.023876238614320755, 0.02034107595682144, -0.050528787076473236, 0.050639837980270386, 0.05282386392354965, -0.005177812185138464, -0.001125561073422432, 0.01328000146895647, 0.02483869157731533, -0.036702778190374374, 0.018147792667150497, 0.001624139491468668, -0.020081952214241028, -0.019267570227384567, 0.009985450655221939, -0.042496003210544586, 0.02269168198108673, 0.04827072098851204, -0.04286617785692215, 0.02730035036802292, 0.049936506897211075, 0.030483849346637726, 0.04079320281744003, 0.01945265755057335, -0.017129814252257347, 0.03703593462705612, -0.02472764067351818, 0.019526692107319832, -0.0016495890449732542, 0.028892099857330322, -0.0005020488169975579, 0.026023250073194504, 0.01658380590379238, 0.03746163472533226, 0.00524259265512228, -0.04268109053373337, 0.017537005245685577, -0.010300098918378353, -0.005261101759970188, 0.007486774120479822, -0.035888392478227615, 0.02913271263241768, 0.017555514350533485, -0.0341670848429203, -0.009680056944489479, 0.006292962469160557, -0.022247472777962685, -0.026615528389811516, -0.00409505283460021, 0.0020695053972303867, -0.000026895473638433032, -0.10942351073026657, -0.008264140225946903, 0.026726581156253815, -0.012659959495067596, 0.07966149598360062, 0.024264922365546227, 0.01742595247924328, -0.014973548240959644, 0.007153617218136787, 0.07359064370393753, -0.004217673093080521, -0.04542038217186928, -0.06518768519163132, 0.03126121684908867, 0.009143304079771042, -0.049122124910354614, 0.0374431237578392, -0.02178475446999073, 0.019674761220812798, 0.0780327320098877, 0.007107345387339592, 0.010744307190179825, 0.02087782695889473, -0.01943414844572544, 0.02596772462129593, 0.04804861918091774, -0.017897924408316612, 0.015371485613286495, 0.07055521011352539, 0.08054991811513901, 0.020396601408720016, 0.019933883100748062, -0.019619235768914223, 0.01349285151809454, -0.02881806530058384, -0.020618705078959465, 0.004844655282795429, -0.03268638625741005, -0.02493123523890972, 0.008055916987359524, -0.009587513282895088, 0.04334740340709686, 0.04471705108880997, -0.010651764459908009, -0.031113145872950554, -0.012447109445929527, 0.012891318649053574, 0.02269168198108673, -0.033648841083049774, 0.10216809064149857, -0.008079052902758121, -0.0036161397583782673, -0.020748266950249672, 0.05448964983224869, 0.006903749890625477, 0.04468003287911415, -0.06788995862007141, -0.07558958232402802, 0.03616602346301079, -0.004048781003803015, -0.06004226207733154, -0.036813829094171524, -0.0042107319459319115, 0.055859293788671494, 0.007139735855162144, -0.043421439826488495, 0.04075618460774422, -0.06466944515705109, -0.021766245365142822, 0.028688505291938782, 0.016926217824220657, 0.006260572001338005, -0.017324155196547508, 0.004895554389804602, 0.01690770871937275, 0.02241405099630356, 0.038720227777957916, -0.049233175814151764, -0.016731876879930496, -0.027744559571146965, -0.029391836374998093, -0.020230023190379143, 0.06004226207733154, -0.03849812224507332, 0.038535140454769135, 0.029799027368426323, -0.004789129365235567, 0.01054071169346571, -0.010263080708682537, -0.009430188685655594, 0.007454384118318558, -0.024875709787011147, 0.09661547839641571, 0.005052878521382809, -0.006209672894328833, -0.0011550593189895153, -0.004580906126648188, 0.02637491561472416, 0.0042199864983558655, 0.11675295978784561, 0.02524588443338871, -0.02037809230387211, -0.004765993449836969, -0.002288139658048749, -0.024079835042357445, 0.01569538749754429, -0.0273743849247694, -0.01769432984292507, 0.04915913939476013, 0.02056317962706089, -0.040052853524684906, 0.020396601408720016, -0.009203457273542881, -0.007574690505862236, 0.021451598033308983, -0.00870834942907095, 0.023543082177639008, -0.01205842662602663, 0.007361840456724167, -0.003204320790246129, 0.021136948838829994, 0.09846635162830353, 0.03624005988240242, 0.11482805013656616, -0.0058533805422484875, 0.025430971756577492, -0.002538007218390703, 0.05500789359211922, -0.017870161682367325, 0.06811206042766571, -0.02209940366446972, 0.03485190495848656, -0.015852712094783783, -0.050639837980270386, -0.06189313530921936, 0.026745090261101723, 0.03786882758140564, 0.04194074124097824, 0.04142249748110771, 0.041607584804296494, 0.021507123485207558, 0.029854552820324898, 0.03350076824426651, 0.041496533900499344, -0.07459010928869247, 0.008606551215052605, -0.050750888884067535, 0.027096755802631378, 0.05741402506828308, 0.02811473421752453, 0.0484187938272953, 0.017435207962989807, 0.0017074287170544267, -0.06822311133146286, -0.06441032141447067, 0.020822301506996155, 0.030409814789891243, -0.03313059359788895, -0.014381269924342632, -0.04053407907485962, 0.0034079167526215315, 0.008523262105882168, -0.03849812224507332, -0.02483869157731533, -0.02106291428208351, 0.023469047620892525, 0.05200948193669319, -0.01496429368853569, -0.019526692107319832, 0.08728709071874619, 0.002963707549497485, -0.015010565519332886, 0.04867791384458542, -0.031316742300987244, -0.04068215191364288, 0.005585004109889269, -0.04305126518011093, 0.0450131893157959, -0.02221045456826687, -0.023043347522616386, 0.0038660073187202215, -0.012317548505961895, 0.07832887023687363, 0.04712318256497383, -0.03838707134127617, -0.023043347522616386, -0.005515596363693476, 0.024598078802227974, -0.054230526089668274, -0.029780518263578415, -0.010864614509046078, -0.03370436653494835, 0.06518768519163132, 0.01943414844572544, -0.005404544062912464, 0.0073201959021389484, -0.028318330645561218, 0.010429659858345985, 0.010892377234995365, 0.008018899708986282, -0.07588572055101395, -0.02208089455962181, -0.015260433778166771, 0.018786342814564705, -0.01630617491900921, -0.02696719393134117, 0.01047593168914318, 0.035055503249168396, -0.008717603981494904, 0.010873869061470032, -0.005076014436781406, 0.05967208743095398, 0.013085659593343735, -0.0022302998695522547, -0.024764657020568848, -0.004428209271281958, 0.02015598863363266, 0.05356421321630478, -0.004756738897413015, -0.00628833519294858, 0.0006761464173905551, 0.01511236373335123, -0.016324684023857117, -0.05833946168422699, 0.0364251472055912, 0.04157056659460068, 0.03542567417025566, -0.03511102870106697, -0.05141720175743103, -0.02676359750330448, -0.05845051258802414, -0.0020162928849458694, 0.04701213166117668, 0.009661547839641571, -0.0093607809394598, 0.0366472490131855, 0.044643014669418335, 0.02859596163034439, 0.05060281977057457, 0.0034912058617919683, -0.017537005245685577, -0.027244824916124344, 0.022062385454773903, -0.015760168433189392, -0.05845051258802414, 0.002344822511076927, -0.018351389095187187, 0.008796265348792076, 0.0027554845437407494, 0.0348333977162838, 0.0056960564106702805, 0.07566361874341965, 0.04323635250329971, 0.03614751622080803, 0.046790026128292084, -0.012178733013570309, 0.027318859472870827, -0.012891318649053574, -0.045975640416145325, -0.05149123817682266, 0.004206105135381222, -0.032131124287843704, -0.04734528809785843, 0.0019457284361124039, -0.0004922160878777504, 0.011132990941405296, 0.010892377234995365, 0.016741130501031876, -0.01800897717475891, 0.02404281683266163, -0.06255944818258286, 0.016370955854654312, -0.03544418513774872, -0.04408775269985199, -0.03127972409129143, 0.010929394513368607, -0.008930454030632973, -0.05204650014638901, -0.007176753133535385, 0.012891318649053574, 0.0008675958961248398, 0.0366472490131855, -0.01677814871072769, -0.016935471445322037, -0.032205160707235336, -0.02850341796875, -0.02920674905180931, 0.041792672127485275, -0.024875709787011147, 0.024487026035785675, 0.005617394112050533, -0.01435350626707077, -0.02798517420887947, -0.045975640416145325, 0.037313565611839294, 0.06503961235284805, -0.030613411217927933, -0.03296401724219322, 0.006103247869759798, 0.026430441066622734, 0.01924906112253666, 0.026948684826493263, -0.04245898500084877, -0.04716020077466965, 0.017740601673722267, -0.019711779430508614, -0.007907847873866558, 0.007250788155943155, -0.04012688994407654, 0.01007799431681633, -0.05030668154358864, 0.006589101627469063, 0.07092538475990295, 0.0037850316148251295, -0.00684359623119235, -0.05597034841775894, 0.006889868061989546, 0.011864084750413895, 0.03357480466365814, -0.06637224555015564, -0.00012124652857892215, 0.03266787901520729, 0.018175555393099785, -0.011697506532073021, -0.017981214448809624, 0.00198621628805995, 0.01904546469449997, 0.0484187938272953, 0.020230023190379143, 0.002059094374999404, -0.034574273973703384, -0.051454219967126846, 0.009892906993627548, 0.04245898500084877, -0.02567158453166485, -0.09572706371545792, 0.04257003962993622, -0.029151221737265587, -0.01120702549815178, -0.036388128995895386, 0.0029336309526115656, -0.022525103762745857, 0.023487556725740433, -0.052897900342941284, -0.042829159647226334, -0.03633260354399681, 0.07370169460773468, -0.023987291380763054, -0.03655470907688141, 0.042718108743429184, 0.04442090913653374, 0.005080641712993383, -0.04519827663898468, 0.009420935064554214, 0.045975640416145325, -0.011771541088819504, -0.06248541176319122, 0.06774188578128815, 0.025930706411600113, -0.0023506064899265766, -0.04075618460774422, -0.033334191888570786, 0.05426754429936409, -0.03388945385813713, 0.027004212141036987, 0.01609332486987114, -0.04986247047781944, -0.04157056659460068, -0.0368693545460701, -0.005335136316716671, 0.027152281254529953, 0.024283431470394135, -0.025301409885287285, 0.0007351429085247219, -0.008828655816614628, -0.028484908863902092, 0.07033310830593109, -0.046382833272218704, 0.00539528951048851, -0.008203987032175064, -0.03990478441119194, -0.05352719500660896, 0.014686663635075092, 0.002556515857577324, 0.018055249005556107, 0.017065033316612244, -0.01328000146895647, 0.043421439826488495, 0.04216284677386284, -0.03820198401808739, -0.027837103232741356, -0.004351860843598843, 0.019212042912840843, -0.017250120639801025, 0.009041505865752697, 0.013511359691619873, -0.03997882083058357, -0.07603379338979721, 0.0317794606089592, 0.002750857500359416, -0.019304586574435234, 0.012021408416330814, 0.0086528230458498, -0.05485982447862625, 0.032723404467105865, 0.013659429736435413, 0.004106620792299509, -0.021359054371714592, -0.051676325500011444, 0.012484126724302769, -0.009235847741365433, -0.09180321544408798, -0.07855097949504852, 0.029243765398859978, -0.00916643999516964, -0.05448964983224869, 0.021710719913244247, -0.005460069980472326, -0.012845046818256378, 0.0038914568722248077, 0.028466399759054184, -0.03126121684908867, -0.02829982154071331, -0.03835005313158035, 0.031594373285770416, -0.048011600971221924, -0.03264936804771423, 0.055526137351989746, 0.03746163472533226, -0.09313584119081497, -0.014270217157900333, 0.0023008643183857203, -0.00669089937582612, -0.002676822477951646, -0.021136948838829994, -0.004060348961502314, 0.03968267887830734, 0.01650051772594452, -0.06881539523601532, 0.00987439788877964, -0.031316742300987244, -0.010309352539479733, -0.038831278681755066, 0.005029742605984211, -0.03675830364227295, -0.03835005313158035, 0.0335933119058609, 0.08499200642108917, -0.01568613387644291, -0.0022811987437307835, -0.03139077499508858, -0.020489145070314407, 0.021729229018092155, -0.07440502196550369, 0.0005818676436319947, -0.00020793381554540247, -0.114013671875, 0.013927806168794632, -0.016574552282691002, 0.02250659465789795, -0.02076677605509758, -0.01995239220559597, -0.03960864618420601, 0.01501982007175684, 0.02900315262377262, 0.011734523810446262, 0.011382858268916607, 0.04430985823273659, -0.012012154795229435, 0.021544141694903374, 0.07118450850248337, -0.004627177957445383, -0.02189580723643303, -0.014760698191821575, -0.01884187012910843, -0.026708072051405907, -0.005973686929792166, 0.050454750657081604, 0.02198835089802742, -0.027874121442437172, 0.06233734264969826, -0.03055788390338421, 0.029706483706831932, -0.017037270590662956, -0.010744307190179825, 0.016750384122133255, 0.018804851919412613, 0.060005247592926025, -0.013603903353214264, -0.012946844100952148, 0.0021863416768610477, 0.03857215866446495, 0.02696719393134117, -0.0076209623366594315, -0.012326802127063274, -0.02942885272204876, -0.02241405099630356, -0.006505812518298626, -0.023857731372117996, -0.02300632931292057, -0.017740601673722267, -0.014325743541121483, 0.029910080134868622, 0.03127972409129143, 0.008583415299654007, -0.04442090913653374, -0.04386564716696739, 0.013178203254938126, -0.001226202235557139, 0.04205179587006569, 0.03196454793214798, 0.003958550747483969, -0.043532490730285645, 0.008458481170237064, -0.02239554189145565, -0.05896875634789467, 0.02818876877427101, -0.020600197836756706, -0.020692741498351097, -0.06563189625740051, 0.0022291431669145823, 0.012197241187095642, -0.01945265755057335, 0.05082492530345917, -0.06729768216609955, -0.08336324244737625, -0.05863559991121292, 0.012493381276726723, -0.04334740340709686, -0.005279610399156809, 0.008967471309006214, -0.051047030836343765, 0.059598054736852646, 0.012752503156661987, 0.033963486552238464, 0.012715485878288746, -0.027466928586363792, 0.021303528919816017, -0.04986247047781944, 0.05408245697617531, 0.0567847304046154, 0.019267570227384567, -0.06274453550577164, 0.0005162195884622633, 0.03450024127960205, 0.037017423659563065, 0.0014066621661186218, -0.03127972409129143, -0.001185714383609593, -0.004765993449836969, -0.037424616515636444, 0.022006860002875328, 0.00666776392608881, 0.0026953313499689102, -0.04008987173438072, -0.019008448347449303, 0.018795598298311234, 0.0243204478174448, -0.032427262514829636, 0.031816475093364716, 0.018592001870274544, -0.022580629214644432, -0.0030817005317658186, 0.03233472257852554, -0.025690093636512756, 0.05282386392354965, 0.028762539848685265, 0.045050207525491714, 0.04945528134703636, 0.012835792265832424, 0.02728184312582016, -0.041496533900499344, 0.006255944725126028, 0.0021331291645765305, 0.06418821215629578, -0.008518635295331478, -0.04305126518011093, 0.06970380991697311, 0.013594649732112885, 0.0009965784847736359, -0.018055249005556107, -0.00531662767753005, 0.01039264164865017, 0.031909018754959106, -0.04323635250329971, -0.0021979096345603466, -0.01884187012910843, -0.0809941291809082, -0.08476990461349487, -0.00682508759200573, -0.04530932754278183, 0.08847164362668991, 0.024764657020568848, -0.007607080973684788, 0.0466049388051033, 0.0429772287607193, 0.015251179225742817 ]
717,431
pytorch_optimizer.optimizer.pid
__str__
null
def __str__(self) -> str: return 'PID'
(self) -> str
[ 0.04558608680963516, 0.023687206208705902, 0.006592424586415291, -0.025410503149032593, 0.04906519502401352, -0.01609494537115097, 0.05322711914777756, 0.0024792717304080725, 0.06002276390790939, -0.050821006298065186, -0.05381239205598831, -0.023670949041843414, -0.006486750673502684, 0.02176881954073906, 0.03345797583460808, -0.027865389361977577, 0.02183385007083416, -0.030482850968837738, 0.004478946793824434, 0.010567388497292995, -0.0125020332634449, 0.06724110245704651, 0.044870756566524506, -0.05436514690518379, -0.010063405148684978, 0.04955292120575905, 0.023589661344885826, -0.031685907393693924, -0.041229069232940674, -0.030564138665795326, -0.0052999514155089855, -0.031246954575181007, -0.013144205324351788, 0.0019417575094848871, -0.0522516705095768, 0.0609331838786602, -0.0714680552482605, 0.038725413382053375, -0.05716143921017647, 0.0076329056173563, 0.016696473583579063, 0.005210535135120153, -0.040448710322380066, -0.0192814189940691, -0.04217200726270676, -0.027458950877189636, 0.03957080468535423, 0.019297676160931587, 0.006856609135866165, -0.015940498560667038, -0.014900017529726028, 0.02383352443575859, -0.03709965944290161, -0.021720046177506447, -0.04808974638581276, 0.03116566687822342, 0.052479274570941925, -0.028385629877448082, -0.035473909229040146, 0.03827020153403282, -0.050821006298065186, 0.03563648462295532, 0.04952040687203407, -0.0556657500565052, 0.03217363357543945, -0.0058039347641170025, 0.03531133383512497, 0.05150382220745087, -0.0014977240934967995, 0.020760852843523026, 0.07966184616088867, -0.12498781830072403, -0.03690456971526146, 0.040936436504125595, 0.05826695263385773, -0.030092669650912285, -0.06548529118299484, 0.028239311650395393, 0.026971226558089256, 0.019118843600153923, 0.007978377863764763, 0.008470168337225914, -0.005694196559488773, 0.00625101663172245, -0.006185986567288637, -0.028109252452850342, 0.002753617474809289, -0.03391318768262863, -0.07406926155090332, 0.0008062713895924389, -0.01229881402105093, -0.0017273614648729563, -0.0329052209854126, 0.07933669537305832, -0.02121606469154358, -0.034856121987104416, 0.04139164462685585, -0.02832059934735298, -0.004450496286153793, -0.029669973999261856, -0.030938060954213142, 0.024061130359768867, -0.04939034581184387, -0.03661193698644638, -0.04753698781132698, -0.028970900923013687, -0.04028613492846489, 0.049845557659864426, 0.01858234591782093, 0.028385629877448082, -0.029686231166124344, 0.059730127453804016, -0.007137051317840815, -0.03332791477441788, 0.05004064738750458, -0.026028290390968323, -0.0077670300379395485, 0.00000755720657252823, 0.02536173164844513, -0.002109413268044591, -0.01142903696745634, 0.03576654568314552, -0.033685579895973206, -0.017720697447657585, -0.019330192357301712, 0.08447407186031342, -0.05872216448187828, -0.012859698385000229, 0.02396358549594879, -0.05930743366479874, 0.046886686235666275, 0.008177532814443111, -0.0027454886585474014, 0.013209234923124313, 0.06590798497200012, -0.03950577229261398, 0.012908470816910267, 0.029458627104759216, 0.04061128571629524, 0.0777759775519371, -0.00167554069776088, 0.016021786257624626, 0.021996425464749336, -0.00604779738932848, -0.0011024631094187498, 0.013591286726295948, -0.005572265014052391, 0.04181434214115143, -0.028857098892331123, -0.0058730291202664375, 0.027052514255046844, 0.0003952609549742192, 0.04747195914387703, -0.00407047662883997, 0.02321573905646801, 0.0332954004406929, 0.03999349847435951, -0.0497480109333992, 0.013014145195484161, -0.09000162780284882, 0.004491140134632587, -0.044610634446144104, 0.03134449943900108, -0.026857422664761543, -0.031279467046260834, 0.037814993411302567, 0.022337833419442177, 0.009177369996905327, 0.029409853741526604, 0.04503333196043968, 0.001883840188384056, -0.026304667815566063, -0.019882947206497192, 0.01755812205374241, -0.007929605431854725, 0.0278328750282526, 0.012908470816910267, 0.044057879596948624, 0.0442204549908638, 0.029621202498674393, 0.010551130399107933, 0.015655992552638054, -0.042041946202516556, 0.05933994799852371, 0.060965701937675476, 0.005868964828550816, 0.012591449543833733, 0.0361892394721508, 0.024337507784366608, -0.02806047908961773, 0.01540399994701147, 0.018143393099308014, -0.0003955149732064456, 0.028662007302045822, -0.0021256706677377224, -0.0024122095201164484, 0.017184197902679443, -0.0631767213344574, -0.03103560581803322, -0.0011481873225420713, 0.07628028094768524, 0.045651115477085114, -0.06044546142220497, 0.0360591784119606, 0.028694523498415947, -0.021801333874464035, 0.007364656776189804, 0.02064705081284046, 0.026711106300354004, -0.045163389295339584, 0.056901320815086365, -0.015956755727529526, 0.02859697863459587, 0.04675662890076637, 0.027930419892072678, -0.028710780665278435, -0.010225980542600155, -0.007250853814184666, 0.00842952448874712, -0.005482848733663559, 0.06571289896965027, -0.0004153288318775594, 0.003017802257090807, -0.0023187287151813507, -0.058494556695222855, 0.019362706691026688, 0.02285807393491268, 0.011884246952831745, -0.0004331104864832014, 0.0304665919393301, 0.05091855302453041, -0.05325963720679283, -0.014745570719242096, 0.0604129433631897, 0.022435378283262253, 0.03544139489531517, -0.08349862694740295, -0.011290847323834896, -0.08310844004154205, -0.024142418056726456, -0.035831574350595474, 0.0040074787102639675, 0.04304991289973259, 0.017932044342160225, 0.057519108057022095, -0.03123069554567337, 0.007405300624668598, 0.016363194212317467, 0.004210697486996651, -0.008795318193733692, 0.07517477124929428, -0.07322387397289276, -0.03807511180639267, -0.010510486550629139, -0.0012243945384398103, -0.033262886106967926, -0.05312957614660263, 0.01012030616402626, -0.014095270074903965, 0.013583158142864704, -0.06538774818181992, -0.0051780203357338905, -0.02502032369375229, 0.03201105818152428, 0.014233458787202835, 0.03979840874671936, -0.04581369087100029, 0.01602991484105587, -0.0027678427286446095, -0.030759228393435478, 0.026028290390968323, -0.009283044375479221, -0.05725898593664169, 0.0022740205749869347, -0.04041619598865509, -0.062916599214077, -0.06379450857639313, 0.046886686235666275, -0.09065192937850952, -0.05449520796537399, -0.01105511374771595, -0.013794505968689919, 0.011315234005451202, -0.0250040665268898, 0.0036294914316385984, -0.014973175711929798, 0.03612421080470085, 0.030108926817774773, -0.017606893554329872, 0.01600552909076214, -0.011648513376712799, 0.022142741829156876, -0.06262397021055222, -0.0031133152078837156, 0.0017659731674939394, 0.046333931386470795, 0.014908146113157272, 0.019248904660344124, -0.02523167058825493, -0.026434727013111115, -0.04028613492846489, -0.012176882475614548, -0.0471142940223217, -0.049845557659864426, -0.0671110451221466, 0.08772557973861694, 0.02410990186035633, -0.007974313572049141, 0.029393596574664116, -0.02147618494927883, -0.00027104333275929093, 0.04444805905222893, -0.020744595676660538, 0.08675012737512589, 0.014704926870763302, 0.09702488034963608, -0.01851731538772583, 0.013721346855163574, 0.020468218252062798, 0.06233133375644684, -0.04610632732510567, 0.03404324874281883, 0.008616485632956028, 0.03498618304729462, 0.029263535514473915, 0.03657941892743111, -0.03739229589700699, 0.029474884271621704, 0.009112340398132801, 0.04288733750581741, -0.04727686941623688, 0.0038062918465584517, 0.043830275535583496, -0.018891237676143646, 0.018956268206238747, -0.042594701051712036, 0.02064705081284046, -0.011006341315805912, -0.021801333874464035, -0.000017368873159284703, 0.0719882994890213, -0.04883759096264839, -0.03449845686554909, 0.06086815521121025, 0.002979190554469824, 0.013493741862475872, -0.022419121116399765, -0.0009784995345398784, 0.039083078503608704, -0.014737442135810852, 0.0037189077120274305, 0.028027964755892754, -0.01949276588857174, 0.0005364981479942799, 0.023735979571938515, -0.04753698781132698, -0.0015363356797024608, 0.02721508778631687, -0.03501869738101959, 0.01398959569633007, -0.025540564209222794, -0.06463990360498428, 0.020825883373618126, -0.019996749237179756, -0.044610634446144104, 0.006856609135866165, 0.002952772192656994, -0.010510486550629139, 0.07289872318506241, 0.01475369930267334, -0.045911237597465515, 0.02971874736249447, -0.041001465171575546, -0.038432776927948, -0.03323037177324295, 0.07615022361278534, -0.0008240530733019114, 0.003905869321897626, -0.04815477505326271, -0.04360266774892807, -0.03758738562464714, -0.04483824223279953, 0.02274427004158497, 0.023475859314203262, -0.02661355957388878, 0.015371485613286495, 0.00029314341372810304, 0.0024752074386924505, -0.004340758081525564, 0.013875793665647507, -0.021118517965078354, 0.038172658532857895, -0.04129410162568092, -0.009388717822730541, -0.009087953716516495, -0.041846856474876404, 0.013453098013997078, -0.016086816787719727, -0.02175256237387657, -0.01672898791730404, 0.013558771461248398, -0.03123069554567337, -0.01788327284157276, 0.02791416272521019, 0.0003017802082467824, -0.005677938926964998, 0.003702650312334299, -0.00447081821039319, -0.04890261963009834, -0.0608031265437603, 0.03449845686554909, -0.00658429553732276, -0.001554625341668725, -0.06678589433431625, 0.04620387405157089, -0.006803771946579218, -0.027946677058935165, -0.04526093602180481, 0.03511624410748482, -0.03345797583460808, -0.03407576307654381, 0.038237687200307846, 0.041001465171575546, 0.04555357247591019, -0.011030727066099644, 0.04054625704884529, 0.04766704887151718, 0.06886685639619827, 0.11360754817724228, 0.04558608680963516, -0.042041946202516556, 0.042041946202516556, -0.016249392181634903, 0.022906845435500145, 0.040806375443935394, -0.02576817013323307, 0.045293450355529785, -0.015469030477106571, -0.027182573452591896, 0.04350512474775314, 0.028727037832140923, -0.01647699624300003, 0.023670949041843414, 0.039148107171058655, 0.07270362973213196, -0.02957242913544178, -0.04760202020406723, -0.02604454755783081, 0.006836287211626768, -0.007234596647322178, -0.04900016635656357, 0.0005801902734674513, 0.044383030384778976, -0.08447407186031342, 0.05114615708589554, -0.019915461540222168, -0.04113152623176575, -0.024922778829932213, -0.0005740936612710357, -0.03957080468535423, -0.06155097112059593, 0.06600553542375565, -0.04600878059864044, -0.004153796471655369, -0.022646725177764893, -0.009738254360854626, 0.000714822846930474, 0.0020829946734011173, -0.03573402762413025, 0.03378312662243843, 0.04656153917312622, 0.033067796379327774, 0.005283694248646498, -0.024304993450641632, -0.06480247527360916, 0.07582507282495499, -0.008132824674248695, -0.018761178478598595, -0.0015149976825341582, 0.014217201620340347, -0.029133476316928864, -0.039635833352804184, 0.03648187592625618, 0.08538449555635452, -0.027036255225539207, 0.006161600351333618, 0.005515363533049822, 0.008795318193733692, -0.039765894412994385, -0.030580395832657814, 0.0331653393805027, -0.008860348723828793, -0.03612421080470085, -0.027247603982686996, 0.033262886106967926, 0.006153471302241087, 0.003950577229261398, -0.008518940769135952, -0.07010242342948914, 0.01776946894824505, -0.01741180382668972, 0.004950414877384901, 0.053779877722263336, -0.03275890275835991, 0.04454560577869415, -0.03501869738101959, -0.0016054301522672176, 0.03311656787991524, -0.01781824231147766, 0.015420258045196533, 0.02674362063407898, -0.050821006298065186, 0.03323037177324295, -0.016566412523388863, -0.006677776575088501, 0.03586408868432045, 0.005539750214666128, 0.0027251667343080044, -0.022484149783849716, 0.018679890781641006, 0.006100634578615427, -0.043635185807943344, -0.03033653274178505, -0.051926519721746445, -0.02591448649764061, 0.01416029967367649, -0.06168103218078613, -0.0031153473537415266, -0.05381239205598831, 0.11276216059923172, 0.008405137807130814, 0.02287433110177517, 0.02064705081284046, 0.03269387409090996, 0.015956755727529526, 0.039213139563798904, -0.06834661215543747, -0.017151683568954468, 0.0023939197417348623, 0.02971874736249447, -0.00890912115573883, -0.04278979450464249, -0.004084702115505934, -0.03134449943900108, 0.032710131257772446, 0.0051373764872550964, -0.008616485632956028, 0.033620551228523254, 0.008124696090817451, 0.012713381089270115, 0.02113477699458599, -0.050886038690805435, -0.04581369087100029, -0.06789140403270721, 0.011721671558916569, 0.08193790167570114, 0.04126158729195595, -0.0010709641501307487, 0.02423996292054653, 0.013656317256391048, -0.011112014763057232, -0.013152333907783031, 0.10333279520273209, -0.0008956877281889319, -0.015298326499760151, -0.002753617474809289, -0.08662007004022598, -0.015143879689276218, -0.00918549858033657, -0.049780525267124176, 0.03440091386437416, -0.08063729852437973, 0.029377339407801628, -0.00013984007819090039, -0.07354902476072311, -0.006982604973018169, 0.04607381299138069, 0.05618599057197571, -0.01762315258383751, 0.05329215154051781, -0.046886686235666275, 0.07875142991542816, 0.0040115430019795895, -0.03508372977375984, -0.028840839862823486, 0.031880997121334076, -0.02024061232805252, -0.0208583977073431, 0.072638601064682, -0.05244676023721695, -0.06577792763710022, -0.023605918511748314, 0.004218826536089182, 0.014298489317297935, 0.04331003502011299, -0.0413266159594059, 0.028629492968320847, -0.03791253641247749, 0.008722160011529922, -0.0070923431776463985, 0.04808974638581276, 0.041424162685871124, 0.04389530420303345, 0.015030077658593655, 0.060087792575359344, -0.001299585564993322, -0.00867338664829731, 0.016761504113674164, -0.04028613492846489, 0.018078362569212914, -0.007246789522469044, -0.0220451969653368, 0.011461551301181316, 0.01326613686978817, -0.018842466175556183, -0.0035888475831598043, 0.031263209879398346, -0.0355389378964901, -0.016086816787719727, -0.00042218746966682374, -0.01658266969025135, 0.053519755601882935, -0.004446431528776884, -0.016485124826431274, 0.0059014796279370785, 0.04022110626101494, -0.06460738182067871, -0.03358803689479828, 0.027068771421909332, -0.09175744652748108, 0.013566900976002216, 0.006507072597742081, 0.002113477559760213, -0.03670947998762131, -0.05244676023721695, -0.0289546437561512, -0.014802471734583378, -0.03934319689869881, -0.02846691757440567, 0.0529019720852375, -0.02674362063407898, -0.007198017090559006, -0.07556495070457458, -0.03726223483681679, 0.008291334845125675, 0.000319307844620198, -0.08167777955532074, -0.019655341282486916, -0.004637457430362701, -0.025247929617762566, 0.0059218015521764755, -0.06756625324487686, -0.010079662315547466, 0.04490327090024948, 0.007344334851950407, -0.0036315235774964094, -0.02797919139266014, 0.010193465277552605, -0.045423511415719986, -0.017086653038859367, -0.011274590156972408, -0.026093319058418274, -0.018484801054000854, -0.07458950579166412, 0.033132825046777725, 0.007372785359621048, -0.00006264860712690279, -0.018289709463715553, -0.020191840827465057, -0.006681840866804123, 0.03674199432134628, 0.01885872334241867, 0.01838725619018078, -0.0471142940223217, -0.040188588201999664, -0.029377339407801628, -0.010006503202021122, 0.031214438378810883, 0.05761665105819702, -0.008059665560722351, 0.022988133132457733, -0.05686880648136139, 0.02410990186035633, -0.07062266767024994, 0.03155584633350372, 0.05355226993560791, -0.007807673886418343, 0.012111852876842022, 0.011266461573541164, -0.04831735044717789, -0.07361405342817307, -0.00783612485975027, -0.002312632277607918, 0.020679565146565437, 0.018696147948503494, -0.00475126039236784, 0.009307430125772953, -0.0064786216244101524, -0.011746058240532875, -0.019378963857889175, -0.024825233966112137, 0.003617298323661089, 0.034173306077718735, -0.011811088770627975, -0.007515038829296827, -0.010364169254899025, -0.023248253390192986, 0.008510812185704708, 0.010380426421761513, -0.014062754809856415, 0.015721021220088005, 0.04675662890076637, 0.022012682631611824, -0.03957080468535423, 0.039408229291439056, -0.012396358884871006, -0.026223380118608475, 0.044350516051054, 0.028694523498415947, 0.0233620572835207, 0.001657250919379294, 0.02910096012055874, 0.02113477699458599, 0.030369047075510025, 0.028076738119125366, 0.05504796281456947, 0.005507234949618578, -0.001962079433724284, 0.0028044222854077816, -0.0036782638635486364, -0.0011624126927927136, 0.022955618798732758, -0.08128760010004044, -0.055600717663764954, 0.012900342233479023, 0.005661681294441223, 0.03488864004611969, -0.010356040671467781, 0.03420582413673401, 0.011494066566228867, 0.013046659529209137, 0.03314908221364021, 0.029117219150066376, 0.012168753892183304, 0.05459275096654892, 0.010201593860983849, 0.045163389295339584, 0.022679241374135017, -0.0006828158511780202, -0.015948627144098282, 0.054007481783628464, 0.06064055114984512, -0.04864250123500824, -0.00701105548068881, -0.01707039587199688, -0.032368723303079605, 0.029263535514473915, 0.06808649748563766, 0.0032352465204894543, 0.01720045693218708, -0.00836449395865202, -0.0360591784119606, 0.008787189610302448, 0.034791093319654465, 0.003531946334987879, 0.049617949873209, -0.017379289492964745, -0.02059827744960785 ]
717,452
pytorch_optimizer.optimizer.pid
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 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 group['momentum'] > 0.0: state['grad_buffer'] = torch.zeros_like(p) state['i_buffer'] = torch.zeros_like(p) state['d_buffer'] = 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'], ) if group['momentum'] > 0.0: i_buf = state['i_buffer'] i_buf.mul_(group['momentum']).add_(grad, alpha=1.0 - group['dampening']) g_buf, d_buf = state['grad_buffer'], state['d_buffer'] d_buf.mul_(group['momentum']) if group['step'] > 1: d_buf.add_(grad - g_buf, alpha=1.0 - group['momentum']) g_buf.copy_(grad) grad.add_(i_buf, alpha=group['integral']).add_(d_buf, alpha=group['derivative']) p.add_(grad, alpha=-group['lr']) return loss
(self)
[ -0.01200422365218401, 0.002387999789789319, -0.0390113927423954, 0.055303506553173065, -0.015423325821757317, 0.008071321994066238, -0.023971080780029297, -0.021075120195746422, -0.014685322530567646, 0.012994455173611641, -0.04379439726471901, 0.0058666556142270565, 0.018991896882653236, 0.08146056532859802, -0.019767265766859055, 0.051454681903123856, -0.0015005279565230012, 0.05534087121486664, 0.01422757375985384, -0.0018835420487448573, -0.007118457928299904, -0.06714891642332077, -0.004647549707442522, 0.0555277094244957, -0.0655047595500946, -0.023690825328230858, 0.0472695492208004, -0.0045050871558487415, -0.021000385284423828, 0.00044928258284926414, -0.022495074197649956, -0.04315915331244469, 0.018524805083870888, 0.01443309336900711, 0.03960926830768585, -0.03845088183879852, -0.01684327982366085, 0.012658149935305119, -0.06688734889030457, -0.023989763110876083, -0.0076415990479290485, -0.017254319041967392, -0.034041550010442734, 0.01137832272797823, 0.019580429419875145, 0.010574926622211933, -0.029202492907643318, 0.042374443262815475, -0.0074127246625721455, -0.0011829064460471272, 0.00007779974839650095, -0.032920531928539276, 0.040020305663347244, -0.023092949762940407, 0.022158769890666008, 0.08392680436372757, 0.06001177802681923, -0.06741049140691757, 0.02492394484579563, -0.029445379972457886, 0.06307589262723923, -0.06509371846914291, 0.03353709354996681, 0.007543510291725397, 0.007249243091791868, -0.03237870708107948, -0.04981052130460739, -0.02072013169527054, 0.02688572369515896, 0.03577912598848343, 0.015460692346096039, 0.02331715263426304, 0.012321844696998596, 0.00026521977270022035, -0.0454011894762516, -0.028193578124046326, -0.014946892857551575, -0.05904022976756096, 0.033294204622507095, -0.039086125791072845, 0.002491927472874522, 0.0039866166189312935, -0.04162709787487984, 0.02219613641500473, -0.02733413130044937, -0.03316342085599899, -0.005306147038936615, -0.043308623135089874, -0.026680205017328262, -0.018795717507600784, 0.015376616269350052, 0.013825876638293266, 0.010472167283296585, 0.029314594343304634, 0.0548550970852375, 0.04106659069657326, -0.052613064646720886, -0.01941227726638317, -0.046185899525880814, -0.029912469908595085, 0.027091244235634804, 0.023205051198601723, 0.004843727685511112, 0.03252817690372467, 0.05130521208047867, -0.053509876132011414, -0.0020715459249913692, -0.04278548061847687, 0.019673848524689674, -0.05235149338841438, 0.005385552532970905, -0.004133750218898058, -0.03957189992070198, -0.009182997979223728, -0.02752096764743328, -0.0011928321328014135, 0.004269206430763006, 0.0035055135376751423, -0.030977435410022736, 0.04073028266429901, 0.026867041364312172, -0.014012712053954601, -0.05388354882597923, -0.01415283977985382, 0.013284051790833473, 0.04865213856101036, 0.041365526616573334, 0.021897198632359505, 0.03632095083594322, -0.04592432826757431, -0.02382161095738411, 0.005614426918327808, 0.0013744134921580553, -0.009159643203020096, 0.01559147797524929, -0.008804654702544212, -0.013377469033002853, 0.01931886002421379, -0.006137568037956953, 0.008543083444237709, -0.011527791619300842, 0.002987043233588338, -0.0070670777931809425, 0.0430096872150898, 0.05074470117688179, 0.03146320953965187, 0.04035661369562149, 0.05500456690788269, 0.001521546975709498, 0.00956601183861494, 0.023149000480771065, 0.02780122123658657, 0.04241180792450905, 0.032322656363248825, -0.009846266359090805, 0.037740904837846756, -0.028791453689336777, 0.038207996636629105, -0.0399455726146698, -0.028511198237538338, -0.028156209737062454, -0.028417780995368958, -0.02776385471224785, -0.011901463381946087, 0.012966429814696312, 0.010967282578349113, 0.005997440777719021, 0.04536382108926773, -0.04069291800260544, 0.018552830442786217, 0.010135862044990063, -0.03506914898753166, 0.06961515545845032, 0.032920531928539276, -0.017319712787866592, 0.13429783284664154, 0.006539265625178814, 0.010117178782820702, -0.024157917127013206, -0.006693405564874411, 0.013816534541547298, -0.01200422365218401, -0.023186368867754936, -0.05709713324904442, 0.0029987203888595104, 0.017665360122919083, -0.0047176131047308445, -0.008678539656102657, 0.04360756278038025, 0.014479802921414375, 0.007833106443285942, 0.0012926727067679167, 0.04936211556196213, -0.011471740901470184, -0.00559574319049716, 0.024083182215690613, 0.02025303989648819, 0.012985113076865673, 0.09117604792118073, 0.017020775005221367, -0.004752644803375006, -0.02752096764743328, 0.02767043560743332, 0.008019942790269852, -0.04536382108926773, -0.010341381654143333, -0.02275664545595646, 0.07178245484828949, -0.00975284818559885, 0.003991287667304277, -0.04801689460873604, 0.0008407627465203404, 0.04883897304534912, 0.06939095258712769, 0.038525618612766266, -0.07096037268638611, -0.021299323067069054, 0.009453910402953625, 0.0609833262860775, -0.020589346066117287, -0.04925001412630081, -0.06333746016025543, 0.037460651248693466, -0.012433947063982487, 0.04144026339054108, -0.029725633561611176, 0.02238297276198864, -0.0741739571094513, -0.015470034442842007, -0.002140441909432411, 0.0036036025267094374, -0.039497166872024536, 0.007875144481658936, 0.0017060477985069156, 0.0557892806828022, -0.005058589391410351, -0.061244893819093704, -0.028698034584522247, 0.0070997742004692554, -0.006259011570364237, -0.032976582646369934, -0.0451396182179451, -0.03897402435541153, 0.03391076251864433, -0.0008734590956009924, 0.038488250225782394, 0.04663430526852608, 0.017889562994241714, -0.005021221935749054, 0.05616294965147972, -0.02131800726056099, -0.03211713582277298, -0.04383176565170288, 0.018608883023262024, -0.03420970216393471, -0.023597408086061478, 0.051604148000478745, 0.018917161971330643, 0.028810136020183563, -0.043682295829057693, 0.019767265766859055, -0.04984788969159126, -0.0621790774166584, 0.04570012539625168, -0.03549887239933014, 0.007235230412334204, 0.038245365023612976, -0.04663430526852608, 0.05388354882597923, 0.05421985685825348, 0.08317945897579193, 0.06445847451686859, -0.045849595218896866, -0.03303263336420059, -0.00602546613663435, 0.02354135736823082, 0.024270018562674522, 0.02432606928050518, 0.009463251568377018, -0.039272960275411606, 0.07051196694374084, -0.043719664216041565, -0.09072764217853546, -0.016852622851729393, -0.06083385646343231, 0.04674641042947769, -0.005418248940259218, -0.002639060840010643, 0.04895107448101044, 0.005053918343037367, 0.04491541534662247, 0.009874291718006134, 0.09282020479440689, 0.001498192548751831, 0.06965252012014389, -0.0008746267994865775, -0.03187425062060356, 0.008295525796711445, -0.017581284046173096, 0.006034808233380318, 0.08661724627017975, -0.03521861881017685, -0.017768118530511856, 0.0022385308984667063, -0.024344751611351967, -0.02066407911479473, 0.013050505891442299, 0.000253104604780674, 0.000026529276510700583, -0.01712353527545929, 0.009874291718006134, -0.012256452813744545, -0.010416116565465927, 0.018777035176753998, 0.002984707709401846, -0.09371702373027802, -0.010238622315227985, -0.05014682561159134, 0.009411871433258057, 0.07862065732479095, -0.01003310177475214, 0.022775327786803246, 0.015264514833688736, 0.04797952622175217, -0.03759143501520157, 0.005558375734835863, 0.0701756626367569, 0.0251668319106102, -0.043906498700380325, -0.011789361946284771, -0.0600491426885128, 0.008220790885388851, 0.05052049830555916, 0.02645600028336048, -0.049100544303655624, -0.0016616741195321083, 0.0524635948240757, -0.00904754176735878, 0.011873438023030758, -0.05709713324904442, 0.07264190167188644, 0.013452203944325447, -0.025148147717118263, 0.012331186793744564, 0.0012132673291489482, -0.01404073741286993, 0.017048800364136696, 0.017599966377019882, 0.07477183640003204, 0.003804451320320368, 0.010705712251365185, -0.014087446965277195, -0.025596555322408676, 0.04999735951423645, 0.026119695976376534, 0.035928595811128616, 0.0076696244068443775, -0.01394732017070055, 0.009911658242344856, -0.07660283148288727, 0.015283198095858097, 0.011518449522554874, -0.03090270236134529, 0.09864949434995651, 0.10574927181005478, 0.0083562470972538, -0.03193030133843422, -0.023279786109924316, 0.027950691059231758, -0.005133323837071657, 0.006557949353009462, -0.037049610167741776, -0.002119422657415271, 0.0346207432448864, -0.044504374265670776, -0.03420970216393471, -0.026250481605529785, -0.013293392956256866, 0.07458499819040298, 0.04147762805223465, 0.021579576656222343, -0.053360410034656525, -0.016329480335116386, 0.03845088183879852, 0.02989378571510315, -0.026754938066005707, 0.023205051198601723, -0.0597875714302063, 0.027950691059231758, -0.07159561663866043, 0.0619175061583519, -0.004775999579578638, -0.000349442008882761, 0.01956174708902836, -0.046410102397203445, 0.022644544020295143, 0.05093153938651085, 0.028511198237538338, -0.03553623706102371, -0.03764748573303223, -0.028847504407167435, -0.026437317952513695, -0.01928149163722992, 0.023616092279553413, -0.01441441010683775, -0.06871834397315979, 0.0024031801149249077, 0.0557892806828022, 0.027035193517804146, 0.04667167365550995, 0.005469628609716892, 0.009771531447768211, -0.050856802612543106, -0.0007380028837360442, 0.04476594552397728, -0.05089417099952698, -0.02785727195441723, -0.0016780223231762648, 0.0046895877458155155, 0.016301454976201057, 0.05829288437962532, 0.004825043957680464, 0.03420970216393471, 0.01557279471307993, -0.04129079356789589, -0.056237686425447464, -0.013629698194563389, -0.006973660085350275, -0.03785300627350807, 0.025708656758069992, -0.04674641042947769, -0.054518792778253555, -0.02200930006802082, -0.02520419843494892, -0.03650778532028198, 0.015787655487656593, -0.012966429814696312, 0.04435490444302559, 0.040805019438266754, 0.016731178387999535, -0.008454336784780025, 0.018795717507600784, -0.01865559071302414, -0.02729676477611065, -0.002737149829044938, -0.027539649978280067, 0.05283726751804352, -0.03916085883975029, -0.10537559539079666, 0.02367214299738407, -0.012359212152659893, -0.006856887135654688, 0.046185899525880814, -0.004904449451714754, 0.010322698391973972, 0.0076742954552173615, -0.060273345559835434, -0.04345809295773506, -0.015853049233555794, 0.014330334030091763, 0.016039885580539703, 0.0023693160619586706, -0.02854856662452221, 0.001431632088497281, -0.01643224060535431, -0.02798805758357048, 0.05440669134259224, 0.04457911103963852, -0.015255172736942768, -0.004439694341272116, -0.005240754224359989, -0.008613146841526031, 0.02854856662452221, -0.03391076251864433, -0.012200402095913887, -0.020215673372149467, -0.051043640822172165, 0.0031925630755722523, 0.03562965616583824, -0.05040839686989784, -0.013648382388055325, -0.06247801333665848, 0.026101011782884598, 0.025036046281456947, -0.016647102311253548, 0.027819905430078506, 0.0016394873382523656, 0.014106130227446556, 0.04304705187678337, 0.0718945562839508, -0.03938506543636322, -0.0671115517616272, 0.05167888477444649, 0.022551124915480614, -0.01825389266014099, -0.021579576656222343, 0.026941774412989616, 0.01821652613580227, 0.08557096123695374, -0.009808898903429508, -0.0019956438336521387, 0.04491541534662247, -0.04614853113889694, -0.011182144284248352, -0.0022782334126532078, -0.020794864743947983, -0.038861922919750214, 0.006777482107281685, -0.04536382108926773, 0.01740378886461258, 0.009537986479699612, -0.010257305577397346, -0.024662373587489128, 0.01840336248278618, -0.017992323264479637, -0.061282262206077576, 0.04323389008641243, 0.05634978786110878, 0.03590990975499153, -0.0600491426885128, 0.038525618612766266, 0.008813995867967606, -0.024400804191827774, 0.004500416107475758, -0.026119695976376534, 0.038207996636629105, -0.013797851279377937, -0.02892223931849003, 0.0037343879230320454, -0.008057309314608574, -0.005689161363989115, 0.03729249909520149, 0.05563981086015701, 0.08250685036182404, 0.00027937846607528627, -0.06139436364173889, -0.018263235688209534, -0.07615441828966141, -0.1310095191001892, -0.03789037466049194, -0.0039866166189312935, -0.015796998515725136, 0.016011860221624374, 0.0034517981112003326, -0.014199548400938511, 0.03725513070821762, 0.015329907648265362, -0.0004805192584171891, -0.03157531097531319, -0.01177067868411541, -0.062216442078351974, 0.03456469252705574, -0.035330720245838165, 0.01618935354053974, 0.02767043560743332, 0.017730752006173134, -0.012966429814696312, 0.02376556023955345, 0.0022408661898225546, 0.014423752203583717, -0.03938506543636322, -0.062029607594013214, 0.01768404245376587, -0.029202492907643318, 0.006660709157586098, 0.014601246453821659, 0.048689503222703934, -0.04248654469847679, -0.03633963316679001, 0.04151499643921852, -0.008711236529052258, 0.012265793979167938, -0.012387237511575222, -0.007352003362029791, -0.0086551858112216, 0.00031382637098431587, 0.023802926763892174, -0.04577486217021942, -0.009421213530004025, -0.042337074875831604, 0.03207977116107941, -0.039497166872024536, -0.013452203944325447, -0.004322921857237816, -0.01036006584763527, 0.05444405972957611, -0.10216201841831207, 0.03372392803430557, 0.001718892715871334, 0.024737108498811722, -0.02432606928050518, -0.0016605064738541842, -0.0758928507566452, -0.0609833262860775, 0.009561341255903244, 0.00854775495827198, -0.049511585384607315, -0.00898681953549385, 0.024120548740029335, 0.03527466952800751, -0.0505952350795269, -0.0008378434577025473, 0.0356857068836689, 0.04035661369562149, -0.031014803797006607, 0.01941227726638317, -0.03305131942033768, 0.05892812833189964, 0.014956234954297543, -0.028604617342352867, -0.04925001412630081, -0.02761438488960266, 0.01681525446474552, -0.011808046139776707, -0.0649816170334816, -0.030005889013409615, -0.018384678289294243, 0.0033630509860813618, 0.05119311064481735, -0.011639893054962158, -0.02739018201828003, -0.013872585259377956, -0.03678804263472557, -0.019823316484689713, 0.020794864743947983, -0.01590909995138645, 0.04315915331244469, -0.0647200495004654, -0.020738814026117325, -0.037740904837846756, -0.06401006877422333, 0.023616092279553413, 0.01661907695233822, -0.02029040828347206, 0.05960073694586754, 0.013676407746970654, 0.03067849762737751, 0.026026278734207153, -0.023298470303416252, -0.0600491426885128, -0.023429255932569504, 0.06741049140691757, 0.012303161434829235, -0.03590990975499153, -0.025820758193731308, -0.02428870089352131, -0.01161186769604683, 0.03198635205626488, 0.040393978357315063, 0.00039965423638932407, -0.02154221013188362, 0.06838203966617584, -0.03430312126874924, 0.02688572369515896, 0.04629800096154213, 0.003715704195201397, 0.04416806995868683, 0.022924797609448433, 0.026960458606481552, -0.04876423999667168, -0.0055817305110394955, -0.011079384945333004, -0.004308909177780151, -0.004101053811609745, -0.043308623135089874, -0.00904754176735878, 0.003718039719387889, -0.04106659069657326, -0.018020348623394966, -0.048166364431381226, -0.0872151255607605, -0.015115045942366123, -0.06158120185136795, 0.011462398804724216, 0.02113117091357708, -0.034489955753088, 0.030379559844732285, -0.029912469908595085, -0.026680205017328262, 0.018151134252548218, 0.028884870931506157, 0.02714729495346546, -0.019356226548552513, 0.053173571825027466, 0.03680672496557236, 0.00101533776614815, -0.0014024389674887061, 0.0076742954552173615, -0.006506569683551788, 0.018422046676278114, -0.037460651248693466, -0.017954954877495766, 0.038488250225782394, 0.023560039699077606, 0.02131800726056099, -0.0878877341747284, -0.023840295150876045, -0.016992749646306038, 0.030323509126901627, -0.05287463590502739, 0.012060274370014668, -0.02826831117272377, -0.008678539656102657, -0.0064411768689751625, 0.035293351858854294, 0.021205903962254524, 0.04857740178704262, -0.03377997875213623, 0.03049166314303875, 0.034676793962717056, 0.013097215443849564, 0.015666212886571884, -0.040991853922605515, 0.03118295595049858, -0.0035055135376751423, -0.012275136075913906, -0.044093336910009384, -0.030977435410022736, -0.047157447785139084, 0.03643305227160454, -0.008487032726407051, -0.03237870708107948, 0.025409718975424767, 0.02372819371521473, -0.04424280300736427, -0.007837777025997639, 0.05055786669254303, 0.01749720610678196, 0.00975284818559885, 0.008290855213999748, 0.015526085160672665, -0.0002834654878824949, -0.0032065757550299168, -0.005464958027005196, 0.004208484664559364, 0.009836924262344837, 0.06240328028798103, 0.037703536450862885, -0.03697487711906433, 0.013975345529615879, 0.004752644803375006, 0.042934950441122055, 0.024662373587489128, -0.03179951384663582, 0.02845514751970768, 0.03660120442509651, -0.016067910939455032, -0.022457707673311234, 0.02664283663034439, -0.08736459165811539, 0.08684144914150238, 0.043308623135089874, 0.007940537296235561, 0.018674274906516075, 0.0503336638212204, -0.056835561990737915, 0.014274283312261105, -0.06344956159591675, -0.0579192116856575, -0.06909201294183731, -0.028660668060183525, -0.02275664545595646, 0.08751405775547028, 0.05111837387084961, 0.010275988839566708, 0.029632216319441795, 0.06860624253749847, 0.01734773814678192 ]
717,467
pytorch_optimizer.optimizer.pnm
PNM
Positive-Negative Momentum Optimizers. :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. use weight_decouple. :param fixed_decay: bool. fix weight decay. :param eps: float. term added to the denominator to improve numerical stability.
class PNM(Optimizer, BaseOptimizer): r"""Positive-Negative Momentum Optimizers. :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. use weight_decouple. :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 = 1e-3, betas: BETAS = (0.9, 1.0), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: 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, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, } super().__init__(params, defaults) def __str__(self) -> str: return 'PNM' @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['pos_momentum'] = torch.zeros_like(p) state['neg_momentum'] = 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'] noise_norm: float = math.sqrt((1 + beta2) ** 2 + beta2 ** 2) # fmt: skip 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['pos_momentum'] = torch.zeros_like(p) state['neg_momentum'] = 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'], ) if group['step'] % 2 == 1: pos_momentum, neg_momentum = state['pos_momentum'], state['neg_momentum'] else: neg_momentum, pos_momentum = state['pos_momentum'], state['neg_momentum'] pos_momentum.mul_(beta1 ** 2).add_(grad, alpha=1.0 - beta1 ** 2) # fmt: skip delta_p = pos_momentum.mul(1 + beta2).add_(neg_momentum, alpha=-beta2).mul_(1.0 / noise_norm) p.add_(delta_p, alpha=-group['lr']) 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, 1.0), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, eps: float = 1e-08)
[ 0.01241570059210062, -0.017415642738342285, 0.01388103049248457, -0.0028267004527151585, 0.001522259903140366, -0.010861262679100037, -0.07393975555896759, -0.016861194744706154, 0.019475026056170464, 0.021267084404826164, -0.0621379055082798, 0.03243527561426163, 0.01772257126867771, 0.08075156062841415, -0.04716778174042702, 0.07184077054262161, 0.013049356639385223, 0.007093978580087423, -0.005994981154799461, -0.0208908524364233, -0.010257309302687645, -0.04732619598507881, 0.016999807208776474, 0.08051393926143646, -0.04138566926121712, -0.03172241151332855, -0.00046039081644266844, -0.023663097992539406, -0.07568230479955673, -0.012574114836752415, -0.002403438091278076, -0.05267266929149628, -0.0022474993020296097, 0.011376108042895794, 0.02584129013121128, -0.015811702236533165, 0.005017269868403673, 0.035405538976192474, -0.12467184662818909, -0.03510851040482521, 0.059444867074489594, -0.0750882551074028, 0.031148159876465797, 0.005796963814646006, 0.007341500837355852, -0.009435536339879036, -0.00592072494328022, 0.06788041442632675, -0.003910846542567015, -0.015316657721996307, 0.02803928591310978, -0.04962319880723953, 0.05524689704179764, -0.021088868379592896, -0.05607857182621956, 0.06518737971782684, 0.0752466693520546, 0.03603919595479965, 0.0376233346760273, -0.026078911498188972, 0.008579110726714134, -0.03649463504552841, 0.014554290100932121, -0.038989655673503876, -0.016999807208776474, -0.04597967490553856, -0.058533988893032074, -0.03912826627492905, 0.0340392179787159, 0.04803905636072159, 0.04079161584377289, -0.029484814032912254, 0.014603794552385807, 0.044039104133844376, -0.006519727874547243, -0.039900537580251694, -0.03782135248184204, -0.03940549120306969, -0.03023727983236313, -0.0018613649299368262, -0.003237586934119463, -0.006054386496543884, -0.018475037068128586, -0.034257035702466965, 0.020732438191771507, -0.05556372553110123, 0.01064344309270382, -0.003940549213439226, 0.01987106166779995, -0.06388045847415924, 0.015663187950849533, -0.008816731162369251, 0.04011835530400276, 0.009584049694240093, 0.048989541828632355, 0.03518771752715111, -0.02950461581349373, -0.040870822966098785, -0.0029133332427591085, -0.037009481340646744, -0.00984642282128334, 0.055009275674819946, 0.0015346360160037875, 0.054217204451560974, 0.028791751712560654, -0.00556429335847497, -0.049860820174217224, -0.03661344572901726, 0.017742373049259186, -0.07037543505430222, -0.0506528876721859, 0.006316760089248419, -0.03417782858014107, -0.051286544650793076, 0.0011064230930060148, -0.005435581784695387, -0.005539541132748127, 0.024356158450245857, -0.002628682879731059, 0.050771698355674744, 0.04514800012111664, 0.06597945094108582, -0.04558363929390907, -0.009598900564014912, -0.013405787758529186, -0.020811645314097404, 0.06993979960680008, -0.015227549709379673, 0.027702655643224716, -0.046930160373449326, -0.05235584080219269, 0.01997007057070732, 0.010613740421831608, 0.041464876383543015, -0.012178079225122929, -0.03043529763817787, -0.024811599403619766, 0.028415517881512642, -0.01360380556434393, 0.016851292923092842, 0.041742101311683655, 0.033841200172901154, -0.017554255202412605, 0.011376108042895794, 0.008108818903565407, 0.007405856158584356, 0.044355932623147964, 0.018277019262313843, 0.0038415405433624983, -0.004856380634009838, 0.004019756335765123, -0.025861091911792755, 0.011435513384640217, 0.02873234637081623, 0.039999544620513916, 0.00485390517860651, -0.012039466761052608, 0.004643511492758989, -0.06546460092067719, 0.02120767906308174, -0.040910426527261734, -0.022772017866373062, -0.009395932778716087, -0.0008991234353743494, -0.00846525002270937, 0.0009275884367525578, 0.025861091911792755, 0.011079082265496254, -0.015148342587053776, 0.024633383378386497, 0.006628637667745352, -0.04095003008842468, 0.013653310015797615, 0.004903409630060196, 0.019940366968512535, 0.07738526165485382, 0.020851248875260353, -0.00528706843033433, -0.016088925302028656, -0.0195047277957201, 0.04229654744267464, 0.001259886659681797, -0.039445094764232635, -0.08007829636335373, -0.025920497253537178, 0.0620587021112442, -0.008014759980142117, 0.003492534626275301, -0.05164297670125961, 0.016366150230169296, 0.013207770884037018, -0.0036757008638232946, 0.026969989761710167, 0.01213847566395998, -0.009049401618540287, 0.027801664546132088, 0.03138578310608864, 0.01142561249434948, 0.06285077333450317, 0.0056583513505756855, 0.04542522504925728, 0.01757405698299408, 0.027247214689850807, 0.026276929304003716, -0.0009653355809859931, -0.03130657598376274, -0.04673214256763458, 0.036415427923202515, -0.012475105933845043, -0.005217762663960457, -0.03584117814898491, 0.006054386496543884, 0.06487055122852325, 0.033940207213163376, 0.025623470544815063, -0.033940207213163376, 0.03475207835435867, 0.036831263452768326, 0.012395898811519146, -0.01890077441930771, 0.0011256060097366571, -0.04776183143258095, 0.001191199291497469, 0.026791773736476898, 0.08498913049697876, 0.006475173868238926, 0.02322745881974697, -0.00556429335847497, 0.011009776033461094, 0.028375914320349693, 0.02368289977312088, -0.04249456524848938, -0.02776206098496914, -0.01706911250948906, 0.051603373140096664, -0.015079036355018616, -0.02409873530268669, -0.014772109687328339, -0.040593598037958145, -0.014504785649478436, -0.03867282718420029, -0.035643160343170166, -0.018475037068128586, 0.0368906706571579, 0.026098713278770447, -0.0005757979233749211, 0.0922761783003807, -0.0016942876391112804, -0.025682875886559486, 0.06241513043642044, -0.012742429040372372, -0.027049196884036064, -0.02197994850575924, 0.04530641436576843, -0.036593642085790634, -0.031049150973558426, -0.011168190278112888, 0.032098643481731415, 0.0036757008638232946, -0.03649463504552841, -0.01060383953154087, -0.08625644445419312, -0.08261292427778244, 0.034633271396160126, 0.023286864161491394, 0.015336459502577782, 0.02500961720943451, -0.02396012283861637, 0.006212800741195679, 0.01706911250948906, 0.09789987653493881, 0.01725723035633564, -0.057345882058143616, -0.013584003783762455, 0.02326706238090992, 0.011762242764234543, -0.010930568911135197, -0.020772041752934456, -0.0006831605569459498, -0.004274704027920961, 0.034573864191770554, -0.035999592393636703, -0.029544219374656677, -0.024257149547338486, -0.01721762679517269, 0.0651477724313736, -0.029484814032912254, -0.02014828659594059, 0.04122725501656532, 0.025762083008885384, 0.03695007413625717, -0.00564350001513958, 0.08229609578847885, 0.004844004288315773, 0.07453380525112152, 0.016465159133076668, 0.005222713109105825, 0.026633361354470253, -0.01064344309270382, -0.025069022551178932, 0.07492984086275101, -0.01752455346286297, -0.005029645748436451, 0.00002875508835131768, -0.012148376554250717, -0.0043984646908938885, 0.008405844680964947, 0.03130657598376274, 0.054969672113657, 0.005633599124848843, 0.010009787045419216, -0.025049220770597458, -0.007752387318760157, 0.019930467009544373, 0.03922727704048157, -0.05722707137465477, 0.0037920360919088125, -0.02633633464574814, 0.04685095325112343, 0.055009275674819946, -0.018623551353812218, 0.028930364176630974, 0.003408377058804035, 0.010633542202413082, -0.05124694108963013, -0.02487100474536419, 0.0017809203127399087, 0.028276905417442322, -0.04847469553351402, -0.010752352885901928, -0.026237325742840767, -0.004098963458091021, 0.028197698295116425, 0.027425430715084076, -0.069226935505867, -0.012593916617333889, 0.04795984923839569, 0.03162340447306633, 0.03336595743894577, -0.048949938267469406, 0.08221688866615295, 0.013178068213164806, -0.05108852684497833, 0.015583980828523636, -0.0010501118376851082, -0.04021736606955528, 0.03308873251080513, 0.024851202964782715, 0.022316578775644302, 0.02281162142753601, -0.011960259638726711, 0.05893002450466156, -0.008549408055841923, 0.09948401898145676, 0.035266924649477005, 0.028395716100931168, -0.00005573111047851853, -0.024257149547338486, 0.03574216738343239, -0.06146464869379997, -0.04946478456258774, 0.01802949793636799, -0.016861194744706154, 0.03887084499001503, 0.03984113037586212, -0.011742440983653069, 0.017088914290070534, -0.01410875003784895, 0.04613808915019035, -0.05485086143016815, 0.008183075115084648, -0.07691001892089844, -0.035643160343170166, -0.005841517820954323, -0.05354394391179085, -0.02285122498869896, -0.03968271613121033, -0.019069090485572815, 0.035959988832473755, -0.004089062567800283, 0.05698945000767708, -0.05108852684497833, 0.012593916617333889, 0.039544105529785156, 0.0563557930290699, 0.0048514301888644695, 0.06728636473417282, -0.006093990057706833, 0.04538562148809433, -0.06011812761425972, 0.01680178940296173, 0.0032425373792648315, 0.01775227300822735, 0.009900877252221107, -0.057385485619306564, 0.033940207213163376, 0.047841038554906845, 0.05279147997498512, -0.07263283431529999, -0.04281139373779297, 0.017742373049259186, -0.037425316870212555, -0.022098759189248085, 0.019306711852550507, -0.027920475229620934, -0.06768240034580231, 0.025940299034118652, 0.08245451003313065, 0.010732551105320454, 0.10146418958902359, -0.02514822967350483, 0.02514822967350483, 0.004477671813219786, -0.020207691937685013, 0.007029623258858919, -0.030633315443992615, -0.0368906706571579, -0.03201943635940552, 0.040633201599121094, -0.0016509713605046272, 0.036098599433898926, -0.009252370335161686, 0.06609825789928436, 0.005376176442950964, 0.024197744205594063, -0.03134617954492569, -0.04823707416653633, -0.025207635015249252, -0.083721823990345, 0.01899978332221508, -0.005351424217224121, -0.01867305487394333, -0.009678107686340809, -0.030712522566318512, 0.009489990770816803, -0.021999750286340714, -0.009475139901041985, -0.005876170936971903, -0.01105928048491478, 0.010613740421831608, 0.017564157024025917, 0.0025841291062533855, 0.013257275335490704, -0.004980141296982765, 0.003977677319198847, -0.027088800445199013, 0.041148047894239426, -0.029722433537244797, -0.057108260691165924, 0.007089028134942055, 0.000032371230190619826, 0.007787039969116449, 0.06597945094108582, -0.013108761981129646, 0.011227594688534737, 0.010336516425013542, -0.018247317522764206, -0.011178091168403625, -0.03643522784113884, -0.024217545986175537, 0.013118662871420383, 0.015900809317827225, -0.030395694077014923, 0.038474809378385544, -0.02285122498869896, 0.015286955051124096, 0.07504865527153015, -0.030039262026548386, -0.024989815428853035, 0.03621741011738777, -0.029445210471749306, -0.029544219374656677, 0.0133364824578166, -0.05861319601535797, -0.07156354188919067, -0.008757325820624828, -0.04534601792693138, -0.02225717343389988, 0.028078889474272728, -0.003450455842539668, 0.03386100009083748, -0.059048835188150406, 0.03706888481974602, 0.06887050718069077, -0.016049321740865707, 0.010970172472298145, 0.021583912894129753, -0.0008347677648998797, 0.02110867016017437, -0.010257309302687645, -0.04328663647174835, -0.04728659242391586, 0.08910790085792542, 0.055642932653427124, -0.05021725222468376, -0.029068976640701294, -0.011039478704333305, -0.017138419672846794, 0.08752375841140747, -0.031643204391002655, 0.013178068213164806, 0.03611839935183525, -0.044989585876464844, -0.031049150973558426, 0.05116773396730423, -0.023880915716290474, -0.0592864528298378, 0.013712715357542038, -0.0622171126306057, 0.006692992988973856, -0.003138578264042735, -0.005395978223532438, -0.010801857337355614, 0.02514822967350483, -0.025722479447722435, 0.007133582141250372, -0.008821682073175907, 0.06015773117542267, 0.05639539659023285, -0.05370235815644264, 0.049266766756772995, 0.008519705384969711, -0.018702758476138115, -0.03392040729522705, 0.01057413686066866, 0.04360346496105194, -0.0434054471552372, -0.037979766726493835, 0.04075201228260994, 0.007410806603729725, 0.014752307906746864, -0.02639573998749256, 0.0019145822152495384, 0.05397958308458328, -0.0042128232307732105, -0.05057368054986, 0.009296923875808716, -0.05607857182621956, -0.09180093556642532, -0.004301931243389845, -0.0013254799414426088, 0.006490025203675032, 0.013455292209982872, 0.0033687734976410866, 0.01482161320745945, 0.06768240034580231, -0.008613763377070427, 0.03562335669994354, -0.05116773396730423, 0.005994981154799461, -0.034573864191770554, -0.005895972717553377, -0.059088438749313354, 0.022375984117388725, 0.048157867044210434, 0.0045048994943499565, -0.0417817048728466, 0.029068976640701294, 0.02974223531782627, 0.03671245276927948, -0.055326104164123535, -0.05152416601777077, 0.017138419672846794, -0.03441544994711876, -0.038712430745363235, 0.04827667772769928, -0.008836532942950726, -0.029484814032912254, -0.04360346496105194, 0.07714764028787613, 0.03859362006187439, -0.05045487359166145, -0.005113803315907717, -0.04586086422204971, -0.025405650958418846, -0.002451704815030098, 0.015148342587053776, -0.01969284564256668, -0.000048266778321703896, -0.015247351489961147, 0.03267289698123932, -0.044989585876464844, -0.006272206082940102, -0.03172241151332855, -0.011722639203071594, 0.04795984923839569, -0.09718701243400574, 0.014544389210641384, 0.030494702979922295, 0.04558363929390907, -0.020712636411190033, 0.042652979493141174, 0.029583822935819626, -0.046969763934612274, -0.013762219808995724, 0.02427695132791996, -0.049860820174217224, 0.015455270186066628, 0.06463292986154556, 0.05314791202545166, -0.02817789651453495, -0.008356340229511261, 0.032653093338012695, -0.0013044406659901142, -0.0006949178641662002, -0.011554324068129063, -0.017791876569390297, 0.004792024847120047, 0.03506890684366226, -0.03671245276927948, -0.03110855631530285, -0.025583866983652115, -0.020296799018979073, -0.010791956447064877, -0.03950450196862221, -0.023187855258584023, -0.025663074105978012, 0.0217027235776186, 0.08047433197498322, -0.023920519277453423, -0.022831423208117485, -0.016207735985517502, -0.00592072494328022, -0.005420730449259281, -0.01859384775161743, -0.032791707664728165, 0.01767306588590145, -0.09338507801294327, -0.022296776995062828, -0.04962319880723953, -0.017039410769939423, 0.00040531717240810394, 0.007668229751288891, -0.0397421233355999, 0.009999886155128479, -0.0010111271403729916, 0.0310293510556221, -0.021999750286340714, -0.025346245616674423, -0.023425476625561714, -0.0013366184430196881, -0.006212800741195679, -0.01808890327811241, -0.03243527561426163, -0.048395488411188126, -0.0026014556642621756, 0.017356237396597862, 0.025227436795830727, 0.05576174333691597, 0.03841540589928627, -0.0021992323454469442, 0.021227480843663216, -0.052712272852659225, -0.0014244887279346585, 0.02368289977312088, -0.012039466761052608, 0.012643420137465, 0.05722707137465477, 0.03578177094459534, -0.06835565716028214, 0.011653332971036434, -0.02528684027493, 0.007757337763905525, 0.038851045072078705, -0.03259368985891342, 0.001074245199561119, -0.03093034215271473, 0.012009764090180397, 0.030257081612944603, -0.003653423860669136, -0.03362337872385979, -0.021128471940755844, -0.055642932653427124, 0.01064344309270382, 0.025069022551178932, 0.009465239010751247, 0.007262293715029955, -0.013752318918704987, -0.04906874895095825, 0.012593916617333889, 0.06558341532945633, 0.03873223438858986, -0.011811747215688229, 0.02546505630016327, 0.03415802866220474, -0.007386054843664169, -0.005118753761053085, 0.012791933491826057, 0.0000711625543772243, -0.007326649501919746, -0.04875192046165466, -0.000376233336282894, 0.031227366998791695, 0.0274848360568285, 0.056791432201862335, -0.03433624282479286, -0.041742101311683655, -0.019306711852550507, -0.012178079225122929, -0.07469221949577332, -0.016534466296434402, -0.024059131741523743, -0.05029645934700966, 0.0013118662172928452, 0.008727623149752617, 0.04799945279955864, 0.016395853832364082, -0.003999954555183649, 0.007400905713438988, -0.0022796769626438618, -0.015405765734612942, 0.03851441293954849, 0.049306370317935944, -0.02326706238090992, 0.05988050624728203, 0.012960248626768589, 0.0282175000756979, -0.018554244190454483, -0.024435365572571754, 0.01142561249434948, -0.021504705771803856, -0.002163341734558344, -0.0000358326688001398, 0.02106906659901142, -0.02776206098496914, -0.08530595898628235, -0.03130657598376274, -0.051048923283815384, 0.01353449933230877, -0.01987106166779995, 0.031643204391002655, 0.03574216738343239, -0.0028192747849971056, -0.032197654247283936, 0.02010868303477764, -0.008485051803290844, 0.06209830194711685, 0.039544105529785156, -0.019059188663959503, 0.08435547351837158, -0.015039432793855667, 0.07243482023477554, -0.019900763407349586, -0.009603851474821568, 0.02225717343389988, 0.04514800012111664, -0.01381172426044941, -0.031504593789577484, 0.03019767627120018, -0.04776183143258095, 0.07073187083005905, -0.03663324564695358, -0.009831571020185947, 0.01725723035633564, 0.04098963364958763, -0.05956367775797844, 0.03776194527745247, -0.04700936749577522, -0.09188014268875122, -0.10186022520065308, -0.01780177839100361, -0.03629661723971367, 0.09853353351354599, 0.03617780655622482, -0.01744534634053707, 0.014465182088315487, 0.01431666873395443, 0.031643204391002655 ]
717,469
pytorch_optimizer.optimizer.pnm
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.9, 1.0), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: 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, '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.9, 1.0), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, eps: float = 1e-08)
[ 0.013171964325010777, -0.037978533655405045, -0.021788783371448517, -0.010704593732953072, -0.05948261916637421, -0.021940620616078377, -0.08297958225011826, -0.029247835278511047, -0.014519528485834599, 0.03989548981189728, -0.03165826573967934, 0.04448859393596649, 0.012052157893776894, 0.06373409181833267, -0.05246010050177574, 0.037560977041721344, 0.02951355278491974, 0.02524310164153576, -0.007307213731110096, 0.004929997026920319, -0.00023413333110511303, -0.016521895304322243, -0.035302381962537766, 0.11410641670227051, 0.01319094467908144, 0.03966773301362991, -0.010552755557000637, 0.015534946694970131, -0.03446727246046066, 0.00830839667469263, 0.014234832488000393, -0.013959625735878944, -0.014263302087783813, 0.06464511901140213, 0.046158816665410995, -0.012412773445248604, -0.01072357315570116, 0.014671366661787033, -0.06217774748802185, 0.041224073618650436, 0.07956322282552719, -0.03353726491332054, 0.06771983951330185, -0.03989548981189728, -0.02457880973815918, -0.005266888067126274, 0.03294889256358147, 0.05056212469935417, -0.012763899751007557, -0.03513156622648239, 0.019682027399539948, -0.03110785409808159, 0.04323593154549599, -0.021485107019543648, -0.04107223451137543, 0.027539655566215515, 0.04710780456662178, 0.05860954895615578, 0.03198092430830002, 0.022244296967983246, 0.006642921827733517, -0.04042692482471466, 0.019397331401705742, -0.024673709645867348, -0.002276386832818389, -0.015534946694970131, -0.08791432529687881, -0.02535698190331459, 0.02936171367764473, 0.03342338651418686, 0.10529980063438416, -0.0062965406104922295, -0.0350746251642704, 0.029133956879377365, -0.011368885636329651, -0.009347539395093918, -0.06665697693824768, -0.0497649721801281, -0.06734024733304977, -0.007724768947809935, 0.050941720604896545, 0.02632495015859604, -0.03446727246046066, -0.04896782338619232, 0.026495767757296562, -0.04016120731830597, -0.03795955330133438, -0.053409092128276825, 0.0312596932053566, 0.033916860818862915, -0.06172223389148712, -0.03059539943933487, 0.016740161925554276, -0.024180235341191292, 0.0829036608338356, 0.011995218694210052, 0.01903671585023403, -0.06145651638507843, 0.02746373601257801, -0.011634603142738342, -0.019264472648501396, -0.01031550858169794, -0.049651093780994415, -0.0015421068528667092, 0.010998779907822609, -0.042286939918994904, -0.04870210587978363, -0.03666892647743225, 0.03613749518990517, -0.06957986205816269, -0.022737771272659302, 0.05568666383624077, -0.03266419470310211, 0.03275909274816513, -0.05382664501667023, 0.028507623821496964, 0.03171520680189133, 0.02457880973815918, 0.012090117670595646, 0.017366494983434677, 0.03368910402059555, 0.034011758863925934, -0.030842136591672897, 0.051549073308706284, 0.046196773648262024, -0.008502939715981483, 0.008716462180018425, 0.018030786886811256, 0.02154204621911049, -0.0161517895758152, 0.038699764758348465, -0.00048309462727047503, -0.04205918312072754, -0.02617311105132103, 0.017964357510209084, -0.020612036809325218, 0.0011963190045207739, 0.05667361244559288, -0.030158864334225655, 0.007492266595363617, 0.06787168234586716, 0.011501744389533997, 0.03275909274816513, -0.018182625994086266, -0.014880144968628883, 0.01913161389529705, -0.01994774490594864, -0.037105463445186615, -0.008716462180018425, 0.051397234201431274, 0.022301236167550087, 0.02247205562889576, -0.028203947469592094, 0.03173418715596199, 0.008037935011088848, -0.04984089359641075, 0.015240760520100594, -0.008574114181101322, -0.0007182658882811666, 0.01846732199192047, -0.024711668491363525, 0.030120905488729477, 0.029247835278511047, -0.031544387340545654, -0.01224195584654808, 0.024597790092229843, -0.04904374107718468, 0.017262106761336327, 0.005086579825729132, -0.013105535879731178, 0.006201642099767923, -0.08776248246431351, -0.030918056145310402, 0.023364104330539703, 0.010457856580615044, 0.03516952693462372, 0.03454319387674332, -0.00794778112322092, 0.0000750294275349006, -0.019349882379174232, 0.07345173507928848, -0.006410419475287199, -0.02262389287352562, -0.05766056105494499, 0.032056841999292374, 0.014130443334579468, -0.04221102222800255, 0.05955853685736656, -0.056028299033641815, 0.020896732807159424, 0.044868189841508865, 0.029077017679810524, 0.014747286215424538, 0.025679636746644974, -0.020649995654821396, 0.011520723812282085, 0.04915761947631836, -0.018381914123892784, -0.007800688035786152, 0.06020385026931763, 0.07242682576179504, 0.014225342310965061, 0.01716720685362816, -0.031202752143144608, 0.03384093940258026, -0.011027250438928604, -0.014339220710098743, -0.014263302087783813, -0.02987416833639145, -0.03682076558470726, -0.002510075457394123, -0.01231787446886301, 0.04855026677250862, 0.019245492294430733, -0.008631053380668163, -0.05003068968653679, -0.007909821346402168, 0.016294138506054878, 0.005005916114896536, -0.004507696721702814, 0.09133068472146988, -0.029608450829982758, -0.004450757522135973, 0.0007900331984274089, 0.054585836827754974, 0.02165592461824417, 0.03997140750288963, -0.0465763695538044, -0.07629869878292084, 0.03384093940258026, -0.02139020711183548, -0.046006977558135986, -0.03682076558470726, -0.010657144710421562, 0.019406821578741074, 0.009171976707875729, -0.035302381962537766, 0.028735380619764328, -0.0754256322979927, -0.02797619067132473, 0.057205043733119965, 0.026211071759462357, -0.006277561187744141, -0.02412329614162445, 0.019160084426403046, 0.006718840915709734, 0.03985752910375595, 0.00582204619422555, -0.06339245289564133, -0.029760289937257767, -0.03127866983413696, -0.013304823078215122, 0.005148264113813639, 0.04304613173007965, -0.05086579918861389, 0.020118562504649162, 0.027539655566215515, -0.006576492451131344, 0.01666424423456192, -0.0028920434415340424, -0.007354663219302893, 0.014348710887134075, -0.012469712644815445, 0.07690605521202087, 0.008009465411305428, 0.02679944410920143, -0.0018671355210244656, -0.01321941427886486, 0.027444755658507347, 0.00533331697806716, 0.12746818363666534, 0.01912212371826172, -0.0022301236167550087, -0.0002643823390826583, -0.006410419475287199, -0.024654729291796684, -0.005110304802656174, -0.024977385997772217, -0.0023689132649451494, 0.04570329934358597, 0.03002600558102131, -0.0474114827811718, 0.014453100040555, 0.0036868215538561344, 0.0020865891128778458, 0.00024658881011419, -0.016730673611164093, 0.027843331918120384, -0.00268089328892529, 0.009589532390236855, 0.009034373797476292, 0.006026078946888447, 0.089280866086483, 0.02211144007742405, 0.08024649322032928, -0.024654729291796684, 0.05367480590939522, -0.012014198116958141, 0.07106028497219086, -0.008929984644055367, 0.047487400472164154, -0.04243877902626991, 0.04638657346367836, -0.002626326633617282, -0.04278041422367096, -0.04190734773874283, 0.0348658487200737, 0.018448341637849808, 0.04376736283302307, 0.046006977558135986, 0.03266419470310211, 0.01778404973447323, 0.03845302760601044, 0.02277573198080063, 0.041679587215185165, -0.06699860841035843, 0.0089252395555377, -0.06396184861660004, 0.02771047316491604, 0.04520982876420021, -0.0015741351526230574, 0.03236052021384239, -0.007776963524520397, -0.016531385481357574, -0.0797150582075119, -0.05090375989675522, 0.024407992139458656, 0.02427513338625431, -0.0410342775285244, 0.002562269801273942, -0.045285746455192566, 0.003767485497519374, 0.025375960394740105, -0.029608450829982758, -0.054585836827754974, 0.0024282250087708235, 0.01093235146254301, 0.05029640719294548, -0.010581225156784058, -0.029475592076778412, 0.09231763333082199, -0.027482716366648674, -0.006078273523598909, 0.03359420225024223, -0.010182649828493595, -0.03786465525627136, -0.002297739265486598, -0.01636056788265705, 0.04319797083735466, 0.011169598437845707, -0.011776951141655445, 0.0032550315372645855, -0.00116013886872679, 0.0860922634601593, 0.0250912643969059, -0.02550881914794445, -0.017803030088543892, -0.0029442377854138613, 0.03989548981189728, -0.05348500981926918, -0.03444829210639, -0.0006376018864102662, -0.03947793319821358, 0.05401644483208656, 0.02638188935816288, -0.008241968229413033, 0.021409187465906143, -0.035511162132024765, 0.030272742733359337, 0.013722377829253674, 0.025736575946211815, -0.05553482472896576, -0.029133956879377365, -0.01973896659910679, 0.013969114981591702, -0.009432949125766754, -0.03203786164522171, 0.012365324422717094, 0.0626712217926979, -0.0022324961610138416, 0.008317886851727962, -0.007435327395796776, 0.05477563291788101, 0.034182578325271606, 0.012820838950574398, -0.03488482907414436, 0.00037010564119555056, 0.02247205562889576, 0.0788799524307251, 0.001555155380629003, 0.0077295140363276005, 0.0010943027446046472, 0.024389011785387993, -0.02433207258582115, -0.062405504286289215, 0.03393584117293358, 0.04881598427891731, 0.03583381697535515, -0.04403308033943176, -0.030196823179721832, -0.01635107770562172, -0.038851600140333176, -0.0082324780523777, 0.039364054799079895, -0.014187382534146309, -0.0007289420464076102, 0.0018849290208891034, 0.04763923957943916, 0.014927593991160393, 0.06957986205816269, -0.009755604900419712, -0.005864751059561968, -0.02361084148287773, -0.0010521913645789027, -0.030993973836302757, -0.02463574893772602, -0.0033095984254032373, -0.00933805014938116, 0.025945354253053665, -0.01979590579867363, 0.029741309583187103, 0.00464055547490716, 0.0729203000664711, 0.01748037338256836, 0.06965577602386475, 0.060241810977458954, -0.020706936717033386, 0.00610674312338233, -0.0020770991686731577, -0.04870210587978363, -0.04828454926609993, -0.017727110534906387, -0.04577922075986862, -0.040806520730257034, 0.028203947469592094, 0.01665475405752659, -0.00038789917016401887, -0.0035468456335365772, 0.004823235794901848, -0.02581249549984932, 0.0033973800018429756, -0.06354428827762604, 0.00694185309112072, -0.02607821300625801, -0.05302949622273445, -0.030974995344877243, 0.025338001549243927, -0.01519331056624651, -0.042514700442552567, -0.015421068295836449, 0.021845722571015358, -0.004996425937861204, 0.04448859393596649, -0.009295345284044743, -0.028678441420197487, -0.031088873744010925, -0.015278720296919346, -0.02268083207309246, 0.04274245724081993, -0.01846732199192047, 0.0546237975358963, -0.025546777993440628, -0.014604938216507435, -0.020915713161230087, -0.06286101788282394, 0.013950135558843613, 0.06540431082248688, -0.011492254212498665, -0.002816124353557825, 0.009570552036166191, 0.010457856580615044, 0.00449820701032877, 0.03439135476946831, -0.02695128135383129, -0.052536021918058395, 0.023838598281145096, -0.0006743751582689583, -0.019985703751444817, -0.010837452486157417, -0.014718816615641117, 0.0023855206090956926, -0.045171868056058884, 0.006699861027300358, 0.06498675048351288, 0.0141399335116148, -0.012109097093343735, -0.06589778512716293, 0.01003081165254116, 0.010220609605312347, 0.044298797845840454, -0.08540899306535721, -0.015316679142415524, 0.030937034636735916, 0.06149447336792946, -0.026856383308768272, -0.016692712903022766, 0.02894415892660618, 0.025888415053486824, 0.042704496532678604, 0.01758476346731186, 0.00708420155569911, -0.03902241960167885, -0.03589075803756714, -0.025907395407557487, 0.019625088199973106, -0.047753117978572845, -0.09110292792320251, 0.010799492709338665, -0.02740679681301117, -0.0012929972726851702, -0.013798297382891178, 0.004597850609570742, -0.023231245577335358, 0.01262155082076788, -0.026913322508335114, -0.028298845514655113, -0.04088243842124939, 0.0565597340464592, -0.0010409221285954118, -0.032531335949897766, 0.053864605724811554, 0.05435808002948761, 0.040237125009298325, -0.037466078996658325, 0.01784098893404007, 0.044146958738565445, 0.022946549579501152, -0.047183722257614136, 0.0776272863149643, 0.026154132559895515, 0.005580054130405188, -0.055003389716148376, -0.041224073618650436, 0.048626188188791275, -0.006026078946888447, 0.023724719882011414, 0.018277524039149284, -0.024237174540758133, -0.04984089359641075, -0.032056841999292374, 0.01949222944676876, 0.02879231981933117, 0.010761532932519913, -0.0410342775285244, -0.011387865990400314, 0.006021333858370781, -0.037010565400123596, 0.07299622148275375, -0.06536635011434555, -0.021561026573181152, 0.017357004806399345, -0.022130418568849564, -0.046158816665410995, 0.020612036809325218, 0.016702203080058098, -0.015620355494320393, 0.005727147683501244, 0.0028920434415340424, 0.053295210003852844, 0.025698617100715637, -0.02679944410920143, -0.02488248609006405, -0.002510075457394123, 0.012355834245681763, -0.010742553509771824, -0.004851705394685268, 0.006552767939865589, -0.030918056145310402, -0.06327857077121735, 0.021105511114001274, 0.006529042962938547, -0.005874240770936012, 0.01293471734970808, 0.004818490706384182, -0.033916860818862915, 0.012222975492477417, -0.011814910918474197, 0.020175501704216003, -0.051549073308706284, -0.03943997621536255, -0.0029703350737690926, -0.030576419085264206, -0.11084189265966415, -0.08366285264492035, 0.04031304642558098, -0.005413981154561043, -0.05208050459623337, 0.002406872808933258, -0.017878949642181396, 0.02524310164153576, -0.009005904197692871, 0.047487400472164154, -0.023838598281145096, -0.02027040161192417, -0.05409236252307892, 0.013921665959060192, -0.03089907579123974, -0.0164649561047554, 0.036687906831502914, 0.06407572329044342, -0.0745905190706253, -0.01427279133349657, 0.030918056145310402, 0.011454295367002487, 0.005181478802114725, -0.009627491235733032, -0.013931156136095524, 0.04042692482471466, 0.023098386824131012, -0.05914098396897316, 0.012792369350790977, -0.016702203080058098, 0.002790027065202594, -0.011027250438928604, -0.012052157893776894, -0.03852894529700279, -0.03727627918124199, 0.020251421257853508, 0.07405908405780792, -0.007041497156023979, -0.0026429337449371815, -0.040502842515707016, -0.006026078946888447, 0.04483023285865784, -0.07030109316110611, -0.01933090202510357, 0.008882535621523857, -0.11828196793794632, 0.002678520977497101, -0.030766217038035393, 0.04680412635207176, -0.015240760520100594, -0.010116220451891422, -0.053560927510261536, -0.006068783346563578, 0.023174306377768517, 0.020023664459586143, 0.00928111094981432, 0.028811300173401833, -0.020118562504649162, 0.01723363623023033, 0.053712766617536545, -0.008963199332356453, -0.002265710849314928, -0.009665451012551785, -0.03556809946894646, -0.02237715572118759, -0.009755604900419712, 0.039212219417095184, 0.0410342775285244, -0.02782435156404972, 0.038851600140333176, -0.054889511317014694, 0.0011548007605597377, -0.0025124477688223124, -0.0007437699823640287, 0.025167183950543404, 0.0239145178347826, 0.056597691029310226, -0.02936171367764473, -0.0340307392179966, -0.022130418568849564, 0.04448859393596649, 0.012763899751007557, 0.0002456991351209581, 0.004263332113623619, -0.03769383579492569, -0.014130443334579468, -0.028507623821496964, -0.025110244750976562, -0.05811607465147972, -0.017717620357871056, -0.05014456808567047, 0.002552779857069254, 0.023933498188853264, 0.011814910918474197, -0.0701492503285408, -0.025907395407557487, 0.004782903473824263, -0.021921642124652863, 0.0625193864107132, 0.034372374415397644, -0.00804742518812418, -0.046158816665410995, 0.018913347274065018, -0.012374813668429852, -0.0701492503285408, 0.052118465304374695, -0.01907467469573021, -0.021219389513134956, -0.05352297052741051, -0.014082994312047958, 0.02237715572118759, 0.0033926349133253098, 0.021352248266339302, -0.04843638837337494, -0.06483491510152817, -0.07132600247859955, 0.018856408074498177, -0.027216998860239983, -0.00547566544264555, 0.0015112647088244557, -0.05701524764299393, 0.07143987715244293, -0.00794778112322092, 0.028147008270025253, 0.00902488362044096, -0.007169610355049372, 0.02093469351530075, -0.04855026677250862, 0.028982117772102356, 0.043577566742897034, 0.038490984588861465, -0.08905310928821564, -0.024313094094395638, 0.04581718146800995, 0.03997140750288963, -0.021276328712701797, -0.05246010050177574, 0.013817276805639267, -0.03778873383998871, -0.01162511296570301, 0.024199213832616806, -0.014415140263736248, 0.009347539395093918, -0.07599502056837082, -0.03321461006999016, 0.013969114981591702, 0.037978533655405045, -0.019814886152744293, 0.0514351949095726, 0.019985703751444817, -0.03285399451851845, -0.0018730666488409042, 0.006177917122840881, -0.025338001549243927, 0.04035100340843201, 0.008550388738512993, 0.06434144079685211, 0.06787168234586716, 0.012460223399102688, 0.02864048257470131, -0.04638657346367836, -0.009712900035083294, 0.00014331213606055826, 0.04828454926609993, -0.011520723812282085, -0.013997584581375122, 0.07026313245296478, -0.018068747594952583, -0.017755581066012383, -0.011606133542954922, 0.01728108711540699, 0.024825546890497208, 0.06472104042768478, -0.0414518304169178, 0.020346319302916527, -0.029969066381454468, -0.07774116098880768, -0.09505072236061096, 0.000620994542259723, -0.04031304642558098, 0.07986690104007721, 0.020384280011057854, 0.01639852672815323, 0.017243126407265663, 0.04205918312072754, 0.01708179898560047 ]
717,472
pytorch_optimizer.optimizer.pnm
__str__
null
def __str__(self) -> str: return 'PNM'
(self) -> str
[ 0.026955265551805496, 0.0006994720897637308, 0.036338429898023605, -0.01868102326989174, 0.006329369731247425, -0.06056404858827591, 0.011114782653748989, -0.014876577071845531, 0.11464518308639526, -0.05643545836210251, -0.04404968395829201, -0.005335607100278139, 0.01037265919148922, 0.053262241184711456, 0.01934637501835823, -0.012778161093592644, 0.0015780773246660829, -0.06667163223028183, 0.006035079248249531, 0.03132270276546478, -0.010696805082261562, 0.08373192697763443, 0.054388221353292465, -0.017537983134388924, -0.007033106870949268, 0.0467793308198452, 0.008517351932823658, -0.027279412373900414, -0.04886068403720856, -0.00776669941842556, -0.008287038654088974, -0.04394732043147087, 0.006538358051329851, 0.01227488275617361, -0.024890970438718796, 0.04991842433810234, -0.016053738072514534, 0.01697499305009842, -0.06841178238391876, -0.017845068126916885, 0.00003885215846821666, -0.03657727316021919, -0.014390358701348305, -0.011549820192158222, -0.02743295393884182, -0.03173214942216873, 0.021069465205073357, 0.035758379846811295, 0.009664657525718212, 0.016488775610923767, -0.019807003438472748, 0.05797088146209717, -0.03940928354859352, -0.01984112337231636, -0.06039344519376755, 0.037907976657152176, 0.059233345091342926, -0.008517351932823658, 0.0037212769966572523, 0.03442767634987831, -0.057527314871549606, 0.018237454816699028, 0.05159033089876175, -0.0751335397362709, -0.001608999096788466, -0.00296209380030632, 0.0014245345955714583, 0.035041846334934235, 0.02495921216905117, 0.047564104199409485, 0.06039344519376755, -0.07213092595338821, -0.028268909081816673, 0.038624510169029236, 0.051965657621622086, -0.011430397629737854, -0.048826564103364944, 0.0002886921865865588, 0.026733482256531715, -0.006585273891687393, -0.0005038118688389659, -0.0009297860669903457, -0.005011461675167084, -0.0033864686265587807, -0.020847680047154427, -0.07172147929668427, 0.0061118509620428085, -0.02415737882256508, -0.03111797757446766, -0.022348986938595772, -0.018100973218679428, 0.003200937993824482, -0.01590019464492798, 0.05285279452800751, -0.05391053110361099, -0.017401501536369324, 0.028337150812149048, -0.03644078969955444, -0.009007835760712624, -0.01371647696942091, -0.01371647696942091, 0.008820172399282455, -0.04694993421435356, 0.011148902587592602, -0.02333848364651203, 0.00396012095734477, -0.031663909554481506, 0.06366901844739914, -0.007216504774987698, 0.014262407086789608, -0.05728847160935402, 0.03084501437842846, 0.020540595054626465, -0.019721701741218567, 0.055957768112421036, -0.023184942081570625, -0.017120005562901497, -0.013281439431011677, 0.0385221466422081, -0.0060990555211901665, 0.0008263580384664237, 0.044459130614995956, -0.0657844990491867, -0.009144318290054798, -0.0019203494302928448, 0.06731992214918137, 0.01129391510039568, -0.04561923071742058, 0.03814681991934776, -0.07213092595338821, 0.02468624711036682, 0.026153432205319405, -0.05592364817857742, 0.017213838174939156, 0.031220341101288795, -0.01026176754385233, 0.01207868941128254, -0.016719089820981026, 0.06264540553092957, 0.0932856947183609, -0.0030623229686170816, 0.019994666799902916, 0.032124534249305725, 0.03224395960569382, 0.0028575994074344635, 0.006337899714708328, 0.0057919700630009174, 0.055957768112421036, -0.01521778292953968, -0.033335816115140915, 0.020813560113310814, -0.013434982858598232, 0.037191443145275116, -0.01230047270655632, 0.014381828717887402, 0.04462973400950432, 0.027978884056210518, -0.05919922515749931, 0.01576371304690838, -0.03981873020529747, 0.0021037475671619177, -0.040194056928157806, 0.003975048661231995, 0.027808280661702156, -0.020898861810564995, 0.02262195199728012, 0.03021378256380558, -0.036611393094062805, 0.015354265458881855, -0.011856905184686184, -0.00927227083593607, -0.06731992214918137, -0.05616249144077301, -0.011882496066391468, 0.008854293264448643, 0.03596310317516327, 0.010133814997971058, 0.06346429884433746, -0.008670895360410213, -0.00296209380030632, 0.009400222450494766, 0.018118033185601234, -0.03848802670836449, 0.02504451386630535, 0.03998933359980583, -0.008380870334804058, 0.02088180184364319, 0.04080822691321373, -0.00025843680487014353, -0.023764992132782936, 0.02743295393884182, 0.02760355733335018, -0.034461796283721924, 0.036031343042850494, 0.0002721650234889239, -0.06336193531751633, 0.04009169340133667, -0.021495971828699112, -0.026562878862023354, 0.0061800917610526085, 0.02011408843100071, 0.045414507389068604, -0.05356932803988457, 0.08318600058555603, 0.020097028464078903, -0.013383802026510239, -0.005395318381488323, 0.010039983317255974, 0.030589109286665916, -0.02289491705596447, 0.07602067291736603, 0.02016526833176613, 0.02980433590710163, 0.025965768843889236, 0.036338429898023605, -0.04196832701563835, -0.00033800708479247987, 0.029377829283475876, -0.021615393459796906, 0.006640719715505838, 0.01746974140405655, -0.0015428904443979263, 0.013912670314311981, -0.010364129208028316, -0.029974939301609993, 0.023628508672118187, -0.008922534063458443, 0.012129870243370533, 0.004126458894461393, 0.022144263610243797, -0.00012068825890310109, -0.06199711188673973, -0.03998933359980583, 0.04026229679584503, 0.006256863474845886, 0.019772881641983986, -0.031049737706780434, -0.05107852444052696, -0.10283946245908737, -0.0063123092986643314, -0.03995520994067192, -0.009349041618406773, -0.009442873299121857, 0.012488136067986488, 0.04995254427194595, -0.0052033900283277035, 0.029701974242925644, 0.0000014411284610105213, 0.011797194369137287, 0.013017005287110806, 0.05844857171177864, -0.042275410145521164, -0.01647171564400196, 0.007267685607075691, -0.0023521881084889174, -0.031135039404034615, -0.06749052554368973, 0.02374793030321598, 0.01452684123069048, 0.011345095932483673, -0.0660233423113823, -0.04367435723543167, -0.041729483753442764, 0.01593431644141674, 0.05159033089876175, 0.03377938270568848, -0.04391320049762726, 0.03753264993429184, 0.03348935768008232, -0.045550987124443054, 0.1015428751707077, 0.03913631662726402, -0.04674520716071129, 0.010944179259240627, -0.009613476693630219, -0.031663909554481506, -0.03377938270568848, 0.03667963296175003, -0.08236710727214813, -0.055787164717912674, 0.005139413755387068, -0.03882923349738121, -0.0031753473449498415, 0.022502528503537178, -0.006333634722977877, -0.018032731488347054, 0.040194056928157806, -0.03004317916929722, 0.017085885629057884, 0.01218958105891943, 0.032977551221847534, 0.024583885446190834, -0.03289224952459335, 0.0034099265467375517, 0.033847626298666, -0.014936288818717003, 0.03865863010287285, 0.02954843081533909, -0.04548274725675583, -0.000024590815883129835, -0.013486163690686226, -0.031237401068210602, 0.000038285703340079635, -0.05032787099480629, -0.026631120592355728, 0.04667696729302406, 0.021632453426718712, -0.0020397715270519257, 0.019636400043964386, 0.008879883214831352, -0.03514420986175537, 0.03606546297669411, 0.012564907781779766, 0.06807057559490204, 0.05155621096491814, 0.07349575310945511, 0.010705335065722466, 0.029190165922045708, 0.05312575772404671, 0.03500772640109062, -0.031766269356012344, -0.0002547048788983375, -0.05657193809747696, 0.02308257855474949, -0.017964491620659828, -0.017213838174939156, -0.04923601076006889, 0.045278023928403854, 0.00297915400005877, 0.014467130415141582, -0.04176360368728638, -0.02743295393884182, 0.02066001668572426, -0.011882496066391468, -0.03147624433040619, 0.0010982565581798553, 0.03756676986813545, -0.03783973306417465, -0.001781734637916088, -0.018237454816699028, 0.06622806936502457, -0.02226368524134159, -0.05312575772404671, 0.03763500973582268, 0.02025057002902031, 0.03251692280173302, -0.03848802670836449, 0.0030687206890434027, 0.0034184567630290985, 0.017068825662136078, -0.025385718792676926, 0.034461796283721924, 0.01218958105891943, 0.011242734268307686, 0.023355543613433838, 0.024669187143445015, -0.006952070165425539, 0.06380550563335419, -0.040603503584861755, 0.04176360368728638, 0.0116948327049613, -0.03838566318154335, 0.018032731488347054, 0.005519005469977856, -0.021427730098366737, -0.02052353508770466, 0.02688702568411827, 0.03004317916929722, 0.08202590048313141, -0.025385718792676926, -0.030316144227981567, -0.030554989352822304, -0.07991041988134384, -0.007186649367213249, -0.025931648910045624, 0.08687102049589157, -0.003780987812206149, -0.010270297527313232, -0.05619661137461662, -0.04920189082622528, 0.010833287611603737, -0.03555365651845932, 0.014859517104923725, 0.053978774696588516, 0.0013115102192386985, 0.01849335990846157, 0.05462706461548805, 0.03729380667209625, -0.023560266941785812, -0.029889637604355812, -0.027330592274665833, 0.008709280751645565, 0.006674840580672026, 0.002949298592284322, -0.014381828717887402, -0.049406614154577255, -0.04602867737412453, -0.054388221353292465, -0.06629630923271179, -0.00588153675198555, 0.03678199648857117, -0.051385607570409775, -0.03821505978703499, 0.014177105389535427, -0.03362584114074707, 0.0026997916866093874, -0.0035378786269575357, 0.006094790529459715, -0.03231219947338104, -0.028524814173579216, 0.0076771327294409275, 0.024890970438718796, -0.006448791362345219, -0.10700216889381409, 0.04411792382597923, 0.002394838957116008, -0.02478860877454281, -0.034905362874269485, 0.03753264993429184, -0.025931648910045624, -0.040467020124197006, 0.015917254611849785, 0.053091637790203094, 0.036338429898023605, 0.032653406262397766, -0.0016473847208544612, 0.03920456022024155, 0.01584048382937908, 0.05704962834715843, 0.04995254427194595, -0.04036466032266617, 0.03698671981692314, -0.006431731395423412, -0.008564268238842487, 0.04125179350376129, -0.05094204097986221, -0.000336940836859867, -0.03657727316021919, -0.06097349524497986, 0.023867353796958923, 0.0254539605230093, -0.02845657244324684, 0.0023884412366896868, 0.028115365654230118, 0.03848802670836449, -0.045278023928403854, -0.046540483832359314, -0.04050114005804062, 0.015610170550644398, 0.0025952972937375307, -0.030469687655568123, 0.0371573232114315, 0.031936872750520706, -0.06285012513399124, 0.07479233294725418, 0.001790264737792313, -0.004171242006123066, -0.050839681178331375, -0.015917254611849785, -0.0082187969237566, -0.06390786916017532, 0.08646157383918762, -0.02635815553367138, 0.05302339792251587, 0.030810892581939697, 0.013281439431011677, -0.0007175986538641155, 0.038999833166599274, -0.03289224952459335, 0.022331926971673965, 0.0040603503584861755, -0.0044356766156852245, -0.009417283348739147, -0.037464410066604614, -0.028183607384562492, 0.05373993143439293, -0.02905368246138096, -0.0028085510712116957, 0.008905474096536636, -0.0315103642642498, -0.04340139031410217, -0.025846347212791443, 0.03209041431546211, 0.06994721293449402, -0.03882923349738121, 0.02402089536190033, 0.0017220235895365477, 0.024771548807621002, -0.03644078969955444, -0.039579883217811584, 0.02971903420984745, 0.031271521002054214, -0.032431621104478836, 0.012522256933152676, -0.023014338687062263, 0.06789997220039368, -0.014944818802177906, -0.03524656966328621, -0.060359325259923935, 0.005373992957174778, 0.019738761708140373, 0.03307991102337837, 0.02267313189804554, -0.04282134026288986, 0.04077410697937012, -0.028797779232263565, -0.01769152656197548, 0.018953988328576088, -0.00823585782200098, 0.005339872557669878, 0.017947429791092873, -0.04640400409698486, 0.04640400409698486, -0.002089886227622628, -0.025300417095422745, 0.04196832701563835, 0.004218157846480608, 0.02707468904554844, -0.020864741876721382, 0.03695259988307953, 0.024976272135972977, -0.054251737892627716, -0.04070586338639259, -0.06957188248634338, -0.040159933269023895, 0.05022550746798515, -0.048246514052152634, 0.008069519884884357, -0.059233345091342926, 0.08127524703741074, 0.019875243306159973, 0.03551953285932541, 0.015610170550644398, 0.023543206974864006, 0.0007714452221989632, 0.0561283715069294, -0.07349575310945511, 0.030316144227981567, 0.04752998426556587, 0.05428585782647133, -0.006512767635285854, -0.07745373994112015, 0.01452684123069048, -0.02280961535871029, 0.04251425713300705, 0.027535315603017807, -0.002131470711901784, -0.0025078633334487677, 0.016488775610923767, 0.006035079248249531, 0.03429119288921356, -0.0509079210460186, -0.0465063638985157, -0.07192620635032654, 0.05346696451306343, 0.08728046715259552, 0.014279467053711414, -0.014731564559042454, 0.04220717027783394, 0.011967796832323074, -0.058960381895303726, -0.02891720086336136, 0.05954043194651604, 0.029889637604355812, -0.009306390769779682, 0.038044460117816925, -0.08141172677278519, 0.018459239974617958, -0.008670895360410213, -0.03627018630504608, 0.051999781280756, -0.06401022523641586, 0.012778161093592644, 0.030111420899629593, -0.07178971916437149, 0.007408433128148317, 0.05855093151330948, 0.027995944023132324, -0.040194056928157806, 0.02437916211783886, -0.03352348133921623, 0.07820439338684082, 0.024174438789486885, -0.02465212717652321, -0.04729113727807999, 0.03029908426105976, -0.05732259154319763, -0.04667696729302406, 0.02253665030002594, -0.05032787099480629, -0.04718877747654915, -0.00899930577725172, 0.009818200021982193, -0.0074297585524618626, 0.04538038372993469, -0.04432264715433121, -0.010969770140945911, -0.007822145707905293, 0.035894859582185745, 0.0002714986039791256, 0.05159033089876175, 0.04964545741677284, 0.00945140328258276, 0.03478594124317169, 0.1009969487786293, 0.0032052029855549335, -0.0007613156922161579, 0.0301284808665514, -0.027859462425112724, 0.029974939301609993, -0.022860795259475708, -0.008598389104008675, -0.03739616647362709, -0.027842402458190918, -0.015439567156136036, -0.02635815553367138, 0.00018606384401209652, -0.022690191864967346, -0.024669187143445015, -0.002101615071296692, -0.024856850504875183, 0.05759555846452713, -0.03301167115569115, 0.03964812681078911, -0.0053313421085476875, -0.006832648068666458, -0.02963373251259327, -0.04381083697080612, 0.04422028362751007, -0.08898650109767914, 0.01037265919148922, -0.001466119079850614, -0.019721701741218567, -0.06609158217906952, -0.052238624542951584, -0.016872631385922432, 0.01218958105891943, -0.0022882120683789253, -0.04220717027783394, 0.04616515710949898, -0.06029108166694641, -0.016940873116254807, -0.060052238404750824, -0.02814948745071888, -0.03599722310900688, 0.020079966634511948, -0.09171614795923233, -0.038897473365068436, -0.00634216470643878, -0.048690084367990494, -0.02905368246138096, -0.033148154616355896, -0.0034120590426027775, 0.03359172120690346, -0.0017497465014457703, -0.011601001024246216, -0.02019939012825489, 0.023287303745746613, -0.024498583748936653, -0.05882389843463898, -0.02770591899752617, -0.05913098156452179, 0.01791330985724926, -0.01642906479537487, 0.08134348690509796, 0.04077410697937012, -0.010167935863137245, -0.03528068959712982, -0.0215983334928751, -0.028439512476325035, 0.006990456022322178, 0.029701974242925644, 0.019516978412866592, -0.05582128465175629, -0.006244068033993244, 0.017572104930877686, 0.015396916307508945, 0.004090205766260624, 0.05442234128713608, 0.00518632959574461, 0.034240011125802994, -0.038044460117816925, 0.006397610530257225, -0.04104707017540932, 0.05500239133834839, 0.07690781354904175, -0.023048458620905876, 0.02379911206662655, 0.004066748078912497, -0.030094360932707787, -0.046131037175655365, -0.026187554001808167, -0.004879244603216648, 0.059949878603219986, 0.0591651052236557, 0.05377405136823654, -0.0015098361764103174, -0.042889583855867386, -0.03995520994067192, -0.01084181759506464, -0.00985232088714838, 0.016539955511689186, -0.016855571419000626, -0.028746597468852997, -0.01091005839407444, -0.012070158496499062, -0.014023562893271446, 0.0023585858289152384, -0.01822039484977722, -0.004653195384889841, -0.003416324034333229, 0.06581861525774002, -0.011259795166552067, -0.043708477169275284, 0.040876466780900955, -0.041012950241565704, -0.006819853093475103, 0.025351598858833313, -0.03120327927172184, -0.01230047270655632, -0.0043077245354652405, -0.010116755031049252, 0.0003142826317343861, 0.030520867556333542, 0.042309533804655075, 0.04937249422073364, -0.049543097615242004, -0.05360344797372818, -0.05360344797372818, -0.016778800636529922, 0.01077357679605484, 0.06554565578699112, -0.051829177886247635, -0.01822039484977722, 0.03227807953953743, 0.01553339883685112, 0.037600889801979065, 0.025999890640378, 0.023014338687062263, 0.042582497000694275, 0.016599666327238083, 0.046267520636320114, 0.022570770233869553, -0.021359490230679512, 0.011131842620670795, 0.05384229123592377, 0.028217729181051254, 0.017034703865647316, -0.017162656411528587, 0.00844484567642212, 0.07144851982593536, 0.04394732043147087, 0.01616462878882885, 0.015396916307508945, -0.014961878769099712, -0.02832009084522724, 0.041729483753442764, 0.025522202253341675, -0.011370686814188957, -0.012863462790846825, -0.031083857640624046, -0.01555898878723383, 0.028627175837755203, 0.011003890074789524, -0.032619282603263855, 0.039033956825733185, -0.009681717492640018, -0.028081245720386505 ]
717,508
pytorch_optimizer.lr_scheduler.linear_warmup
PolyScheduler
Poly LR Scheduler. :param poly_order: float. lr scheduler decreases with steps.
class PolyScheduler(BaseLinearWarmupScheduler): r"""Poly LR Scheduler. :param poly_order: float. lr scheduler decreases with steps. """ def __init__(self, poly_order: float = 0.5, **kwargs): self.poly_order = poly_order if poly_order <= 0: raise ValueError(f'[-] poly_order must be positive. {poly_order}') super().__init__(**kwargs) def _step(self) -> float: return self.min_lr + (self.max_lr - self.min_lr) * (self.step_t - self.warmup_steps) ** self.poly_order
(poly_order: float = 0.5, **kwargs)
[ 0.012721209786832333, -0.0006483684992417693, -0.0470869354903698, 0.048599064350128174, -0.023350056260824203, -0.0160004161298275, -0.0706128254532814, -0.016088329255580902, -0.07201945036649704, -0.0038286708295345306, 0.021503854542970657, 0.02996121719479561, 0.05274862051010132, 0.042234063148498535, -0.06523246318101883, 0.03963179886341095, 0.025090761482715607, 0.009723328985273838, -0.04494182765483856, -0.01846201717853546, 0.016624607145786285, -0.017785077914595604, 0.010250815190374851, 0.08278016746044159, -0.017275173217058182, 0.04610229656100273, -0.03252831846475601, -0.020941203460097313, -0.0641774907708168, -0.059781771153211594, -0.0008846383425407112, 0.01837410405278206, -0.030541451647877693, -0.0511309988796711, 0.028150182217359543, -0.02600507065653801, -0.015604800544679165, -0.0003316020010970533, -0.11210840195417404, -0.002793479012325406, 0.07314475625753403, -0.02319181151688099, 0.023051148280501366, 0.021521437913179398, 0.022593993693590164, -0.007521074265241623, -0.014646533876657486, 0.029134823009371758, 0.04114392399787903, -0.05475306883454323, 0.05127166211605072, -0.06150489300489426, 0.029064491391181946, -0.007885918952524662, -0.0243698637932539, 0.08249884843826294, 0.015868544578552246, -0.00045275900629349053, 0.06994467228651047, -0.06168072298169136, 0.010760718956589699, -0.04195273667573929, -0.04954854026436806, 0.05528055503964424, 0.058586135506629944, -0.056652020663022995, -0.026602888479828835, -0.027095209807157516, 0.03150850906968117, 0.034216273576021194, 0.03446243330836296, -0.0024066558107733727, -0.022207170724868774, -0.012940995395183563, 0.036255884915590286, 0.02366654761135578, -0.054717905819416046, -0.08474945276975632, 0.0014505870640277863, -0.028642501682043076, 0.015596008859574795, 0.017424628138542175, -0.007776026148349047, 0.0208708718419075, -0.026638053357601166, -0.048247408121824265, 0.0496540367603302, -0.07110514491796494, -0.0575663298368454, -0.012061852030456066, -0.04677044600248337, 0.01479598879814148, -0.014198170974850655, 0.01762683130800724, 0.0560893677175045, 0.0021275277249515057, -0.028958993032574654, 0.0014978410908952355, -0.043394532054662704, -0.04058127477765083, 0.03404044359922409, 0.019886231049895287, -0.05615970119833946, 0.057038843631744385, 0.04325386881828308, 0.0024901744909584522, -0.002613254589959979, -0.010488184168934822, 0.016132287681102753, 0.0021088458597660065, -0.02241816371679306, 0.033425044268369675, -0.07525470107793808, 0.002437426010146737, -0.07092931121587753, 0.041847240179777145, -0.027376534417271614, 0.05088483914732933, 0.042269229888916016, 0.026163317263126373, 0.033776700496673584, 0.026233648881316185, -0.008510110899806023, 0.01675647869706154, -0.010734344832599163, -0.005907845683395863, 0.017732327803969383, 0.034972336143255234, 0.01439158245921135, -0.02883591316640377, 0.010954130440950394, 0.039420802146196365, -0.01060247328132391, -0.03038320690393448, -0.02487976662814617, -0.02081812359392643, 0.05169364809989929, 0.03484925627708435, -0.02234783209860325, 0.0053847553208470345, 0.04627812281250954, 0.05253762751817703, 0.03470859304070473, -0.011903605423867702, 0.031473346054553986, 0.04680560901761055, -0.012053060345351696, 0.05795315280556679, 0.03435693681240082, 0.07652066648006439, 0.006677096243947744, -0.019411493092775345, 0.0179784893989563, -0.004178130533546209, 0.06009826436638832, -0.012976161204278469, -0.012844289653003216, 0.01217614021152258, 0.008703522384166718, -0.015068522654473782, -0.030664531514048576, 0.015490512363612652, -0.028554586693644524, -0.05151782184839249, -0.020308218896389008, 0.057038843631744385, 0.005679268389940262, 0.008747479878365993, -0.013943219557404518, 0.0038000985514372587, -0.004173734690994024, -0.06783472746610641, 0.027112791314721107, 0.02317422814667225, 0.033776700496673584, 0.04641878604888916, 0.0050023277290165424, 0.08102188259363174, -0.006852925289422274, 0.022699490189552307, 0.045434147119522095, 0.027780940756201744, -0.04357036203145981, -0.07469204813241959, -0.023719297721982002, 0.04568030685186386, -0.024229200556874275, -0.008088122121989727, 0.0026923776604235172, 0.030664531514048576, -0.04441434144973755, -0.003978125285357237, 0.028132598847150803, -0.0138377221301198, -0.013064075261354446, 0.016237784177064896, -0.005112220533192158, 0.021152198314666748, 0.01398717612028122, -0.005644102580845356, -0.01835652068257332, 0.0702611654996872, 0.039069145917892456, -0.001768177724443376, -0.008888143114745617, -0.030137045308947563, 0.0020703834015876055, 0.008510110899806023, -0.029416147619485855, -0.002556110266596079, 0.020554380491375923, -0.03847132995724678, -0.0020560973789542913, 0.05176398158073425, 0.026356728747487068, -0.01928841322660446, -0.04919688031077385, 0.03324921429157257, 0.038260333240032196, -0.019095001742243767, 0.03896364942193031, 0.002036316553130746, -0.0008439779630862176, -0.06361483782529831, 0.028607336804270744, 0.006967213936150074, 0.03548223897814751, -0.053522270172834396, -0.03776801377534866, 0.05088483914732933, 0.0010665111476555467, -0.09234525263309479, 0.014461914077401161, -0.04198790341615677, 0.004839686211198568, 0.0077848173677921295, -0.02999638393521309, 0.04845840111374855, -0.03289755806326866, -0.003582510631531477, -0.0070419409312307835, 0.025952322408556938, -0.00918705202639103, -0.041847240179777145, 0.02275223843753338, 0.03386461362242699, 0.05960594490170479, 0.008110100403428078, -0.04673527926206589, 0.008101309649646282, -0.019815899431705475, -0.013354192487895489, -0.015464137308299541, 0.034233856946229935, -0.03639654815196991, -0.0520453080534935, 0.04325386881828308, -0.045047324150800705, 0.031139269471168518, 0.016888350248336792, -0.041882406920194626, 0.003681414294987917, -0.07286342978477478, 0.04195273667573929, -0.015112480148673058, -0.009960697963833809, -0.03815483674407005, -0.014831154607236385, -0.014567411504685879, 0.034585513174533844, 0.06452915072441101, -0.014145421795547009, -0.05686301365494728, -0.01178931724280119, 0.016492735594511032, 0.05570254474878311, -0.043042875826358795, -0.011103585362434387, 0.07384806871414185, -0.013556395657360554, 0.057074010372161865, -0.008778249844908714, -0.01764441467821598, -0.026936963200569153, -0.02994363382458687, -0.0343041867017746, -0.030207376927137375, 0.010558515787124634, 0.007723277434706688, -0.04673527926206589, 0.01640482060611248, -0.0010126637062057853, 0.05362776666879654, -0.006619952153414488, 0.14854012429714203, 0.004472643602639437, 0.04205823317170143, -0.01723121665418148, 0.037416357547044754, -0.012053060345351696, 0.09719812870025635, -0.0078111919574439526, 0.03977246209979057, -0.011244247667491436, -0.06445881724357605, -0.041460417211055756, -0.014417956583201885, -0.010321146808564663, -0.005138595122843981, -0.011956354603171349, -0.029416147619485855, 0.0353064127266407, -0.01519160345196724, -0.019464241340756416, -0.026145733892917633, 0.012369551695883274, -0.014971816912293434, 0.006932048127055168, 0.039455968886613846, 0.021134614944458008, -0.028994159772992134, -0.00009780473919818178, 0.05475306883454323, -0.00820241030305624, -0.01888400688767433, -0.01837410405278206, 0.03588664531707764, -0.005512231029570103, -0.017916949465870857, -0.03087552636861801, -0.023930290713906288, -0.04926721379160881, -0.0028132598381489515, 0.017072970047593117, -0.02609298564493656, 0.02807985059916973, 0.06168072298169136, 0.0184796005487442, 0.005885866936296225, -0.010312356054782867, 0.08657807111740112, 0.02245333045721054, -0.03629105165600777, 0.05366293340921402, 0.007543053012341261, -0.04360552877187729, 0.017741119489073753, 0.024106120690703392, 0.04641878604888916, 0.038260333240032196, -0.0011027759173884988, -0.032967887818813324, -0.02920515462756157, 0.03966696560382843, 0.027060043066740036, 0.001089039258658886, -0.025460001081228256, -0.0511309988796711, 0.055421218276023865, -0.05331127345561981, -0.05081450566649437, -0.03476134315133095, -0.045398980379104614, 0.053803592920303345, -0.026638053357601166, -0.03159642592072487, 0.0005769380368292332, -0.011938771232962608, -0.01681801863014698, -0.0003794054500758648, -0.038647156208753586, -0.0010978307109326124, 0.014760822989046574, 0.023033564910292625, -0.016985056921839714, 0.029046908020973206, 0.04353519529104233, -0.010918964631855488, -0.0019187311409041286, -0.031016189604997635, 0.044590167701244354, -0.003578114788979292, 0.025723744183778763, 0.01382893044501543, 0.029134823009371758, -0.0005049581523053348, -0.04856389760971069, -0.005463878158479929, 0.03354812413454056, -0.05299478396773338, 0.046172626316547394, -0.012475049123167992, 0.01382013875991106, -0.03328438103199005, -0.060625750571489334, 0.020958784967660904, 0.018303772434592247, 0.05338160693645477, -0.0038220772985368967, -0.02442261204123497, -0.013697058893740177, -0.028572170063853264, -0.01321353018283844, 0.0020385144744068384, 0.028308426961302757, -0.05570254474878311, 0.06389616429805756, 0.0369592010974884, -0.006321043241769075, 0.06400166451931, -0.04796608164906502, -0.007951854728162289, -0.005147386342287064, -0.03833066672086716, -0.05953561142086983, -0.06758856773376465, -0.007652945816516876, 0.009248591959476471, 0.0019824691116809845, 0.030260127037763596, 0.02679629996418953, 0.040229614824056625, 0.055456385016441345, 0.0359569787979126, 0.05359259992837906, -0.022242335602641106, 0.005173760466277599, -0.024932514876127243, -0.018110360950231552, 0.020958784967660904, -0.01083105057477951, -0.04529348388314247, -0.07022599875926971, -0.034145940095186234, 0.005586958024650812, -0.04610229656100273, 0.03709986433386803, 0.021345609799027443, 0.0006208952399902046, -0.027358952909708023, 0.05911362171173096, 0.02088845521211624, 0.056687187403440475, 0.011727777309715748, -0.005415525287389755, -0.028220511972904205, -0.00601334311068058, -0.02398304082453251, -0.028290843591094017, 0.0035165748558938503, -0.004747375845909119, 0.04276154935359955, 0.005657289642840624, 0.04441434144973755, 0.0011626675259321928, -0.008826603181660175, 0.013222320936620235, -0.06210271269083023, -0.06319285184144974, -0.03551740571856499, 0.02405337244272232, 0.03611522167921066, 0.0023077521473169327, -0.00862440001219511, -0.049865029752254486, 0.040651604533195496, 0.02475668676197529, 0.03484925627708435, -0.027886439114809036, 0.002358302939683199, 0.030224960297346115, -0.0018549931701272726, 0.028537005186080933, -0.0840461403131485, -0.006932048127055168, 0.038260333240032196, -0.019481824710965157, 0.0171520933508873, 0.050673842430114746, -0.02679629996418953, 0.02322697639465332, -0.04441434144973755, 0.04715726897120476, 0.04610229656100273, 0.0040616439655423164, 0.010567307472229004, -0.04596163332462311, -0.04040544480085373, -0.017916949465870857, 0.029802972450852394, -0.061047740280628204, 0.01646636240184307, 0.05440141260623932, 0.06213787570595741, -0.053487103432416916, 0.007666132878512144, 0.04153074696660042, 0.007081502582877874, 0.06727207452058792, 0.005490252282470465, 0.012387135066092014, -0.005226509179919958, -0.013275070115923882, -0.010918964631855488, 0.04564514011144638, -0.013653101399540901, -0.04473083093762398, -0.012123391963541508, -0.07138647139072418, 0.041741743683815, -0.0002881943073589355, -0.0017945520812645555, 0.016176244243979454, 0.0027451261412352324, -0.036642707884311676, -0.016985056921839714, 0.008760667406022549, 0.04958370327949524, 0.01280912384390831, 0.006193567533046007, 0.02966230921447277, 0.028712833300232887, 0.0384361632168293, -0.03994828835129738, 0.02999638393521309, -0.0019407097715884447, -0.019112583249807358, -0.036572378128767014, 0.07405906915664673, 0.04933754354715347, 0.048669394105672836, -0.010611264035105705, -0.017108136788010597, 0.041741743683815, 0.045363813638687134, 0.0424802228808403, -0.08151420205831528, -0.02556549943983555, -0.016149869188666344, -0.035025086253881454, -0.021802764385938644, 0.03171950578689575, 0.05689818039536476, -0.013477273285388947, -0.0002873700868804008, 0.011921188794076443, -0.04160108044743538, 0.06505663692951202, -0.05007602646946907, 0.010409061796963215, -0.013925636187195778, -0.001230801222845912, -0.030137045308947563, 0.008747479878365993, -0.03127993270754814, -0.00963541492819786, -0.006022134330123663, 0.03481408953666687, 0.0008088122121989727, 0.03565806895494461, -0.039033979177474976, 0.037029534578323364, 0.01760045625269413, -0.03646688163280487, -0.0367833711206913, 0.0006175984744913876, -0.008888143114745617, 0.05577287822961807, -0.014734448865056038, 0.03156125918030739, 0.04975953325629234, -0.04360552877187729, -0.014039925299584866, -0.06871387362480164, -0.053065113723278046, -0.004428686574101448, 0.05760149657726288, 0.008756271563470364, -0.04764958843588829, -0.03727569431066513, 0.01920049823820591, 0.019007086753845215, -0.056581687182188034, -0.09023530781269073, -0.005011118948459625, -0.008176036179065704, -0.028326010331511497, 0.042656052857637405, -0.037416357547044754, -0.011296996846795082, -0.033741533756256104, 0.03312613442540169, -0.017758702859282494, -0.005305632017552853, -0.011929980479180813, 0.02127527818083763, -0.040264781564474106, 0.009547500871121883, 0.006246315781027079, 0.03328438103199005, -0.04033511132001877, 0.03525366261601448, 0.0175652913749218, -0.02398304082453251, 0.038260333240032196, -0.02517867647111416, -0.019147749990224838, -0.03235248848795891, -0.029767805710434914, 0.0006478190189227462, 0.012888247147202492, 0.0007829873356968164, 0.022541245445609093, 0.008325491100549698, 0.029293067753314972, -0.044168177992105484, -0.05552671477198601, -0.0638258308172226, 0.08636707812547684, -0.06410715728998184, 0.015130063518881798, 0.005630915518850088, 0.0024022602010518312, -0.014163005165755749, -0.0016648783348500729, 0.02284015342593193, 0.07068315148353577, -0.060590583831071854, 0.040616437792778015, -0.08320216089487076, -0.003180302446708083, 0.004116590600460768, 0.012861872091889381, -0.11977453529834747, -0.004257253371179104, 0.0078111919574439526, -0.03004913218319416, 0.005859492812305689, 0.02642706036567688, -0.07750530540943146, -0.03275689482688904, 0.03636138513684273, -0.025442419573664665, -0.04079226776957512, -0.046559449285268784, 0.027868855744600296, -0.058586135506629944, 0.04117909073829651, 0.05721467360854149, 0.044590167701244354, -0.01043543592095375, 0.012773958034813404, -0.04589129984378815, 0.06917102634906769, -0.0072221653535962105, 0.04511765390634537, 0.005732017103582621, -0.04771992191672325, 0.06301701813936234, -0.012431091628968716, -0.04761442169547081, -0.0016637794906273484, 0.0011439857771620154, 0.008057352155447006, -0.03229973837733269, 0.00105002720374614, 0.01723121665418148, -0.013714641332626343, -0.011525574140250683, -0.03484925627708435, -0.029732640832662582, -0.03310855105519295, 0.03412835672497749, 0.004659461788833141, 0.022224752232432365, 0.025811659172177315, -0.07553602755069733, -0.06790506094694138, 0.016193827614188194, -0.0272182896733284, 0.008365052752196789, 0.009160676971077919, -0.04044061154127121, -0.04392201825976372, -0.01804002933204174, 0.03212391212582588, 0.010514558292925358, 0.026638053357601166, 0.021785181015729904, 0.001170360017567873, 0.028273262083530426, 0.03998345509171486, -0.042198896408081055, 0.02196100912988186, 0.009749704040586948, -0.0320887453854084, -0.04360552877187729, -0.06575994938611984, 0.0175652913749218, -0.02679629996418953, 0.004760563373565674, 0.0013044294901192188, -0.0287831649184227, 0.03324921429157257, -0.028554586693644524, 0.08362414687871933, -0.004523194395005703, -0.018338937312364578, 0.028132598847150803, -0.03709986433386803, 0.040616437792778015, 0.02241816371679306, 0.04240989312529564, -0.037416357547044754, 0.032229408621788025, -0.07216011732816696, 0.012114600278437138, 0.0441330149769783, -0.020958784967660904, 0.01222888845950365, -0.03560531884431839, 0.0415659137070179, -0.010250815190374851, -0.042656052857637405, -0.0009340901742689312, 0.0024945703335106373, 0.013011327013373375, -0.010883798822760582, -0.032211825251579285, -0.002086867345497012, -0.009371671825647354, 0.017872991040349007, -0.028695249930024147, 0.008866163901984692, 0.09480685740709305, 0.016536692157387733, -0.034989919513463974, 0.008435383439064026, 0.03966696560382843, 0.03432177007198334, 0.026972128078341484, 0.013371775858104229, -0.02398304082453251, -0.04160108044743538, -0.011059627868235111, 0.05492889881134033, -0.0243698637932539, 0.007208978291600943, 0.04286704584956169, -0.018180692568421364, 0.031877752393484116, -0.04019445180892944, 0.009310131892561913, 0.011718985624611378, -0.01920049823820591, -0.07057765871286392, 0.014945442788302898, 0.003327558981254697, -0.06825671344995499, -0.053522270172834396, -0.03196566551923752, -0.01642240397632122, 0.01637844741344452, 0.04529348388314247, 0.06132906302809715, 0.012712418101727962, -0.0068045724183321, 0.021855512633919716 ]
717,509
pytorch_optimizer.lr_scheduler.linear_warmup
__init__
null
def __init__(self, poly_order: float = 0.5, **kwargs): self.poly_order = poly_order if poly_order <= 0: raise ValueError(f'[-] poly_order must be positive. {poly_order}') super().__init__(**kwargs)
(self, poly_order: float = 0.5, **kwargs)
[ -0.017613615840673447, -0.0029922830872237682, -0.010034637525677681, 0.054271843284368515, -0.04720519483089447, -0.0319412425160408, -0.047911860048770905, 0.009822637774050236, -0.02066994085907936, -0.028990916907787323, 0.024591928347945213, 0.062363151460886, -0.006271648686379194, -0.004407820757478476, -0.05307051166892052, 0.04123388230800629, 0.05105651915073395, -0.006872313562780619, -0.01241079717874527, 0.00969897210597992, 0.0048804027028381824, 0.002058160724118352, -0.007654061075299978, 0.05808783322572708, 0.012569797225296497, 0.05504917353391647, -0.02930891513824463, 0.046710532158613205, 0.0014873081818223, -0.08006510138511658, -0.016041286289691925, 0.021005606278777122, -0.0379478894174099, 0.0720091238617897, 0.019874941557645798, -0.03075757808983326, -0.006156815681606531, 0.018355613574385643, -0.06921780109405518, 0.05095051974058151, 0.06872313469648361, -0.01483995746821165, -0.011165301315486431, 0.026217257604002953, 0.002276784973219037, 0.019751276820898056, -0.018249614164233208, 0.065083809196949, -0.009292639791965485, -0.013991959393024445, 0.03685256093740463, -0.03437923267483711, 0.06345847994089127, -0.03489156439900398, -0.0358455628156662, 0.08190242946147919, 0.04801785945892334, 0.04169321432709694, 0.04310654103755951, 0.0026588256005197763, -0.08197309821844101, 0.016279786825180054, -0.03960855305194855, -0.03054557740688324, -0.0029194082599133253, -0.04614520072937012, -0.04229387640953064, -0.009478138759732246, 0.0319412425160408, 0.036711227148771286, 0.058759164065122604, 0.038725219666957855, -0.04112787917256355, 0.016544785350561142, 0.048971857875585556, 0.028584584593772888, -0.03471489995718002, 0.016491785645484924, 0.0006724355625919998, 0.0050879851914942265, -0.05480184033513069, -0.011333134025335312, 0.0006906542694196105, 0.06621447205543518, -0.010670635849237442, -0.017516449093818665, 0.045897867530584335, -0.03225924074649811, 0.030863577499985695, 0.055331841111183167, -0.10691835731267929, 0.01099746860563755, -0.03967921808362007, 0.0007767790229991078, 0.04027988389134407, -0.006814897060394287, 0.03985588625073433, -0.046887196600437164, -0.021517938002943993, 0.005472233984619379, 0.01439829170703888, -0.0028553667943924665, -0.04391920566558838, 0.01326762791723013, 0.0349445641040802, -0.04706386476755142, 0.020139941945672035, -0.031375907361507416, 0.001912411185912788, 0.0003538843884598464, -0.00668681412935257, 0.0155907878652215, 0.0023474516347050667, 0.038124557584524155, -0.06515447795391083, 0.02187127061188221, -0.007057812996208668, 0.004339362494647503, 0.05808783322572708, 0.022577933967113495, 0.026111258193850517, 0.02831958420574665, -0.016518285498023033, 0.07872243970632553, 0.020086942240595818, 0.03208257257938385, 0.001949952682480216, 0.0011671007378026843, 0.022100936621427536, -0.024026596918702126, 0.08663707971572876, 0.002943699713796377, -0.011695299297571182, -0.03900788724422455, -0.0638824850320816, 0.016818618401885033, 0.024415262043476105, -0.006629397626966238, -0.03918455168604851, 0.0008849870064295828, 0.062433820217847824, -0.010811968706548214, 0.05292918160557747, -0.01741044968366623, 0.008108976297080517, 0.11221834272146225, -0.022065602242946625, -0.031163910403847694, 0.00844905897974968, 0.05681583657860756, 0.014362958259880543, 0.021217605099081993, 0.0009048619540408254, -0.03642855957150459, 0.030828244984149933, -0.047699861228466034, 0.004796485882252455, -0.037700556218624115, 0.01952161081135273, 0.05953649431467056, 0.030139246955513954, 0.03823055699467659, 0.022542601451277733, -0.03840722143650055, -0.03307190537452698, 0.03285990655422211, 0.02072294056415558, -0.08600108325481415, -0.01185429934412241, 0.010599968954920769, 0.014115625992417336, -0.07518911361694336, 0.024750927463173866, 0.030227579176425934, -0.0005934878718107939, 0.016853950917720795, 0.002687533851712942, 0.05480184033513069, -0.03395523503422737, 0.01102396845817566, 0.06310515105724335, 0.008126643486320972, -0.03819522261619568, 0.01744578219950199, 0.060384493321180344, 0.025298593565821648, 0.009239640086889267, 0.0039462801069021225, 0.017887448891997337, -0.007402312010526657, -0.03296590596437454, 0.02460959553718567, 0.025386925786733627, -0.018850278109312057, 0.005781400017440319, -0.0033610735554248095, 0.020528607070446014, -0.04904252290725708, -0.0316232405602932, 0.061409156769514084, -0.022842934355139732, -0.006214232183992863, 0.03699389472603798, -0.05596783757209778, -0.0006619460182264447, 0.040138550102710724, 0.01623561978340149, -0.02521025948226452, 0.024273930117487907, -0.04232921078801155, 0.029185248538851738, -0.04416653886437416, 0.019892608746886253, 0.00537065090611577, 0.0019444319186732173, 0.006982729770243168, -0.011695299297571182, -0.010281969793140888, 0.025916924700140953, 0.03473256528377533, 0.08819174766540527, 0.037311892956495285, 0.014504291117191315, -0.03950255364179611, 0.039149221032857895, 0.03307190537452698, 0.02234826795756817, -0.05480184033513069, -0.06215115264058113, 0.08084243535995483, -0.021199937909841537, -0.06458914279937744, -0.019574610516428947, -0.016668451949954033, -0.0433892086148262, 0.03271857276558876, -0.0216946043074131, -0.010599968954920769, -0.07540111243724823, -0.023726264014840126, 0.02904391661286354, -0.00543690100312233, -0.029467914253473282, -0.011165301315486431, 0.00423336261883378, 0.03985588625073433, 0.018443945795297623, 0.008197309449315071, 0.003712197532877326, 0.0298212468624115, -0.03519189730286598, 0.013629794120788574, -0.03858388960361481, 0.007941143587231636, -0.012658130377531052, -0.017242616042494774, 0.004368070513010025, -0.061833154410123825, 0.03245357424020767, 0.008184059523046017, -0.075330451130867, -0.005591483786702156, -0.05095051974058151, 0.044908538460731506, 0.02883191592991352, -0.03066924400627613, -0.008038310334086418, -0.03787722438573837, -0.012693462893366814, 0.030686911195516586, 0.003272740636020899, -0.0009998200694099069, 0.014981290325522423, 0.019751276820898056, 0.028337251394987106, 0.00841814186424017, 0.0013559127692133188, 0.007684977725148201, 0.018125947564840317, 0.04642786458134651, 0.10119437426328659, 0.015793954953551292, -0.020828939974308014, 0.014062626287341118, -0.04533253610134125, 0.017852114513516426, -0.007804227527230978, -0.01153630018234253, -0.023001933470368385, -0.06091449037194252, 0.007119645830243826, 0.043636541813611984, 0.09744904935359955, 0.04045654833316803, 0.062433820217847824, -0.07872243970632553, 0.0734931230545044, -0.011297800578176975, 0.03900788724422455, -0.02943258173763752, 0.04172854498028755, -0.04603920131921768, 0.08296242356300354, -0.02695925533771515, -0.0030320328660309315, -0.053035181015729904, 0.004133988171815872, -0.001393454265780747, 0.021341271698474884, 0.018850278109312057, 0.0005286182858981192, 0.08720241487026215, -0.06133848801255226, 0.02482159435749054, -0.0003022647579200566, 0.04830052703619003, 0.0260582584887743, -0.05596783757209778, 0.01846161298453808, 0.05292918160557747, -0.0002658273442648351, -0.044873204082250595, -0.026517590507864952, -0.060243159532547, -0.07278645783662796, 0.012039798311889172, 0.01846161298453808, -0.022577933967113495, 0.01684511825442314, -0.005383901298046112, -0.03865455463528633, -0.013567960821092129, 0.010202470235526562, 0.0013691626954823732, -0.03294823691248894, 0.02238360233604908, 0.04169321432709694, -0.01779911480844021, -0.0010710385395213962, -0.0023982429411262274, 0.034237902611494064, -0.046710532158613205, -0.03066924400627613, 0.03837188705801964, -0.03570422902703285, -0.031375907361507416, -0.008108976297080517, -0.03861922025680542, 0.05193984881043434, 0.048159193247556686, -0.012075131759047508, -0.055296506732702255, 0.009142473340034485, -0.017781447619199753, 0.018214279785752296, -0.011156467720866203, -0.009601805359125137, -0.0013956626644358039, 0.011315466836094856, -0.02280759997665882, 0.02093493938446045, -0.05218718200922012, -0.0322415716946125, 0.01527278870344162, -0.04088054969906807, -0.03805388882756233, 0.05416584387421608, -0.030492577701807022, -0.03293057158589363, 0.02413259632885456, -0.007870477624237537, -0.032612573355436325, -0.024256262928247452, 0.0118984654545784, -0.0032594904769212008, 0.03476789966225624, -0.0027847003657370806, 0.035898562520742416, 0.015210956335067749, -0.04886585846543312, -0.014159792102873325, -0.042223211377859116, 0.023602597415447235, 0.04328320920467377, -0.07278645783662796, -0.007424395065754652, -0.022065602242946625, 0.021500270813703537, 0.061621155589818954, 0.008294476196169853, -0.018814945593476295, -0.015281622298061848, 0.07398778945207596, -0.036711227148771286, -0.00967247225344181, 0.038937222212553024, 0.06052582338452339, -0.010202470235526562, -0.005410401150584221, 0.0004027436370961368, -0.013815293088555336, -0.06465981155633926, -0.03130524232983589, 0.010661802254617214, 0.04254120960831642, -0.024591928347945213, 0.02036960795521736, 0.039113886654376984, 0.03847789019346237, 0.018479280173778534, -0.04049188271164894, 0.006337898317724466, 0.032488904893398285, -0.047099195420742035, -0.04250587522983551, -0.03837188705801964, -0.02837258391082287, 0.009690138511359692, -0.017392782494425774, -0.027188921347260475, 0.04473187029361725, 0.019680609926581383, 0.0406685471534729, 0.01653595268726349, 0.03900788724422455, -0.0022381392773240805, 0.01892094500362873, -0.022365935146808624, 0.038124557584524155, 0.05374184623360634, -0.07126712799072266, -0.0005476650549098849, -0.04858319088816643, -0.0322415716946125, 0.04024454951286316, -0.01202213205397129, -0.012340131215751171, -0.015157955698668957, -0.0554378405213356, 0.020051607862114906, 0.07162045687437057, 0.016500618308782578, 0.04621586576104164, 0.023549597710371017, 0.01669495180249214, -0.02503359504044056, 0.03347823768854141, -0.007640811149030924, -0.006872313562780619, -0.025863924995064735, 0.04840652644634247, 0.02635858952999115, 0.0024843676947057247, -0.0039087384939193726, -0.018125947564840317, -0.01326762791723013, -0.03798322379589081, -0.025351593270897865, -0.0032881987281143665, -0.018991611897945404, -0.005578233860433102, 0.03699389472603798, -0.029185248538851738, -0.052858512848615646, -0.055296506732702255, 0.05437784269452095, 0.0042068627662956715, 0.03285990655422211, -0.03989121690392494, 0.007397895213216543, 0.027029922232031822, 0.003314698813483119, -0.03328390419483185, -0.05621517077088356, -0.03310723602771759, 0.01764894835650921, 0.028902582824230194, -0.0010296324035152793, 0.00779539393261075, -0.037735890597105026, 0.014981290325522423, -0.04420187324285507, -0.01153630018234253, -0.01257862988859415, 0.029980245977640152, 0.003632697742432356, -0.07031313329935074, -0.031004909425973892, -0.028549250215291977, 0.042823877185583115, -0.03499756380915642, 0.015555455349385738, 0.016942285001277924, 0.058335162699222565, 0.03376090154051781, 0.03485623374581337, -0.004321695771068335, 0.016262119635939598, 0.024379929527640343, -0.01140379998832941, -0.022931266576051712, 0.020351940765976906, 0.012940796092152596, -0.05564983934164047, 0.010882635600864887, -0.03642855957150459, -0.03559822961688042, 0.02512192726135254, -0.015564288012683392, 0.0158204548060894, 0.0027096171397715807, 0.02798391878604889, 0.038124557584524155, 0.018426280468702316, 0.020652273669838905, 0.05193984881043434, -0.045049868524074554, 0.03573956340551376, -0.035350896418094635, 0.03141124173998833, 0.057946499437093735, 0.0373472236096859, 0.018249614164233208, -0.03865455463528633, 0.023461265489459038, -0.03420256823301315, -0.011377300135791302, -0.06646180897951126, 0.09462239593267441, 0.004010321572422981, 0.033902235329151154, -0.02015760913491249, -0.035050563514232635, 0.10882635414600372, -0.009027640335261822, 0.030439577996730804, -0.044661205261945724, 0.046498533338308334, -0.016853950917720795, -0.01623561978340149, -0.020086942240595818, 0.08713174611330032, 0.04596853256225586, -0.05105651915073395, 0.01714545115828514, 0.004069946706295013, -0.030810577794909477, 0.031764574348926544, -0.05660383775830269, -0.013532627373933792, -0.01759594865143299, -0.024362262338399887, 0.011129967868328094, -0.0048980689607560635, 0.040385883301496506, -0.025987591594457626, -0.004398987162858248, 0.019450943917036057, 0.0002333925513084978, 0.024627262726426125, -0.005882983095943928, 0.038336556404829025, 0.013488461263477802, -0.03280690684914589, -0.06511914730072021, -0.024450596421957016, -0.012357797473669052, 0.02024594135582447, -0.0020360774360597134, 0.034114234149456024, 0.04967852309346199, -0.0481945276260376, -0.051798515021800995, 0.0316232405602932, -0.028761250898241997, -0.023302266374230385, -0.002020619111135602, 0.04890119284391403, -0.04285920783877373, -0.026005258783698082, 0.0012090590316802263, -0.0020261399913579226, -0.0870610848069191, -0.059642493724823, 0.03847789019346237, 0.007826310582458973, 0.014733957126736641, 0.004352612420916557, -0.006046399008482695, -0.025722593069076538, -0.014177459292113781, -0.03858388960361481, 0.011757132597267628, -0.01150980032980442, -0.06543714553117752, 0.015051956288516521, -0.03570422902703285, -0.05370651185512543, 0.00864339154213667, -0.004173737950623035, -0.059006497263908386, 0.06285782158374786, 0.008267976343631744, 0.01454845815896988, 0.027966251596808434, -0.00712406262755394, -0.03407889977097511, 0.016456453129649162, -0.03950255364179611, -0.021111605688929558, 0.021199937909841537, 0.05232851579785347, -0.017693115398287773, -0.030616244301199913, -0.03600456193089485, -0.02720658853650093, -0.04289454221725464, -0.008881891146302223, 0.03929055109620094, 0.0026301173493266106, -0.037523891776800156, -0.0060022324323654175, -0.005158651620149612, 0.05225784704089165, -0.04702853038907051, 0.010485135950148106, 0.06518980860710144, -0.09108906984329224, -0.010670635849237442, -0.03815988823771477, 0.035350896418094635, 0.0009241848019883037, -0.0017898490186780691, -0.08055976778268814, -0.035774897783994675, -0.039149221032857895, -0.02485692873597145, -0.01999860815703869, 0.042011212557554245, 0.0007110812584869564, -0.07808644324541092, 0.020917272195219994, -0.0031844074837863445, -0.019168278202414513, -0.03787722438573837, 0.03169390931725502, -0.07356378436088562, 0.009751971811056137, 0.05829983204603195, -0.026605922728776932, 0.0057239835150539875, 0.03660522773861885, -0.022666268050670624, 0.015122623182833195, -0.00896139070391655, 0.021076273173093796, 0.02331993170082569, -0.00433715432882309, 0.0804184302687645, -0.0003878374118357897, -0.05095051974058151, 0.006117065437138081, 0.043459873646497726, 0.020404940471053123, 0.006474814377725124, 0.026429256424307823, 0.013329461216926575, -0.08183176070451736, -0.0216946043074131, -0.004765569698065519, -0.05678050220012665, -0.00013774439867120236, 0.014230458997189999, 0.028549250215291977, -0.007071062922477722, 0.0173221156001091, -0.03141124173998833, -0.020192941650748253, 0.036287229508161545, -0.008873057551681995, 0.016200287267565727, 0.02132360450923443, -0.015705620869994164, -0.05801716446876526, -0.010926801711320877, 0.022330602630972862, -0.04194054380059242, 0.09787304699420929, -0.003115949220955372, -0.03713522478938103, 0.026888588443398476, -0.03294823691248894, -0.015131455846130848, -0.010962135158479214, -0.0025086593814194202, -0.037099894136190414, -0.059960491955280304, -0.038513220846652985, 0.03805388882756233, 0.0070180632174015045, 0.024927593767642975, 0.015440622344613075, -0.04190521314740181, 0.08176109939813614, -0.04497920349240303, 0.0002097910619340837, -0.03858388960361481, -0.030810577794909477, 0.03452056646347046, -0.052823182195425034, -0.02635858952999115, 0.02653525583446026, 0.02144727110862732, -0.10437436401844025, -0.019150611013174057, 0.029291247949004173, 0.061656489968299866, 0.06335248053073883, -0.035562895238399506, -0.036251895129680634, -0.04837119206786156, 0.0191329438239336, -0.013382460922002792, -0.0024137012660503387, 0.04554453492164612, -0.01648295298218727, 0.013232295401394367, -0.04292987659573555, -0.03603989630937576, -0.04091588035225868, 0.0040324050933122635, 0.021977270022034645, -0.039573218673467636, -0.025492927059531212, 0.009071807377040386, -0.029361914843320847, -0.0388665534555912, 0.027400920167565346, 0.020828939974308014, 0.04236454516649246, 0.02392059750854969, -0.01507845614105463, -0.012101631611585617, -0.0034781149588525295, -0.013214628212153912, 0.04946652427315712, -0.004361445549875498, 0.017763782292604446, -0.002972407964989543, -0.008603641763329506, -0.05169251561164856, 0.007932309992611408, 0.052010517567396164, 0.012613963335752487, -0.017940448597073555, -0.03588089719414711, -0.03361956775188446, 0.01897394470870495, -0.01557312160730362, -0.040986549109220505, -0.08868640661239624, -0.0033699069172143936, 0.018814945593476295, 0.039325885474681854, 0.05699250102043152, 0.04420187324285507, 0.040562547743320465, 0.008550642058253288 ]
717,511
pytorch_optimizer.lr_scheduler.linear_warmup
_step
null
def _step(self) -> float: return self.min_lr + (self.max_lr - self.min_lr) * (self.step_t - self.warmup_steps) ** self.poly_order
(self) -> float
[ -0.04580686613917351, -0.011843773536384106, -0.013685530051589012, 0.0680902972817421, 0.005320124793797731, 0.01216288935393095, -0.005475123878568411, -0.05992092192173004, -0.09577135741710663, 0.037819840013980865, 0.008543198928236961, 0.00239565153606236, 0.04248805716633797, 0.07505615055561066, -0.028683995828032494, 0.025748126208782196, 0.024271074682474136, 0.022101083770394325, -0.042305704206228256, -0.00041798537131398916, 0.0218640249222517, 0.027498707175254822, 0.0013665015576407313, 0.048432737588882446, -0.03625161200761795, -0.01084083691239357, 0.030653400346636772, -0.01067671924829483, -0.021079910919070244, -0.04682803899049759, -0.03504808619618416, 0.02018638513982296, 0.0015397361712530255, -0.05926445499062538, 0.01645728386938572, -0.07644203305244446, -0.0019682636484503746, -0.023942839354276657, -0.0856325775384903, -0.0526268370449543, -0.016794634982943535, -0.006386884953826666, -0.03094516322016716, 0.04693744704127312, -0.013804059475660324, -0.006628501228988171, -0.03324279934167862, 0.000412856723414734, 0.049599789083004, -0.044092755764722824, 0.012044360861182213, -0.04321746528148651, 0.03636102378368378, -0.011351422406733036, 0.024088721722364426, 0.04314452409744263, 0.011333187110722065, -0.09905369579792023, 0.003337044734507799, 0.003027046099305153, 0.013895235024392605, -0.050219789147377014, -0.019001096487045288, 0.045405689626932144, 0.048250384628772736, -0.001765396911650896, -0.02250225841999054, 0.023377548903226852, 0.00935466680675745, 0.025766361504793167, 0.011205540969967842, -0.02133520320057869, 0.02348695881664753, -0.02469048462808132, 0.009992899373173714, 0.03428220748901367, -0.011825538240373135, -0.054049182683229446, 0.033534564077854156, -0.056492701172828674, 0.0009527900838293135, 0.04321746528148651, -0.004823214840143919, -0.006970411632210016, -0.017660807818174362, -0.034154560416936874, -0.017496690154075623, -0.04150335490703583, -0.0731961578130722, 0.013156709261238575, -0.021626967936754227, 0.026550475507974625, 0.006633060052990913, 0.047739800065755844, 0.02861105464398861, 0.040445711463689804, -0.07687967270612717, 0.010202604345977306, -0.01565493457019329, -0.025383422151207924, 0.05598211660981178, 0.03887748345732689, -0.03502985090017319, 0.06637618690729141, 0.03214868903160095, -0.014743172563612461, 0.015764344483613968, -0.035668086260557175, 0.02016814984381199, -0.001973962178453803, 0.00343277957290411, 0.0367257259786129, -0.04850567877292633, 0.05412212386727333, -0.06517266482114792, 0.01232700701802969, -0.011451716534793377, 0.030890457332134247, 0.05113155022263527, 0.0856325775384903, 0.015955815091729164, -0.011542892083525658, -0.022082848474383354, 0.016922282055020332, -0.017241397872567177, -0.019657563418149948, 0.050912726670503616, 0.049089204519987106, -0.04135747253894806, -0.03621514141559601, 0.03242221474647522, 0.004859685432165861, 0.009108491241931915, -0.03701749071478844, -0.027498707175254822, 0.02766282483935356, 0.01938403584063053, 0.011770832352340221, 0.015071406960487366, 0.018472274765372276, 0.009236137382686138, 0.052043311297893524, 0.030890457332134247, -0.031218690797686577, 0.038476306945085526, 0.0397527739405632, 0.004134835675358772, 0.08359023183584213, 0.037345726042985916, 0.021645203232765198, -0.01357611920684576, -0.02004050277173519, 0.07399851083755493, -0.018335510045289993, 0.023377548903226852, 0.011068777181208134, -0.0228122565895319, 0.006163503509014845, -0.019146976992487907, -0.030671635642647743, -0.04350922629237175, -0.032221630215644836, 0.001175031764432788, -0.027352824807167053, 0.009122167713940144, 0.04453039914369583, -0.00376557232812047, 0.04183158650994301, -0.03873160108923912, -0.00935466680675745, 0.031382810324430466, -0.04219629243016243, 0.024362249299883842, 0.01951168291270733, 0.013001710176467896, 0.08008906990289688, 0.03971630334854126, 0.039971597492694855, -0.014077587984502316, 0.057477403432130814, 0.04584333673119545, 0.024216368794441223, -0.02314049005508423, -0.047922149300575256, -0.014524349942803383, 0.019748739898204803, 0.0009339850512333214, -0.014460527338087559, 0.03143751248717308, 0.011944066733121872, -0.008356288075447083, 0.0013402884360402822, 0.03244045004248619, -0.04117511957883835, -0.0367257259786129, 0.022411081939935684, 0.034501031041145325, 0.01248200610280037, 0.11473598331212997, -0.022283434867858887, -0.0420868806540966, -0.003380353329703212, -0.0021882259752601385, 0.031182222068309784, -0.06889265030622482, -0.029705168679356575, -0.026404595002532005, -0.0006701442180201411, -0.012709946371614933, 0.03575925901532173, -0.035649850964546204, -0.027553413063287735, 0.024799894541502, 0.006646736524999142, 0.01719580963253975, -0.04205041006207466, -0.04748450592160225, -0.004873361904174089, 0.03774689882993698, 0.017879629507660866, 0.013567001558840275, -0.06692324578762054, 0.03254986181855202, -0.06896559149026871, 0.029194582253694534, -0.05806093290448189, 0.013630825094878674, -0.04504098743200302, -0.06626677513122559, 0.009555254131555557, -0.019438741728663445, -0.04153982549905777, 0.04730215296149254, 0.005424977280199528, 0.021754613146185875, 0.057842109352350235, -0.05310095101594925, 0.010494367219507694, -0.016931399703025818, 0.004483583848923445, -0.029522815719246864, -0.007695261389017105, -0.002655503572896123, 0.007038793992251158, -0.036634549498558044, 0.0715549886226654, 0.05707623064517975, -0.03510279208421707, 0.0008883969858288765, 0.0374186672270298, -0.02071520686149597, -0.010786131024360657, -0.005238065961748362, 0.03395397588610649, 0.02500048279762268, 0.020934028550982475, 0.09628194570541382, 0.03778336942195892, 0.019967563450336456, 0.020095208659768105, -0.02365107648074627, -0.04733862355351448, -0.015372288413345814, 0.014104939997196198, -0.08614316582679749, 0.027681060135364532, -0.006031298078596592, -0.0031387368217110634, 0.011105246841907501, 0.044129226356744766, 0.16572165489196777, 0.03822101652622223, -0.061780914664268494, -0.03227633237838745, 0.0298145804554224, 0.011707009747624397, 0.01521728839725256, 0.017733749002218246, 0.016092579811811447, 0.005479682702571154, 0.03721807897090912, -0.06976793706417084, -0.04744803532958031, 0.0012912813108414412, -0.08855021744966507, 0.0004273878876119852, 0.011889361776411533, -0.008274230174720287, 0.03605102375149727, -0.03924218565225601, 0.012637005187571049, 0.0025894008576869965, 0.0645526647567749, 0.039825715124607086, 0.09256196022033691, -0.011387892998754978, -0.01780669018626213, -0.05663858354091644, 0.030051637440919876, 0.05280919000506401, 0.023249901831150055, -0.023249901831150055, 0.011843773536384106, 0.020241091027855873, -0.031492218375205994, 0.010649366304278374, 0.015709638595581055, 0.011314951814711094, -0.0004923508386127651, -0.025073423981666565, -0.08767492324113846, 0.02366931177675724, -0.025693420320749283, -0.013940823264420033, -0.03792925179004669, -0.041649237275123596, -0.04099276661872864, -0.004453951958566904, -0.01373111829161644, 0.04547863081097603, -0.012627887539565563, 0.04143041372299194, 0.02033226750791073, 0.005830710753798485, -0.011278482154011726, -0.05773269757628441, 0.07272204756736755, -0.023049313575029373, -0.01308376807719469, -0.06892912089824677, -0.02600342035293579, -0.06466207653284073, -0.013849647715687752, 0.0477033294737339, -0.017633454874157906, -0.019256388768553734, 0.04453039914369583, 0.020478148013353348, 0.006815412547439337, -0.007257616613060236, 0.047922149300575256, 0.006067768670618534, -0.007462762761861086, 0.030653400346636772, 0.02481812983751297, -0.0381116047501564, 0.03668925538659096, 0.0003658440546132624, 0.04325393587350845, 0.01573699153959751, -0.03362574055790901, -0.05598211660981178, -0.004804979544132948, -0.0012035242980346084, -0.040810417383909225, 0.01608346216380596, -0.06535501778125763, -0.040628064423799515, 0.02169990912079811, -0.03572278842329979, -0.05164213478565216, 0.024070486426353455, -0.053830359131097794, 0.08927962183952332, 0.04336334764957428, -0.01060377899557352, -0.0420868806540966, -0.011460834182798862, -0.018745802342891693, 0.032695744186639786, -0.032859861850738525, -0.005912769120186567, -0.01314759161323309, 0.01662139967083931, -0.04168570786714554, 0.03667102009057999, 0.008693640120327473, 0.019238153472542763, -0.0006501994794234633, -0.0014394423924386501, 0.033516328781843185, 0.020824618637561798, -0.02565694972872734, 0.019621092826128006, 0.044931575655937195, -0.0034077062737196684, -0.01608346216380596, -0.0463174507021904, 0.02447166107594967, -0.056820936501026154, 0.013548766262829304, -0.009154078550636768, -0.00906746182590723, -0.030233990401029587, -0.037491604685783386, -0.0017596984980627894, 0.016329636797308922, 0.024435190483927727, -0.019092272967100143, 0.034701619297266006, -0.026441065594553947, -0.005215272307395935, 0.025219304487109184, 0.009518783539533615, 0.001576206530444324, -0.0748373344540596, 0.036306317895650864, 0.06933029741048813, -0.0017973085632547736, 0.016220225021243095, -0.038804542273283005, 0.027061061933636665, 0.005652917083352804, -0.00607688631862402, -0.02830105647444725, -0.02977810986340046, -0.0420868806540966, -0.00018748082220554352, -0.018335510045289993, 0.014414939098060131, 0.03774689882993698, 0.04354569688439369, 0.018581686541438103, 0.03377162292599678, 0.016812870278954506, -0.022593433037400246, 0.013275237753987312, -0.026605181396007538, 0.0023591811768710613, 0.02977810986340046, -0.03957042098045349, -0.024435190483927727, -0.03254986181855202, -0.003651602193713188, -0.007303204387426376, 0.0005085915909148753, -0.003911454230546951, 0.0025894008576869965, 0.002443519188091159, -0.02235637605190277, 0.024726955220103264, 0.013676412403583527, 0.03523043915629387, -0.004640862811356783, 0.0018873449880629778, -0.034355148673057556, -0.008105553686618805, -0.07053381949663162, -0.05116802081465721, 0.017943453043699265, 0.009409371763467789, -0.003649322781711817, 0.021554026752710342, -0.012956121936440468, 0.008917021565139294, 0.010157016105949879, -0.07542085647583008, -0.04117511957883835, -0.015363170765340328, -0.03488396853208542, 0.04697391763329506, 0.08431964367628098, 0.022575199604034424, -0.007212028373032808, -0.010111427865922451, -0.0119896549731493, 0.005776004865765572, 0.07994319498538971, -0.02815517596900463, 0.009664664976298809, 0.011260246858000755, 0.04547863081097603, 0.026386359706521034, -0.03774689882993698, 0.03656161203980446, 0.01854521594941616, -0.03668925538659096, -0.004109762143343687, 0.02695165015757084, -0.05477859079837799, -0.03364397585391998, -0.07527497410774231, 0.033498093485832214, 0.014779643155634403, 0.019128743559122086, 0.06320326030254364, -0.07870319485664368, 0.03446456044912338, 0.036816902458667755, 0.018745802342891693, -0.019967563450336456, 0.0065783546306192875, 0.014697585254907608, 0.023049313575029373, -0.050912726670503616, -0.029832815751433372, 0.07071617245674133, 0.0190558023750782, 0.07334204018115997, 0.04121159017086029, 0.004686450585722923, -0.02992399036884308, 0.015928462147712708, -0.015527287498116493, -0.015563758090138435, -0.0003641344956122339, -0.07644203305244446, -0.0062227677553892136, -0.06170797348022461, 0.048870380967855453, 0.053538598120212555, 0.008283346891403198, -0.017451101914048195, -0.026276947930455208, 0.01793433539569378, -0.010694954544305801, -0.004479025024920702, 0.061343271285295486, 0.020405208691954613, -0.017469337210059166, -0.010138780809938908, -0.016794634982943535, 0.007567615248262882, -0.0685279443860054, 0.0016651032492518425, 0.04354569688439369, -0.025912243872880936, -0.032039277255535126, 0.027279885485768318, 0.04059159383177757, 0.03993512690067291, -0.009122167713940144, 0.015363170765340328, 0.08162083476781845, 0.0018428965704515576, 0.009103932417929173, -0.06382326036691666, -0.07421733438968658, -0.02202814258635044, -0.02016814984381199, -0.0065054139122366905, -0.05623741075396538, 0.020587559789419174, 0.001473633456043899, 0.015609345398843288, 0.01107789482921362, -0.04102923721075058, 0.06856441497802734, -0.04861509054899216, 0.030051637440919876, -0.008611581288278103, 0.024416955187916756, -0.017487572506070137, -0.003368956269696355, 0.02649576961994171, 0.02501871809363365, -0.008670846000313759, 0.04088335484266281, 0.008297023363411427, 0.012947004288434982, -0.04350922629237175, -0.0334433875977993, 0.050365667790174484, -0.05051155015826225, -0.016001403331756592, -0.019621092826128006, -0.01439670380204916, 0.03530338034033775, -0.054523300379514694, 0.022593433037400246, 0.020423443987965584, 0.03059869445860386, -0.004551966208964586, -0.01608346216380596, -0.02696988545358181, -0.033023979514837265, 0.03667102009057999, 0.007499232888221741, -0.015974050387740135, -0.02004050277173519, 0.029522815719246864, 0.010631131939589977, 0.008625257760286331, -0.02811870537698269, 0.009692017920315266, 0.007617761846631765, -0.0350845567882061, 0.027936352416872978, -0.03854924812912941, -0.03172927722334862, -0.07425380498170853, -0.010476131923496723, -0.08089142292737961, -0.04241511598229408, -0.031018104404211044, -0.01901933178305626, -0.025036953389644623, -0.016694340854883194, 0.01813492365181446, 0.030671635642647743, -0.02895752526819706, -0.008009819313883781, 0.01727786846458912, 0.014013764448463917, 0.013776706531643867, -0.028027528896927834, -0.028501644730567932, -0.010366721078753471, -0.046062156558036804, -0.05809739977121353, 0.036178670823574066, -0.028392232954502106, 0.016238460317254066, -0.0034829264041036367, -0.028866348788142204, -0.018599921837449074, 0.022611668333411217, -0.06699618697166443, 0.06137974187731743, -0.009500548243522644, 0.010384956374764442, -0.021152852103114128, -0.008169377222657204, -0.00878025684505701, 0.04686450958251953, 0.004627186339348555, 0.06119738891720772, -0.036488670855760574, 0.023578135296702385, -0.1015336886048317, -0.013621707446873188, 0.028866348788142204, -0.0029677816201001406, -0.11488186568021774, 0.0397527739405632, 0.04365510866045952, -0.018481392413377762, 0.002992854919284582, -0.02448989637196064, -0.048396266996860504, -0.015490816906094551, 0.08132907003164291, -0.029413405805826187, -0.0059492397122085094, -0.013539648614823818, 0.019311094656586647, -0.06156209111213684, 0.031492218375205994, 0.07367027550935745, 0.05992092192173004, -0.02496401220560074, 0.0400080680847168, 0.0018360584508627653, 0.02831929177045822, 0.007257616613060236, -0.04380099102854729, -0.01224494818598032, 0.04321746528148651, 0.048432737588882446, -0.05860798805952072, -0.08461140841245651, 0.011387892998754978, -0.005365712568163872, -0.03710866719484329, -0.00021055976685602218, -0.0012411344796419144, -0.006441590376198292, -0.059009160846471786, -0.030671635642647743, -0.07104440778493881, -0.051386840641498566, -0.036999255418777466, 0.001980800414457917, 0.037491604685783386, 0.005169684067368507, 0.00958260614424944, -0.014114057645201683, -0.03858571872115135, 0.03938806802034378, -0.014861701987683773, -0.020879322662949562, -0.0024298427160829306, -0.03876807168126106, -0.014442292042076588, 0.034154560416936874, -0.019001096487045288, -0.006733353715389967, 0.05233507230877876, -0.0061315917409956455, 0.0790679007768631, -0.03355279937386513, -0.021918730810284615, -0.0615256205201149, 0.03935159742832184, 0.02913987636566162, -0.058498576283454895, 0.010202604345977306, -0.0210434403270483, 0.06670442223548889, -0.03818454593420029, 0.03313338756561279, 0.0007322579622268677, -0.02250225841999054, -0.004326305352151394, 0.014205234125256538, 0.061306800693273544, 0.04299864172935486, -0.02631341852247715, -0.02864752523601055, 0.009026432409882545, 0.05280919000506401, 0.001549993408843875, -0.0019078595796599984, -0.00809643603861332, 0.011862008832395077, 0.011415245942771435, -0.05164213478565216, 0.010667601600289345, -0.029048699885606766, 0.01985815167427063, -0.06236444413661957, -0.022301670163869858, 0.010084074921905994, 0.016439048573374748, -0.04354569688439369, 0.02168167382478714, 0.026021655648946762, 0.015454346314072609, -0.028228115290403366, 0.03045281209051609, -0.06043151021003723, 0.018472274765372276, -0.026860475540161133, 0.010749660432338715, 0.0223381407558918, 0.013293473049998283, -0.030653400346636772, 0.017989041283726692, 0.041612766683101654, -0.02266637422144413, 0.041466884315013885, 0.02616753615438938, 0.023796958848834038, -0.03710866719484329, -0.0009214482852257788, 0.05131389945745468, -0.0045177750289440155, -0.037345726042985916, 0.01706816256046295, -0.058644458651542664, 0.05277271941304207, 0.015290229581296444, 0.008438346907496452, -0.013156709261238575, 0.019420506432652473, -0.04350922629237175, 0.042269233614206314, -0.02877517230808735, -0.02930399402976036, 0.006268355995416641, -0.03327926993370056, -0.05375742167234421, 0.06272915005683899, 0.059665631502866745, 0.03127339854836464, 0.039461009204387665, 0.02748047187924385, -0.0015990006504580379 ]
717,515
pytorch_optimizer.optimizer.shampoo_utils
PreConditioner
Compute statistics & shape from gradients for preconditioning. :param var: torch.Tensor. variable. :param beta2: float. beta2. :param inverse_exponent_override: int. override inv exp. :param block_size: int. size of block. :param skip_preconditioning_rank_lt: int. skip low-rank parameter. :param no_preconditioning_for_layers_with_dim_gt: int. skip large size of dim of parameter. :param shape_interpretation: bool. reshaping parameter. :param pre_conditioner_type: int. type of pre-conditioner. :param matrix_eps: float. epsilon of matrix. :param use_svd: bool. use SVD instead of Schur-Newton method to calculate M^{-1/p}.
class PreConditioner: r"""Compute statistics & shape from gradients for preconditioning. :param var: torch.Tensor. variable. :param beta2: float. beta2. :param inverse_exponent_override: int. override inv exp. :param block_size: int. size of block. :param skip_preconditioning_rank_lt: int. skip low-rank parameter. :param no_preconditioning_for_layers_with_dim_gt: int. skip large size of dim of parameter. :param shape_interpretation: bool. reshaping parameter. :param pre_conditioner_type: int. type of pre-conditioner. :param matrix_eps: float. epsilon of matrix. :param use_svd: bool. use SVD instead of Schur-Newton method to calculate M^{-1/p}. """ def __init__( self, var: torch.Tensor, beta2: float, inverse_exponent_override: int, block_size: int, skip_preconditioning_rank_lt: int, no_preconditioning_for_layers_with_dim_gt: int, shape_interpretation: bool, pre_conditioner_type: int, matrix_eps: float = 1e-6, use_svd: bool = False, ): self.beta2 = beta2 self.inverse_exponent_override = inverse_exponent_override self.skip_preconditioning_rank_lt = skip_preconditioning_rank_lt self.no_preconditioning_for_layers_with_dim_gt = no_preconditioning_for_layers_with_dim_gt self.pre_conditioner_type = pre_conditioner_type self.matrix_eps = matrix_eps self.use_svd = use_svd self.w2: float = 1.0 if self.beta2 == 1.0 else (1.0 - self.beta2) self.original_shape: List[int] = var.shape self.transformed_shape: List[int] = ( merge_small_dims(self.original_shape, block_size) if shape_interpretation else var.shape ) self.should_precondition_dims: List[bool] = self.get_should_precondition_dims() self.rank: int = sum(self.should_precondition_dims) self.exponent_for_pre_conditioner: int = ( self.inverse_exponent_override if self.inverse_exponent_override > 0 else 2 * self.rank ) self.statistics: Union[List[torch.Tensor], torch.Tensor] = [] self.pre_conditioners: Union[List[torch.Tensor], torch.Tensor] = [] self.is_same_shapes: bool = False if len(self.transformed_shape) > 1 and not self.skip_precondition(var): self.partitioner = BlockPartitioner( var=torch.reshape(var, self.transformed_shape), rank=self.rank, block_size=block_size, pre_conditioner_type=self.pre_conditioner_type, ) shapes: List[Optional[List[int]]] = self.partitioner.shapes_for_pre_conditioners() self.statistics = [self.matrix_eps * torch.eye(shape[0], device=var.device) for shape in shapes if shape] self.pre_conditioners = [torch.eye(shape[0], device=var.device) for shape in shapes if shape] self.is_same_shapes = None not in shapes and len(np.unique(shapes)) == 1 if self.is_same_shapes: self.statistics = torch.stack(self.statistics, dim=0) self.pre_conditioners = torch.stack(self.pre_conditioners, dim=0) def get_should_precondition_dims(self) -> List[bool]: r"""Get pre-condition dimensions by the type of conditioner.""" if self.pre_conditioner_type == PreConditionerType.ALL or len(self.transformed_shape) <= 1: return [True] * len(self.transformed_shape) if self.pre_conditioner_type == PreConditionerType.INPUT: return [True] * (len(self.transformed_shape) - 1) + [False] if self.pre_conditioner_type == PreConditionerType.OUTPUT: return [False] * (len(self.transformed_shape) - 1) + [True] raise ValueError def skip_precondition(self, x: torch.Tensor) -> bool: return (len(x.shape) < self.skip_preconditioning_rank_lt) or any( dim > self.no_preconditioning_for_layers_with_dim_gt for dim in x.shape ) def add_statistics(self, grad: torch.Tensor): r"""Compute statistics from gradients and add to the correct state entries. :param grad: torch.Tensor. gradient to compute statistics from. """ if len(self.statistics) == 0: return reshaped_grad: torch.Tensor = torch.reshape(grad, self.transformed_shape) partitioned_grads: List[torch.Tensor] = self.partitioner.partition(reshaped_grad) for j in range(len(partitioned_grads)): partitioned_grad: torch.Tensor = partitioned_grads[j] for i in range(self.rank): axes: List[int] = [ax for ax in range(partitioned_grad.ndim) if ax != i] stat: torch.Tensor = torch.tensordot(partitioned_grad, partitioned_grad, dims=[axes, axes]) self.statistics[j * self.rank + i].mul_(self.beta2).add_(stat, alpha=self.w2) def compute_pre_conditioners(self): r"""Compute L^{-1/exp} for each stats matrix L. If `self.use_svd` is enabled and where all shapes of statistics & pre-conditioners are same, perform batch SVD. else, SVD one by one. If `self.use_svd` is disabled, use Schur-Newton method, which is usually much faster. """ if self.use_svd and self.is_same_shapes: self.pre_conditioners = compute_power_svd(matrix=self.statistics, power=self.exponent_for_pre_conditioner) return for i, statistic in enumerate(self.statistics): self.pre_conditioners[i] = ( compute_power_svd(matrix=statistic, power=self.exponent_for_pre_conditioner) if self.use_svd else compute_power_schur_newton( mat_g=statistic, p=self.exponent_for_pre_conditioner, ridge_epsilon=self.matrix_eps ) ) @staticmethod def precondition_block( partitioned_grad: torch.Tensor, should_preconditioned_dims: List[bool], pre_conditioners_for_grad: List[torch.Tensor], ) -> torch.Tensor: r"""Perform a preconditioning operation on a single gradient block. Loop invariant: the dimension to be preconditioned is first We keep all axes in the same cyclic order they were originally. """ rank: int = len(partitioned_grad.shape) roll: Tuple[int, ...] = (*tuple(range(1, rank)), 0) i: int = 0 for should_precondition_dim in should_preconditioned_dims: if not should_precondition_dim: partitioned_grad = torch.permute(partitioned_grad, roll) continue partitioned_grad = torch.tensordot(partitioned_grad, pre_conditioners_for_grad[i], dims=[[0], [0]]) i += 1 return partitioned_grad def preconditioned_grad(self, grad: torch.Tensor) -> torch.Tensor: r"""Precondition the gradient. :param grad: torch.Tensor. a gradient tensor to precondition. """ if len(self.pre_conditioners) == 0: return grad reshaped_grad = torch.reshape(grad, self.transformed_shape) partitioned_grads = self.partitioner.partition(reshaped_grad) pre_cond_partitioned_grads: List[torch.Tensor] = [ self.precondition_block( partitioned_grad, self.should_precondition_dims, self.pre_conditioners[i * self.rank:(i + 1) * self.rank] # fmt: skip ) for i, partitioned_grad in enumerate(partitioned_grads) ] merged_grad = self.partitioner.merge_partitions(pre_cond_partitioned_grads) return torch.reshape(merged_grad, self.original_shape)
(var: torch.Tensor, beta2: float, inverse_exponent_override: int, block_size: int, skip_preconditioning_rank_lt: int, no_preconditioning_for_layers_with_dim_gt: int, shape_interpretation: bool, pre_conditioner_type: int, matrix_eps: float = 1e-06, use_svd: bool = False)
[ -0.02216182090342045, -0.03977610170841217, -0.03050229139626026, 0.026490923017263412, 0.05028112232685089, -0.007719899993389845, -0.03699594363570213, -0.044283926486968994, -0.038048431277275085, -0.0028372493106871843, 0.01351354829967022, -0.008985863998532295, -0.00675677414983511, 0.019232727587223053, -0.04738181456923485, 0.04158320277929306, 0.007506423629820347, 0.0014186246553435922, 0.030343426391482353, -0.030184559524059296, -0.05004282295703888, -0.07188691198825836, 0.0003971652768086642, 0.0645790696144104, -0.000293995370157063, 0.006051805801689625, -0.005510667804628611, -0.022936293855309486, -0.015529162250459194, 0.008027702569961548, -0.02484268695116043, 0.007382309529930353, 0.01322560291737318, -0.018696554005146027, 0.04158320277929306, -0.00255178683437407, 0.03308386728167534, 0.0383264496922493, -0.08809125423431396, 0.007000037934631109, -0.011547580361366272, -0.05937620624899864, 0.031376056373119354, -0.02079160138964653, -0.015568878501653671, 0.02138734981417656, -0.005292227026075125, 0.000528415956068784, 0.004572364967316389, -0.004324136767536402, 0.046547770500183105, -0.05325986072421074, 0.05699321627616882, 0.0012920282315462828, -0.04980452358722687, 0.003189733484759927, 0.06569113582372665, -0.007446848787367344, 0.010614241473376751, -0.05012225732207298, 0.053815893828868866, -0.011756091378629208, -0.012331981211900711, -0.00795819889754057, -0.01896464079618454, -0.016075264662504196, -0.029946260154247284, -0.025895174592733383, -0.004291866905987263, 0.011219918727874756, -0.02865547314286232, -0.007124152034521103, 0.030998749658465385, 0.007744722533971071, -0.010505021549761295, -0.06342729181051254, 0.009095084853470325, -0.06215636432170868, 0.02684837207198143, -0.0666046142578125, 0.031018607318401337, 0.03514912724494934, -0.029191646724939346, -0.034017205238342285, 0.033798765391111374, -0.05746981501579285, 0.032031379640102386, 0.025319285690784454, 0.029390228912234306, -0.04829529672861099, -0.03143563121557236, 0.03193208575248718, 0.053180430084466934, 0.043727897107601166, 0.04009383171796799, 0.048136431723833084, -0.015449728816747665, -0.06521453708410263, 0.012808579951524734, -0.0423775352537632, -0.0005343114025890827, 0.05226694792509079, -0.004160305950790644, 0.013563193380832672, 0.015628453344106674, -0.01343411486595869, -0.055642854422330856, -0.008792245760560036, 0.0038599499966949224, -0.09118914604187012, -0.03941865265369415, -0.04809671267867088, -0.05067828670144081, -0.03369947150349617, 0.02061287686228752, -0.03953780233860016, -0.06553226709365845, -0.019729183986783028, -0.012838367372751236, 0.03669806942343712, 0.04202008619904518, -0.0006308101583272219, -0.039220068603754044, 0.03111789934337139, -0.05024140700697899, -0.0017016049241647124, 0.05393504351377487, 0.04897047579288483, 0.02039443701505661, -0.09174517542123795, -0.029151929542422295, 0.006329821422696114, -0.01674051582813263, 0.03790942579507828, 0.010842612013220787, -0.03761155158281326, -0.01333482377231121, 0.014238374307751656, 0.004373782314360142, -0.012838367372751236, 0.04297327995300293, -0.0036464736331254244, -0.02724553644657135, 0.008261037059128284, 0.0024649070110172033, -0.03282570838928223, 0.04758039861917496, -0.030323568731546402, 0.012083753012120724, -0.019540531560778618, 0.027404403313994408, -0.0028794482350349426, 0.017902223393321037, -0.06958335638046265, -0.0014409652212634683, -0.017306476831436157, -0.031773220747709274, -0.0323491096496582, 0.02224125526845455, -0.022360404953360558, -0.07363443821668625, -0.0727606788277626, -0.04523712396621704, 0.009392958134412766, -0.006935498211532831, 0.014973130077123642, 0.027126386761665344, -0.04503853991627693, -0.031574636697769165, 0.060448553413152695, 0.06787554174661636, -0.0483747273683548, 0.005485845264047384, 0.042298100888729095, -0.09651116281747818, 0.04865274578332901, 0.025895174592733383, 0.005972372833639383, -0.05913790687918663, -0.027960434556007385, 0.05079743638634682, -0.01715753972530365, -0.04666692018508911, -0.028715047985315323, -0.023075301200151443, 0.02359161712229252, 0.020890893414616585, -0.033401597291231155, 0.037055518478155136, 0.04253640025854111, -0.07180748134851456, -0.029926402494311333, 0.03365975618362427, 0.017236972227692604, 0.012957517057657242, 0.006736915558576584, 0.03955766186118126, 0.015509303659200668, 0.03570515662431717, -0.03475195914506912, -0.01231212355196476, -0.0008346676477231085, 0.03713495284318924, 0.02061287686228752, -0.03367961570620537, -0.010743319988250732, -0.017296547070145607, 0.05739038065075874, 0.011180202476680279, 0.0146454693749547, -0.0888855829834938, -0.0040064044296741486, 0.029191646724939346, 0.07716920971870422, 0.022261112928390503, -0.06310956180095673, 0.043489597737789154, 0.03719452768564224, 0.01698874495923519, 0.0010897221509367228, 0.014278091490268707, -0.020632736384868622, -0.04523712396621704, 0.007938340306282043, -0.00594754982739687, -0.004835486877709627, -0.011170272715389729, -0.020334862172603607, 0.035824306309223175, -0.01058445405215025, 0.007501458749175072, -0.030164701864123344, -0.019461097195744514, -0.007709970697760582, 0.027324970811605453, 0.02506112866103649, -0.043529313057661057, 0.003487607464194298, 0.013890855014324188, -0.008355364203453064, -0.02847674861550331, -0.03610232099890709, -0.0001892740692710504, 0.015350437723100185, 0.03469238430261612, -0.019103650003671646, 0.05429249256849289, 0.03920021280646324, -0.0038822905626147985, 0.024326372891664505, -0.07315783947706223, -0.030204419046640396, -0.039478227496147156, -0.005411376710981131, -0.032984573394060135, -0.011805737391114235, 0.052187517285346985, 0.027920717373490334, 0.047500964254140854, -0.0201859250664711, -0.00594754982739687, -0.05270383134484291, -0.006990108639001846, 0.009035510011017323, -0.007273088674992323, -0.01492348499596119, 0.02988668531179428, 0.04762011393904686, 0.005669534206390381, 0.01674051582813263, 0.06414218991994858, 0.09396930038928986, -0.038247015327215195, 0.0006028844509273767, -0.008836926892399788, 0.011358927004039288, -0.03475195914506912, 0.014496532268822193, 0.022479554638266563, 0.017068177461624146, 0.054213058203458786, -0.01975897140800953, -0.0544910728931427, 0.006220601033419371, 0.005505703389644623, 0.013602910563349724, -0.042099516838788986, -0.06704149395227432, 0.024564672261476517, 0.012987304478883743, 0.007059612777084112, -0.013851138763129711, 0.0665648952126503, -0.02343275025486946, 0.05333929508924484, -0.03929950296878815, 0.00978515949100256, 0.013831280171871185, -0.0014235891867429018, -0.05024140700697899, 0.06914646923542023, -0.010812824591994286, 0.03526827692985535, 0.0022117141634225845, -0.03548671677708626, -0.024783112108707428, 0.03111789934337139, 0.023949066177010536, -0.007054647896438837, -0.04928820952773094, 0.02647106535732746, 0.003269166685640812, 0.023254025727510452, 0.015817105770111084, 0.05369674414396286, -0.07518338412046432, 0.004592223558574915, -0.025716450065374374, 0.03250797837972641, 0.07967135310173035, 0.0010878604371100664, 0.04539598897099495, 0.04897047579288483, 0.06843157857656479, -0.040669724345207214, -0.04559457302093506, 0.03818744048476219, -0.01715753972530365, -0.05028112232685089, 0.012014249339699745, -0.05020168796181679, 0.007650395855307579, 0.029032781720161438, 0.03387819603085518, -0.031594496220350266, 0.0029415052849799395, 0.04337044805288315, 0.011954674497246742, 0.019530601799488068, -0.0544513575732708, 0.08181604743003845, -0.003959241323173046, -0.01040572952479124, 0.044720809906721115, -0.009646151214838028, -0.05310099571943283, 0.0363803394138813, 0.019639821723103523, -0.020106490701436996, 0.11597225815057755, -0.00685606524348259, 0.02055330201983452, -0.016621366143226624, 0.08157774806022644, 0.03898176923394203, -0.02666964754462242, -0.03274627774953842, -0.04758039861917496, 0.030959032475948334, 0.00028639339143410325, 0.06708121299743652, 0.047342099249362946, -0.011110697872936726, 0.0646585077047348, 0.03860446438193321, -0.03870375454425812, -0.012729146517813206, 0.007387273944914341, -0.007039754185825586, -0.050996020436286926, 0.017078107222914696, -0.04519740864634514, 0.01292772963643074, -0.01632349193096161, -0.015271004289388657, -0.0202157124876976, -0.04400591179728508, 0.016462499275803566, 0.028417173773050308, 0.04134490340948105, 0.038088150322437286, 0.003661367343738675, -0.025934891775250435, 0.0071340808644890785, -0.004150377120822668, 0.005217758473008871, -0.011140485294163227, -0.023869631811976433, 0.043727897107601166, -0.03272641822695732, 0.028933489695191383, 0.005917762406170368, 0.031594496220350266, -0.005441164132207632, -0.05715208128094673, 0.033600181341171265, 0.04341016337275505, 0.06322871148586273, -0.019252585247159004, -0.03653920441865921, -0.017614278942346573, -0.057191796600818634, 0.011090840213000774, 0.024366088211536407, -0.012600068002939224, -0.07327698916196823, 0.03749240189790726, 0.0706557035446167, 0.009735513478517532, 0.10111827403306961, -0.007938340306282043, 0.012520634569227695, -0.014893697574734688, 0.013374540023505688, -0.032428544014692307, -0.013801492750644684, 0.017812862992286682, 0.005143290385603905, 0.03918035328388214, 0.015032704919576645, 0.03284556791186333, 0.02277742698788643, 0.08832955360412598, 0.01655186153948307, -0.05333929508924484, 0.0201958529651165, -0.07728835940361023, 0.03872361406683922, -0.07816212624311447, 0.0013664967846125364, 0.004785841330885887, -0.02382991649210453, -0.022320687770843506, -0.011766021139919758, -0.019897980615496635, -0.0011548821348696947, 0.016710728406906128, 0.043489597737789154, -0.018041232600808144, -0.007570962887257338, 0.043132148683071136, 0.00444080401211977, 0.01734619215130806, -0.009805017150938511, -0.015896540135145187, 0.014804335311055183, -0.028576040640473366, 0.0009805017616599798, -0.08034653216600418, 0.012192973867058754, 0.0034181035589426756, 0.02686822973191738, 0.057628680020570755, 0.025954749435186386, -0.032785993069410324, 0.01878591626882553, -0.02909235469996929, -0.02661007270216942, -0.013801492750644684, 0.0011437118519097567, 0.023333460092544556, 0.04615060240030289, -0.07847985625267029, 0.020275287330150604, 0.018468184396624565, 0.034235645085573196, 0.03820730000734329, -0.0202157124876976, -0.013801492750644684, 0.015261075459420681, 0.02605404146015644, -0.03264698386192322, 0.008817069232463837, 0.004130518529564142, -0.055603135377168655, 0.01575753092765808, -0.012639784254133701, 0.04059028998017311, 0.012669571675360203, 0.0002145623293472454, 0.02863561548292637, -0.008826998062431812, -0.029767535626888275, 0.03193208575248718, 0.02162564918398857, -0.031395915895700455, 0.0006615283782593906, 0.04619032144546509, 0.009621328674256802, 0.028814340010285378, -0.054808806627988815, -0.03818744048476219, 0.08737635612487793, 0.03006540983915329, -0.029628528282046318, -0.0034404441248625517, -0.017852578312158585, -0.0131263118237257, 0.10620199143886566, -0.05484852194786072, 0.02661007270216942, 0.017822790890932083, -0.0685904398560524, 0.008504301309585571, 0.028357598930597305, -0.024524955078959465, 0.005128396674990654, 0.03771084174513817, -0.0036092393565922976, -0.012351839803159237, 0.00876742321997881, -0.02136749029159546, 0.008156782016158104, -0.0022055082954466343, -0.008241179399192333, 0.005565278232097626, 0.007203585002571344, 0.05568256974220276, 0.0023209345526993275, -0.03910091891884804, 0.021665364503860474, 0.0342753641307354, -0.004026263020932674, -0.026391630992293358, 0.012858225032687187, 0.06009110435843468, 0.016224201768636703, -0.03377890586853027, 0.05401447415351868, -0.0017202220624312758, -0.03659877926111221, -0.022340545430779457, 0.0292909387499094, 0.049963388592004776, 0.01960010640323162, -0.0037209419533610344, 0.012113540433347225, -0.0016916757449507713, -0.05826414376497269, -0.03508955240249634, 0.021744798868894577, 0.022340545430779457, 0.03769098222255707, -0.03167393058538437, -0.030323568731546402, 0.01879584603011608, 0.03552643209695816, 0.026927804574370384, -0.09778209030628204, -0.017217114567756653, -0.03322287276387215, 0.0027056883554905653, -0.021248342469334602, -0.017425626516342163, 0.06974221765995026, 0.016869595274329185, 0.00857380498200655, 0.01484405156224966, 0.014198658056557178, 0.04023284092545509, -0.027384545654058456, -0.041464053094387054, 0.05123431980609894, -0.047342099249362946, -0.02343275025486946, -0.004689032211899757, -0.001062417053617537, -0.006324857007712126, -0.03931936249136925, 0.008007844910025597, 0.023690907284617424, -0.007705006282776594, 0.017872435972094536, 0.020275287330150604, -0.018080947920680046, -0.012331981211900711, 0.025696592405438423, -0.04134490340948105, -0.023532042279839516, -0.027722135186195374, 0.03880304470658302, -0.05941592529416084, 0.016075264662504196, -0.03375904634594917, -0.009248985908925533, 0.010505021549761295, -0.06338757276535034, 0.053180430084466934, 0.016422783955931664, 0.04404562711715698, -0.007809261791408062, 0.04102717339992523, -0.004761018790304661, -0.04797756299376488, 0.02301572635769844, -0.012560351751744747, 0.007938340306282043, -0.017117822542786598, 0.007024860475212336, 0.041305188089609146, -0.03747254237532616, -0.015499374829232693, 0.03588388115167618, 0.008161745965480804, -0.010981619358062744, -0.09396930038928986, -0.004200022667646408, 0.036022890359163284, 0.041305188089609146, -0.07172804325819016, -0.013295107521116734, 0.007139045745134354, -0.0012318328954279423, -0.00046201489749364555, -0.036678213626146317, -0.046508051455020905, -0.07847985625267029, 0.013066736981272697, 0.11756091564893723, 0.028000151738524437, -0.012073824182152748, 0.02684837207198143, 0.003338670590892434, -0.003199662547558546, 0.00656315591186285, -0.022082388401031494, 0.046746350824832916, -0.14663341641426086, 0.006136203184723854, -0.03977610170841217, 0.019669609144330025, 0.031157614663243294, 0.04273498058319092, -0.005081233102828264, -0.015449728816747665, -0.0262129083275795, 0.039458367973566055, 0.012520634569227695, -0.01998734101653099, -0.056000303477048874, 0.009065297432243824, -0.006230529863387346, 0.016661083325743675, 0.004046121146529913, -0.0105943838134408, -0.011954674497246742, 0.020950468257069588, -0.0383463054895401, 0.08229264616966248, 0.041066888719797134, -0.043291013687849045, 0.06426133960485458, -0.02887391485273838, -0.024505097419023514, -0.013960358686745167, 0.05429249256849289, 0.004103213548660278, 0.027384545654058456, -0.00269824150018394, -0.006022018380463123, 0.03800871595740318, -0.02686822973191738, -0.010217076167464256, 0.014387311413884163, -0.024505097419023514, 0.022638419643044472, 0.02484268695116043, 0.014903626404702663, 0.014288020320236683, -0.005659604910761118, -0.04301299899816513, 0.005907833110541105, -0.03586402162909508, -0.049367643892765045, 0.05572228506207466, -0.011676658876240253, -0.008246143348515034, -0.03649948909878731, -0.04742153361439705, -0.013801492750644684, 0.06235494464635849, 0.01893485337495804, -0.027086671441793442, 0.04122575372457504, 0.043886762112379074, -0.005729109048843384, -0.04261583462357521, -0.03451365977525711, -0.027106529101729393, -0.0021049759816378355, -0.014695114456117153, 0.016819948330521584, 0.04829529672861099, -0.00231845211237669, 0.015082350932061672, -0.04984423890709877, -0.03393777087330818, 0.006300034001469612, 0.014367453753948212, -0.04583287239074707, 0.004589741118252277, -0.06747838109731674, -0.05889960750937462, 0.014010004699230194, -0.0292909387499094, 0.055245690047740936, -0.026570355519652367, -0.009854663163423538, 0.02847674861550331, 0.0004154721100348979, 0.026490923017263412, 0.04523712396621704, 0.04202008619904518, -0.05929677560925484, -0.0005855084746144712, 0.0008061213884502649, 0.009060332551598549, -0.0011362649966031313, -0.01484405156224966, 0.028397316113114357, 0.013672414235770702, 0.05020168796181679, -0.0028223556000739336, 0.008275930769741535, -0.07359472662210464, -0.014238374307751656, 0.06886845827102661, -0.08253094553947449, 0.0031376054976135492, -0.02077174372971058, 0.05568256974220276, 0.03659877926111221, -0.02680865488946438, -0.003996475599706173, 0.034990258514881134, -0.037015803158283234, 0.053815893828868866, -0.00680641969665885, -0.058025844395160675, 0.061084017157554626, 0.05302156135439873, 0.0019237692467868328, -0.057231515645980835, -0.026987379416823387, 0.006235494744032621, 0.03719452768564224, -0.0067220223136246204, -0.017644066363573074, 0.03981581702828407, -0.026729222387075424, 0.05874074250459671, -0.021903663873672485, -0.03407678008079529, -0.030581725761294365, 0.04924849420785904, -0.02281714417040348, 0.04182150214910507, -0.061679765582084656, -0.07371387630701065, -0.09142744541168213, 0.008186569437384605, -0.04619032144546509, 0.01189509965479374, 0.0384058803319931, -0.018607191741466522, 0.013136240653693676, 0.003954276442527771, 0.01854761689901352 ]
717,516
pytorch_optimizer.optimizer.shampoo_utils
__init__
null
def __init__( self, var: torch.Tensor, beta2: float, inverse_exponent_override: int, block_size: int, skip_preconditioning_rank_lt: int, no_preconditioning_for_layers_with_dim_gt: int, shape_interpretation: bool, pre_conditioner_type: int, matrix_eps: float = 1e-6, use_svd: bool = False, ): self.beta2 = beta2 self.inverse_exponent_override = inverse_exponent_override self.skip_preconditioning_rank_lt = skip_preconditioning_rank_lt self.no_preconditioning_for_layers_with_dim_gt = no_preconditioning_for_layers_with_dim_gt self.pre_conditioner_type = pre_conditioner_type self.matrix_eps = matrix_eps self.use_svd = use_svd self.w2: float = 1.0 if self.beta2 == 1.0 else (1.0 - self.beta2) self.original_shape: List[int] = var.shape self.transformed_shape: List[int] = ( merge_small_dims(self.original_shape, block_size) if shape_interpretation else var.shape ) self.should_precondition_dims: List[bool] = self.get_should_precondition_dims() self.rank: int = sum(self.should_precondition_dims) self.exponent_for_pre_conditioner: int = ( self.inverse_exponent_override if self.inverse_exponent_override > 0 else 2 * self.rank ) self.statistics: Union[List[torch.Tensor], torch.Tensor] = [] self.pre_conditioners: Union[List[torch.Tensor], torch.Tensor] = [] self.is_same_shapes: bool = False if len(self.transformed_shape) > 1 and not self.skip_precondition(var): self.partitioner = BlockPartitioner( var=torch.reshape(var, self.transformed_shape), rank=self.rank, block_size=block_size, pre_conditioner_type=self.pre_conditioner_type, ) shapes: List[Optional[List[int]]] = self.partitioner.shapes_for_pre_conditioners() self.statistics = [self.matrix_eps * torch.eye(shape[0], device=var.device) for shape in shapes if shape] self.pre_conditioners = [torch.eye(shape[0], device=var.device) for shape in shapes if shape] self.is_same_shapes = None not in shapes and len(np.unique(shapes)) == 1 if self.is_same_shapes: self.statistics = torch.stack(self.statistics, dim=0) self.pre_conditioners = torch.stack(self.pre_conditioners, dim=0)
(self, var: torch.Tensor, beta2: float, inverse_exponent_override: int, block_size: int, skip_preconditioning_rank_lt: int, no_preconditioning_for_layers_with_dim_gt: int, shape_interpretation: bool, pre_conditioner_type: int, matrix_eps: float = 1e-06, use_svd: bool = False)
[ 0.0260584969073534, -0.040416449308395386, -0.01091720163822174, 0.014248881489038467, 0.034942977130413055, -0.01139315590262413, -0.04632621631026268, -0.028200291097164154, -0.06909269839525223, 0.014367870055139065, -0.010029744356870651, 0.01571640744805336, -0.07194842398166656, 0.021616255864501, -0.05529002100229263, 0.05798709765076637, 0.017957357689738274, 0.0013101137010380626, 0.02556271106004715, -0.007045114878565073, -0.03432820364832878, -0.029747141525149345, -0.035597413778305054, 0.05965293571352959, 0.00035603612195700407, 0.0295884907245636, -0.010887454263865948, -0.04489835351705551, -0.0017327710520476103, 0.01028259564191103, -0.028874559327960014, -0.01355478074401617, 0.017104607075452805, 0.03837381303310394, 0.04731778800487518, -0.008160633035004139, 0.023222602903842926, 0.068061463534832, -0.08955872803926468, 0.005944470409303904, 0.011978182941675186, -0.07345560938119888, 0.05659889429807663, -0.021318785846233368, -0.03018343448638916, 0.017154185101389885, 0.03165096044540405, -0.008948932401835918, -0.01673772558569908, -0.002900346415117383, 0.022548334673047066, -0.06643528491258621, 0.0820227861404419, 0.005656914785504341, -0.08099155128002167, 0.0023103614803403616, 0.07147246599197388, 0.008582050912082195, -0.031095679849386215, -0.0037134350277483463, -0.0033118485007435083, -0.007025283295661211, -0.01976201869547367, -0.001897619804367423, -0.045413970947265625, -0.01716410182416439, -0.051839351654052734, -0.006455129943788052, -0.006207237020134926, 0.04910261556506157, 0.005468516144901514, 0.0011173770762979984, 0.027407033368945122, 0.05100643262267113, 0.003926622681319714, -0.03363410383462906, -0.016410507261753082, -0.047436777502298355, 0.03549825772643089, -0.06187405437231064, 0.025106588378548622, 0.02720871940255165, -0.03623202070593834, -0.02173524536192417, 0.010441247373819351, -0.05350519344210625, 0.04228060320019722, 0.0499751977622509, 0.04807138070464134, -0.03476449474692345, -0.05298957601189613, 0.0155775872990489, 0.06484877318143845, 0.03894892334938049, 0.020783336833119392, 0.05318789184093475, 0.02123945951461792, -0.07484380900859833, 0.022925131022930145, -0.0683787614107132, -0.011690626852214336, 0.03500247001647949, -0.01205750834196806, 0.026217147707939148, -0.04303419962525368, 0.020882494747638702, -0.031551800668239594, 0.011472481302917004, -0.04711947217583656, -0.056757546961307526, -0.020803168416023254, -0.008953889831900597, -0.07607335597276688, 0.028596919029951096, -0.02998511865735054, -0.048309359699487686, -0.036965783685445786, 0.00492810970172286, 0.012275653891265392, 0.020347045734524727, 0.0012729298323392868, 0.03075854480266571, -0.06064450740814209, 0.014566184021532536, -0.04299453645944595, -0.0009320771205238998, 0.062231022864580154, 0.010748634114861488, 0.00201784772798419, -0.04188397526741028, -0.023044118657708168, -0.03726325184106827, -0.040138810873031616, 0.06718888133764267, 0.005825481843203306, -0.04283588379621506, 0.0008415962220169604, 0.005845313426107168, 0.007441743277013302, 0.015329694375395775, 0.04017847403883934, -0.021933559328317642, -0.025324733927845955, -0.020644517615437508, -0.04132869467139244, -0.022151704877614975, 0.054338112473487854, -0.07591471076011658, 0.013227562420070171, -0.019385220482945442, -0.00732771260663867, 0.0119186881929636, 0.009910755790770054, -0.029370345175266266, 0.0028978674672544003, 0.0014972728677093983, 0.004352998454123735, -0.07361426204442978, 0.03276151791214943, -0.0001388200034853071, -0.06615764647722244, -0.03026275895535946, -0.01839364878833294, 0.0018096178537234664, 0.0010033462895080447, 0.021021313965320587, -0.0016051061684265733, -0.043232511729002, -0.02401585876941681, 0.02470996044576168, 0.011254335753619671, -0.03103618510067463, -0.009062962606549263, 0.038869600743055344, -0.05814574658870697, 0.0568765364587307, 0.01240455824881792, -0.017808621749281883, -0.038591958582401276, -0.04458105191588402, 0.030064444988965988, -0.008150717243552208, -0.037521060556173325, -0.009598411619663239, -0.03228556364774704, 0.03165096044540405, 0.045413970947265625, -0.028696076944470406, 0.02778383158147335, 0.0244124885648489, -0.043787792325019836, -0.004283588379621506, 0.011502228677272797, 0.03365393355488777, 0.014833908528089523, 0.012196328490972519, 0.05620226636528969, -0.000030424975193454884, 0.009028257802128792, -0.0290133785456419, -0.009335644543170929, -0.010580066591501236, 0.004816558212041855, 0.023103613406419754, -0.0070599885657429695, 0.00392910186201334, -0.015180958434939384, 0.06211203336715698, -0.018879519775509834, 0.011591469869017601, -0.07849279046058655, -0.008582050912082195, 0.06556270271539688, 0.05842338874936104, 0.056757546961307526, -0.0907486155629158, 0.020783336833119392, 0.044343072921037674, 0.019781850278377533, 0.019325727596879005, 0.05842338874936104, -0.021497268229722977, -0.07321763038635254, 0.034367866814136505, -0.003450668416917324, 0.013177984394133091, 0.013713432475924492, -0.03067922033369541, 0.01416955515742302, 0.00466038566082716, -0.02921169437468052, -0.0012289287988096476, -0.032325226813554764, -0.008254831656813622, 0.019077833741903305, 0.04902328923344612, -0.03424887731671333, -0.012285569682717323, -0.0330391600728035, -0.019930586218833923, -0.004134852904826403, -0.04688149690628052, 0.020029742270708084, 0.007055030670017004, 0.007169061340391636, -0.03920673206448555, 0.03950420394539833, 0.031551800668239594, -0.004221615381538868, 0.004020822234451771, -0.07210707664489746, -0.03783836588263512, -0.008130885660648346, 0.025919675827026367, -0.012612788006663322, -0.039563700556755066, 0.03026275895535946, 0.007773919962346554, 0.03420921415090561, -0.04700048640370369, -0.01744174025952816, -0.04485869035124779, -0.011194841004908085, 0.03161129727959633, 0.0057957349345088005, -0.016826966777443886, -0.0029697564896196127, 0.0420822910964489, 0.04941992089152336, 0.025642037391662598, 0.08130885660648346, 0.07750122249126434, -0.005899849813431501, -0.0034878524020314217, 0.008904310874640942, -0.006901336833834648, -0.02526523917913437, 0.0060882484540343285, 0.024670297279953957, 0.03881010413169861, 0.020723842084407806, -0.01854238472878933, -0.055409010499715805, 0.0035696569830179214, 0.01926623284816742, 0.0027590475510805845, -0.0557263121008873, -0.077263243496418, 0.024471983313560486, -0.03192859888076782, -0.01666831597685814, 0.007387206889688969, 0.06163607910275459, 0.021556762978434563, 0.022231031209230423, -0.032523542642593384, -0.030619725584983826, 0.04834902286529541, 0.018274661153554916, -0.027446696534752846, 0.029172031208872795, -0.024055521935224533, 0.029925625771284103, 0.025027262046933174, 0.013247394002974033, -0.022369850426912308, 0.02478928491473198, 0.023044118657708168, 0.02950916439294815, -0.010302427224814892, 0.05957360938191414, 0.03555775061249733, 0.03266236186027527, 0.022825973108410835, 0.07218639552593231, -0.00999503955245018, 0.01981159672141075, -0.026375800371170044, 0.012860680930316448, 0.1042339876294136, 0.015002475120127201, -0.009400096721947193, 0.015528008341789246, 0.045215655118227005, -0.04343082755804062, -0.06853741407394409, 0.031095679849386215, -0.0545760914683342, -0.03769954666495323, 0.02461080253124237, -0.05298957601189613, 0.003596925176680088, 0.033891912549734116, 0.03641050308942795, -0.07270201295614243, -0.033376295119524, 0.009786809794604778, 0.024293499067425728, 0.022825973108410835, -0.03458601236343384, 0.07063955068588257, -0.028041640296578407, -0.010510656982660294, 0.015121463686227798, -0.000994670088402927, -0.05977192521095276, 0.028596919029951096, -0.019851259887218475, -0.019008424133062363, 0.12374810874462128, -0.00001751711533870548, 0.015547839924693108, 0.003996032755821943, 0.07567673176527023, 0.044462062418460846, -0.00024634352303110063, -0.044462062418460846, -0.048864640295505524, 0.00930589810013771, -0.011204756796360016, 0.037342578172683716, 0.04945958033204079, -0.016787303611636162, 0.0624689981341362, 0.04410509765148163, -0.05045115202665329, -0.035815559327602386, -0.008502724580466747, 0.03775903955101967, -0.05846305191516876, 0.006876547820866108, -0.05267227441072464, 0.00571640906855464, -0.00491571519523859, 0.003326722187921405, -0.02056519128382206, -0.09836388379335403, 0.009053046815097332, 0.039266228675842285, -0.0016633610939607024, 0.04775407910346985, 0.0009407533798366785, -0.01513137947767973, 0.0010591222671791911, -0.029251357540488243, 0.022052548825740814, -0.005845313426107168, 0.005642041098326445, 0.032325226813554764, -0.007977192290127277, 0.029053041711449623, 0.02403569035232067, 0.03228556364774704, -0.02566186897456646, -0.030718881636857986, 0.04557262361049652, 0.009905798360705376, 0.031214667484164238, -0.021001482382416725, -0.04604857787489891, -0.02048586495220661, -0.044541388750076294, -0.0023227559868246317, 0.046286553144454956, -0.019573619589209557, -0.07373324781656265, 0.034149717539548874, 0.07837380468845367, 0.00159147207159549, 0.0803966075181961, 0.019048087298870087, 0.012563209980726242, 0.00008381876978091896, -0.03611303120851517, -0.020783336833119392, -0.008393651805818081, 0.05576597526669502, 0.018056515604257584, 0.05421912297606468, -0.008041644468903542, 0.01614278182387352, 0.04922160506248474, 0.08567176759243011, 0.000008681091458129231, -0.012186412699520588, -0.0028210205491632223, -0.0820227861404419, 0.01916707493364811, -0.05298957601189613, -0.040039654821157455, -0.03621218726038933, -0.023182939738035202, 0.0026251852978020906, -0.0144670270383358, 0.01431829109787941, -0.027248382568359375, 0.0057957349345088005, -0.01172037422657013, -0.005180960521101952, 0.016132866963744164, 0.057431817054748535, 0.00015191183774732053, 0.0061229532584548, -0.02266732230782509, -0.043589480221271515, 0.00643529836088419, -0.011849278584122658, 0.02334159053862095, -0.07563706487417221, 0.022944962605834007, 0.04200296476483345, 0.010381752625107765, 0.05667822062969208, 0.0042191362008452415, -0.012325232848525047, -0.014853740110993385, -0.013792757876217365, -0.011224588379263878, 0.01966286078095436, -0.025503216311335564, 0.019325727596879005, 0.01786811649799347, -0.09035198390483856, 0.026078328490257263, 0.0030416452791541815, 0.03482398763298988, 0.055884964764118195, -0.022171536460518837, 0.01901833899319172, -0.005642041098326445, 0.018205251544713974, -0.014744667336344719, 0.02488844282925129, -0.012087255716323853, -0.03375308960676193, 0.017997020855545998, 0.01591472141444683, -0.01124441996216774, -0.031274162232875824, -0.002190133323892951, -0.01234506443142891, -0.009598411619663239, -0.05120474845170975, 0.012335148639976978, 0.012910259887576103, -0.00995537731796503, 0.0026028749998658895, 0.04632621631026268, 0.051085758954286575, 0.022151704877614975, -0.061755068600177765, -0.003247396321967244, 0.04862666130065918, 0.07012393325567245, -0.010857706889510155, 0.002337629674002528, 0.00562220998108387, 0.005374317057430744, 0.07000494003295898, -0.06631629914045334, 0.016380758956074715, 0.0038795231375843287, -0.030044613406062126, -0.02306395024061203, -0.00854734517633915, -0.020803168416023254, -0.0038820020854473114, 0.0037555766757577658, -0.01839364878833294, -0.002622706349939108, 0.010718886740505695, -0.021259291097521782, -0.015805648639798164, -0.012791271321475506, -0.0005304907099343836, 0.04711947217583656, -0.008889437653124332, 0.052632611244916916, -0.00012433376105036587, -0.019236484542489052, 0.040614765137434006, 0.0008831183076836169, 0.024531476199626923, -0.005166086833924055, 0.008735744282603264, 0.032325226813554764, 0.008701039478182793, -0.015379272401332855, 0.07984133064746857, 0.00885969027876854, -0.04874565079808235, -0.05640058219432831, -0.0048363893292844296, 0.0705205574631691, 0.017808621749281883, 0.007129398640245199, 0.00394149636849761, 0.01043133158236742, -0.05330687761306763, -0.039365384727716446, 0.013118489645421505, -0.005528010427951813, 0.009439759887754917, -0.04557262361049652, -0.043589480221271515, 0.048309359699487686, 0.00032040150836110115, 0.03787802904844284, -0.07706493139266968, -0.030064444988965988, -0.008537429384887218, 0.024174511432647705, 0.01460584718734026, -0.027803663164377213, 0.06036686897277832, 0.0033316798508167267, -0.03018343448638916, -0.009087751619517803, 0.024531476199626923, 0.02776399999856949, -0.008378778584301472, 0.003235001815482974, 0.04739711433649063, -0.010837875306606293, 0.009038173593580723, 0.0031755075324326754, 0.016856713220477104, -0.014883486554026604, -0.018125925213098526, 0.01811601035296917, 0.023401085287332535, -0.03210708126425743, 0.025245407596230507, 0.02470996044576168, -0.025106588378548622, 0.005830439738929272, 0.007203766144812107, -0.02288546785712242, -0.0391274094581604, -0.02363906241953373, 0.009881009347736835, -0.03553792089223862, 0.02173524536192417, -0.0322260707616806, -0.024392656981945038, -0.009350518696010113, -0.07952402532100677, 0.02470996044576168, 0.02114030160009861, 0.03690628707408905, 0.00026323122438043356, 0.040614765137434006, -0.02683192305266857, -0.044541388750076294, -0.02470996044576168, -0.010019829496741295, -0.007273176219314337, -0.008225085213780403, 0.003180465195327997, 0.03547842428088188, -0.04755576327443123, -0.015736239030957222, 0.049538906663656235, 0.03129399195313454, 0.028973717242479324, -0.09844321012496948, -0.02133861742913723, 0.05267227441072464, 0.02881506457924843, -0.04529498144984245, -0.00951908528804779, -0.0045612286776304245, 0.013485371135175228, -0.028081301599740982, -0.03787802904844284, -0.044343072921037674, -0.04890430346131325, -0.021298954263329506, 0.10304410010576248, -0.009662863798439503, -0.015934552997350693, 0.033872079104185104, -0.0043653929606080055, -0.004734753631055355, -0.021576594561338425, -0.004288546275347471, 0.047436777502298355, -0.16531477868556976, 0.029826467856764793, -0.035597413778305054, 0.012493799440562725, 0.03575606644153595, 0.04938025772571564, -0.031214667484164238, -0.015736239030957222, -0.02038670890033245, 0.024928105995059013, 0.029489334672689438, 0.022449176758527756, -0.00007254739466588944, 0.04097172990441322, -0.012166581116616726, 0.03276151791214943, 0.020604854449629784, 0.004033216740936041, -0.02778383158147335, 0.026990573853254318, -0.003168070688843727, 0.06964797526597977, 0.056638557463884354, -0.04787306860089302, 0.04279622063040733, -0.041764989495277405, -0.026078328490257263, 0.010461078025400639, 0.0578681081533432, 0.030619725584983826, 0.025542879477143288, 0.037045106291770935, 0.0012927611824125051, 0.01109568402171135, -0.0443827360868454, -0.027823492884635925, 0.020327214151620865, 0.024650465697050095, 0.013078826479613781, 0.02778383158147335, -0.007729299366474152, 0.020128900185227394, -0.017223594710230827, -0.028101133182644844, -0.00884481705725193, -0.037540894001722336, -0.03480415791273117, 0.018522553145885468, -0.014298459514975548, -0.01417947094887495, -0.009752104990184307, -0.04529498144984245, -0.008006938733160496, 0.048864640295505524, 0.012444221414625645, -0.037045106291770935, -0.03284084424376488, 0.035418931394815445, -0.0045612286776304245, -0.07805649936199188, 0.01721367985010147, -0.035319775342941284, -0.0683787614107132, 0.013584528118371964, -0.01798710599541664, 0.03976201266050339, 0.014853740110993385, -0.022131873294711113, -0.025066925212740898, -0.018234997987747192, -0.011888940818607807, 0.00899355299770832, -0.004828952718526125, 0.0026945953723043203, -0.051958341151475906, -0.07762020826339722, 0.032325226813554764, -0.023004457354545593, 0.063460573554039, -0.07012393325567245, 0.010381752625107765, 0.025503216311335564, -0.02528507076203823, 0.007917697541415691, 0.05739215388894081, 0.06588000804185867, -0.07385224103927612, -0.014357954263687134, 0.04327217489480972, -0.014764497987926006, 0.018244914710521698, -0.028577087447047234, 0.033872079104185104, -0.015805648639798164, 0.02421417459845543, 0.03470499813556671, 0.018234997987747192, -0.046365879476070404, -0.021298954263329506, 0.04366880655288696, -0.03631134331226349, 0.041764989495277405, -0.04212195426225662, 0.06516607105731964, 0.04418442025780678, -0.02066434733569622, -0.002240951405838132, 0.016103120520710945, -0.036469995975494385, 0.039067912846803665, -0.03333663195371628, -0.007461574859917164, 0.05544867366552353, 0.04969755932688713, -0.029271187260746956, -0.029152199625968933, 0.0013782843016088009, -0.024174511432647705, 0.05076845735311508, 0.014050566591322422, 0.013475455343723297, 0.04549329727888107, -0.020019827410578728, 0.024273667484521866, -0.021874064579606056, 0.005909765604883432, 0.01509171724319458, 0.04025780037045479, -0.059533946216106415, 0.0702032595872879, -0.07361426204442978, -0.05806642025709152, -0.12858697772026062, -0.0046579064801335335, -0.055131372064352036, 0.029489334672689438, 0.0499751977622509, -0.036668311804533005, 0.022032717242836952, 0.05120474845170975, 0.02258799597620964 ]
717,517
pytorch_optimizer.optimizer.shampoo_utils
add_statistics
Compute statistics from gradients and add to the correct state entries. :param grad: torch.Tensor. gradient to compute statistics from.
def add_statistics(self, grad: torch.Tensor): r"""Compute statistics from gradients and add to the correct state entries. :param grad: torch.Tensor. gradient to compute statistics from. """ if len(self.statistics) == 0: return reshaped_grad: torch.Tensor = torch.reshape(grad, self.transformed_shape) partitioned_grads: List[torch.Tensor] = self.partitioner.partition(reshaped_grad) for j in range(len(partitioned_grads)): partitioned_grad: torch.Tensor = partitioned_grads[j] for i in range(self.rank): axes: List[int] = [ax for ax in range(partitioned_grad.ndim) if ax != i] stat: torch.Tensor = torch.tensordot(partitioned_grad, partitioned_grad, dims=[axes, axes]) self.statistics[j * self.rank + i].mul_(self.beta2).add_(stat, alpha=self.w2)
(self, grad: torch.Tensor)
[ -0.025663897395133972, -0.018452107906341553, -0.03841491416096687, 0.03199444338679314, 0.04226360097527504, -0.009855511598289013, -0.023218004032969475, -0.019279396161437035, 0.008623572997748852, 0.006631788332015276, -0.02456684224307537, 0.021311646327376366, 0.03427847847342491, -0.006380005273967981, -0.03451227769255638, 0.046400036662817, -0.014396601356565952, 0.02300218865275383, -0.004480391275137663, -0.03845088556408882, -0.07798083871603012, -0.10402241349220276, -0.012346366420388222, 0.06395292282104492, -0.03345119208097458, -0.0016197300283238292, 0.015313810668885708, -0.05380965769290924, 0.04028530418872833, 0.01308373175561428, -0.014603422954678535, -0.0673699751496315, 0.009342953562736511, -0.025160331279039383, 0.012040629982948303, 0.01006233412772417, -0.006793648935854435, -0.01752590574324131, -0.06456439197063446, 0.07963541150093079, 0.05704686790704727, -0.0018681411165744066, -0.0017310092225670815, 0.01415381021797657, 0.04470949247479439, 0.04276716709136963, -0.03330731391906738, 0.004410701338201761, -0.02721056528389454, 0.0007980626542121172, -0.020376451313495636, -0.01253520417958498, -0.011195357888936996, 0.004891787189990282, -0.0011111055500805378, 0.017310092225670815, 0.07100284844636917, -0.04323476552963257, 0.004529848694801331, -0.00592589657753706, 0.06093152239918709, -0.043486546725034714, -0.018137378618121147, -0.023613663390278816, -0.012283421121537685, -0.008717991411685944, -0.04122049733996391, -0.0534139983355999, 0.004350003786385059, 0.022642498835921288, -0.008776441216468811, 0.05744252726435661, 0.03185056895017624, 0.0011392063461244106, -0.0289730466902256, 0.010853652842342854, 0.020915986970067024, -0.022282809019088745, 0.02343381755053997, -0.05006887763738632, 0.04704748094081879, -0.02043040469288826, -0.0040847319178283215, -0.0150710204616189, 0.014999082311987877, -0.019081566482782364, 0.006775664631277323, -0.039673831313848495, -0.036670416593551636, -0.03625677525997162, -0.003012405475601554, -0.04147228226065636, 0.04600437730550766, -0.05370175093412399, 0.042083755135536194, 0.005044655408710241, -0.05711880698800087, -0.03571723774075508, -0.06312563270330429, 0.011213342659175396, 0.0022188390139490366, 0.021347614005208015, 0.026958782225847244, 0.018389161676168442, 0.03514173626899719, -0.06981587409973145, -0.005570702254772186, -0.046148255467414856, -0.042011816054582596, 0.006685742177069187, 0.004797368310391903, -0.01463939156383276, 0.023451801389455795, -0.04729926213622093, 0.01709427684545517, -0.021887149661779404, 0.006505896802991629, -0.008205433376133442, -0.04416995868086815, 0.06308966130018234, 0.03127506375312805, 0.017103269696235657, 0.007764812558889389, 0.04837833344936371, -0.05988842248916626, -0.005471787415444851, 0.02998017892241478, -0.007063416764140129, 0.03462018445134163, -0.039314139634370804, 0.00022396336134988815, -0.017498929053544998, 0.018703890964388847, 0.04140034317970276, 0.1024397760629654, -0.04226360097527504, 0.023829476907849312, -0.011977684684097767, 0.012876910157501698, 0.014675361104309559, 0.010556908324360847, -0.01886575110256672, -0.04035724326968193, 0.013281561434268951, -0.005764035973697901, 0.016833502799272537, -0.0359870046377182, 0.038738638162612915, 0.011510087177157402, -0.07754921168088913, 0.025915680453181267, 0.001634342479519546, 0.0017231409437954426, -0.029152892529964447, -0.030465761199593544, -0.02951258234679699, 0.008893340826034546, 0.028415527194738388, 0.007845742627978325, -0.03528561070561409, -0.02043040469288826, -0.020088698714971542, -0.029098939150571823, 0.012283421121537685, -0.0359150692820549, -0.018667923286557198, 0.03521367162466049, 0.016177067533135414, -0.07388037443161011, -0.005629152059555054, 0.03375692665576935, -0.08618177473545074, 0.05014081671833992, 0.08143386244773865, -0.02370358631014824, 0.009441868402063847, 0.022354746237397194, 0.022049009799957275, -0.01762482151389122, 0.021491490304470062, 0.040141429752111435, -0.024422965943813324, -0.048522211611270905, -0.06172284111380577, -0.02105986326932907, 0.01128528080880642, 0.014216755516827106, -0.04075290262699127, 0.05190329998731613, 0.015250865370035172, -0.010161248967051506, -0.04082484170794487, -0.012777995318174362, -0.025861727073788643, 0.028253667056560516, 0.02246265485882759, -0.03555537760257721, 0.02152745984494686, 0.020286528393626213, 0.017417998984456062, -0.014927144162356853, -0.027084672823548317, 0.034062664955854416, -0.0174629595130682, 0.022408701479434967, -0.0010251171188428998, -0.03345119208097458, 0.020106682553887367, -0.00004127304782741703, -0.009037217125296593, -0.04560872167348862, 0.00633504381403327, 0.0035699254367500544, 0.07294517755508423, 0.002434653230011463, -0.025178315117955208, 0.02713862620294094, -0.010143264196813107, 0.03095134347677231, -0.05330609157681465, 0.019405286759138107, -0.06165090203285217, -0.014693345874547958, -0.018739860504865646, 0.009468845091760159, -0.01769675873219967, 0.0651758685708046, -0.05438516288995743, -0.012346366420388222, 0.03715600073337555, 0.06431261450052261, -0.02059226483106613, 0.00018897786503657699, -0.030861420556902885, 0.03645460307598114, 0.03586111590266228, -0.05603973567485809, 0.007346672937273979, 0.05528438836336136, 0.036940187215805054, -0.05755043402314186, -0.05193926766514778, -0.025825757533311844, 0.051723454147577286, -0.06233431398868561, -0.039458017796278, -0.005889927502721548, 0.04967321828007698, -0.023559710010886192, 0.020016761496663094, -0.04039321094751358, -0.011357218958437443, -0.018245287239551544, -0.015808384865522385, -0.06373710930347443, -0.024854594841599464, -0.006119229830801487, 0.028019867837429047, 0.014819237403571606, -0.09862706065177917, 0.02480064146220684, -0.03758762776851654, -0.04596840962767601, 0.02073614113032818, -0.024512888863682747, 0.04395414516329765, 0.10977745801210403, 0.047191355377435684, 0.014612414874136448, 0.028199713677167892, -0.006676749791949987, 0.06582330912351608, -0.023092111572623253, -0.012984816916286945, 0.02721056528389454, 0.03474607691168785, 0.041544221341609955, -0.01058388501405716, 0.02073614113032818, -0.002776358975097537, 0.0787002220749855, -0.030034134164452553, -0.042083755135536194, 0.011932723224163055, 0.02584374137222767, 0.004033026751130819, -0.022210871800780296, -0.0011054853675886989, -0.0027089170180261135, 0.01308373175561428, 0.05208314210176468, -0.0057505471631884575, 0.03127506375312805, -0.02363164722919464, -0.0020670946687459946, 0.05805400013923645, 0.022049009799957275, 0.054493069648742676, -0.013497375883162022, 0.02129366062581539, 0.03044777736067772, -0.0024234128650277853, -0.0031045761425048113, 0.0011206598719581962, -0.06898858398199081, -0.056938961148262024, 0.04827042669057846, 0.002805583644658327, 0.0417240671813488, -0.03935011103749275, -0.019657069817185402, 0.011393187567591667, 0.04276716709136963, 0.07934766262769699, -0.02113180048763752, -0.0741681233048439, -0.03607692942023277, -0.03071754425764084, -0.011159389279782772, 0.06952811777591705, -0.0290449857711792, -0.002816824009642005, 0.07762114703655243, 0.02951258234679699, -0.010188225656747818, 0.036166850477457047, 0.012193498201668262, -0.0010565900010988116, 0.01745396852493286, -0.003801475977525115, -0.09186488389968872, -0.07848440855741501, 0.07240564376115799, 0.03325336053967476, -0.016482803970575333, 0.006847602780908346, 0.04269522801041603, 0.03303754702210426, -0.012526212260127068, -0.015943268314003944, -0.005665121134370565, -0.00627659447491169, -0.030627621337771416, 0.07208192348480225, 0.07359261810779572, -0.03722793608903885, 0.0024436453823000193, -0.0349259190261364, -0.02370358631014824, 0.032228242605924606, -0.006128222215920687, -0.039242204278707504, -0.07093091309070587, 0.055967796593904495, 0.06355725973844528, 0.02152745984494686, 0.016132107004523277, -0.030771497637033463, 0.03327134624123573, -0.013272569514811039, -0.022588545456528664, 0.052622679620981216, -0.008142487145960331, 0.05636345595121384, 0.02300218865275383, -0.0371919684112072, -0.025555990636348724, 0.023775523528456688, -0.011689932085573673, -0.04330670088529587, 0.07575076073408127, -0.03375692665576935, 0.013991949148476124, 0.03981770575046539, -0.013362491503357887, -0.051795393228530884, -0.000734554894734174, -0.012526212260127068, 0.026365293189883232, -0.02105986326932907, -0.022786375135183334, 0.021689319983124733, 0.011689932085573673, 0.07531913369894028, 0.005327911581844091, 0.034296464174985886, -0.00899675115942955, -0.06787354499101639, -0.019171489402651787, -0.03127506375312805, 0.006465431768447161, 0.01929738000035286, -0.014891175553202629, -0.0025493043940514326, -0.05197523534297943, 0.02667102962732315, 0.06258609890937805, -0.005602175369858742, -0.03190452232956886, 0.0017444975674152374, -0.031329017132520676, -0.07215385884046555, -0.03632871061563492, 0.06071570888161659, -0.025196298956871033, -0.0670102909207344, -0.04042918235063553, 0.03068157657980919, -0.0003203490923624486, 0.0789879709482193, -0.016878463327884674, -0.04276716709136963, -0.02386544644832611, 0.03852282091975212, 0.007085897494107485, 0.029296768829226494, -0.02947661280632019, -0.001822055783122778, 0.01436962466686964, 0.04168809577822685, 0.03859476000070572, -0.009203573688864708, 0.019315365701913834, 0.002778606954962015, -0.058773383498191833, -0.013047763146460056, -0.05722671374678612, -0.0167525727301836, -0.06506796181201935, 0.0033765919506549835, 0.05758640542626381, 0.005719074513763189, -0.00857861153781414, -0.014621407724916935, -0.006843106355518103, -0.03658049553632736, -0.03751568868756294, 0.043846238404512405, -0.0012769002933055162, -0.000752539373934269, 0.02132963016629219, 0.016500789672136307, 0.04416995868086815, -0.0005100294947624207, -0.01756187528371811, -0.024944515898823738, -0.006766672246158123, -0.06877277046442032, -0.01160000916570425, -0.024512888863682747, -0.013560321182012558, 0.020790094509720802, 0.05258671194314957, 0.048953838646411896, -0.0036620961036533117, -0.042479414492845535, -0.019351333379745483, -0.056938961148262024, 0.026599092409014702, 0.07668595761060715, -0.028019867837429047, -0.017714742571115494, -0.10488566756248474, 0.020880017429590225, -0.01599722169339657, -0.008605588227510452, 0.05427725240588188, -0.02467474900186062, -0.014936136081814766, 0.012948848307132721, 0.0025515526067465544, -0.012966832146048546, 0.008236906491219997, -0.044781431555747986, -0.06024811044335365, 0.003100080182775855, -0.039314139634370804, 0.003174266079440713, 0.016905440017580986, 0.004801864270120859, 0.047083448618650436, 0.04729926213622093, 0.003639615373685956, 0.04287507385015488, 0.03816313296556473, 0.02951258234679699, 0.014468539506196976, 0.015448695048689842, 0.06233431398868561, 0.03798328712582588, 0.026455216109752655, -0.05798206478357315, 0.044313836842775345, 0.005831477697938681, -0.06319756805896759, 0.01409086398780346, 0.014036910608410835, 0.015044043771922588, 0.0719740092754364, 0.009621713310480118, -0.005323415156453848, -0.0232719574123621, -0.014378616586327553, -0.004756903275847435, 0.01231938973069191, 0.0025762810837477446, -0.021941103041172028, 0.06891664862632751, -0.007288223132491112, -0.016698619350790977, -0.006820625625550747, 0.0033855841029435396, -0.020808078348636627, 0.0442059263586998, 0.008322332054376602, -0.0512198880314827, -0.02881118655204773, 0.050428569316864014, -0.006132718175649643, 0.010844659991562366, -0.01500807423144579, 0.035339564085006714, -0.02222885563969612, -0.006964501924812794, 0.00392961548641324, 0.01732807606458664, -0.016114121302962303, 0.0012038381537422538, 0.022480638697743416, -0.004846825730055571, -0.058341752737760544, 0.04226360097527504, 0.002153645269572735, -0.023307926952838898, 0.012795979157090187, -0.01148311048746109, 0.06078764796257019, -0.07042734324932098, -0.06888067722320557, -0.009181092493236065, 0.0015702726086601615, -0.038738638162612915, 0.030933359637856483, -0.0745997503399849, -0.04183197394013405, 0.03866669908165932, 0.0074860528111457825, -0.03884654492139816, -0.02230079285800457, -0.04366639256477356, -0.026383277028799057, -0.015106989070773125, -0.07229773700237274, 0.030771497637033463, -0.003261940786615014, 0.06733401119709015, -0.06945618242025375, -0.016572726890444756, 0.013731174170970917, 0.021887149661779404, -0.0208620335906744, -0.058341752737760544, 0.003801475977525115, 0.05621958151459694, -0.0020097692031413317, 0.0017051564063876867, -0.007387137971818447, -0.02143753692507744, -0.03194049000740051, 0.0048738024197518826, -0.01651877351105213, 0.0017602340085431933, -0.043378639966249466, -0.02940467558801174, 0.0006946517387405038, -0.0002499565889593214, 0.07575076073408127, 0.0005490896292030811, 0.059169042855501175, -0.019746992737054825, -0.06445648521184921, -0.010862644761800766, 0.02070017158985138, 0.00430729053914547, 0.011806831695139408, 0.05147166922688484, -0.06589525192975998, 0.053665779531002045, 0.04492530971765518, -0.010170240886509418, 0.011609002016484737, -0.010574892163276672, 0.00856062676757574, -0.08323231339454651, -0.011591017246246338, -0.05229895934462547, -0.04496127739548683, -0.053162213414907455, -0.04924159124493599, 0.03375692665576935, -0.07711758464574814, -0.00798062700778246, 0.04503321647644043, -0.006451943423599005, -0.009064193814992905, 0.0025605447590351105, 0.0014747298555448651, 0.029584521427750587, -0.04693957418203354, -0.030897390097379684, -0.000733430846594274, 0.03185056895017624, 0.01290388684719801, 0.019944822415709496, 0.03769553452730179, -0.06431261450052261, -0.012607142329216003, 0.02203102596104145, 0.048522211611270905, 0.06190268695354462, 0.007495044730603695, 0.03587909787893295, -0.00696899788454175, 0.060607802122831345, -0.017373038455843925, -0.011357218958437443, 0.05996035784482956, -0.06740594655275345, 0.007769308518618345, 0.0025155835319310427, -0.06960006058216095, 0.008241401985287666, 0.03201242908835411, -0.026958782225847244, 0.016905440017580986, -0.07316099107265472, 0.014999082311987877, 0.020844047889113426, 0.022678468376398087, -0.07632626593112946, 0.029260799288749695, 0.005498764105141163, 0.03722793608903885, -0.012058614753186703, -0.0052514770068228245, 0.018308231607079506, 0.0031832584645599127, 0.00034648284781724215, 0.036976154893636703, 0.008574116043746471, 0.00149833457544446, 0.04830639809370041, -0.02877521701157093, 0.035195689648389816, -0.0031630259472876787, 0.024153199046850204, 0.0038891504518687725, 0.03337925300002098, -0.011087451130151749, -0.012283421121537685, 0.03888251259922981, -0.01980094611644745, 0.03566328436136246, -0.021851180121302605, 0.02818172797560692, 0.06528377532958984, -0.0049277557991445065, 0.09164907038211823, 0.0558239221572876, -0.04330670088529587, 0.00022719494882039726, 0.03609491512179375, 0.005467291455715895, 0.009477837011218071, 0.00889783725142479, -0.00009638573828851804, 0.014765283092856407, 0.011932723224163055, -0.028757233172655106, 0.029656458646059036, 0.012697064317762852, 0.04086080938577652, 0.00844372808933258, 0.004455662798136473, -0.03638266399502754, 0.009612721391022205, -0.017319083213806152, -0.047083448618650436, 0.004318530671298504, 0.01805644854903221, -0.02616746351122856, -0.047587014734745026, 0.04359445348381996, -0.007922177202999592, 0.018236294388771057, -0.018101410940289497, 0.022246839478611946, -0.02650916948914528, 0.04690360277891159, -0.05603973567485809, -0.003488995134830475, -0.021257691085338593, -0.01793055795133114, 0.018254278227686882, 0.028667310252785683, 0.00006161099736345932, -0.019729008898139, -0.020969940349459648, 0.03809119388461113, -0.0050761280581355095, -0.017984511330723763, 0.020052729174494743, -0.012094583362340927, 0.04283910617232323, 0.013335514813661575, 0.015097997151315212, 0.06754982471466064, -0.01485520601272583, 0.005602175369858742, 0.0052379886619746685, 0.0418679416179657, 0.003839693032205105, 0.053126245737075806, 0.06931230425834656, -0.02861335687339306, -0.015583578497171402, 0.08265681564807892, -0.021149784326553345, -0.06157896667718887, -0.04125646874308586, 0.010862644761800766, -0.01762482151389122, 0.023343894630670547, 0.05068035051226616, -0.0009014736278913915, 0.039206232875585556, 0.03580716252326965, 0.013362491503357887, 0.019009627401828766, 0.07539106905460358, 0.04359445348381996, -0.00020780540944542736, -0.03283971548080444, -0.047551047056913376, -0.06032004952430725, -0.01949520967900753, 0.009109155274927616, -0.0035317083820700645, 0.0221029631793499, 0.026149479672312737, 0.12207885831594467, -0.01091659814119339, -0.0052110119722783566, 0.048917870968580246, 0.04729926213622093, -0.0029000022914260626, 0.061542995274066925, -0.0885557308793068, -0.02129366062581539, -0.06017617508769035, 0.027498317882418633, -0.014981097541749477, -0.0020614746026694775, -0.012589157558977604, -0.010961559601128101, 0.03981770575046539, -0.033900804817676544, -0.004325274843722582 ]
717,518
pytorch_optimizer.optimizer.shampoo_utils
compute_pre_conditioners
Compute L^{-1/exp} for each stats matrix L. If `self.use_svd` is enabled and where all shapes of statistics & pre-conditioners are same, perform batch SVD. else, SVD one by one. If `self.use_svd` is disabled, use Schur-Newton method, which is usually much faster.
def compute_pre_conditioners(self): r"""Compute L^{-1/exp} for each stats matrix L. If `self.use_svd` is enabled and where all shapes of statistics & pre-conditioners are same, perform batch SVD. else, SVD one by one. If `self.use_svd` is disabled, use Schur-Newton method, which is usually much faster. """ if self.use_svd and self.is_same_shapes: self.pre_conditioners = compute_power_svd(matrix=self.statistics, power=self.exponent_for_pre_conditioner) return for i, statistic in enumerate(self.statistics): self.pre_conditioners[i] = ( compute_power_svd(matrix=statistic, power=self.exponent_for_pre_conditioner) if self.use_svd else compute_power_schur_newton( mat_g=statistic, p=self.exponent_for_pre_conditioner, ridge_epsilon=self.matrix_eps ) )
(self)
[ 0.009008712135255337, 0.01210671104490757, 0.010546567849814892, 0.04118777811527252, 0.03737211599946022, -0.04675080254673958, 0.025675497949123383, -0.13379786908626556, 0.04236457124352455, 0.1042710542678833, -0.017669735476374626, -0.043184760957956314, 0.005799274891614914, -0.015663836151361465, -0.04329174384474754, 0.013256759382784367, -0.02432040311396122, -0.03136333450675011, -0.0006441162549890578, -0.04967495799064636, -0.035089846700429916, 0.007898781448602676, -0.01827596314251423, 0.05905364826321602, 0.012989305891096592, 0.06151421368122101, -0.006824512034654617, -0.041687022894620895, 0.02050473913550377, 0.005531821865588427, 0.023107947781682014, 0.07930876314640045, -0.04186532646417618, -0.08957896381616592, 0.013934306800365448, 0.0037733176723122597, 0.014085863716900349, 0.0044842972420156, -0.025942951440811157, 0.0017161574214696884, -0.0020136989187449217, -0.01626114919781685, 0.023232759907841682, -0.01583322323858738, -0.04536004737019539, 0.0004393474373500794, 0.016546431928873062, -0.0034144846722483635, 0.06925252825021744, -0.03865588828921318, -0.0037733176723122597, 0.0034991782158613205, 0.046679481863975525, -0.03179125860333443, -0.02506927214562893, 0.020754361525177956, 0.07107120752334595, 0.010956662707030773, -0.0296159740537405, -0.10106161236763, 0.06468798965215683, -0.008259843103587627, -0.033306825906038284, 0.03391305357217789, 0.0024226794485002756, -0.0516006201505661, 0.0013628965243697166, 0.005955289117991924, 0.005415925290435553, 0.004658141639083624, -0.050388164818286896, -0.03346730023622513, -0.029455501586198807, 0.003418942214921117, -0.020023323595523834, 0.01879303902387619, -0.027048423886299133, -0.10833633691072464, 0.0335921086370945, -0.03762173652648926, 0.02793993428349495, 0.007840833626687527, -0.024552196264266968, -0.013372655026614666, 0.019684549421072006, -0.0825895220041275, 0.005215335637331009, 0.0033944256138056517, 0.06404610723257065, 0.048569485545158386, -0.03599919006228447, 0.047856274992227554, 0.03230833634734154, 0.006450077518820763, 0.014923883602023125, 0.09763821214437485, -0.023732006549835205, -0.02984776720404625, 0.03840626776218414, -0.030418332666158676, 0.06547252088785172, 0.06418874859809875, 0.05438213050365448, -0.002342443447560072, -0.00928953755646944, 0.00790323968976736, -0.011759021319448948, -0.027155404910445213, 0.00400511035695672, -0.017687564715743065, -0.0180530846118927, -0.02136058919131756, -0.034875884652137756, -0.03933343663811684, -0.005219792947173119, -0.09057745337486267, -0.06675629317760468, 0.007256894372403622, -0.025033611804246902, 0.04536004737019539, -0.03886985033750534, -0.009565906599164009, -0.02210945636034012, 0.031202862039208412, -0.08715405315160751, -0.05181458219885826, 0.06714855879545212, 0.024552196264266968, 0.004283707123249769, -0.07695517688989639, 0.020023323595523834, 0.015218081884086132, 0.0016570949228480458, 0.04557400941848755, 0.015423129312694073, -0.09050612896680832, 0.03089975006878376, 0.015209166333079338, 0.06343987584114075, -0.041580043733119965, -0.0024249081034213305, -0.005460501182824373, -0.05095873400568962, 0.05259910970926285, 0.034447960555553436, 0.0030066187027841806, 0.05848307907581329, 0.029562484472990036, 0.00206941831856966, -0.0034880342427641153, 0.050602126866579056, -0.000205465272301808, 0.036480605602264404, -0.107480488717556, 0.002005898393690586, -0.0172150656580925, 0.010600058361887932, -0.042114950716495514, 0.0380140021443367, -0.048070237040519714, -0.03246880695223808, -0.02888493612408638, -0.06600742787122726, -0.006120218429714441, 0.01216911617666483, -0.002217632019892335, -0.03398437425494194, -0.001036380766890943, -0.0026789887342602015, 0.04058155044913292, 0.11118917167186737, -0.002663387218490243, 0.012873409315943718, 0.04489646106958389, -0.060587044805288315, -0.009369773790240288, 0.014870393089950085, 0.02250172197818756, -0.023446721956133842, 0.02432040311396122, 0.019916340708732605, 0.014897137880325317, -0.041580043733119965, -0.058875344693660736, -0.023286251351237297, 0.015842139720916748, 0.03719381242990494, -0.06404610723257065, -0.0290097463876009, 0.0003825136518571526, -0.03958306089043617, -0.04493212327361107, 0.012980391271412373, 0.02410644106566906, -0.0019167473074048758, 0.0554162859916687, -0.007693734485656023, -0.025942951440811157, -0.009601566940546036, -0.03582088649272919, -0.03139899671077728, 0.04286381974816322, -0.0012737454380840063, 0.007698191795498133, -0.03501852601766586, 0.007011728826910257, -0.05488137900829315, 0.016947612166404724, -0.009869019500911236, 0.0033743667881935835, -0.006347553804516792, -0.00021772354375571012, -0.002785969991236925, 0.05416816845536232, 0.015075440518558025, -0.025835970416665077, 0.06857497990131378, 0.02613908424973488, 0.01445138268172741, -0.033075034618377686, -0.033841732889413834, -0.06529422104358673, -0.06475931406021118, 0.0047829532995820045, -0.023179270327091217, 0.008326706476509571, 0.004965712781995535, -0.0007538834470324218, 0.005108354147523642, 0.002690132474526763, -0.021378418430685997, -0.014995204284787178, -0.010439585894346237, -0.03598135709762573, -0.028599651530385017, 0.022965306416153908, -0.035963527858257294, 0.038263626396656036, 0.017036763951182365, 0.0180530846118927, -0.004105405416339636, -0.034982867538928986, 0.02453436516225338, 0.0309175793081522, 0.025247573852539062, -0.03886985033750534, -0.002146311104297638, 0.04749967157840729, -0.01741119660437107, 0.02918804995715618, -0.008094914257526398, -0.04439721629023552, -0.01922096312046051, -0.03507201746106148, -0.05381156504154205, -0.051244016736745834, 0.048569485545158386, 0.08836650848388672, 0.05609383061528206, -0.03410918638110161, -0.04197230935096741, -0.006726445630192757, -0.01221369206905365, -0.013711429201066494, -0.04682212322950363, 0.006851257290691137, 0.02070087008178234, 0.05088741332292557, 0.02380332723259926, 0.03876287117600441, -0.027351537719368935, 0.0596955344080925, -0.017660820856690407, -0.008028050884604454, 0.03300371393561363, 0.0412234403192997, -0.06461667269468307, -0.011019067838788033, 0.003931560553610325, 0.004934509750455618, 0.07445894181728363, -0.024873139336705208, -0.02005898393690586, 0.006329723633825779, -0.019399264827370644, 0.0020092413760721684, -0.04618023708462715, -0.0783102735877037, 0.03514333814382553, -0.0046091084368526936, 0.024819647893309593, 0.03926211595535278, 0.06358251720666885, -0.04871212691068649, 0.03815664350986481, -0.05976685509085655, 0.047856274992227554, -0.021913325414061546, 0.03683720901608467, 0.017571669071912766, 0.010956662707030773, -0.01646619662642479, 0.039440419524908066, -0.0082241827622056, -0.028385689482092857, -0.03225484490394592, 0.03628447279334068, 0.0047250050120055676, -0.016314638778567314, -0.06818271428346634, -0.009619397111237049, 0.056985341012477875, 0.029758615419268608, 0.026513518765568733, -0.005808189976960421, -0.07795366644859314, 0.005906256381422281, 0.023214930668473244, 0.0030155337881296873, 0.030632296577095985, 0.026816632598638535, 0.04874778538942337, 0.040403250604867935, 0.04286381974816322, -0.021824173629283905, -0.01678713969886303, 0.04332740232348442, -0.05409684777259827, -0.014085863716900349, -0.0029954747296869755, -0.04446853697299957, -0.03961871936917305, 0.03015088103711605, 0.045716650784015656, -0.031470317393541336, 0.025550687685608864, 0.02018379420042038, 0.0014799071941524744, 0.02836786024272442, -0.043897971510887146, 0.024463044479489326, -0.001921204850077629, -0.03983268141746521, 0.02549719624221325, -0.035624753683805466, -0.05127967521548271, 0.057520247995853424, 0.036908529698848724, -0.027975594624876976, 0.027440689504146576, -0.036355793476104736, -0.002500686561688781, 0.006485737860202789, 0.0815197080373764, 0.054952699691057205, 0.000045167536882217973, -0.04735703021287918, -0.06821837276220322, 0.06875327974557877, -0.0111082186922431, 0.07781102508306503, 0.05555892735719681, -0.01226718258112669, 0.03273626044392586, 0.029990408569574356, -0.05498835816979408, 0.010760529898107052, -0.01465643011033535, 0.02633521519601345, -0.07178441435098648, -0.008161777630448341, 0.016742564737796783, -0.0004811369872186333, -0.01035043504089117, -0.009343028999865055, 0.008335622027516365, 0.008210810832679272, -0.0020148134790360928, -0.010689209215342999, 0.009062202647328377, 0.02845701016485691, -0.00658826157450676, -0.02678097039461136, 0.0021853146608918905, 0.033306825906038284, 0.0034144846722483635, 0.015654921531677246, -0.0007176658255048096, 0.040296267718076706, -0.010368265211582184, 0.016591008752584457, -0.037550415843725204, -0.009467840194702148, -0.005745784379541874, 0.005491703748703003, 0.028724463656544685, 0.01339048519730568, 0.03607051074504852, -0.024694837629795074, 0.019809359684586525, -0.015966949984431267, -0.004330511670559645, 0.010288029909133911, 0.008580787107348442, -0.036159660667181015, -0.05202854424715042, -0.004370629321783781, 0.05605817213654518, -0.013524211943149567, 0.10826501995325089, -0.030774937942624092, 0.025978611782193184, 0.003911501727998257, -0.05003156140446663, -0.0412234403192997, 0.019292283803224564, -0.004080888815224171, 0.013007136061787605, 0.060907989740371704, -0.0028550620190799236, 0.04268551617860794, 0.008910645730793476, -0.002585380105301738, 0.05245646834373474, -0.03580305725336075, 0.030222201719880104, -0.05195722356438637, -0.01677822507917881, -0.06985875219106674, 0.000301999127259478, -0.0028060288168489933, 0.0017830206779763103, -0.001819795579649508, -0.0132835041731596, -0.004849816206842661, -0.005224250722676516, -0.00781408790498972, 0.05937458947300911, -0.04261419549584389, -0.03491154685616493, -0.01003840658813715, 0.024249082431197166, 0.014843647368252277, -0.014665345661342144, 0.006521398201584816, 0.028171727433800697, -0.009806614369153976, -0.002973187016323209, -0.052634771913290024, -0.02879578433930874, -0.0028060288168489933, 0.03936909884214401, 0.04043890908360481, 0.05744892731308937, 0.00860753282904625, 0.045716650784015656, -0.021699361503124237, -0.04140174016356468, -0.021164456382393837, 0.0433630645275116, 0.01973803900182247, -0.02781512401998043, -0.046893443912267685, 0.055594585835933685, 0.0022421486210078, 0.021003983914852142, -0.004027397837489843, 0.029865596443414688, -0.0034880342427641153, -0.007453026715666056, 0.0445755198597908, -0.023821156471967697, 0.04036758840084076, 0.018846528604626656, -0.06739818304777145, -0.006646209862083197, -0.00928953755646944, -0.0027725971303880215, 0.03819230571389198, 0.004622481297701597, 0.028421349823474884, 0.02760116010904312, 0.0041366079822182655, -0.009797698818147182, 0.03311069309711456, -0.05727062746882439, -0.010493077337741852, -0.008233098313212395, 0.008964136242866516, 0.010163217782974243, -0.0014698776649311185, 0.027993425726890564, 0.09906463325023651, 0.04971061646938324, 0.0030021611601114273, 0.014469212852418423, 0.027208896353840828, -0.029990408569574356, 0.07331781089305878, -0.007198946084827185, 0.04928269237279892, -0.01656426303088665, -0.06996573507785797, 0.020094644278287888, 0.04204363003373146, 0.010689209215342999, 0.035303808748722076, 0.02305445820093155, -0.04165136441588402, -0.007546635344624519, 0.02039775624871254, -0.07631328701972961, 0.00539363780990243, 0.025122761726379395, -0.02515842206776142, 0.009450010024011135, -0.002826087875291705, 0.023838987573981285, 0.015307232737541199, 0.05416816845536232, 0.010332604870200157, -0.03462626412510872, -0.016403790563344955, -0.03450145199894905, -0.014995204284787178, 0.051244016736745834, -0.0008190751541405916, -0.007346045225858688, 0.025853799656033516, 0.0352681502699852, -0.05356194078922272, -0.03737211599946022, 0.012516805902123451, 0.029794275760650635, 0.028278708457946777, 0.019916340708732605, 0.01131326612085104, -0.014665345661342144, 0.0008586359326727688, -0.018070915713906288, 0.00552736409008503, -0.016742564737796783, 0.07242630422115326, 0.006450077518820763, 0.018935680389404297, -0.03539296239614487, -0.008825952187180519, 0.037978339940309525, -0.09870802611112595, -0.03886985033750534, -0.01635030098259449, -0.01941709592938423, -0.034269656985998154, -0.013301334343850613, 0.03173776715993881, 0.02982993610203266, 0.017143744975328445, 0.04286381974816322, 0.02091483399271965, 0.05366892367601395, -0.03651626408100128, -0.0813770666718483, 0.056771378964185715, -0.025782478973269463, -0.042328912764787674, -0.021806344389915466, 0.003679709043353796, 0.03589220717549324, -0.02401728928089142, -0.02963380515575409, 0.0024449671618640423, 0.02646002732217312, 0.014683175832033157, -0.016296809539198875, -0.061977799981832504, -0.019827190786600113, 0.022252097725868225, -0.047642312943935394, -0.04596627503633499, 0.00658826157450676, 0.011259775608778, -0.08323140442371368, 0.0013272360665723681, -0.03246880695223808, -0.007403993513435125, -0.011295435950160027, -0.06807573139667511, 0.018953509628772736, -0.02580031007528305, 0.04771363362669945, -0.04728570953011513, -0.000945000967476517, -0.03507201746106148, -0.0203799270093441, 0.03057880513370037, -0.020683040842413902, 0.0396900400519371, -0.028207387775182724, -0.04400495067238808, 0.036694567650556564, -0.018436433747410774, 0.017544923350214958, 0.020130304619669914, -0.012811004184186459, 0.01184817310422659, -0.09257443249225616, -0.03302154317498207, 0.03865588828921318, 0.013372655026614666, -0.015770819038152695, -0.004983542952686548, 0.0516006201505661, 0.022769175469875336, 0.04364834725856781, 0.0461089164018631, 0.016546431928873062, -0.02005898393690586, -0.040938157588243484, 0.08979292213916779, -0.0038713838439434767, -0.025425875559449196, 0.04703608527779579, 0.007983474992215633, -0.017010018229484558, 0.004495440982282162, -0.02444521337747574, 0.040724191814661026, -0.12873409688472748, 0.03314635530114174, -0.028938425704836845, 0.03608833998441696, 0.03599919006228447, 0.08558499813079834, 0.011946238577365875, 0.007974560372531414, 0.027476349845528603, 0.009164726361632347, 0.021931154653429985, -0.007987933233380318, -0.061549875885248184, -0.0007811859832145274, 0.005371349863708019, 0.035196829587221146, -0.014558364637196064, 0.004983542952686548, 0.044753819704055786, -0.033930882811546326, -0.02622823417186737, 0.08430121839046478, 0.067184217274189, -0.04999590292572975, -0.017821291461586952, -0.04685778543353081, 0.03951174020767212, -0.04917571321129799, 0.025550687685608864, -0.037229470908641815, 0.013756005093455315, 0.020754361525177956, -0.05238514766097069, -0.03560692444443703, -0.02483747899532318, 0.01859690621495247, -0.0021451967768371105, -0.0019992119632661343, 0.02665616013109684, -0.007149912882596254, 0.0007806287612766027, 0.011767936870455742, -0.008353452198207378, -0.023446721956133842, -0.0024761699605733156, 0.014870393089950085, -0.031078051775693893, 0.04849816486239433, 0.02706625498831272, -0.04660816118121147, -0.008077084086835384, -0.04054589197039604, -0.007479771971702576, 0.01773214153945446, 0.016510771587491035, 0.0023067831061780453, -0.00865656603127718, -0.020362095907330513, -0.05958855152130127, 0.017143744975328445, -0.010332604870200157, -0.030079560354351997, 0.035196829587221146, -0.01932794414460659, 0.03772871941328049, 0.050923071801662445, -0.01741119660437107, 0.005879510659724474, -0.019131813198328018, 0.003258470445871353, -0.020986154675483704, 0.015574686229228973, -0.011553973890841007, 0.02200247533619404, -0.024409553036093712, -0.04357702657580376, 0.010386095382273197, -0.017482517287135124, 0.06864629685878754, 0.01655534654855728, -0.0007895438466221094, 0.01035043504089117, 0.0045288726687431335, 0.021735021844506264, 0.02239474095404148, 0.031060220673680305, -0.001731758937239647, -0.008005763404071331, 0.031719937920570374, 0.05552326515316963, -0.027208896353840828, -0.0008993110968731344, 0.03394871577620506, 0.05185024440288544, -0.01105472818017006, 0.022252097725868225, -0.017018932849168777, -0.0580194927752018, 0.011625295504927635, 0.06201346218585968, -0.0656508207321167, 0.04272117838263512, 0.0005558009725064039, 0.025015780702233315, -0.011420248076319695, -0.030543144792318344, 0.0021563407499343157, 0.015066524967551231, -0.059838175773620605, 0.01783020794391632, 0.010163217782974243, -0.07310385257005692, 0.034144848585128784, 0.014469212852418423, -0.019131813198328018, -0.0203799270093441, -0.002710191532969475, -0.037657398730516434, 0.013577702455222607, 0.01433548703789711, -0.01317652314901352, 0.024677006527781487, -0.03619531914591789, 0.035927869379520416, -0.025318894535303116, -0.013827325776219368, -0.033930882811546326, 0.027226725593209267, 0.0012681734515354037, 0.04047457128763199, -0.058447420597076416, -0.011785767041146755, -0.040189288556575775, 0.027583330869674683, -0.06661365181207657, -0.026602668687701225, 0.058447420597076416, 0.00139409932307899, -0.01963105797767639, 0.010805105790495872, 0.03166644647717476 ]
717,519
pytorch_optimizer.optimizer.shampoo_utils
get_should_precondition_dims
Get pre-condition dimensions by the type of conditioner.
def get_should_precondition_dims(self) -> List[bool]: r"""Get pre-condition dimensions by the type of conditioner.""" if self.pre_conditioner_type == PreConditionerType.ALL or len(self.transformed_shape) <= 1: return [True] * len(self.transformed_shape) if self.pre_conditioner_type == PreConditionerType.INPUT: return [True] * (len(self.transformed_shape) - 1) + [False] if self.pre_conditioner_type == PreConditionerType.OUTPUT: return [False] * (len(self.transformed_shape) - 1) + [True] raise ValueError
(self) -> List[bool]
[ 0.005675541236996651, -0.000056395147112198174, -0.012432982213795185, -0.02064478024840355, 0.04561716318130493, 0.023429343476891518, 0.040615592151880264, -0.04444658011198044, 0.009737100452184677, 0.02568182349205017, 0.0647721141576767, -0.03306002542376518, 0.018534189090132713, -0.0570746585726738, 0.029264509677886963, -0.03830990195274353, 0.014073568396270275, -0.016130952164530754, 0.03149925172328949, -0.012291093356907368, 0.00032118905801326036, -0.018480980768799782, -0.02479501999914646, -0.021886305883526802, 0.02619616873562336, 0.033201914280653, -0.016902470961213112, -0.009408983401954174, -0.0032678700517863035, 0.02348255179822445, -0.05789051949977875, 0.05895468220114708, 0.014942635782063007, -0.035241562873125076, 0.019208159297704697, 0.04760359972715378, 0.025841448456048965, 0.007001311983913183, 0.016884734854102135, -0.01590925082564354, -0.014712066389620304, -0.040048036724328995, 0.0022170082665979862, 0.02669277973473072, -0.0263203214854002, -0.01176788005977869, 0.03671365603804588, -0.04739077016711235, 0.005037042777985334, -0.0011428677244111896, 0.07076690346002579, -0.021283280104398727, 0.046858686953783035, 0.037387628108263016, -0.03451438620686531, -0.05125723034143448, 0.010038613341748714, -0.0067751770839095116, -0.035809118300676346, -0.027987511828541756, 0.016574352979660034, 0.06572986394166946, 0.01508452370762825, -0.05515916645526886, 0.03838084638118744, -0.04437563568353653, -0.01793116331100464, 0.026675043627619743, -0.027065236121416092, 0.0072983913123607635, -0.06420455873012543, -0.04306316748261452, 0.003895283443853259, 0.019137214869260788, -0.03774235025048256, -0.09371737390756607, 0.051789313554763794, -0.025788240134716034, 0.06431097537279129, -0.04916437342762947, -0.016955679282546043, 0.07768397033214569, 0.007293957285583019, 0.010836736299097538, 0.06349511444568634, -0.014951503835618496, -0.03706837818026543, 0.06147320568561554, 0.011439763009548187, -0.030754338949918747, -0.026338057592511177, 0.04082842543721199, 0.030506033450365067, 0.03628798946738243, 0.03735215589404106, 0.11677426099777222, -0.04306316748261452, -0.03330833092331886, 0.024458035826683044, -0.030967170372605324, -0.02170894481241703, 0.09527814388275146, 0.027278069406747818, -0.012211281806230545, 0.02397916093468666, 0.02195725031197071, -0.05256969854235649, -0.042069949209690094, -0.05161195248365402, -0.029512813314795494, 0.010446542873978615, -0.01048201508820057, -0.011909767985343933, -0.0019620521925389767, 0.045723579823970795, -0.09272415190935135, -0.016077743843197823, -0.029991688206791878, -0.03490457683801651, 0.025202950462698936, -0.012140337377786636, 0.009275962598621845, 0.051718369126319885, -0.0022103572264313698, -0.02568182349205017, 0.027295805513858795, 0.03495778515934944, 0.053491976112127304, -0.02960149385035038, -0.05856449156999588, 0.006274133455008268, -0.00520553532987833, -0.03547213226556778, 0.026728251948952675, -0.055513884872198105, -0.026231640949845314, 0.051718369126319885, 0.025894656777381897, 0.006553476210683584, -0.04955456778407097, 0.006300737615674734, 0.034301552921533585, -0.002915365854278207, 0.02903394028544426, -0.059664126485586166, -0.02208140306174755, 0.035507604479789734, 0.007280655205249786, 0.03742310032248497, 0.012362037785351276, 0.004660151433199644, -0.009196150116622448, -0.009586343541741371, -0.07314353436231613, -0.013727715238928795, -0.014463761821389198, -0.013027140870690346, -0.05977054312825203, 0.026834668591618538, -0.02195725031197071, -0.09017015993595123, -0.04795832186937332, -0.038026124238967896, 0.024191994220018387, -0.0022192252799868584, -0.00620318902656436, -0.0023810667917132378, -0.06051545590162277, 0.004522696603089571, 0.07505903393030167, 0.11237571388483047, 0.024085577577352524, 0.04281486198306084, 0.001192750409245491, -0.03345021978020668, 0.029175829142332077, -0.005755353253334761, -0.011821088381111622, -0.04107672721147537, 0.005826297681778669, 0.07761302590370178, -0.018463244661688805, -0.03288266807794571, -0.03036414459347725, 0.004385242238640785, 0.00820293091237545, -0.027863359078764915, -0.02005949057638645, -0.010171634145081043, 0.03692648932337761, -0.07076690346002579, 0.008371422998607159, 0.011971844360232353, 0.05409500002861023, -0.020236851647496223, 0.0006268590805120766, 0.01464112289249897, 0.0063406433910131454, -0.0029818760231137276, -0.07328542321920395, -0.03004489652812481, -0.0053961980156600475, 0.013851867988705635, 0.06555250287055969, -0.033804941922426224, 0.023624440655112267, -0.043382417410612106, 0.01363016664981842, 0.007994531653821468, -0.01797550357878208, -0.048313044011592865, -0.022294234484434128, 0.019137214869260788, 0.0036713655572384596, 0.02405010536313057, -0.0034873539116233587, 0.020290059968829155, 0.025202950462698936, -0.004864116199314594, -0.013443938456475735, 0.0285373292863369, 0.01761191338300705, 0.041183143854141235, 0.005538086406886578, 0.010233710519969463, -0.008065476082265377, -0.04802926629781723, -0.005546954460442066, -0.01874702237546444, 0.030452825129032135, -0.043205056339502335, -0.005498180631548166, -0.030080368742346764, -0.014029228128492832, 0.01830361969769001, 0.07491714507341385, 0.008641897700726986, 0.001221571583300829, 0.03201359882950783, 0.0007244074367918074, -0.02454671449959278, 0.01950967311859131, 0.0038620284758508205, -0.006970273796468973, -0.009692760184407234, -0.023677648976445198, 0.021105919033288956, 0.05902562662959099, -0.020112698897719383, 0.005360725801438093, -0.034993257373571396, -0.03717479482293129, -0.008819258771836758, -0.032723043113946915, -0.021247807890176773, 0.05029948428273201, -0.030186783522367477, 0.014339609071612358, 0.014995844103395939, 0.0010092930169776082, -0.001508674118667841, 0.023943688720464706, 0.01627284102141857, 0.00250078528188169, -0.0049927025102078915, -0.007755094673484564, 0.028501858934760094, 0.03135736286640167, -0.03371626138687134, 0.010118425823748112, 0.01382526382803917, 0.034106455743312836, -0.04497866332530975, -0.04671679809689522, 0.03618157282471657, -0.010943152941763401, -0.04827757179737091, -0.008823692798614502, -0.007254051044583321, 0.01417111698538065, 0.028413178399205208, -0.04373713955283165, -0.01048201508820057, 0.003347682533785701, -0.028377706184983253, -0.03470947965979576, -0.03767140582203865, -0.0405091755092144, 0.015235280618071556, -0.003766697132959962, -0.03476268798112869, 0.022453859448432922, 0.0074846199713647366, -0.06906424462795258, 0.01697341538965702, -0.06906424462795258, 0.04501413553953171, -0.0607282891869545, 0.010748055763542652, 0.008384725078940392, 0.041254088282585144, 0.025256158784031868, -0.014463761821389198, -0.016361521556973457, -0.02424520254135132, 0.023695385083556175, 0.023500287905335426, 0.009958800859749317, -0.023003676906228065, -0.04760359972715378, -0.011226929724216461, 0.015155468136072159, -0.012441850267350674, -0.03838084638118744, 0.0334324836730957, -0.029051676392555237, 0.06289208680391312, 0.035933271050453186, -0.007817171514034271, 0.06413361430168152, -0.004285477101802826, 0.029122620820999146, -0.03192491829395294, 0.023784063756465912, -0.04827757179737091, 0.012095997110009193, 0.026994291692972183, -0.06431097537279129, -0.03795517981052399, 0.010304654017090797, -0.04334694519639015, 0.017283795401453972, -0.03710385039448738, 0.050264012068510056, 0.05164742469787598, -0.03880651295185089, 0.034425705671310425, 0.014100172556936741, 0.02000628225505352, -0.03547213226556778, 0.001997524406760931, -0.060231681913137436, 0.038912929594516754, 0.02827128954231739, 0.00350952404551208, -0.00778169883415103, 0.01810852251946926, 0.02321651019155979, 0.02481275610625744, 0.08562972396612167, -0.028732426464557648, 0.007981229573488235, -0.011031833477318287, 0.01855192519724369, 0.040792953222990036, -0.017337003722786903, -0.05863543599843979, -0.01565207913517952, 0.04093484207987785, 0.06658118963241577, 0.14671273529529572, 0.0064780982211232185, 0.043453361839056015, 0.049270790070295334, 0.0021172428969293833, -0.0003245145780965686, 0.018534189090132713, -0.01527075283229351, 0.003806603141129017, -0.0010519704082980752, -0.028892051428556442, -0.010508619248867035, 0.004394110292196274, -0.043453361839056015, -0.006251963321119547, 0.01911947876214981, 0.028182609006762505, -0.018835702911019325, 0.020981766283512115, 0.028129400685429573, -0.03614610433578491, 0.03414192795753479, -0.036394406110048294, -0.01849871687591076, -0.04260202869772911, 0.007054520305246115, -0.03172982111573219, -0.04157333821058273, -0.006331775337457657, -0.020715724676847458, 0.034567590802907944, -0.02600107342004776, -0.04058011993765831, -0.033733997493982315, -0.03224416822195053, 0.0031969258561730385, -0.03274077922105789, 0.079315684735775, 0.008344818837940693, -0.0018800230463966727, 0.009896724484860897, -0.02663957141339779, 0.0372457392513752, 0.02209913730621338, -0.004021652974188328, -0.03944500908255577, -0.006110074929893017, 0.07257597893476486, 0.010623903945088387, 0.0364653505384922, 0.03564949333667755, 0.0026537589728832245, 0.022453859448432922, -0.000905647873878479, -0.0429212786257267, 0.006283001508563757, 0.010552959516644478, 0.002800081390887499, 0.05483991652727127, 0.010801264084875584, 0.040225397795438766, 0.05654257908463478, 0.018817966803908348, 0.04363072291016579, 0.002558427629992366, 0.05370480939745903, -0.018977589905261993, 0.05029948428273201, -0.06668760627508163, 0.018587397411465645, -0.01919042319059372, 0.019279103726148605, -0.006460362114012241, -0.011732407845556736, -0.054378777742385864, 0.017070963978767395, 0.026160696521401405, 0.05459161102771759, -0.05193120241165161, 0.004824209958314896, -0.02575276792049408, 0.01653001271188259, -0.004074861295521259, 0.03110905922949314, 0.03513514623045921, 0.008273874409496784, -0.02796977572143078, 0.011200325563549995, -0.0445529967546463, -0.015660947188735008, -0.012805439531803131, 0.013044876977801323, 0.036961961537599564, -0.012778835371136665, 0.03614610433578491, 0.0619698129594326, -0.031215475872159004, -0.018143994733691216, -0.07179559767246246, -0.03710385039448738, 0.05902562662959099, 0.0072983913123607635, -0.06434644758701324, 0.009284830652177334, 0.031073587015271187, -0.0019099526107311249, -0.022542539983987808, -0.02770373597741127, -0.0033255123998969793, 0.05299536511301994, 0.03710385039448738, -0.006730836816132069, 0.02057383581995964, 0.007932455278933048, -0.027242597192525864, 0.018002107739448547, 0.04469488561153412, 0.052037619054317474, 0.04075748100876808, 0.027242597192525864, 0.01480074692517519, 0.047568127512931824, -0.051966674625873566, -0.01849871687591076, -0.004744397476315498, -0.037777818739414215, -0.10599073022603989, 0.00007614037895109504, -0.039090290665626526, 0.01539490558207035, -0.016441334038972855, -0.005351857747882605, 0.06016073748469353, 0.024458035826683044, 0.03428381681442261, 0.0011184806935489178, 0.05448519438505173, -0.029938479885458946, 0.06952537596225739, 0.07190201431512833, 0.008526613935828209, 0.06204075738787651, -0.03325512260198593, 0.0283422339707613, -0.024653131142258644, -0.07002198696136475, 0.003019565250724554, -0.017824746668338776, -0.03529477119445801, 0.008358120918273926, 0.02639126591384411, -0.007209710776805878, 0.013541486114263535, 0.011759012006223202, 0.003622591495513916, -0.0036891016643494368, 0.04739077016711235, 0.024511242285370827, 0.003977312706410885, 0.017000019550323486, 0.02663957141339779, -0.03155246004462242, -0.007706320844590664, -0.013612430542707443, -0.017505496740341187, 0.06917065382003784, 0.013727715238928795, -0.04008350893855095, 0.017824746668338776, -0.036891017109155655, 0.014339609071612358, -0.02720712497830391, 0.06282114237546921, 0.06289208680391312, -0.028484122827649117, 0.007848208770155907, 0.02222329005599022, 0.08570066839456558, -0.06434644758701324, -0.009683892130851746, 0.0246886033564806, 0.011670331470668316, 0.03479816019535065, 0.012495058588683605, 0.03376946970820427, 0.039090290665626526, 0.07058954238891602, 0.013186764903366566, -0.0632113367319107, -0.02353576011955738, -0.036004215478897095, 0.004267740994691849, 0.0007870379486121237, -0.04093484207987785, 0.09620042145252228, 0.03485136851668358, 0.1084737777709961, 0.012636947445571423, -0.023872744292020798, 0.0241033136844635, -0.02385500818490982, -0.0906667709350586, 0.031587932258844376, -0.00987898837774992, -0.08711955696344376, -0.017381343990564346, -0.03628798946738243, 0.019988546147942543, -0.036571767181158066, 0.034230608493089676, 0.04171522706747055, -0.014729802496731281, 0.0026980990078300238, -0.009896724484860897, 0.02859053760766983, -0.04959003999829292, -0.00333659746684134, 0.005750919226557016, -0.04575905203819275, -0.015678681433200836, 0.0538821667432785, -0.04146692156791687, 0.018019843846559525, -0.018480980768799782, -0.026834668591618538, -0.028821107000112534, 0.004966098349541426, 0.018135126680135727, -0.02802298404276371, 0.012734495103359222, -0.009524267166852951, 0.0425310879945755, 0.03306002542376518, 0.012149205431342125, 0.02348255179822445, -0.024653131142258644, 0.06165056675672531, -0.03667818382382393, -0.01924363151192665, 0.03557854890823364, 0.052676115185022354, -0.020981766283512115, 0.013585826382040977, 0.011306742206215858, -0.009169545955955982, -0.10627450793981552, -0.0441628061234951, 0.06264378875494003, 0.0034164097160100937, -0.046362075954675674, -0.0009943281766027212, -0.015421509742736816, -0.020609308034181595, -0.05533652752637863, -0.05643616244196892, -0.01211373321712017, -0.05015759542584419, 0.009009921923279762, 0.07321447879076004, -0.01825041137635708, 0.03791970759630203, 0.0029663569293916225, 0.03472721576690674, -0.00021698967611882836, 0.014135644771158695, -0.0457945242524147, 0.005258743651211262, -0.10145029425621033, -0.01135995052754879, -0.05696824565529823, 0.10428807139396667, 0.017337003722786903, 0.06917065382003784, -0.051966674625873566, -0.026302585378289223, 0.028306761756539345, -0.031836237758398056, 0.026550890877842903, -0.0001013588480418548, -0.07810963690280914, -0.008287176489830017, 0.028608273714780807, -0.0003120439068879932, -0.0036580637097358704, 0.017620781436562538, -0.06509136408567429, 0.014685462228953838, -0.025610879063606262, 0.05824524164199829, -0.009666156023740768, -0.036004215478897095, 0.03249247372150421, 0.024156522005796432, -0.0362347811460495, -0.02222329005599022, 0.041183143854141235, -0.009364643134176731, 0.027721472084522247, -0.050512317568063736, -0.07378203421831131, 0.01641472987830639, 0.006757440976798534, 0.018782494589686394, -0.010242578573524952, 0.0029951781034469604, 0.005759787280112505, 0.011617123149335384, -0.042885806411504745, 0.00861086044460535, -0.007098860573023558, -0.014774142764508724, 0.001895542023703456, -0.012149205431342125, -0.03206680715084076, 0.03541892394423485, 0.017434552311897278, -0.03937406837940216, -0.0063761156052351, 0.0003048386424779892, -0.022453859448432922, -0.019775712862610817, -0.01899532601237297, -0.007493488024920225, 0.027721472084522247, 0.04728435352444649, -0.06282114237546921, 0.004274392034858465, -0.028235817328095436, 0.016884734854102135, 0.046539437025785446, 0.003321078373119235, 0.03586232662200928, 0.07732924818992615, -0.0014177768025547266, 0.023376135155558586, -0.02279084548354149, -0.038522735238075256, 0.07810963690280914, -0.014153380878269672, 0.02007722668349743, -0.007342731114476919, -0.060231681913137436, -0.07335636764764786, -0.027473166584968567, -0.018693814054131508, 0.0425310879945755, -0.012450718320906162, -0.0038731133099645376, 0.02555767074227333, 0.007356033194810152, -0.04157333821058273, 0.054378777742385864, 0.011404290795326233, -0.07626508176326752, -0.05636521801352501, -0.022365178912878036, 0.015137732028961182, 0.0012271141167730093, 0.01956288143992424, -0.011182589456439018, -0.020733460783958435, 0.06317586451768875, -0.04504960775375366, 0.015093391761183739, -0.044411107897758484, 0.027490902692079544, 0.029991688206791878, -0.09520719945430756, 0.021620264276862144, -0.05838713049888611, 0.013142424635589123, 0.004509394988417625, -0.026550890877842903, -0.009293698705732822, 0.027685999870300293, -0.034815896302461624, 0.01747889257967472, -0.02518521435558796, -0.07161823660135269, -0.003352116560563445, 0.06590721756219864, -0.007555563934147358, 0.01736360788345337, -0.0013490495039150119, 0.045156024396419525, 0.01572302170097828, 0.0013457239838317037, -0.026036545634269714, 0.009284830652177334, -0.07101520895957947, 0.014703198336064816, -0.011555046774446964, 0.03541892394423485, -0.09499436616897583, -0.011306742206215858, -0.004409629385918379, -0.0046512833796441555, -0.018658341839909554, -0.014428289607167244, -0.01938552036881447, -0.03944500908255577, -0.03635893389582634, 0.0017048793379217386, 0.035241562873125076, 0.008207364939153194, 0.0024741811212152243, -0.011404290795326233, -0.01082786824554205 ]
717,520
pytorch_optimizer.optimizer.shampoo_utils
precondition_block
Perform a preconditioning operation on a single gradient block. Loop invariant: the dimension to be preconditioned is first We keep all axes in the same cyclic order they were originally.
@staticmethod def precondition_block( partitioned_grad: torch.Tensor, should_preconditioned_dims: List[bool], pre_conditioners_for_grad: List[torch.Tensor], ) -> torch.Tensor: r"""Perform a preconditioning operation on a single gradient block. Loop invariant: the dimension to be preconditioned is first We keep all axes in the same cyclic order they were originally. """ rank: int = len(partitioned_grad.shape) roll: Tuple[int, ...] = (*tuple(range(1, rank)), 0) i: int = 0 for should_precondition_dim in should_preconditioned_dims: if not should_precondition_dim: partitioned_grad = torch.permute(partitioned_grad, roll) continue partitioned_grad = torch.tensordot(partitioned_grad, pre_conditioners_for_grad[i], dims=[[0], [0]]) i += 1 return partitioned_grad
(partitioned_grad: torch.Tensor, should_preconditioned_dims: List[bool], pre_conditioners_for_grad: List[torch.Tensor]) -> torch.Tensor
[ -0.025844702497124672, -0.011940357275307178, -0.056277837604284286, 0.032518789172172546, -0.005609534680843353, 0.034065645188093185, 0.015512035228312016, -0.02587946318089962, -0.004049640614539385, -0.018336355686187744, 0.04807427525520325, 0.012166302651166916, -0.015868334099650383, -0.014530041255056858, -0.06117912009358406, -0.01944870315492153, 0.010732416994869709, 0.020404627546668053, 0.03244926780462265, -0.02799987606704235, -0.03102407045662403, -0.06545470654964447, 0.03168452903628349, 0.04873473197221756, -0.014251953922212124, 0.021238887682557106, -0.0013611051253974438, 0.005344483070075512, -0.004390731453895569, 0.005635605193674564, 0.007973273284733295, 0.00816880352795124, 0.015355612151324749, 0.06427283585071564, 0.03900168836116791, 0.04021831974387169, 0.026331353932619095, 0.027530604973435402, -0.0569382943212986, 0.026852767914533615, -0.009341982193291187, -0.02125626802444458, 0.052176058292388916, -0.0498470775783062, 0.00865980051457882, 0.0162420142441988, 0.03667271137237549, -0.006117912009358406, -0.024854017421603203, 0.038341231644153595, 0.07046027481555939, -0.06618468463420868, 0.052037015557289124, -0.01771935075521469, -0.047031451016664505, -0.011497155763208866, 0.055930230766534805, -0.02401975728571415, -0.0082296347245574, -0.011410254053771496, 0.04414629936218262, -0.02285526879131794, -0.022525040432810783, 0.005652985535562038, -0.004770928528159857, -0.03924501687288284, -0.048456646502017975, -0.029651017859578133, -0.00680443923920393, 0.0018086512573063374, -0.038341231644153595, 0.028312724083662033, -0.00642641494050622, -0.0011612301459535956, -0.030433136969804764, -0.08245276659727097, -0.0015316505450755358, -0.039592623710632324, 0.0342915914952755, -0.03980118781328201, 0.011097406037151814, 0.002056322293356061, -0.024593312293291092, -0.005314067006111145, 0.04640575498342514, -0.03213641792535782, -0.015294780023396015, 0.006369928363710642, 0.058050643652677536, -0.05266270786523819, 0.011332041583955288, 0.019709410145878792, 0.018892530351877213, 0.029737919569015503, 0.05596499145030975, 0.06813129037618637, -0.0030480932909995317, -0.030172429978847504, -0.027843452990055084, -0.0028286653105169535, 0.023654768243432045, 0.04320775344967842, -0.0005154384416528046, -0.02925126813352108, 0.06729703396558762, 0.001715231453999877, -0.04869997128844261, -0.04126114770770073, 0.0013274304801598191, -0.09976368397474289, -0.010749797336757183, -0.07612629234790802, -0.05447027459740639, -0.02320287749171257, 0.0025962020736187696, -0.006991278845816851, -0.004077883902937174, -0.007816849276423454, 0.010263144969940186, -0.004736167844384909, 0.06420331448316574, -0.03542131930589676, -0.006061425898224115, 0.03498680889606476, -0.01788446493446827, 0.006700156722217798, 0.03396136313676834, 0.09121251106262207, 0.0009553806157782674, -0.0960790291428566, 0.012566052377223969, 0.015877025201916695, -0.03356161341071129, -0.012513911351561546, 0.003150203265249729, -0.02535805106163025, -0.004362488631159067, 0.01698068156838417, 0.011045265011489391, -0.04911709949374199, 0.03900168836116791, 0.0022268679458647966, -0.02820844203233719, 0.05440075322985649, -0.02614017017185688, 0.006395998876541853, 0.0042755864560604095, -0.014755986630916595, 0.023602627217769623, 0.01749340444803238, 0.03788934275507927, 0.046683840453624725, 0.01745864376425743, -0.02549709379673004, -0.016659144312143326, -0.013191748410463333, -0.05460931733250618, -0.008455580100417137, 0.005835480056703091, -0.016754737123847008, -0.050438012927770615, -0.058050643652677536, -0.02320287749171257, 0.045606255531311035, -0.01731960102915764, -0.012453079223632812, 0.013044014573097229, -0.049742795526981354, -0.048839014023542404, 0.05551309883594513, 0.07675198465585709, -0.022976931184530258, 0.01006327010691166, 0.016085589304566383, -0.05596499145030975, 0.021308409050107002, -0.006183088757097721, -0.020404627546668053, -0.06865270435810089, -0.04755286127328873, 0.035195376724004745, 0.009706971235573292, 0.018353736028075218, -0.040635451674461365, 0.0029655362013727427, 0.036916036158800125, -0.012279274873435497, -0.01174917258322239, 0.04160875454545021, 0.039592623710632324, -0.06336905807256699, 0.007430134806782007, 0.015242638997733593, 0.02678324654698372, 0.021934105083346367, -0.01142763439565897, 0.023915475234389305, 0.0235504861921072, -0.018597062677145004, 0.0014393170131370425, 0.012626883573830128, -0.021412692964076996, 0.038132667541503906, 0.034500159323215485, 0.016528790816664696, 0.0217776820063591, 0.0008836863562464714, 0.059997253119945526, -0.000313662487315014, 0.011340731754899025, -0.08954398334026337, 0.0032783839851617813, 0.05200225114822388, 0.06246527284383774, -0.008064520545303822, 0.0027743515092879534, 0.010854080319404602, 0.0222121924161911, 0.0023224602919071913, 0.008916161954402924, -0.008129697293043137, -0.033631134778261185, 0.0418173186480999, -0.012044639326632023, 0.024002376943826675, -0.023341920226812363, 0.008994373492896557, -0.03088502772152424, 0.0049316976219415665, 0.00865980051457882, -0.02233385480940342, -0.018475400283932686, -0.013817443512380123, -0.02617493085563183, 0.04105257987976074, 0.006004939321428537, -0.034673962742090225, -0.025427572429180145, 0.05068134143948555, 0.06204814091324806, -0.016311535611748695, 0.002741763135418296, -0.026418257504701614, 0.019205378368496895, 0.03416993096470833, 0.021395312622189522, 0.017041513696312904, 0.014451829716563225, 0.00602666474878788, 0.031997375190258026, -0.09830372780561447, -0.0012937559513375163, -0.032379746437072754, 0.01892729103565216, 0.019170615822076797, 0.052558425813913345, 0.08836212009191513, -0.009837324731051922, 0.04115686193108559, 0.00012621181667782366, -0.015590247698128223, -0.03632510453462601, 0.0011020280653610826, 0.009446265175938606, -0.009063895791769028, -0.01857968233525753, 0.050229448825120926, 0.054678838700056076, -0.013400313444435596, 0.015512035228312016, 0.03952310234308243, 0.09684376418590546, 0.021117225289344788, -0.006508972030133009, 0.028834136202931404, 0.02514948509633541, 0.009194248355925083, 0.050438012927770615, 0.004775273613631725, 0.01784970425069332, 0.06305620819330215, -0.01948346383869648, -0.059997253119945526, 0.026644201949238777, -0.0018336356151849031, -0.014138981699943542, -0.019726790487766266, -0.03253616765141487, 0.010028509423136711, 0.018823007121682167, -0.026366114616394043, -0.003871491178870201, 0.0703212320804596, -0.037089843302965164, 0.05429647117853165, -0.01901419274508953, -0.006365583278238773, -0.008690215647220612, 0.0072693657130002975, -0.017519475892186165, 0.07904620468616486, -0.015268709510564804, -0.03684651479125023, 0.00981125421822071, -0.009793873876333237, -0.023741669952869415, 0.03152810409665108, 0.006904376670718193, -0.028764614835381508, -0.04762238264083862, 0.017232699319720268, -0.029146984219551086, 0.0010547749698162079, 0.002005267422646284, 0.048456646502017975, -0.08266133815050125, 0.030954549089074135, -0.00814707763493061, 0.04025308042764664, 0.03102407045662403, 0.008738012053072453, 0.04981231689453125, 0.03206689655780792, 0.07849003374576569, -0.022107910364866257, -0.00653504254296422, 0.029842201620340347, -0.004360315855592489, -0.07911572605371475, 0.03267521411180496, -0.06211766600608826, 0.047379057854413986, -0.011549296788871288, 0.03352685272693634, -0.024906158447265625, -0.006960863247513771, 0.06952172517776489, 0.008959612809121609, -0.005944107659161091, -0.06889603286981583, 0.05314936116337776, -0.050438012927770615, 0.013443764299154282, 0.022837888449430466, -0.032119039446115494, 0.0046449205838143826, 0.01585964486002922, 0.028503907844424248, 0.01075848750770092, 0.08850116282701492, 0.009359362535178661, -0.001024902332574129, -0.008155767805874348, 0.032988060265779495, 0.025775181129574776, -0.030189810320734978, -0.035664647817611694, -0.0280346367508173, -0.0056051891297101974, 0.025549234822392464, 0.12506958842277527, -0.011940357275307178, 0.047587621957063675, 0.06170053407549858, 0.03590797260403633, -0.030711224302649498, -0.04505008086562157, 0.024176180362701416, -0.027930354699492455, -0.012739856727421284, -0.0027004845906049013, -0.030641701072454453, 0.0462319478392601, -0.008029759861528873, -0.019500844180583954, -0.031510721892118454, -0.06747084110975266, -0.002357221208512783, 0.028538670390844345, 0.06333429366350174, -0.0084468899294734, -0.016042139381170273, 0.029216505587100983, -0.02186458371579647, -0.05189796909689903, -0.008950922638177872, -0.014130291528999805, -0.039418820291757584, 0.04981231689453125, -0.024784496054053307, 0.05579118803143501, -0.03227546066045761, 0.027634887024760246, 0.0060961865819990635, -0.0816880315542221, 0.016754737123847008, 0.03611653670668602, 0.05283651500940323, -0.001011323882266879, -0.04199112579226494, -0.04619718715548515, -0.034326352179050446, -0.029355550184845924, 0.0023094250354915857, 0.011523226276040077, -0.06117912009358406, 0.009420194663107395, 0.08328703045845032, 0.07066883891820908, 0.08286990225315094, -0.0040800562128424644, 0.032935917377471924, 0.012583432719111443, 0.00015547338989563286, -0.007868990302085876, -0.011132166720926762, -0.015485964715480804, 0.010914911516010761, 0.000627324974630028, 0.032032135874032974, 0.05346221104264259, -0.037472210824489594, 0.06267383694648743, -0.024732355028390884, -0.042443014681339264, -0.028625572100281715, -0.03383970260620117, 0.047240015119314194, -0.05596499145030975, 0.011288590729236603, -0.021534355357289314, -0.011479775421321392, -0.016711285337805748, 0.017258768901228905, -0.012739856727421284, 0.0032001719810068607, 0.014295405708253384, 0.10824532806873322, 0.0010574907064437866, -0.015372992493212223, 0.05374029651284218, 0.0006696897908113897, -0.014208503067493439, -0.07682151347398758, -0.00981125421822071, 0.005831134971231222, -0.026713723316788673, 0.010028509423136711, -0.06642801314592361, 0.022924790158867836, -0.01231403648853302, 0.02972053922712803, 0.05679925158619881, 0.0053575183264911175, -0.02242075651884079, 0.020682714879512787, -0.013278650119900703, -0.02407189831137657, -0.00268962187692523, 0.027356799691915512, 0.03437849506735802, 0.03590797260403633, -0.05370553582906723, 0.010037199594080448, 0.056451644748449326, 0.01041087880730629, 0.0002641011087689549, 0.0001342230971204117, -0.006952173076570034, 0.011062645353376865, 0.05641688406467438, -0.03279687464237213, -0.003545608138665557, 0.015181807801127434, 0.000668060383759439, -0.014599562622606754, -0.04397249221801758, 0.0622219480574131, 0.023533105850219727, 0.003610784886404872, -0.03076336532831192, -0.0075561427511274815, -0.007964583113789558, 0.05134179815649986, -0.004379868973046541, -0.06486377120018005, -0.052037015557289124, 0.06889603286981583, -0.021708160638809204, 0.029911722987890244, -0.019552987068891525, -0.06893079727888107, 0.05669496953487396, 0.048109035938978195, -0.00011555271339602768, -0.02561875618994236, 0.0222121924161911, -0.02070009522140026, 0.08064520359039307, -0.024662833660840988, 0.030137669295072556, 0.04995136335492134, -0.05088990554213524, 0.014660394750535488, 0.026539919897913933, -0.03980118781328201, 0.03201475739479065, 0.036186058074235916, 0.004718787502497435, -0.00514026265591383, 0.00500121945515275, 0.008755392394959927, -0.013834823854267597, 0.016494030132889748, -0.02765226736664772, 0.01875348575413227, -0.009915536269545555, 0.045988623052835464, 0.04091353714466095, -0.010715036652982235, 0.026192311197519302, 0.0364641472697258, -0.018597062677145004, -0.004662300925701857, 0.016598312184214592, 0.03554298356175423, 0.04470247030258179, -0.05919775366783142, 0.01404338888823986, -0.010619443841278553, -0.04696192592382431, 0.00031121837673708797, 0.062291469424963, 0.046510037034749985, -0.03517799451947212, 0.012635573744773865, -0.017519475892186165, 0.008646764792501926, -0.04369440674781799, -0.038341231644153595, 0.04605814442038536, 0.03067646361887455, 0.06194385886192322, -0.016754737123847008, -0.016824258491396904, 0.0009618983021937311, 0.03128477931022644, -0.006452485453337431, -0.05971916392445564, -0.008094936609268188, -0.02514948509633541, -0.00006840150308562443, -0.05057705566287041, -0.0022811817470937967, 0.05144608020782471, -0.010862770490348339, 0.0012111988617107272, -0.0002708903339225799, -0.005396624095737934, 0.043868210166692734, -0.007286746054887772, -0.028364865109324455, 0.0533926859498024, -0.032518789172172546, 0.0012035949621349573, -0.0244890283793211, -0.0006946741486899555, -0.01715448684990406, -0.004399422090500593, 0.01625070348381996, -0.0012372694909572601, -0.02911222353577614, 0.03663795068860054, 0.04762238264083862, -0.004475461319088936, -0.03088502772152424, 0.03142382204532623, -0.08154898881912231, -0.02169077843427658, -0.06173529475927353, 0.007673460990190506, -0.06274335831403732, 0.018371116369962692, -0.03375279903411865, -0.04174779728055, -0.006117912009358406, -0.030450517311692238, 0.03973166644573212, 0.02674848586320877, 0.00796892773360014, -0.012835449539124966, 0.0034348079934716225, 0.006217849440872669, -0.03550822287797928, 0.040114037692546844, -0.021916724741458893, -0.0065133171156048775, -0.029042702168226242, -0.02541019208729267, 0.010098030790686607, -0.06681038439273834, -0.004597124177962542, 0.04480675235390663, 0.04289490729570389, -0.0316150076687336, -0.07494442164897919, -0.011392873711884022, 0.028243202716112137, 0.0363946259021759, -0.09496667981147766, -0.002335495548322797, 0.014868959784507751, -0.022142671048641205, 0.011210378259420395, -0.057181622833013535, -0.050264209508895874, -0.09948559105396271, 0.018162552267313004, 0.1030312031507492, 0.031510721892118454, -0.028052017092704773, -0.007221569772809744, -0.008412129245698452, -0.023515725508332253, -0.03300544247031212, -0.012566052377223969, 0.053114600479602814, -0.1458565890789032, 0.0015989997191354632, 0.008346952497959137, -0.03085026703774929, 0.03337043151259422, 0.040809255093336105, -0.035490840673446655, -0.009541857056319714, -0.04421582072973251, 0.024697594344615936, -0.0013665364822372794, -0.03768077865242958, -0.09135155379772186, -0.022646702826023102, 0.02852129004895687, -0.009950296953320503, -0.02381119132041931, -0.013269959948956966, -0.041191622614860535, 0.03569940850138664, -0.02683538757264614, 0.059302035719156265, 0.004614504519850016, -0.02695704996585846, 0.09044776856899261, 0.0008239410817623138, 0.004540638066828251, -0.003610784886404872, 0.04744857922196388, 0.030902408063411713, 0.019639888778328896, -0.009993748739361763, -0.030085528269410133, 0.08453842252492905, -0.021881964057683945, -0.018162552267313004, -0.016224633902311325, -0.03144120052456856, -0.0006696897908113897, 0.027200376614928246, -0.010897531174123287, -0.005696436855942011, -0.04696192592382431, -0.032258082181215286, 0.01805826835334301, -0.07244163751602173, -0.05982344597578049, 0.061457209289073944, -0.03111097402870655, -0.01965726912021637, -0.04942994937300682, -0.029842201620340347, -0.010167553089559078, 0.007656080182641745, -0.029007941484451294, -0.03097192943096161, 0.062360990792512894, 0.020769616588950157, -0.004810034763067961, -0.03097192943096161, -0.04699669033288956, -0.035838451236486435, -0.002032424323260784, 0.0032349328976124525, -0.010367427952587605, 0.06277812272310257, -0.018093029037117958, -0.0042386529967188835, -0.040114037692546844, -0.013435074128210545, 0.033978745341300964, -0.010610753670334816, 0.00009233354649040848, 0.021829823032021523, -0.06941744685173035, -0.043485842645168304, 0.019796311855316162, -0.038862645626068115, 0.02549709379673004, -0.011879525147378445, -0.030832886695861816, -0.006626289803534746, 0.01936180144548416, 0.011305971071124077, 0.018683964386582375, 0.02852129004895687, -0.034621819853782654, -0.03841075673699379, -0.02285526879131794, -0.015364302322268486, -0.012096780352294445, 0.022611942142248154, 0.0006963035557419062, -0.009237700141966343, 0.054157424718141556, -0.059162989258766174, 0.005053360480815172, -0.06138768792152405, -0.02713085524737835, 0.047587621957063675, -0.04053116589784622, -0.007551797665655613, -0.021291028708219528, 0.02462807297706604, 0.015711911022663116, -0.01698068156838417, -0.025045203045010567, 0.045432448387145996, -0.008520756848156452, 0.04522388428449631, 0.011479775421321392, -0.054331231862306595, 0.027374180033802986, 0.048109035938978195, 0.019066333770751953, -0.032119039446115494, -0.039592623710632324, -0.003836730495095253, 0.03681175410747528, -0.03253616765141487, -0.011097406037151814, 0.06378618627786636, -0.02514948509633541, 0.044563427567481995, 0.021586496382951736, -0.027356799691915512, -0.047205254435539246, 0.03105883300304413, -0.05012516677379608, 0.028451766818761826, -0.03517799451947212, -0.08989159762859344, -0.06413379311561584, -0.03498680889606476, -0.019170615822076797, 0.03768077865242958, 0.05457455664873123, -0.007221569772809744, -0.009637449868023396, 0.022525040432810783, 0.01347852498292923 ]
717,521
pytorch_optimizer.optimizer.shampoo_utils
preconditioned_grad
Precondition the gradient. :param grad: torch.Tensor. a gradient tensor to precondition.
def preconditioned_grad(self, grad: torch.Tensor) -> torch.Tensor: r"""Precondition the gradient. :param grad: torch.Tensor. a gradient tensor to precondition. """ if len(self.pre_conditioners) == 0: return grad reshaped_grad = torch.reshape(grad, self.transformed_shape) partitioned_grads = self.partitioner.partition(reshaped_grad) pre_cond_partitioned_grads: List[torch.Tensor] = [ self.precondition_block( partitioned_grad, self.should_precondition_dims, self.pre_conditioners[i * self.rank:(i + 1) * self.rank] # fmt: skip ) for i, partitioned_grad in enumerate(partitioned_grads) ] merged_grad = self.partitioner.merge_partitions(pre_cond_partitioned_grads) return torch.reshape(merged_grad, self.original_shape)
(self, grad: torch.Tensor) -> torch.Tensor
[ -0.03749656677246094, -0.003551074070855975, -0.05151008442044258, 0.013675319962203503, 0.005805724300444126, -0.007722176611423492, 0.008363884873688221, -0.002861671382561326, 0.02941451221704483, -0.048527009785175323, 0.04762514680624008, -0.006148257292807102, 0.0038068899884819984, 0.0036746461410075426, -0.05185695365071297, -0.02337898686528206, -0.004942886997014284, 0.02556426450610161, -0.01469858456403017, -0.033160701394081116, -0.05078165978193283, -0.09400156885385513, 0.02095090225338936, 0.046341732144355774, -0.012417919002473354, -0.000772868050262332, -0.0004227469034958631, -0.019147181883454323, 0.02239041030406952, 0.0029310451354831457, -0.02044794149696827, 0.0172394011169672, 0.007201872766017914, 0.023413674905896187, 0.034600209444761276, 0.029275765642523766, 0.015227559953927994, -0.041450876742601395, -0.036386583000421524, -0.03815561905503273, -0.023777887225151062, -0.009807728230953217, 0.009937804192304611, -0.023274926468729973, 0.02070809341967106, 0.03199869021773338, 0.005138000939041376, -0.02211291529238224, -0.03111417219042778, 0.0645870566368103, 0.04526643827557564, 0.004925543442368507, 0.0013755534309893847, -0.03331679105758667, -0.024749120697379112, -0.019771547988057137, 0.02962263487279415, -0.018158605322241783, 0.0048258183524012566, -0.024870526045560837, 0.08213863521814346, -0.036802828311920166, -0.005250733345746994, -0.02452365681529045, 0.009946475736796856, -0.015747863799333572, -0.026934396475553513, -0.0490473136305809, 0.02939716912806034, -0.023274926468729973, -0.05959213897585869, 0.022477127611637115, -0.015626460313796997, -0.01702260784804821, 0.0052030389197170734, -0.07651935517787933, 0.01336313784122467, -0.032969921827316284, 0.005844746716320515, -0.05320974439382553, 0.04065307602286339, -0.011420669965445995, 0.010189284570515156, -0.001331110717728734, 0.038086242973804474, -0.05501346290111542, -0.025217395275831223, -0.01971951685845852, 0.011741524562239647, -0.04890856519341469, 0.042699605226516724, 0.008572006598114967, 0.00802568718791008, 0.0010590351885184646, 0.08831290900707245, 0.042213987559080124, 0.00022438104497268796, 0.0031413347460329533, -0.030021533370018005, 0.024731777608394623, 0.000486971897771582, 0.08824353665113449, -0.042213987559080124, -0.0524466298520565, 0.06757012754678726, -0.03158244490623474, -0.01801985688507557, -0.035623472183942795, -0.012339873239398003, -0.06004306674003601, 0.009443514980375767, -0.0844973474740982, -0.023639138787984848, -0.027315953746438026, 0.02894623950123787, 0.002918037585914135, -0.02261587604880333, -0.04596017673611641, -0.003741852007806301, 0.019372647628188133, 0.059418704360723495, 0.010969740338623524, -0.02261587604880333, 0.04620298370718956, -0.029830755665898323, -0.00023440773657057434, 0.05931464210152626, 0.053834106773138046, 0.05008792132139206, -0.07971055060625076, 0.009781712666153908, 0.023656483739614487, -0.00947820208966732, -0.02261587604880333, 0.05442378669977188, -0.030767302960157394, -0.0123832318931818, 0.01651964895427227, -0.0050079249776899815, -0.028391247615218163, 0.041450876742601395, 0.010041864588856697, 0.003254067152738571, 0.044364579021930695, -0.010648885741829872, -0.0002162512973882258, -0.01777704991400242, 0.029241077601909637, 0.008710754103958607, 0.03236290067434311, 0.05376473441720009, 0.014516478404402733, -0.0013126833364367485, -0.05563782900571823, 0.010995754972100258, -0.023274926468729973, -0.05033072829246521, -0.010648885741829872, 0.011325281113386154, -0.026934396475553513, -0.031218232586979866, -0.06129179522395134, -0.023170866072177887, 0.03215477988123894, 0.004318522289395332, -0.016129421070218086, 0.011333952657878399, -0.043878961354494095, -0.05636625364422798, 0.04672328755259514, 0.06385862827301025, -0.07790683209896088, 0.016146764159202576, 0.04353209212422371, -0.07069195061922073, 0.032969921827316284, 0.005255069117993116, 0.05258537828922272, -0.07402189821004868, 0.005220382008701563, 0.07298129051923752, 0.022234318777918816, -0.001528392662294209, -0.03590096905827522, 0.031252920627593994, 0.022771965712308884, -0.04065307602286339, -0.00862837303429842, 0.03812092915177345, 0.021783389151096344, -0.07076133042573929, -0.019997011870145798, 0.029310451820492744, 0.023483049124479294, 0.003995500039309263, -0.038537174463272095, 0.0201531033962965, 0.04977573826909065, 0.02556426450610161, 0.01605137437582016, 0.003919622395187616, -0.03477364405989647, 0.07471563667058945, 0.01326774898916483, -0.03435739874839783, 0.008359548635780811, -0.03402787446975708, 0.036386583000421524, 0.005849082954227924, -0.012591353617608547, -0.021696671843528748, 0.00711949123069644, 0.0044746133498847485, 0.02310149185359478, -0.01625082455575466, -0.00010920961358351633, 0.06198553368449211, 0.012860177084803581, -0.0013050955021753907, -0.00590544892475009, 0.005281084217131138, -0.036386583000421524, 0.04304647445678711, -0.047555774450302124, 0.010648885741829872, -0.05733748897910118, -0.005914120934903622, -0.032744456082582474, 0.002350039081647992, -0.013614618219435215, 0.01949405111372471, -0.06489923596382141, 0.03227618336677551, -0.020101072266697884, 0.09115724265575409, 0.01580856554210186, -0.03255368024110794, 0.006633874494582415, 0.04568267986178398, 0.029483886435627937, -0.0025364814791828394, 0.013371809385716915, -0.010848335921764374, 0.04495425522327423, 0.04665391519665718, -0.007687489967793226, 0.022754622623324394, 0.023170866072177887, 0.021263085305690765, 0.009781712666153908, -0.080612413585186, 0.005116321612149477, -0.04020214453339577, -0.0010687909089028835, -0.0008053870406001806, 0.060944925993680954, 0.060424622148275375, 0.016363557428121567, 0.034183964133262634, 0.0027120839804410934, -0.00711949123069644, -0.0631302073597908, 0.014074220322072506, 0.005888105370104313, 0.010674901306629181, 0.014663897454738617, 0.07096944749355316, 0.056262191385030746, -0.0027684501837939024, 0.03014293871819973, -0.028148440644145012, 0.053591299802064896, -0.019407333806157112, -0.0020443606190383434, 0.01826266571879387, 0.014637882821261883, 0.00602685334160924, 0.0326230525970459, 0.07305066287517548, 0.01996232569217682, 0.07742121815681458, -0.03232821449637413, -0.03746188059449196, 0.029744038358330727, 0.011013098992407322, -0.009920460171997547, -0.0281657837331295, -0.02259853109717369, 0.00039131188532337546, 0.027784226462244987, 0.03357694298028946, 0.010111238807439804, 0.03839842602610588, -0.07423002272844315, 0.031270261853933334, 0.014186952263116837, 0.042456794530153275, 0.001731094322167337, 0.0007403490599244833, -0.013033611699938774, 0.08650919049978256, -0.0032345557119697332, -0.04772920906543732, -0.011030442081391811, -0.06028587743639946, -0.02846062183380127, -0.008242480456829071, 0.012591353617608547, -0.03954309597611427, -0.036802828311920166, -0.03185994178056717, -0.04422583058476448, 0.01422163937240839, 0.015886612236499786, -0.0022438105661422014, -0.08512171357870102, 0.022442441433668137, -0.033941157162189484, 0.04623766988515854, 0.0038892715238034725, -0.016892531886696815, 0.06292208284139633, 0.0475904606282711, 0.05123258754611015, -0.046584539115428925, 0.007253903429955244, 0.02114167995750904, 0.016597693786025047, -0.036074403673410416, 0.04238742217421532, -0.04252617061138153, 0.007635459303855896, 0.016233481466770172, 0.03335147723555565, 0.013666648417711258, 0.009530232287943363, 0.08241613209247589, -0.0034556849859654903, -0.0006124410429038107, -0.06722325831651688, 0.03662939369678497, -0.06049399822950363, -0.009270080365240574, 0.020222477614879608, 0.013831411488354206, -0.009426171891391277, 0.003267074702307582, 0.013076970353722572, 0.01228784304112196, 0.03590096905827522, -0.006165600847452879, -0.041450876742601395, -0.028998268768191338, 0.021783389151096344, 0.007505383342504501, -0.03324741870164871, -0.021002933382987976, -0.02747204527258873, 0.03276180103421211, -0.004708750173449516, 0.08678668737411499, -0.0014514310751110315, 0.01117786206305027, 0.06541953980922699, 0.014195623807609081, -0.004981909412890673, -0.0592452697455883, 0.020864184945821762, -0.06153460592031479, 0.03239758685231209, 0.026812992990016937, -0.026084568351507187, 0.003193364944308996, -0.011273250915110111, -0.04675797373056412, -0.05539501830935478, -0.024246159940958023, -0.0034144942183047533, 0.06250584125518799, 0.023743201047182083, -0.025408172979950905, 0.0003636707260739058, -0.0022102075163275003, 0.020326538011431694, -0.06479517370462418, 0.013536572456359863, 0.010857007466256618, -0.052654750645160675, 0.025390829890966415, -0.026552841067314148, 0.02603253722190857, -0.009651636704802513, 0.005380809307098389, -0.01045810803771019, -0.05258537828922272, 0.01871359534561634, 0.07318941503763199, 0.03617846220731735, 0.010648885741829872, 0.0018514146795496345, -0.033906470984220505, -0.03909216448664665, -0.017690332606434822, -0.012660727836191654, -0.0021852762438356876, -0.059730883687734604, 0.014872019179165363, 0.03649064525961876, 0.05126727372407913, 0.09941272437572479, 0.026691589504480362, 0.00334512023255229, 0.026795649901032448, 0.03229352831840515, -0.0029050300363451242, 0.020101072266697884, -0.02696908451616764, -0.020621376112103462, -0.0014416753547266126, 0.037323132157325745, 0.03087136335670948, -0.030541837215423584, 0.04016745835542679, -0.017187371850013733, -0.06833324581384659, 0.01747353933751583, -0.025200050324201584, 0.032727114856243134, -0.05931464210152626, 0.013224390335381031, 0.022789310663938522, 0.0033559598959982395, 0.011368639767169952, 0.011255906894803047, -0.013276420533657074, 0.00408221734687686, 0.02237306721508503, 0.12390169501304626, -0.027402671054005623, -0.005931464023888111, 0.05803122743964195, -0.021228397265076637, 0.011472700163722038, -0.0032193802762776613, -0.027870943769812584, -0.004856169689446688, -0.01179355476051569, -0.021939480677247047, -0.05473596602678299, 0.00005494354627444409, -0.001214042422361672, 0.022477127611637115, 0.04498894140124321, 0.018141262233257294, -0.010804977267980576, 0.012972909957170486, -0.009348126128315926, -0.031478386372327805, -0.015851924195885658, 0.06285271048545837, 0.01606004685163498, 0.031218232586979866, -0.04519706219434738, -0.00985975842922926, 0.010752947069704533, 0.013302436098456383, 0.019303273409605026, -0.012088393792510033, -0.05421566218137741, 0.01703128032386303, 0.039785902947187424, -0.03590096905827522, -0.00595747958868742, 0.002881182823330164, -0.050226666033267975, 0.01632886938750744, -0.044572699815034866, 0.07388315349817276, 0.0701022744178772, 0.04935949295759201, -0.00961694959551096, -0.012582682073116302, -0.010015849955379963, 0.07402189821004868, 0.014230310916900635, -0.047000784426927567, -0.05497877672314644, 0.04075713828206062, -0.0011793554294854403, 0.045335810631513596, 0.003663806477561593, -0.02577238529920578, 0.04963698983192444, 0.023292269557714462, -0.03347288444638252, -0.011186533607542515, 0.007570421323180199, -0.03784343600273132, 0.03371569141745567, 0.012001676484942436, 0.023916635662317276, 0.024246159940958023, -0.07145506888628006, 0.03137432411313057, 0.01649363338947296, -0.07839245349168777, -0.026899710297584534, 0.06979009509086609, 0.025859102606773376, 0.01408289186656475, 0.003852416528388858, 0.03721906989812851, -0.02724657952785492, 0.03182525560259819, -0.006772622000426054, -0.0060788835398852825, -0.019320616498589516, 0.05841278284788132, -0.009486873634159565, -0.01702260784804821, 0.0007013262948021293, 0.06968603283166885, -0.028755461797118187, -0.022477127611637115, -0.0014817820629104972, 0.035588786005973816, 0.023483049124479294, -0.06122242286801338, 0.006885354407131672, -0.031651820987463, -0.041450876742601395, -0.007058789487928152, 0.05910652130842209, 0.01845344342291355, -0.014655225910246372, 0.03291789069771767, 0.022060884162783623, -0.002586343791335821, -0.08609294891357422, -0.036109089851379395, 0.015227559953927994, -0.00041299121221527457, 0.050712283700704575, 0.04131212830543518, 0.00040702937985770404, 0.014447104185819626, 0.02917170338332653, 0.0009137836750596762, -0.1000370904803276, 0.003176021622493863, -0.07471563667058945, -0.012860177084803581, -0.05865558981895447, 0.018175948411226273, 0.044364579021930695, 0.040722448378801346, 0.044642072170972824, 0.02190479263663292, -0.012001676484942436, 0.031218232586979866, -0.02112433686852455, -0.07957180589437485, 0.041450876742601395, -0.010440764017403126, -0.04478082060813904, -0.0009869514033198357, -0.000389414926758036, -0.008459273725748062, 0.00888852495700121, 0.005523893050849438, 0.011455357074737549, -0.011559417471289635, -0.001243309467099607, 0.07464626431465149, 0.007765535265207291, -0.014629210345447063, 0.0545625314116478, -0.025095989927649498, -0.008710754103958607, -0.035623472183942795, 0.016146764159202576, -0.042873039841651917, -0.01775970496237278, -0.021800732240080833, -0.04772920906543732, 0.017074638977646828, -0.04252617061138153, 0.07374440133571625, 0.021818075329065323, -0.05334848910570145, 0.006321691907942295, 0.021748701110482216, 0.004478949122130871, -0.06292208284139633, 0.03576222062110901, -0.04318522289395332, -0.014334372244775295, -0.027576105669140816, 0.009556247852742672, 0.0002455184003338218, -0.06271395832300186, -0.004661055747419596, 0.0665295198559761, 0.019650142639875412, -0.017586270347237587, -0.03940434753894806, -0.032727114856243134, 0.018765626475214958, 0.028529996052384377, -0.08123677968978882, -0.0006839827983640134, -0.020465286448597908, -0.057233426719903946, -0.017933139577507973, -0.016432931646704674, -0.03891872987151146, -0.11960051953792572, 0.039716530591249466, 0.028582027181982994, 0.08033491671085358, 0.02722923643887043, -0.00985975842922926, 0.015765206888318062, 0.034600209444761276, -0.0005007924628444016, -0.013631961308419704, 0.04353209212422371, -0.115576833486557, -0.005103313829749823, -0.03449614718556404, -0.012105736881494522, 0.02866874448955059, 0.045821428298950195, -0.004704414401203394, -0.014074220322072506, -0.03279648721218109, 0.016935890540480614, -0.00008475262438878417, 0.0008200205629691482, -0.08297112584114075, -0.036074403673410416, 0.030281685292720795, -0.0039261262863874435, -0.027558762580156326, -0.008784463629126549, -0.03312601521611214, 0.018106574192643166, -0.03964715451002121, 0.039716530591249466, -0.05501346290111542, -0.015409666113555431, 0.07346690446138382, -0.00033115173573605716, 0.004760780371725559, 0.005523893050849438, 0.0432199090719223, 0.004110400564968586, 0.053625985980033875, -0.004197117872536182, -0.021557923406362534, 0.08914539963006973, -0.0020714597776532173, 0.01970217376947403, -0.026084568351507187, 0.0016389571828767657, 0.09108786284923553, 0.013050955720245838, 0.031495727598667145, 0.017117997631430626, -0.04054901376366615, -0.04672328755259514, 0.050989780575037, -0.04696609824895859, -0.03402787446975708, 0.08283237367868423, -0.05300161987543106, 0.03770468756556511, -0.03815561905503273, -0.011715508997440338, -0.003724508685991168, 0.008485289290547371, -0.0247664637863636, 0.02187010645866394, 0.07194068282842636, 0.006022517569363117, 0.0008221885072998703, -0.021297771483659744, -0.07436876744031906, -0.01822797954082489, 0.01723073050379753, -0.000977737712673843, -0.0035012115258723497, 0.046272359788417816, -0.04325459524989128, 0.038086242973804474, -0.0667029544711113, -0.04439926519989967, 0.025338798761367798, -0.011342624202370644, -0.031218232586979866, 0.030489807948470116, -0.055533766746520996, -0.03721906989812851, 0.012010348029434681, -0.019598113372921944, 0.02259853109717369, 0.01603403128683567, -0.024003352969884872, -0.013250404968857765, 0.0019814905244857073, -0.003050281433388591, 0.014447104185819626, 0.005164016038179398, -0.03128760680556297, 0.040965259075164795, -0.00747936824336648, 0.04887387901544571, -0.049949172884225845, 0.020760124549269676, -0.012253155931830406, -0.003544570179656148, 0.04675797373056412, -0.06632140278816223, 0.01800251379609108, -0.03864123299717903, -0.02648346684873104, 0.052862875163555145, -0.06708451360464096, -0.06899229437112808, -0.0158259104937315, 0.011836913414299488, 0.03191197291016579, 0.0057493578642606735, -0.0005273496499285102, 0.039785902947187424, 0.0002663847408257425, 0.020465286448597908, 0.01871359534561634, -0.05927995592355728, 0.02769750915467739, 0.015088812448084354, 0.03550206869840622, -0.04089588299393654, -0.055290959775447845, -0.007249567192047834, 0.018175948411226273, -0.016337541863322258, -0.06174272671341896, 0.036351896822452545, -0.023916635662317276, 0.06250584125518799, 0.031200889497995377, 0.015617787837982178, -0.03871060907840729, 0.019546082243323326, -0.06403206288814545, 0.010440764017403126, -0.0037310123443603516, -0.061153050512075424, -0.019650142639875412, -0.03402787446975708, -0.009226721711456776, 0.00040702937985770404, 0.018071888014674187, 0.0091053182259202, -0.0005555328098125756, 0.018349383026361465, 0.009252737276256084 ]
717,522
pytorch_optimizer.optimizer.shampoo_utils
skip_precondition
null
def skip_precondition(self, x: torch.Tensor) -> bool: return (len(x.shape) < self.skip_preconditioning_rank_lt) or any( dim > self.no_preconditioning_for_layers_with_dim_gt for dim in x.shape )
(self, x: torch.Tensor) -> bool
[ -0.017771849408745766, 0.016815241426229477, -0.017789402976632118, 0.06231117993593216, 0.06417173892259598, 0.0016872287960723042, -0.020606569945812225, -0.00381326861679554, 0.02151929773390293, -0.0008902380359359086, 0.060064464807510376, 0.01986936666071415, 0.0031989330891519785, -0.04458320885896683, -0.008798162452876568, -0.02717118337750435, 0.05248180776834488, 0.03050614893436432, 0.05451789125800133, -0.02764509990811348, -0.0018934699473902583, 0.03068167343735695, -0.060942087322473526, 0.01993957720696926, 0.008543652482330799, 0.06062614545226097, -0.009136047214269638, 0.021940555423498154, 0.002389326458796859, 0.033630482852458954, -0.04928726330399513, 0.04946278780698776, 0.015375941060483456, 0.0035960571840405464, 0.022958597168326378, 0.0707012489438057, 0.01846517249941826, 0.0060117123648524284, 0.01084741111844778, -0.06533019989728928, -0.02151929773390293, -0.026820136234164238, 0.005823023617267609, 0.016411535441875458, -0.04131845384836197, -0.03763244301080704, 0.01630622148513794, 0.02560901641845703, 0.003990987315773964, 0.03710586950182915, 0.0625569149851799, 0.007104352116584778, 0.06497915089130402, 0.057887963950634, -0.021782584488391876, -0.034051742404699326, 0.035912301391363144, 0.02495957538485527, -0.0017607295885682106, -0.02227405272424221, -0.008065348491072655, 0.07217565178871155, 0.00837690383195877, -0.02741691842675209, 0.021835241466760635, -0.02811901643872261, -0.040475938469171524, -0.031945448368787766, -0.037492021918296814, -0.011760137975215912, -0.04177481681108475, -0.0024134612176567316, -0.013287200592458248, 0.033823560923337936, -0.024748947471380234, -0.09604697674512863, 0.027732862159609795, -0.0031638280488550663, 0.028838666155934334, -0.061047401279211044, -0.014050732366740704, -0.011795242317020893, -0.04226628690958023, 0.027662653475999832, 0.012611431069672108, -0.04195034131407738, -0.0318576879799366, 0.021642163395881653, 0.058484744280576706, 0.0012539027957245708, -0.015691885724663734, 0.07301817089319229, 0.020782094448804855, -0.002389326458796859, 0.05781775340437889, 0.09316837787628174, 0.001312045264057815, -0.008324246853590012, -0.009153599850833416, -0.060239989310503006, 0.0028720188420265913, 0.09492362290620804, 0.0074641769751906395, -0.03570167347788811, 0.01663094200193882, 0.035859644412994385, -0.010154088959097862, -0.035034678876399994, -0.059713415801525116, -0.04079188033938408, -0.01399807445704937, -0.04289817437529564, -0.04233649745583534, 0.004383723251521587, 0.010706990957260132, -0.08116250485181808, -0.016867898404598236, -0.004197228234261274, -0.04886600747704506, 0.0015764288837090135, 0.03442034497857094, -0.002470506587997079, -0.015788424760103226, -0.02315167523920536, -0.01633254997432232, -0.00707363523542881, 0.06515467166900635, 0.0636802688241005, -0.00812678225338459, -0.0619601309299469, -0.0031901567708700895, 0.002455148147419095, -0.027452023699879646, 0.00289395940490067, -0.018079018220305443, 0.009004403837025166, 0.054623208940029144, -0.00835496373474598, 0.03970362991094589, -0.08003915101289749, 0.013234543614089489, 0.013866431079804897, 0.011610941961407661, 0.031050274148583412, 0.013919088989496231, 0.02197566069662571, -0.0012506117345765233, -0.032226286828517914, 0.07027998566627502, 0.009803039953112602, -0.008512935601174831, 0.006582166533917189, -0.05009467527270317, -0.10299774259328842, -0.050937194377183914, 0.041353560984134674, -0.03570167347788811, -0.04331943392753601, 0.008135558106005192, -0.029014190658926964, -0.03938768431544304, -0.011409088969230652, 0.00263725477270782, -0.002373968018218875, -0.01670992746949196, -0.04096740484237671, -0.05859006196260452, -0.05209565535187721, 0.02109803818166256, 0.0608016699552536, 0.1040508896112442, 0.02337985672056675, 0.05248180776834488, 0.003852761583402753, -0.02618824690580368, 0.0119795436039567, -0.04430237039923668, 0.008894701488316059, -0.07203523069620132, -0.01806146465241909, 0.06357495486736298, -0.02829454094171524, -0.017894716933369637, -0.042406708002090454, 0.0036136095877736807, -0.023485170677304268, -0.013559263199567795, -0.032647546380758286, -0.00800391472876072, 0.03945789486169815, -0.05458810180425644, -0.020027339458465576, 0.016086814925074577, 0.03050614893436432, 0.00886837299913168, 0.004067779053002596, 0.051639292389154434, 0.004449544940143824, 0.06803327798843384, -0.054974257946014404, -0.023414961993694305, -0.031050274148583412, 0.030260413885116577, 0.027732862159609795, -0.06108250841498375, -0.020009787753224373, -0.05441257730126381, 0.02022041566669941, 0.010838634334504604, -0.007025366183370352, -0.02618824690580368, -0.024152163416147232, 0.06329411268234253, 0.03254223242402077, 0.022835729643702507, 0.0613633468747139, -0.017596324905753136, 0.002940034493803978, 0.017315486446022987, -0.013515382073819637, 0.0271887369453907, -0.007881047204136848, 0.015920067206025124, 0.005015611182898283, 0.038580272346735, 0.022783072665333748, 0.0030804539564996958, 0.012269158847630024, 0.01268164161592722, 0.0013295976677909493, 0.003106782678514719, 0.021835241466760635, -0.03004978597164154, -0.01823698915541172, 0.050235096365213394, 0.00397562887519598, -0.010829858481884003, 0.0015314507763832808, 0.035754330456256866, -0.035508595407009125, 0.010864962823688984, 0.013199438340961933, -0.019623633474111557, -0.03429747745394707, -0.003313023829832673, -0.026469087228178978, -0.016025381162762642, 0.04156418889760971, 0.0029970798641443253, 0.036158036440610886, -0.024169716984033585, -0.016464192420244217, -0.03266509994864464, -0.02187034673988819, -0.017166290432214737, 0.005849352106451988, -0.013331081718206406, -0.023713352158665657, 0.009416886605322361, 0.009838145226240158, -0.025696778669953346, 0.015130206942558289, 0.00026452081510797143, 0.03675482049584389, 0.011725032702088356, 0.00911849457770586, 0.02016775868833065, 0.03903663530945778, 0.0368250273168087, -0.03513999283313751, 0.04124824330210686, 0.048830900341272354, 0.01487569697201252, -0.03233160451054573, 0.03162950649857521, 0.011268669739365578, -0.010812305845320225, -0.018377410247921944, 0.006972708739340305, 0.06508446484804153, 0.049181949347257614, -0.020237969234585762, -0.03161195293068886, 0.02945300191640854, -0.04475873336195946, -0.04353006184101105, -0.03429747745394707, -0.06441747397184372, -0.025696778669953346, 0.003383233677595854, -0.014717725105583668, 0.01250611711293459, 0.07498404383659363, -0.013462725095450878, -0.007731851655989885, -0.027908386662602425, 0.06108250841498375, -0.0461629293859005, 0.008815715089440346, 0.020308177918195724, 0.06940236687660217, -0.012664088979363441, -0.0005208139191381633, -0.046268243342638016, 0.04124824330210686, 0.034753840416669846, 0.019255030900239944, 0.025924960151314735, -0.02829454094171524, -0.01791227050125599, 0.02852272242307663, 0.000992810120806098, 0.0020284042693674564, -0.0007240383420139551, 0.05932726338505745, -0.01362069696187973, 0.06473341584205627, -0.013989298604428768, -0.014357899315655231, 0.032928384840488434, -0.00271843490190804, 0.009890802204608917, -0.025731883943080902, -0.011654823087155819, -0.07126292586326599, -0.030207756906747818, 0.047426704317331314, -0.06557593494653702, -0.09717033058404922, -0.016042934730648994, 0.015595346689224243, -0.03092740662395954, -0.014217480085790157, 0.025064891204237938, -0.03980894386768341, -0.04142376780509949, 0.011689928360283375, 0.01127744559198618, 0.0625569149851799, 0.047953277826309204, 0.013734787702560425, -0.025222862139344215, 0.03893132135272026, 0.021308667957782745, 0.045917194336652756, -0.019658738747239113, 0.005704544484615326, 0.034332580864429474, 0.032700203359127045, 0.049006424844264984, 0.00507265655323863, 0.025064891204237938, -0.006503180600702763, 0.013015137985348701, 0.04230139032006264, 0.0002379179059062153, -0.02062412165105343, 0.01675380766391754, 0.01575331948697567, 0.048128802329301834, 0.09674907475709915, 0.012339368462562561, 0.006121415179222822, 0.06733117997646332, -0.015621676109731197, -0.013515382073819637, -0.0008573271916247904, 0.006446135230362415, -0.0631536990404129, 0.0050507159903645515, -0.07856474071741104, -0.03004978597164154, -0.019202373921871185, 0.005722097121179104, -0.0152004174888134, -0.0006779631949029863, -0.014761606231331825, -0.010004893876612186, 0.03815901279449463, 0.026802582666277885, 0.0002819361397996545, 0.0012275740737095475, 0.013190662488341331, -0.03664950281381607, -0.04704055190086365, 0.012795732356607914, -0.040019575506448746, -0.05950278788805008, 0.03306880593299866, -0.0178332831710577, 0.06852474063634872, -0.053043488413095474, -0.02337985672056675, 0.03910684585571289, -0.07336921989917755, -0.002621896332129836, -0.00909216608852148, 0.022993702441453934, -0.005959054920822382, -0.0017431771848350763, -0.0204485971480608, -0.03594740480184555, -0.038088805973529816, 0.03098006546497345, 0.014419333077967167, 0.004686502739787102, -0.027838177978992462, 0.061117611825466156, 0.014814263209700584, 0.08811327069997787, -0.010706990957260132, -0.0007404937641695142, 0.009206256829202175, -0.004739160183817148, 0.004927848931401968, 0.022537339478731155, 0.06522488594055176, 0.015498808585107327, 0.025521254166960716, -0.019728947430849075, 0.05490404739975929, 0.002330087125301361, 0.046549081802368164, -0.01049636211246252, -0.03298104181885719, 0.004306931048631668, -0.03865048289299011, 0.0077362400479614735, -0.012040977366268635, 0.017315486446022987, -0.1058061346411705, -0.01542859897017479, 0.050235096365213394, 0.007328145671635866, 0.005950278602540493, 0.021993212401866913, -0.010864962823688984, 0.022168736904859543, -0.037737756967544556, 0.007486117538064718, 0.020553912967443466, 0.043284326791763306, -0.0005973316146992147, -0.018693353980779648, 0.03050614893436432, 0.07287774980068207, -0.004589964170008898, 0.029031744226813316, -0.017315486446022987, 0.02717118337750435, -0.045917194336652756, 0.012400802224874496, 0.0033086359035223722, -0.029856707900762558, -0.009574858471751213, -0.010285732336342335, -0.07786264270544052, -0.03238426148891449, -0.030822092667222023, 0.0019165074918419123, -0.0027886447496712208, -0.0004931139992550015, -0.08839411288499832, -0.049603208899497986, 0.046198032796382904, 0.03991425782442093, -0.04307369887828827, 0.021554401144385338, 0.016148248687386513, 0.025205310434103012, -0.005213076248764992, 0.0003965755458921194, 0.013436396606266499, -0.007143844850361347, 0.010540243238210678, -0.0020635093096643686, 0.028908876702189445, 0.10924641788005829, 0.08116250485181808, 0.03664950281381607, -0.02097517065703869, 0.013401291333138943, -0.030962511897087097, -0.002334475051611662, -0.007661642041057348, -0.01934279315173626, -0.11373984068632126, 0.023923981934785843, 0.024450555443763733, -0.02069433219730854, -0.0017749909311532974, -0.039317477494478226, 0.027627548202872276, 0.05599229782819748, 0.03640377148985863, -0.037211183458566666, 0.014770382083952427, -0.007310593035072088, 0.07673928886651993, 0.01763143017888069, 0.013927864842116833, 0.0636802688241005, -0.021659716963768005, -0.010680662468075752, -0.037667546421289444, 0.01613069698214531, 0.010004893876612186, 0.01916726864874363, -0.016788912937045097, -0.014384228736162186, -0.01057534758001566, -0.0014085837174206972, -0.0035872808657586575, 0.01713118515908718, 0.04858516529202461, -0.004449544940143824, 0.035227756947278976, 0.014006851240992546, 0.016393983736634254, -0.029558315873146057, 0.05711565539240837, -0.004061196930706501, 0.016148248687386513, 0.018096569925546646, -0.016069263219833374, 0.07038529962301254, 0.024345241487026215, -0.027452023699879646, -0.0026591953355818987, 0.006367149297147989, 0.013374962843954563, -0.006814736407250166, 0.040300413966178894, 0.03226139396429062, -0.018991744145751, 0.012532445602118969, -0.02139643020927906, 0.032700203359127045, -0.04693523794412613, -0.006573390681296587, 0.03654418885707855, -0.042582228779792786, 0.06634823977947235, -0.02869824692606926, -0.03491181135177612, 0.0420907624065876, 0.009838145226240158, 0.025064891204237938, -0.0689460039138794, 0.0004569120646920055, -0.040300413966178894, 0.02046615071594715, -0.011058039963245392, -0.04844474792480469, 0.10320837795734406, -0.0015775259817019105, 0.03394642844796181, 0.024924471974372864, 0.00039931811625137925, 0.02460852824151516, 0.01969384215772152, -0.07694991677999496, 0.0929577499628067, -0.06522488594055176, -0.07273732870817184, -0.02899663895368576, -0.019149716943502426, -0.04426726698875427, -0.028154121711850166, 0.038615379482507706, 0.01864069700241089, -0.015665557235479355, -0.019026849418878555, 0.035912301391363144, -0.011268669739365578, -0.0514286644756794, 0.01274307444691658, 0.01818433217704296, -0.08214543759822845, -0.03886111080646515, 0.018605591729283333, -0.04893621429800987, 0.01183912344276905, -0.04254712536931038, -0.01312045194208622, -0.036965448409318924, -0.016069263219833374, 0.010162865743041039, 0.05406152829527855, -0.0016696762759238482, -0.008925418369472027, 0.033051252365112305, 0.007885435596108437, -0.05069145932793617, 0.032928384840488434, 0.020659226924180984, 0.048655375838279724, -0.011505627073347569, 0.006288163363933563, 0.041178036481142044, 0.01818433217704296, -0.00546319829300046, 0.02624090388417244, -0.0005644207703880966, -0.043284326791763306, -0.058484744280576706, -0.05230628326535225, 0.07259690761566162, 0.024275030940771103, -0.05651887133717537, 0.025345729663968086, 0.031173141673207283, -0.02676747739315033, -0.03763244301080704, -0.05560614541172981, -0.02548614889383316, -0.027434470131993294, 0.013743564486503601, 0.06459299474954605, -0.025556359440088272, 0.012628983706235886, -0.007003425620496273, 0.00038725079502910376, -0.004888355731964111, 0.011409088969230652, -0.01951831765472889, 0.05055104196071625, -0.12834347784519196, -0.025451045483350754, -0.05557103827595711, 0.04216097295284271, -0.016042934730648994, 0.006108250934630632, -0.004783041309565306, -0.03882600739598274, -0.0031287232413887978, -0.005344719160348177, 0.020202863961458206, -0.0213437732309103, -0.06884068995714188, -0.0268903449177742, 0.006981485057622194, -0.0019768441561609507, -0.008828879334032536, 0.0012122157495468855, -0.03745691850781441, -0.0038966427091509104, 0.004427604377269745, 0.06540040671825409, 0.0039207772351801395, -0.011391536332666874, 0.007578268181532621, 0.04226628690958023, -0.03529796749353409, 0.009425662457942963, 0.06108250841498375, 0.003431502962484956, 0.04686502739787102, 0.022063422948122025, -0.06757691502571106, 0.03671971336007118, -0.04844474792480469, -0.015112655237317085, 0.009162375703454018, 0.0555359348654747, -0.03238426148891449, -0.01793859899044037, -0.0789157897233963, -0.03517509996891022, -0.0006264028488658369, -0.03378845751285553, 0.013322305865585804, -0.015788424760103226, -0.0356665663421154, 0.08853453397750854, -0.059292156249284744, -0.03840474784374237, -0.02209852822124958, -0.02683768793940544, -0.03438523784279823, -0.038439854979515076, -0.027961043640971184, 0.010154088959097862, -0.013664578087627888, 0.015472480095922947, 0.012988808564841747, -0.035754330456256866, 0.024590974673628807, 0.004274020437151194, 0.03250712901353836, -0.019184822216629982, 0.001930768950842321, 0.0555359348654747, 0.07575634866952896, -0.04198544844985008, -0.06554082781076431, -0.03513999283313751, 0.072456493973732, 0.04317901283502579, -0.025205310434103012, 0.032296497374773026, -0.047602228820323944, -0.0613633468747139, 0.0060906982980668545, -0.025380834937095642, 0.0491117388010025, -0.022080974653363228, -0.03664950281381607, 0.008205767720937729, -0.01765775866806507, -0.04984894394874573, 0.03236670792102814, 0.012444683350622654, -0.05395621433854103, -0.029137058183550835, -0.008596309460699558, 0.01625356450676918, -0.023116569966077805, 0.008293529972434044, -0.02729405090212822, -0.02706586942076683, 0.0713331326842308, -0.06027509644627571, 0.034753840416669846, -0.060766562819480896, -0.000655474083032459, 0.01823698915541172, -0.10980809479951859, 0.02531062439084053, -0.03350761532783508, 0.03306880593299866, 0.01680646650493145, -0.01633254997432232, 0.0003027796628884971, 0.04493425786495209, 0.002360803773626685, -0.00043689130689017475, -0.007929316721856594, -0.02297615073621273, 0.005485138855874538, 0.022642653435468674, -0.03085719794034958, 0.020782094448804855, -0.04184502735733986, 0.03570167347788811, 0.03547349199652672, 0.0028259435202926397, 0.015683108940720558, 0.012286711484193802, -0.00856559257954359, 0.059292156249284744, -0.01019797008484602, -0.001097027794457972, -0.07006935775279999, 0.033226776868104935, 0.025415940210223198, -0.01084741111844778, -0.035104889422655106, -0.022870834916830063, -0.05209565535187721, -0.035227756947278976, -0.011338879354298115, 0.02099272422492504, 0.050761669874191284, 0.0005666148499585688, -0.022607548162341118, 0.0330161489546299, 0.0339113213121891 ]
717,523
pytorch_optimizer.optimizer.shampoo_utils
PreConditionerType
Type of PreConditioner. In default (ALL), computes pre-conditioner for each dim. INPUT/OUTPUT is one-sided Shampoo, in this case only on input/output dim. Assumes last dim is always the output dim and everything else input dim.
class PreConditionerType(IntEnum): r"""Type of PreConditioner. In default (ALL), computes pre-conditioner for each dim. INPUT/OUTPUT is one-sided Shampoo, in this case only on input/output dim. Assumes last dim is always the output dim and everything else input dim. """ ALL = 0 INPUT = 1 OUTPUT = 2
(value, names=None, *, module=None, qualname=None, type=None, start=1)
[ 0.0005650394014082849, -0.006705756764858961, -0.0395994558930397, -0.024413438513875008, 0.050059687346220016, -0.024712301790714264, 0.00497328070923686, -0.07770459353923798, -0.04255073517560959, -0.008153378032147884, 0.015400825999677181, 0.015083283185958862, -0.012692372314631939, 0.019164642319083214, -0.011851818300783634, -0.04340996965765953, -0.014719042927026749, 0.010628344491124153, 0.003187102498486638, -0.0020220004953444004, 0.01787579245865345, -0.02764490246772766, 0.008489600382745266, 0.036143843084573746, 0.05379548668861389, 0.01334613747894764, -0.0040229870937764645, -0.031436737626791, -0.048303864896297455, -0.03511649742722511, -0.054916225373744965, 0.0029255966655910015, -0.05330983176827431, -0.024021178483963013, 0.014018580317497253, 0.020658960565924644, -0.014803098514676094, 0.06249989569187164, -0.0739687904715538, 0.04617445915937424, -0.017698341980576515, -0.057830147445201874, -0.02702849544584751, 0.01334613747894764, -0.045502014458179474, -0.01853889599442482, 0.029961097985506058, -0.06929904967546463, 0.04572616517543793, -0.03892701119184494, 0.031305983662605286, -0.029382048174738884, 0.04113113135099411, -0.00468142144382, -0.06313498318195343, -0.03207182139158249, 0.012608316726982594, -0.0221159216016531, -0.0493125282227993, 0.020453492179512978, 0.017586268484592438, 0.0480797179043293, 0.013719717040657997, 0.0011785273673012853, 0.0126363355666399, -0.04340996965765953, -0.023797031491994858, 0.05248795822262764, -0.012178700417280197, 0.059847477823495865, -0.03797438368201256, -0.01308463141322136, 0.014037259854376316, 0.010105332359671593, -0.0026197282131761312, -0.06731907278299332, 0.004765477031469345, -0.03511649742722511, 0.03874022141098976, -0.017604947090148926, 0.05345926433801651, 0.03265087306499481, -0.015690350905060768, -0.015157999470829964, -0.0044852918945252895, -0.04942460358142853, -0.02581436187028885, -0.03433198109269142, 0.034481413662433624, -0.02704717591404915, -0.031436737626791, 0.01633477583527565, 0.0023827385157346725, 0.005127382464706898, 0.03459348529577255, 0.06261196732521057, -0.036311954259872437, -0.03407047316431999, 0.024245327338576317, -0.035882335156202316, -0.02572096697986126, 0.017576927319169044, 0.024413438513875008, -0.03874022141098976, 0.024544190615415573, -0.006243451964110136, -0.003717118641361594, 0.009428218938410282, -0.03532196581363678, -0.04184093326330185, 0.004753802437335253, -0.033584821969270706, -0.06418100744485855, -0.055626027286052704, 0.012113324366509914, -0.021088577806949615, -0.060893502086400986, -0.01017070934176445, -0.016969861462712288, 0.05528980493545532, -0.04202772304415703, 0.05035855248570442, 0.00548228295519948, 0.04490428790450096, -0.014224049635231495, -0.0006473436951637268, 0.06309762597084045, 0.03126862645149231, -0.024955129250884056, -0.034649524837732315, 0.0021200652699917555, -0.0026617557741701603, -0.043111104518175125, -0.006150057073682547, -0.03470556065440178, -0.004067349713295698, 0.020546887069940567, 0.025384744629263878, 0.0345187708735466, -0.018165316432714462, 0.03433198109269142, 0.027794335037469864, -0.031828995794057846, -0.006294819060713053, 0.046846903860569, 0.0038105135317891836, 0.05233852565288544, 0.007714422419667244, 0.021275367587804794, 0.04714576527476311, 0.014280086383223534, -0.0009549632668495178, -0.01017070934176445, -0.025235313922166824, 0.0023897429928183556, -0.011646348983049393, -0.00147564010694623, -0.0835324376821518, -0.013626322150230408, -0.054729435592889786, -0.05536452308297157, -0.05274946242570877, -0.022564217448234558, 0.007037308998405933, 0.01846417970955372, 0.015036585740745068, -0.032893698662519455, -0.020210664719343185, 0.021331405267119408, 0.02361024171113968, 0.05274946242570877, -0.05910031870007515, 0.00327115785330534, 0.00936284288764, -0.0006216600886546075, 0.04348468407988548, -0.016446849331259727, 0.033341992646455765, -0.012673693709075451, -0.014644326642155647, 0.08838897198438644, 0.03784362971782684, -0.06810358911752701, -0.02308722957968712, -0.0059585971757769585, -0.026486804708838463, 0.03556479513645172, -0.03937530890107155, 0.008424223400652409, 0.032706908881664276, 0.00022721238201484084, -0.007191410753875971, -0.002986303297802806, 0.032538797706365585, 0.015503560192883015, -0.023759672418236732, 0.010983245447278023, -0.02501116506755352, 0.07034507393836975, 0.03055882453918457, -0.03435065969824791, 0.08196339756250381, 0.007985267788171768, 0.10251028835773468, -0.027626223862171173, 0.016007892787456512, 0.029456764459609985, 0.0030820330139249563, -0.029456764459609985, -0.0014849795261397958, -0.027009816840291023, -0.019426148384809494, 0.02237742766737938, 0.026281336322426796, 0.007831165567040443, -0.041093774139881134, 0.009063978679478168, 0.03709647059440613, -0.029083184897899628, 0.016269398853182793, 0.006663728971034288, 0.015746386721730232, 0.059212394058704376, -0.0006520134629681706, 0.03179163858294487, -0.04131792113184929, -0.039860960096120834, -0.023722315207123756, -0.028037160634994507, 0.010889850556850433, -0.0014651331584900618, -0.031063158065080643, -0.02678566984832287, -0.018127957358956337, 0.0012643340742215514, 0.052973609417676926, -0.005552329123020172, -0.0017639970174059272, -0.04662275314331055, 0.014513573609292507, 0.022751007229089737, 0.007751780096441507, -0.006439581047743559, -0.03003581240773201, -0.01991180144250393, -0.014224049635231495, 0.05431849882006645, 0.04124320670962334, -0.032202575355768204, 0.03199710696935654, -0.03048410825431347, -0.06761793792247772, -0.037899669259786606, -0.005603696685284376, 0.014541592448949814, 0.08114152401685715, -0.007803147193044424, -0.02387174777686596, 0.015596955083310604, -0.006976602133363485, -0.07045714557170868, 0.005164740141481161, 0.0480797179043293, 0.03453744947910309, -0.012673693709075451, -0.029456764459609985, 0.02544078230857849, 0.026374731212854385, 0.0030446751043200493, -0.026561520993709564, 0.08226226270198822, 0.06645984202623367, -0.022171959280967712, -0.027607545256614685, -0.003224460408091545, 0.0026967788580805063, -0.011366164311766624, 0.0332859568297863, 0.04359675943851471, -0.008620353415608406, 0.050844207406044006, -0.03903908655047417, -0.043185822665691376, 0.00029784231446683407, -0.05151664838194847, 0.02299383468925953, -0.013430193066596985, -0.00737820053473115, 0.024861734360456467, 0.007228768430650234, 0.013168687000870705, 0.03679760545492172, 0.023927783593535423, -0.03556479513645172, 0.06914961338043213, -0.028111876919865608, 0.033528782427310944, -0.057643357664346695, 0.062387820333242416, 0.006425572093576193, 0.0642557218670845, -0.04774349555373192, 0.028690926730632782, -0.030969763174653053, -0.07523896545171738, 0.013448871672153473, 0.04004774987697601, -0.00048565369797870517, -0.05114306882023811, -0.012346811592578888, 0.013925185427069664, 0.03640534728765488, -0.06137915700674057, -0.03074561432003975, 0.02448815293610096, -0.0429990328848362, 0.042139798402786255, 0.00037503906060010195, -0.01043221540749073, 0.05928710848093033, -0.022059885784983635, 0.03812381625175476, -0.0010664535220712423, -0.0015620304038748145, -0.07680799812078476, -0.07034507393836975, 0.013813111931085587, -0.012001249939203262, -0.04030925780534744, 0.004949931986629963, -0.03487367182970047, -0.009082658216357231, 0.008204746060073376, 0.0579422228038311, -0.005519641097635031, 0.010955226607620716, 0.07206353545188904, 0.04326053708791733, 0.007742440793663263, -0.002904582768678665, 0.053758129477500916, -0.013355476781725883, -0.010422875173389912, 0.06201424077153206, -0.00013075291644781828, 0.0013413848355412483, -0.008452242240309715, 0.026094546541571617, 0.06836509704589844, 0.05599960684776306, 0.0023827385157346725, 0.029101863503456116, 0.004186428152024746, 0.010768436826765537, 0.08823954313993454, -0.021069899201393127, -0.012178700417280197, -0.06974734365940094, 0.040720194578170776, 0.010768436826765537, 0.12597109377384186, -0.012113324366509914, 0.03283766284584999, 0.06388214230537415, -0.03399575874209404, -0.006061331834644079, 0.012141342274844646, 0.016390811651945114, 0.011496917344629765, -0.016278738155961037, -0.01773569919168949, -0.016960522159934044, -0.004996629431843758, -0.05487886816263199, -0.012430867180228233, 0.05891352891921997, 0.002270664554089308, -0.012318792752921581, 0.027869051322340965, 0.008582995273172855, 0.025608893483877182, 0.04355940222740173, -0.01853889599442482, 0.01685778610408306, -0.02290043979883194, 0.0008971751667559147, -0.013971882872283459, 0.023572882637381554, 0.012851144187152386, 0.000995239824987948, 0.016232041642069817, 0.009446898475289345, 0.008662381209433079, -0.09219948947429657, -0.009428218938410282, 0.032706908881664276, -0.04273752495646477, 0.043820906430482864, -0.0174928717315197, -0.039337947964668274, 0.01638147234916687, -0.04273752495646477, 0.03167956322431564, 0.01664297841489315, -0.009825147688388824, -0.051554009318351746, 0.030259961262345314, 0.028242630884051323, 0.010665702633559704, 0.020658960565924644, 0.017371458932757378, 0.026206620037555695, -0.0233487356454134, 0.019005870446562767, -0.04255073517560959, -0.01846417970955372, 0.0812162384390831, 0.007331503089517355, 0.047519344836473465, 0.019874444231390953, 0.05506565794348717, 0.01739947684109211, 0.0590256042778492, 0.07673328369855881, 0.01585846021771431, 0.003824522951617837, 0.01709127426147461, 0.060034267604351044, -0.03556479513645172, 0.009890524670481682, -0.0013367150677368045, -0.011861157603561878, -0.01630675606429577, -0.07269862294197083, -0.01413999404758215, -0.016446849331259727, -0.019407469779253006, 0.026804348453879356, 0.023983821272850037, -0.02510455995798111, 0.01799720525741577, 0.0008072825148701668, -0.008298140950500965, -0.010124011896550655, -0.01912728324532509, -0.03179163858294487, -0.04516579210758209, 0.03862814977765083, -0.05308568477630615, -0.04834122210741043, -0.0024002499412745237, 0.0157183688133955, 0.0037007746286690235, 0.03619987890124321, 0.04221451282501221, 0.01378509309142828, -0.07385671883821487, 0.009806469082832336, -0.01716599054634571, -0.03240804374217987, 0.019781049340963364, 0.030857689678668976, -0.037544768303632736, 0.006462929770350456, -0.0017745038494467735, 0.04344732686877251, 0.033341992646455765, -0.052077021449804306, 0.031567491590976715, 0.009026621468365192, -0.005659733433276415, -0.029382048174738884, 0.025664929300546646, 0.004517980385571718, -0.021873096004128456, 0.02235874906182289, -0.004310176707804203, 0.03859078884124756, -0.00532818166539073, 0.013645000755786896, 0.01664297841489315, 0.017408818006515503, -0.027887729927897453, 0.00728480564430356, -0.01929539442062378, -0.03866550698876381, -0.07486538589000702, 0.04647332429885864, -0.006953253410756588, 0.010955226607620716, -0.015690350905060768, 0.002666425658389926, 0.06429307907819748, -0.011870496906340122, 0.0067991516552865505, 0.03494838625192642, 0.021910453215241432, -0.007270796224474907, 0.02247082255780697, 0.05633582919836044, 0.056672051548957825, 0.01541950460523367, -0.12268359214067459, 0.0017021228559315205, 0.017698341980576515, -0.06429307907819748, 0.016204021871089935, -0.035975731909275055, -0.022694971412420273, 0.03240804374217987, 0.01989312283694744, -0.02493644878268242, 0.014336123131215572, -5.47235970316251e-7, 0.0024049198254942894, -0.041429996490478516, 0.04841593652963638, 0.02984902262687683, -0.030259961262345314, -0.0004494631721172482, 0.013374155387282372, -0.038179852068424225, -0.01624138094484806, 0.0051787495613098145, -0.020939145237207413, 0.0590256042778492, 0.03442537412047386, -0.06843981146812439, 0.03778759390115738, -0.01224407646805048, -0.004352204501628876, -0.03780627250671387, 0.004732788540422916, 0.105723075568676, -0.013448871672153473, -0.012421526946127415, 0.0007319828728213906, 0.040645480155944824, 0.01382245123386383, -0.012879162095487118, 0.021032540127635002, 0.017931828275322914, 0.09488926082849503, 0.008540967479348183, 0.08420488238334656, -0.019407469779253006, 0.004116381984204054, 0.016017232090234756, -0.04938724637031555, -0.007069997023791075, -0.037133827805519104, -0.049275171011686325, -0.06709492951631546, -0.055626027286052704, 0.04878951609134674, 0.062126316130161285, 0.0651896670460701, 0.010983245447278023, 0.03100712038576603, 0.05555131286382675, -0.06802887469530106, -0.05599960684776306, 0.025253992527723312, 0.01017070934176445, -0.02465626411139965, -0.03442537412047386, -0.008204746060073376, 0.010254764929413795, -0.004991959780454636, -0.009451568126678467, 0.04228923097252846, -0.02861621044576168, 0.021704984828829765, -0.015895819291472435, 0.009218080900609493, 0.015111302025616169, 0.026187941431999207, -0.004847197327762842, -0.05390756204724312, 0.005300162825733423, -0.03179163858294487, -0.0010419372702017426, -0.021518195047974586, -0.05390756204724312, -0.008737096562981606, -0.020135950297117233, -0.03037203475832939, 0.008298140950500965, -0.05962333083152771, 0.05846523493528366, -0.006178075447678566, -0.005477613303810358, -0.004665077198296785, 0.010600325651466846, -0.010917868465185165, -0.01972501166164875, 0.05372077226638794, -0.060034267604351044, 0.023442130535840988, 0.02377835288643837, -0.03261351212859154, 0.0027107882779091597, -0.024992486461997032, -0.001880740630440414, 0.044866930693387985, -0.08921084553003311, -0.00242126383818686, 0.023815710097551346, 0.012673693709075451, -0.04333525151014328, 0.037376657128334045, 0.005043326877057552, -0.0442318432033062, 0.015335449017584324, 0.03302445262670517, -0.021891774609684944, -0.01626005955040455, -0.046099744737148285, 0.07008356600999832, -0.04516579210758209, -0.014896493405103683, 0.0302039235830307, 0.00039225874934345484, 0.0006006461917422712, 0.0007430735277011991, -0.009082658216357231, -0.0013215384678915143, -0.1326955407857895, 0.06220103055238724, -0.06810358911752701, 0.04464278370141983, 0.05969804525375366, 0.03634931147098541, -0.0812162384390831, -0.03522857278585434, -0.012094644829630852, 0.0071166944690048695, 0.035788942128419876, -0.00644892081618309, -0.035097818821668625, 0.007826495915651321, 0.06249989569187164, 0.04744463041424751, -0.00036102981539443135, 0.023666277527809143, -0.019071247428655624, -0.028298666700720787, -0.027420755475759506, 0.06216367334127426, -0.021536873653531075, -0.045576732605695724, 0.04049604758620262, -0.01595185697078705, 0.005552329123020172, -0.04942460358142853, 0.0406828373670578, 0.003826857777312398, 0.023815710097551346, 0.004667412023991346, -0.04774349555373192, -0.04393298178911209, 0.005725109949707985, 0.03855343163013458, 0.02456286922097206, -0.004903234541416168, 0.011777102015912533, -0.009750432334840298, -0.04404505342245102, 0.02228403277695179, -0.030596183612942696, -0.037376657128334045, 0.031380701810121536, 0.016699016094207764, -0.08427959680557251, 0.017632964998483658, -0.01898719184100628, 0.01302859466522932, 0.016652317717671394, -0.018155977129936218, -0.03141805902123451, 0.0067244358360767365, 0.003231464885175228, -0.03558347374200821, 0.043895620852708817, 0.06896282732486725, -0.04172886162996292, -0.03978624567389488, -0.07449180632829666, -0.03997303545475006, 0.026281336322426796, -0.039860960096120834, 0.03195974975824356, 0.06586211174726486, -0.02024802379310131, 0.016530904918909073, -0.03347274661064148, -0.03382764756679535, -0.003861880861222744, -0.06447986513376236, 0.012178700417280197, 0.016670996323227882, -0.037021756172180176, -0.06014634296298027, 0.012477564625442028, -0.01937011070549488, 0.08973386138677597, 0.012458885088562965, -0.008597004227340221, 0.09264778345823288, -0.01747419312596321, -0.016801750287413597, 0.09429153054952621, -0.018669648095965385, 0.005010638851672411, -0.025926435366272926, -0.0047958302311599255, -0.003549007698893547, 0.04987289756536484, -0.0565599761903286, 0.001688113552518189, -0.003376227105036378, -0.005753128323704004, -0.01929539442062378, 0.024151932448148727, -0.05797958001494408, 0.015242054127156734, 0.05338454991579056, -0.05846523493528366, -0.020397454500198364, 0.0009637190378271043, 0.040906984359025955, -0.006995281204581261, -0.03311784565448761, 0.0063975537195801735, 0.08517618477344513, -0.034388016909360886, 0.07232504338026047, -0.022657612338662148, -0.007901212200522423, -0.028859037905931473, 0.026897743344306946, -0.013009915128350258, -0.018520217388868332, -0.09197533875703812, 0.00876044575124979, 0.034911029040813446, 0.02915790118277073, 0.0040906984359025955, 0.029438085854053497, 0.0362185575067997, 0.009965240024030209, -0.05058269947767258, 0.023890426382422447, -0.05248795822262764, 0.02915790118277073, -0.02904582768678665, 0.012477564625442028, -0.037376657128334045, -0.048640087246894836, -0.013766414485871792, -0.0331365242600441, -0.06485344469547272, 0.04023453965783119, -0.015391486696898937, 0.04221451282501221, -0.020901788026094437, 0.009521614760160446, -0.037208545953035355 ]
717,524
pytorch_optimizer.optimizer.prodigy
Prodigy
An Expeditiously Adaptive Parameter-Free Learner. 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. betas. :param beta3: float. coefficients for computing the Prodidy step-size using running averages. If set to None, uses the value of square root of beta2. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param d_coef: float. Coefficient in the expression for the estimate of d. :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 safeguard_warmup: bool. remove lr from the denominator of D estimate to avoid issues during warm-up stage. :param eps: float. term added to the denominator to improve numerical stability.
class Prodigy(Optimizer, BaseOptimizer): r"""An Expeditiously Adaptive Parameter-Free Learner. 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. betas. :param beta3: float. coefficients for computing the Prodidy step-size using running averages. If set to None, uses the value of square root of beta2. :param d0: float. initial D estimate for D-adaptation (default 1e-6). Rarely needs changing. :param d_coef: float. Coefficient in the expression for the estimate of d. :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 safeguard_warmup: bool. remove lr from the denominator of D estimate to avoid issues during warm-up stage. :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), beta3: Optional[float] = None, d0: float = 1e-6, d_coef: float = 1.0, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, bias_correction: bool = False, safeguard_warmup: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas((*betas, beta3)) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'beta3': beta3, 'd': d0, 'd0': d0, 'd_max': d0, 'd_coef': d_coef, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'bias_correction': bias_correction, 'safeguard_warmup': safeguard_warmup, 'step': 1, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'Prodigy' @torch.no_grad() def reset(self): for group in self.param_groups: group['step'] = 1 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 d_de_nom = torch.tensor([0.0], device=device) beta1, beta2 = group['betas'] beta3 = group['beta3'] if group['beta3'] is not None else math.sqrt(beta2) bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** group['step']) bias_correction: float = (bias_correction1 / bias_correction2_sq) if group['bias_correction'] else 1.0 d, d0 = group['d'], group['d0'] d_lr: float = d * group['lr'] / bias_correction if 'd_numerator' not in group: group['d_numerator'] = torch.tensor([0.0], device=device) d_numerator = group['d_numerator'] d_numerator.mul_(beta3) 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['s'] = torch.zeros_like(p) state['p0'] = p.clone() state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) p0, exp_avg, exp_avg_sq = state['p0'], state['exp_avg'], state['exp_avg_sq'] d_numerator.add_(torch.dot(grad.flatten(), (p0 - p).flatten()), alpha=(d / d0) * d_lr) exp_avg.mul_(beta1).add_(grad, alpha=d * (1.0 - beta1)) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=d * d * (1.0 - beta2)) s = state['s'] s.mul_(beta3).add_(grad, alpha=(d / d0) * (d if group['safeguard_warmup'] else d_lr)) d_de_nom.add_(s.abs().sum()) if d_de_nom == 0: return loss d_hat = (group['d_coef'] * d_numerator / d_de_nom).item() if d == group['d0']: d = max(d, d_hat) d_max = max(group['d_max'], d_hat) d = min(d_max, d * group['growth_rate']) for group in self.param_groups: group['step'] += 1 group['d_numerator'] = d_numerator group['d_de_nom'] = d_de_nom group['d'] = d group['d_max'] = d_max group['d_hat'] = d_hat 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_(d * group['eps']) self.apply_weight_decay( p, p.grad, 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=-d_lr) 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), beta3: Optional[float] = None, d0: float = 1e-06, d_coef: float = 1.0, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, bias_correction: bool = False, safeguard_warmup: bool = False, eps: float = 1e-08)
[ 0.012302746996283531, -0.02848297357559204, -0.03240170329809189, 0.019583333283662796, -0.0016770614311099052, -0.0018343261908739805, -0.040012288838624954, -0.07577584683895111, -0.03681543096899986, 0.002735376125201583, -0.02524486556649208, 0.015252106823027134, 0.020563015714287758, 0.10073196887969971, -0.0451272614300251, 0.025141742080450058, 0.011127128265798092, 0.035206686705350876, -0.007899332791566849, -0.015066483058035374, -0.04549850896000862, -0.04430226609110832, -0.008837766014039516, 0.049540989100933075, -0.06859838962554932, -0.026564858853816986, 0.04467351362109184, -0.024852992966771126, -0.046488504856824875, 0.0060585616156458855, -0.015551167540252209, -0.04120853170752525, -0.02617298625409603, 0.019449271261692047, 0.01839740201830864, -0.021614884957671165, 0.007528085261583328, 0.03392794355750084, -0.11591188609600067, -0.033824820071458817, -0.001122122979722917, -0.05812094360589981, 0.029163595288991928, -0.029782341793179512, -0.004119821824133396, 0.028606723994016647, -0.02025364339351654, 0.06406091153621674, -0.030731087550520897, -0.024296121671795845, 0.04065166041254997, -0.060678429901599884, 0.053377218544483185, 0.007600272074341774, -0.01724240928888321, 0.039001669734716415, 0.07231086492538452, 0.008703703992068768, 0.07441460341215134, -0.0828295573592186, 0.05209847539663315, -0.06740213930606842, 0.014674609526991844, 0.0022854956332594156, -0.014447735622525215, -0.028730472549796104, -0.05869843810796738, -0.0536247156560421, -0.013911488465964794, 0.026111111044883728, 0.03761979937553406, -0.04096103459596634, 0.009214170277118683, -0.0010189985623583198, -0.000339343911036849, -0.01784053072333336, -0.035660434514284134, -0.06802088767290115, 0.0010795841226354241, -0.008090113289654255, 0.011849000118672848, -0.0006761096883565187, -0.017221784219145775, -0.04364226758480072, 0.011178690940141678, -0.03988853842020035, 0.03671230375766754, -0.02543048933148384, 0.01148806419223547, -0.02450237050652504, 0.01158087607473135, 0.00450653862208128, 0.06364841014146805, 0.04487976059317589, 0.05510970950126648, 0.02006801776587963, -0.02246050536632538, -0.019748331978917122, -0.001300012692809105, -0.03287607431411743, -0.002129520056769252, 0.018572714179754257, -0.008976983837783337, 0.03042171336710453, -0.009580262005329132, -0.05820344015955925, -0.024605493992567062, 0.0068216826766729355, 0.03302045166492462, -0.06191592290997505, -0.08183956891298294, -0.0014605000615119934, -0.03207170590758324, -0.002086981199681759, -0.018242714926600456, 0.014963358640670776, -0.04603475704789162, 0.021119888871908188, -0.008734641596674919, 0.044962260872125626, 0.013024618849158287, 0.06645339727401733, -0.08662454038858414, 0.023058628663420677, -0.002634829841554165, -0.021903634071350098, 0.03640293329954147, 0.03619668260216713, 0.029596718028187752, -0.05090222880244255, -0.01802615448832512, 0.02052176557481289, -0.030627962201833725, 0.01072494313120842, 0.02654423378407955, -0.025719238445162773, -0.020459892228245735, 0.02367737516760826, -0.009415262378752232, 0.004712787456810474, 0.048014745116233826, 0.022728629410266876, 0.004016697406768799, -0.011549938470125198, 0.0396822914481163, -0.007842614315450191, 0.04677725210785866, 0.013416491448879242, -0.018748026341199875, 0.009518386796116829, 0.007445585448294878, 0.007259961683303118, 0.01651022583246231, -0.02695673145353794, 0.040796034038066864, -0.014695234596729279, -0.035949185490608215, -0.010694005526602268, -0.016613349318504333, -0.0404866598546505, -0.025182992219924927, -0.05081973224878311, -0.009090420790016651, 0.017397094517946243, 0.01673709787428379, 0.026049237698316574, -0.01418992504477501, 0.025533614680171013, -0.006754651665687561, 0.03213357925415039, 0.022089257836341858, -0.06554590165615082, -0.015210856683552265, 0.01807771623134613, -0.007033087778836489, 0.10328945517539978, 0.030339214950799942, -0.005099504254758358, -0.01862427592277527, -0.0035010750871151686, 0.061792172491550446, -0.005321221891790628, -0.015571792609989643, -0.03310294821858406, -0.008487142622470856, 0.04122915491461754, 0.009966978803277016, 0.015056170523166656, -0.028647972270846367, 0.04147665575146675, -0.010828067548573017, -0.013715552166104317, 0.022831754758954048, -0.00779105257242918, -0.019346147775650024, 0.02006801776587963, 0.03434044122695923, 0.023264877498149872, 0.07759083807468414, 0.03819729760289192, 0.01766521856188774, -0.003787245601415634, 0.007698240224272013, -0.01641741208732128, -0.03801167383790016, -0.006094655022025108, -0.047272250056266785, 0.030545463785529137, 0.002197840018197894, -0.0011311463313177228, -0.041951026767492294, 0.018840838223695755, 0.046488504856824875, 0.031700458377599716, 0.03128796070814133, -0.0326492004096508, 0.04714849963784218, 0.03000921569764614, 0.0286685973405838, -0.00612559262663126, 0.016819598153233528, -0.05824469029903412, 0.016066789627075195, 0.004810755606740713, 0.055274706333875656, -0.04933473840355873, 0.04442601278424263, 0.017727093771100044, -0.012044936418533325, -0.025863612070679665, 0.035474810749292374, -0.05820344015955925, 0.011787124909460545, -0.008621204644441605, 0.0792408287525177, 0.027905477210879326, -0.04256977513432503, -0.00783745851367712, -0.030772337689995766, -0.003733105259016156, -0.01651022583246231, -0.006986681837588549, -0.027802351862192154, 0.011044628918170929, -0.007440429180860519, 0.03419606760144234, 0.0785808339715004, 0.015829604119062424, -0.01636585034430027, 0.01500460784882307, -0.001870419830083847, -0.020542390644550323, -0.04221915081143379, 0.03681543096899986, -0.07354836165904999, 0.0067494953982532024, 0.03528918698430061, 0.028256099671125412, 0.02491486817598343, -0.05548095703125, -0.023966122418642044, -0.02848297357559204, -0.08431455492973328, 0.05197472497820854, -0.013323679566383362, 0.053047217428684235, 0.062245920300483704, -0.04413726553320885, 0.01826333999633789, -0.00202897354029119, 0.08777953684329987, 0.10427944362163544, -0.05737844482064247, 0.008213862776756287, -0.03281420096755028, 0.038816045969724655, 0.008188081905245781, 0.007466210518032312, 0.034237317740917206, 0.020604265853762627, 0.05098472908139229, -0.049623485654592514, -0.03287607431411743, 0.004421460907906294, -0.018778963014483452, 0.034237317740917206, -0.022831754758954048, 0.03935229033231735, 0.03819729760289192, 0.028029225766658783, 0.014942733570933342, 0.0016190538881346583, 0.08753203600645065, 0.012704933062195778, 0.07874583452939987, 0.0191811490803957, 0.008497455157339573, 0.03646480664610863, -0.01840771548449993, 0.013890864327549934, 0.046488504856824875, 0.0044498201459646225, 0.039414167404174805, 0.005785281769931316, -0.03615543246269226, -0.004127556458115578, 0.054160963743925095, -0.005682157352566719, 0.030153589323163033, -0.015355231240391731, 0.010059790685772896, 0.003983181901276112, 0.014571485109627247, 0.04665350168943405, -0.013282429426908493, -0.10040196776390076, -0.004251305479556322, -0.041167281568050385, 0.035247936844825745, 0.054490961134433746, -0.03865104541182518, 0.05246972292661667, 0.02681235782802105, -0.004687006585299969, -0.02371862344443798, -0.04351852089166641, 0.04933473840355873, 0.040156662464141846, -0.02274925448000431, -0.028194226324558258, -0.03627918288111687, -0.04298227280378342, 0.017366157844662666, 0.007543553598225117, -0.017593031749129295, -0.015829604119062424, 0.02256363071501255, 0.004302867688238621, 0.010044321417808533, -0.033453572541475296, 0.05589345470070839, 0.03236045315861702, -0.057213447988033295, 0.041167281568050385, 0.012869931757450104, -0.06925838440656662, 0.03838292136788368, 0.03380419686436653, 0.018479902297258377, 0.02889547124505043, -0.017376471310853958, 0.028606723994016647, 0.009085264056921005, 0.09206951409578323, 0.049210987985134125, -0.017737405374646187, -0.010034008882939816, 0.0020379971247166395, 0.018242714926600456, -0.03462919220328331, -0.01613897643983364, 0.021284887567162514, -0.06125592440366745, 0.07272336632013321, 0.0824170634150505, -0.026502983644604683, -0.007930270396173, -0.05119097977876663, 0.030772337689995766, -0.028400475159287453, 0.00457614753395319, -0.06917588412761688, -0.039372917264699936, 0.00815714430063963, -0.02967921830713749, -0.006656683515757322, -0.038486044853925705, 0.00964213628321886, 0.04549850896000862, 0.03500043973326683, 0.024337371811270714, -0.01338555384427309, 0.02260488085448742, 0.04797349497675896, 0.01414867490530014, -0.021944884210824966, 0.02732798084616661, -0.012498683296144009, 0.045374758541584015, -0.06789714097976685, 0.04492101073265076, 0.014344611205160618, 0.0088274534791708, 0.027121732011437416, -0.05284097045660019, 0.03128796070814133, 0.04335352033376694, 0.03023608960211277, -0.09800948202610016, -0.014705547131597996, -0.023656750097870827, -0.027286730706691742, -0.0004463355289772153, 0.018933650106191635, -0.0030834211502224207, -0.0767245963215828, 0.05894593894481659, 0.08843953162431717, -0.028256099671125412, 0.08662454038858414, -0.03700105473399162, 0.007326992228627205, -0.029019221663475037, 0.028606723994016647, -0.03027733974158764, -0.02699798159301281, -0.00941010657697916, 0.011240565218031406, 0.01742803305387497, 0.020831139758229256, 0.04516851156949997, -0.0189130250364542, 0.03764042630791664, 0.030916711315512657, 0.004158493597060442, -0.01424148678779602, -0.06773214042186737, -0.01193149946630001, -0.024976743385195732, -0.014004300348460674, -0.011498376727104187, -0.020728014409542084, -0.013282429426908493, -0.037289801985025406, 0.00482106814160943, -0.019129585474729538, 0.012673995457589626, 0.06480340659618378, 0.019593646749854088, -0.01120962854474783, 0.012911181896924973, -0.012044936418533325, 0.050283484160900116, 0.0020624890457838774, 0.010879630222916603, -0.011065253987908363, 0.031597331166267395, -0.007693084422498941, -0.08596454560756683, -0.008090113289654255, 0.04475601390004158, -0.019810207188129425, 0.0773845911026001, 0.008677923120558262, -0.0027070168871432543, -0.002507213270291686, 0.012488371692597866, -0.004467866849154234, 0.016850534826517105, -0.0024930336512625217, 0.017407407984137535, 0.025409866124391556, -0.005127863492816687, 0.036691680550575256, -0.04793224483728409, 0.05131472647190094, 0.04673600196838379, -0.0016499912599101663, -0.020862076431512833, 0.020459892228245735, 0.0002777914924081415, 0.015860540792346, -0.008347924798727036, -0.05279972031712532, -0.05486220866441727, 0.006780433002859354, -0.0006193912704475224, 0.01167368795722723, 0.03250482678413391, -0.018882086500525475, 0.042693525552749634, -0.07474460452795029, 0.0396822914481163, 0.05977093428373337, 0.00463544437661767, -0.01347836572676897, -0.017531156539916992, 0.031143585219979286, -0.012003686279058456, 0.03545418754220009, -0.05700719729065895, -0.04009478911757469, 0.05779094249010086, 0.0041997432708740234, -0.08678954094648361, -0.032566703855991364, 0.025121117010712624, -0.023079251870512962, 0.07820958644151688, -0.043064773082733154, 0.0271423552185297, -0.01817052811384201, -0.025925487279891968, -0.046488504856824875, 0.032009828835725784, -0.019634895026683807, -0.055357206612825394, 0.06253466755151749, -0.048839740455150604, 0.046859752386808395, -0.03042171336710453, -0.014777733944356441, 0.019521459937095642, 0.003864588914439082, -0.007259961683303118, -0.008822296746075153, 0.03854792192578316, 0.06294716894626617, 0.03064858727157116, -0.04789099469780922, 0.062245920300483704, 0.059193436056375504, 0.005156222730875015, -0.034608565270900726, 0.036320433020591736, 0.04789099469780922, -0.025946112349629402, -0.022439880296587944, 0.030957961454987526, 0.005909031257033348, 0.0176549069583416, -0.01871708780527115, 0.024481745436787605, 0.03374231979250908, -0.015293356031179428, -0.0073579298332333565, 0.013261804357171059, -0.060224682092666626, -0.09627699106931686, -0.0169227235019207, 0.014623047783970833, -0.007605428341776133, 0.023924872279167175, -0.04487976059317589, -0.0077858963049948215, 0.059482183307409286, -0.019624583423137665, 0.045416008681058884, -0.024481745436787605, -0.015602730214595795, -0.02848297357559204, -0.002364128129556775, -0.033824820071458817, 0.017541470006108284, 0.06422591209411621, 0.006115280091762543, -0.018108654767274857, 0.014922108501195908, 0.0017698734300211072, 0.024069247767329216, -0.04067228361964226, -0.0590696856379509, 0.017355846241116524, -0.05007723346352577, 0.028606723994016647, 0.009044014848768711, -0.02510049194097519, 0.004029587842524052, -0.07515709847211838, 0.0025561973452568054, -0.00715683726593852, -0.01840771548449993, -0.028173601254820824, 0.01176649983972311, -0.05086097866296768, -0.010131977498531342, 0.01120962854474783, -0.015932727605104446, -0.02094457671046257, -0.012055248953402042, 0.05317096784710884, -0.004960286431014538, -0.023615499958395958, -0.03295857459306717, 0.01895427517592907, 0.04714849963784218, -0.05663594976067543, 0.04028041288256645, 0.0072032432071864605, -0.013725864700973034, -0.026502983644604683, 0.04077540710568428, -0.04110540822148323, -0.05803844332695007, -0.012911181896924973, 0.04397226870059967, -0.054119713604450226, 0.01899552345275879, 0.04982973635196686, 0.014839609153568745, -0.05828594043850899, -0.0010924746748059988, 0.05774969235062599, -0.0039393543265759945, 0.009936041198670864, -0.027492979541420937, 0.015375856310129166, 0.029184220358729362, 0.032896701246500015, -0.07800333946943283, -0.02099613845348358, -0.010920879431068897, -0.02353299967944622, -0.027987977489829063, -0.07111462205648422, -0.034092944115400314, -0.03652667999267578, 0.031721081584692, 0.07688958942890167, -0.002317722188308835, -0.02394549734890461, 0.02732798084616661, 0.0036248245742172003, 0.027431104332208633, -0.01550991740077734, -0.04896349087357521, 0.019573021680116653, -0.09602949023246765, 0.008363393135368824, -0.047230999916791916, 0.00398833816871047, 0.03287607431411743, 0.0006351821939460933, -0.018088029697537422, 0.01519023161381483, -0.016809286549687386, 0.0651746541261673, -0.023409251123666763, -0.04628225415945053, -0.02557486481964588, -0.03126733377575874, 0.03157670795917511, -0.01969677023589611, -0.007631209678947926, -0.0039032604545354843, -0.011983061209321022, -0.02755485475063324, 0.009451355785131454, 0.07994207739830017, 0.018603650853037834, 0.005640907678753138, 0.01123025268316269, -0.038486044853925705, -0.03586668521165848, -0.004980911035090685, 0.002931312657892704, 0.020377391949295998, 0.049623485654592514, 0.009487450122833252, -0.02528611570596695, -0.0013393288245424628, -0.013117430731654167, 0.0138702392578125, -0.00023928095470182598, -0.023326750844717026, 0.023471126332879066, -0.032896701246500015, 0.0023254563566297293, 0.004795287270098925, 0.00048694078577682376, -0.07701334357261658, -0.021944884210824966, -0.035351064056158066, -0.0016371007077395916, 0.005215519107878208, -0.03429919481277466, 0.01728365756571293, -0.02491486817598343, -0.0096885422244668, -0.004957708064466715, 0.07070212811231613, 0.02431674674153328, 0.02094457671046257, -0.0031581863295286894, 0.03407232090830803, -0.016200851649045944, -0.013643365353345871, -0.010338226333260536, 0.01278743240982294, -0.01984114572405815, -0.056470949202775955, -0.024894243106245995, 0.01677834801375866, -0.028606723994016647, 0.021326137706637383, -0.08901702612638474, -0.036547306925058365, -0.023368000984191895, -0.009997915476560593, -0.08159206807613373, -0.03297920152544975, -0.01278743240982294, -0.04281727224588394, 0.028256099671125412, 0.011529314331710339, 0.0694233849644661, -0.0013483521761372685, -0.008842921815812588, 0.006336997728794813, -0.05807969346642494, 0.0016989753348752856, 0.007352773565798998, -0.004297711420804262, -0.04413726553320885, 0.038898542523384094, 0.009466825053095818, 0.03541293740272522, -0.02543048933148384, -0.039269790053367615, 0.04145602881908417, -0.0017698734300211072, 0.015262419357895851, 0.009023389779031277, 0.016633974388241768, -0.046571001410484314, -0.030772337689995766, 0.015623354353010654, -0.06591714918613434, 0.03906354308128357, -0.02736922912299633, 0.02837985008955002, 0.04170352965593338, -0.022254256531596184, -0.03935229033231735, -0.023285500705242157, -0.032154206186532974, 0.04426101595163345, -0.012581183575093746, -0.001597139984369278, 0.03124670870602131, -0.02080020308494568, 0.05539845675230026, -0.02811172604560852, -0.028049850836396217, -0.0075126164592802525, 0.044549763202667236, -0.021346762776374817, -0.0396822914481163, 0.05081973224878311, -0.05622345209121704, 0.07651834189891815, 0.005785281769931316, 0.01500460784882307, 0.03481481596827507, 0.055357206612825394, -0.042611025273799896, 0.033721696585416794, -0.050654731690883636, -0.06946463137865067, -0.08155081421136856, -0.012374934740364552, -0.03207170590758324, 0.0663708969950676, 0.011601501144468784, -0.006295748054981232, 0.02140863612294197, 0.02695673145353794, -0.0017041316023096442 ]
717,526
pytorch_optimizer.optimizer.prodigy
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1.0, betas: BETAS = (0.9, 0.999), beta3: Optional[float] = None, d0: float = 1e-6, d_coef: float = 1.0, growth_rate: float = float('inf'), weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, bias_correction: bool = False, safeguard_warmup: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas((*betas, beta3)) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'beta3': beta3, 'd': d0, 'd0': d0, 'd_max': d0, 'd_coef': d_coef, 'growth_rate': growth_rate, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'bias_correction': bias_correction, 'safeguard_warmup': safeguard_warmup, 'step': 1, '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), beta3: Optional[float] = None, d0: float = 1e-06, d_coef: float = 1.0, growth_rate: float = inf, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, bias_correction: bool = False, safeguard_warmup: bool = False, eps: float = 1e-08)
[ 0.013946407474577427, -0.03397991880774498, -0.03155278414487839, -0.002997803268954158, -0.04603855311870575, -0.025215258821845055, -0.09038196504116058, -0.03960471600294113, -0.05100840702652931, 0.009506287053227425, -0.028778912499547005, 0.062103889882564545, -0.011750426143407822, 0.061217792332172394, -0.058829180896282196, 0.047309912741184235, 0.02149750106036663, 0.02762313187122345, -0.008687609806656837, -0.009174000471830368, -0.001805905601941049, 0.0114325862377882, -0.04553771764039993, 0.11311230063438416, 0.0035179040860384703, 0.025465676560997963, -0.012289789505302906, 0.005933002103120089, -0.01947488635778427, 0.009376262314617634, 0.013378148898482323, -0.010247912257909775, -0.009111396037042141, 0.05389785394072533, 0.024868523702025414, -0.02352011576294899, 0.007902642711997032, 0.004379922989755869, -0.10209386795759201, 0.035540223121643066, 0.0540519580245018, -0.04260974004864693, 0.05790455639362335, -0.04835011437535286, -0.0032674851827323437, 0.006944308988749981, 0.035732854157686234, 0.04858126863837242, -0.03758209943771362, -0.04207037761807442, 0.03894977271556854, -0.03948913514614105, 0.04546066373586655, -0.037389468401670456, -0.0677286833524704, 0.04912063479423523, 0.058058660477399826, 0.05724961683154106, 0.03972029313445091, 0.011866004206240177, -0.001628926838748157, -0.027777235954999924, 0.015757128596305847, -0.018713997676968575, -0.009583339095115662, -0.004112649243324995, -0.07516419887542725, -0.04137691110372543, 0.004242674447596073, 0.05089282989501953, 0.09762485325336456, -0.004136727657169104, -0.017240379005670547, 0.02263401634991169, 0.00041626126039773226, -0.0015578946331515908, -0.06283588707447052, -0.04923621192574501, -0.05690288171172142, -0.001972049009054899, 0.03723536431789398, 0.026775561273097992, -0.021882761269807816, -0.05281912907958031, 0.013329991139471531, -0.04700170457363129, -0.02440621331334114, -0.045884449034929276, 0.014129405841231346, 0.01793384738266468, -0.06349082291126251, -0.03403770923614502, 0.016171282157301903, -0.012434261851012707, 0.06345230340957642, 0.005172113887965679, 0.02303854003548622, -0.0421859547495842, 0.02169013023376465, -0.003493825439363718, -0.020592140033841133, -0.0014387047849595547, -0.06094811111688614, 0.010845065116882324, 0.0026269906666129827, -0.047078754752874374, -0.05755782499909401, -0.023192644119262695, 0.033421292901039124, -0.0725059062242508, -0.04187774658203125, 0.04846569150686264, -0.0033854711800813675, 0.028701860457658768, -0.04715580865740776, 0.032226987183094025, 0.0017890505259856582, 0.030666684731841087, 0.003965768963098526, 0.010565752163529396, 0.03136015310883522, 0.03945061191916466, -0.04792632907629013, 0.06584091484546661, 0.03397991880774498, -0.012193474918603897, 0.007840038277208805, 0.010507962666451931, 0.01368635706603527, -0.017201853916049004, 0.03517422452569008, 0.0007855689618736506, -0.04153101518750191, -0.015429657883942127, 0.03220772370696068, -0.02169013023376465, -0.0020069631282240152, 0.04538361355662346, -0.042263008654117584, 0.018916258588433266, 0.06977055966854095, 0.008962107822299004, 0.033536870032548904, -0.02234507165849209, -0.007315121591091156, 0.02263401634991169, 0.0056440569460392, -0.03064742311835289, -0.027603870257735252, 0.04049081355333328, 0.026101356372237206, 0.001893792999908328, 0.00010248514445265755, 0.026987453922629356, 0.0015554866986349225, -0.06295146048069, 0.00863945297896862, -0.03906534984707832, 0.00023597167455591261, 0.014505034312605858, -0.026159144937992096, 0.018916258588433266, 0.023963164538145065, -0.01633501797914505, -0.009785600937902927, 0.024078741669654846, -0.0498911514878273, 0.0020454891491681337, -0.01645059697329998, 0.0005622386233881116, -0.005470690317451954, -0.06395313888788223, -0.032342564314603806, 0.029722798615694046, -0.02423284575343132, 0.0522797629237175, 0.02066919207572937, -0.015872705727815628, -0.0084660854190588, -0.02221023105084896, 0.057172562927007675, -0.0005908321472816169, -0.009328104555606842, -0.05096988007426262, -0.0003419181448407471, 0.017095906659960747, -0.04503687843680382, 0.04438193514943123, -0.03717757761478424, 0.03347908332943916, 0.03611811250448227, 0.013050678186118603, 0.02007203921675682, 0.01570897176861763, -0.009718179702758789, 0.023134855553507805, 0.05258797109127045, -0.005514031741768122, 0.027546079829335213, 0.039951447397470474, 0.07736018300056458, 0.028220284730196, 0.02916417270898819, -0.03028142638504505, 0.002992987632751465, -0.009939705021679401, -0.014129405841231346, 0.0021032781805843115, -0.014803610742092133, -0.02340453676879406, -0.017461903393268585, -0.013609305024147034, 0.01821316033601761, 0.024695158004760742, -0.016460228711366653, -0.046539392322301865, 0.007589619606733322, 0.01392714399844408, 0.015891969203948975, 0.004194516688585281, 0.0997823029756546, -0.037562835961580276, -0.01733669452369213, 0.0006284551345743239, 0.03475043922662735, 0.01847320981323719, 0.03538611903786659, -0.024040216580033302, -0.06819099932909012, 0.01565118134021759, -0.014331666752696037, -0.0445360392332077, -0.0018167410744354129, -0.008360139094293118, 0.033286452293395996, 0.007743723224848509, -0.03968176618218422, 0.020206879824399948, -0.07223622500896454, -0.03877640515565872, 0.05547742173075676, 0.026467353105545044, 0.015323711559176445, 0.0031037498265504837, 0.024098005145788193, 0.007714828941971064, 0.029029330238699913, 0.01858878880739212, -0.04734843596816063, -0.04349583759903908, -0.03868009150028229, 0.002687187632545829, -0.004791669547557831, 0.046115607023239136, -0.04777222499251366, 0.00573074072599411, 0.06738194823265076, -0.006790205370634794, 0.028836701065301895, -0.015516340732574463, -0.009997493587434292, -0.01733669452369213, -0.011981582269072533, 0.08606705069541931, -0.019282257184386253, 0.02363569289445877, 0.012752101756632328, -0.021940549835562706, 0.02951090596616268, 0.010007125325500965, 0.13468684256076813, 0.05058462172746658, -0.018001267686486244, -0.013166256248950958, 0.0016831040848046541, -0.01861768215894699, 0.009703733026981354, -0.046000029891729355, 0.010883591137826443, 0.04442046210169792, 0.033421292901039124, -0.04207037761807442, 0.021786445751786232, 0.00797969475388527, 0.02043803595006466, 0.0035154963843524456, -0.03199583292007446, 0.02375127002596855, 0.011577058583498001, 0.01479397900402546, 0.00645791832357645, -0.003411957761272788, 0.06973203271627426, 0.021401185542345047, 0.10093808174133301, -0.016055705025792122, 0.04287942498922348, 0.001571137923747301, 0.06129484623670578, -0.011095483787357807, 0.02808544412255287, -0.0469246506690979, 0.05855949968099594, 0.002692003268748522, -0.05513068661093712, -0.03700421005487442, 0.04087607190012932, 0.006843178533017635, 0.026043567806482315, 0.046963177621364594, 0.029665010049939156, 0.03440370783209801, 0.056286465376615524, 0.016643226146697998, 0.03378729149699211, -0.06268177926540375, 0.002464459277689457, -0.05983085557818413, 0.028355125337839127, 0.031109733507037163, -0.011490375734865665, 0.038757141679525375, 0.010324964299798012, -0.030801527202129364, -0.0647236555814743, -0.06560975313186646, 0.027642395347356796, 0.013137361034750938, -0.035366855561733246, -0.015699340030550957, -0.03463486209511757, -0.02642882615327835, 0.024695158004760742, -0.019802358001470566, -0.016123125329613686, -0.0057355561293661594, 0.008186772465705872, 0.03927724435925484, 0.014476139098405838, -0.03374876454472542, 0.09777895361185074, -0.015583761967718601, -0.026659982278943062, 0.03819851577281952, -0.012145317159593105, -0.04738696292042732, 0.03968176618218422, -0.026448089629411697, 0.021536026149988174, 0.026332512497901917, -0.011769688688218594, 0.023096328601241112, -0.0013375740963965654, 0.09531328827142715, 0.022479914128780365, -0.035617273300886154, -0.012366841547191143, -0.0054947687312960625, 0.03850672394037247, -0.03731241822242737, -0.025330835953354836, 0.0008006181451492012, -0.06033169478178024, 0.055747102946043015, 0.03948913514614105, -0.02030319534242153, 0.002246546559035778, -0.04426635801792145, 0.020881084725260735, -0.0007229642360471189, 0.025581255555152893, -0.0653400719165802, -0.03101341985166073, 0.003142275847494602, 0.01915704645216465, -0.013474463485181332, -0.04418930783867836, 0.01238610502332449, 0.03070521168410778, 0.0017721953336149454, -0.006356787867844105, -0.010402016341686249, 0.05474542826414108, 0.022075390443205833, 0.01604607328772545, -0.018665840849280357, 0.0032096963841468096, 0.013888617977499962, 0.05840539559721947, 0.0005134791717864573, 0.010768013074994087, -0.005600715521723032, 0.01787605695426464, -0.00689133582636714, -0.06661143153905869, 0.042917948216199875, 0.05239534378051758, 0.04900505393743515, -0.04180069640278816, -0.031475730240345, -0.02038024738430977, -0.04002850130200386, -0.0007079149945639074, 0.0332479253411293, -0.004514764063060284, -0.01401382777839899, 0.02933753840625286, 0.035675063729286194, 0.007945984601974487, 0.07373873889446259, -0.007777433376759291, -0.000030305352993309498, -0.022499175742268562, -0.004192108754068613, -0.03064742311835289, -0.026621457189321518, 0.004514764063060284, 0.0008915154030546546, 0.017972372472286224, -0.002464459277689457, 0.03189951553940773, -0.0006398925324901938, 0.07034844905138016, 0.02887522615492344, 0.05613236129283905, 0.041184280067682266, -0.03255445882678032, 0.00176376779563725, -0.0036021796986460686, -0.056633200496435165, -0.029953954741358757, -0.004199332557618618, -0.044998351484537125, -0.027469027787446976, 0.022614754736423492, 0.008730951696634293, -0.016180913895368576, 0.01178895216435194, 0.005595899652689695, -0.014861399307847023, 0.013840461149811745, -0.06318261474370956, 0.01627722941339016, -0.02696819044649601, -0.05952265113592148, -0.02263401634991169, 0.028952278196811676, -0.003123012837022543, -0.03058963268995285, -0.012135685421526432, 0.042031850665807724, 0.0084660854190588, 0.047964852303266525, -0.002276645042002201, -0.018193896859884262, -0.038814932107925415, -0.010922117158770561, -0.014408718794584274, 0.047194331884384155, -0.02038024738430977, 0.037447258830070496, -0.018887365236878395, 0.0013748961500823498, -0.012752101756632328, -0.0605628527700901, 0.039951447397470474, 0.06071695685386658, -0.02833586372435093, -0.010296070016920567, 0.0016915316227823496, 0.006144894752651453, 0.029568694531917572, 0.028008392080664635, -0.03340202942490578, -0.0528576523065567, 0.013301096856594086, -0.0047724065370857716, -0.02802765555679798, -0.013002520427107811, -0.02055361308157444, 0.016672121360898018, -0.05243386700749397, 0.013840461149811745, 0.08498832583427429, 0.007840038277208805, -0.00871168915182352, -0.06291293352842331, 0.015506709925830364, 0.024791471660137177, 0.04526803269982338, -0.08475717157125473, -0.014909557066857815, 0.030782263725996017, 0.048196010291576385, -0.042378585785627365, -0.015140713192522526, 0.025022627785801888, 0.005499584600329399, 0.03900756314396858, 0.0038790851831436157, 0.01642170175909996, -0.028663333505392075, -0.02565830759704113, -0.03575211390852928, 0.021516762673854828, -0.06310556828975677, -0.09307878464460373, 0.007791880983859301, -0.029915427789092064, -0.0027208977844566107, -0.03748578578233719, 0.001451948075555265, -0.019368939101696014, 0.021054452285170555, -0.041954800486564636, -0.016152020543813705, -0.03781325742602348, 0.061448950320482254, -0.009246236644685268, -0.018848838284611702, 0.05077724903821945, 0.07512567192316055, 0.045345086604356766, -0.04877389967441559, 0.00896692369133234, 0.030011743307113647, 0.020341720432043076, -0.0516633465886116, 0.077783964574337, 0.028220284730196, -0.008586479350924492, -0.06329819560050964, -0.04079902172088623, 0.03998997434973717, -0.016180913895368576, 0.0329589806497097, 0.029607221484184265, -0.022672543302178383, -0.06611059606075287, -0.03700421005487442, 0.02440621331334114, 0.023308221250772476, 0.020630665123462677, -0.06021611765027046, -0.02382832206785679, -0.0007229642360471189, -0.03948913514614105, 0.07173538953065872, -0.039180926978588104, -0.003558838041499257, 0.03297824412584305, -0.0350586473941803, -0.03278561308979988, 0.02394390106201172, 0.02947237901389599, -0.011345903389155865, 0.015256290324032307, 0.005870397202670574, 0.05513068661093712, 0.013580410741269588, -0.02323116920888424, 0.012020108290016651, -0.008374586701393127, -0.0034360364079475403, -0.010440542362630367, 0.005027641076594591, 0.016171282157301903, -0.009390708990395069, -0.06580238789319992, 0.015757128596305847, 0.0012400551931932569, 0.00025478319730609655, -0.007382542360574007, 0.007801512256264687, -0.04164659231901169, 0.00815306231379509, -0.01662396267056465, 0.011085852980613708, -0.060447271913290024, -0.031475730240345, 0.03488527983427048, -0.01950378157198429, -0.10540709644556046, -0.09554444998502731, 0.038699354976415634, 0.012376473285257816, -0.0724673792719841, 0.014582086354494095, -0.017779743298888206, 0.008071194402873516, 0.0020804032683372498, 0.05944559723138809, -0.04137691110372543, -0.03047405555844307, -0.03633000701665878, 0.043572891503572464, -0.030608896166086197, -0.016768435016274452, 0.03731241822242737, 0.05335849151015282, -0.07705197483301163, 0.005461058579385281, 0.016229072585701942, 0.01956157013773918, 0.007016545161604881, -0.018222792074084282, -0.008576847612857819, 0.03937355801463127, 0.02328895963728428, -0.08599000424146652, 0.012636523693799973, -0.019715674221515656, -0.006014869548380375, -0.0243484228849411, -0.02881743758916855, -0.05655615031719208, -0.057943083345890045, 0.015545235946774483, 0.09546739608049393, -0.002339249709621072, 0.0030844868160784245, -0.02916417270898819, -0.007055071182549, 0.04761812090873718, -0.06279736012220383, -0.03220772370696068, 0.0046183024533092976, -0.11411397159099579, 0.0059426333755254745, -0.03658042475581169, 0.051701873540878296, 0.0017986820312216878, 0.004505132790654898, -0.05397490784525871, -0.005191376898437738, 0.02667924575507641, 0.029915427789092064, 0.015699340030550957, 0.029915427789092064, -0.005509215872734785, 0.008100088685750961, 0.04877389967441559, -0.010430910624563694, -0.00786893256008625, 0.004136727657169104, -0.02762313187122345, -0.028894489631056786, 0.007165833376348019, 0.06017759069800377, 0.03440370783209801, -0.02197907492518425, 0.046963177621364594, -0.057827506214380264, -0.01647949032485485, -0.012126054614782333, -0.014418350532650948, 0.02382832206785679, 0.02078476920723915, 0.051701873540878296, -0.009833757765591145, -0.024637367576360703, -0.023211907595396042, 0.04129985719919205, -0.000747042940929532, 0.007700381800532341, 0.0013098835479468107, -0.03623368963599205, -0.008076010271906853, -0.0127713643014431, -0.014167931862175465, -0.05451427027583122, -0.021651605144143105, -0.02536936290562153, 0.01570897176861763, 0.014890293590724468, 0.005075798835605383, -0.028412915766239166, -0.02311559207737446, 0.024637367576360703, -0.011172535829246044, 0.062103889882564545, 0.04723285883665085, -0.004180069547146559, -0.046192657202482224, 0.013830829411745071, -0.01351298950612545, -0.05956117436289787, 0.03713905066251755, -0.0036382977850735188, -0.018521368503570557, -0.04626971110701561, -0.016672121360898018, 0.01419682614505291, -0.006616838276386261, 0.031340889632701874, -0.046539392322301865, -0.0558241531252861, -0.05832834541797638, 0.004673683550208807, -0.030204374343156815, -0.006193052511662245, -0.008249376900494099, -0.06433840095996857, 0.0909213274717331, -0.012289789505302906, 0.036618951708078384, 0.00645791832357645, -0.0012966402573511004, 0.008413112722337246, -0.06607206910848618, 0.031148260459303856, 0.05297323316335678, 0.031206049025058746, -0.07751428335905075, -0.003541982965543866, 0.02679482288658619, 0.03619516268372536, -0.01428350992500782, -0.041184280067682266, 0.008981370367109776, -0.036561161279678345, -0.0009956560097634792, 0.014110142365098, -0.007425883784890175, 0.012270526960492134, -0.07266001403331757, -0.026814086362719536, 0.00582223990932107, 0.03076300024986267, -0.02149750106036663, 0.03823704272508621, 0.031206049025058746, -0.030069531872868538, -0.03403770923614502, 0.012511313892900944, -0.049274735152721405, 0.05177892744541168, 0.007647408172488213, 0.056517623364925385, 0.07266001403331757, -0.002487333957105875, 0.031514257192611694, -0.03686936944723129, -0.005446611437946558, 0.0026245827320963144, 0.04164659231901169, -0.017799006775021553, -0.01912815310060978, 0.06260472536087036, -0.021786445751786232, 0.010970274917781353, -0.02577388472855091, 0.01280025951564312, 0.03555948659777641, 0.06680405884981155, -0.05131661519408226, 0.017086274921894073, -0.034365180879831314, -0.05802013725042343, -0.09045901894569397, -0.009800047613680363, -0.05231828987598419, 0.09415750950574875, 0.005721108987927437, 0.01365746185183525, 0.03153352066874504, 0.029414590448141098, -0.0010486291721463203 ]
717,529
pytorch_optimizer.optimizer.prodigy
__str__
null
def __str__(self) -> str: return 'Prodigy'
(self) -> str
[ 0.011089558713138103, -0.02426757849752903, 0.002098170341923833, -0.03267320618033409, 0.04059555009007454, -0.09251367300748825, 0.04546287655830383, -0.002856532111763954, 0.10652880370616913, -0.03907667100429535, -0.02578645944595337, -0.010899698361754417, -0.006347369868308306, 0.019400255754590034, -0.010243818163871765, -0.027736840769648552, 0.010847918689250946, -0.09858919680118561, 0.04076815024018288, 0.028358202427625656, 0.018071234226226807, 0.05923636630177498, 0.04076815024018288, -0.04273579269647598, -0.02371525764465332, 0.048051878809928894, -0.009320407174527645, -0.014420741237699986, -0.01291911955922842, -0.016724953427910805, 0.010537237860262394, -0.023542657494544983, -0.016552353277802467, 0.02961818315088749, -0.03348442539572716, 0.0782223790884018, -0.053506042808294296, 0.043667834252119064, -0.011037778109312057, -0.0022653767373412848, -0.004724928643554449, 0.03648766875267029, -0.04715435579419136, -0.03552110865712166, -0.0328630656003952, -0.02040133625268936, -0.019486555829644203, 0.09506815671920776, 0.0014714160934090614, 0.005311768967658281, 0.0018953651888296008, 0.03427838534116745, -0.04266675189137459, -0.016250303015112877, -0.05019211769104004, -0.003257827600464225, 0.042148951441049576, 0.007231945637613535, -0.01102914847433567, 0.02934202179312706, -0.029687222093343735, -0.00980368722230196, 0.0370054692029953, -0.031948283314704895, 0.017165083438158035, 0.008345216512680054, 0.009881357662379742, 0.015896473079919815, 0.027046440169215202, 0.027598761022090912, 0.051331277936697006, -0.04125143215060234, -0.04674011468887329, 0.03548658639192581, 0.02399141900241375, -0.02828916162252426, -0.049536239355802536, -0.026649460196495056, 0.04004323109984398, -0.003460632637143135, 0.000691479304805398, -0.023818818852305412, -0.040388431400060654, -0.010847918689250946, 0.005562039092183113, -0.04995047673583031, 0.029031341895461082, -0.06393109261989594, -0.04774119704961777, 0.03769586980342865, -0.03728162869811058, 0.04642943665385246, -0.0019223339622840285, 0.045946154743433, 0.004975198768079281, -0.02925572171807289, 0.03113706409931183, -0.0376613475382328, 0.005121909081935883, 0.014929911121726036, -0.010649427771568298, 0.03945638984441757, -0.04442727565765381, -0.013005419634282589, -0.014921281486749649, -0.024664558470249176, -0.013980611227452755, 0.04970883950591087, 0.0018910502549260855, 0.002433661837130785, -0.03443372622132301, -0.006994620431214571, -0.003184472443535924, -0.011460648849606514, 0.03590082749724388, -0.04539383575320244, -0.05809720605611801, -0.007313930429518223, 0.06700336933135986, -0.017415354028344154, 0.012142419815063477, 0.03797202929854393, -0.049260079860687256, 0.009976287372410297, 0.0246818196028471, 0.08077686280012131, -0.05084799975156784, -0.009484377689659595, 0.05043375864624977, -0.020970916375517845, 0.011848999187350273, 0.027892181649804115, -0.082157664000988, -0.037902988493442535, 0.06669269502162933, 0.019296694546937943, 0.020694756880402565, -0.00015358715609181672, 0.0636894479393959, 0.11074024438858032, 0.006097099743783474, -0.005419644061475992, 0.03105076402425766, 0.02934202179312706, 0.009907247498631477, -0.0028198547661304474, -0.009587937034666538, 0.055301081389188766, -0.05471424385905266, -0.009285886771976948, 0.04111335054039955, 0.02090187557041645, 0.03676382824778557, -0.058753084391355515, 0.020056135952472687, 0.05029567703604698, -0.016526462510228157, -0.04850063845515251, 0.030101463198661804, -0.05754488334059715, -0.005147798918187618, -0.012651589699089527, 0.022438017651438713, 0.026511380448937416, -0.0014196360716596246, 0.04891487956047058, 0.035555627197027206, -0.002699034521356225, 0.03267320618033409, 0.004181238356977701, -0.02371525764465332, -0.0726301372051239, -0.06255029141902924, 0.00685222540050745, 0.023335538804531097, 0.05578436329960823, 0.01993531547486782, 0.058338843286037445, 0.03265594691038132, -0.02727082185447216, 0.010632168501615524, -0.016336603090167046, -0.04767215624451637, 0.04128595069050789, 0.0781533420085907, -0.026960140094161034, 0.035728227347135544, 0.03814462944865227, 0.024750858545303345, 0.003471420146524906, -0.028202861547470093, -0.009216846898198128, -0.01850273460149765, 0.039974190294742584, 0.0022308568004518747, -0.04718887805938721, 0.02547577954828739, -0.05540464445948601, -0.030757343396544456, 0.005497314035892487, 0.006800445262342691, 0.02564837969839573, -0.043943993747234344, 0.03196554630994797, 0.03265594691038132, 0.015188811346888542, 0.0075296806171536446, -0.007887826301157475, 0.02214459702372551, -0.06127304583787918, 0.03828271105885506, 0.011452019214630127, -0.0023495194036513567, -0.011676399037241936, 0.03191376477479935, -0.033933185040950775, 0.05357507988810539, -0.033933185040950775, -0.03593534603714943, 0.025993579998612404, 0.048051878809928894, -0.030515704303979874, 0.007072290405631065, -0.015473602339625359, -0.018813414499163628, 0.013186650350689888, 0.007020510267466307, 0.005747584626078606, -0.0056310794316232204, -0.0301359836012125, 0.00539806904271245, -0.06089332699775696, -0.0137044508010149, 0.03821367025375366, 0.017354942858219147, 0.01363541092723608, -0.04511767625808716, 0.00966560747474432, -0.07318245619535446, 0.008660211227834225, 0.026770280674099922, 0.0028781071305274963, -0.00192017643712461, 0.00008441225509159267, 0.015680722892284393, -0.0164315328001976, 0.010623537935316563, -0.009372186847031116, 0.020142436027526855, -0.0038986054714769125, 0.0740799754858017, -0.03491700813174248, -0.03313922509551048, -0.02366347797214985, 0.010278337635099888, -0.04629135504364967, -0.03714354708790779, -0.02214459702372551, 0.019728194922208786, -0.005449849180877209, -0.07477037608623505, 0.0036483353469520807, -0.0418037511408329, 0.025216879323124886, 0.01278103981167078, 0.007706596050411463, -0.028116561472415924, 0.015499492175877094, 0.05623312294483185, -0.014679641462862492, 0.09637991338968277, 0.019538335502147675, -0.014472520910203457, 0.03377784788608551, -0.05236687883734703, -0.04125143215060234, -0.033052925020456314, 0.06966141611337662, -0.05958156660199165, -0.03206910565495491, -0.012565289624035358, -0.02735712192952633, 0.03163760527968407, 0.023231977596879005, -0.002916942350566387, -0.0534370020031929, 0.02062571607530117, 0.023007597774267197, 0.029100382700562477, 0.04121691361069679, 0.05785556510090828, 0.05574984475970268, -0.003946070559322834, 0.005678544286638498, 0.018019454553723335, 0.026407821103930473, 0.07235397398471832, 0.05108964070677757, -0.006114359945058823, -0.017303163185715675, 0.028116561472415924, 0.008530762046575546, -0.015024841763079166, -0.06179084628820419, -0.04363331198692322, 0.013074460439383984, 0.036694787442684174, -0.04076815024018288, 0.0019428302766755223, -0.0008656975696794689, -0.022127337753772736, 0.028530802577733994, 0.01663002371788025, 0.12565289437770844, -0.031068023294210434, 0.05789008364081383, -0.009449857287108898, -0.003456317586824298, 0.01171954907476902, 0.040388431400060654, -0.04056103155016899, 0.0260626208037138, 0.002580371918156743, 0.01718234270811081, 0.01656961254775524, -0.010916958563029766, -0.06800445169210434, 0.03779942914843559, 0.012608439661562443, 0.040112271904945374, -0.018519993871450424, -0.03400222584605217, 0.034312907606363297, 0.005445534363389015, -0.026494121178984642, 0.02942832186818123, 0.03548658639192581, -0.023059377446770668, -0.021747617051005363, -0.0311888437718153, 0.0754607766866684, -0.0284272413700819, -0.05457616224884987, 0.0315513052046299, 0.00019282671564724296, 0.0142308808863163, -0.043391674757003784, -0.014041020534932613, 0.03769586980342865, -0.020608456805348396, -0.001994610298424959, -0.009769167751073837, 0.022403497248888016, 0.019900795072317123, -0.017613843083381653, -0.03486522659659386, -0.028479022905230522, 0.0506753996014595, -0.02399141900241375, 0.022904038429260254, -0.005005403887480497, -0.039007630199193954, 0.0009541551116853952, 0.04259771108627319, -0.03980159014463425, -0.0018457426922395825, 0.01924491487443447, 0.013713080435991287, 0.02934202179312706, -0.01469690166413784, -0.007076605688780546, 0.02818560227751732, -0.056164082139730453, -0.01202159933745861, -0.020504895597696304, 0.0835384652018547, 0.041044313460588455, 0.03610794618725777, -0.040630072355270386, -0.02790944091975689, 0.007861936464905739, 0.001907231518998742, 0.010640798136591911, 0.0795341432094574, -0.04753407835960388, 0.012582549825310707, 0.023318277671933174, 0.023042118176817894, 0.02307663857936859, -0.016000032424926758, -0.0011812321608886123, -0.03565918654203415, -0.01621578261256218, 0.0007475743186660111, -0.031171584501862526, -0.08195054531097412, -0.005933129694312811, -0.043667834252119064, -0.06251576542854309, 0.03526220843195915, 0.03526220843195915, -0.041182391345500946, -0.007918030954897404, -0.03389866650104523, -0.03246608376502991, 0.02658042125403881, -0.010537237860262394, 0.02934202179312706, -0.03855887055397034, 0.005057184025645256, 0.007672076113522053, -0.010597648099064827, -0.035037826746702194, -0.0684877336025238, 0.03855887055397034, -0.012401320040225983, -0.034036748111248016, -0.012599810026586056, 0.008914796635508537, -0.003348442493006587, -0.01808849349617958, 0.038317229598760605, 0.04442727565765381, 0.0609968863427639, -0.020332295447587967, 0.054783280938863754, 0.018002193421125412, 0.04076815024018288, 0.13083089888095856, 0.0019924528896808624, -0.028910521417856216, 0.007818786427378654, 0.003421797649934888, -0.007848991081118584, 0.034986045211553574, -0.05906376615166664, 0.029911603778600693, -0.010174778290092945, -0.06755569577217102, 0.03184472396969795, 0.02454373985528946, -0.04183827340602875, 0.025941800326108932, 0.0425286740064621, 0.05291920155286789, -0.01969367451965809, -0.06879841536283493, -0.015059361234307289, 0.03710902854800224, 0.015723872929811478, -0.043253593146800995, 0.02948010340332985, 0.02426757849752903, -0.03313922509551048, 0.0260281004011631, -0.02804752252995968, 0.005005403887480497, -0.05726872384548187, 0.011037778109312057, -0.003195259952917695, -0.048638716340065, 0.06116948649287224, -0.026287000626325607, 0.028202861547470093, 0.019814494997262955, -0.036384109407663345, -0.026839321479201317, 0.04480699449777603, -0.0638275295495987, 0.008207136765122414, 0.03576274588704109, 0.006722775287926197, -0.01965915597975254, -0.025855500251054764, -0.027754101902246475, 0.07552982121706009, -0.021885696798563004, 0.020245995372533798, 0.017881372943520546, -0.02782314084470272, -0.030567483976483345, -0.022351717576384544, -0.012142419815063477, 0.0822267010807991, -0.02349087782204151, -0.027426160871982574, -0.011926669627428055, 0.01224597916007042, -0.04211443290114403, 0.006524284835904837, 0.045600954443216324, -0.00152211741078645, -0.0561986044049263, 0.008578226901590824, -0.023818818852305412, 0.04919103905558586, -0.005475739017128944, -0.015879211947321892, -0.07325149327516556, 0.019676415249705315, 0.025613859295845032, -0.0030679674819111824, 0.020556675270199776, -0.0062222350388765335, 0.01605181209743023, -0.026010839268565178, -0.0028781071305274963, 0.04932911694049835, -0.019900795072317123, -0.010226557962596416, -0.00483280373737216, -0.02390511892735958, 0.036384109407663345, -0.020504895597696304, 0.011313938535749912, 0.005954704713076353, 0.049570757895708084, 0.018813414499163628, -0.014740051701664925, 0.022213637828826904, 0.021471455693244934, -0.010528608225286007, -0.01900327391922474, -0.004858693573623896, -0.00817693118005991, 0.013290210627019405, -0.02716726064682007, -0.0010469276458024979, -0.03586630895733833, 0.07718677818775177, 0.034123048186302185, 0.022783217951655388, -0.003922338131815195, 0.03184472396969795, -0.003387277713045478, 0.0534370020031929, -0.1124662458896637, 0.004884583875536919, 0.04525575414299965, 0.030757343396544456, 0.025027019903063774, -0.05951252579689026, 0.0035879253409802914, -0.021212555468082428, 0.027943961322307587, -0.006977360229939222, -0.006688255351036787, 0.016414273530244827, -0.014187730848789215, 0.0006154273287393153, -0.012194199487566948, -0.02713274024426937, -0.03714354708790779, -0.03621150925755501, 0.0219202172011137, 0.05347152054309845, 0.019486555829644203, 0.009639717638492584, 0.04100979119539261, 0.028271902352571487, -0.028548061847686768, -0.035313986241817474, 0.051503878086805344, 0.022317197173833847, 0.03417482599616051, 0.019762715324759483, -0.06437984853982925, 0.06255029141902924, -0.008224396035075188, -0.053816720843315125, 0.016000032424926758, -0.0637584924697876, 0.004504863638430834, 0.06510476768016815, -0.05171100050210953, 0.0038425105158239603, 0.046809155493974686, 0.03821367025375366, -0.045290276408195496, 0.033380866050720215, -0.07628925889730453, 0.040388431400060654, -0.006567434873431921, -0.03452002629637718, -0.05108964070677757, -0.026597680523991585, -0.00268177455291152, -0.015568532049655914, 0.06082428619265556, -0.06610585004091263, -0.054921362549066544, 0.015059361234307289, -0.01360952015966177, -0.019365735352039337, 0.05951252579689026, -0.06689981371164322, 0.010873808525502682, -0.045946154743433, 0.017881372943520546, -0.007685021031647921, 0.028617102652788162, 0.03738518804311752, 0.04477247595787048, 0.027736840769648552, 0.0753917396068573, 0.018882455304265022, -0.00023354955192189664, 0.01240994967520237, -0.018157534301280975, 0.004023740533739328, -0.016474682837724686, 0.011840369552373886, -0.041872791945934296, 0.0045997933484613895, -0.03313922509551048, -0.030791863799095154, -0.009078767150640488, -0.014084170572459698, -0.04294291138648987, -0.001155342091806233, -0.003663437906652689, 0.06683076918125153, -0.017199603840708733, 0.05899472534656525, -0.055024921894073486, 0.01363541092723608, -0.012116529047489166, -0.0726301372051239, 0.02865162305533886, -0.08788798749446869, 0.030740084126591682, -0.0021175879519432783, -0.004375413525849581, -0.058718565851449966, -0.019849015399813652, -0.03452002629637718, 0.02666672132909298, -0.004608423449099064, -0.03348442539572716, -0.0019406727515161037, -0.05978868529200554, -0.022852256894111633, -0.047361478209495544, 0.007292355410754681, -0.05260851979255676, 0.014947171323001385, -0.10514800250530243, -0.06945428997278214, -0.00476376386359334, -0.07235397398471832, -0.025458520278334618, -0.01891697384417057, 0.0008004331029951572, 0.032276224344968796, -0.017216863110661507, -0.008375421166419983, -0.009544786997139454, 0.024940719828009605, -0.06500121206045151, -0.006601955275982618, 0.006110044661909342, -0.05657832324504852, 0.019124094396829605, -0.01003669761121273, 0.08188150078058243, 0.036694787442684174, -0.015784282237291336, -0.04829351603984833, -0.030015163123607635, -0.022265417501330376, 0.0506753996014595, 0.0753917396068573, 0.018623555079102516, -0.0466020368039608, -0.015844691544771194, 0.0016494099982082844, -0.012599810026586056, 0.04705079644918442, 0.056681882590055466, -0.033052925020456314, 0.036694787442684174, -0.053782202303409576, 0.004880268592387438, -0.0438404344022274, 0.03322552517056465, 0.0636894479393959, -0.031948283314704895, -0.023404577746987343, 0.003920180723071098, -0.05461068078875542, -0.07228493690490723, -0.04439275339245796, -0.04836255684494972, -0.003160740016028285, 0.06279192864894867, -0.012806929647922516, -0.01632797345519066, -0.03341538459062576, -0.017078783363103867, -0.009423967450857162, 0.02117803692817688, 0.03962898999452591, 0.010908327996730804, 0.009303146973252296, -0.019365735352039337, 0.020142436027526855, -0.028082041069865227, -0.01743261329829693, -0.0015738974325358868, -0.042701274156570435, 0.032500606030225754, 0.0609968863427639, -0.039939671754837036, -0.05864952504634857, 0.03786846995353699, -0.05671640485525131, 0.010597648099064827, 0.029083121567964554, -0.023093897849321365, -0.010787508450448513, 0.006023744586855173, 0.010537237860262394, -0.041458550840616226, -0.015188811346888542, 0.07994838058948517, 0.05288467928767204, -0.006571750156581402, -0.05954704433679581, -0.042977433651685715, -0.023473618552088737, 0.019728194922208786, 0.016673173755407333, -0.04753407835960388, -0.00023179658455774188, 0.04622231423854828, -0.0003317158843856305, 0.0032599850092083216, -0.011572838760912418, 0.0849883034825325, -0.005234098993241787, -0.004319318104535341, 0.03191376477479935, 0.013212540186941624, -0.026925621554255486, 0.01065805833786726, 0.023370057344436646, 0.02694288082420826, 0.0005604110774584115, -0.03353620693087578, 0.04045747220516205, 0.036004386842250824, 0.03814462944865227, -0.017441242933273315, -0.0028932096902281046, -0.015249221585690975, -0.01615537330508232, 0.018261093646287918, 0.027339860796928406, -0.028617102652788162, 0.009924507699906826, -0.001082526403479278, -0.0014724949141964316, 0.014084170572459698, 0.005212523974478245, 0.03455454483628273, 0.03852434828877449, 0.0011413183528929949, -0.015956882387399673 ]
717,550
pytorch_optimizer.optimizer.prodigy
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_de_nom = torch.tensor([0.0], device=device) beta1, beta2 = group['betas'] beta3 = group['beta3'] if group['beta3'] is not None else math.sqrt(beta2) bias_correction1: float = 1.0 - beta1 ** group['step'] bias_correction2_sq: float = math.sqrt(1.0 - beta2 ** group['step']) bias_correction: float = (bias_correction1 / bias_correction2_sq) if group['bias_correction'] else 1.0 d, d0 = group['d'], group['d0'] d_lr: float = d * group['lr'] / bias_correction if 'd_numerator' not in group: group['d_numerator'] = torch.tensor([0.0], device=device) d_numerator = group['d_numerator'] d_numerator.mul_(beta3) 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['s'] = torch.zeros_like(p) state['p0'] = p.clone() state['exp_avg'] = torch.zeros_like(p) state['exp_avg_sq'] = torch.zeros_like(p) p0, exp_avg, exp_avg_sq = state['p0'], state['exp_avg'], state['exp_avg_sq'] d_numerator.add_(torch.dot(grad.flatten(), (p0 - p).flatten()), alpha=(d / d0) * d_lr) exp_avg.mul_(beta1).add_(grad, alpha=d * (1.0 - beta1)) exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=d * d * (1.0 - beta2)) s = state['s'] s.mul_(beta3).add_(grad, alpha=(d / d0) * (d if group['safeguard_warmup'] else d_lr)) d_de_nom.add_(s.abs().sum()) if d_de_nom == 0: return loss d_hat = (group['d_coef'] * d_numerator / d_de_nom).item() if d == group['d0']: d = max(d, d_hat) d_max = max(group['d_max'], d_hat) d = min(d_max, d * group['growth_rate']) for group in self.param_groups: group['step'] += 1 group['d_numerator'] = d_numerator group['d_de_nom'] = d_de_nom group['d'] = d group['d_max'] = d_max group['d_hat'] = d_hat 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_(d * group['eps']) self.apply_weight_decay( p, p.grad, 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=-d_lr) return loss
(self)
[ 0.00022305840684566647, -0.022403746843338013, -0.025556428357958794, 0.05603891983628273, -0.0035270629450678825, 0.012167382054030895, -0.031211551278829575, -0.05335914343595505, -0.0350341796875, 0.007305355276912451, -0.023881565779447556, 0.013359489850699902, 0.01686684787273407, 0.08149682730436325, -0.021970251575112343, 0.04141835868358612, 0.009763461537659168, 0.046699102967977524, 0.01880771853029728, -0.018177181482315063, -0.029221421107649803, -0.061753157526254654, -0.01998012140393257, 0.04886656999588013, -0.07180233299732208, -0.0154875498265028, 0.04197007790207863, -0.009527010843157768, -0.02463032677769661, 0.01180285308510065, -0.023586001247167587, -0.052610378712415695, 0.010896457359194756, 0.004485182464122772, 0.0236057061702013, -0.04295529052615166, 0.015773260965943336, 0.02045302465558052, -0.1244521215558052, -0.044452816247940063, -0.01893579587340355, -0.03519181162118912, 0.01130039431154728, -0.0022635271307080984, 0.0025184510741382837, 0.012492502108216286, -0.029103195294737816, 0.057536445558071136, -0.005980243440717459, -0.005645270925015211, 0.031684454530477524, -0.05611773952841759, 0.04224593937397003, -0.008300420828163624, -0.006004873663187027, 0.07373335212469101, 0.07787124067544937, -0.050758179277181625, 0.051231082528829575, -0.053004465997219086, 0.06273837387561798, -0.06057090312242508, 0.017576200887560844, 0.007714218460023403, -0.019694410264492035, -0.01993086189031601, -0.054344356060028076, -0.04066959768533707, 0.0014889033045619726, 0.04918183758854866, 0.02230522409081459, -0.00638418085873127, 0.016157494857907295, 0.006339846178889275, -0.02088651806116104, -0.023093394935131073, -0.023743635043501854, -0.06372358649969101, 0.022462857887148857, -0.025871695950627327, 0.011507289484143257, -0.012738805264234543, -0.016719065606594086, -0.0009895233670249581, 0.0014039286179468036, -0.030344564467668533, 0.0011440786765888333, -0.019536776468157768, -0.005733940284699202, -0.023093394935131073, 0.01153684500604868, 0.00585709186270833, 0.028334729373455048, 0.04784194752573967, 0.047644905745983124, 0.05465962365269661, -0.03996024280786514, -0.004844785667955875, -0.03590116649866104, -0.029004674404859543, 0.02531997673213482, 0.028354432433843613, 0.006797970272600651, 0.03127066418528557, 0.01980278268456459, -0.06510288268327713, -0.009980209171772003, -0.013477715663611889, 0.03245291858911514, -0.061201438307762146, -0.04744786396622658, -0.006123099476099014, -0.03398985043168068, 0.00419454462826252, -0.03333961218595505, -0.016847144812345505, -0.013497419655323029, 0.02100474387407303, -0.026068739593029022, 0.03858094662427902, 0.0278618261218071, 0.018571266904473305, -0.06786147505044937, 0.004201933741569519, 0.013566384091973305, 0.020393911749124527, 0.05982213839888573, 0.028827335685491562, 0.034620389342308044, -0.0531620979309082, -0.008576280437409878, -0.0014162438455969095, -0.008443276397883892, -0.014581154100596905, 0.03903414309024811, -0.033713992685079575, -0.02821650356054306, 0.012285607866942883, 0.014847161248326302, 0.00794081762433052, 0.007157573010772467, 0.00992109626531601, -0.02023627795279026, 0.006522110663354397, 0.041181907057762146, 0.03430512174963951, 0.06265955418348312, 0.058600474148988724, -0.012384128756821156, -0.003884202567860484, 0.01588163524866104, 0.03274848312139511, 0.026935726404190063, 0.0036231211852282286, 0.013507272116839886, 0.008699432015419006, -0.027231290936470032, 0.009866909123957157, -0.027290403842926025, -0.02955639362335205, -0.012265902943909168, -0.032078538089990616, -0.014374258928000927, 0.00992109626531601, 0.03129036724567413, 0.016236312687397003, -0.02281753532588482, 0.038029227405786514, -0.03684696927666664, 0.024650031700730324, -0.000552950834389776, -0.028787927702069283, 0.022443154826760292, 0.0240786075592041, -0.019182099029421806, 0.11995954811573029, 0.011526993475854397, -0.007807814050465822, -0.042127713561058044, -0.009482676163315773, 0.033280499279499054, -0.010098434053361416, -0.0029605652671307325, -0.04133954271674156, -0.012689544819295406, 0.0353691503405571, 0.018620528280735016, -0.01412795577198267, 0.020985038951039314, 0.011054091155529022, 0.008822583593428135, -0.011044238694012165, 0.02843325026333332, -0.014078695327043533, -0.003492580493912101, 0.02701454423367977, 0.037378985434770584, 0.0053841895423829556, 0.10080700367689133, 0.011526993475854397, 0.007995004765689373, -0.016758475452661514, 0.02053184062242508, -0.006536888889968395, -0.04701437056064606, -0.0139998784288764, -0.027980051934719086, 0.06522110849618912, 0.005950686987489462, 0.009147703647613525, -0.05879751965403557, 0.007329985499382019, 0.03046278841793537, 0.06325068324804306, 0.04334937781095505, -0.059388644993305206, 0.011763444170355797, 0.025339681655168533, 0.055290158838033676, -0.011861965991556644, -0.017113151028752327, -0.06447234749794006, 0.026384007185697556, -0.0012555309804156423, 0.041575994342565536, -0.041694220155477524, 0.0407090038061142, -0.03653170168399811, -0.013763426803052425, -0.008256086148321629, 0.018344668671488762, -0.04338878393173218, 0.014620562084019184, -0.017290489748120308, 0.0419306680560112, 0.023586001247167587, -0.04500453546643257, -0.020255981013178825, -0.012325015850365162, -0.0044285329058766365, -0.040827229619026184, -0.040236104279756546, -0.033930737525224686, 0.03426571190357208, -0.0008916178485378623, 0.025142638012766838, 0.076294906437397, 0.010935865342617035, -0.021457942202687263, 0.03653170168399811, -0.030837170779705048, -0.03196031227707863, -0.03986172378063202, 0.027763305231928825, -0.05737880989909172, -0.03398985043168068, 0.07215701043605804, 0.04831485077738762, 0.04780254140496254, -0.06407826393842697, -0.0038349421229213476, -0.05402908846735954, -0.06057090312242508, 0.05150694027543068, -0.04681732505559921, 0.018187033012509346, 0.05607832968235016, -0.036216434091329575, 0.03670904040336609, 0.02506382204592228, 0.07436388731002808, 0.09521099179983139, -0.0647876113653183, -0.034580979496240616, -0.008137860335409641, 0.025851991027593613, 0.020866813138127327, 0.0017401326913386583, 0.01583237387239933, -0.01391120906919241, 0.061713747680187225, -0.06612750142812729, -0.07077770680189133, 0.008078747428953648, -0.05130989849567413, 0.04362523555755615, -0.012246198952198029, -0.010325033217668533, 0.048905979841947556, 0.007911261171102524, 0.02005893923342228, -0.0008897705702111125, 0.08283671736717224, 0.02640371210873127, 0.0745215192437172, -0.004315233323723078, -0.011763444170355797, 0.021950548514723778, -0.02498500421643257, 0.026324894279241562, 0.062620148062706, -0.008595984429121017, 0.0215761661529541, 0.006743783596903086, -0.02459091879427433, -0.020827405154705048, 0.03507358580827713, -0.009438341483473778, 0.012807770632207394, -0.02998988702893257, -0.00298273260705173, 0.015586071647703648, 0.026384007185697556, 0.020689474418759346, -0.005517193581908941, -0.08638348430395126, -0.009118147194385529, -0.04496512562036514, 0.03779277577996254, 0.07566436380147934, -0.01648261584341526, 0.04055137187242508, 0.0186008233577013, 0.04137894883751869, -0.02260078862309456, -0.019270768389105797, 0.077516570687294, 0.03495535999536514, -0.0223840419203043, -0.021989956498146057, -0.06880728155374527, -0.026029329746961594, 0.043901097029447556, 0.018916090950369835, -0.031250961124897, -0.027664784342050552, 0.033753402531147, -0.020413614809513092, 0.02731010690331459, -0.04110309109091759, 0.06104380264878273, 0.028807630762457848, -0.04102427512407303, 0.027625376358628273, 0.01140876766294241, -0.04141835868358612, 0.05056113749742508, 0.03046278841793537, 0.02916230820119381, 0.024236243218183517, -0.02441358007490635, 0.015763409435749054, -0.00879795290529728, 0.0735757127404213, 0.033753402531147, 0.029024377465248108, -0.005448228679597378, -0.010896457359194756, 0.023881565779447556, -0.0588369257748127, 0.01811806857585907, 0.035053882747888565, -0.04094545543193817, 0.09505335986614227, 0.11042268574237823, -0.019556479528546333, -0.03391103446483612, -0.0290834903717041, 0.05741821974515915, -0.03205883502960205, 0.004682225175201893, -0.045832112431526184, -0.005137886386364698, 0.0311130303889513, -0.048511892557144165, -0.015940748155117035, -0.04244298115372658, -0.01380283571779728, 0.06399944424629211, 0.041733626276254654, 0.022797830402851105, -0.040058765560388565, -0.010127990506589413, 0.04130013287067413, 0.0278618261218071, -0.027369219809770584, 0.03412778303027153, -0.04831485077738762, 0.028787927702069283, -0.07645253837108612, 0.07337867468595505, 0.014029434882104397, 0.010285625234246254, 0.02074858732521534, -0.06786147505044937, 0.036472588777542114, 0.046659693121910095, 0.02230522409081459, -0.0657334178686142, -0.02394067868590355, -0.029654914513230324, -0.01993086189031601, -0.004655132070183754, 0.017891470342874527, -0.005551675800234079, -0.08598940074443817, 0.020029382780194283, 0.05268919840455055, 0.0019273231737315655, 0.054501987993717194, -0.02898496948182583, -0.004630501382052898, -0.03804893046617508, 0.004637890495359898, 0.009980209171772003, -0.04953651502728462, -0.012167382054030895, 0.0014889033045619726, -0.001100975670851767, 0.01022651232779026, 0.034443050622940063, -0.007995004765689373, 0.04330996796488762, 0.04370405152440071, -0.024748552590608597, -0.04472867399454117, -0.05162516608834267, -0.011349654756486416, -0.0431523323059082, 0.0030886430758982897, -0.03010811284184456, -0.029280534014105797, -0.017201820388436317, -0.034876544028520584, -0.009556567296385765, -0.008748692460358143, 0.001960574183613062, 0.05568424612283707, 0.048511892557144165, 0.012925995513796806, -0.006674818694591522, 0.01151714101433754, 0.008965439163148403, -0.014581154100596905, -0.013192003592848778, -0.023191915825009346, 0.05635419115424156, -0.022246111184358597, -0.09607797861099243, 0.009581197053194046, 0.0117338877171278, -0.001105901668779552, 0.06766443699598312, 0.0015677203191444278, 0.022797830402851105, 0.004807840101420879, -0.031723860651254654, -0.01885697804391384, 0.004610797390341759, -0.0027758379001170397, 0.015191986225545406, 0.026561345905065536, -0.029615506529808044, 0.03586175665259361, -0.0240786075592041, 0.02179291471838951, 0.07329985499382019, 0.022620493546128273, -0.012344719842076302, 0.005709310062229633, 0.001568951876834035, 0.002965491497889161, 0.020118052139878273, -0.02829531952738762, -0.0469355508685112, -0.022620493546128273, -0.02796034887433052, -0.002556628081947565, 0.01929047331213951, -0.04374346137046814, 0.011201873421669006, -0.07042302936315536, 0.02890615165233612, 0.0419306680560112, -0.010876752436161041, 0.027152473106980324, 0.0009562724735587835, 0.0209653340280056, 0.041575994342565536, 0.04780254140496254, -0.056708864867687225, -0.057181768119335175, 0.04866952821612358, 0.019871748983860016, -0.051743391901254654, -0.03290611878037453, 0.03339872509241104, -0.01919195055961609, 0.09213712811470032, -0.04015728458762169, 0.018098365515470505, 0.027428332716226578, -0.04981237277388573, -0.024531805887818336, -0.00293347192928195, -0.021989956498146057, -0.04457104206085205, 0.033753402531147, -0.05107344686985016, 0.02463032677769661, -0.009029477834701538, -0.013832392171025276, 0.007866926491260529, 0.013763426803052425, -0.023881565779447556, -0.04145776852965355, 0.032590851187705994, 0.07333926111459732, 0.04141835868358612, -0.04823603481054306, 0.042127713561058044, 0.026068739593029022, -0.0032487402204424143, -0.01307377777993679, 0.008822583593428135, 0.0541079044342041, -0.021083559840917587, -0.0198816005140543, 0.004519665148109198, 0.002003677189350128, -0.01949736662209034, 0.006596001796424389, 0.04330996796488762, 0.06053149327635765, -0.012453093193471432, -0.046265605837106705, 0.002657612320035696, -0.08409778773784637, -0.14549626410007477, -0.038285382091999054, 0.006714227143675089, -0.015300359576940536, 0.03576323390007019, -0.019526923075318336, -0.01768457517027855, 0.043467603623867035, 0.011467880569398403, 0.031073620542883873, -0.02484707534313202, -0.011999895796179771, -0.0322558768093586, 0.022640196606516838, -0.04421636462211609, 0.015733852982521057, 0.03623613715171814, 0.018147625029087067, -0.03154652193188667, 0.023093394935131073, 0.014561450108885765, 0.0025172194000333548, -0.040748413652181625, -0.045832112431526184, 0.013881652615964413, -0.03205883502960205, 0.0001239213306689635, 0.014679674990475178, 0.019122986122965813, -0.03170415759086609, -0.0581669807434082, 0.020512137562036514, -0.029911069199442863, -0.0043915873393416405, -0.004187155514955521, 0.006177286151796579, -0.025911103934049606, 0.0009236373007297516, 0.029359349980950356, -0.03093569166958332, -0.007088608108460903, -0.02821650356054306, 0.048984795808792114, -0.03217706084251404, 0.0006231472943909466, -0.013674757443368435, 0.021457942202687263, 0.07456092536449432, -0.10813698917627335, 0.045280393213033676, 0.016147643327713013, 0.011034387163817883, -0.03680756315588951, 0.022935761138796806, -0.07093534618616104, -0.07570377737283707, 0.0007863232167437673, 0.026068739593029022, -0.05603891983628273, 0.0154875498265028, 0.026265781372785568, 0.024137720465660095, -0.05737880989909172, -0.005999947898089886, 0.05462021380662918, 0.0037314945366233587, -0.012758509255945683, -0.0223840419203043, -0.0019384068436920643, 0.04177303612232208, 0.021457942202687263, -0.04685673490166664, -0.03335931524634361, -0.025773175060749054, -0.003985187038779259, -0.01434470247477293, -0.07026539742946625, -0.03471890836954117, -0.021733801811933517, -0.0035738605074584484, 0.08346725255250931, 0.000769697711803019, -0.030186928808689117, 0.012265902943909168, -0.032374102622270584, -0.00522162951529026, 0.015044203959405422, -0.022896353155374527, 0.032295286655426025, -0.08803864568471909, -0.02463032677769661, -0.0472114123404026, -0.0344233475625515, 0.033319905400276184, 0.015842227265238762, -0.03960556536912918, 0.04642324149608612, -0.00011953405919484794, 0.06683685630559921, 0.00323642510920763, -0.04689614474773407, -0.04768431559205055, -0.014334850944578648, 0.04311292618513107, -0.014423520304262638, -0.01880771853029728, -0.021733801811933517, -0.005576306022703648, -0.027920939028263092, 0.033674582839012146, 0.06025563180446625, 0.01746782846748829, -0.015231394208967686, 0.04685673490166664, -0.03028545156121254, -0.0074826935306191444, 0.025182047858834267, -0.009605827741324902, 0.031211551278829575, 0.03416718915104866, 0.024531805887818336, -0.03515240177512169, -0.0024864315055310726, -0.009788092225790024, -0.007738849148154259, -0.005620640702545643, -0.043507009744644165, -0.012068860232830048, -0.013339785858988762, -0.02368452213704586, -0.021044151857495308, -0.03420659899711609, -0.09237357974052429, -0.03123125620186329, -0.05962509661912918, 0.005275816190987825, 0.01044325903058052, -0.024354467168450356, 0.04063018783926964, -0.027191881090402603, -0.015842227265238762, 0.020728884264826775, 0.05146753415465355, 0.03899473324418068, -0.0018842200515791774, 0.033891331404447556, 0.03913266584277153, -0.019122986122965813, -0.004241342190653086, 0.001353436498902738, 0.013172299601137638, -0.002243822906166315, -0.0322558768093586, -0.0191032811999321, 0.011290541850030422, 0.012285607866942883, 0.01807866059243679, -0.07089593261480331, -0.04189126193523407, -0.00701964320614934, -0.005733940284699202, -0.053595591336488724, -0.0004984562401659787, -0.029615506529808044, -0.021556463092565536, 0.011448176577687263, 0.025300271809101105, 0.041142500936985016, 0.028157390654087067, -0.01686684787273407, 0.006729005370289087, 0.00024183903587982059, 0.007507323753088713, 0.019773226231336594, -0.03594057261943817, -0.006118173245340586, -0.002706872997805476, -0.004128043074160814, -0.015714149922132492, -0.027250993996858597, -0.0538320429623127, 0.046226199716329575, -0.013861948624253273, -0.014857013709843159, 0.03767454996705055, 0.014522041194140911, -0.045792706310749054, -0.015980156138539314, 0.04547743871808052, -0.016985073685646057, 0.028117982670664787, -0.01026592031121254, 0.016600841656327248, 0.03123125620186329, -0.022581083700060844, -0.010738822631537914, -0.008940808475017548, -0.014994943514466286, 0.062620148062706, 0.012581171467900276, -0.029280534014105797, 0.020374206826090813, 0.005236407741904259, 0.03495535999536514, 0.004495034925639629, -0.031645044684410095, 0.008472832851111889, 0.053477365523576736, -0.020985038951039314, -0.029694322496652603, 0.03566471487283707, -0.07274813205003738, 0.0838613361120224, 0.025260863825678825, 0.025083525106310844, 0.02118208259344101, 0.06742798537015915, -0.05130989849567413, 0.018472746014595032, -0.06916195899248123, -0.061753157526254654, -0.06604868918657303, -0.009911243803799152, -0.0259702168405056, 0.08370370417833328, 0.037556324154138565, 0.007147721014916897, 0.030521901324391365, 0.041221316903829575, 0.000874992401804775 ]
717,565
pytorch_optimizer.lr_scheduler.proportion
ProportionScheduler
ProportionScheduler (Rho Scheduler of GSAM). This scheduler outputs a value that evolves proportional to lr_scheduler. :param lr_scheduler: learning rate scheduler. :param max_lr: float. maximum lr. :param min_lr: float. minimum lr. :param max_value: float. maximum of rho. :param min_value: float. minimum of rho.
class ProportionScheduler: r"""ProportionScheduler (Rho Scheduler of GSAM). This scheduler outputs a value that evolves proportional to lr_scheduler. :param lr_scheduler: learning rate scheduler. :param max_lr: float. maximum lr. :param min_lr: float. minimum lr. :param max_value: float. maximum of rho. :param min_value: float. minimum of rho. """ def __init__( self, lr_scheduler, max_lr: float, min_lr: float = 0.0, max_value: float = 2.0, min_value: float = 2.0 ): self.lr_scheduler = lr_scheduler self.max_lr = max_lr self.min_lr = min_lr self.max_value = max_value self.min_value = min_value self.step_t: int = 0 self.last_lr: List[float] = [] self.step() def get_lr(self) -> float: return self.last_lr[0] def step(self) -> float: self.step_t += 1 if hasattr(self.lr_scheduler, 'last_lr'): lr = self.lr_scheduler.last_lr[0] else: lr = self.lr_scheduler.optimizer.param_groups[0]['lr'] if self.max_lr > self.min_lr: value = self.min_value + (self.max_value - self.min_value) * (lr - self.min_lr) / ( self.max_lr - self.min_lr ) else: value = self.max_value self.last_lr = [value] return value
(lr_scheduler, max_lr: float, min_lr: float = 0.0, max_value: float = 2.0, min_value: float = 2.0)
[ 0.05015130713582039, 0.010067002847790718, -0.07678844779729843, -0.006705211475491524, 0.011637675575911999, -0.0015396727249026299, -0.027629146352410316, -0.04912256449460983, -0.07344502955675125, 0.02446942962706089, -0.0030517897102981806, -0.00178882188629359, 0.07972772419452667, 0.03499569371342659, -0.05492762476205826, 0.044456470757722855, 0.04357469081878662, 0.0018921556184068322, -0.013153237290680408, -0.0007015212904661894, 0.01972985453903675, -0.04133349657058716, -0.030752120539546013, 0.03956993296742439, -0.03168901428580284, 0.007908475585281849, 0.009607741609215736, -0.03472013771533966, -0.07068946212530136, -0.00004169229214312509, 0.029080411419272423, 0.001386968418955803, -0.014255463145673275, -0.03927600756287575, 0.020262598991394043, -0.0008754663867875934, -0.012730716727674007, 0.023440685123205185, -0.12080403417348862, 0.028841594234108925, 0.0139247952029109, -0.022558903321623802, 0.013970721513032913, 0.00031689013121649623, -0.013814573176205158, 0.0020046746358275414, -0.01522909663617611, 0.032221756875514984, 0.03343420475721359, -0.0372919999063015, 0.04622003436088562, -0.035252880305051804, -0.0020448598079383373, 0.009681222960352898, -0.035436585545539856, 0.09706941992044449, 0.055956367403268814, 0.01658850908279419, 0.057462744414806366, -0.05206183344125748, 0.0421050563454628, -0.034554801881313324, 0.0009127813973464072, 0.016487471759319305, 0.03449968993663788, -0.04361142963171005, -0.033066798001527786, -0.0018404887523502111, -0.028455816209316254, 0.035289619117975235, 0.021456677466630936, -0.04140697792172432, -0.0034191985614597797, -0.016064953058958054, 0.01794792339205742, 0.004470906686037779, -0.05481740087270737, -0.08303440362215042, 0.021658752113580704, -0.04533825442194939, 0.05503784492611885, 0.027280107140541077, 0.002333046169951558, -0.039827119559049606, -0.0014627465279772878, -0.01864599995315075, 0.007104768883436918, -0.0565442219376564, -0.04401557892560959, -0.009401073679327965, -0.014925984665751457, 0.01692836359143257, 0.031009307131171227, 0.03179923817515373, 0.043831877410411835, 0.010654856450855732, -0.06642752140760422, -0.041737645864486694, -0.029815228655934334, -0.04291335493326187, 0.03277286887168884, 0.015991469845175743, 0.02108926884829998, 0.056764669716358185, 0.04394209757447243, -0.01860007271170616, -0.022044532001018524, 0.01607413776218891, 0.03211153298616409, 0.00947914831340313, -0.06947701424360275, 0.0819321721792221, -0.10125788301229477, -0.004493869375437498, -0.04423602670431137, 0.01596391387283802, -0.03297494351863861, 0.052025094628334045, 0.017773402854800224, -0.013704350218176842, 0.03551006689667702, 0.058822158724069595, -0.010168040171265602, 0.03472013771533966, -0.030017303302884102, -0.0023537129163742065, -0.0033824576530605555, 0.02450617030262947, -0.00210226746276021, -0.02998056262731552, 0.019931931048631668, 0.004328535404056311, -0.016671176999807358, -0.013336941599845886, 0.03677762672305107, -0.039753638207912445, -0.015008651651442051, 0.04614655300974846, 0.011591749265789986, -0.01690080761909485, 0.027665887027978897, 0.027371959760785103, 0.0033732724841684103, -0.028492556884884834, 0.05518481135368347, 0.011876490898430347, 0.02028096839785576, 0.09883297979831696, -0.014962725341320038, 0.05272316932678223, -0.03273613005876541, -0.0034697174560278654, 0.04633025825023651, -0.014429982751607895, 0.05713207647204399, -0.0022262679412961006, 0.006769508123397827, -0.018122442066669464, 0.00041620535193942487, -0.04706507548689842, -0.05301709845662117, -0.00025589452707208693, -0.0014317464083433151, -0.03481198847293854, -0.015862876549363136, 0.03876163437962532, -0.009079591371119022, 0.05011456832289696, -0.039863862097263336, 0.01169278658926487, -0.0030793454498052597, -0.09802468121051788, -0.05184138938784599, 0.015578135848045349, 0.01681813970208168, 0.06396587938070297, 0.04357469081878662, 0.019564520567655563, 0.010599745437502861, 0.030550045892596245, 0.032331980764865875, -0.027720997110009193, -0.011858120560646057, -0.047836631536483765, -0.027280107140541077, 0.04331750422716141, -0.030623527243733406, -0.0017130437772721052, -0.011334563605487347, 0.016560954973101616, -0.02070348896086216, -0.026471808552742004, -0.035363100469112396, 0.020538154989480972, 0.013575756922364235, 0.006576618645340204, 0.0009162258356809616, 0.01646910235285759, 0.02777610905468464, 0.0024042315781116486, 0.04827752336859703, 0.053347766399383545, 0.022595643997192383, 0.005947430618107319, 0.009699593298137188, -0.04805707931518555, -0.01685488037765026, 0.02586558274924755, -0.016533399000763893, 0.006452618166804314, -0.041113052517175674, -0.023955056443810463, 0.00694402726367116, 0.033617909997701645, 0.027280107140541077, -0.03391183540225029, 0.020097265020012856, 0.0033939392305910587, 0.047322262078523636, -0.030127525329589844, 0.026269733905792236, -0.03185434639453888, 0.014181981794536114, -0.01322671864181757, 0.03879837319254875, -0.022191494703292847, 0.018085701391100883, -0.053237542510032654, -0.02031770907342434, 0.01497191097587347, 0.031248122453689575, -0.06234928220510483, -0.016147619113326073, -0.03784311190247536, 0.042362239211797714, 0.03883511573076248, -0.030550045892596245, 0.06694189459085464, -0.09545282274484634, 0.024487800896167755, -0.017451921477913857, 0.041076309978961945, -0.01673547364771366, -0.01141723059117794, 0.0039542377926409245, -0.014007462188601494, 0.06672144681215286, 0.03363627940416336, -0.0911908745765686, 0.002666010521352291, -0.010811005719006062, -0.02718825452029705, -0.023569278419017792, 0.01996867172420025, -0.04912256449460983, -0.022926311939954758, -0.004170090425759554, 0.03538147360086441, 0.030770491808652878, 0.02070348896086216, -0.002604010282084346, -0.05158420279622078, -0.04699159413576126, 0.047248777002096176, -0.015164799988269806, 0.02579210139811039, -0.04842448607087135, -0.012987903319299221, -0.01980333775281906, 0.02489195019006729, 0.12168581038713455, 0.040525197982788086, -0.030329599976539612, -0.022044532001018524, 0.0061173574067652225, 0.01759888418018818, -0.04291335493326187, -0.01755295880138874, 0.05430302768945694, -0.02279771864414215, 0.0434277281165123, -0.029760116711258888, -0.015293393284082413, -0.01584450714290142, -0.009235739707946777, -0.031670644879341125, -0.0017383031081408262, -0.016248656436800957, 0.03582236170768738, 0.02746381238102913, -0.022264976054430008, -0.013465534895658493, 0.03275449946522713, -0.02404690906405449, 0.15534046292304993, 0.059520233422517776, -0.005901504773646593, -0.02470824494957924, 0.002783122006803751, 0.0038853485602885485, 0.08575322479009628, 0.020372821018099785, 0.016009841114282608, -0.012225529178977013, -0.0802420973777771, 0.002776233246549964, 0.03080723248422146, 0.006287284195423126, 0.02649017795920372, -0.028768112882971764, 0.02781284973025322, 0.046513959765434265, 0.0238815750926733, 0.018829703330993652, 0.004266535397619009, 0.004445647355169058, -0.0030334193725138903, -0.02928248606622219, 0.03262590616941452, 0.015899619087576866, -0.03642858937382698, 0.06117357313632965, 0.0718284323811531, 0.007430844008922577, 0.008941813372075558, -0.034279245883226395, -0.013750276528298855, 0.05140049755573273, -0.04746922478079796, -0.004321646876633167, -0.041149791330099106, -0.02649017795920372, 0.012629679404199123, 0.022889571264386177, 0.04159068316221237, 0.023863205686211586, 0.04430950805544853, 0.011132488027215004, 0.03405880182981491, -0.036410216242074966, 0.06043875589966774, 0.005065649747848511, -0.017718292772769928, 0.056838151067495346, 0.012455159798264503, -0.04541173577308655, 0.029337596148252487, 0.009589371271431446, 0.03754918649792671, -0.028308851644396782, -0.03721851855516434, 0.04272964969277382, -0.03472013771533966, 0.06583966314792633, 0.010039446875452995, 0.002374379662796855, -0.009019887074828148, -0.10419715195894241, 0.028676260262727737, -0.04144372045993805, -0.039716895669698715, 0.034940581768751144, -0.0473957434296608, 0.03133997693657875, -0.007816622965037823, -0.01740599423646927, -0.05378865450620651, -0.007908475585281849, 0.030329599976539612, -0.02603091672062874, -0.02885996550321579, -0.015559764578938484, 0.0006682248786091805, -0.0049095009453594685, -0.008041661232709885, 0.015118874609470367, -0.01685488037765026, -0.02757403440773487, 0.0034949767868965864, -0.016368065029382706, 0.06778693199157715, 0.004509943537414074, 0.008716775104403496, 0.02028096839785576, 0.015155615285038948, -0.037034813314676285, 0.016165990382432938, -0.03457317501306534, 0.043060317635536194, -0.026894327253103256, 0.044529952108860016, -0.0017532291822135448, -0.00007706974429311231, -0.009382703341543674, -0.050041086971759796, -0.014558576047420502, 0.029686635360121727, 0.040341492742300034, -0.03736548125743866, -0.021144378930330276, 0.01104982104152441, -0.03220338746905327, -0.039790380746126175, 0.031633902341127396, 0.022540533915162086, -0.07612711191177368, 0.0885455310344696, 0.009189814329147339, -0.02781284973025322, 0.07395940274000168, -0.01775503344833851, -0.03846770524978638, -0.0070726205594837666, 0.01802140474319458, -0.019784966483712196, -0.019674744457006454, -0.034977324306964874, -0.022393569350242615, 0.029760116711258888, 0.029264114797115326, -0.004321646876633167, 0.018581703305244446, 0.051327016204595566, 0.034940581768751144, 0.060806166380643845, -0.012703160755336285, 0.0006934842094779015, -0.008441218174993992, -0.017856070771813393, -0.009290851652622223, 0.0014684873167425394, 0.023918315768241882, -0.10405018925666809, -0.03207479417324066, -0.0019047852838411927, -0.04328076168894768, 0.016671176999807358, 0.050628941506147385, 0.022118013352155685, -0.010085373185575008, 0.044493213295936584, 0.0006561692571267486, 0.05044523626565933, 0.00016519046039320529, -0.04702833294868469, -0.003327346406877041, -0.031064419075846672, -0.0236978717148304, -0.06995464861392975, -0.00790388323366642, -0.01427383441478014, 0.021695492789149284, 0.0365755520761013, 0.05507458746433258, -0.009910853579640388, -0.04217853769659996, -0.0028703815769404173, -0.06672144681215286, -0.03857792913913727, -0.03890859708189964, 0.016606880351901054, 0.020060524344444275, 0.017773402854800224, -0.004372165538370609, -0.05709533765912056, 0.00817943923175335, 0.06896264106035233, -0.0032309016678482294, -0.024965431541204453, -0.0013479312183335423, 0.03203805163502693, -0.012813383713364601, 0.03846770524978638, -0.06172468885779381, -0.018691925331950188, 0.026232991367578506, -0.03751244395971298, -0.0022262679412961006, 0.02788633294403553, -0.030935825780034065, 0.018866444006562233, -0.0064434329979121685, 0.05518481135368347, 0.08957427740097046, -0.007205806206911802, 0.02621462196111679, -0.026269733905792236, -0.0005003075348213315, -0.010021076537668705, 0.00017868126451503485, -0.07293065637350082, -0.01976659707725048, 0.04419928416609764, 0.04846122860908508, -0.0911908745765686, -0.0003174642042722553, 0.06444351375102997, 0.03879837319254875, 0.06528855115175247, 0.02450617030262947, 0.013658423908054829, 0.017718292772769928, -0.002401935402303934, -0.013336941599845886, 0.048608191311359406, -0.0017245253548026085, -0.07553926110267639, -0.008569811470806599, -0.1004495844244957, 0.044456470757722855, 0.005644318647682667, -0.02579210139811039, -0.013970721513032913, 0.024910319596529007, -0.05213531479239464, -0.05768318846821785, -0.002936974633485079, 0.047322262078523636, 0.01958289183676243, -0.038137037307024, 0.015642432495951653, 0.01868274062871933, 0.014035018160939217, -0.018884815275669098, -0.008271291851997375, 0.039055559784173965, -0.011555008590221405, -0.04530151188373566, 0.03762266784906387, 0.009290851652622223, 0.03137671574950218, -0.017332512885332108, 0.019674744457006454, 0.014889243990182877, 0.02777610905468464, 0.03650207072496414, -0.027629146352410316, -0.055331774055957794, -0.036998070776462555, -0.012326567433774471, -0.005754541140049696, 0.019840078428387642, 0.052576206624507904, 0.019895190373063087, 0.009382703341543674, 0.0077293636277318, -0.020189115777611732, 0.04126001521945, 0.014944355003535748, -0.00947914831340313, 0.039863862097263336, -0.006898101419210434, -0.017277400940656662, 0.0032400868367403746, -0.03802681714296341, 0.0429500937461853, 0.002604010282084346, 0.0007055398309603333, 0.03277286887168884, 0.005763726308941841, -0.01577102579176426, -0.0090520353987813, 0.030513305217027664, -0.03172575309872627, -0.018508221954107285, 0.0016785991610959172, 0.01934407651424408, 0.03337909281253815, -0.03580399230122566, -0.013465534895658493, 0.018195923417806625, -0.0025259358808398247, 0.00047677039401605725, -0.050481975078582764, -0.013235904276371002, 0.012225529178977013, 0.04761618748307228, -0.013557386584579945, -0.07744978368282318, -0.04026801139116287, 0.023863205686211586, -0.03760429471731186, -0.01037011481821537, -0.10684249550104141, -0.039863862097263336, 0.012730716727674007, -0.07395940274000168, 0.009616926312446594, -0.014705539681017399, 0.004183868411928415, -0.03754918649792671, 0.07752326875925064, -0.047836631536483765, -0.025222618132829666, 0.012785827741026878, 0.014154425822198391, -0.023091645911335945, -0.00494164926931262, 0.00508861243724823, 0.047322262078523636, -0.06914635002613068, 0.01821429468691349, 0.005557058844715357, 0.015155615285038948, 0.023918315768241882, -0.06947701424360275, 0.03150530904531479, -0.03451806306838989, 0.0020528968889266253, -0.01841636933386326, 0.015862876549363136, 0.01643236167728901, 0.04412580281496048, 0.01235412247478962, 0.045962847769260406, -0.0029760117176920176, -0.05290687456727028, -0.05433977022767067, 0.056617703288793564, -0.03615302965044975, -0.0003806126187555492, 0.020538154989480972, -0.012813383713364601, -0.003832533722743392, -0.02419387362897396, -0.029851969331502914, 0.04339098557829857, -0.09853905439376831, 0.031670644879341125, -0.10794471949338913, 0.016882436349987984, -0.029355967417359352, 0.028033295646309853, -0.12021617591381073, 0.027408700436353683, -0.009965965524315834, 0.0004827982047572732, 0.025351211428642273, -0.021272972226142883, -0.08112387359142303, 0.005024316255003214, -0.00258793612010777, -0.0407823845744133, -0.01697428897023201, -0.006778693292289972, -0.027665887027978897, -0.035638660192489624, 0.02707803249359131, 0.07484118640422821, 0.02722499519586563, -0.01751621626317501, 0.017369253560900688, -0.02540632151067257, 0.04489736258983612, -0.05228228121995926, 0.025461433455348015, -0.005217205733060837, -0.04478713870048523, 0.013731906190514565, 0.008280477486550808, -0.030899085104465485, -0.010085373185575008, -0.006806248798966408, -0.02097904495894909, 0.005093205254524946, -0.032919831573963165, -0.03207479417324066, 0.02722499519586563, -0.02415713295340538, -0.009231147356331348, -0.011389674618840218, -0.011876490898430347, 0.025534914806485176, -0.014604502357542515, -0.012831754051148891, 0.007472177501767874, -0.05555221810936928, -0.06473743915557861, 0.004629351664334536, -0.010425225831568241, 0.006337802857160568, 0.03312190994620323, -0.033066798001527786, -0.05430302768945694, -0.004199942573904991, 0.003958830609917641, -0.003678681096062064, -0.02614114060997963, 0.04401557892560959, -0.012537826783955097, -0.027867961674928665, 0.046587441116571426, -0.02439594827592373, -0.008969368413090706, 0.0019357854034751654, -0.028804853558540344, -0.03591421619057655, -0.026049287989735603, -0.013410422950983047, -0.012289825826883316, -0.01716717891395092, 0.00014560010458808392, -0.016983473673462868, 0.046477220952510834, -0.031946200877428055, 0.05625029653310776, 0.0014742279890924692, -0.0003289457526989281, -0.005635133478790522, -0.03490384295582771, 0.056801408529281616, 0.04757944494485855, 0.020795341581106186, -0.02279771864414215, 0.034407839179039, -0.0067878784611821175, -0.027592405676841736, 0.013180792331695557, -0.015633245930075645, 0.016717102378606796, -0.012537826783955097, 0.0254430640488863, 0.06536203622817993, -0.014733094722032547, -0.02753729373216629, 0.015072948299348354, 0.0487184152007103, -0.023477425798773766, 0.006751137785613537, 0.001293968060053885, 0.02680247649550438, 0.04706507548689842, -0.016368065029382706, -0.010893672704696655, 0.06473743915557861, -0.004881944973021746, 0.01015885453671217, 0.004808463156223297, 0.0324789434671402, 0.06414958834648132, 0.033066798001527786, 0.021107638254761696, -0.015146429650485516, -0.06234928220510483, -0.008877516724169254, 0.01923385262489319, -0.05507458746433258, -0.016533399000763893, 0.07862549275159836, -0.03290146216750145, 0.048608191311359406, -0.041811127215623856, 0.004762537311762571, 0.031523678451776505, 0.03534473106265068, -0.0658029243350029, 0.036722514778375626, -0.01871948130428791, -0.026122769340872765, -0.046624183654785156, 0.002994382055476308, 0.009589371271431446, 0.04401557892560959, 0.050702422857284546, 0.042435724288225174, 0.03538147360086441, -0.03690622001886368, -0.0057269856333732605 ]
717,566
pytorch_optimizer.lr_scheduler.proportion
__init__
null
def __init__( self, lr_scheduler, max_lr: float, min_lr: float = 0.0, max_value: float = 2.0, min_value: float = 2.0 ): self.lr_scheduler = lr_scheduler self.max_lr = max_lr self.min_lr = min_lr self.max_value = max_value self.min_value = min_value self.step_t: int = 0 self.last_lr: List[float] = [] self.step()
(self, lr_scheduler, max_lr: float, min_lr: float = 0.0, max_value: float = 2.0, min_value: float = 2.0)
[ 0.02993275411427021, 0.02674379199743271, -0.0571838803589344, 0.008284958079457283, -0.036691177636384964, 0.03335726261138916, -0.03125544637441635, -0.048631664365530014, -0.09305969625711441, 0.012456880882382393, -0.010717447847127914, 0.06214851513504982, 0.023011257871985435, 0.02672567218542099, -0.02522178739309311, 0.04334088787436485, 0.01989477127790451, 0.014341267757117748, -0.013779575936496258, 0.02043834514915943, 0.011741177178919315, 0.020184677094221115, -0.031382281333208084, 0.08168090134859085, -0.005530855152755976, 0.047073423862457275, -0.01969546265900135, -0.002842433750629425, -0.06261961162090302, -0.004919335711747408, -0.00492839515209198, 0.017548348754644394, -0.0136527419090271, -0.036654938012361526, 0.02672567218542099, -0.030784351751208305, -0.014930138364434242, -0.005209241062402725, -0.14074917137622833, 0.041782643646001816, 0.030784351751208305, -0.06696819514036179, -0.004529775120317936, 0.026580719277262688, -0.017928849905729294, 0.005956653971225023, 0.02179727703332901, -0.015047912485897541, 0.040296878665685654, -0.04584132507443428, 0.020981917157769203, -0.03848496824502945, 0.007424301467835903, -0.015509949997067451, -0.0591769814491272, 0.10588802397251129, 0.030403850600123405, 0.016615215688943863, 0.03198021277785301, -0.004364438354969025, -0.0024913763627409935, -0.008493328467011452, 0.00658176327124238, 0.002058782847598195, 0.022830065339803696, -0.008248720318078995, -0.06381546705961227, 0.003793686628341675, -0.025131192058324814, 0.06975853443145752, 0.04399317502975464, -0.010155756026506424, -0.0024098402354866266, -0.0011262153275310993, 0.019242484122514725, 0.01259277481585741, -0.0800139456987381, -0.017013834789395332, -0.0227394700050354, -0.042543645948171616, 0.04754452034831047, 0.061278797686100006, 0.004855918698012829, -0.03511481732130051, -0.018146278336644173, -0.040623024106025696, -0.020945679396390915, -0.03826753795146942, -0.024859406054019928, -0.0006687080604024231, -0.06504756957292557, 0.0044618286192417145, -0.007197812665253878, 0.024732571095228195, 0.010490958578884602, 0.02103627473115921, -0.038956064730882645, -0.02484128624200821, -0.030548803508281708, -0.018644554540514946, 0.0307299941778183, -0.011342556215822697, -0.020891321823000908, 0.03489738702774048, 0.024533260613679886, -0.03618384152650833, -0.0436670295894146, -0.028501344844698906, 0.013371895998716354, 0.017158787697553635, -0.054828397929668427, 0.07566536217927933, -0.046312421560287476, 0.05779992789030075, -0.07073696702718735, 0.05801735818386078, -0.027233008295297623, 0.0416739284992218, 0.03152723237872124, 0.0009789976757019758, 0.042761076241731644, 0.01572737842798233, -0.01951427012681961, 0.045551419258117676, -0.005675808060914278, 0.012438762001693249, 0.006695007439702749, 0.030186420306563377, -0.012547477148473263, -0.013806754723191261, 0.06138751283288002, -0.03431757539510727, -0.0020429284777492285, 0.006495697423815727, 0.014422804117202759, -0.06446775794029236, -0.014730828814208508, 0.05631416290998459, -0.006405102089047432, -0.02634517103433609, 0.007080038543790579, 0.042942266911268234, 0.024515142664313316, -0.03928221017122269, 0.02255827933549881, 0.05823478847742081, 0.0040926518850028515, 0.10132201015949249, -0.004296491388231516, 0.04511655867099762, -0.02366354502737522, -0.0037551834248006344, 0.03997073322534561, -0.00032104781712405384, 0.027251126244664192, -0.02632705308496952, 0.007379003334790468, -0.02652636170387268, 0.011868010275065899, -0.015482771210372448, -0.05573435127735138, 0.01373427826911211, -0.012076380662620068, -0.0617498941719532, -0.0035151054617017508, 0.04413812607526779, -0.01967734284698963, 0.015029793605208397, -0.0336834080517292, 0.048015616834163666, -0.0001386535877827555, -0.10088714957237244, -0.020601416006684303, 0.028519462794065475, -0.0043667033314704895, 0.032143283635377884, 0.024768810719251633, 0.026780029758810997, 0.0005772631848230958, 0.050298623740673065, 0.011034531518816948, 0.027214888483285904, -0.012148856185376644, -0.08124604821205139, -0.022431446239352226, 0.004613575991243124, -0.0436670295894146, 0.01652461849153042, -0.010155756026506424, 0.02371790260076523, 0.011496569029986858, -0.014531518332660198, -0.010083279572427273, -0.018717030063271523, -0.012837382033467293, 0.016388725489377975, 0.014649292454123497, 0.012357226572930813, 0.043268412351608276, 0.009793373756110668, 0.03993449732661247, 0.06722186505794525, 0.025837836787104607, -0.028066486120224, 0.003005505772307515, -0.03708979859948158, -0.018327469006180763, 0.044065650552511215, -0.0013611974427476525, 0.02542109787464142, -0.034390050917863846, -0.0360570102930069, -0.011632462032139301, 0.04044182971119881, 0.02538486011326313, -0.02917175181210041, -0.0321614034473896, 0.01194954663515091, 0.03602077066898346, -0.014993554912507534, 0.0882037803530693, -0.039137255400419235, -0.003775567514821887, -0.05892331525683403, 0.023156210780143738, 0.012157916091382504, 0.027414198964834213, -0.10429354012012482, -0.030784351751208305, 0.052219245582818985, 0.019242484122514725, -0.06569986045360565, -0.026272695511579514, -0.024877524003386497, 0.039898257702589035, 0.04932019114494324, 0.014504339545965195, 0.034969862550497055, -0.10175686329603195, -0.01969546265900135, -0.012040141969919205, 0.03029513545334339, 0.0013442107010632753, -0.024931881576776505, 0.03239694982767105, 0.04529774934053421, 0.045551419258117676, 0.023772260174155235, -0.0787818506360054, -0.006699537392705679, -0.030838707461953163, -0.018880102783441544, -0.026580719277262688, 0.016434023156762123, -0.01478518545627594, 0.018155338242650032, 0.019459914416074753, -0.011152306571602821, 0.026000909507274628, 0.017149727791547775, 0.007356354501098394, -0.05740131065249443, -0.038013871759176254, 0.07146172970533371, -0.03234259411692619, 0.02406216412782669, -0.03294052556157112, -0.011496569029986858, -0.01666957139968872, 0.0057890526950359344, 0.13335657119750977, 0.003675912506878376, -0.034969862550497055, -0.023065613582730293, 0.012112618423998356, 0.007401652168482542, -0.03408202901482582, -0.06892506033182144, 0.006971323862671852, -0.015129448845982552, 0.06004669889807701, -0.016588035970926285, -0.013335657306015491, -0.026616958901286125, -0.017149727791547775, -0.02480504848062992, -0.009467230178415775, -0.04011568799614906, -0.0004000357585027814, -0.019260603934526443, -0.027414198964834213, -0.0042829024605453014, 0.04040559381246567, 0.01589045114815235, 0.16510124504566193, 0.011985784396529198, 0.026417648419737816, -0.03207080811262131, 0.006894317455589771, 0.012266630306839943, 0.07008467614650726, -0.0556618757545948, 0.011025472544133663, 0.013236002996563911, -0.04225374013185501, -0.051856864243745804, 0.009199973195791245, 0.02217777818441391, 0.033284787088632584, -0.01137879490852356, 0.036292556673288345, 0.07689745724201202, 0.025258025154471397, -0.028338272124528885, 0.024007808417081833, -0.0007094760076142848, -0.012438762001693249, -0.03487926721572876, 0.003089306643232703, 0.011659640818834305, -0.0218335147947073, 0.025312382727861404, 0.012610893696546555, -0.011224782094359398, -0.008565804921090603, -0.010690269060432911, 0.01252029836177826, 0.01666957139968872, -0.041239071637392044, -0.00682184100151062, -0.03355657309293747, -0.032125163823366165, 0.02957037091255188, 0.005240949802100658, 0.03313983231782913, 0.01949615217745304, 0.029987109825015068, 0.04874037951231003, 0.009702778421342373, -0.02766786515712738, 0.07352730631828308, -0.002532144309952855, -0.025819716975092888, 0.04714589938521385, 0.03393707424402237, -0.029896514490246773, 0.040659260004758835, -0.011523747816681862, 0.04174640774726868, -0.010835221968591213, -0.051820624619722366, 0.015990106388926506, -0.050334859639406204, 0.0538499653339386, 0.027196768671274185, 0.015455592423677444, -0.027957770973443985, -0.06309070438146591, 0.029352942481637, -0.05341510847210884, -0.007080038543790579, 0.011424092575907707, -0.05062476545572281, 0.03920973092317581, 0.00417192280292511, -0.0010061762295663357, -0.022612636908888817, -0.01107983011752367, 0.031146733090281487, 0.014196314848959446, -0.011478450149297714, -0.032487545162439346, 0.020619535818696022, 0.02043834514915943, -0.001654500374570489, 0.01042754203081131, -0.03410014510154724, -0.01706819236278534, 0.004720025695860386, -0.007705147378146648, 0.026761909946799278, -0.0006488902727141976, 0.045007843524217606, 0.010545316152274609, 0.016017284244298935, -0.009014252573251724, -0.005086937453597784, -0.003619290189817548, 0.07099063694477081, 0.009421932511031628, 0.03790515661239624, -0.014721768908202648, -0.014622113667428493, -0.0250224769115448, -0.038774874061346054, 0.022811947390437126, 0.0556618757545948, 0.05743754655122757, -0.009036901406943798, -0.04982752352952957, -0.017901670187711716, 0.017856372520327568, -0.0159357488155365, 0.04504408314824104, 0.021851634606719017, -0.028066486120224, 0.07950661331415176, -0.0015299315564334393, 0.0013238267274573445, 0.043884459882974625, -0.00398167222738266, -0.03527788817882538, 0.008321196772158146, -0.02424335666000843, -0.03033137321472168, -0.04605875164270401, -0.052617866545915604, 0.0020078227389603853, 0.030095824971795082, -0.01877138763666153, -0.0015186070231720805, 0.04228997975587845, 0.026616958901286125, 0.01819157600402832, 0.028899963945150375, -0.0007700617425143719, 0.021489253267645836, -0.009050490334630013, -0.0065455250442028046, -0.03823130205273628, -0.006006481591612101, 0.03636503219604492, -0.06772919744253159, -0.042724836617708206, -0.008737935684621334, -0.030421968549489975, -0.034390050917863846, 0.023736020550131798, 0.040478069335222244, -0.04435555636882782, 0.013045752421021461, -0.03964459151029587, 0.060372840613126755, 0.0215979665517807, -0.031382281333208084, -0.036310676485300064, -0.039535876363515854, -0.012855501845479012, -0.04620370641350746, -0.01989477127790451, -0.03426321968436241, 0.008783233352005482, 0.019061293452978134, 0.05084219574928284, 0.03272309526801109, -0.02580159902572632, -0.05819854885339737, -0.015872331336140633, 0.00512317568063736, -0.04022440314292908, 0.031128613278269768, 0.013326598331332207, 0.0006268076249398291, -0.029226109385490417, -0.06088017672300339, 0.07783965766429901, 0.06414161622524261, 0.0002136071998393163, -0.007899927906692028, -0.0117502361536026, 0.0008102635038085282, -0.0007241977727971971, 0.016207534819841385, -0.07070072740316391, -0.013507789000868797, 0.016388725489377975, 0.0037166804540902376, -0.020166559144854546, 0.014332207851111889, -0.034226980060338974, 0.028537582606077194, -0.03844872862100601, 0.058669645339250565, 0.07109934836626053, -0.02446078509092331, 0.0223589688539505, -0.06160493940114975, -0.013326598331332207, -0.01574549823999405, 0.02389909327030182, -0.07472316920757294, -0.01346249133348465, -0.001088278484530747, 0.02275758981704712, -0.04450051113963127, -0.02504059672355652, 0.06309070438146591, 0.02427959442138672, 0.06504756957292557, 0.03942716121673584, -0.01146033126860857, -0.007537545636296272, -0.051458243280649185, -0.004409736022353172, 0.048776619136333466, 0.0036623231135308743, -0.08798635005950928, -0.02803024835884571, -0.09240741282701492, 0.011877070181071758, 0.025620408356189728, -0.02386285550892353, -0.030277015641331673, 0.039318446069955826, -0.0701209157705307, -0.055625636130571365, -0.03623820096254349, 0.048051852732896805, -0.0036577933933585882, 0.00256158784031868, 0.015002614818513393, 0.040840450674295425, 0.0231199711561203, -0.04584132507443428, 0.0049012163653969765, 0.00947628915309906, -0.016606155782938004, -0.055045824497938156, 0.05290777236223221, 0.02484128624200821, 0.033792123198509216, -0.05113210156559944, 0.0005280019249767065, 0.04779818654060364, -0.004559218417853117, 0.07095439732074738, -0.01024635136127472, -0.04344960302114487, -0.020202796906232834, -0.03509669750928879, 0.0008289488032460213, 0.030041467398405075, 0.05551692098379135, 0.014848602935671806, -0.005992892198264599, -0.03207080811262131, -0.03551343455910683, 0.08342033624649048, 0.0023396287579089403, 0.016588035970926285, 0.054647207260131836, -0.038919828832149506, -0.02331928163766861, -0.03870239853858948, -0.03350221738219261, 0.003044008743017912, 0.022214015945792198, 0.011034531518816948, 0.055625636130571365, 0.01155998557806015, -0.012085439637303352, 0.014848602935671806, 0.020166559144854546, -0.011351616121828556, -0.03033137321472168, -0.03069375641644001, 0.00771873677149415, 0.0005928343161940575, -0.030965542420744896, 0.022630756720900536, 0.021090632304549217, -0.01897069811820984, -0.01873514987528324, -0.024116521701216698, -0.01743057370185852, 0.03750653564929962, 0.038158826529979706, -0.0023849266581237316, -0.05801735818386078, -0.056205447763204575, 0.00563504034653306, 0.02536674030125141, -0.030566921457648277, -0.11639709770679474, 0.00955782551318407, 0.027377959340810776, -0.08327538520097733, -0.001508415094576776, -0.05091467127203941, 0.007786683272570372, 0.005680338013917208, 0.07465068995952606, -0.07523050159215927, 0.00379142165184021, -0.015002614818513393, 0.008805882185697556, -0.02007596381008625, -0.02215966023504734, 0.010817103087902069, 0.059394411742687225, -0.06522876024246216, 0.02576536126434803, -0.023464234545826912, 0.02371790260076523, 0.013172585517168045, -0.05914074182510376, 0.01991289108991623, -0.0439569354057312, -0.022304613143205643, -0.004599986597895622, 0.032505664974451065, 0.0032365242950618267, 0.05076972022652626, 0.010554376058280468, 0.016796406358480453, -0.018481481820344925, -0.01859019696712494, -0.03342973813414574, 0.06939615309238434, -0.0416739284992218, 0.00568486750125885, -0.0107265068218112, -0.0025162899401038885, -0.01392452884465456, -0.019242484122514725, -0.03134604170918465, 0.0019670547917485237, -0.06816405802965164, 0.02841074950993061, -0.04381198436021805, 0.02938918024301529, -0.020166559144854546, 0.0007717604166828096, -0.10588802397251129, -0.001893445965833962, 0.014513399451971054, 0.0028764072339981794, 0.03158159181475639, 0.03190773352980614, -0.05149448290467262, -0.016624273732304573, 0.06414161622524261, -0.004570542834699154, -0.0288274884223938, -0.03091118484735489, -0.05000871792435646, -0.04036935418844223, 0.04848671332001686, 0.07501307129859924, 0.05174814909696579, -0.018807625398039818, 0.053125202655792236, -0.012556536123156548, 0.03732534497976303, -0.048015616834163666, -0.016180356964468956, 0.011822712607681751, 0.0016318514244630933, 0.06084393709897995, -0.004824210423976183, -0.07280254364013672, 0.02125370502471924, 0.034589361399412155, -0.020963799208402634, -0.01069932896643877, -0.006658769212663174, -0.0044074710458517075, 0.030367610976099968, -0.018843865022063255, -0.007700617425143719, -0.02518554963171482, -0.03678177297115326, 0.02386285550892353, 0.033665288239717484, 0.0021335240453481674, 0.0007836510776542127, -0.04286979138851166, -0.06200356036424637, 0.016388725489377975, -0.001146033057011664, 0.013435312546789646, 0.023536711931228638, -0.04968257248401642, -0.07048329710960388, -0.0006415293901227415, 0.023264924064278603, -0.04921147599816322, 0.026562601327896118, 0.032886166125535965, 0.03449876606464386, -0.021108752116560936, 0.026834387332201004, -0.013625563122332096, 0.008121886290609837, -0.005177532788366079, 0.018861982971429825, -0.0401519276201725, -0.05323391780257225, 0.022032825276255608, 0.00807205867022276, -0.010690269060432911, 0.01440468430519104, -0.05345134437084198, 0.05417611077427864, -0.017149727791547775, 0.004819680470973253, 0.006110666319727898, -0.00392731511965394, -0.007283878047019243, -0.036129485815763474, 0.09661104530096054, 0.04830552265048027, 0.016578976064920425, -0.011288199573755264, -0.0024845816660672426, -0.008674519136548042, -0.012112618423998356, 0.028338272124528885, -0.05348758399486542, 0.013670860789716244, 0.006953204516321421, 0.019858533516526222, 0.030947422608733177, -0.006414161529392004, -0.024714453145861626, 0.02275758981704712, 0.015201925300061703, 0.03159971162676811, 0.018680792301893234, -0.03294052556157112, 0.010472839698195457, 0.07015715539455414, -0.022848185151815414, -0.010391304269433022, 0.03355657309293747, -0.03350221738219261, 0.020220914855599403, 0.019061293452978134, 0.049175236374139786, 0.05819854885339737, 0.03576710447669029, -0.0049555739387869835, 0.0022286493331193924, -0.009421932511031628, -0.03411826491355896, 0.031762782484292984, -0.04363079369068146, -0.014522458426654339, 0.037832681089639664, -0.0006234102766029537, 0.009603123180568218, -0.04772571101784706, 0.014549637213349342, 0.031110495328903198, 0.027613509446382523, -0.07465068995952606, 0.016615215688943863, -0.0218335147947073, -0.0292079895734787, -0.054103631526231766, -0.009711837396025658, -0.00468378746882081, 0.062039799988269806, 0.027323603630065918, 0.026653196662664413, 0.045950036495923996, -0.00022224208805710077, -0.007573783863335848 ]
717,568
pytorch_optimizer.lr_scheduler.proportion
step
null
def step(self) -> float: self.step_t += 1 if hasattr(self.lr_scheduler, 'last_lr'): lr = self.lr_scheduler.last_lr[0] else: lr = self.lr_scheduler.optimizer.param_groups[0]['lr'] if self.max_lr > self.min_lr: value = self.min_value + (self.max_value - self.min_value) * (lr - self.min_lr) / ( self.max_lr - self.min_lr ) else: value = self.max_value self.last_lr = [value] return value
(self) -> float
[ -0.009541044943034649, 0.019063308835029602, -0.0419204980134964, 0.06430814415216446, 0.0024228242691606283, 0.04015502706170082, 0.021786637604236603, -0.07230909913778305, -0.09819012135267258, 0.017889458686113358, -0.004977119620889425, -0.012424018234014511, 0.04699152335524559, 0.055893994867801666, -0.0104801245033741, 0.05059758946299553, 0.0025284707080572844, 0.02552417293190956, -0.002833671635016799, 0.04034284129738808, 0.025129759684205055, 0.013616648502647877, -0.02204957976937294, 0.007479765918105841, -0.02041558176279068, -0.011531893163919449, 0.038333214819431305, -0.015184910967946053, -0.041770242154598236, 0.02317647449672222, -0.009400183334946632, -0.0008528013131581247, -0.0006550077814608812, -0.05965031310915947, 0.010968444868922234, -0.0545041561126709, -0.027928216382861137, -0.02280084416270256, -0.07617810368537903, -0.025599298998713493, -0.025204885751008987, -0.0033924237359315157, -0.011428593657910824, 0.052588436752557755, -0.02933683432638645, -0.012517926283180714, -0.00949409045279026, -0.01010449230670929, 0.06212948262691498, -0.031590625643730164, 0.03803270682692528, -0.014583900570869446, 0.002337133511900902, -0.009710079059004784, 0.02007751353085041, 0.06276805698871613, 0.022274959832429886, -0.0750136449933052, -0.020490707829594612, 0.004538100212812424, 0.057621899992227554, -0.03977939486503601, 0.0035426763352006674, 0.01496892236173153, 0.039929646998643875, -0.00713700195774436, -0.012273765169084072, 0.01032987143844366, -0.014705980196595192, 0.04090629145503044, -0.0029534040950238705, -0.02548661082983017, 0.011550674214959145, -0.019758226349949837, 0.009437746368348598, 0.024115554988384247, -0.022500338032841682, -0.010029366239905357, 0.017091242596507072, -0.041732680052518845, 0.03249214217066765, 0.04188293218612671, 0.04334789514541626, -0.02933683432638645, -0.02552417293190956, -0.02259424515068531, -0.05138641595840454, -0.02364601381123066, -0.05555592477321625, -0.008705263957381248, 0.006348175462335348, 0.007827225141227245, 0.008174684830009937, 0.02494194358587265, 0.014161314815282822, 0.029543431475758553, -0.08429174870252609, -0.011672754772007465, -0.07260960340499878, -0.002836019266396761, 0.05499247834086418, 0.07651617377996445, 0.007803748361766338, 0.025373920798301697, 0.05315188318490982, -0.01020779088139534, 0.003157653845846653, -0.029355617240071297, 0.03245457634329796, 0.013316143304109573, -0.026651067659258842, 0.045075803995132446, -0.0750136449933052, 0.057697027921676636, -0.08624503761529922, 0.024848036468029022, 0.005812900140881538, 0.04034284129738808, 0.01973944529891014, 0.07730500400066376, 0.03202260285615921, 0.02003994956612587, -0.0012043691240251064, 0.009879113174974918, -0.033600255846977234, 0.0199084784835577, 0.042483944445848465, 0.038877878338098526, -0.03769464045763016, -0.00815120805054903, 0.031834784895181656, -0.027928216382861137, 0.009329752065241337, -0.012611834332346916, -0.012123513035476208, 0.026312999427318573, 0.011344077065587044, 0.031158648431301117, 0.026463251560926437, -0.005319883581250906, -0.004859734792262316, 0.049358002841472626, 0.0452636182308197, -0.03895300626754761, 0.07328574359416962, 0.035234253853559494, -0.006813019514083862, 0.15055318176746368, -0.01090270932763815, 0.0022866579238325357, -0.023570887744426727, -0.009174804203212261, 0.08654554188251495, 0.005503004416823387, 0.029750030487775803, 0.050409771502017975, -0.006700330413877964, 0.02858557179570198, -0.047141775488853455, -0.04928287863731384, -0.06979236751794815, -0.011747880838811398, -0.007155783474445343, -0.016828300431370735, 0.01207655854523182, 0.02674497663974762, -0.021861763671040535, 0.07768063247203827, -0.0566076934337616, 0.00667685316875577, 0.04004233703017235, -0.06588579714298248, 0.018265090882778168, 0.031196212396025658, -0.0026622896548360586, 0.053377263247966766, 0.030257131904363632, 0.019044525921344757, 0.013259798288345337, 0.04913262277841568, 0.029036330059170723, 0.01769225299358368, 0.018603159114718437, -0.0796339139342308, -0.01762651652097702, -0.01776737906038761, -0.04270932450890541, -0.004296287428587675, 0.005503004416823387, 0.021148063242435455, 0.020528271794319153, -0.009785205125808716, -0.00471183005720377, -0.0469539612531662, -0.04222100228071213, 0.01745748333632946, 0.012461581267416477, 0.01735418476164341, 0.09939214587211609, 0.00452636182308197, -0.002368827350437641, 0.003192869247868657, 0.021486133337020874, 0.035065218806266785, -0.057283833622932434, -0.051536668092012405, -0.02439727820456028, 0.03807027265429497, -0.014123751781880856, 0.030106879770755768, -0.06002594530582428, -0.012715132907032967, -0.020565835759043694, 0.010987226851284504, 0.005615693517029285, -0.08015979826450348, -0.04090629145503044, -0.013494567945599556, 0.060551829636096954, 0.0009619692573323846, 0.04413672164082527, -0.08106131851673126, 0.06179141253232956, -0.05991325527429581, 0.04034284129738808, -0.07820651680231094, -0.015663841739296913, -0.09218001365661621, -0.05503004044294357, 0.04060578718781471, 0.019438939169049263, -0.047141775488853455, -0.008944729343056679, 0.012855994515120983, 0.03790123760700226, 0.05454172194004059, -0.015795312821865082, 0.014443038031458855, -0.08015979826450348, 0.015776531770825386, -0.04154486581683159, 0.002317178063094616, -0.01987091638147831, 0.00022875382273923606, -0.04458748176693916, 0.022368866950273514, 0.06299343705177307, -0.02041558176279068, -0.0423336923122406, 0.020133858546614647, 0.004538100212812424, -0.01745748333632946, -0.016180334612727165, 0.02528001181781292, 0.008376586250960827, 0.03187234699726105, 0.0905272364616394, 0.05469197407364845, 0.020133858546614647, 0.0209602490067482, 0.008616051636636257, -0.07550197094678879, -0.019683100283145905, 0.00974764209240675, -0.08293947577476501, 0.05138641595840454, -0.03491496667265892, -0.025223668664693832, 0.03895300626754761, 0.03172209486365318, 0.1454445868730545, 0.011954477988183498, -0.04128192365169525, -0.045376308262348175, 0.017720425501465797, 0.010611595585942268, 0.014508773572742939, 0.02263180911540985, 0.0013534479076042771, -0.04492554813623428, 0.028454100713133812, -0.04128192365169525, -0.03929107263684273, -0.03390076011419296, -0.07478827238082886, -0.008569098077714443, 0.014320958405733109, -0.03181600570678711, 0.01745748333632946, 0.005615693517029285, -0.011616409756243229, -0.015673231333494186, 0.039967212826013565, 0.025505391880869865, 0.11449253559112549, -0.021241972222924232, -0.04049309715628624, -0.06325637549161911, 0.031290117651224136, 0.061265528202056885, 0.023965300992131233, -0.025054633617401123, -0.036116987466812134, 0.04815598204731941, -0.02296987734735012, -0.007357685826718807, 0.02218105085194111, 0.005108591169118881, -0.0014614419778808951, -0.010555250570178032, -0.04515092819929123, 0.03914082050323486, 0.023984083905816078, -0.024491185322403908, 0.01633058674633503, -0.016724999994039536, -0.019138434901833534, 0.00010249169281451032, -0.027984561398625374, 0.00815120805054903, -0.0030754844192415476, 0.038333214819431305, 0.022537901997566223, 0.020772432908415794, -0.011099915951490402, -0.02154247649013996, 0.025373920798301697, 0.02477291040122509, -0.03831443190574646, -0.06303099542856216, -0.03529059514403343, -0.06532234698534012, 0.01749504543840885, 0.029318053275346756, 0.026050057262182236, 0.013738729059696198, 0.04011746495962143, 0.04165755584836006, 0.02469778247177601, 0.0074281166307628155, 0.04289713874459267, -0.0011468505254015326, -0.0019931956194341183, 0.019166607409715652, 0.03525303304195404, 0.0076628862880170345, 0.04853161424398422, -0.0005490678595378995, 0.07013043761253357, -0.01844351552426815, -0.04954582080245018, -0.01452755555510521, -0.04601488262414932, -0.010855755768716335, -0.05968787521123886, -0.0074046398513019085, -0.01728844828903675, -0.051912300288677216, -0.0006057060672901571, -0.05713357776403427, -0.03910325840115547, 0.02640690840780735, -0.023589670658111572, 0.09586120396852493, 0.040267717093229294, 0.009353228844702244, -0.07527659088373184, 0.006085233297199011, 0.009160717949271202, 0.025542953982949257, -0.008381281979382038, -0.005892721936106682, 0.01714758574962616, 0.04800572991371155, -0.016969161108136177, 0.031628187745809555, 0.002313656499609351, -0.00023961193801369518, 0.019269905984401703, -0.003934741951525211, 0.03974183276295662, 0.015945564955472946, -0.01684708148241043, 0.02415311709046364, 0.05371532961726189, -0.0023077870719134808, -0.0019051569979637861, -0.0825638473033905, 0.017138196155428886, -0.037788547575473785, 0.03572257235646248, -0.007165174465626478, -0.04661589115858078, -0.039967212826013565, -0.04950825497508049, -0.0034558114130049944, 0.011682145297527313, -0.0024838645476847887, -0.018894273787736893, 0.015081612393260002, -0.005554653704166412, 0.013513349927961826, -0.014161314815282822, 0.020434364676475525, 0.017842505127191544, -0.06644924730062485, 0.04439966380596161, 0.012414627708494663, -0.006188531871885061, 0.035572320222854614, -0.010245353914797306, -0.008512753061950207, 0.012508534826338291, 0.023045003414154053, -0.013006247580051422, -0.038877878338098526, -0.05213767662644386, -0.015260037034749985, -0.012217420153319836, 0.007705145049840212, -0.023289164528250694, 0.02075364999473095, -0.006888146046549082, -0.0005499482504092157, 0.020640961825847626, -0.019852135330438614, 0.042183440178632736, 0.0008070212206803262, -0.040680911391973495, 0.031290117651224136, -0.0038009232375770807, -0.007188651245087385, -0.04943313077092171, 0.019889697432518005, -0.0019861524924635887, 0.0015271775191649795, -0.014048624783754349, 0.02296987734735012, 0.03600429743528366, -0.0402301549911499, 0.020152639597654343, -0.009803987108170986, 0.03784489259123802, 0.016894035041332245, -0.020265329629182816, -0.05315188318490982, -0.016828300431370735, -0.06982993334531784, -0.0804603099822998, 0.01264000590890646, -0.04954582080245018, -0.017363574355840683, 0.02851044572889805, 0.021072937175631523, -0.016377542167901993, -0.002852453151717782, -0.053377263247966766, -0.05739651992917061, 0.015776531770825386, -0.021955672651529312, 0.039215948432683945, 0.04868186637759209, 0.01391715370118618, -0.010630376636981964, -0.011888742446899414, 0.001928633893840015, 0.01727905683219433, 0.03559110313653946, -0.012827822007238865, 0.008653614670038223, 0.012020213529467583, 0.022688154131174088, 0.025204885751008987, -0.03525303304195404, -0.0030027057509869337, 0.009602084755897522, -0.020716087892651558, 0.0011268950765952468, 0.02497950755059719, -0.032924115657806396, -0.007061875890940428, -0.042483944445848465, 0.055480800569057465, 0.042859576642513275, 0.016997333616018295, 0.060889896005392075, -0.07076901197433472, 0.03722510114312172, 0.043235208839178085, 0.010658549144864082, -0.04034284129738808, -0.02905511111021042, 0.01936381310224533, 0.013541522435843945, -0.09984290599822998, -0.05266356095671654, 0.05138641595840454, 0.01031108945608139, 0.07644104957580566, 0.056194499135017395, -0.0072731683030724525, -0.00155065453145653, 0.0003903048054780811, 0.011597628705203533, 0.006949186325073242, 0.009414269588887691, -0.06674975156784058, -0.006662766914814711, -0.06442083418369293, 0.030332257971167564, 0.032172854989767075, 0.014142532832920551, -0.046803709119558334, -0.007615932263433933, -0.012489753775298595, -0.0540909618139267, 0.0007800227031111717, 0.049358002841472626, 0.016349369660019875, -0.03572257235646248, -0.027477458119392395, -0.009832159616053104, -0.0025120368227362633, -0.03861493617296219, -0.006362261716276407, 0.03236066922545433, -0.0452636182308197, -0.02854800783097744, -0.00488321203738451, 0.01827448233962059, 0.053377263247966766, -0.015053439885377884, 0.042145874351263046, 0.03207894787192345, 0.007536110933870077, 0.027853090316057205, -0.05014682933688164, -0.05871123448014259, -0.059500060975551605, -0.013156499713659286, -0.012855994515120983, -0.04300982877612114, 0.02167394757270813, 0.031214993447065353, 0.0017091241898015141, -0.02402164600789547, -0.0375068224966526, 0.06952942162752151, 0.004002825357019901, 0.03174087777733803, 0.02246277406811714, 0.02695157378911972, -0.0019591539166867733, -0.005559348966926336, 0.006686244159936905, 0.022744499146938324, -0.015241255983710289, 0.04169511795043945, 0.05961274728178978, 0.0020366280805319548, -0.011766662821173668, -0.03279264643788338, 0.05608180910348892, -0.028116032481193542, 0.0068036289885640144, -0.059800565242767334, -0.015936173498630524, -0.002838366897776723, -0.034858621656894684, 0.025730770081281662, 0.002124666702002287, 0.017401138320565224, -0.0020917989313602448, -0.02950586937367916, 0.024040427058935165, 0.0030895706731826067, 0.02099781110882759, -0.006728502456098795, -0.05641987919807434, -0.019138434901833534, -0.005855158902704716, 0.013025028631091118, 0.004944251850247383, -0.05360264331102371, 0.00663459487259388, 0.020734868943691254, -0.05326457321643829, 0.008545621298253536, -0.03350634500384331, -0.004958338104188442, -0.06434570997953415, 0.030031753703951836, -0.10675452649593353, -0.010733675211668015, 0.004864430520683527, -0.01094027329236269, -0.026106402277946472, -0.022706935182213783, 0.038370776921510696, 0.03423882648348808, -0.027909433469176292, -0.02657594159245491, 0.0002573663950897753, 0.02276328019797802, 0.016800127923488617, -0.02313891239464283, -0.012959293089807034, -0.028529226779937744, 0.001660996349528432, -0.04451235383749008, 0.04331033304333687, -0.014781107194721699, 0.024885598570108414, 0.0197018813341856, -0.012170466594398022, -0.017363574355840683, -0.003927698824554682, -0.05161179229617119, 0.0423336923122406, -0.004322112072259188, 0.012358282692730427, -0.0009613823494873941, -0.011372249573469162, -0.027345987036824226, 0.010752457194030285, -0.009606780484318733, 0.030200786888599396, -0.016997333616018295, 0.02837897464632988, -0.07910802960395813, -0.03174087777733803, 0.006263658404350281, 0.019607974216341972, -0.11832398176193237, 0.024247026070952415, 0.026594722643494606, -0.006258963141590357, 0.025129759684205055, -0.011710317805409431, -0.0775303766131401, -0.0011016572825610638, 0.07940854132175446, -0.018941227346658707, -0.0029721856117248535, -0.014133142307400703, -0.028810949996113777, -0.07050606608390808, 0.024002864956855774, 0.04590219259262085, 0.055518362671136856, -0.02544904686510563, 0.04834379628300667, -0.0007553718169219792, 0.02171151153743267, -0.01429278589785099, -0.04454991966485977, 0.023251600563526154, 0.02892364002764225, 0.022030798718333244, -0.04556412249803543, -0.08879932761192322, 0.007789662107825279, -0.026294218376278877, -0.03241701424121857, -0.010846365243196487, 0.0006268353899940848, -0.03600429743528366, 0.021072937175631523, -0.015598106198012829, -0.07137002050876617, -0.03236066922545433, -0.0490574985742569, -0.0026810711715370417, 0.05022195726633072, 0.013888981193304062, -0.003084875177592039, -0.029862718656659126, -0.0607772059738636, 0.014508773572742939, -0.00825450662523508, -0.038126617670059204, -0.004352631978690624, -0.03807027265429497, 0.0049865106120705605, 0.0021669252309948206, -0.022443993017077446, -0.014048624783754349, 0.036361146718263626, 0.018490469083189964, 0.06212948262691498, -0.030576419085264206, 0.0017408181447535753, -0.045676812529563904, 0.019269905984401703, 0.01813361980021, -0.04481286182999611, 0.009433050639927387, -0.006075842306017876, 0.033187057822942734, -0.012499144300818443, 0.0020824081730097532, -0.02704548090696335, -0.008630137890577316, -0.018124228343367577, 0.011898133903741837, 0.04293470084667206, 0.054353903979063034, 0.0059819347225129604, -0.046428076922893524, -0.012611834332346916, 0.07155783474445343, 0.01150372065603733, -0.04417428746819496, 0.0007266125176101923, -0.0024040427524596453, 0.012339500710368156, -0.07478827238082886, 0.005850463639944792, -0.04060578718781471, 0.02003994956612587, -0.060213759541511536, -0.004634356126189232, 0.017532609403133392, -0.0011403943644836545, -0.04421184957027435, 0.03470836952328682, 0.04376109316945076, 0.047592535614967346, -0.005066332407295704, 0.04665345698595047, -0.034182485193014145, 0.043197643011808395, 0.014452429488301277, -0.01865011267364025, 0.04871942847967148, 0.019927261397242546, 0.015260037034749985, 0.031158648431301117, 0.04845648631453514, 0.00331729743629694, 0.06742588430643082, 0.02443484030663967, 0.025542953982949257, -0.051499105989933014, 0.03429517149925232, 0.03861493617296219, -0.035478413105010986, -0.028022123500704765, 0.019758226349949837, -0.05457928404211998, 0.043948907405138016, -0.007277864031493664, 0.01521308347582817, 0.0257871150970459, 0.029449524357914925, -0.048944808542728424, 0.04481286182999611, -0.03102717734873295, -0.014161314815282822, 0.026482034474611282, 0.014715371653437614, -0.033600255846977234, 0.06442083418369293, 0.030576419085264206, -0.007723926566541195, 0.027552584186196327, -0.01983335241675377, -0.0030754844192415476 ]
717,569
pytorch_optimizer.optimizer.qhadam
QHAdam
Quasi-hyperbolic momentum and Adam for deep learning. :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 nus: Tuple[float, float]. immediate discount factors used to estimate the gradient and its square. :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 QHAdam(Optimizer, BaseOptimizer): r"""Quasi-hyperbolic momentum and Adam for deep learning. :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 nus: Tuple[float, float]. immediate discount factors used to estimate the gradient and its square. :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 = 1e-3, betas: BETAS = (0.9, 0.999), nus: Tuple[float, float] = (1.0, 1.0), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_nus(nus) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'nus': nus, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'QHAdam' @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['beta1_weight'] = torch.zeros((1,), dtype=p.dtype, device=p.device) state['beta2_weight'] = torch.zeros((1,), dtype=p.dtype, device=p.device) 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'] nu1, nu2 = group['nus'] 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['beta1_weight'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) state['beta2_weight'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) 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'], ) beta1_weight, beta2_weight = state['beta1_weight'], state['beta2_weight'] beta1_weight.mul_(beta1).add_(1.0) beta2_weight.mul_(beta2).add_(1.0) beta1_adj = 1.0 - (1.0 / beta1_weight) beta2_adj = 1.0 - (1.0 / beta2_weight) grad_p2 = grad.pow(2) exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq'] exp_avg.mul_(beta1_adj).add_((1.0 - beta1_adj) * grad) exp_avg_sq.mul_(beta2_adj).add_(1.0 - beta2_adj * grad_p2) avg_grad = exp_avg.mul(nu1) if nu1 != 1.0: avg_grad.add_(grad, alpha=1.0 - nu1) avg_grad_rms = exp_avg_sq.mul(nu2) if nu2 != 1.0: avg_grad_rms.add_(grad_p2, alpha=1.0 - nu2) avg_grad_rms.sqrt_().add_(group['eps']) p.addcdiv_(avg_grad, avg_grad_rms, value=-group['lr']) 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), nus: Tuple[float, float] = (1.0, 1.0), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 1e-08)
[ -0.01316428929567337, -0.03149663284420967, -0.019166555255651474, 0.00016404494817834347, -0.010127550922334194, -0.013001516461372375, -0.07548610866069794, -0.05452905222773552, -0.032025642693042755, 0.005249438341706991, -0.023500394076108932, 0.009598537348210812, 0.02942127175629139, 0.08806034922599792, -0.05273854359984398, 0.06335949897766113, 0.016938595101237297, 0.04382670670747757, 0.014171449467539787, -0.014293529093265533, -0.04997139796614647, -0.08732786774635315, -0.02020423486828804, 0.06689982116222382, -0.03823137655854225, -0.02295103296637535, 0.028953298926353455, -0.024029405787587166, -0.0489947609603405, -0.001925302785821259, -0.017223449423909187, -0.06059235706925392, 0.004206672310829163, 0.005320651922374964, 0.04561721533536911, -0.05758105218410492, 0.031110044568777084, 0.007207804825156927, -0.0826481357216835, -0.02510778047144413, 0.04748910665512085, -0.05273854359984398, 0.059005316346883774, -0.04016431048512459, -0.0011018988443538547, 0.009018657729029655, -0.0037463288754224777, 0.06844616681337357, -0.022238900884985924, -0.01392728928476572, 0.042727988213300705, -0.06563832610845566, 0.04752980172634125, -0.0020550128538161516, -0.04112060368061066, 0.03823137655854225, 0.06405128538608551, -0.039085935801267624, 0.04130372032523155, -0.05245369300246239, 0.031720444560050964, -0.06543485820293427, 0.04191412031650543, -0.020082155242562294, -0.03424343094229698, -0.027406953275203705, -0.05855768918991089, -0.03436550870537758, 0.00979691743850708, 0.01659270189702511, 0.022767914459109306, -0.013286369852721691, 0.03302263095974922, 0.002759516006335616, -0.033856842666864395, -0.026145460084080696, -0.06677774339914322, -0.046390388160943985, -0.043989479541778564, -0.04034742712974548, 0.029807858169078827, 0.011251703836023808, -0.02539263293147087, -0.0459020659327507, 0.024334605783224106, -0.04036777466535568, 0.0017256512073799968, 0.0005468165036290884, 0.03206633776426315, -0.05237230658531189, 0.022483060136437416, -0.021241914480924606, 0.04932030662894249, 0.04203620180487633, 0.07516056299209595, 0.011282223276793957, -0.0290957260876894, -0.04663454741239548, -0.011180490255355835, -0.020387355238199234, -0.020031288266181946, 0.009776570834219456, 0.02179127372801304, 0.05566846579313278, -0.005325738340616226, -0.05729619786143303, -0.041161295026540756, -0.039004549384117126, 0.061772461980581284, -0.0826481357216835, -0.047326333820819855, -0.0020969777833670378, -0.03511833772063255, -0.008962703868746758, -0.0023131610359996557, 0.00994951743632555, 0.005849665030837059, 0.04932030662894249, 0.0008653689292259514, 0.049198225140571594, 0.03857726976275444, 0.04740772023797035, -0.052250225096940994, 0.0145376892760396, 0.024131139740347862, -0.018861355260014534, 0.039635296911001205, 0.00782329123467207, 0.012543716467916965, -0.04480334743857384, -0.014018849469721317, 0.021363994106650352, -0.01131274364888668, 0.004834875464439392, 0.02787492610514164, -0.007996237836778164, -0.0034156956244260073, 0.029156764969229698, -0.0005048515158705413, 0.00854559801518917, 0.04034742712974548, 0.00751300435513258, -0.025982685387134552, -0.03281916305422783, 0.014374916441738605, -0.0023424094542860985, 0.04044916108250618, -0.009064437821507454, -0.02938057854771614, -0.0043465555645525455, 0.01651131547987461, 0.005839491728693247, 0.00963414367288351, -0.002436512615531683, 0.026409966871142387, -0.020682381466031075, -0.021018100902438164, -0.0002842174144461751, -0.03501660376787186, -0.007543524727225304, -0.026125112548470497, -0.029258498921990395, -0.01718275435268879, 0.02700001932680607, -0.01959383487701416, 0.013693302869796753, -0.009094957262277603, 0.020936714485287666, -0.025270553305745125, 0.0130320368334651, 0.006897517945617437, -0.060755129903554916, -0.0029782424680888653, 0.03188321739435196, -0.04354185611009598, 0.08814173191785812, 0.004692448768764734, 0.016114555299282074, -0.009461197070777416, -0.039411481469869614, 0.03615601733326912, -0.009369637817144394, -0.03340921550989151, -0.06213870272040367, -0.02023475430905819, 0.030723458155989647, 0.005641111638396978, -0.0033928058110177517, -0.013255849480628967, 0.03867900371551514, -0.010035990737378597, -0.03833311051130295, 0.026715165004134178, -0.013184635899960995, -0.015412596054375172, 0.01517860870808363, 0.041201990097761154, 0.012635276652872562, 0.08175288140773773, 0.039350442588329315, 0.014649596065282822, 0.0012118980521336198, 0.02783423289656639, 0.008789757266640663, 0.010885464027523994, -0.029217805713415146, -0.02109948731958866, 0.013082902878522873, -0.025596098974347115, -0.008448950946331024, -0.07385838031768799, -0.004036268685013056, 0.01960400864481926, 0.06189454346895218, 0.03859761729836464, -0.014364742673933506, 0.031191430985927582, 0.04260590672492981, 0.05066318437457085, -0.017650729045271873, 0.015198955312371254, -0.06392920762300491, 0.011984183453023434, 0.013489835895597935, 0.06921934336423874, -0.02081463485956192, 0.05326755717396736, 0.018820662051439285, -0.006322724744677544, -0.003723439062014222, 0.03145593777298927, -0.03546423092484474, 0.019441233947873116, 0.0019876144360750914, 0.027793539687991142, 0.05729619786143303, -0.05147705227136612, 0.00037895655259490013, -0.018505288287997246, -0.012899783439934254, -0.015544849447906017, -0.03701057657599449, -0.019441233947873116, 0.011597597040235996, -0.021547114476561546, 0.002728995867073536, 0.08301437646150589, 0.032981935888528824, -0.021608153358101845, 0.0033165058121085167, -0.04870990663766861, -0.017701594159007072, -0.006139604840427637, 0.030845537781715393, -0.07715453952550888, 0.004399965517222881, 0.05330825224518776, 0.03646121546626091, -0.0016760561848059297, -0.0674695298075676, -0.017884714528918266, -0.04187342897057533, -0.05013417452573776, 0.05306409299373627, -0.007869071327149868, 0.05143635720014572, 0.060755129903554916, -0.01894274167716503, 0.000719127303455025, 0.03145593777298927, 0.06474307179450989, 0.06608595699071884, -0.06999251246452332, -0.007757164537906647, -0.011383957229554653, 0.029523005709052086, 0.00036337864003144205, 0.005157878622412682, -0.01775246113538742, 0.005196028389036655, 0.030845537781715393, -0.049808625131845474, -0.02970612421631813, 0.013388102874159813, -0.025921646505594254, 0.04744841530919075, -0.029360231012105942, 0.020682381466031075, 0.05546499788761139, 0.018607022240757942, 0.03817033767700195, -0.013581396080553532, 0.07194579392671585, -0.007853811606764793, 0.08199704438447952, 0.01805766113102436, 0.0033673723228275776, 0.043012842535972595, -0.006902604829519987, 0.012635276652872562, 0.053430330008268356, 0.029868898913264275, 0.03255465626716614, -0.001875707763247192, -0.03591185808181763, -0.031679749488830566, 0.022869646549224854, 0.028017351403832436, 0.05330825224518776, -0.01929880864918232, -0.010427664034068584, -0.015015835873782635, -0.0003532053087837994, 0.03281916305422783, -0.010600610636174679, -0.08838589489459991, -0.011709503829479218, -0.027040712535381317, 0.033877190202474594, 0.05058179795742035, -0.05424419790506363, 0.04099852219223976, 0.019980421289801598, -0.013866249471902847, -0.051354970782995224, -0.05737758427858353, 0.0229306872934103, 0.016877556219697, -0.04346046969294548, -0.034467242658138275, -0.044559188187122345, -0.01596195623278618, 0.044274333864450455, 0.020336488261818886, -0.054122116416692734, -0.02049926109611988, 0.03804825618863106, 0.047611188143491745, -0.014181622304022312, -0.05058179795742035, 0.06156899780035019, 0.06291187554597855, -0.023988712579011917, 0.04537305235862732, -0.00207027280703187, -0.08480488508939743, 0.01871892809867859, 0.01594160869717598, 0.001098719658330083, 0.03515902906656265, 0.0028383592143654823, -0.008520164526998997, 0.02056030184030533, 0.0886300578713417, 0.08358408510684967, 0.006943298038095236, -0.029156764969229698, -0.023805594071745872, 0.03949286788702011, -0.04199550673365593, -0.01392728928476572, 0.009105131030082703, -0.04386740177869797, 0.07507918030023575, 0.06702189892530441, -0.020936714485287666, -0.0009556572185829282, -0.02423287369310856, 0.03218841925263405, -0.04691940173506737, 0.005936138331890106, -0.0919669046998024, -0.00949680432677269, 0.020611166954040527, -0.03471140190958977, 0.0035784689243882895, -0.0428093746304512, 0.010076683945953846, 0.04468126595020294, 0.01362208928912878, 0.05086665228009224, -0.012330076657235622, 0.015036182478070259, 0.022727221250534058, 0.027142446488142014, -0.03131351247429848, 0.01211643684655428, -0.009746050462126732, 0.051314279437065125, -0.045210279524326324, 0.05151774734258652, 0.021893007680773735, -0.0016785995103418827, -0.007945370860397816, -0.079718217253685, 0.054976679384708405, 0.05664510279893875, 0.035972896963357925, -0.08692093938589096, -0.034813135862350464, -0.022442366927862167, -0.04325700178742409, 0.008138664066791534, 0.01238094363361597, -0.016470622271299362, -0.07194579392671585, 0.028281858190894127, 0.08093901723623276, -0.004127828869968653, 0.09302493184804916, -0.018769795075058937, -0.012462330050766468, -0.05749966576695442, 0.03953356295824051, -0.02974681928753853, -0.0336126834154129, 0.015382075682282448, -0.02970612421631813, 0.024131139740347862, 0.04329769313335419, 0.04476265236735344, 0.002215242711827159, 0.04132406786084175, 0.022238900884985924, 0.036278095096349716, -0.027203485369682312, -0.09367603063583374, -0.00873889122158289, -0.0460241474211216, -0.028546364977955818, 0.00782329123467207, -0.017030155286192894, -0.029360231012105942, -0.014273182488977909, -0.015402422286570072, -0.00027261345530860126, 0.010875290259718895, 0.04191412031650543, 0.03408065810799599, -0.02516881935298443, 0.019400540739297867, -0.029482312500476837, 0.019848167896270752, -0.004000662360340357, -0.016745302826166153, -0.05119219794869423, 0.06453961133956909, -0.01655200868844986, -0.05579054355621338, -0.002057556062936783, 0.03155767172574997, 0.019095340743660927, 0.04866921156644821, 0.00010753528476925567, 0.012584409676492214, -0.011760369874536991, 0.025351939722895622, -0.022767914459109306, 0.003944708965718746, 0.0014522429555654526, 0.023683512583374977, 0.039085935801267624, -0.0290957260876894, 0.034121349453926086, -0.031150737777352333, 0.028993992134928703, 0.0828516036272049, -0.0145376892760396, -0.004664471838623285, 0.027325564995408058, 0.0046517555601894855, -0.0013975612819194794, -0.0031944257207214832, -0.024029405787587166, -0.05139566585421562, -0.019044475629925728, -0.026532046496868134, 0.008779584430158138, 0.01926828734576702, -0.020733248442411423, 0.05855768918991089, -0.05977848917245865, 0.03408065810799599, 0.06535347551107407, 0.030174098908901215, 0.02874983288347721, 0.030153751373291016, -0.0024059927091002464, 0.03029617853462696, 0.019136033952236176, -0.04512889310717583, -0.0551801435649395, 0.08081693947315216, 0.028546364977955818, -0.0551394522190094, -0.0397370271384716, 0.025596098974347115, -0.007162024732679129, 0.07243411242961884, -0.016938595101237297, 0.02354108728468418, -0.00466701528057456, -0.06718467175960541, -0.009456111118197441, 0.043379079550504684, -0.038801081478595734, -0.01959383487701416, 0.026511698961257935, -0.047367025166749954, 0.012096090242266655, -0.039004549384117126, -0.019726088270545006, 0.01960400864481926, 0.005094295367598534, 0.004761118907481432, -0.020407700911164284, -0.005407125223428011, 0.06624872982501984, 0.05762174353003502, -0.03033687174320221, 0.038740042597055435, 0.059330862015485764, -0.032005298882722855, -0.03827206790447235, 0.011729850433766842, 0.040917135775089264, -0.019776955246925354, -0.010117377154529095, 0.05416281148791313, 0.01043783687055111, -0.005244351923465729, -0.02476188726723194, 0.00781311746686697, 0.061772461980581284, -0.01331688929349184, -0.03064207173883915, 0.008616810664534569, -0.03918766975402832, -0.08407240360975266, -0.02818012610077858, 0.007009424734860659, 0.021526766940951347, 0.0054223849438130856, -0.0551801435649395, -0.011414476670324802, 0.07585234940052032, -0.004679732024669647, 0.05705203860998154, -0.04110025614500046, -0.008718544617295265, -0.023093460127711296, -0.0050078220665454865, -0.01803731545805931, 0.04512889310717583, 0.05538361147046089, -0.0066177514381706715, -0.0337754562497139, 0.029278844594955444, 0.008204790763556957, 0.021241914480924606, -0.0337754562497139, -0.05123289301991463, -0.015524501912295818, -0.033266790211200714, 0.007390924729406834, 0.012146956287324429, 0.007675777655094862, -0.009710444137454033, -0.04256521537899971, 0.03827206790447235, -0.034446898847818375, -0.03003167174756527, 0.005196028389036655, 0.0006911506643518806, -0.051924679428339005, -0.0018108527874574065, 0.01347966305911541, -0.016979288309812546, -0.002336051082238555, -0.013988329097628593, 0.05127358436584473, -0.026857592165470123, -0.05086665228009224, -0.01745743490755558, 0.036318790167570114, 0.03863830864429474, -0.05945294350385666, 0.03823137655854225, 0.004616148769855499, 0.004389792215079069, -0.02850567176938057, 0.01347966305911541, -0.010681997053325176, -0.04846574738621712, -0.011556903831660748, 0.03408065810799599, -0.06042958423495293, -0.002336051082238555, 0.031984951347112656, 0.022910339757800102, -0.03792617470026016, 0.004603432025760412, 0.05790659785270691, -0.022523753345012665, 0.028281858190894127, 0.011790890246629715, 0.005175681784749031, 0.0073400577530264854, 0.01620611548423767, -0.060551661998033524, -0.02020423486828804, -0.020896021276712418, -0.015036182478070259, -0.0037132655270397663, -0.057458970695734024, -0.015789009630680084, -0.029909592121839523, 0.014903929084539413, 0.07617790251970291, -0.002688302658498287, -0.018311994150280952, 0.007253584451973438, 0.0026323492638766766, 0.019726088270545006, -0.011750197038054466, -0.04390809312462807, 0.0337144173681736, -0.1010822132229805, -0.016928421333432198, -0.01870875433087349, 0.004646668676286936, 0.015209129080176353, 0.028912605717778206, -0.020753594115376472, 0.02138434164226055, -0.015758488327264786, 0.04358254745602608, 0.016379062086343765, -0.028912605717778206, -0.05066318437457085, -0.01807800866663456, 0.03774305433034897, -0.022483060136437416, -0.01316428929567337, 0.0022673809435218573, 0.007156937848776579, -0.01775246113538742, -0.0036344223190099, 0.04390809312462807, 0.029217805713415146, -0.005539378616958857, 0.021343646571040154, -0.06287118047475815, 0.00012955100100953132, -0.0010383155895397067, 0.01623663492500782, 0.011709503829479218, 0.03430446982383728, 0.014578382484614849, -0.029604392126202583, 0.0107023436576128, -0.015697449445724487, -0.0023169759660959244, 0.009405244141817093, -0.033205751329660416, 0.026104766875505447, -0.02329692617058754, 0.0168470349162817, 0.021628500893712044, -0.0005881456891074777, -0.08700232207775116, -0.022238900884985924, -0.051639825105667114, -0.005442732013761997, -0.003161362372338772, 0.012452156282961369, 0.02327658049762249, -0.031394898891448975, -0.04569860175251961, -0.029217805713415146, 0.07121331244707108, 0.02240167371928692, 0.00808779802173376, 0.002210156060755253, 0.04439641535282135, -0.024904312565922737, -0.021974394097924232, 0.01778298243880272, 0.010280150920152664, -0.03945217654109001, -0.05147705227136612, -0.01196383684873581, 0.001069471356458962, 0.004267712123692036, 0.05481390655040741, -0.07837533950805664, -0.026715165004134178, -0.028037698939442635, 0.016989462077617645, -0.07292243093252182, -0.0038124555721879005, -0.01745743490755558, -0.03707161545753479, 0.000924501393456012, 0.03094727173447609, 0.0856187492609024, -0.005101925227791071, 0.014263009652495384, 0.01286926306784153, -0.01833234168589115, -0.0063532451167702675, 0.012848916463553905, -0.009379810653626919, -0.004771292209625244, 0.06368505209684372, -0.009166170842945576, 0.04443710669875145, -0.020275447517633438, -0.03823137655854225, 0.06356296688318253, -0.020356833934783936, 0.019237767904996872, 0.0023195194080471992, -0.016185767948627472, -0.0581507571041584, -0.05168052017688751, -0.01196383684873581, -0.038801081478595734, 0.03285985812544823, -0.015087049454450607, 0.03424343094229698, 0.01962435431778431, 0.003186795860528946, 0.004021008964627981, 0.005330825224518776, 0.004784008488059044, 0.060551661998033524, -0.0059564849361777306, 0.017579514533281326, 0.058964625000953674, 0.004059158731251955, 0.05119219794869423, -0.030703110620379448, -0.028119085356593132, 0.009776570834219456, 0.021994739770889282, -0.009054264053702354, -0.014415609650313854, 0.03884177654981613, -0.0581507571041584, 0.04630900174379349, 0.004229562357068062, 0.02394801937043667, 0.045779988169670105, 0.09310632199048996, -0.04492542892694473, 0.02268652617931366, -0.06030750274658203, -0.08944392204284668, -0.11255773156881332, 0.002365299267694354, -0.024131139740347862, 0.0671439841389656, 0.02514847368001938, -0.01272683683782816, -0.0013759429566562176, 0.02266618050634861, 0.018912222236394882 ]
717,571
pytorch_optimizer.optimizer.qhadam
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.9, 0.999), nus: Tuple[float, float] = (1.0, 1.0), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_nus(nus) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'nus': nus, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'eps': eps, } 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), nus: Tuple[float, float] = (1.0, 1.0), weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False, eps: float = 1e-08)
[ 0.0028953724540770054, -0.027711831033229828, -0.014950305223464966, -0.006775695364922285, -0.056184977293014526, -0.022344566881656647, -0.08998732268810272, -0.034868184477090836, -0.022630060091614723, 0.029729314148426056, -0.034868184477090836, 0.05104610696434975, 0.01473142672330141, 0.06867052614688873, -0.046516288071870804, 0.048571836203336716, 0.01789087988436222, 0.015797266736626625, -0.006385521497577429, 0.00612857798114419, -0.015778234228491783, -0.0025480228941887617, -0.03302199766039848, 0.12257156521081924, 0.013018470257520676, 0.031194843351840973, -0.004682081285864115, 0.0069231996312737465, -0.026208236813545227, 0.006590124685317278, 0.012590231373906136, -0.0035091820172965527, -0.0008915701182559133, 0.061399977654218674, 0.0516170933842659, -0.02293458580970764, -0.01450303290039301, 0.003985003102570772, -0.08229804784059525, 0.036352746188640594, 0.07849147915840149, -0.045450448989868164, 0.06809954345226288, -0.03524884209036827, -0.021335827186703682, 0.0016499103512614965, 0.03886508196592331, 0.049447350203990936, -0.02464754320681095, -0.0299767404794693, 0.018499931320548058, -0.022116173058748245, 0.02729310840368271, -0.026645991951227188, -0.059192169457674026, 0.035286907106637955, 0.043204572051763535, 0.05500493943691254, 0.03739955276250839, 0.026531795039772987, 0.0020329465623944998, -0.02752150408923626, 0.02451431192457676, -0.026817288249731064, -0.006951748859137297, -0.00889309961348772, -0.08450586348772049, -0.02689342014491558, 0.03481108695268631, 0.040958695113658905, 0.1148061603307724, 0.005429120734333992, -0.02055547945201397, 0.03778021037578583, 0.004275254439562559, 0.0005147791816852987, -0.07769209891557693, -0.037551816552877426, -0.06452136486768723, -0.008069928735494614, 0.04324263706803322, 0.035724662244319916, -0.025827579200267792, -0.05374877154827118, 0.022116173058748245, -0.029253492131829262, -0.03597208857536316, -0.057555343955755234, 0.022192304953932762, 0.04126322269439697, -0.08450586348772049, -0.028149588033556938, 0.013132667168974876, -0.03062385879456997, 0.07795856148004532, 0.00825549941509962, 0.017167631536722183, -0.05953475832939148, 0.022363601252436638, -0.014484000392258167, -0.011847950518131256, -0.015797266736626625, -0.05363457649946213, -0.009554491378366947, 0.015559355728328228, -0.04301424324512482, -0.05085577815771103, -0.028625408187508583, 0.03810377046465874, -0.057250816375017166, -0.02677922137081623, 0.05534753203392029, -0.0273121427744627, 0.02786409482359886, -0.05957282707095146, 0.026836320757865906, 0.024362049996852875, 0.019318344071507454, 0.00599534809589386, 0.02228746935725212, 0.027826029807329178, 0.040958695113658905, -0.042481325566768646, 0.0627322793006897, 0.03717115893959999, -0.01386543270200491, 0.010030312463641167, 0.009092944674193859, 0.03665727376937866, -0.013047019951045513, 0.034963347017765045, -0.012514099478721619, -0.033041030168533325, -0.011000988073647022, 0.011971663683652878, -0.014379319734871387, -0.002500440925359726, 0.05523333698511124, -0.027159878984093666, 0.010068378411233425, 0.06315100193023682, 0.014074794016778469, 0.03875088691711426, -0.013779784552752972, -0.005100804381072521, 0.015369027853012085, -0.02215423993766308, -0.03222261741757393, -0.01820492185652256, 0.04111095890402794, 0.020174821838736534, 0.02120259590446949, -0.01419850718230009, 0.029957707971334457, 0.00287633971311152, -0.05272099748253822, 0.02441914938390255, -0.02108839899301529, -0.0026979066897183657, 0.016758425161242485, -0.028853803873062134, 0.03382137790322304, 0.027026649564504623, -0.02462851069867611, -0.01648245006799698, 0.021450024098157883, -0.046630486845970154, 0.002988157793879509, 0.007080220617353916, -0.021031301468610764, -0.009849500842392445, -0.08823630213737488, -0.02794022671878338, 0.032945867627859116, -0.00807944592088461, 0.03330748900771141, 0.029538985341787338, -0.01703440211713314, -0.00904536247253418, -0.013294447213411331, 0.06181870028376579, -0.013322995975613594, -0.020269986242055893, -0.07312421500682831, 0.02076484076678753, 0.015492741018533707, -0.04678275063633919, 0.05108417198061943, -0.04990413784980774, 0.01120083313435316, 0.0539391003549099, 0.027483437210321426, 0.015235797502100468, 0.025123363360762596, -0.007603624369949102, 0.014845624566078186, 0.04678275063633919, -0.005119836889207363, -0.007275307551026344, 0.041720010340213776, 0.0770830512046814, 0.025998875498771667, 0.020155789330601692, -0.025770481675863266, 0.022972652688622475, -0.01440786849707365, -0.014845624566078186, -0.0012514099944382906, -0.02143099159002304, -0.023410407826304436, 0.018290570005774498, -0.011267447844147682, 0.040958695113658905, 0.0285873431712389, -0.016444383189082146, -0.04978993907570839, -0.001802173093892634, 0.02247779816389084, 0.009763852693140507, -0.016225505620241165, 0.1023206114768982, -0.04015931859612465, 0.0022268437314778566, -0.009954181499779224, 0.04133935272693634, 0.02506626583635807, 0.03939800336956978, -0.036562107503414154, -0.0759030133485794, 0.0334407202899456, -0.025123363360762596, -0.04175807535648346, -0.03500141575932503, 0.0056813061237335205, 0.02057451196014881, -0.0026146380696445704, -0.04529818519949913, 0.03266037255525589, -0.08039476722478867, -0.03502044826745987, 0.04476526752114296, 0.022763291373848915, -0.012181024998426437, -0.029729314148426056, 0.02087903767824173, 0.00814606063067913, 0.03490624949336052, 0.01350380852818489, -0.062161292880773544, -0.03222261741757393, -0.030890317633748055, -0.012428452260792255, 0.0037328179460018873, 0.04145355150103569, -0.055423662066459656, 0.0288157369941473, 0.02666502445936203, -0.00803186371922493, 0.022363601252436638, -0.013513324782252312, -0.005205485038459301, 0.0017534014768898487, -0.01713908277451992, 0.08732271939516068, 0.01107711996883154, 0.015568872913718224, -0.004037343431264162, -0.00867422204464674, 0.02398139238357544, 0.0060762376524508, 0.12759624421596527, 0.026626959443092346, -0.005248308647423983, -0.002038894221186638, -0.004934266675263643, -0.030338365584611893, 0.0025860886089503765, -0.03286973387002945, -0.0031975191086530685, 0.05569012463092804, 0.03328845649957657, -0.03867475315928459, 0.014360286295413971, 0.00578122865408659, 0.01854751445353031, -0.001244272687472403, -0.010801143012940884, 0.026531795039772987, -0.006866101175546646, 0.00889309961348772, 0.012571198865771294, 0.00016683484136592597, 0.07415199279785156, 0.011847950518131256, 0.0854194387793541, -0.027978291735053062, 0.03810377046465874, -0.0038731852546334267, 0.07464684545993805, -0.012637813575565815, 0.04133935272693634, -0.04571690782904625, 0.054890744388103485, -0.013694136403501034, -0.02879670448601246, -0.04704920947551727, 0.03698083013296127, 0.018157340586185455, 0.03483011946082115, 0.050398990511894226, 0.03134710714221001, 0.02004159241914749, 0.05999154970049858, 0.01456964761018753, 0.03928380459547043, -0.07125899940729141, 0.006732871290296316, -0.05154096335172653, 0.03073805570602417, 0.046744681894779205, 0.0025361275766044855, 0.02923445962369442, 0.0061523690819740295, -0.0160827599465847, -0.0715254545211792, -0.03996898978948593, 0.015778234228491783, 0.01659664697945118, -0.04484139755368233, -0.0028620650991797447, -0.04038771241903305, -0.004919992294162512, 0.009554491378366947, -0.023943327367305756, -0.06155224144458771, 0.010049345903098583, 0.013047019951045513, 0.054129429161548615, -0.002809724770486355, -0.032926835119724274, 0.0800902396440506, -0.02409558929502964, -0.02548498846590519, 0.03620048239827156, -0.017053434625267982, -0.05036092549562454, -0.0069565074518322945, -0.02386719547212124, 0.041415486484766006, 0.020650643855333328, -0.015311929397284985, 0.009573523886501789, -0.0014227057108655572, 0.08557169884443283, 0.03671437129378319, -0.013008954003453255, -0.014978853985667229, -0.01188601553440094, 0.0377231128513813, -0.04895249381661415, -0.04187227413058281, 0.002160228556022048, -0.03237488120794296, 0.04647822305560112, 0.02721697837114334, -0.015901947394013405, 0.028549278154969215, -0.028206685557961464, 0.023581702262163162, 0.020707743242383003, 0.02057451196014881, -0.06737629324197769, -0.028320882469415665, -0.007222967222332954, 0.01897575333714485, -0.01130551379173994, -0.02537079155445099, 0.00835066381841898, 0.03747568652033806, -0.02173551730811596, -0.009440294466912746, -0.004034964367747307, 0.05458621680736542, 0.039892856031656265, 0.012571198865771294, -0.03233681619167328, -0.006994572933763266, 0.02826378494501114, 0.06467363238334656, -0.0014631504891440272, 0.003499665530398488, -0.0006798296817578375, 0.0288157369941473, -0.02323911152780056, -0.05169322341680527, 0.03460172563791275, 0.05043705552816391, 0.034430429339408875, -0.041491616517305374, -0.04712533950805664, -0.025427889078855515, -0.057022422552108765, -0.02205907553434372, 0.04586917161941528, -0.015349994413554668, 0.0028596860356628895, 0.015131116844713688, 0.03096644952893257, 0.016434866935014725, 0.0571746863424778, -0.005010398104786873, -0.009659172035753727, -0.02826378494501114, -0.013313479721546173, -0.030490627512335777, -0.02141195721924305, -0.011533907614648342, -0.012571198865771294, 0.03201325610280037, -0.017909914255142212, 0.031099678948521614, 0.0004654127114918083, 0.07327647507190704, 0.021716482937335968, 0.08222191780805588, 0.05085577815771103, -0.019346892833709717, -0.0031309041660279036, 0.00040325854206457734, -0.04232906177639961, -0.046325959265232086, -0.0050437054596841335, -0.03783730790019035, -0.035077545791864395, 0.03210842236876488, 0.0037233016919344664, -0.0053815389983356, -0.006585366558283567, -0.005352989304810762, -0.031860992312431335, 0.0010575128253549337, -0.05572818964719772, 0.012713944539427757, -0.025351759046316147, -0.0574030801653862, -0.0287015400826931, 0.02367686666548252, -0.016948753967881203, -0.043547164648771286, -0.02293458580970764, 0.014683845452964306, 0.0016701327404007316, 0.0400451198220253, -0.022953618317842484, -0.023105882108211517, -0.033155228942632675, -0.026817288249731064, -0.0285873431712389, 0.04640209302306175, -0.007784436456859112, 0.04990413784980774, -0.022363601252436638, -0.011257931590080261, -0.015169182792305946, -0.057783737778663635, 0.00825074128806591, 0.07293388992547989, -0.0216403529047966, -0.0007095684995874763, 0.0016011386178433895, 0.002298216801136732, 0.014693361707031727, 0.03180389478802681, -0.022192304953932762, -0.05226420983672142, 0.02057451196014881, -0.005909700412303209, -0.01638728566467762, -0.006176160182803869, -0.027045682072639465, 0.004103958606719971, -0.03323135897517204, 0.013056536205112934, 0.07811082154512405, 0.007422812283039093, -0.011790851131081581, -0.06505428999662399, 0.0026289126835763454, 0.019756099209189415, 0.04038771241903305, -0.07932892441749573, -0.020917104557156563, 0.03096644952893257, 0.06277034431695938, -0.03511561080813408, -0.0057955035008490086, 0.025199495255947113, 0.0174721572548151, 0.028872836381196976, 0.015882914885878563, 0.008902615867555141, -0.03757084906101227, -0.024723675101995468, -0.025827579200267792, 0.023296210914850235, -0.039778660982847214, -0.08838856220245361, 0.016120824962854385, -0.01606372743844986, -0.0090548787266016, -0.02240166626870632, 0.008274531923234463, -0.01124841533601284, 0.0081888847053051, -0.031023548915982246, -0.03083322010934353, -0.04811504855751991, 0.05759340897202492, -0.008046138100326061, -0.022553930059075356, 0.060258008539676666, 0.05706048756837845, 0.04746793210506439, -0.03146130219101906, 0.020517414435744286, 0.04880023002624512, 0.020327085629105568, -0.046059500426054, 0.08130834251642227, 0.02183067984879017, -0.0024040869902819395, -0.06726209819316864, -0.04381362348794937, 0.03404977172613144, -0.0037780210841447115, 0.01638728566467762, 0.029158327728509903, -0.017614904791116714, -0.03835119679570198, -0.03161356598138809, 0.014046244323253632, 0.028530243784189224, 0.013218315318226814, -0.043623294681310654, -0.0023398511111736298, 0.007242000196129084, -0.03534400463104248, 0.07826308906078339, -0.06006767973303795, -0.019356410950422287, 0.021792614832520485, -0.026817288249731064, -0.042785849422216415, 0.015054985880851746, 0.026855353266000748, -0.009535458870232105, 0.010058862157166004, 0.004525060299783945, 0.04948541522026062, 0.025542085990309715, -0.0340307392179966, -0.019194630905985832, -0.009954181499779224, 0.010030312463641167, -0.02089807018637657, -0.005267341621220112, 0.009292789734899998, -0.04046384245157242, -0.05869731307029724, 0.026626959443092346, 0.008050896227359772, 0.0006613915902562439, 0.016101792454719543, 0.017053434625267982, -0.045450448989868164, 0.009754336439073086, -0.007760645356029272, 0.024228820577263832, -0.04914282262325287, -0.04742986708879471, 0.0018402388086542487, -0.01893768645823002, -0.10962922871112823, -0.08047089725732803, 0.03709502890706062, -0.00277165905572474, -0.06322713196277618, 0.003704268718138337, -0.009849500842392445, 0.02249683067202568, 0.0069231996312737465, 0.039892856031656265, -0.02462851069867611, -0.012790076434612274, -0.050931911915540695, 0.01563548669219017, -0.03224164992570877, -0.028416046872735023, 0.042557455599308014, 0.06882279366254807, -0.07784436643123627, -0.00856478326022625, 0.024875937029719353, 0.001660616253502667, 0.017843298614025116, -0.0090548787266016, -0.01865219511091709, 0.036790501326322556, 0.01894720457494259, -0.05428169295191765, 0.030357398092746735, -0.017405543476343155, -0.006157127674669027, -0.016834557056427002, -0.009963697753846645, -0.04274778440594673, -0.04229099676012993, 0.016111308708786964, 0.06832793354988098, -0.015702102333307266, -0.001917559769935906, -0.0317087322473526, -0.0035210775677114725, 0.04217679798603058, -0.07514169812202454, -0.02537079155445099, 0.0008927597082220018, -0.12097280472517014, 0.0058478438295423985, -0.038617655634880066, 0.037742145359516144, -0.02613210491836071, -0.005448153708130121, -0.045260120183229446, -0.007118286564946175, 0.021050333976745605, 0.029843511059880257, 0.008602849207818508, 0.03509657829999924, -0.01156245730817318, 0.017510224133729935, 0.058963775634765625, -0.0053815389983356, -0.010829692706465721, -0.005286374595016241, -0.03233681619167328, -0.018052659928798676, -0.00883600115776062, 0.0430523119866848, 0.035286907106637955, -0.0321655198931694, 0.055309467017650604, -0.03673340380191803, -0.0046868398785591125, -0.007793952710926533, -0.00604768842458725, 0.017795715481042862, 0.027331175282597542, 0.05709855630993843, -0.022877488285303116, -0.027883127331733704, -0.01595904678106308, 0.05047512426972389, 0.01429367158561945, 0.006204709410667419, 0.012723461724817753, -0.032812636345624924, -0.0067090801894664764, -0.032527144998311996, -0.02550402097404003, -0.046059500426054, -0.0013334891991689801, -0.02655082754790783, 0.00792242493480444, 0.03306006267666817, 0.023810097947716713, -0.07434231787919998, -0.031004514545202255, 0.009744820185005665, -0.023924294859170914, 0.05953475832939148, 0.031632598489522934, -0.0036471702624112368, -0.05930636450648308, 0.011343579739332199, -0.005586141720414162, -0.06939377635717392, 0.041720010340213776, -0.023600736632943153, -0.027673766016960144, -0.043547164648771286, -0.01172423642128706, 0.011162767186760902, 0.00850768480449915, 0.033155228942632675, -0.04571690782904625, -0.05805019661784172, -0.06178063526749611, 0.023105882108211517, -0.023296210914850235, -0.007812985219061375, -0.011115184985101223, -0.052416473627090454, 0.06882279366254807, -0.012552165426313877, 0.04210066795349121, 0.007494185119867325, -0.01397962961345911, 0.01435077004134655, -0.041834209114313126, 0.030338365584611893, 0.04297617822885513, 0.034658823162317276, -0.07910053431987762, -0.02912026271224022, 0.056299176067113876, 0.048038918524980545, -0.014579163864254951, -0.0571746863424778, 0.0036138626746833324, -0.025028198957443237, -0.011610039509832859, 0.019308827817440033, -0.011486326344311237, 0.01182891707867384, -0.07004089653491974, -0.036790501326322556, 0.01573065109550953, 0.034106869250535965, -0.022972652688622475, 0.05256873741745949, 0.025142397731542587, -0.027902159839868546, -0.010705978609621525, 0.009916115552186966, -0.028682507574558258, 0.049637675285339355, 0.015121600590646267, 0.05367264151573181, 0.06581559777259827, 0.01097243931144476, 0.03684759885072708, -0.04156774654984474, -0.005562351085245609, -0.01712005026638508, 0.05930636450648308, -0.011857466772198677, -0.024152688682079315, 0.0754462257027626, -0.017748134210705757, -0.008217433467507362, -0.014369802549481392, 0.0055575924925506115, 0.03309812769293785, 0.07323841005563736, -0.05355844274163246, 0.03842732682824135, -0.031442269682884216, -0.07689271867275238, -0.09691528230905533, 0.0022863212507218122, -0.03673340380191803, 0.0803186371922493, 0.028644442558288574, 0.002797829220071435, 0.02238263376057148, 0.04126322269439697, 0.0038208449259400368 ]
717,574
pytorch_optimizer.optimizer.qhadam
__str__
null
def __str__(self) -> str: return 'QHAdam'
(self) -> str
[ 0.003548623528331518, -0.02328178659081459, 0.02196096070110798, -0.03238669037818909, -0.0011854427866637707, -0.0658300444483757, 0.020217467099428177, 0.007762063294649124, 0.09390203654766083, -0.07153601944446564, -0.05283310264348984, 0.009078487753868103, -0.017514172941446304, 0.028882095590233803, 0.0027451200876384974, 0.001206355867907405, 0.003013688139617443, -0.049768783152103424, 0.006216695066541433, 0.017919227480888367, 0.003870024811476469, 0.03027336858212948, 0.03987138345837593, 0.011103756725788116, -0.026627883315086365, 0.06632315367460251, -0.017294036224484444, -0.030202923342585564, -0.011209423653781414, 0.005388976540416479, 0.007040010765194893, -0.048113346099853516, -0.02300001122057438, 0.008149506524205208, -0.029304761439561844, 0.004957505967468023, -0.030766477808356285, 0.007026802748441696, -0.03559190034866333, -0.01616692915558815, 0.0032888606656342745, 0.016818538308143616, -0.000243940346990712, -0.045154690742492676, -0.020076578482985497, -0.017496563494205475, 0.03414779528975487, 0.044732026755809784, 0.011103756725788116, -0.0017038675723597407, 0.016862565651535988, 0.022718233987689018, -0.036560505628585815, -0.0250605009496212, -0.04392192140221596, -0.0067714424803853035, 0.04518991336226463, -0.018262643367052078, -0.006687790155410767, 0.031647030264139175, -0.04385147616267204, -0.022506901994347572, 0.040716711431741714, -0.016774510964751244, -0.030467089265584946, 0.015101461671292782, 0.008224353194236755, 0.036560505628585815, 0.027684545144438744, 0.023052843287587166, 0.03634917363524437, -0.05991273745894432, -0.015022212639451027, 0.03659572824835777, 0.03515162318944931, -0.01134150568395853, -0.12081169337034225, -0.008699851110577583, -0.0021045187022536993, -0.0436401441693306, 0.043675366789102554, -0.016017235815525055, -0.052410438656806946, -0.01986524648964405, -0.03691272810101509, -0.08234919607639313, -0.014485076069831848, -0.052410438656806946, -0.014361798763275146, 0.00792496558278799, -0.010355288162827492, -0.0006994882714934647, -0.019037527963519096, 0.06389283388853073, -0.012556667439639568, -0.03085453249514103, 0.008180325850844383, -0.03860338777303696, 0.0033394924830645323, 0.048712119460105896, 0.0007616772199980915, 0.01588515378534794, -0.007955784909427166, 0.04068148881196976, -0.05913785472512245, -0.02062252163887024, -0.03719450533390045, 0.0005932717467658222, 0.007762063294649124, -0.0034759778063744307, -0.05307965725660324, 0.023176120594143867, -0.004834229126572609, 0.0005828151479363441, 0.03143569454550743, -0.05117766559123993, 0.0023532744962722063, 0.016343040391802788, 0.04705668240785599, -0.03113630786538124, 0.03185836225748062, 0.0011766372481361032, -0.05075500160455704, -0.018738141283392906, 0.034024517983198166, 0.06928180903196335, -0.059419628232717514, -0.03259802609682083, 0.03347857668995857, -0.04631701856851578, 0.04385147616267204, 0.025782553479075432, -0.05075500160455704, -0.033249631524086, 0.07798165827989578, 0.007321787532418966, 0.04666924104094505, 0.028248099610209465, 0.05350232124328613, 0.14539669454097748, -0.0031809930223971605, 0.007286565378308296, 0.03511640056967735, 0.03043186664581299, -0.0045920773409307, -0.004360932391136885, -0.007475884165614843, 0.06227261573076248, -0.013393191620707512, -0.005226074252277613, 0.027068160474300385, 0.02757887914776802, 0.045471690595149994, 0.011376728303730488, -0.012442195788025856, 0.01944258250296116, -0.005661947652697563, -0.056601863354444504, 0.01854441873729229, -0.04103371128439903, 0.013040971010923386, -0.06209650635719299, -0.0032668467611074448, 0.010460954159498215, -0.011191812343895435, 0.035803232342004776, 0.00034699239768087864, 0.019988523796200752, 0.010601842775940895, 0.012644723057746887, -0.007616772316396236, -0.04018837958574295, -0.09066160768270493, 0.045295581221580505, -0.008770295418798923, 0.039519160985946655, 0.0038039833307266235, 0.07791121304035187, 0.035239677876234055, -0.05100155621767044, -0.020499244332313538, -0.006375194527208805, -0.02597627602517605, 0.01988285779953003, 0.07847476750612259, -0.04311181232333183, 0.016880176961421967, 0.04772590473294258, 0.0418085940182209, 0.000008427155080426019, -0.038321610540151596, -0.010452148504555225, -0.04018837958574295, 0.01616692915558815, -0.014212104491889477, -0.039660047739744186, 0.011447172611951828, -0.04909956455230713, -0.0045304386876523495, 0.006775845307856798, -0.010549009777605534, 0.051107220351696014, -0.029322372749447823, 0.010681092739105225, 0.05043800175189972, 0.007876534946262836, 0.022277958691120148, -0.0009768620366230607, 0.0014110840857028961, -0.04568302258849144, 0.030731255188584328, 0.014555519446730614, -0.036419618874788284, 0.021009963005781174, 0.031647030264139175, -0.039378274232149124, 0.010055900551378727, -0.03178791701793671, -0.006872706115245819, 0.023686841130256653, 0.05251610279083252, -0.025430332869291306, 0.0018513599643483758, -0.045753467828035355, -0.018738141283392906, 0.009016849100589752, 0.029921147972345352, -0.010143956169486046, -0.0203231330960989, -0.026751160621643066, 0.024285616353154182, -0.05061411112546921, -0.008638212457299232, 0.021027574315667152, -0.022348402068018913, 0.0418085940182209, -0.05889130011200905, -0.015215933322906494, -0.06928180903196335, -0.021749626845121384, -0.015717847272753716, 0.019988523796200752, 0.027085769921541214, 0.02386295236647129, 0.03737061470746994, -0.04494335874915123, -0.004431376699358225, 0.022753456607460976, 0.003660893766209483, -0.032686080783605576, 0.02786065638065338, -0.05135377496480942, -0.012433390133082867, -0.011447172611951828, 0.007409842684864998, -0.03793416917324066, -0.0059305159375071526, 0.023634007200598717, 0.0011854427866637707, -0.012495028786361217, -0.07910876721143723, -0.012503834441304207, -0.03229863569140434, 0.041738152503967285, -0.009465930983424187, 0.025183778256177902, -0.027226658537983894, 0.02653982862830162, 0.043886698782444, -0.02150307223200798, 0.10193266719579697, 0.02595866471529007, -0.061321619898080826, 0.01616692915558815, -0.033161576837301254, -0.02108040824532509, -0.024585003033280373, 0.04244259372353554, -0.11785303801298141, -0.057623304426670074, -0.019107971340417862, -0.03471134975552559, 0.028300931677222252, 0.03583845496177673, 0.0249372236430645, -0.04899389669299126, 0.023105677217245102, -0.015233544632792473, 0.022489290684461594, 0.009888595901429653, 0.03814550116658211, 0.008779100142419338, -0.037617169320583344, -0.00452163303270936, 0.029392816126346588, 0.006229903548955917, 0.03347857668995857, 0.0415620394051075, -0.003291062079370022, 0.01320827566087246, -0.0249372236430645, -0.0025293848011642694, -0.0026152385398745537, -0.0238981731235981, -0.05142422020435333, 0.002808959921821952, -0.03585606440901756, -0.00283757783472538, 0.0006290441378951073, -0.00015918724238872528, -0.04022360220551491, 0.024408893659710884, 0.01200191956013441, 0.07185301929712296, 0.01319066435098648, 0.08474429696798325, -0.007621175143867731, 0.016536761075258255, 0.02534227818250656, 0.05663708597421646, -0.04349925369024277, -0.01496937870979309, -0.027191437780857086, -0.010742730461061, -0.012371751479804516, -0.03347857668995857, -0.06797859072685242, 0.05043800175189972, -0.0017071696929633617, 0.023176120594143867, -0.030960198491811752, -0.046211354434490204, 0.04216081649065018, -0.008602989837527275, -0.02375728450715542, -0.009553985670208931, 0.045471690595149994, -0.004821020644158125, -0.03282696753740311, -0.027843045070767403, 0.09087293595075607, -0.021485460922122, -0.027032937854528427, 0.03272130340337753, 0.0151895172894001, 0.01400077249854803, -0.04793723672628403, -0.016316622495651245, 0.00630034739151597, -0.0020153627265244722, 0.011156590655446053, -0.031206753104925156, 0.03259802609682083, 0.0015993020497262478, 0.049768783152103424, 0.003973489627242088, -0.01460835337638855, 0.06501993536949158, -0.03055514395236969, 0.0341654047369957, 0.002811161335557699, -0.07847476750612259, 0.010777953080832958, 0.02803676575422287, -0.040117934346199036, -0.008387255482375622, -0.0020538868848234415, 0.006119834259152412, 0.04385147616267204, -0.04564779996871948, -0.018879028037190437, -0.0036630951799452305, -0.041738152503967285, -0.0066305543296039104, -0.03958960622549057, 0.07185301929712296, 0.022471679374575615, 0.035979341715574265, -0.08256053179502487, -0.024866780266165733, 0.051107220351696014, -0.008083464577794075, 0.02548316679894924, 0.03009725734591484, -0.01800728216767311, -0.004345522727817297, 0.017540590837597847, 0.028864486142992973, -0.0013978758361190557, 0.0012151614064350724, -0.00919296033680439, -0.034464795142412186, -0.00818472821265459, -0.0038105875719338655, -0.046774908900260925, -0.04540124535560608, -0.03835683315992355, -0.0238981731235981, -0.07932009547948837, 0.0320873036980629, 0.019107971340417862, -0.0388147197663784, -0.0029872716404497623, 0.00013937482435721904, -0.027825433760881424, 0.026346107944846153, 0.018614863976836205, 0.01640467904508114, -0.021573517471551895, 0.025606444105505943, 0.008875961415469646, -0.02860032021999359, -0.06389283388853073, -0.05160032957792282, 0.06572438031435013, 0.0033152771648019552, -0.0070091914385557175, -0.008770295418798923, 0.007493495009839535, 0.01720597967505455, -0.04254825785756111, 0.042055148631334305, 0.02108040824532509, 0.0951700285077095, 0.00046614205348305404, 0.03564473241567612, 0.006612943485379219, 0.041738152503967285, 0.08086986839771271, -0.02923431620001793, -0.029868314042687416, 0.016281401738524437, -0.01930169388651848, 0.005609114654362202, 0.02861793152987957, -0.013014554046094418, 0.005833655130118132, -0.02136218547821045, -0.04124504327774048, 0.016642427071928978, 0.023968618363142014, -0.08192653208971024, 0.0040417322888970375, 0.0014716220321133733, 0.02490200288593769, -0.03393646329641342, -0.05903218686580658, 0.003797379322350025, 0.04018837958574295, 0.02386295236647129, 0.016431095078587532, 0.05364321172237396, -0.021767238155007362, -0.04230170324444771, 0.03860338777303696, -0.036102619022130966, 0.01958346925675869, -0.04821901023387909, -0.0004944848478771746, -0.017355674877762794, -0.06287138909101486, 0.07452989369630814, -0.02831854298710823, 0.03347857668995857, 0.023105677217245102, 0.04124504327774048, -0.013657357543706894, 0.03351379930973053, -0.04342881217598915, -0.009606819599866867, 0.016977036371827126, 0.005221671890467405, -0.029304761439561844, -0.014176882803440094, 0.0052656992338597775, 0.030519923195242882, -0.05322054401040077, -0.01519832294434309, 0.004662521183490753, -0.00512040825560689, -0.01958346925675869, -0.030044425278902054, 0.013454830273985863, 0.06840125471353531, 0.013217081315815449, -0.0022024798672646284, 0.004719757009297609, 0.0036851088516414165, -0.0394839383661747, -0.00804383959621191, 0.047972455620765686, 0.03423584997653961, -0.04853601008653641, -0.01594679243862629, -0.009809345938265324, 0.0249372236430645, -0.004702146165072918, -0.006203487049788237, -0.08396941423416138, 0.03601456433534622, 0.013102609664201736, -0.013833467848598957, -0.0030907364562153816, -0.0020836053881794214, 0.04938134178519249, -0.018896639347076416, 0.03321440890431404, 0.012142808176577091, -0.0192840825766325, -0.03111869841814041, -0.0006207889528013766, -0.04790201410651207, 0.014872518368065357, -0.025606444105505943, 0.013305136002600193, 0.015559349209070206, -0.010733925737440586, 0.01644870638847351, -0.013102609664201736, 0.06547782570123672, -0.009008044376969337, -0.017901616171002388, -0.05709497258067131, -0.024813948199152946, -0.025412723422050476, 0.018738141283392906, -0.027032937854528427, 0.025712110102176666, -0.025289446115493774, 0.09960801154375076, -0.010777953080832958, 0.030519923195242882, 0.007467078510671854, 0.055192980915308, -0.011614477261900902, 0.08854828029870987, -0.11010418832302094, 0.013217081315815449, 0.029463259503245354, 0.04226648062467575, 0.019636303186416626, -0.015215933322906494, -0.019213639199733734, -0.0468805730342865, -0.011033313348889351, -0.027261881157755852, -0.012996943667531013, 0.03645484149456024, 0.021555906161665916, 0.012142808176577091, 0.0005541972350329161, -0.05318532511591911, -0.005151227582246065, -0.032245803624391556, 0.01017037220299244, 0.04772590473294258, -0.0039338646456599236, 0.021855292841792107, 0.04423891752958298, 0.03555667772889137, -0.024091895669698715, 0.0048034097999334335, 0.07326190173625946, 0.03354902192950249, 0.030343811959028244, 0.040434934198856354, -0.030484700575470924, 0.030819309875369072, 0.008616198785603046, -0.04476724937558174, -0.010628258809447289, -0.049310896545648575, 0.05646097660064697, 0.08509651571512222, -0.09714246541261673, 0.02983309142291546, 0.02889970690011978, 0.03085453249514103, -0.026029108092188835, 0.04018837958574295, -0.03627873212099075, 0.059701405465602875, -0.004010912962257862, -0.029868314042687416, -0.04459114000201225, 0.004675729665905237, -0.019847635179758072, -0.002844182075932622, 0.017681477591395378, -0.03191119432449341, -0.053467098623514175, -0.005494642537087202, -0.04490813612937927, -0.009360264986753464, 0.07178257405757904, -0.0572710819542408, -0.0048034097999334335, -0.038568165153265, 0.013357969932258129, -0.009694874286651611, 0.033161576837301254, 0.05188210681080818, 0.016519149765372276, 0.05558042600750923, 0.09615624696016312, 0.057447195053100586, -0.005556281190365553, 0.03069603256881237, -0.051388997584581375, 0.006031779106706381, -0.03169986233115196, -0.0019746371544897556, 0.004222245421260595, 0.020058967173099518, -0.02400383912026882, -0.02136218547821045, 0.03472895920276642, -0.037300169467926025, -0.02919909544289112, 0.004360932391136885, 0.0010495075257495046, 0.06963402777910233, -0.025782553479075432, 0.06061717867851257, -0.038497719913721085, -0.012988138012588024, 0.026627883315086365, -0.008528143167495728, 0.03467612713575363, -0.08530785143375397, 0.004233252257108688, 0.005261296406388283, -0.022577345371246338, -0.07058502733707428, -0.029445650056004524, 0.013067387044429779, 0.005468226037919521, 0.026909660547971725, -0.03263324499130249, 0.013076192699372768, -0.03169986233115196, 0.0182450320571661, -0.032421912997961044, 0.025025280192494392, -0.04751456901431084, 0.05381932109594345, -0.08023586869239807, -0.07125424593687057, -0.03173508495092392, -0.05829252302646637, -0.04201992601156235, 0.00012052551755914465, 0.0031149517744779587, 0.030185312032699585, -0.00006638534250669181, -0.020235078409314156, -0.03351379930973053, 0.0036058593541383743, -0.02597627602517605, -0.024884391576051712, 0.010399315506219864, -0.07319145649671555, -0.0013593516778200865, -0.06762637197971344, 0.07741810381412506, 0.03546862304210663, -0.010126344859600067, -0.021591128781437874, -0.010936452075839043, -0.0277197677642107, -0.004475404042750597, 0.026486994698643684, 0.008290394209325314, -0.07093724608421326, -0.02312328852713108, -0.011015702039003372, 0.03527490049600601, -0.0005107200122438371, 0.05653142184019089, -0.0667458176612854, 0.04138593003153801, -0.031224364414811134, 0.00820233952254057, -0.06702759861946106, 0.03460568189620972, 0.06311794370412827, -0.059243518859148026, -0.001148019335232675, 0.02018224447965622, -0.07939054071903229, -0.05695408582687378, -0.04878256469964981, -0.04022360220551491, 0.029745036736130714, 0.08854828029870987, 0.021150851622223854, -0.0034979917109012604, -0.035979341715574265, -0.007053219247609377, -0.0055254618637263775, 0.021256517618894577, 0.06452682614326477, 0.005868877284228802, -0.0017699089366942644, 0.011015702039003372, 0.0013945738319307566, -0.009157737717032433, 0.03363707661628723, 0.020428799092769623, -0.03027336858212948, 0.0667458176612854, 0.05290354788303375, -0.04874734207987785, -0.0010142854880541563, 0.06452682614326477, -0.08897094428539276, -0.013692579232156277, 0.04670446366071701, 0.03555667772889137, 0.03701839596033096, 0.0266807172447443, 0.005270102061331272, -0.02432083897292614, -0.010425732471048832, 0.041879039257764816, 0.04342881217598915, -0.03377796337008476, -0.03398929536342621, -0.061744287610054016, -0.0010990386363118887, 0.004526035860180855, 0.04564779996871948, -0.026205219328403473, 0.02743799053132534, 0.05047322437167168, -0.0067846509627997875, 0.020058967173099518, 0.012706361711025238, 0.07727722078561783, 0.04518991336226463, 0.013674967922270298, 0.038779497146606445, 0.03499312698841095, -0.013903911225497723, 0.02553599886596203, 0.032545190304517746, 0.05100155621767044, 0.021450240164995193, -0.02284151129424572, 0.020569687709212303, 0.05825730040669441, 0.05350232124328613, 0.004244259092956781, 0.027948711067438126, -0.002793550258502364, -0.03870905190706253, -0.0066657764837145805, 0.04008271545171738, 0.0029212303925305605, -0.0025976274628192186, -0.0076519944705069065, -0.020111801102757454, 0.029163872823119164, -0.0024611421395093203, -0.010927646420896053, 0.028846874833106995, 0.02226034738123417, 0.014722825028002262 ]
717,595
pytorch_optimizer.optimizer.qhadam
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'] nu1, nu2 = group['nus'] 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['beta1_weight'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) state['beta2_weight'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) 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'], ) beta1_weight, beta2_weight = state['beta1_weight'], state['beta2_weight'] beta1_weight.mul_(beta1).add_(1.0) beta2_weight.mul_(beta2).add_(1.0) beta1_adj = 1.0 - (1.0 / beta1_weight) beta2_adj = 1.0 - (1.0 / beta2_weight) grad_p2 = grad.pow(2) exp_avg, exp_avg_sq = state['exp_avg'], state['exp_avg_sq'] exp_avg.mul_(beta1_adj).add_((1.0 - beta1_adj) * grad) exp_avg_sq.mul_(beta2_adj).add_(1.0 - beta2_adj * grad_p2) avg_grad = exp_avg.mul(nu1) if nu1 != 1.0: avg_grad.add_(grad, alpha=1.0 - nu1) avg_grad_rms = exp_avg_sq.mul(nu2) if nu2 != 1.0: avg_grad_rms.add_(grad_p2, alpha=1.0 - nu2) avg_grad_rms.sqrt_().add_(group['eps']) p.addcdiv_(avg_grad, avg_grad_rms, value=-group['lr']) return loss
(self)
[ -0.004419305827468634, -0.021647917106747627, -0.033120930194854736, 0.05211535468697548, -0.007068025879561901, -0.000006026173650752753, -0.03909606114029884, -0.042646776884794235, -0.018736710771918297, 0.012122069485485554, -0.02496955543756485, 0.006380790378898382, 0.019500305876135826, 0.08735526353120804, -0.02777576632797718, 0.042532239109277725, 0.00902951043099165, 0.0421886220574379, 0.030887415632605553, -0.0066910008899867535, -0.03375089541077614, -0.07235062122344971, -0.015500977635383606, 0.053986161947250366, -0.05990402400493622, -0.013582445681095123, 0.049557313323020935, -0.009148822166025639, -0.013229282572865486, 0.005001546815037727, -0.02603858709335327, -0.07452686876058578, 0.01944303698837757, 0.006156484130769968, 0.04421214759349823, -0.04936641454696655, 0.000987901003099978, 0.017266791313886642, -0.07487048208713531, -0.037339791655540466, 0.0018421728163957596, -0.036175310611724854, 0.002760872943326831, 0.008704982697963715, 0.0021511900704354048, -0.0013637328520417213, -0.03159373998641968, 0.05066452547907829, -0.00486553180962801, -0.016799088567495346, 0.005163810681551695, -0.044250328093767166, 0.054215241223573685, -0.016379112377762794, 0.011444379575550556, 0.08147557824850082, 0.0641801580786705, -0.05738415941596031, 0.028692079707980156, -0.03827519714832306, 0.06612732261419296, -0.06563098728656769, 0.030429258942604065, -0.0061087594367563725, 0.00020611098443623632, -0.019318953156471252, -0.0759013369679451, -0.027260340750217438, 0.01751495897769928, 0.04474666342139244, 0.025809509679675102, 0.015042820945382118, 0.012417962774634361, -0.0025532706640660763, -0.05383344367146492, -0.022526051849126816, -0.03575533255934715, -0.053986161947250366, 0.020235266536474228, -0.037225253880023956, 0.0043023801408708096, -0.004920415114611387, -0.038771532475948334, 0.004574411083012819, 0.004548162221908569, -0.02174336649477482, -0.01816401444375515, -0.035507164895534515, -0.0036986630875617266, -0.012885664589703083, 0.016398200765252113, 0.006285340990871191, 0.022659679874777794, 0.02745123952627182, 0.05612422898411751, 0.03613713011145592, -0.028615720570087433, -0.035411715507507324, -0.03861881420016289, -0.03554534539580345, 0.013467906042933464, 0.01453693863004446, 0.0020605132449418306, 0.04531935974955559, 0.030753787606954575, -0.054100703448057175, -0.013525175862014294, -0.029169326648116112, 0.0406232513487339, -0.05803321674466133, -0.02107522077858448, -0.016608189791440964, -0.03619439899921417, -0.0099458247423172, -0.04363945126533508, -0.005865363869816065, -0.0070059834979474545, 0.015205084346234798, -0.034113604575395584, 0.03705344349145889, 0.04875553771853447, 0.0053403922356665134, -0.05448250100016594, 0.016369566321372986, 0.010528065264225006, 0.031727369874715805, 0.05432978272438049, 0.01655092090368271, 0.03466721251606941, -0.05894953012466431, -0.003362203948199749, 0.0036485521122813225, -0.007502320222556591, -0.007192110177129507, 0.021991534158587456, -0.015042820945382118, -0.024931374937295914, 0.016684548929333687, 0.013868792913854122, -0.0011328647378832102, 0.0020963067654520273, -0.002729851985350251, -0.013506085611879826, 0.002992337802425027, 0.027279429137706757, 0.0261722169816494, 0.04207408055663109, 0.03197553753852844, -0.0028968884143978357, 0.004963367246091366, 0.02376689203083515, 0.023938702419400215, 0.011406200006604195, 0.012522957287728786, -0.00021252398437354714, 0.028501180931925774, -0.023175107315182686, 0.026401296257972717, -0.01453693863004446, -0.0361180417239666, -0.02995201200246811, -0.018641261383891106, -0.01987255923449993, 0.0006365279550664127, 0.021647917106747627, 0.017963571473956108, -0.008203873410820961, 0.04661747068166733, -0.036480747163295746, 0.003848995780572295, -0.009683338925242424, -0.030429258942604065, 0.04776286333799362, 0.03230006620287895, -0.02865390107035637, 0.12064800411462784, 0.0032381198834627867, 0.00853794626891613, -0.027279429137706757, -0.0029326819349080324, 0.0070155286230146885, -0.02378598228096962, -0.02109431102871895, -0.050015468150377274, 0.000157491464051418, 0.02909296751022339, 0.014947371557354927, 0.0026248577050864697, 0.026783093810081482, 0.006800767499953508, -0.002651106333360076, -0.015252809040248394, 0.04348673298954964, -0.004953822121024132, -0.010298986919224262, 0.030524708330631256, 0.0361180417239666, 0.016560465097427368, 0.07269424200057983, 0.010155812837183475, 0.000010402490261185449, -0.025484981015324593, 0.021037040278315544, 0.00848544854670763, -0.028558451682329178, -0.01444148924201727, -0.0180590208619833, 0.049251873046159744, -0.00214880402199924, 0.0007582259131595492, -0.06185119226574898, 0.004309539217501879, 0.04100504890084267, 0.07865028083324432, 0.04780104383826256, -0.05975130572915077, 0.0032858445774763823, 0.021476108580827713, 0.05589514970779419, -0.00648578442633152, -0.038217928260564804, -0.08101742714643478, 0.03438086435198784, 0.001094684936106205, 0.05784231796860695, -0.020197086036205292, 0.03848518431186676, -0.03966875746846199, -0.018507633358240128, 0.006065807305276394, 0.012341603636741638, -0.03092559613287449, 0.019948918372392654, -0.005435841623693705, 0.023824162781238556, 0.02884479984641075, -0.05898771062493324, -0.03060106746852398, -0.007091888226568699, -0.0021678938064724207, -0.02204880490899086, -0.03602259233593941, -0.0328727625310421, 0.026248576119542122, -0.0052163079380989075, 0.03686254471540451, 0.07143431156873703, 0.012981113977730274, -0.02044525556266308, 0.04482302442193031, -0.02909296751022339, -0.020693423226475716, -0.024263229221105576, 0.03775976970791817, -0.05776595696806908, -0.03180373087525368, 0.06150757521390915, 0.031727369874715805, 0.03726343438029289, -0.04974821209907532, 0.028291193768382072, -0.03943967819213867, -0.05772778019309044, 0.05326074734330177, -0.026248576119542122, 0.017782216891646385, 0.04959549382328987, -0.03846609592437744, 0.049251873046159744, 0.04822102189064026, 0.07536682486534119, 0.07288514077663422, -0.04291403666138649, -0.02561861090362072, 0.0010785778285935521, 0.022335153073072433, 0.012857030145823956, 0.018097199499607086, 0.009606978856027126, -0.025561342015862465, 0.06853264570236206, -0.04722834751009941, -0.08582807332277298, -0.002017561113461852, -0.04764832556247711, 0.031307391822338104, -0.012351148761808872, -0.00881474930793047, 0.06303476542234421, 0.00025428307708352804, 0.04661747068166733, -0.0046579292975366116, 0.0970529168844223, 0.00513040367513895, 0.07494684308767319, 0.00448612030595541, -0.008175238035619259, 0.015290988609194756, -0.014718292281031609, 0.014880556613206863, 0.08643894642591476, -0.010642604902386665, 0.0047820135951042175, -0.010976677760481834, -0.011158031411468983, -0.01719043217599392, 0.02149519883096218, 0.0011680616298690438, 0.018240373581647873, -0.017658133059740067, -0.008852928876876831, -0.014823286794126034, 0.0074641406536102295, 0.02325146645307541, -0.0071396129205822945, -0.09957278519868851, -0.010680784471333027, -0.05730780214071274, 0.024072330445051193, 0.058529552072286606, -0.021552467718720436, 0.027203069999814034, 0.027833035215735435, 0.03762613981962204, -0.03180373087525368, -0.010356256738305092, 0.06738725304603577, 0.03384634479880333, -0.031727369874715805, -0.02033071592450142, -0.08201009780168533, -0.005469248630106449, 0.06311112642288208, 0.03136466443538666, -0.05058816447854042, -0.006996438838541508, 0.039172422140836716, 0.0033645902294665575, 0.021361568942666054, -0.05612422898411751, 0.06605096161365509, 0.01847899705171585, -0.03403724357485771, 0.022354241460561752, 0.014155141077935696, -0.03317819908261299, 0.033999066799879074, 0.02031162567436695, 0.030429258942604065, 0.029646573588252068, -0.009478121995925903, -0.009974459186196327, -0.012064800597727299, 0.06280568242073059, 0.026191307231783867, 0.03867608308792114, -0.005598105490207672, -0.029570214450359344, 0.030543798580765724, -0.07319057732820511, 0.012627951800823212, 0.019395312294363976, -0.04699926823377609, 0.10285624116659164, 0.1052233874797821, -0.0028777983970940113, -0.021132489666342735, -0.02141883783042431, 0.039401501417160034, -0.028997518122196198, 0.022106073796749115, -0.05024454742670059, -0.00577945914119482, 0.030543798580765724, -0.04245587810873985, -0.022888759151101112, -0.039172422140836716, -0.017123617231845856, 0.08376636356115341, 0.024396859109401703, 0.02582859992980957, -0.044479407370090485, -0.020158907398581505, 0.0434485524892807, 0.043715812265872955, -0.03014291077852249, 0.014241046272218227, -0.06173665076494217, 0.036690738052129745, -0.05543699488043785, 0.0775812491774559, 0.02561861090362072, 0.010976677760481834, 0.0033192518167197704, -0.05425342172384262, 0.039286959916353226, 0.05547517165541649, 0.022984208539128304, -0.040470533072948456, -0.021113401278853416, -0.03373180702328682, -0.012026620097458363, -0.006838947534561157, 0.016045039519667625, -0.01816401444375515, -0.07280877977609634, -0.0007647880702279508, 0.05154265835881233, 0.011272570118308067, 0.059942204505205154, -0.01394515298306942, 0.007297104224562645, -0.056696925312280655, -0.0014007195131853223, 0.013353366404771805, -0.03812247887253761, -0.011062582023441792, -0.009478121995925903, 0.006729180458933115, 0.007554817479103804, 0.048488277941942215, 0.001407878240570426, 0.03905788064002991, 0.023957790806889534, -0.025771329179406166, -0.055398814380168915, -0.04657929390668869, -0.017133161425590515, -0.040050555020570755, 0.007106205448508263, -0.026764003559947014, -0.04661747068166733, -0.02519863285124302, -0.02300329878926277, -0.022755129262804985, 0.0008614305406808853, -0.01259931642562151, 0.0393633209168911, 0.04615931585431099, 0.00288972957059741, -0.008642940782010555, 0.019719839096069336, -0.00761685986071825, -0.017362240701913834, -0.012274788692593575, -0.03762613981962204, 0.05459703877568245, -0.03909606114029884, -0.09438033401966095, 0.013868792913854122, -0.003111649537459016, 0.008394772186875343, 0.06704363971948624, 0.004595886915922165, 0.023862341418862343, 0.004614977166056633, -0.05024454742670059, -0.033999066799879074, -0.0037177528720349073, 0.017782216891646385, 0.015214629471302032, 0.007826847955584526, -0.03014291077852249, 0.023824162781238556, -0.020597973838448524, -0.027718497440218925, 0.07926115393638611, 0.041463207453489304, -0.00513040367513895, 0.004371581133455038, -0.007306649349629879, -0.02745123952627182, 0.024912284687161446, -0.025427712127566338, -0.020044367760419846, -0.012561136856675148, -0.038007937371730804, -0.008981785736978054, 0.043410371989011765, -0.053566187620162964, -0.002387427259236574, -0.0531843900680542, 0.02531317248940468, 0.046197496354579926, -0.009148822166025639, 0.036919817328453064, 0.006586006376892328, 0.01824991963803768, 0.03909606114029884, 0.06185119226574898, -0.04944277182221413, -0.08216281980276108, 0.05914042890071869, 0.03686254471540451, -0.05700236186385155, -0.04604477435350418, 0.03762613981962204, 0.00946380477398634, 0.07723762840032578, -0.02323237620294094, 0.017047258093953133, 0.049786392599344254, -0.0442885085940361, -0.011253480799496174, -0.0019292703364044428, -0.029207507148385048, -0.049557313323020935, 0.010613969527184963, -0.04875553771853447, 0.02033071592450142, 0.0011614995310083032, -0.013210192322731018, 0.004820193164050579, 0.008055927231907845, -0.012179339304566383, -0.044059429317712784, 0.04883189871907234, 0.0778866857290268, 0.048373740166425705, -0.050435446202754974, 0.040165092796087265, 0.004848828073590994, -0.007368691265583038, -0.005373799707740545, -0.0016739433631300926, 0.04764832556247711, -0.005058816634118557, -0.0031760777346789837, 0.003538785269483924, -0.00011655262642307207, -0.019108964130282402, 0.02311783656477928, 0.04505210369825363, 0.06097305566072464, -0.0213043000549078, -0.0637601763010025, -0.008829066529870033, -0.06246206909418106, -0.13744708895683289, -0.043410371989011765, 0.007072798442095518, -0.01297156885266304, 0.025122273713350296, -0.01265658624470234, -0.02540862187743187, 0.04573933780193329, 0.013095653615891933, 0.008619078435003757, -0.03197553753852844, -0.012246154248714447, -0.027298519387841225, 0.03468630090355873, -0.025904959067702293, 0.021533377468585968, 0.0369579941034317, 0.009354038164019585, -0.03985965624451637, 0.022869668900966644, 0.004154433961957693, 0.00848544854670763, -0.050855424255132675, -0.058415014296770096, -0.0016023563221096992, -0.03369362652301788, 0.00009977442095987499, 0.020197086036205292, 0.030238360166549683, -0.031708281487226486, -0.04352491348981857, 0.015176449902355671, -0.024282319471240044, 0.0025294083170592785, -0.0019077942706644535, -0.013162467628717422, -0.022125164046883583, 0.0040876190178096294, 0.02346145547926426, -0.03588896244764328, -0.015252809040248394, -0.020674332976341248, 0.03888607397675514, -0.04203590378165245, -0.009043827652931213, -0.014689657837152481, 0.008614305406808853, 0.0629202276468277, -0.11331748962402344, 0.03363635763525963, 0.0005464476416818798, 0.03394179418683052, -0.029360225424170494, 0.009602206759154797, -0.07269424200057983, -0.07196882367134094, 0.003366976510733366, 0.02063615433871746, -0.049022797495126724, 0.009148822166025639, 0.012417962774634361, 0.018612626940011978, -0.05058816447854042, 0.0010380118619650602, 0.057995036244392395, 0.006996438838541508, -0.018087655305862427, 0.008332730270922184, -0.016398200765252113, 0.04688473045825958, 0.019490761682391167, -0.024034151807427406, -0.03726343438029289, -0.03588896244764328, -0.0014830445870757103, -0.01508100051432848, -0.06345473974943161, -0.018125835806131363, -0.025446802377700806, 0.003765477566048503, 0.06505829095840454, 0.002543725771829486, -0.04066143184900284, 0.000827426731120795, -0.03155556321144104, 0.0014842377277091146, 0.024988645687699318, -0.03058197721838951, 0.050091829150915146, -0.0849117562174797, -0.019948918372392654, -0.034533582627773285, -0.05253533273935318, 0.024263229221105576, 0.03544989600777626, -0.048144660890102386, 0.06589824706315994, 0.0019161461386829615, 0.06150757521390915, 0.02529408223927021, -0.02712671086192131, -0.06620368361473083, -0.032032810151576996, 0.04921369627118111, -0.015367348678410053, -0.025007734075188637, -0.01296202465891838, -0.007807758636772633, -0.026840362697839737, 0.04077596962451935, 0.0572696216404438, 0.0029159781988710165, -0.009320630691945553, 0.041654106229543686, -0.04283767566084862, 0.024282319471240044, 0.018221285194158554, 0.017238156870007515, 0.04539572075009346, 0.02195335552096367, 0.01977710984647274, -0.03921060264110565, -0.009917189367115498, -0.020846141502261162, -0.013926062732934952, 0.006657593417912722, -0.030562888830900192, -0.0006323520792648196, -0.006490556988865137, -0.02529408223927021, -0.011835722252726555, -0.026764003559947014, -0.08758433908224106, -0.03285367414355278, -0.05978948622941971, 0.003328796708956361, 0.009439942426979542, -0.018564902245998383, 0.021457018330693245, -0.027718497440218925, -0.03997419402003288, 0.01502373069524765, 0.04486120492219925, 0.03586987406015396, -0.01933804154396057, 0.03644257038831711, 0.04799194261431694, -0.013124288059771061, 0.001333904918283224, 0.02733669988811016, 0.0038132022600620985, 0.004001714754849672, -0.046197496354579926, -0.02260241098701954, 0.016455471515655518, 0.027508508414030075, 0.017238156870007515, -0.0795665979385376, -0.02884479984641075, -0.023366006091237068, 0.008829066529870033, -0.06563098728656769, 0.0031259667593985796, -0.038427915424108505, -0.018097199499607086, 0.0033455004449933767, 0.033369097858667374, 0.03502991795539856, 0.03079196624457836, -0.024683207273483276, 0.026324935257434845, 0.014059691689908504, -0.0130861084908247, 0.012942934408783913, -0.02712671086192131, 0.018240373581647873, -0.0018326279241591692, -0.004560093395411968, -0.016474561765789986, -0.03155556321144104, -0.06933442503213882, 0.04883189871907234, -0.013868792913854122, -0.01728588156402111, 0.027852125465869904, -0.0017538821557536721, -0.050091829150915146, -0.024912284687161446, 0.04596841707825661, -0.012484777718782425, 0.023194197565317154, 0.005846274085342884, 0.027050351724028587, 0.002185790566727519, -0.005808094050735235, 0.005865363869816065, -0.010976677760481834, -0.002219197805970907, 0.050435446202754974, 0.020941590890288353, -0.018564902245998383, 0.016274116933345795, 0.017467234283685684, 0.03426632285118103, 0.009850375354290009, -0.03848518431186676, 0.011014857329428196, 0.04050871357321739, -0.012542047537863255, -0.021533377468585968, 0.03424723446369171, -0.08223917335271835, 0.07059435546398163, 0.05310802906751633, 0.03186099976301193, 0.03882880508899689, 0.0815519392490387, -0.047839224338531494, 0.02323237620294094, -0.08353728801012039, -0.08307912945747375, -0.08544627577066422, -0.013649259693920612, -0.01416468620300293, 0.07765761017799377, 0.03989783674478531, 0.015500977635383606, 0.024568667635321617, 0.05620058998465538, 0.020387984812259674 ]
717,610
pytorch_optimizer.optimizer.qhm
QHM
Quasi-hyperbolic momentum (QHM) optimization algorithm. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param nu: float. immediate discount factor used to estimate the gradient and its square. :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 QHM(Optimizer, BaseOptimizer): r"""Quasi-hyperbolic momentum (QHM) optimization algorithm. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param nu: float. immediate discount factor used to estimate the gradient and its square. :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, momentum: float = 0.0, nu: float = 1.0, 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) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_nus(nu) defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'nu': nu, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, } super().__init__(params, defaults) def __str__(self) -> str: return 'QHM' @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'] = 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 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'] = 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'], ) buf = state['momentum_buffer'] buf.mul_(group['momentum']).add_(grad, alpha=1.0 - group['momentum']) p.add_(buf, alpha=-group['lr'] * group['nu']) p.add_(grad, alpha=-group['lr'] * (1.0 - group['nu'])) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, momentum: float = 0.0, nu: float = 1.0, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ -0.014430105686187744, -0.004012675955891609, -0.035556092858314514, -0.02532789297401905, -0.007045229896903038, -0.0045561096630990505, -0.0636981949210167, -0.021543266251683235, -0.024415701627731323, 0.014536852017045021, -0.004587647970765829, 0.027870386838912964, 0.040020011365413666, 0.057371072471141815, -0.06932661682367325, 0.09184029698371887, 0.02026231400668621, -0.0050122058019042015, 0.004376582335680723, -0.01833118312060833, -0.0049200160428881645, -0.07161679863929749, 0.018525267019867897, 0.10713407397270203, -0.04106806218624115, -0.04828796908259392, 0.008166061714291573, -0.018952250480651855, -0.0737905353307724, -0.024997951462864876, -0.03708935156464577, -0.02181498147547245, 0.0014107442693784833, 0.039010778069496155, 0.029190154746174812, -0.04844323545694351, 0.054809171706438065, 0.014333064667880535, -0.09316006302833557, -0.010160270147025585, 0.029481278732419014, -0.02431865967810154, 0.03831207752227783, -0.05150975286960602, 0.009917665272951126, 0.0038840954657644033, 0.016827037557959557, 0.08073872327804565, 0.004738062620162964, -0.0184476338326931, 0.05209200456738472, -0.06043759360909462, 0.00951008964329958, -0.02748221904039383, -0.056827642023563385, 0.01371199730783701, 0.07460568845272064, -0.03575017675757408, 0.02587132714688778, -0.02144622430205345, -0.004708950407803059, -0.03767160326242447, 0.04161149635910988, -0.0007842185441404581, -0.018894026055932045, -0.032935965806245804, -0.0336734838783741, -0.014595077373087406, 0.019524797797203064, 0.00661824643611908, 0.020398173481225967, -0.007137419655919075, 0.023678183555603027, 0.022397233173251152, -0.007030673790723085, -0.04995708540081978, -0.08260192722082138, -0.058147408068180084, -0.04642476513981819, -0.020359355956315994, 0.039787109941244125, 0.013449984602630138, -0.04463919997215271, -0.060049425810575485, -0.02002941444516182, -0.048171516507864, 0.037710417062044144, -0.0005607192870229483, 0.03652650862932205, -0.06622128188610077, 0.00032236051629297435, -0.002045154571533203, 0.01629330776631832, 0.031033946201205254, 0.10255370289087296, 0.02884080447256565, -0.04506618157029152, -0.03481857478618622, -0.030296429991722107, -0.026919377967715263, -0.02777334488928318, 0.05050051957368851, 0.02897666208446026, 0.07460568845272064, 0.00852026417851448, -0.03252838924527168, -0.040252912789583206, -0.05574077367782593, 0.03540082648396492, -0.09525616466999054, -0.032392531633377075, 0.02915133722126484, -0.06276659667491913, -0.01936952956020832, 0.008631862699985504, 0.0320625901222229, 0.0014374307356774807, 0.03439158946275711, 0.031616196036338806, 0.03516792505979538, 0.020223498344421387, 0.013255900703370571, -0.05310123786330223, -0.005555639509111643, 0.01645827852189541, -0.007171384058892727, 0.030742822214961052, 0.015846915543079376, -0.0005067398305982351, -0.04999590292572975, -0.020883381366729736, 0.026899969205260277, 0.0021676698233932257, 0.004112143535166979, 0.01308122556656599, -0.011819683015346527, -0.02544434368610382, 0.006938484031707048, 0.022494275122880936, 0.03798213601112366, 0.019747992977499962, 0.022901849821209908, -0.04207729548215866, 0.016050703823566437, 0.013896376825869083, 0.0019347695633769035, 0.046230681240558624, 0.015419932082295418, -0.013352942653000355, -0.005560491234064102, -0.006962744519114494, 0.02812269516289234, 0.05946717411279678, 0.023717001080513, 0.010509620420634747, -0.01174204982817173, -0.016225378960371017, -0.010218494571745396, -0.05189792066812515, -0.0034037388395518064, -0.019359827041625977, -0.031247438862919807, -0.007588663604110479, 0.013255900703370571, -0.04126214608550072, 0.00291367806494236, -0.00003612530417740345, -0.022494275122880936, -0.022319599986076355, 0.060592859983444214, 0.010732815600931644, -0.05721580609679222, 0.0035420232452452183, 0.01876787096261978, 0.0017042955150827765, 0.08438749611377716, 0.009257781319320202, 0.0019505388336256146, -0.006055404432117939, -0.06140800938010216, 0.02728813700377941, -0.009956481866538525, -0.05131566897034645, -0.07782746851444244, -0.025541385635733604, 0.03456626459956169, -0.020766930654644966, -0.024299250915646553, -0.012557200156152248, 0.03798213601112366, -0.016652362421154976, -0.04984063655138016, 0.021252140402793884, -0.008665827102959156, 0.011625600047409534, 0.011431516148149967, 0.05795332416892052, 0.017807157710194588, 0.07837090641260147, 0.02878257818520069, 0.030005304142832756, 0.0072684260085225105, 0.03862261027097702, 0.023095933720469475, 0.002760837320238352, -0.03313004970550537, -0.02008763886988163, 0.03452745079994202, -0.026977602392435074, -0.00718108844012022, -0.0616409108042717, -0.011897317133843899, 0.003284862730652094, 0.060709308832883835, 0.02748221904039383, 0.009427604265511036, -0.006453275214880705, 0.030082937330007553, 0.04044699668884277, -0.030956313014030457, 0.03402283415198326, -0.04417339712381363, 0.009752694517374039, 0.03666236624121666, 0.055934857577085495, -0.006724992301315069, 0.034663308411836624, -0.010956011712551117, 0.010208790190517902, -0.0009619261836633086, 0.04852086678147316, -0.037458110600709915, 0.015982773154973984, -0.022901849821209908, 0.023872267454862595, 0.03831207752227783, -0.053140055388212204, 0.028996070846915245, -0.011043349280953407, 0.0015999756287783384, -0.026414761319756508, -0.037458110600709915, -0.012557200156152248, 0.02222255803644657, -0.003022850025445223, -0.016400054097175598, 0.07223787158727646, 0.03027702122926712, -0.01701141707599163, 0.032508980482816696, -0.06109747663140297, -0.03332413360476494, -0.026744702830910683, 0.024765050038695335, -0.012702763080596924, 0.0029306604992598295, 0.02383344992995262, 0.02092219889163971, -0.01709875464439392, -0.05500325560569763, -0.042232561856508255, -0.05279070511460304, -0.03344058245420456, 0.07274248450994492, -0.02008763886988163, 0.017739228904247284, 0.017516033723950386, -0.002057284815236926, -0.02259131520986557, 0.03749692812561989, 0.06905490159988403, 0.019845034927129745, -0.06936543434858322, -0.012974480167031288, -0.022804807871580124, 0.03064578026533127, 0.010810449719429016, 0.0017916330834850669, -0.042349014431238174, 0.001030461979098618, 0.01254749670624733, -0.04871495068073273, 0.0018134674755856395, -0.005017057526856661, -0.023503508418798447, 0.09587723761796951, -0.040252912789583206, 0.0003878636925946921, 0.06230079382658005, 0.021562673151493073, 0.031557973474264145, -0.013653771951794624, 0.06284423172473907, -0.005987475160509348, 0.11280131340026855, 0.014934723265469074, -0.02897666208446026, 0.04673530161380768, 0.023154158145189285, -0.003078649053350091, 0.06012706086039543, 0.022668950259685516, 0.005235401447862387, 0.005817652214318514, -0.030548738315701485, -0.04254309833049774, 0.01913662999868393, 0.015516973100602627, 0.037399884313344955, -0.005807947833091021, 0.004594926256686449, -0.007447953335940838, -0.001496868790127337, 0.022901849821209908, 0.017972130328416824, -0.044910915195941925, -0.004216463305056095, -0.0033624961506575346, 0.02730754390358925, 0.043125346302986145, -0.03503206744790077, 0.04382404685020447, 0.02468741685152054, -0.004182498902082443, -0.07084047049283981, -0.06490151584148407, -0.028452636674046516, 0.008903578855097294, -0.06490151584148407, -0.04700701683759689, -0.03392579033970833, 0.012392229400575161, 0.03765219449996948, 0.0317714661359787, -0.043358247727155685, -0.021950840950012207, 0.06886081397533417, 0.06870555132627487, -0.013469393365085125, -0.06098102778196335, 0.08399932831525803, 0.04588133096694946, -0.007103455252945423, 0.04215493053197861, -0.015992477536201477, -0.0629606768488884, -0.000841230561491102, 0.01790419965982437, 0.0221061073243618, 0.0032654544338583946, -0.003699716180562973, -0.008670679293572903, 0.027753936126828194, 0.05399402230978012, 0.08539672940969467, -0.013382055796682835, -0.013149155303835869, -0.027132868766784668, 0.029190154746174812, -0.032101407647132874, 0.007588663604110479, 0.0068365903571248055, -0.046463582664728165, 0.07608071714639664, 0.033712297677993774, -0.02812269516289234, -0.001302785356529057, 0.004075753036886454, 0.02132977358996868, -0.04021409526467323, -0.02497854270040989, -0.0859401598572731, -0.0155557906255126, 0.018078874796628952, -0.04673530161380768, 0.005895285401493311, -0.04953010007739067, 0.020902790129184723, -0.0013937619514763355, 0.0007363041513599455, 0.081980861723423, -0.029481278732419014, 0.02002941444516182, -0.009995298460125923, -0.0030325541738420725, -0.02484268508851528, 0.0054780058562755585, 0.004114569630473852, 0.06598837673664093, -0.030199388042092323, 0.04374641552567482, -0.0010189382592216134, -0.006933631841093302, 0.007928309962153435, -0.0874151960015297, 0.05830267444252968, 0.06952069699764252, 0.030296429991722107, -0.08865732699632645, -0.041223328560590744, 0.004199481103569269, -0.060165874660015106, -0.014032235369086266, 0.019505389034748077, -0.0006647359114140272, -0.0758478194475174, 0.030781637877225876, 0.09851676970720291, 0.017778046429157257, 0.0794965922832489, 0.002206486416980624, -0.02831677906215191, -0.04716228321194649, 0.04199966415762901, -0.01893284171819687, -0.057487525045871735, 0.0118585005402565, -0.057836875319480896, 0.015643127262592316, 0.08244665712118149, 0.04428984969854355, -0.00018892812659032643, 0.05209200456738472, 0.022901849821209908, 0.013954601250588894, 0.00320237735286355, -0.06579429656267166, 0.007118011359125376, -0.02622067742049694, -0.004420251119881868, -0.01251838356256485, -0.004478476010262966, -0.03547845780849457, -0.005783687345683575, -0.028801986947655678, -0.003626934951171279, 0.007035525981336832, 0.04316416382789612, 0.01701141707599163, -0.010742519982159138, 0.019204558804631233, -0.025735467672348022, 0.0028311926871538162, -0.01608951948583126, -0.00437415624037385, -0.03765219449996948, 0.05799214169383049, -0.012227258644998074, -0.06377582997083664, 0.023872267454862595, 0.019204558804631233, 0.020941605791449547, 0.0008375914767384529, -0.012178737670183182, 0.04161149635910988, -0.010519323870539665, 0.0026298309676349163, -0.0023581141140311956, -0.00446149380877614, -0.03945716843008995, 0.027132868766784668, 0.05457627400755882, -0.003716698382049799, 0.0030568146612495184, -0.02938423678278923, 0.02532789297401905, 0.07864262163639069, -0.03998119384050369, -0.016555320471525192, 0.004747767001390457, -0.0038671132642775774, 0.022144924849271774, -0.0018547101644799113, -0.02066989056766033, -0.05306242033839226, -0.013120043091475964, -0.04937483370304108, 0.016992008313536644, 0.008617306128144264, -0.04017527773976326, 0.07285893708467484, -0.06167972832918167, 0.04153386130928993, 0.059932976961135864, 0.022552499547600746, 0.012450454756617546, 0.024008125066757202, -0.014595077373087406, 0.037050534039735794, 0.003575987881049514, -0.03708935156464577, -0.023387057706713676, 0.060942210257053375, 0.010810449719429016, 0.0019226394360885024, -0.007661445066332817, 0.016400054097175598, 0.016594136133790016, 0.08469802886247635, -0.0018874617526307702, 0.006482387892901897, 0.017166683450341225, -0.05535260587930679, 0.0004375975695438683, 0.048171516507864, -0.0195442046970129, 0.0068365903571248055, 0.02592955157160759, -0.05527497082948685, 0.004281966481357813, -0.016497094184160233, -0.03056814707815647, -0.0011942198034375906, 0.008724052459001541, -0.01358584314584732, -0.029655953869223595, -0.05077223479747772, 0.06241724267601967, 0.04285363107919693, -0.029345421120524406, 0.033459991216659546, 0.05073342099785805, -0.030432287603616714, -0.03427514061331749, -0.0032266376074403524, 0.017108457162976265, -0.03130566328763962, -0.04972418397665024, 0.07052993029356003, 0.02532789297401905, 0.011324770748615265, -0.025948960334062576, -0.00025261176051571965, 0.07879789173603058, -0.00445421552285552, -0.017059937119483948, -0.001569650019519031, -0.0629606768488884, -0.07095691561698914, -0.039185453206300735, -0.007229609414935112, 0.0428924486041069, 0.028045061975717545, -0.015895435586571693, 0.006943336222320795, 0.06191262602806091, 0.001767372596077621, 0.05554668977856636, -0.05345058813691139, 0.00651150057092309, -0.06990886479616165, -0.009189852513372898, -0.03772982582449913, 0.0379239097237587, 0.03285833075642586, -0.021543266251683235, -0.007525586523115635, 0.023231791332364082, 0.02955891191959381, 0.03330472484230995, -0.02544434368610382, -0.04444511607289314, 0.003743384964764118, -0.022746583446860313, -0.017603371292352676, 0.01824384555220604, 0.005521674640476704, -0.028937846422195435, -0.030063530430197716, 0.07988476008176804, -0.005303330719470978, 0.002298676175996661, 0.02986944653093815, 0.015206440351903439, -0.04809388518333435, -0.013954601250588894, 0.026298310607671738, -0.023581141605973244, 0.016943486407399178, -0.03790450096130371, 0.03134448081254959, -0.019301600754261017, -0.028103286400437355, -0.03749692812561989, 0.022960074245929718, 0.025657834485173225, -0.05721580609679222, 0.03672059252858162, -0.003753089113160968, 0.014206910505890846, -0.0019869294483214617, 0.013595547527074814, 0.005807947833091021, -0.05185910314321518, 0.028045061975717545, 0.007734226528555155, -0.0790696069598198, -0.029539505019783974, 0.0317714661359787, 0.03571135923266411, -0.04017527773976326, -0.0035250410437583923, 0.035129107534885406, -0.013682885095477104, 0.003675455693155527, -0.0016666918527334929, -0.013644068501889706, 0.02622067742049694, 0.009932221844792366, -0.06556139886379242, -0.014624189585447311, -0.021795574575662613, 0.003522614948451519, 0.03456626459956169, -0.05267425253987312, -0.005395520478487015, -0.027967428788542747, 0.005060726311057806, 0.07639125734567642, -0.020902790129184723, -0.016390349715948105, -0.028336185961961746, -0.007549847010523081, 0.002787523902952671, -0.037632785737514496, -0.028801986947655678, 0.027967428788542747, -0.09719700366258621, -0.03652650862932205, -0.022494275122880936, 0.0028991219587624073, 0.009495534002780914, 0.025017360225319862, 0.0015878453850746155, 0.0027899499982595444, -0.013828447088599205, 0.017477216199040413, 0.019408347085118294, -0.0301605723798275, -0.05484798923134804, -0.014905611053109169, 0.04021409526467323, -0.008889023214578629, -0.030354654416441917, -0.03485739231109619, 0.009228669106960297, 0.0054780058562755585, 0.004721080418676138, 0.03666236624121666, 0.02026231400668621, -0.010596957989037037, 0.023348242044448853, -0.04805506765842438, 0.021892614662647247, 0.017719820141792297, -0.015992477536201477, 0.017710117623209953, 0.0008594258688390255, 0.028646720573306084, -0.045027364045381546, 0.01565283164381981, -0.005837060511112213, -0.010994828306138515, 0.017079345881938934, -0.041883211582899094, 0.0037773496005684137, -0.021562673151493073, -0.013003592379391193, 0.0042019071988761425, -0.018864912912249565, -0.04929720237851143, -0.015322890132665634, -0.05574077367782593, -0.019680064171552658, -0.022960074245929718, 0.014701822772622108, 0.017972130328416824, -0.017778046429157257, -0.03848675265908241, -0.025114400312304497, 0.09595486521720886, 0.004992797505110502, -0.012838621623814106, 0.03134448081254959, 0.056478291749954224, -0.002549771685153246, -0.03928249329328537, 0.020728114992380142, -0.013246197253465652, -0.043358247727155685, -0.039612434804439545, 0.008704643696546555, -0.0014168093912303448, 0.0068123298697173595, 0.05116040259599686, -0.07417870312929153, -0.050384070724248886, -0.029947079718112946, 0.05985534191131592, -0.07208260148763657, 0.017778046429157257, 0.013896376825869083, -0.03749692812561989, -0.019301600754261017, 0.016875557601451874, 0.06742459535598755, -0.0009340267279185355, 0.001787993940524757, 0.004536701366305351, -0.0035808400716632605, 0.021853799000382423, 0.02121332287788391, 0.0003350972547195852, -0.018855208531022072, 0.07654651999473572, -0.012596017681062222, 0.01784597523510456, -0.007962274365127087, 0.005235401447862387, 0.03332413360476494, -0.00843292661011219, -0.006501796189695597, -0.013682885095477104, -0.0012554774293676019, -0.039127226918935776, -0.044794466346502304, 0.0004897575126960874, -0.024046942591667175, 0.024765050038695335, -0.009078253991901875, 0.02037876471877098, 0.013488801196217537, -0.0032897149212658405, 0.0021167227532714605, 0.056944090873003006, 0.007025821600109339, 0.05484798923134804, 0.008767721243202686, 0.0045561096630990505, 0.08485329151153564, -0.018224438652396202, 0.06843382865190506, -0.011557670310139656, -0.029830629006028175, 0.03873905912041664, -0.0032945668790489435, 0.002610422670841217, -0.010587253607809544, 0.0409904308617115, -0.04126214608550072, 0.05706053972244263, -0.02449333481490612, 0.010587253607809544, 0.011538262479007244, 0.08780336380004883, -0.04976300150156021, -0.01168382540345192, -0.027210501953959465, -0.07708995789289474, -0.08120452612638474, -0.02783156931400299, -0.03179087117314339, 0.09184029698371887, 0.028530269861221313, -0.04106806218624115, -0.008806537836790085, 0.03582780808210373, 0.016448574140667915 ]
717,612
pytorch_optimizer.optimizer.qhm
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, momentum: float = 0.0, nu: float = 1.0, 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) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_nus(nu) defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'nu': nu, '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, momentum: float = 0.0, nu: float = 1.0, weight_decay: float = 0.0, weight_decouple: bool = False, fixed_decay: bool = False)
[ 0.013158178888261318, 0.007473289500921965, -0.005967511795461178, 0.0009503772598691285, -0.03018967993557453, -0.008399921469390392, -0.07991276681423187, -0.021516401320695877, -0.030022885650396347, 0.037139423191547394, -0.012074018828570843, 0.056635767221450806, 0.03339582681655884, 0.0643824115395546, -0.02792869694530964, 0.051075972616672516, 0.0017524933209642768, 0.015623020939528942, -0.02299901284277439, 0.003602283075451851, -0.0041883778758347034, -0.02092335745692253, -0.01166630070656538, 0.12164828926324844, -0.0053327688947319984, 0.006810747552663088, -0.03076419234275818, 0.007788344286382198, -0.04173551872372627, -0.006963641848415136, -0.0023629122879356146, -0.0028123289812356234, -0.0033474592491984367, 0.09333040565252304, 0.03880736231803894, -0.017633812502026558, -0.017911802977323532, 0.012889455072581768, -0.0839158222079277, 0.0403641015291214, 0.04666520282626152, -0.029374243691563606, 0.06801480799913406, -0.025890106335282326, -0.011026924476027489, 0.0062964665703475475, 0.03673170506954193, 0.04392237216234207, -0.020793627947568893, -0.02605690062046051, 0.02487081103026867, -0.010192954912781715, 0.01982993073761463, -0.03958573192358017, -0.04403356835246086, 0.022276239469647408, 0.0621584951877594, 0.035823605954647064, 0.024240700528025627, 0.013621495105326176, -0.00847405195236206, -0.037899259477853775, 0.005304969847202301, -0.020589768886566162, -0.010109558701515198, -0.016484787687659264, -0.07791124284267426, -0.02550092153251171, 0.05329988896846771, 0.038770295679569244, 0.11253022402524948, -0.007088737096637487, -0.004081815481185913, 0.021627597510814667, 0.018699439242482185, -0.013380570337176323, -0.08080233633518219, -0.05974924936890602, -0.03741741180419922, -0.011036190204322338, 0.03606452792882919, 0.03465604782104492, -0.028707068413496017, -0.02311020903289318, 0.026798205450177193, -0.03087538853287697, -0.05170608311891556, -0.056413374841213226, 0.02083069458603859, 0.027002064511179924, -0.05822957307100296, -0.006727350410073996, -0.005670989863574505, -0.03465604782104492, 0.08977213501930237, 0.024815212935209274, 0.009674041531980038, -0.04284747689962387, 0.019218353554606438, -0.020237648859620094, -0.023369666188955307, 0.011369777843356133, -0.04088301584124565, 0.0014362800866365433, 0.017096366733312607, -0.0457756370306015, -0.056561633944511414, -0.027724837884306908, 0.029707832261919975, -0.05626511201262474, -0.03704676032066345, 0.051409561187028885, -0.044960200786590576, 0.02225770801305771, -0.058711420744657516, 0.04614628851413727, 0.034174200147390366, 0.01984846405684948, 0.019996725022792816, 0.014140408486127853, 0.027298588305711746, 0.033951807767152786, -0.044330090284347534, 0.03510083258152008, 0.037695400416851044, -0.02246156707406044, -0.0019239203538745642, 0.013232309371232986, 0.04021584242582321, -0.02607543207705021, 0.019996725022792816, -0.008571349084377289, -0.02757657691836357, -0.0158083476126194, 0.011916491203010082, -0.03208000957965851, -0.0012440038844943047, 0.0457756370306015, -0.040327038615942, 0.026575814932584763, 0.056561633944511414, 0.03988225385546684, 0.038436707109212875, 0.015280166640877724, -0.0223689042031765, 0.025334127247333527, -0.033303163945674896, 0.008399921469390392, -0.012880189344286919, 0.03476724401116371, 0.001140916021540761, 0.030782725661993027, 0.012389074079692364, 0.0365278460085392, 0.011981355957686901, -0.03291397914290428, 0.012620732188224792, -0.011721898801624775, 0.0007586801657453179, 0.029707832261919975, -0.030263811349868774, 0.0326915867626667, 0.019459277391433716, -0.02333260141313076, -0.014872448518872261, 0.007945871911942959, -0.03502669930458069, -0.02846614457666874, 0.006755149457603693, 0.006870978511869907, -0.00833969097584486, -0.09859367460012436, -0.002009633695706725, 0.019125690683722496, 0.01003542821854353, 0.0556350015103817, 0.02585304155945778, -0.008242393843829632, -0.02692793495953083, -0.0018926464254036546, 0.07287036627531052, -0.007853209041059017, -0.02203531563282013, -0.07761472463607788, 0.03367381915450096, 0.037769533693790436, -0.05689522251486778, 0.044552478939294815, -0.035156428813934326, 0.020663900300860405, 0.07865254580974579, 0.0223689042031765, -0.0012532701948657632, 0.025797443464398384, -0.011165918782353401, 0.008548183366656303, 0.06416001915931702, -0.008640846237540245, -0.004999181255698204, 0.040327038615942, 0.08576908707618713, 0.02288781851530075, 0.0103597491979599, -0.014742719940841198, 0.01222227979451418, -0.023388199508190155, -0.030708594247698784, 0.00755668617784977, -0.032228272408246994, -0.02902212366461754, 0.008622313849627972, -0.00648642610758543, 0.05967511981725693, 0.037584204226732254, -0.005411532707512379, -0.0458126999437809, -0.025259995833039284, 0.014057012274861336, 0.020756563171744347, -0.029188917949795723, 0.10674803704023361, -0.022702490910887718, 0.005073311738669872, -0.0046215783804655075, 0.04992694780230522, 0.013612228445708752, 0.032765716314315796, -0.06404882669448853, -0.07298155874013901, 0.05693228915333748, -0.01593807525932789, -0.07231438159942627, -0.03291397914290428, 0.00045897255768068135, 0.05274391174316406, -0.0020548070315271616, -0.029930222779512405, 0.049222707748413086, -0.0708317756652832, -0.01750408485531807, 0.016799842938780785, 0.02290634997189045, 0.0038084588013589382, -0.015576688572764397, 0.0256306491792202, 0.020663900300860405, 0.046628136187791824, 0.023703254759311676, -0.05263271555304527, -0.01205548644065857, -0.031357236206531525, -0.015067040920257568, -0.0084601528942585, 0.06119479611515999, -0.030801257118582726, 0.02757657691836357, 0.02312874235212803, -0.005578326527029276, 0.005777552258223295, -0.004174478352069855, -0.022165045142173767, 0.0040169511921703815, -0.0015497924759984016, 0.09169953316450119, 0.01750408485531807, -0.0045404983684420586, -0.008719610050320625, -0.011758963577449322, 0.0025412889663130045, 0.0011183293536305428, 0.11846067011356354, 0.01265779696404934, 0.011175185441970825, 0.00992423202842474, -0.007070204243063927, -0.054041195660829544, 0.003514253068715334, -0.036249853670597076, -0.02168319560587406, 0.05574619770050049, 0.01325084175914526, -0.04229149967432022, 0.017902536317706108, -0.005712687969207764, -0.004341272171586752, 0.009674041531980038, -0.01373269036412239, 0.021423738449811935, -0.017040768638253212, 0.0128153245896101, -0.00409108167514205, -0.003602283075451851, 0.08421234041452408, 0.02474108152091503, 0.09822302311658859, -0.016660848632454872, 0.028725601732730865, 0.017893269658088684, 0.06638393551111221, -0.011981355957686901, 0.04659107327461243, -0.02585304155945778, 0.028707068413496017, -0.01629946194589138, -0.02703913114964962, -0.04888911917805672, 0.028317883610725403, 0.021775858476758003, 0.038547903299331665, 0.05622804909944534, 0.03793632611632347, 0.013065515086054802, 0.02713179402053356, 0.03869616612792015, 0.027947230264544487, -0.061973169445991516, 0.003928920719772577, -0.0343780592083931, 0.04644281044602394, 0.05422652140259743, 0.016660848632454872, 0.028392013162374496, -0.0005455547361634672, -0.01003542821854353, -0.07724406570196152, -0.0501493401825428, 0.004698025528341532, 0.03187615051865578, -0.041476059705019, 0.002983755897730589, -0.028855329379439354, 0.00029073088080622256, 0.00612967275083065, -0.02375885285437107, -0.05897087976336479, -0.013167444616556168, 0.02116428129374981, 0.050557058304548264, 0.0031250673346221447, -0.028206687420606613, 0.08206255733966827, -0.00042827785364352167, -0.017355822026729584, 0.03667610511183739, -0.02703913114964962, -0.05137249454855919, 0.004473317414522171, -0.030078483745455742, 0.04058649390935898, -0.012963585555553436, -0.014196006581187248, 0.016558919101953506, -0.013426901772618294, 0.07479775696992874, 0.04829607531428337, -0.029429841786623, -0.022813687101006508, -0.019551942124962807, 0.03663904219865799, -0.05507902428507805, -0.04862966388463974, -0.0020756563171744347, -0.01696663722395897, 0.04840727150440216, 0.02867000363767147, -0.018032263964414597, 0.01775427535176277, -0.014335001818835735, 0.025352658703923225, 0.005513462238013744, 0.0049296836368739605, -0.0741676464676857, -0.019681669771671295, -0.016067804768681526, 0.006393762771040201, -0.013278640806674957, -0.03319196775555611, 0.008728875778615475, 0.037232086062431335, -0.018495580181479454, 0.0020976639352738857, -0.005128909833729267, 0.04881498962640762, 0.01601220667362213, -0.0009712264873087406, -0.03346996009349823, -0.0075242542661726475, 0.030819790437817574, 0.05722881108522415, -0.0026710175443440676, 0.007853209041059017, 0.00043204231769777834, 0.02409243956208229, -0.024611353874206543, -0.05800718069076538, 0.050964776426553726, 0.041290733963251114, 0.03806605562567711, -0.058859683573246, -0.03597186505794525, -0.0218129251152277, -0.07650276273488998, -0.01563228666782379, 0.04622041806578636, -0.005995310842990875, 0.002698816591873765, 0.01574348285794258, 0.05189140886068344, 0.016957370564341545, 0.06352990865707397, 0.005708055105060339, -0.031208975240588188, -0.023795917630195618, 0.008923469111323357, -0.0256306491792202, -0.052299126982688904, 0.00948871485888958, -0.04173551872372627, 0.028521742671728134, -0.008108032867312431, 0.029967287555336952, -0.0004969065776094794, 0.07716993987560272, 0.037899259477853775, 0.07020166516304016, 0.0447007417678833, -0.004364437889307737, 0.029374243691563606, -0.0053327688947319984, -0.03554561361670494, -0.057414136826992035, 0.017559681087732315, -0.0343409925699234, -0.044774871319532394, 0.025445323437452316, 0.0011582904262468219, 0.007408425211906433, 0.010860130190849304, 0.006616154685616493, -0.014807583764195442, 0.02311020903289318, -0.06679165363311768, 0.021775858476758003, -0.02891092747449875, -0.051075972616672516, -0.018143460154533386, 0.009169026277959347, -0.0043227397836744785, -0.05607978627085686, -0.010591407306492329, 0.02049710601568222, 0.004985281731933355, 0.023369666188955307, -0.03206147626042366, -0.009104162454605103, -0.032228272408246994, -0.025222931057214737, -0.015576688572764397, 0.0468875952064991, -0.04284747689962387, 0.04570150375366211, -0.002657118020579219, -0.013825354166328907, -0.0299858208745718, -0.06297393143177032, 0.018124926835298538, 0.06630980968475342, -0.027317119762301445, -0.022739555686712265, 0.0033474592491984367, 0.009627709165215492, 0.012880189344286919, 0.02737271785736084, -0.045516178011894226, -0.05411532521247864, 0.025815974920988083, -0.016484787687659264, -0.024055374786257744, 0.0024648418184369802, -0.03747301176190376, 0.008789107203483582, -0.04647987708449364, 0.017633812502026558, 0.08139538019895554, 0.00605090893805027, -0.0196260716766119, -0.06019403412938118, -0.005434698425233364, 0.011212251149117947, 0.03213560953736305, -0.07939385622739792, -0.003780659753829241, 0.029392777010798454, 0.049889881163835526, -0.008770574815571308, -0.00847405195236206, 0.00997056346386671, 0.015660086646676064, 0.051075972616672516, 0.022276239469647408, 0.012435405515134335, -0.018514113500714302, -0.023202871903777122, -0.0012347375741228461, 0.022090913727879524, -0.02355499379336834, -0.08888257294893265, 0.029911691322922707, -0.030171146616339684, -0.009609176777303219, -0.015067040920257568, 0.020793627947568893, -0.012565134093165398, 0.01614193432033062, -0.05530141666531563, -0.033859144896268845, -0.057636529207229614, 0.062084365636110306, -0.006796848028898239, -0.03345142677426338, 0.050001077353954315, 0.04862966388463974, 0.02409243956208229, -0.051965538412332535, 0.019978191703557968, 0.041476059705019, -0.0030300875660032034, -0.06564263254404068, 0.07557612657546997, 0.03117191046476364, -0.008172896690666676, -0.046072158962488174, -0.03862203285098076, 0.04054943099617958, -0.020107921212911606, 0.003931237384676933, 0.03471164405345917, -0.029967287555336952, -0.05278097465634346, -0.038770295679569244, 0.011740431189537048, 0.029967287555336952, 0.03454485163092613, -0.02965223416686058, -0.003602283075451851, 0.0047188750468194485, -0.02094189077615738, 0.058192506432533264, -0.06315925717353821, 0.006180637516081333, -0.025037605315446854, -0.03398887440562248, -0.06953448802232742, 0.022869285196065903, 0.01931101642549038, 0.00002164555189665407, 0.019459277391433716, -0.01182382833212614, 0.05759946256875992, 0.04014171287417412, -0.036694638431072235, -0.029596636071801186, -0.01222227979451418, 0.02364765666425228, -0.029170384630560875, 0.006092607509344816, -0.0010256661335006356, -0.05333695560693741, -0.07361166924238205, 0.03500816971063614, 0.00992423202842474, -0.00575438654050231, 0.019459277391433716, 0.02105308510363102, -0.051520757377147675, 0.0062871999107301235, 0.006264034193009138, 0.0250746700912714, -0.022535696625709534, -0.058933813124895096, -0.002643218729645014, -0.007264797110110521, -0.06853372603654861, -0.0817660316824913, 0.030004354193806648, -0.006875611841678619, -0.05026053637266159, 0.009145860560238361, -0.014140408486127853, -0.009525779634714127, 0.02168319560587406, 0.009396051056683064, -0.02190558798611164, -0.0316537581384182, -0.05385586991906166, 0.016484787687659264, -0.041401930153369904, -0.028540274128317833, 0.05285510793328285, 0.060898274183273315, -0.07724406570196152, -0.015224568545818329, 0.02694646641612053, -0.008233128115534782, -0.002228550612926483, -0.02225770801305771, -0.006250134669244289, 0.0468875952064991, 0.016243863850831985, -0.05463423952460289, 0.008075600489974022, -0.03315490484237671, -0.021627597510814667, -0.03259892389178276, 0.0005649561062455177, -0.03858496993780136, -0.04644281044602394, 0.028188154101371765, 0.07272209972143173, -0.02746538072824478, -0.015409895218908787, -0.04069769009947777, -0.009609176777303219, 0.030801257118582726, -0.08643626421689987, 0.012768993154168129, -0.008423087187111378, -0.11275261640548706, 0.0023814449086785316, -0.02891092747449875, 0.026964999735355377, -0.02114574983716011, -0.02029324695467949, -0.03906681761145592, 0.00662542087957263, 0.018764303997159004, 0.01079526636749506, 0.010915728285908699, 0.044218894094228745, -0.012963585555553436, 0.021627597510814667, 0.057858921587467194, 0.0012115717399865389, -0.01598440669476986, -0.040734756737947464, -0.02857734076678753, -0.009016131982207298, 0.0014432298485189676, 0.05444891378283501, 0.02811402454972267, -0.029689298942685127, 0.050445862114429474, -0.03228386864066124, 0.024907875806093216, 0.003173715667799115, -0.0100817596539855, 0.01177749689668417, 0.007111902814358473, 0.04892618581652641, -0.032654523849487305, -0.018968163058161736, -0.002060598460957408, 0.03413713350892067, 0.024685483425855637, 0.00992423202842474, -0.007366726640611887, -0.036138661205768585, -0.03043060377240181, -0.01679057627916336, -0.02170172892510891, -0.03259892389178276, -0.018291721120476723, -0.006528124678879976, 0.02496347390115261, 0.03398887440562248, 0.023480862379074097, -0.05155782029032707, -0.020756563171744347, 0.015345030464231968, -0.0009619601769372821, 0.06482719630002975, 0.027558043599128723, -0.0037945592775940895, -0.04173551872372627, 0.019922593608498573, -0.011629234999418259, -0.07487189024686813, 0.0392521433532238, -0.009308021515607834, -0.018069330602884293, -0.04344052076339722, 0.009840834885835648, 0.0025945703964680433, -0.003711162367835641, 0.033859144896268845, -0.05530141666531563, -0.09192192554473877, -0.047925423830747604, 0.019255418330430984, -0.0250746700912714, -0.011267848312854767, 0.002659434685483575, -0.0621584951877594, 0.05430065095424652, 0.011647768318653107, 0.043885305523872375, -0.0020524905994534492, -0.013649294152855873, -0.0029814394656568766, -0.04336639121174812, 0.04414476081728935, 0.04529378563165665, 0.039956383407115936, -0.07865254580974579, -0.01984846405684948, 0.03771393373608589, 0.04992694780230522, -0.006699551362544298, -0.043032802641391754, -0.0003101322508882731, -0.01199062168598175, -0.03660197556018829, 0.00870571006089449, 0.001468712231144309, 0.010582140646874905, -0.056413374841213226, -0.042476825416088104, 0.013695625588297844, 0.020756563171744347, -0.0381772518157959, 0.046516939997673035, 0.022850751876831055, -0.023369666188955307, 0.0016772045055404305, 0.030245278030633926, -0.02201678417623043, 0.02987462468445301, 0.022313306108117104, 0.029429841786623, 0.06249208375811577, -0.002439359435811639, 0.04158725589513779, -0.05878555402159691, 0.007250897586345673, -0.02333260141313076, 0.06297393143177032, -0.005189140792936087, -0.04492313414812088, 0.07813363522291183, -0.0055551608093082905, -0.01351956557482481, -0.029355710372328758, 0.007320395205169916, 0.02464841865003109, 0.029689298942685127, -0.037788063287734985, 0.011360512115061283, -0.02388858050107956, -0.08443473279476166, -0.08517604321241379, -0.0023814449086785316, -0.05474543571472168, 0.08139538019895554, 0.030375007539987564, -0.001849789754487574, 0.03150549903512001, 0.05574619770050049, 0.017846938222646713 ]
717,615
pytorch_optimizer.optimizer.qhm
__str__
null
def __str__(self) -> str: return 'QHM'
(self) -> str
[ 0.0026396354660391808, -0.026121612638235092, 0.014819154515862465, -0.03513314574956894, -0.0017583479639142752, -0.06904897093772888, 0.0063021560199558735, 0.013356681913137436, 0.07993720471858978, -0.0587017722427845, -0.025732746347784996, 0.014024515636265278, 0.0004432854475453496, 0.034051086753606796, 0.001980254892259836, 0.020829660817980766, 0.009417305700480938, -0.07844937592744827, 0.014548638835549355, 0.01164060179144144, 0.0039858706295490265, 0.026611920446157455, 0.035538919270038605, 0.020204095169901848, -0.02705150842666626, 0.051905080676078796, -0.022959968075156212, -0.032326553016901016, -0.034372322261333466, -0.017093172296881676, -0.025479139760136604, -0.023720791563391685, -0.019409457221627235, 0.01322142407298088, -0.038142625242471695, 0.006382464896887541, -0.01426121685653925, -0.004827003460377455, -0.03793973848223686, -0.002464223187416792, 0.0008242256008088589, 0.01323833130300045, 0.0009203852969221771, -0.042741380631923676, -0.027220578864216805, -0.006255661137402058, 0.02015337347984314, 0.055928993970155716, 0.03800736740231514, -0.019747599959373474, 0.02383914217352867, 0.02558058127760887, -0.05390013009309769, -0.02620614878833294, -0.0465962216258049, -0.006162671837955713, 0.034930258989334106, -0.025225531309843063, -0.016247812658548355, 0.034659743309020996, -0.0587017722427845, 0.016822656616568565, 0.04723869636654854, -0.005144013091921806, -0.010752974078059196, 0.01065998524427414, 0.013889258727431297, 0.055658478289842606, 0.026865528896450996, 0.01837811805307865, 0.03655334934592247, -0.0546102300286293, -0.035775620490312576, 0.026713363826274872, 0.04260612651705742, -0.027254393324255943, -0.10577139258384705, 0.0006583238136954606, -0.008593080565333366, -0.029012741521000862, 0.032106757164001465, 0.007722360081970692, -0.04368818551301956, -0.030906347557902336, -0.05413683131337166, -0.07709679752588272, 0.01613791473209858, -0.03851458430290222, -0.021505948156118393, -0.00038543116534128785, -0.0316164493560791, -0.004691746085882187, -0.03878509998321533, 0.05176982283592224, -0.0022402030881494284, -0.01895296201109886, -0.0047509209252893925, -0.043079525232315063, -0.02218223549425602, 0.005621641408652067, -0.014692350290715694, 0.03560654819011688, -0.004497313406318426, 0.04050963371992111, -0.06887990236282349, -0.026662642136216164, -0.04199746623635292, 0.013923073187470436, -0.0030792225152254105, -0.01983213610947132, -0.04402633011341095, 0.037838295102119446, -0.005913290660828352, -0.0033074694219976664, 0.030382225289940834, -0.03547129034996033, -0.020880382508039474, 0.020035022869706154, 0.0654984638094902, -0.02762635238468647, 0.012139364145696163, -0.000762408715672791, -0.061474550515413284, -0.015715235844254494, 0.02328120358288288, 0.08690296858549118, -0.045919936150312424, -0.014590906910598278, 0.014912143349647522, -0.05839744210243225, 0.053426727652549744, 0.033256448805332184, -0.04270756617188454, -0.024312542751431465, 0.06431496143341064, 0.009941428899765015, 0.03271541744470596, -0.0037069020327180624, 0.07256566733121872, 0.13789506256580353, -0.010211944580078125, 0.018293581902980804, 0.015258741565048695, 0.030602017417550087, -0.00965400692075491, 0.0075955563224852085, -0.003793551353737712, 0.05176982283592224, -0.017989253625273705, -0.005528652109205723, 0.0026332952547818422, 0.03547129034996033, 0.05183745175600052, -0.008331019431352615, -0.006602258421480656, 0.0009177435422316194, 0.006847412791103125, -0.04436447098851204, 0.030179338529706, -0.04030674695968628, 0.009586378000676632, -0.04977477341890335, -0.0001360500609735027, 0.00919751264154911, -0.030128616839647293, 0.030094802379608154, -0.005659682676196098, -0.01283255871385336, 0.016501419246196747, 0.025834189727902412, -0.018834611400961876, -0.05146549269556999, -0.09312481433153152, 0.02270635962486267, -0.0021007186733186245, 0.020271724089980125, -0.006407825741916895, 0.07466216385364532, 0.02126924879848957, -0.05978383123874664, -0.009670914150774479, -0.011682869866490364, -0.060324862599372864, 0.0226894523948431, 0.062319912016391754, -0.04429684579372406, 0.017346778884530067, 0.043079525232315063, 0.035843249410390854, -0.006750196684151888, -0.03489644452929497, -0.012401425279676914, -0.046528592705726624, 0.010685345157980919, 0.0013811063254252076, -0.042741380631923676, 0.03398345783352852, -0.059411875903606415, 0.012190085835754871, 0.003907674923539162, -0.015284101478755474, 0.04456735774874687, -0.01988285779953003, 0.026713363826274872, 0.032343458384275436, -0.008969265967607498, 0.033510055392980576, -0.0026354086585342884, 0.01323833130300045, -0.034659743309020996, 0.015258741565048695, 0.013593383133411407, -0.046799108386039734, 0.014202041551470757, 0.03993478789925575, -0.015436266548931599, -0.003083449322730303, -0.022604916244745255, -0.02042388916015625, 0.02534388191998005, 0.049910031259059906, -0.016264719888567924, -0.005596280563622713, -0.024109655991196632, -0.03601231798529625, 0.018056880682706833, 0.009036893956363201, 0.00022098228510003537, -0.02394058369100094, -0.02449852228164673, 0.030297689139842987, -0.024583058431744576, 0.005761125590652227, 0.013153796084225178, -0.026544291526079178, 0.0741211324930191, -0.06235372647643089, 0.007375762797892094, -0.07614999264478683, -0.008030916564166546, -0.015994204208254814, 0.011691323481500149, 0.022249864414334297, 0.0215566698461771, 0.03427087888121605, -0.05386631563305855, 0.012756477110087872, 0.032056037336587906, -0.0034765414893627167, -0.01699172891676426, 0.039190873503685, -0.06370630115270615, -0.018496468663215637, -0.03286758065223694, 0.026865528896450996, -0.02997645176947117, -0.011057304218411446, 0.017025543376803398, 0.012739569880068302, -0.013956887647509575, -0.07418876141309738, -0.005401847884058952, -0.010059779509902, 0.046799108386039734, -0.024075841531157494, 0.027186766266822815, -0.04950425773859024, 0.038683656603097916, 0.024346357211470604, -0.019933579489588737, 0.07236278057098389, 0.011277097277343273, -0.075947105884552, 0.020119559019804, -0.026375219225883484, -0.00647122785449028, -0.012908641248941422, 0.03290139511227608, -0.12463982403278351, -0.05633476376533508, -0.019781414419412613, -0.032935209572315216, 0.03976571559906006, 0.04351911321282387, 0.012781837023794651, -0.0239067692309618, 0.012384518049657345, -0.028826763853430748, 0.04571704939007759, 0.008233802393078804, 0.04091540724039078, 0.017363686114549637, -0.04263994097709656, -0.007549061439931393, 0.05440734326839447, 0.0008511714404448867, 0.03023006021976471, 0.028657691553235054, 0.01306925993412733, 0.026003262028098106, -0.026662642136216164, -0.009696274995803833, 0.0029862327501177788, -0.010541634634137154, -0.057112496346235275, 0.009696274995803833, 0.00015414603694807738, 0.0005616358248516917, 0.017059357836842537, -0.014497917145490646, -0.03628283366560936, 0.0465962216258049, 0.01585894636809826, 0.06106878072023392, 0.021455226466059685, 0.10009057819843292, 0.004264839459210634, 0.028065938502550125, 0.02620614878833294, 0.05525270476937294, -0.0437219999730587, -0.006796691566705704, -0.017169253900647163, 0.00029085655114613473, -0.00921441987156868, -0.04889560118317604, -0.08994626253843307, 0.028285732492804527, 0.0038041183724999428, -0.011835034936666489, -0.04142262041568756, -0.03543747588992119, 0.04382344335317612, -0.011141839437186718, -0.007181330118328333, -0.012917094863951206, 0.04639333486557007, 0.012841012328863144, -0.03340861201286316, -0.03560654819011688, 0.09170461446046829, -0.009146790951490402, -0.010279572568833828, 0.04138880595564842, 0.02502264454960823, 0.01983213610947132, -0.04443209990859032, -0.016881830990314484, 0.007811123039573431, 0.01760038733482361, -0.013179156929254532, -0.035538919270038605, 0.06127166375517845, -0.014852968975901604, 0.04916611686348915, -0.003628706093877554, -0.011395447887480259, 0.04727251082658768, -0.028640784323215485, 0.03651953488588333, 0.037838295102119446, -0.04747539758682251, -0.011031943373382092, 0.03137974813580513, -0.05160075053572655, -0.02385604754090309, 0.011319365352392197, 0.011758952401578426, 0.056300949305295944, -0.03462592884898186, -0.034693557769060135, 0.00005557579061132856, -0.04629189148545265, 0.011158746667206287, -0.03137974813580513, 0.08142504096031189, 0.01525028795003891, 0.044736430048942566, -0.07026629149913788, -0.03347624093294144, 0.05954713001847267, -0.025563674047589302, -0.0056131877936422825, 0.01839502528309822, -0.022317493334412575, -0.015579978004097939, 0.011860395781695843, 0.03423706442117691, 0.00963709969073534, 0.0016484512016177177, -0.002130306325852871, -0.022588009014725685, 0.001536441151984036, 0.0011835034238174558, -0.05095827952027321, -0.032394181936979294, -0.027677074074745178, -0.018597912043333054, -0.07743494212627411, 0.03198840841650963, 0.021928628906607628, -0.031227584928274155, -0.002779119648039341, 0.0031489646062254906, -0.01151379756629467, 0.008969265967607498, 0.008314112201333046, 0.0166789460927248, -0.018800798803567886, -0.018614819273352623, 0.011995652690529823, -0.03110923431813717, -0.06465310603380203, -0.04544653370976448, 0.032394181936979294, -0.030162431299686432, 0.00174566765781492, -0.04510838910937309, 0.00439587002620101, 0.03401727229356766, -0.036147575825452805, 0.027981404215097427, 0.04030674695968628, 0.06999577581882477, 0.005769579205662012, 0.048794157803058624, 0.02394058369100094, 0.05004528909921646, 0.08494173735380173, 0.005308858584612608, -0.04422921687364578, 0.02645975537598133, -0.038142625242471695, 0.0018344303825870156, 0.015909668058156967, -0.009806171990931034, 0.006593804806470871, -0.027457280084490776, -0.0408477783203125, 0.021489040926098824, 0.021421412006020546, -0.0652279481291771, -0.00023775739828124642, 0.011429262347519398, 0.032969024032354355, -0.04030674695968628, -0.057383012026548386, -0.01110802497714758, 0.029266349971294403, 0.020846568048000336, -0.006213393062353134, 0.05873558670282364, -0.0350993312895298, -0.04602137953042984, 0.07628525048494339, -0.03126139938831329, 0.009561017155647278, -0.03489644452929497, -0.0006292645703069866, -0.03885272890329361, -0.059107545763254166, 0.08000483363866806, -0.025682024657726288, 0.015216473489999771, 0.025428418070077896, 0.04727251082658768, -0.008842461742460728, 0.021235434338450432, -0.037567783147096634, -0.013568022288382053, 0.00962019246071577, 0.021066362038254738, -0.02705150842666626, -0.00893545150756836, -0.006407825741916895, 0.03418634459376335, -0.046460963785648346, 0.0042437054216861725, 0.001047189231030643, -0.023382646963000298, -0.00761669036000967, -0.03389891982078552, 0.011015036143362522, 0.05447497218847275, 0.005782259628176689, 0.0009087615762837231, 0.004144375678151846, -0.004695972893387079, -0.030331503599882126, -0.013889258727431297, 0.04236942529678345, 0.03976571559906006, -0.05467785894870758, -0.02211460843682289, 0.006881227251142263, 0.04233561083674431, -0.0015628585824742913, -0.004157056100666523, -0.07330958545207977, 0.020001208409667015, 0.017769459635019302, 0.0001713174133328721, 0.0017858222126960754, -0.012511322274804115, 0.028268825262784958, -0.015892760828137398, 0.04142262041568756, 0.01844574697315693, -0.008347926661372185, -0.02825191803276539, 0.016518326476216316, -0.06299620121717453, 0.03479500114917755, -0.03259706869721413, 0.009831532835960388, 0.018496468663215637, -0.016611317172646523, 0.029232535511255264, -0.012029467150568962, 0.06681722402572632, -0.007113701198250055, -0.019933579489588737, -0.039596643298864365, -0.0367562361061573, -0.029164906591176987, 0.012967816554009914, -0.026966972276568413, 0.009535656310617924, -0.024295635521411896, 0.10387779027223587, 0.003011593595147133, 0.03824406862258911, 0.011353179812431335, 0.06739206612110138, -0.01523338072001934, 0.10495985299348831, -0.10523036867380142, 0.009831532835960388, 0.03340861201286316, 0.04010386019945145, -0.013830083422362804, -0.021235434338450432, -0.0024050481151789427, -0.0523446686565876, 0.0016590182203799486, -0.01839502528309822, -0.0007935813628137112, 0.040983036160469055, 0.006817825138568878, 0.01527564786374569, -0.004311333876103163, -0.05183745175600052, -0.00007839389581931755, -0.058532699942588806, 0.020626774057745934, 0.058025483042001724, 0.022503472864627838, 0.025563674047589302, 0.04953807219862938, 0.026713363826274872, -0.031819336116313934, -0.000010988023859681562, 0.06651289761066437, 0.03689149394631386, 0.007464525289833546, 0.03447376564145088, -0.03949519991874695, 0.02911418490111828, 0.008817100897431374, -0.03973190113902092, 0.005232776049524546, -0.034659743309020996, 0.05934424698352814, 0.06979288905858994, -0.08054586499929428, 0.025090273469686508, 0.043079525232315063, 0.009163698181509972, -0.012105549685657024, 0.0484221987426281, -0.026882436126470566, 0.058600328862667084, 0.0038823140785098076, -0.038683656603097916, -0.01410059817135334, -0.0026142746210098267, 0.007587102707475424, 0.0012046374613419175, 0.011564519256353378, -0.03516696020960808, -0.05319002643227577, -0.012342250905930996, -0.030652739107608795, -0.00028398798895068467, 0.08913471549749374, -0.07087495177984238, -0.0057738060131669044, -0.057687342166900635, 0.005803393665701151, -0.007815349847078323, 0.053392913192510605, 0.04974095895886421, 0.0035336031578481197, 0.03422015905380249, 0.09704728424549103, 0.02909727767109871, -0.0017245336202904582, 0.04250468313694, -0.05450878664851189, 0.006242980714887381, -0.005084838252514601, -0.006348650902509689, 0.009806171990931034, 0.024075841531157494, -0.017346778884530067, -0.03427087888121605, 0.027812331914901733, -0.03790592402219772, -0.032123666256666183, 0.02039007470011711, -0.01510657649487257, 0.06735825538635254, -0.04811786860227585, 0.05609806254506111, -0.03286758065223694, 0.002398707903921604, 0.013466578908264637, -0.011319365352392197, 0.020897289738059044, -0.07317432761192322, 0.03540366142988205, 0.015613792464137077, -0.011995652690529823, -0.06073063611984253, -0.0587017722427845, 0.0036984484177082777, 0.002455769805237651, 0.03976571559906006, -0.018259767442941666, 0.024329449981451035, -0.035538919270038605, 0.02997645176947117, -0.022266771644353867, 0.026104705408215523, -0.042470868676900864, 0.06100115180015564, -0.08933760225772858, -0.06225228309631348, -0.041016846895217896, -0.05413683131337166, -0.03848076984286308, -0.019696878269314766, -0.004228911362588406, 0.03905561566352844, -0.0024156151339411736, -0.01092204637825489, -0.010879778303205967, -0.01525028795003891, -0.01454018522053957, -0.026696456596255302, -0.01645069755613804, -0.05383250117301941, -0.011116478592157364, -0.05241229757666588, 0.07094258069992065, 0.03854839876294136, -0.005655455868691206, -0.0334424264729023, -0.029435422271490097, -0.04463498666882515, 0.014759979210793972, 0.007942154072225094, 0.0039055615197867155, -0.0644502192735672, -0.045311275869607925, 0.0070798867382109165, 0.0236024409532547, 0.0044043236412107944, 0.06238754093647003, -0.05782259628176689, 0.05900610238313675, -0.022858524695038795, -0.009442666545510292, -0.03716200962662697, 0.05751826986670494, 0.073850616812706, -0.05745064094662666, 0.01582513190805912, -0.00033021860872395337, -0.08041060715913773, -0.06309764087200165, -0.030128616839647293, -0.06465310603380203, 0.019206570461392403, 0.0844007059931755, 0.006995351053774357, -0.015461627393960953, -0.049977660179138184, 0.0033941189758479595, -0.0037639637012034655, 0.0408477783203125, 0.04943662881851196, 0.009459573775529861, -0.004865044727921486, 0.016932552680373192, -0.004869271535426378, -0.017042450606822968, 0.022638730704784393, 0.01642533764243126, -0.017617294564843178, 0.05575992166996002, 0.05751826986670494, -0.057653527706861496, -0.01382162980735302, 0.04564942046999931, -0.08345390111207962, -0.02473522163927555, 0.05359579995274544, 0.027727795764803886, 0.03418634459376335, 0.01727914996445179, -0.008060503751039505, -0.02160739153623581, -0.010313387028872967, 0.0396304577589035, 0.06326671689748764, -0.020271724089980125, -0.020626774057745934, -0.04517601802945137, -0.004304993897676468, -0.020914196968078613, 0.025225531309843063, -0.028640784323215485, 0.02211460843682289, 0.05890465900301933, -0.0070672063156962395, 0.014819154515862465, 0.004721333272755146, 0.07330958545207977, 0.048523642122745514, 0.02591872587800026, 0.030297689139842987, 0.03604613244533539, -0.028911298140883446, 0.04250468313694, 0.018006158992648125, 0.04010386019945145, 0.03506551682949066, -0.013373589143157005, 0.026831714436411858, 0.06167743727564812, 0.042775195091962814, 0.01900368370115757, 0.023670069873332977, 0.009408853016793728, -0.02358553372323513, -0.010727613233029842, 0.03689149394631386, -0.002314171986654401, 0.024667594581842422, -0.022959968075156212, -0.026578105986118317, 0.038954172283411026, 0.015351730398833752, -0.033543869853019714, 0.036451905965805054, 0.014506370760500431, -0.01106575783342123 ]
717,651
pytorch_optimizer.optimizer.radam
RAdam
Rectified Adam. :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 n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: float. degenerated to SGD. :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 RAdam(Optimizer, BaseOptimizer): r"""Rectified Adam. :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 n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: float. degenerated to SGD. :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, n_sma_threshold: int = 5, degenerated_to_sgd: 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, 'adanorm': adanorm, 'adam_debias': adam_debias, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults) def __str__(self) -> str: return 'RAdam' @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) 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=True, 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) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) if step_size > 0 or n_sma >= self.n_sma_threshold: 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'], ) 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) if n_sma >= self.n_sma_threshold: de_nom = exp_avg_sq.sqrt().add_(group['eps']) p.addcdiv_(exp_avg, 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, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-08)
[ -0.006051396951079369, -0.027482779696583748, -0.01544221118092537, 0.026839787140488625, 0.017557866871356964, -0.019020158797502518, -0.06512900441884995, -0.06861361116170883, -0.042396076023578644, 0.030428104102611542, -0.030407361686229706, 0.008001118898391724, 0.05152243375778198, 0.10362564027309418, -0.03868331015110016, 0.054592207074165344, 0.007902595214545727, 0.06720317155122757, -0.012486515566706657, -0.014508833177387714, -0.03494979813694954, -0.054094407707452774, -0.04899194464087486, 0.03772918879985809, -0.03148593381047249, 0.0033731223084032536, 0.042769428342580795, -0.0180660393089056, -0.056998249143362045, 0.014270303770899773, 0.0047524468973279, -0.09657344967126846, 0.01151165459305048, -0.008835973218083382, 0.008379654958844185, -0.06952624768018723, -0.007435906678438187, 0.0029349534306675196, -0.10951628535985947, -0.03449347987771034, 0.02285737544298172, -0.009769350290298462, 0.07541689276695251, -0.0365883968770504, 0.0005208116490393877, -0.008737449534237385, -0.008286317810416222, 0.015722224488854408, -0.02345888689160347, -0.008021860383450985, 0.03324897959828377, -0.0695677325129509, 0.04791337624192238, 0.0389944352209568, 0.004360946826636791, 0.05981912091374397, 0.02785613015294075, 0.0030853310599923134, 0.04729112237691879, -0.09732015430927277, 0.051563918590545654, -0.08454325050115585, 0.035406116396188736, -0.015753336250782013, -0.01571185328066349, -0.010785695165395737, -0.0715174525976181, -0.01994316466152668, 0.015224423259496689, 0.011003483086824417, 0.0023127018939703703, -0.012621336616575718, 0.02433003857731819, -0.0055017415434122086, -0.023106276988983154, 0.005636562593281269, -0.03542685881257057, -0.03652616962790489, -0.0034742383286356926, -0.038496632128953934, 0.04500953480601311, 0.048826009035110474, 0.0009800463449209929, -0.01480958890169859, -0.00043071480467915535, -0.07840370386838913, -0.018491243943572044, -0.02065875381231308, 0.0023606671020388603, -0.08570478856563568, 0.052932869642972946, -0.01557703223079443, 0.05388699099421501, 0.040467098355293274, 0.03569650277495384, 0.033477138727903366, -0.025242673233151436, -0.03795734792947769, 0.011418317444622517, -0.033539362251758575, -0.02785613015294075, 0.03208744153380394, 0.020689865574240685, 0.060897693037986755, 0.008965608663856983, -0.010599019005894661, -0.029473984614014626, -0.034970540553331375, 0.05226913467049599, -0.02022317796945572, -0.05148094892501831, 0.010225668549537659, -0.04505101591348648, 0.0032097813673317432, -0.049904581159353256, -0.00563137698918581, 0.00011667217768263072, 0.02839541621506214, -0.02632124349474907, 0.043433163315057755, 0.06989959627389908, 0.01742304489016533, -0.04646145552396774, 0.006009913515299559, 0.033933453261852264, -0.0196112971752882, 0.02791835553944111, 0.02385297790169716, -0.00983676128089428, -0.0561685785651207, -0.018501615151762962, 0.016199283301830292, -0.009001906961202621, -0.005843979772180319, 0.029577692970633507, -0.008084085769951344, 0.02000539004802704, 0.039450753480196, -0.030448846518993378, -0.0037153607700020075, 0.04617106914520264, 0.034306805580854416, 0.008644112385809422, -0.03248153626918793, 0.006813655141741037, -0.020098727196455002, 0.03797809034585953, 0.02868579886853695, 0.002315294463187456, 0.013451006263494492, 0.006891436874866486, -0.009660456329584122, 0.021675098687410355, 0.020513562485575676, 0.05135650187730789, -0.016085203737020493, -0.018719403073191643, 0.023583335801959038, -0.038102541118860245, -0.005978800822049379, -0.04948974400758743, -0.05260100215673447, -0.01582593284547329, -0.02478635683655739, 0.006201774347573519, 0.0026147530879825354, -0.01192648895084858, 0.03940926864743233, -0.030967388302087784, 0.012538369745016098, 0.023479627445340157, -0.0710611343383789, -0.03631875291466713, 0.006429933477193117, -0.07172486931085587, 0.1064465120434761, -0.005115427076816559, 0.02978511154651642, -0.01184352207928896, -0.027648713439702988, 0.04142121598124504, -0.004417986609041691, -0.004086119122803211, -0.06915289908647537, -0.03165186569094658, 0.0173504501581192, -0.005735085811465979, -0.014011031948029995, -0.025284158065915108, 0.02795984037220478, 0.01074421126395464, -0.024973031133413315, 0.019434992223978043, -0.020575786009430885, -0.043474648147821426, -0.007415165193378925, 0.0030464401934295893, -0.001157647231593728, 0.11615363508462906, 0.04285239428281784, -0.023604078218340874, 0.03509499132633209, 0.01043827086687088, 0.01620965451002121, 0.002177880611270666, -0.017340078949928284, -0.02252550795674324, 0.013461376540362835, -0.008198165334761143, 0.011656846851110458, -0.08553885668516159, 0.006632165051996708, 0.049904581159353256, 0.04641997069120407, 0.0545092411339283, -0.008198165334761143, 0.045673269778490067, 0.05081721395254135, 0.059902090579271317, 0.00007429749530274421, -0.001720266416668892, -0.0471251904964447, -0.005558781325817108, -0.010920516215264797, 0.056334514170885086, -0.02735832892358303, 0.02982659451663494, -0.010920516215264797, -0.01002862211316824, 0.008955237455666065, 0.014342899434268475, -0.04866007715463638, 0.0031553341541439295, -0.015224423259496689, 0.0356135331094265, 0.02922508493065834, -0.02669459395110607, 0.0105212377384305, -0.017786026000976562, -0.024101879447698593, -0.023915203288197517, -0.004029079340398312, -0.03169335052371025, 0.015348873101174831, -0.004630588926374912, 0.00014648839714936912, 0.062183678150177, 0.03358084708452225, -0.03503276780247688, -0.007503317669034004, -0.03341491147875786, -0.015908900648355484, -0.002499377354979515, 0.05944577232003212, -0.07309382408857346, -0.004482804331928492, 0.03772918879985809, 0.05786940082907677, 0.012206502258777618, -0.04824524372816086, 0.03484608978033066, -0.04001078009605408, -0.0511905662715435, 0.034576449543237686, -0.008996721357107162, 0.05185430124402046, 0.049904581159353256, -0.014011031948029995, 0.029930302873253822, 0.0215299054980278, 0.07110261917114258, 0.07674437016248703, -0.09010203182697296, -0.0036064665764570236, 0.0036194303538650274, 0.0834231972694397, 0.008742635138332844, -0.011999085545539856, -0.00906413234770298, 0.013336926698684692, 0.03248153626918793, -0.03745954856276512, -0.02681904472410679, 0.02802206389605999, -0.026777561753988266, 0.03409938886761665, -0.02829170785844326, -0.004884675145149231, 0.04417986422777176, 0.028416156768798828, 0.05110760033130646, 0.003191632218658924, 0.07487761229276657, -0.0013229328906163573, 0.07330124080181122, 0.01049012504518032, 0.01502737682312727, 0.006751430220901966, -0.029308050870895386, -0.005032460205256939, 0.04492656886577606, -0.002849393989890814, 0.06467268615961075, 0.008089271374046803, -0.050194963812828064, -0.032668210566043854, -0.006943291053175926, 0.035572052001953125, 0.048701561987400055, -0.01142868772149086, -0.01029826421290636, 0.016831906512379646, -0.003253857372328639, 0.005869906861335039, 0.006538827437907457, -0.08636852353811264, -0.0003283025580458343, -0.03281340375542641, 0.04038412868976593, 0.0480378232896328, -0.045133985579013824, 0.033809006214141846, 0.019766859710216522, -0.03580021113157272, -0.017765283584594727, -0.044802118092775345, 0.043930962681770325, 0.014415496028959751, -0.02648717723786831, -0.02136397175490856, -0.048701561987400055, -0.044096898287534714, 0.01637558825314045, 0.011397575959563255, -0.03235708549618721, -0.03163112327456474, 0.012476145289838314, 0.022546250373125076, -0.002046948531642556, -0.03181780129671097, 0.05604412779211998, 0.04534140229225159, -0.009214509278535843, 0.049904581159353256, 0.01483033038675785, -0.04297684505581856, 0.051066115498542786, 0.021778807044029236, -0.0016839684685692191, 0.00483541376888752, -0.007871483452618122, -0.016562264412641525, 0.004314277786761522, 0.08910643309354782, 0.047664474695920944, 0.01927942968904972, -0.033269718289375305, 0.010557536035776138, 0.036733586341142654, -0.06637350469827652, -0.025014515966176987, 0.02262921817600727, -0.05961170420050621, 0.052393585443496704, 0.03092590533196926, 0.010972370393574238, -0.05786940082907677, -0.051232051104307175, 0.05289138853549957, -0.054094407707452774, 0.009738237597048283, -0.08520698547363281, -0.004646145273000002, -0.001897867419756949, -0.03194224834442139, 0.00997158233076334, -0.017941588535904884, -0.00939599983394146, 0.06102214381098747, 0.03366381302475929, 0.028748024255037308, 0.0035909104626625776, 0.022235125303268433, 0.017111919820308685, 0.04588068649172783, -0.026777561753988266, 0.019808342680335045, -0.009411555714905262, 0.024910805746912956, -0.06363560259342194, 0.02588566765189171, 0.009525635279715061, -0.00516468845307827, -0.0047031850554049015, -0.12104868143796921, 0.04484359920024872, 0.022608475759625435, 0.060565825551748276, -0.0975690558552742, -0.033373430371284485, -0.014736992307007313, -0.008229278028011322, 0.012247986160218716, -0.017215628176927567, -0.021944740787148476, -0.05807681754231453, 0.0351572148501873, 0.04762298986315727, -0.009784907102584839, 0.0984816923737526, -0.006886251270771027, 0.0191238671541214, -0.03575872629880905, 0.038040317595005035, -0.025097481906414032, -0.033705297857522964, 0.008903383277356625, 0.0030308838468044996, -0.0012172796996310353, 0.008970794267952442, 0.029349535703659058, 0.02269144169986248, 0.015504436567425728, 0.053762540221214294, 0.02142619714140892, -0.016002237796783447, -0.07425536215305328, -0.0024462267756462097, -0.08736412972211838, -0.04256201162934303, 0.010339748114347458, -0.020420223474502563, -0.03934704512357712, -0.025367124006152153, -0.025180449709296227, 0.005932132247835398, -0.020316515117883682, 0.035302408039569855, 0.03965817019343376, -0.03509499132633209, 0.03005475364625454, -0.04434579983353615, 0.027648713439702988, 0.004034264478832483, -0.014488091692328453, -0.056293029338121414, 0.04169085994362831, -0.016800792887806892, -0.06355263292789459, -0.017381561920046806, 0.03422383964061737, -0.0033601587638258934, 0.03449347987771034, 0.026383468881249428, -0.02110470086336136, -0.01824234426021576, 0.03248153626918793, -0.024931548163294792, 0.0037179533392190933, 0.005444701761007309, 0.012984316796064377, 0.023168502375483513, -0.05002903193235397, 0.03509499132633209, -0.006668463349342346, 0.07446277886629105, 0.0781548023223877, 0.000101926110801287, -0.0045165098272264, 0.02065875381231308, -0.0019756488036364317, -0.02538786642253399, 0.01008566189557314, -0.0347009003162384, -0.02542934939265251, -0.006253628991544247, -0.009593046270310879, -0.0013274701777845621, -0.023375919088721275, 0.020679496228694916, 0.03723138943314552, -0.06782542914152145, 0.011138304136693478, 0.036733586341142654, 0.03331120312213898, 0.03351861983537674, 0.007415165193378925, 0.019746117293834686, -0.004013522993773222, 0.044594697654247284, -0.05538039281964302, -0.056624896824359894, 0.045299917459487915, 0.05160539969801903, -0.0691114142537117, -0.05554632842540741, 0.027337588369846344, 0.012362065725028515, 0.06824026256799698, -0.04720815643668175, 0.032668210566043854, -0.05504852533340454, -0.07707623392343521, -0.011822780594229698, 0.04084044694900513, -0.014840701594948769, -0.07554134726524353, 0.010293078608810902, -0.02571973390877247, 0.027275362983345985, -0.03687877953052521, -0.01491329725831747, 0.01145980041474104, 0.01494440995156765, 0.014083628542721272, -0.0120094558224082, 0.017340078949928284, 0.04032190516591072, 0.018823111429810524, -0.036069851368665695, 0.021446939557790756, 0.02592715062201023, -0.03256450220942497, -0.033477138727903366, 0.0005279416218400002, 0.04617106914520264, -0.016240768134593964, 0.010339748114347458, 0.05185430124402046, 0.003992781043052673, 0.002337332582101226, -0.004646145273000002, 0.023770011961460114, 0.07014849781990051, 0.004967642016708851, 0.027233880013227463, 0.01620965451002121, -0.033145271241664886, -0.07060481607913971, -0.013513230718672276, -0.005291731562465429, 0.011522025801241398, 0.006217330694198608, -0.04181531071662903, -0.04119305685162544, 0.04957271367311478, 0.009411555714905262, 0.028996925801038742, -0.021986223757267, -0.04330871254205704, 0.008893013000488281, 0.008021860383450985, -0.00486134085804224, 0.047166671603918076, 0.035675760358572006, -0.013347296975553036, -0.04220940172672272, 0.0018019370036199689, 0.011667218059301376, -0.0023191836662590504, -0.028706541284918785, -0.0356135331094265, 0.01614742912352085, -0.04171159863471985, 0.013088026084005833, 0.029909560456871986, 0.013461376540362835, -0.012403548695147038, -0.05587819591164589, 0.0351572148501873, -0.03302082046866417, -0.04077822342514992, -0.020523931831121445, -0.022442542016506195, -0.05264248698949814, 0.017163773998618126, 0.015037747099995613, -0.0382477343082428, -0.013316184282302856, -0.008021860383450985, 0.07251305878162384, -0.0483282096683979, -0.03432754799723625, -0.04119305685162544, 0.006009913515299559, 0.03333194553852081, -0.06421636790037155, 0.050734248012304306, -0.005512112285941839, 0.0061343638226389885, -0.03449347987771034, 0.027835389599204063, -0.022401059046387672, -0.07305233925580978, -0.013731018640100956, 0.04001078009605408, -0.015628887340426445, 0.012559112161397934, 0.018159376457333565, 0.03378826379776001, -0.01397992018610239, -0.01167758833616972, 0.04492656886577606, 0.004371317569166422, 0.00963971484452486, -0.0022025115322321653, 0.0004952086019329727, 0.012455402873456478, 0.023977428674697876, -0.028270965442061424, -0.039803363382816315, -0.019186092540621758, 0.00967082753777504, -0.013243588618934155, -0.02835393138229847, -0.037563256919384, -0.019735747948288918, 0.021301746368408203, 0.1073591485619545, 0.023479627445340157, 0.020886912941932678, -0.0003377011453267187, -0.028706541284918785, 0.0098056485876441, -0.004508731421083212, -0.02291960082948208, 0.040467098355293274, -0.08064381033182144, -0.0086752250790596, -0.04322574660181999, -0.0007713327649980783, 0.020026130601763725, 0.028582090511918068, -0.059155385941267014, 0.031237032264471054, 0.010308635421097279, 0.05994357168674469, 0.03988632932305336, -0.019746117293834686, -0.03685803711414337, 0.01659337617456913, 0.0014921075198799372, -0.03501202538609505, 0.005434331018477678, -0.010567906312644482, 0.01884385384619236, -0.015431839972734451, -0.003061996540054679, 0.06048285588622093, 0.06570976972579956, -0.013772502541542053, 0.028976183384656906, -0.06380153447389603, -0.019797971472144127, 0.02296108566224575, 0.025698991492390633, 0.009738237597048283, 0.05185430124402046, -0.012061310932040215, -0.015587403438985348, -0.025242673233151436, -0.02132248878479004, 0.0019276837119832635, -0.008851529099047184, -0.04025968164205551, 0.008332986384630203, -0.02982659451663494, 0.038102541118860245, 0.019517960026860237, 0.01461254246532917, -0.09615861624479294, -0.01835642196238041, -0.047996342182159424, 0.01839790679514408, 0.017786026000976562, 0.015628887340426445, 0.013731018640100956, -0.07230563461780548, -0.016468925401568413, -0.023044051602482796, 0.005325436592102051, 0.047830406576395035, -0.016624489799141884, -0.012901349924504757, 0.03279266133904457, -0.025014515966176987, -0.006295112427324057, 0.020026130601763725, 0.0072855292819440365, -0.02549157477915287, -0.040073003619909286, -0.02136397175490856, 0.03438977152109146, -0.017018582671880722, 0.03129925578832626, -0.051232051104307175, -0.03625652939081192, -0.0013326555490493774, 0.015286647714674473, -0.04241681843996048, -0.00120561255607754, -0.019269058480858803, -0.033809006214141846, -0.0026212348602712154, 0.00513616856187582, 0.07110261917114258, 0.005786939989775419, 0.03698248788714409, 0.010241224430501461, -0.023002568632364273, 0.01029826421290636, 0.03586243465542793, 0.01582593284547329, -0.0003633041924331337, 0.04252052679657936, -0.026176052168011665, 0.04559030383825302, -0.015265906229615211, -0.048203758895397186, 0.059694673866033554, -0.0463784858584404, 0.03895295038819313, 0.03136148303747177, -0.009152283892035484, -0.04135899245738983, -0.05081721395254135, 0.002813095925375819, -0.024205587804317474, 0.051563918590545654, -0.02642495185136795, 0.03472163900732994, 0.030531812459230423, 0.012445032596588135, 0.025180449709296227, -0.02285737544298172, 0.005792125593870878, 0.04005226120352745, -0.020803945139050484, 0.01989131048321724, 0.05114908143877983, 0.024744872003793716, 0.03188002482056618, -0.029868077486753464, -0.04509250074625015, -0.005016903858631849, 0.047996342182159424, -0.025180449709296227, -0.0044283573515713215, 0.02192399837076664, -0.04559030383825302, 0.06525345146656036, -0.022297348827123642, 0.03248153626918793, 0.07375755906105042, 0.044304315000772476, -0.04550733417272568, 0.02242179960012436, -0.052435070276260376, -0.03679581359028816, -0.08512402325868607, 0.01780676655471325, -0.05372105538845062, 0.032066699117422104, 0.020368369296193123, -0.007461834233254194, 0.0063728936947882175, 0.008415953256189823, 0.01456068828701973 ]
717,653
pytorch_optimizer.optimizer.radam
__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, n_sma_threshold: int = 5, degenerated_to_sgd: 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, '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, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-08)
[ 0.0002236111758975312, -0.03593365103006363, -0.022501040250062943, 0.009115660563111305, -0.03211735188961029, -0.0251271054148674, -0.0940093845129013, -0.023559022694826126, -0.046777982264757156, 0.03017142042517662, -0.04156363382935524, 0.06869335472583771, 0.03253298997879028, 0.061967600136995316, -0.06601060926914215, 0.05297474190592766, 0.016049230471253395, 0.028471089899539948, -0.014915676787495613, -0.0014275690773501992, 0.004671185743063688, -0.006333731114864349, -0.05490178242325783, 0.10156640410423279, 0.01644597388803959, 0.040543437004089355, -0.004775094799697399, 0.004005223046988249, -0.04092128574848175, 0.01894923858344555, 0.01190231367945671, -0.02956685796380043, -0.008940904401242733, 0.04802488908171654, 0.026279551908373833, -0.01511404849588871, -0.021613089367747307, 0.009195953607559204, -0.113657645881176, 0.0378795862197876, 0.060191698372364044, -0.026317337527871132, 0.08887060731649399, -0.03838968276977539, -0.023181172087788582, -0.01764565147459507, 0.024352511391043663, 0.03636818006634712, -0.00597477238625288, -0.026090625673532486, 0.04273497313261032, -0.019799403846263885, 0.015916982665657997, -0.0028693077620118856, -0.053314805030822754, 0.0633656457066536, 0.04209262505173683, 0.07874419540166855, 0.05085877329111099, -0.0007055190508253872, 0.026071734726428986, -0.029906922951340675, 0.03347761929035187, 0.004099685698747635, -0.008293834514915943, -0.0014015918131917715, -0.09030643850564957, -0.022482147440314293, 0.008411913178861141, 0.033043090254068375, 0.10806544870138168, -0.00035423552617430687, -0.011354428716003895, 0.04235712066292763, -0.01264856941998005, 0.015813073143363, -0.07927318662405014, -0.059435997158288956, -0.05407050997018814, -0.011864528059959412, 0.0691089853644371, 0.04043008014559746, -0.014169421046972275, -0.04711804538965225, 0.0005254493444226682, -0.05856693908572197, -0.026033949106931686, -0.05728224292397499, 0.005696107167750597, -0.008265495300292969, -0.04179034382104874, -0.009517127647995949, 0.019242072477936745, -0.003485677530989051, 0.05286138504743576, 0.005242685787379742, 0.012676908634603024, -0.060078345239162445, 0.020347287878394127, -0.0064140246249735355, -0.026052841916680336, -0.0006553357234224677, -0.04012779891490936, 0.014235544949769974, 0.025353817269206047, -0.022123189643025398, -0.044359732419252396, -0.026298444718122482, 0.04020337015390396, -0.053806014358997345, -0.026865221560001373, 0.05970049276947975, -0.028187701478600502, 0.026279551908373833, -0.07118716835975647, 0.002022684784606099, 0.022331006824970245, 0.0188925601541996, -0.010126412846148014, 0.013357040472328663, 0.041261352598667145, 0.022954462096095085, -0.03838968276977539, 0.04972521960735321, 0.04674019664525986, -0.015170725993812084, 0.016105908900499344, 0.013281470164656639, 0.016502652317285538, -0.02699746936559677, 0.03226849436759949, -0.01642708107829094, -0.014745643362402916, -0.021745337173342705, 0.015539131127297878, -0.03725612908601761, 0.026033949106931686, 0.05732002854347229, -0.026695188134908676, -0.0027394213248044252, 0.06238323450088501, 0.006659627892076969, 0.03385546803474426, -0.025523848831653595, -0.013432610780000687, -0.004031199961900711, -0.010787651874125004, -0.007509793154895306, -0.012601338326931, 0.03262745216488838, 0.02263328805565834, -0.003032255917787552, -0.01563359424471855, 0.039976660162210464, 0.007415330037474632, -0.0567154660820961, 0.025504957884550095, -0.007623148150742054, -0.015378544107079506, 0.013347594067454338, -0.035518012940883636, 0.008237156085669994, 0.02898118831217289, -0.0439440980553627, -0.006905231159180403, 0.010967131704092026, -0.03088933788239956, 0.02403133735060692, -0.01822187565267086, -0.009994165040552616, 0.00015453524247277528, -0.08063344657421112, -0.06090961769223213, 0.01880754344165325, -0.03895645961165428, 0.060040559619665146, 0.034970130771398544, 0.005611090455204248, -0.019383767619729042, -0.01951601542532444, 0.063252292573452, -0.0054127187468111515, -0.013451503589749336, -0.07303863763809204, 0.013187007047235966, -0.005908648483455181, -0.023710163310170174, 0.03699163347482681, -0.031739503145217896, 0.02711082436144352, 0.06495262682437897, -0.010589280165731907, 0.016559328883886337, 0.0078781982883811, -0.015302974730730057, 0.006527379620820284, 0.025599420070648193, -0.035007916390895844, 0.0027819296810775995, 0.060834046453237534, 0.07904647290706635, 0.038767535239458084, 0.011241073720157146, -0.029283469542860985, 0.028848940506577492, -0.003967437893152237, -0.02013947069644928, 0.002859861357137561, -0.021594196557998657, -0.013479841873049736, -0.00876614823937416, -0.0314750075340271, 0.05784901976585388, 0.03277859464287758, 0.006395131815224886, -0.04447308927774429, 0.0036651568952947855, 0.03336426243185997, 0.026222875341773033, 0.0020463005639612675, 0.07677936553955078, -0.036897171288728714, -0.025353817269206047, 0.0006630108109675348, 0.04915844276547432, 0.009937486611306667, 0.031248295679688454, -0.05301252752542496, -0.06555718928575516, -0.004257910884916782, -0.008903119713068008, -0.04488872364163399, -0.024654792621731758, -0.025202676653862, 0.014386685565114021, 0.005568582098931074, -0.01133553683757782, 0.029415717348456383, -0.08373183012008667, -0.04522879049181938, 0.03274080902338028, 0.03895645961165428, 0.0035092930775135756, 0.006347900256514549, 0.020366180688142776, -0.005677214358001947, 0.026166196912527084, 0.011259966529905796, -0.05796237662434578, -0.0378795862197876, -0.023502346128225327, -0.028622230514883995, -0.006673797033727169, 0.05350373312830925, -0.04046786576509476, -0.0017983356956392527, 0.05116105452179909, 0.01955380104482174, 0.021140774711966515, -0.012828049249947071, -0.0014724389184266329, -0.0068627228029072285, -0.036764923483133316, 0.05535520240664482, 0.0010892741847783327, 0.030398130416870117, -0.002317880978807807, -0.0031007416546344757, 0.02701636217534542, -0.0075900861993432045, 0.100810706615448, 0.04228154942393303, -0.03326980024576187, -0.0024088015779852867, -0.020252825692296028, 0.004080793354660273, -0.0014807044062763453, -0.04333953559398651, -0.006886338349431753, 0.05085877329111099, 0.03944766893982887, -0.032381847500801086, 0.032419633120298386, 0.023181172087788582, 0.004982912912964821, 0.011193842627108097, -0.01878865249454975, -0.009644652716815472, 0.0026142580900341272, 0.013300362974405289, -0.012431304901838303, 0.013678214512765408, 0.06869335472583771, 0.013054759241640568, 0.09809017926454544, -0.006461255718022585, 0.05240796506404877, -0.019109824672341347, 0.053125880658626556, -0.015378544107079506, 0.05932264029979706, -0.04462422803044319, 0.060040559619665146, 0.0050962683744728565, -0.06567054241895676, -0.03529130294919014, 0.04031672328710556, 0.013583751395344734, 0.0314561128616333, 0.03922095522284508, 0.016871057450771332, 0.0439440980553627, 0.07813963294029236, 0.0033463449217379093, 0.040581222623586655, -0.07077153027057648, 0.0008483940619044006, -0.061363037675619125, 0.026298444718122482, 0.05116105452179909, -0.021669767796993256, 0.015170725993812084, 0.00912510696798563, -0.03440335392951965, -0.04477537050843239, -0.05418386310338974, 0.018042394891381264, 0.011344983242452145, -0.03087044507265091, -0.017296139150857925, -0.035593584179878235, -0.018628064543008804, 0.020555106922984123, -0.029377931728959084, -0.04587113857269287, 0.015964213758707047, -0.0002621342719066888, 0.03476231172680855, -0.002163198310881853, -0.031777288764715195, 0.09128885716199875, -0.009909148328006268, -0.009247908368706703, 0.07198065519332886, -0.006673797033727169, -0.021858692169189453, 0.02463589981198311, -0.031078262254595757, 0.02777206525206566, 0.0002166740596294403, -0.004815241321921349, 0.022841105237603188, -0.007051648572087288, 0.11751172691583633, 0.04791153594851494, -0.011259966529905796, -0.008558330126106739, 0.029774675145745277, 0.029717998579144478, -0.052596889436244965, -0.01955380104482174, 0.0018927984638139606, -0.031191617250442505, 0.04583335295319557, 0.012676908634603024, -0.013054759241640568, -0.022274328395724297, -0.03258966654539108, 0.03719945251941681, -0.018476923927664757, 0.016228709369897842, -0.07738392800092697, -0.0220476184040308, -0.010570387355983257, 0.022236544638872147, -0.006943016313016415, -0.037369485944509506, 0.002942516468465328, 0.03903203085064888, 0.003131442004814744, 0.0015905174659565091, 0.007670379709452391, 0.04987636208534241, 0.024050230160355568, 0.026317337527871132, -0.03268412873148918, 0.009550189599394798, 0.011278858408331871, 0.06124968081712723, -0.019969437271356583, 0.005743338726460934, -0.015992552042007446, 0.010013056918978691, -0.0156524870544672, -0.0690712034702301, 0.019364874809980392, 0.031833965331315994, 0.05327702313661575, -0.05815130099654198, -0.03317533805966377, -0.01753229647874832, -0.05369265750050545, -0.018599726259708405, 0.013451503589749336, -0.025448279455304146, -0.027299750596284866, 0.0251271054148674, 0.018410800024867058, 0.006664350628852844, 0.06869335472583771, -0.005148222669959068, 0.006976078264415264, -0.043641816824674606, -0.010542049072682858, -0.048176031559705734, -0.029056759551167488, 0.0007757757557556033, 0.015709163621068, 0.01167560275644064, -0.017759006470441818, 0.025504957884550095, 0.018495816737413406, 0.053239237517118454, 0.026903007179498672, 0.06124968081712723, 0.04020337015390396, -0.0379551537334919, 0.011307197622954845, -0.026732973754405975, -0.057660095393657684, -0.02463589981198311, 0.0009304585983045399, -0.049385152757167816, -0.025939486920833588, 0.017910147085785866, 0.021858692169189453, -0.02839551866054535, -0.0033557910937815905, 0.012601338326931, -0.02320006489753723, 0.019383767619729042, -0.07133831083774567, 0.003074764274060726, -0.040581222623586655, -0.042470477521419525, -0.045039866119623184, 0.0024749254807829857, -0.015123494900763035, -0.03910760208964348, -0.03087044507265091, 0.028527766466140747, 0.0187697596848011, 0.04526657611131668, 0.010532602667808533, -0.04477537050843239, -0.03379879146814346, 0.01074986718595028, -0.030398130416870117, 0.02648737095296383, -0.02015836164355278, 0.04666462540626526, -0.014783428981900215, -0.03077598102390766, 0.00487900385633111, -0.019081486389040947, 0.05471285805106163, 0.06710637360811234, -0.03406328707933426, -0.009937486611306667, -0.00662656594067812, 0.007490900345146656, -0.00853943731635809, 0.029094543308019638, -0.025958377867937088, -0.025448279455304146, 0.012761924415826797, -0.03088933788239956, -0.028093237429857254, -0.037520624697208405, 0.013149222359061241, 0.016502652317285538, -0.03963659331202507, 0.002430055756121874, 0.08116244524717331, 0.022784428671002388, -0.014717305079102516, -0.04345288872718811, -0.0024229709524661303, -0.0013012251583859324, 0.04235712066292763, -0.07171615958213806, -0.02898118831217289, 0.028471089899539948, 0.059549350291490555, -0.033761005848646164, -0.005521351005882025, 0.029793567955493927, 0.021273024380207062, 0.04349067434668541, -0.007476730737835169, 0.00660767313092947, -0.04919622838497162, -0.06699302047491074, -0.029982494190335274, 0.027998775243759155, -0.02775317244231701, -0.08607450872659683, 0.011420552618801594, -0.03667046129703522, 0.01694662682712078, -0.029944708570837975, 0.0012327396543696523, -0.03030366823077202, 0.029869139194488525, -0.01692773401737213, -0.02650626376271248, -0.04197927191853523, 0.04522879049181938, -0.03219292312860489, -0.03725612908601761, 0.051274411380290985, 0.04602227732539177, 0.03347761929035187, -0.019912758842110634, 0.0033298139460384846, 0.04175255820155144, 0.01007918082177639, -0.0283766258507967, 0.09514293819665909, 0.026581833139061928, 0.013706552796065807, -0.05418386310338974, -0.045115433633327484, 0.043792955577373505, 0.017466172575950623, 0.0567532517015934, 0.013319255784153938, -0.018703635782003403, -0.05150112137198448, -0.04152584820985794, 0.010645957663655281, 0.025429386645555496, 0.012478536926209927, -0.043226178735494614, -0.024220263585448265, 0.014273329637944698, -0.026241766288876534, 0.06226988136768341, -0.036953847855329514, -0.031210510060191154, 0.05089655891060829, -0.012969743460416794, -0.024938181042671204, 0.03710499033331871, 0.046173419803380966, -0.025523848831653595, -0.003641541115939617, -0.015284081920981407, 0.05342816188931465, 0.0189681313931942, -0.02021504007279873, -0.01815575174987316, -0.002079362515360117, 0.008435528725385666, -0.02699746936559677, 0.026562940329313278, 0.03903203085064888, -0.023766841739416122, -0.07292528450489044, 0.020328395068645477, -0.008355234749615192, -0.001650737482123077, -0.009351817891001701, 0.005389103200286627, -0.04968743398785591, 0.02716750279068947, -0.004038284998387098, 0.001565721002407372, -0.062043171375989914, -0.01830689236521721, 0.012469090521335602, -0.029906922951340675, -0.0819937139749527, -0.07186730206012726, 0.015199065208435059, 0.0069288467057049274, -0.06495262682437897, 0.01766454428434372, -0.01567137986421585, 0.036198146641254425, -0.004815241321921349, 0.03716166689991951, -0.03034145198762417, -0.03540465980768204, -0.05172783136367798, 0.027942096814513206, -0.0006411662907339633, -0.029189007356762886, 0.03848414495587349, 0.060191698372364044, -0.07715722173452377, -0.01628538779914379, 0.01634206436574459, 0.026052841916680336, 0.010834883898496628, -0.010986024513840675, -0.006088127847760916, 0.04205483943223953, 0.027413105592131615, -0.04594670981168747, -0.0022529379930347204, -0.007665656507015228, 0.01881699077785015, -0.03251409903168678, -0.0006571068661287427, -0.04541771486401558, -0.03444113954901695, 0.024768147617578506, 0.1073853150010109, -0.0013272024225443602, 0.021707551553845406, -0.016710469499230385, -0.023502346128225327, 0.04715583100914955, -0.07058260589838028, -0.019686048850417137, 0.013054759241640568, -0.11630260199308395, 0.0078262435272336, -0.040052227675914764, 0.02952907234430313, -0.02586391568183899, 0.014641734771430492, -0.08063344657421112, 0.011892867274582386, 0.0313616506755352, 0.0314750075340271, 0.04900730401277542, 0.02780984900891781, -0.01224237959831953, 0.03657599911093712, 0.04764704033732414, -0.006990247406065464, 0.0024040783755481243, -0.018391907215118408, -0.02896229550242424, -0.029453502967953682, -0.010740420781075954, 0.04900730401277542, 0.04983857646584511, -0.04084571823477745, 0.05735781416296959, -0.07322756946086884, -0.016483759507536888, 0.004550745710730553, 0.01481176819652319, 0.01544466894119978, 0.02586391568183899, 0.03857861086726189, -0.02767760120332241, -0.031833965331315994, -0.016653792932629585, 0.04296168312430382, 0.007797904312610626, 0.004503514152020216, -0.008383573964238167, -0.0313616506755352, -0.0016932457219809294, -0.012610784731805325, -0.015123494900763035, -0.0564131885766983, -0.004491706378757954, -0.03948545083403587, 0.020252825692296028, 0.014688965864479542, 0.010797098278999329, -0.04598449170589447, -0.06385685503482819, 0.011127718724310398, -0.021046312525868416, 0.04995192959904671, 0.05894479155540466, 0.001196135301142931, -0.06793764978647232, 0.01264856941998005, -0.005629983264952898, -0.07164058834314346, 0.017910147085785866, -0.016228709369897842, -0.024333618581295013, -0.056904394179582596, -0.011344983242452145, 0.018099073320627213, -0.003599032759666443, 0.04541771486401558, -0.030095849186182022, -0.06038062274456024, -0.054448358714580536, 0.01949712261557579, -0.010986024513840675, -0.004964020568877459, -0.013281470164656639, -0.04658905416727066, 0.061967600136995316, -0.03262745216488838, 0.023086709901690483, 0.012950850650668144, 0.008161586709320545, 0.030454808846116066, -0.044964294880628586, 0.02767760120332241, 0.0567910373210907, 0.03415774926543236, -0.052596889436244965, -0.016153139993548393, 0.019969437271356583, 0.010532602667808533, 0.0003527595254126936, -0.046853549778461456, 0.025429386645555496, -0.04137470945715904, 0.0008489844622090459, 0.03294862434267998, 0.009257354773581028, -0.0019400297896936536, -0.0696001946926117, -0.000908023735973984, 0.008274941705167294, 0.05271024629473686, -0.03022809699177742, 0.04039229452610016, 0.023426774889230728, -0.026808543130755424, -0.012695800513029099, 0.013064205646514893, -0.016096461564302444, 0.0377473384141922, 0.011760619468986988, 0.06185424327850342, 0.08501652628183365, 0.02646847814321518, 0.031248295679688454, -0.038635287433862686, -0.021273024380207062, -0.006758813746273518, 0.052634675055742264, -0.018514709547162056, 0.0018715442856773734, 0.05271024629473686, -0.011562246829271317, 0.017437834292650223, -0.02964242734014988, 0.014235544949769974, 0.0505187064409256, 0.029189007356762886, -0.03353429585695267, 0.021084098145365715, -0.025523848831653595, -0.0441708080470562, -0.09023086726665497, 0.0010833702981472015, -0.04866723716259003, 0.0626855194568634, 0.015973661094903946, 0.021575303748250008, 0.026090625673532486, 0.03088933788239956, 0.004118578042834997 ]
717,656
pytorch_optimizer.optimizer.radam
__str__
null
def __str__(self) -> str: return 'RAdam'
(self) -> str
[ 0.010679416358470917, -0.024664992466568947, 0.021341340616345406, -0.011291668750345707, 0.010793120600283146, -0.07745856791734695, 0.018315069377422333, 0.006056917365640402, 0.0981001928448677, -0.06843223422765732, -0.05524258688092232, 0.0014300447655841708, -0.00334333092905581, 0.04775562137365341, 0.002785744611173868, -0.00013966989354230464, 0.004353546071797609, -0.037084951996803284, -0.009900982491672039, 0.03169713914394379, 0.004526288248598576, 0.03281668573617935, 0.041843023151159286, -0.001565614715218544, -0.031784601509571075, 0.07109115272760391, -0.00876831728965044, -0.023527953773736954, -0.0204492025077343, 0.020204301923513412, 0.0033345844130963087, -0.07584922760725021, -0.0002875395875889808, 0.0031749617774039507, -0.04226285219192505, 0.009586110711097717, -0.05226879194378853, 0.02912568300962448, -0.0429275818169117, -0.02298567444086075, 0.004242028575390577, 0.028600895777344704, -0.0007981136441230774, -0.04348735511302948, -0.027918672189116478, -0.04037361964583397, 0.03869429975748062, 0.025399694219231606, -0.0004157297662459314, 0.008715838193893433, 0.00975229311734438, 0.024962371215224266, -0.045271631330251694, -0.007504455279558897, -0.03234437480568886, 0.013058451935648918, 0.033953722566366196, 0.0020936818327754736, -0.007189583033323288, 0.02753382734954357, -0.026221860200166702, -0.04124826192855835, 0.051778990775346756, -0.03349890932440758, -0.03015776351094246, 0.014326686970889568, 0.0006324777496047318, 0.03792461380362511, 0.031207337975502014, 0.0365251787006855, 0.028233544901013374, -0.039533957839012146, -0.003164028748869896, 0.0365251787006855, 0.03015776351094246, -0.0023921544197946787, -0.10929565131664276, -0.011973891407251358, 0.02022179588675499, -0.03666512295603752, 0.05300349369645119, -0.004172057379037142, -0.033586371690034866, -0.005912601016461849, -0.034023694694042206, -0.10054919868707657, -0.04828041046857834, -0.07689879834651947, -0.024630006402730942, -0.0010020153131335974, -0.01892732083797455, 0.006594824139028788, -0.013277112506330013, 0.048525311052799225, -0.03152221068739891, -0.0207990612834692, 0.02261832170188427, -0.04173806309700012, 0.020851539447903633, 0.03704996779561043, 0.0036100978031754494, 0.029772918671369553, -0.02100897580385208, 0.03159218281507492, -0.05247870832681656, -0.011728990823030472, -0.03624529391527176, 0.010495740920305252, 0.006441761273890734, 0.018070168793201447, -0.056502074003219604, 0.02884579636156559, 0.010959303006529808, 0.011510329321026802, 0.012699847109615803, -0.055977288633584976, 0.004762442782521248, 0.002166933147236705, 0.03589543700218201, -0.02623935416340828, 0.039813846349716187, 0.010040925815701485, -0.043242454528808594, -0.014466630294919014, 0.03680506721138954, 0.0689920037984848, -0.05289853736758232, -0.026344310492277145, 0.03900917246937752, -0.03711993992328644, 0.03781965374946594, 0.007959270849823952, -0.05811142176389694, -0.03029770590364933, 0.10159877687692642, 0.011291668750345707, 0.04481681436300278, 0.04065350443124771, 0.055837344378232956, 0.14512111246585846, 0.008637120015919209, 0.00225439784117043, 0.0568169467151165, 0.04320747032761574, -0.00775372888892889, -0.017151789739727974, -0.009621095843613148, 0.0757792517542839, -0.006953428499400616, 0.0033586372155696154, 0.04208792373538017, 0.030630072578787804, 0.04789556562900543, 0.023737868294119835, -0.003922783304005861, 0.02616938203573227, -0.016714468598365784, -0.044466957449913025, 0.013303352519869804, -0.04201795160770416, -0.004653112031519413, -0.05891609564423561, -0.006717274431139231, -0.007758101914077997, 0.010154630057513714, 0.02804112248122692, -0.00025296377134509385, 0.029405567795038223, 0.005344081670045853, 0.00866773258894682, -0.011956398375332355, -0.06934186071157455, -0.08907385915517807, 0.03311406448483467, -0.007001534104347229, 0.05107927322387695, 0.0028447832446545362, 0.08830416947603226, 0.021831141784787178, -0.018962306901812553, 0.006848471239209175, -0.0233355313539505, -0.02559211663901806, 0.0019613916520029306, 0.0771087110042572, -0.04884018376469612, 0.015761105343699455, 0.03827447071671486, 0.044606901705265045, -0.0006434108363464475, -0.004495675675570965, 0.009734800085425377, -0.03573799878358841, 0.018070168793201447, -0.021271368488669395, -0.052723608911037445, -0.008396592922508717, -0.05933592468500137, 0.010915570892393589, 0.004242028575390577, -0.012656114995479584, 0.057936493307352066, -0.026799125596880913, 0.028233544901013374, 0.061994846910238266, 0.011790215969085693, 0.021148918196558952, -0.007591919507831335, 0.01395058911293745, -0.047860581427812576, 0.0228282380849123, 0.02573205903172493, -0.008938873186707497, 0.017589112743735313, 0.04012871906161308, -0.05349329486489296, 0.011038021184504032, -0.02658921107649803, -0.0006073316908441484, 0.023877810686826706, 0.053668223321437836, -0.01402056124061346, -0.00458314036950469, -0.04492177441716194, -0.03523070365190506, -0.010355798527598381, 0.015638655051589012, -0.034181129187345505, -0.017947718501091003, -0.002752945525571704, 0.0248574148863554, -0.08144695311784744, -0.020886525511741638, 0.007473842706531286, -0.02036173827946186, 0.01913723535835743, -0.04450194165110588, -0.00948989950120449, -0.07430984824895859, -0.032221924513578415, -0.023737868294119835, 0.021481283009052277, 0.004705590661615133, 0.025399694219231606, 0.04681100696325302, -0.05118423327803612, 0.00005480198160512373, 0.012717340141534805, -0.023790346458554268, -0.047720637172460556, 0.03687503933906555, -0.04093339294195175, -0.01290101557970047, 0.003820012556388974, -0.0005980386049486697, -0.04660109058022499, -0.026939069852232933, 0.023580431938171387, 0.006524852477014065, 0.004858653526753187, -0.05188394710421562, -0.007500081788748503, -0.03589543700218201, 0.035703014582395554, 0.002842596499249339, 0.021288862451910973, -0.03318403661251068, 0.031994517892599106, 0.045481543987989426, -0.022146014496684074, 0.09858999401330948, 0.02391279675066471, -0.06846722215414047, 0.02391279675066471, -0.02898573875427246, -0.020239287987351418, -0.010390783660113811, 0.039114128798246384, -0.1021585464477539, -0.055907316505908966, -0.02805861458182335, -0.03984883055090904, 0.007307659834623337, 0.026431774720549583, 0.00968232098966837, -0.06444384902715683, 0.03414614498615265, -0.010539473965764046, 0.003876864444464445, 0.02239091508090496, 0.07091622799634933, -0.003181521547958255, -0.024962371215224266, 0.003909663762897253, 0.03610534965991974, -0.0035794852301478386, 0.03614033758640289, 0.020536666736006737, -0.01607597805559635, -0.0018651806749403477, -0.021358832716941833, -0.02036173827946186, 0.013539506122469902, -0.03101491555571556, -0.04810548201203346, -0.015428739599883556, -0.026186874136328697, -0.0010517607443034649, -0.005212884861975908, 0.0228282380849123, -0.03290414810180664, 0.02594197355210781, 0.01427420787513256, 0.08739454299211502, 0.015997258946299553, 0.0618898868560791, -0.003157468745484948, 0.007150223944336176, 0.034233611077070236, 0.05415802448987961, -0.0497148297727108, -0.008807675912976265, -0.04481681436300278, -0.009201266802847385, 0.003684442490339279, -0.01595352590084076, -0.051988907158374786, 0.07263053208589554, 0.005794523749500513, 0.04856029525399208, -0.03718990832567215, -0.05811142176389694, 0.032869163900613785, -0.007403871044516563, -0.03795959800481796, 0.0028972618747502565, 0.03841441497206688, -0.010880584828555584, -0.02674664743244648, -0.025049835443496704, 0.09418178349733353, -0.020746581256389618, -0.034461017698049545, 0.03124232403934002, 0.018385039642453194, 0.041843023151159286, -0.02861838787794113, 0.00033345844713039696, 0.020239287987351418, -0.004810547921806574, 0.004034300800412893, -0.011624033562839031, 0.007167716510593891, 0.010591952130198479, 0.017449170351028442, 0.011142978444695473, -0.016758199781179428, 0.08361607044935226, -0.021131426095962524, 0.011895173229277134, -0.025539636611938477, -0.06451382488012314, 0.01102052815258503, 0.023160602897405624, -0.03467093035578728, -0.003113736631348729, -0.02107894793152809, 0.013688196428120136, 0.05527757108211517, -0.05356326699256897, -0.012883522547781467, 0.006358670070767403, -0.030420156195759773, -0.025644594803452492, -0.032309390604496, 0.07528945058584213, 0.046286217868328094, 0.016355862841010094, -0.05527757108211517, -0.018962306901812553, 0.040408603847026825, 8.498748798047018e-7, 0.03624529391527176, 0.04044359177350998, -0.005322215612977743, 0.004362292587757111, 0.015909794718027115, 0.015498711727559566, -0.0033214648719877005, -0.01564740017056465, -0.022740771993994713, -0.033586371690034866, -0.0014508175663650036, -0.00599569221958518, -0.059685781598091125, -0.054682813584804535, -0.02407023310661316, -0.026659183204174042, -0.0713360533118248, 0.026151888072490692, 0.022740771993994713, -0.022146014496684074, -0.014580333605408669, -0.007810581009835005, -0.04002375900745392, 0.05524258688092232, 0.02384282648563385, 0.0022762638982385397, -0.02877582423388958, 0.0147115308791399, 0.00826539658010006, -0.01253366470336914, -0.049609869718551636, -0.06276453286409378, 0.08368604630231857, 0.005365947727113962, -0.012542410753667355, 0.004727456718683243, 0.02602943778038025, -0.008484057150781155, -0.05608224496245384, 0.054542869329452515, 0.02646676078438759, 0.09432172775268555, 0.008777063339948654, 0.03159218281507492, 0.032589275389909744, 0.04443197324872017, 0.06206481531262398, -0.010382037609815598, -0.03239685669541359, 0.0005379067151807249, -0.01739669218659401, -0.01943461410701275, 0.03900917246937752, -0.02861838787794113, 0.0030240854248404503, -0.029877876862883568, -0.041563134640455246, 0.021341340616345406, 0.03670010715723038, -0.06381410360336304, 0.0009304037084802985, 0.008107960224151611, 0.006695408374071121, -0.04964485764503479, -0.0591609962284565, 0.0056458343751728535, 0.05093933269381523, -0.0043994649313390255, 0.006205607205629349, 0.03792461380362511, -0.009253744967281818, -0.03928905725479126, 0.021936099976301193, -0.028216050937771797, 0.007088998798280954, -0.04849032312631607, 0.007635651621967554, 0.00198325770907104, -0.059965670108795166, 0.06342926621437073, -0.029877876862883568, 0.03746979683637619, 0.02384282648563385, 0.03820449858903885, 0.0017449170118197799, 0.03271172568202019, -0.043242454528808594, -0.007456349674612284, 0.029737934470176697, -0.01904977113008499, -0.02065911702811718, -0.0279011782258749, -0.010574459098279476, 0.05398309603333473, -0.05436794087290764, -0.022653307765722275, -0.020851539447903633, -0.009524885565042496, -0.04240279644727707, -0.029737934470176697, 0.003413302591070533, 0.07179087400436401, 0.006782873068004847, 0.013329591602087021, -0.003820012556388974, 0.031417250633239746, -0.023737868294119835, -0.0015590549446642399, 0.027201462537050247, 0.0233355313539505, -0.06983166933059692, -0.0031727750319987535, -0.03421611711382866, 0.03949897363781929, -0.008934499695897102, -0.017772788181900978, -0.08312626928091049, 0.021621227264404297, 0.014597826637327671, -0.03370882198214531, 0.0005354468012228608, -0.019609542563557625, 0.04999471455812454, -0.021796155720949173, 0.014204236678779125, -0.005484024994075298, -0.009218759834766388, -0.03390124440193176, -0.0006816765526309609, -0.027883686125278473, 0.021201398223638535, -0.0020412029698491096, 0.012166313827037811, -0.0031487224623560905, -0.006997161079198122, 0.011659019626677036, -0.01755412667989731, 0.040338631719350815, -0.006349923554807901, -0.029755426570773125, -0.047440752387046814, -0.03152221068739891, -0.02036173827946186, 0.027708757668733597, -0.030017821118235588, 0.031994517892599106, -0.017134297639131546, 0.09858999401330948, -0.0077624754048883915, 0.046566106379032135, 0.005680819973349571, 0.04712587967514992, -0.010486994870007038, 0.0804673507809639, -0.09677073359489441, 0.014151757583022118, 0.017090564593672752, 0.041073333472013474, 0.029195653274655342, -0.0250148493796587, 0.012647368013858795, -0.03050762228667736, -0.00040425005136057734, -0.04110832139849663, -0.016215920448303223, 0.01739669218659401, 0.02239091508090496, -0.005470904987305403, 0.004696844145655632, -0.04821043834090233, -0.036420222371816635, -0.03050762228667736, -0.01166776567697525, 0.04320747032761574, -0.01897979900240898, 0.010906824842095375, 0.05282856523990631, 0.0355105921626091, -0.02151626907289028, -0.0008877647924236953, 0.0824965238571167, 0.033376459032297134, 0.04835038259625435, 0.053598251193761826, -0.025679580867290497, 0.02506732940673828, -0.0026851603761315346, -0.044257041066884995, -0.0089563662186265, -0.061714958399534225, 0.03470591828227043, 0.06934186071157455, -0.08403590321540833, 0.05734173208475113, 0.040268659591674805, 0.04789556562900543, -0.03514324128627777, 0.030420156195759773, -0.033236514776945114, 0.049260012805461884, -0.007709996774792671, -0.05492771416902542, -0.04709089174866676, -0.009428674355149269, -0.02609940990805626, 0.00043978248140774667, 0.008247903548181057, -0.03977885842323303, -0.04621624946594238, 0.006376162637025118, -0.03977885842323303, -0.029685454443097115, 0.06272954493761063, -0.06566835194826126, -0.0024599393364042044, -0.023388009518384933, 0.009402435272932053, 0.004810547921806574, 0.03458346799015999, 0.01769407093524933, 0.02036173827946186, 0.050274599343538284, 0.0676625445485115, 0.053948111832141876, 0.001131572062149644, 0.02109644003212452, -0.03237936273217201, 0.029388075694441795, -0.04404712840914726, -0.011650272645056248, -0.0029038218781352043, 0.004349173046648502, -0.003153095720335841, -0.02601194567978382, 0.028513431549072266, -0.02529473602771759, -0.024839920923113823, 0.014449137263000011, 0.015638655051589012, 0.06731268763542175, -0.02550465054810047, 0.05107927322387695, -0.04877021163702011, 0.004182990174740553, 0.011116739362478256, -0.014484123326838017, 0.05268862098455429, -0.09341210126876831, -0.003476714249700308, -0.0147115308791399, -0.015638655051589012, -0.08207669854164124, -0.02326555922627449, 0.0007352485554292798, 0.021778663620352745, 0.0270440261811018, -0.02861838787794113, 0.019452108070254326, -0.0233355313539505, -0.0001929685822688043, -0.053948111832141876, 0.04299755394458771, -0.060560427606105804, 0.040548548102378845, -0.06965673714876175, -0.052513692528009415, -0.007312033325433731, -0.04929499700665474, -0.04684599116444588, 0.020134329795837402, -0.0005674260319210589, 0.02204105630517006, -0.004058353137224913, -0.00178427598439157, -0.012594889849424362, 0.007342645898461342, -0.04233282431960106, -0.024595020338892937, 0.004587513394653797, -0.062379688024520874, 0.006258085835725069, -0.058321334421634674, 0.06955178081989288, 0.027778727933764458, -0.03073502890765667, -0.005392187274992466, 0.0003960502508562058, -0.04201795160770416, -0.01862994022667408, 0.0385543555021286, 0.012026370503008366, -0.06500362604856491, -0.018070168793201447, 0.005322215612977743, 0.020326752215623856, -0.00819542445242405, 0.05940589681267738, -0.05828635022044182, 0.00906132347881794, -0.020904017612338066, -0.005169152747839689, -0.06934186071157455, 0.03442602977156639, 0.06741764396429062, -0.06412898004055023, 0.013443294912576675, 0.03984883055090904, -0.06486368179321289, -0.04688097909092903, -0.04681100696325302, -0.018647434189915657, 0.032589275389909744, 0.07556933909654617, 0.04523664340376854, -0.007832447066903114, -0.01819261908531189, -0.004749322775751352, -0.006349923554807901, 0.012953493744134903, 0.053738195449113846, -0.003124669659882784, -0.013539506122469902, 0.0004602819972205907, -0.01337332371622324, -0.00894761923700571, 0.025609608739614487, 0.022670801728963852, -0.038449399173259735, 0.06213478744029999, 0.06507359445095062, -0.02160373516380787, -0.010600699111819267, 0.049959730356931686, -0.08648490905761719, 0.005838256329298019, 0.03197702392935753, 0.004397278185933828, 0.03318403661251068, 0.0011086126323789358, 0.0056502074003219604, -0.008877648040652275, 0.0054534124210476875, 0.04537658765912056, 0.04100336134433746, -0.04100336134433746, -0.03691002354025841, -0.05471779778599739, -0.010600699111819267, 0.019592050462961197, 0.045481543987989426, -0.020676610991358757, 0.038519371300935745, 0.040268659591674805, 0.0037500408943742514, 0.026851605623960495, 0.0022369048092514277, 0.07214073091745377, 0.05972076952457428, 0.01696811430156231, 0.033586371690034866, 0.003984008450061083, -0.020571652799844742, 0.007985509932041168, 0.03834444284439087, 0.04691596329212189, 0.03813452646136284, -0.02667667530477047, 0.022863222286105156, 0.0750795379281044, 0.02884579636156559, -0.0010211481712758541, 0.03463594615459442, 0.0030065926257520914, -0.02935308963060379, -0.008348487317562103, 0.029475539922714233, 0.017134297639131546, -0.007994255982339382, 0.003452661680057645, -0.03510825335979462, 0.003297412069514394, -0.007145850453525782, -0.010994289070367813, 0.04775562137365341, 0.009175026789307594, 0.01601475290954113 ]
717,677
pytorch_optimizer.optimizer.radam
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=True, 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) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) if step_size > 0 or n_sma >= self.n_sma_threshold: 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'], ) 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) if n_sma >= self.n_sma_threshold: de_nom = exp_avg_sq.sqrt().add_(group['eps']) p.addcdiv_(exp_avg, de_nom, value=-step_size) elif step_size > 0: p.add_(exp_avg, alpha=-step_size) return loss
(self)
[ -0.00759824737906456, -0.01429683156311512, -0.021650604903697968, 0.05875195935368538, 0.006307425443083048, 0.00029184066806919873, -0.03160557895898819, -0.044239990413188934, -0.03860731050372124, 0.018267087638378143, -0.02370418608188629, 0.012301924638450146, 0.030764590948820114, 0.07608026266098022, -0.026540081948041916, 0.041462767869234085, 0.010541712865233421, 0.05394071340560913, 0.03225099295377731, -0.0021953752730041742, -0.009734949097037315, -0.05793052539229393, -0.03553672134876251, 0.04021105915307999, -0.06438463926315308, 0.004821024369448423, 0.05378424748778343, 0.00108240800909698, -0.019968625158071518, 0.0008562696748413146, -0.008884180337190628, -0.07400712370872498, 0.025875113904476166, -0.0007835387368686497, 0.03917448967695236, -0.05859549343585968, -0.0009045532788150012, 0.007427115924656391, -0.09168747812509537, -0.03661240637302399, -0.02499500662088394, -0.012165019288659096, 0.01614505425095558, 0.012487724423408508, -0.000620963575784117, -0.0006194356246851385, -0.034324128180742264, 0.03856819495558739, -0.005549556575715542, -0.004887032322585583, 0.012341040186583996, -0.05092879384756088, 0.05437098816037178, 0.002811449347063899, 0.03129265457391739, 0.09778954088687897, 0.05808698758482933, -0.05750025063753128, 0.02953244186937809, -0.044318221509456635, 0.06293734908103943, -0.06473667919635773, 0.042166851460933685, -0.010668839327991009, 0.006957726087421179, -0.006815931294113398, -0.06864825636148453, -0.019870834425091743, 0.01597881130874157, 0.03737516328692436, 0.01648731715977192, 0.005109503865242004, 0.004933482501655817, 0.0014595089014619589, -0.044318221509456635, -0.01871691830456257, -0.030334316194057465, -0.05793052539229393, 0.030099621042609215, -0.03105795942246914, 0.013768767938017845, 0.0008416012860834599, -0.03356137126684189, 0.014824895188212395, -0.004334521479904652, -0.03684709966182709, -0.012018335051834583, -0.03277905657887459, -0.014521746896207333, -0.024173574522137642, 0.040093712508678436, 0.012135682627558708, 0.023899763822555542, 0.039819903671741486, 0.03854863718152046, 0.041697461158037186, -0.03719914332032204, -0.026422735303640366, -0.026774777099490166, -0.026422735303640366, 0.013309156522154808, 0.042910050600767136, 0.029356421902775764, 0.05433186888694763, 0.042127735912799835, -0.03735560551285744, -0.005016603507101536, -0.03381562605500221, 0.040993377566337585, -0.05425363779067993, -0.020653150975704193, -0.008820616640150547, -0.04693898186087608, -0.012438829988241196, -0.05288458615541458, -0.019870834425091743, -0.0023616175167262554, 0.014932462945580482, -0.044357337057590485, 0.030021389946341515, 0.043809715658426285, -0.020418455824255943, -0.05448833480477333, -0.0021758172661066055, 0.024545175954699516, 0.023117447271943092, 0.05730467289686203, 0.01636997051537037, 0.015264947898685932, -0.06794417649507523, -0.001173474476672709, 0.0014998471597209573, -0.0008544361335225403, -0.00924111157655716, 0.006884383969008923, -0.01669267565011978, -0.005529998801648617, 0.01899072900414467, -0.004275847692042589, -0.00013896811287850142, -0.007432005368173122, 0.008585921488702297, -0.010522155091166496, 0.003041254822164774, 0.020555362105369568, 0.023547722026705742, 0.042049504816532135, 0.04807334020733833, 0.00773515272885561, -0.001365386531688273, 0.020105529576539993, 0.016115717589855194, 0.01502047386020422, 0.019098298624157906, 0.005231740418821573, 0.019127635285258293, -0.024271365255117416, 0.05225873365998268, -0.01794438064098358, -0.02487765997648239, -0.032524801790714264, -0.021435467526316643, -0.01723051816225052, -0.007045736536383629, 0.010023428127169609, 0.002735662506893277, -0.007104410324245691, 0.05742201954126358, -0.041267186403274536, 0.021591931581497192, 0.007837831974029541, -0.016086379066109657, 0.038802891969680786, 0.03035387396812439, -0.03915493190288544, 0.13025566935539246, 0.01447285246104002, 0.013670978136360645, -0.022354690358042717, -0.012135682627558708, -0.004275847692042589, -0.007265762891620398, -0.019636141136288643, -0.044748496264219284, -0.0011013547191396356, 0.01829642429947853, 0.008742385543882847, -0.006067841313779354, 0.02495589107275009, 0.003158602165058255, -0.002818783512338996, -0.019049402326345444, 0.044552914798259735, -0.01269308291375637, -0.014815116301178932, 0.020633593201637268, 0.01794438064098358, 0.007079963106662035, 0.08777589350938797, 0.004970153793692589, -0.013573188334703445, -0.011324029415845871, 0.02933686226606369, 0.0002770194550976157, -0.03385474160313606, -0.01265396736562252, -0.02636406011879444, 0.06356320530176163, -0.01755322329699993, 0.01460975781083107, -0.07584556937217712, -0.006654578261077404, 0.03604522719979286, 0.07584556937217712, 0.05867372453212738, -0.07177752256393433, 0.01841377094388008, 0.021885300055146217, 0.07220780104398727, 0.0051681771874427795, -0.044787611812353134, -0.07697992771863937, 0.019616583362221718, 0.0024215136654675007, 0.06274177134037018, -0.023371700197458267, 0.02812427282333374, -0.048855654895305634, -0.010052764788269997, 0.0009907303610816598, -0.008639706298708916, -0.024427827447652817, 0.007515126373618841, -0.01668289676308632, 0.03903758525848389, 0.03160557895898819, -0.046391360461711884, -0.02745930477976799, 0.006297646556049585, -0.010052764788269997, -0.033620044589042664, -0.03563451021909714, -0.02796780876815319, 0.043418556451797485, -0.008996638469398022, 0.03802057355642319, 0.05871284380555153, 0.018658244982361794, -0.023410817608237267, 0.03917448967695236, -0.023665068671107292, -0.03234878182411194, -0.019528571516275406, 0.040406640619039536, -0.04842538386583328, -0.019675256684422493, 0.07138636708259583, 0.04940327629446983, 0.043105632066726685, -0.045921970158815384, 0.03980034589767456, -0.05929958075284958, -0.039389628916978836, 0.045648157596588135, -0.04866007715463638, 0.012751756235957146, 0.043301209807395935, -0.039467860013246536, 0.05253254249691963, 0.042870935052633286, 0.06199857220053673, 0.08441193401813507, -0.06485402584075928, -0.03408943489193916, 0.00852235872298479, 0.04627401381731033, 0.01173474546521902, 0.007348884362727404, -0.010883975774049759, -0.026305386796593666, 0.06262442469596863, -0.05104614049196243, -0.06583192199468613, 0.005549556575715542, -0.06414993852376938, 0.03332667797803879, -0.017406538128852844, -0.02640317752957344, 0.06946969032287598, 0.0011105225421488285, 0.03199673816561699, 0.014208820648491383, 0.08863644301891327, 0.005578893702477217, 0.07917041331529617, 0.004632779862731695, -0.013670978136360645, 0.005896709393709898, -0.03665152192115784, 0.009250890463590622, 0.08699357509613037, -0.023078331723809242, 0.004703677259385586, 0.00387246604077518, -0.029317304491996765, -0.02429092302918434, 0.0034470814280211926, 0.00852235872298479, 0.025601303204894066, -0.029864925891160965, -0.01369053591042757, 0.0019264540169388056, 0.007417337037622929, 0.01498135831207037, -0.0025229703169316053, -0.08425547182559967, -0.005339309107512236, -0.05386248230934143, 0.030177854001522064, 0.06411082297563553, -0.027322398498654366, 0.027674440294504166, 0.027009472250938416, 0.023860648274421692, -0.019098298624157906, -0.01859957166016102, 0.06970438361167908, 0.013866557739675045, -0.02745930477976799, -0.037081796675920486, -0.08316022902727127, -0.012477945536375046, 0.05437098816037178, 0.028300294652581215, -0.041345417499542236, -0.01790526509284973, 0.02961067296564579, -0.008238769136369228, 0.018902719020843506, -0.05030294135212898, 0.07209045439958572, 0.03612345829606056, -0.014189262874424458, 0.02816338837146759, 0.03723825886845589, -0.030803706496953964, 0.042205967009067535, 0.014619536697864532, 0.021826626732945442, 0.019645920023322105, -0.01196944061666727, -0.016810022294521332, -0.023625953122973442, 0.05597473308444023, 0.03694488853216171, 0.03723825886845589, -0.004398084711283445, -0.018237749114632607, 0.020105529576539993, -0.08159559220075607, 0.018619129434227943, 0.022667616605758667, -0.04873830825090408, 0.09505143761634827, 0.08261260390281677, -0.003033920656889677, -0.042831819504499435, -0.03616257384419441, 0.05382336303591728, -0.022002646699547768, 0.015998369082808495, -0.045491695404052734, 0.005481103900820017, 0.023176122456789017, -0.03743383660912514, -0.016125496476888657, -0.03166425600647926, -0.011793418787419796, 0.06434551626443863, 0.05124172195792198, 0.040719565004110336, -0.03845084831118584, -0.029551999643445015, 0.031155748292803764, 0.05280635505914688, -0.03225099295377731, 0.01742609590291977, -0.05867372453212738, 0.02781134657561779, -0.06504960358142853, 0.06833533197641373, 0.012477945536375046, -0.0038382397033274174, 0.005212182644754648, -0.06626219302415848, 0.02898482047021389, 0.03172292932868004, 0.040484871715307236, -0.04803422465920448, -0.00791117362678051, -0.023645510897040367, -0.0033737393096089363, 0.019362330436706543, 0.009177548810839653, -0.024154016748070717, -0.07975715398788452, -0.00046938980813138187, 0.02691168151795864, 0.01867780275642872, 0.06935234367847443, -0.003332178806886077, 0.015773452818393707, -0.06113802269101143, 0.006869715638458729, 0.009671386331319809, -0.040132828056812286, -0.01648731715977192, -0.01238015666604042, -0.01867780275642872, -0.0044103083200752735, 0.041736576706171036, 0.021298563107848167, 0.022256899625062943, 0.03438280522823334, -0.031273096799850464, -0.04819068685173988, -0.05018559470772743, -0.01378832571208477, -0.06450198590755463, -0.005965162068605423, -0.022706732153892517, -0.043027400970458984, -0.02933686226606369, -0.017015380784869194, -0.03035387396812439, 0.013270040974020958, -0.026148924604058266, 0.03023652732372284, 0.05104614049196243, -0.0015658551128581166, -0.008644595742225647, -0.004336966201663017, -0.0034715288784354925, -0.004046042449772358, 0.0032539470121264458, -0.043418556451797485, 0.046039316803216934, -0.04866007715463638, -0.08675888180732727, 0.014521746896207333, -0.0017638788558542728, 0.0072951000183820724, 0.047838643193244934, 0.01781725510954857, 0.021200772374868393, -0.004141387064009905, -0.040954262018203735, -0.03577141463756561, -0.015049810521304607, 0.02886747382581234, 0.008673932403326035, 0.01829642429947853, -0.032681263983249664, 0.010707954876124859, 0.006517672911286354, -0.0002181929157814011, 0.07807517051696777, 0.05319751054048538, -0.012165019288659096, 0.0009778954554349184, -0.0044323112815618515, -0.03117530606687069, 0.03137088567018509, -0.02554262802004814, 0.00007460272900061682, -0.028769683092832565, -0.040328409522771835, -0.007505347486585379, 0.022706732153892517, -0.030334316194057465, 0.0068501573987305164, -0.05593561753630638, 0.023625953122973442, 0.03350269794464111, -0.005872262176126242, 0.047095444053411484, 0.006879494525492191, 0.002955688862130046, 0.039937250316143036, 0.06461933255195618, -0.046547822654247284, -0.07201222330331802, 0.04682163521647453, 0.03655373305082321, -0.045100536197423935, -0.05433186888694763, 0.041267186403274536, 0.016888253390789032, 0.09121808409690857, -0.03929184004664421, 0.012155240401625633, 0.03422633931040764, -0.06364143639802933, -0.009686054661870003, 0.0018775592325255275, -0.012135682627558708, -0.06184210628271103, 0.010414586402475834, -0.06188122183084488, 0.01711316965520382, -0.003376184031367302, -0.019929509609937668, -0.005393093451857567, 0.005911377724260092, 0.0006102678598836064, -0.03731648996472359, 0.047017212957143784, 0.06082509458065033, 0.039467860013246536, -0.05225873365998268, 0.019988182932138443, -0.006067841313779354, -0.016428643837571144, -0.0012083119945600629, -0.022550268098711967, 0.04850361496210098, -0.007837831974029541, 0.003532647155225277, -0.0028945705853402615, 0.00848324317485094, -0.010590607300400734, 0.024975448846817017, 0.05949515849351883, 0.08284730464220047, -0.0072462051175534725, -0.029786694794893265, -0.020633593201637268, -0.06571457535028458, -0.11320117861032486, -0.03545849025249481, -0.002425180748105049, -0.012888661585748196, 0.019108077511191368, -0.01648731715977192, -0.047643065452575684, 0.02738107182085514, 0.01896139234304428, 0.02573820762336254, -0.022432921454310417, -0.012204134836792946, -0.016907813027501106, 0.041462767869234085, -0.004214729182422161, 0.029669348150491714, 0.03905714303255081, 0.0019447895465418696, -0.03279861435294151, 0.01821819134056568, 0.0026574309449642897, -0.002911683637648821, -0.05331486091017723, -0.06403259187936783, 0.008937964215874672, -0.04003503918647766, -0.005133951082825661, 0.02663787081837654, 0.040367525070905685, -0.030647242441773415, -0.04752571880817413, 0.01927431859076023, -0.027048587799072266, 0.005309972446411848, -0.011900987476110458, -0.021200772374868393, -0.03809880465269089, 0.010551491752266884, 0.01574411615729332, -0.046782515943050385, -0.010316796600818634, -0.01946989819407463, 0.03837261721491814, -0.04748660326004028, -0.013798104599118233, -0.0016783130122348666, -0.0001185698201879859, 0.06090332940220833, -0.11335764080286026, 0.03661240637302399, -0.009598043747246265, 0.03141000121831894, -0.03397208824753761, 0.00820943247526884, -0.08120443671941757, -0.07834897935390472, 0.010008759796619415, 0.023137006908655167, -0.03367871791124344, 0.006840378511697054, 0.020614035427570343, 0.021494140848517418, -0.048855654895305634, 0.009001527912914753, 0.040445756167173386, 0.010737291537225246, -0.0032661708537489176, 0.0040289293974637985, -0.012174798175692558, 0.04021105915307999, 0.015499643050134182, -0.03199673816561699, -0.05296281725168228, -0.021963531151413918, 0.0062634204514324665, -0.019284097477793694, -0.06493225693702698, -0.018932055681943893, -0.009642048738896847, -0.006033614743500948, 0.07596291601657867, 0.004439645446836948, -0.020907403901219368, -0.001551186665892601, -0.045687273144721985, -0.007505347486585379, 0.03229010850191116, -0.029786694794893265, 0.06274177134037018, -0.06763125211000443, -0.032720379531383514, -0.040445756167173386, -0.044239990413188934, 0.037629418075084686, 0.03629947826266289, -0.05476214364171028, 0.06731832027435303, 0.014893347397446632, 0.05237608030438423, 0.043966177850961685, -0.026305386796593666, -0.07150371372699738, -0.014228378422558308, 0.040602218359708786, -0.016888253390789032, -0.02585555613040924, -0.014257715083658695, -0.002202709438279271, -0.02515147067606449, 0.041697461158037186, 0.05026382580399513, 0.019733930006623268, -0.013944788835942745, 0.047603949904441833, -0.045452579855918884, 0.018276866525411606, 0.030764590948820114, 0.014042578637599945, 0.03712091222405434, 0.02722460962831974, 0.010522155091166496, -0.03414810821413994, -0.022843636572360992, -0.019763266667723656, -0.02671610377728939, -0.00645410967990756, -0.010698175989091396, -0.01228236686438322, -0.011245797388255596, -0.020359782502055168, -0.010913313366472721, -0.011959660798311234, -0.09333033859729767, -0.027361514046788216, -0.07103432714939117, 0.005251298658549786, 0.02616848237812519, -0.01949923485517502, 0.03254435956478119, -0.043066516518592834, -0.03649505600333214, 0.014805336482822895, 0.021142099052667618, 0.03944830223917961, -0.021474583074450493, 0.02765488252043724, 0.030647242441773415, -0.009329122491180897, 0.0059553831815719604, 0.01824752800166607, -0.004940816666930914, 0.0014032799517735839, -0.043418556451797485, -0.022178668528795242, 0.01255617756396532, 0.03074503317475319, 0.021611489355564117, -0.06935234367847443, -0.03559539467096329, -0.01586146466434002, 0.01731852814555168, -0.05042028799653053, 0.021435467526316643, -0.02507323957979679, -0.015714779496192932, -0.007143526338040829, 0.03757074102759361, 0.02710726112127304, 0.030099621042609215, -0.008683711290359497, 0.010483039543032646, 0.027791788801550865, 0.0039873686619102955, 0.027909135445952415, -0.030177854001522064, 0.018619129434227943, -0.0003045227495022118, -0.01605704240500927, -0.03086237981915474, -0.028026483952999115, -0.06923499703407288, 0.05527064949274063, -0.03438280522823334, -0.02479942888021469, 0.040445756167173386, -0.007505347486585379, -0.05859549343585968, -0.014443515799939632, 0.045139651745557785, -0.012644187547266483, 0.03940918669104576, 0.006669247057288885, 0.01939166709780693, 0.006336762569844723, 0.0024985228665173054, 0.026305386796593666, -0.011138228699564934, 0.0007205866859294474, 0.042284198105335236, 0.028534987941384315, -0.017142506316304207, 0.0007994295447133482, 0.028730567544698715, 0.020281551405787468, 0.014228378422558308, -0.039272282272577286, 0.023841090500354767, 0.045257002115249634, -0.020281551405787468, -0.012605071999132633, 0.019675256684422493, -0.06774859875440598, 0.06285911798477173, 0.03854863718152046, 0.03324844315648079, 0.05718732625246048, 0.06724008917808533, -0.047330137342214584, 0.015284505672752857, -0.07404623925685883, -0.05683528259396553, -0.07353773713111877, -0.015519200824201107, -0.022472037002444267, 0.07435917109251022, 0.03176204487681389, 0.01214546151459217, 0.020594477653503418, 0.04736925661563873, 0.026657430455088615 ]
717,692
pytorch_optimizer.optimizer.shampoo_utils
RMSPropGraft
Graft using RMSProp. Essentially an implementation of RMSProp with momentum. :param var: torch.Tensor. variable. :param diagonal_eps: float. diagonal epsilon.
class RMSPropGraft(SGDGraft): r"""Graft using RMSProp. Essentially an implementation of RMSProp with momentum. :param var: torch.Tensor. variable. :param diagonal_eps: float. diagonal epsilon. """ def __init__(self, var: torch.Tensor, diagonal_eps: float): super().__init__(var) self.diagonal_eps = diagonal_eps self.statistics: torch.Tensor = torch.zeros_like(var) def add_statistics(self, grad: torch.Tensor, beta2: float): r"""Add the statistics.""" self.statistics.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2) def precondition_gradient(self, grad: torch.Tensor) -> torch.Tensor: r"""Get preconditioned gradient.""" return grad / (torch.sqrt(self.statistics) + self.diagonal_eps)
(var: torch.Tensor, diagonal_eps: float)
[ 0.008296038024127483, -0.03139621391892433, -0.023529279977083206, -0.0053727575577795506, 0.05989596247673035, -0.02610391192138195, -0.04022863134741783, -0.0077417767606675625, 0.06483067572116852, 0.015063388273119926, -0.01927398517727852, 0.0367242731153965, -0.0025433434639126062, 0.05907351151108742, -0.08153002709150314, 0.03304111585021019, 0.003247344633564353, 0.0024248925037682056, 0.03844069316983223, -0.008327326737344265, 0.001970085548236966, -0.009288344532251358, -0.016681473702192307, 0.0681920051574707, -0.03790431097149849, 0.013114534318447113, 0.015304760076105595, -0.027605781331658363, -0.04398330673575401, 0.0016951898578554392, -0.01278376579284668, -0.048024047166109085, 0.014464428648352623, 0.02150890976190567, 0.00040256569627672434, -0.044519685208797455, 0.021222839131951332, 0.017155276611447334, -0.10706180334091187, -0.00084089016309008, -0.016708292067050934, 0.028392475098371506, 0.03600909560918808, -0.03359537944197655, 0.01377607136964798, -0.04047894477844238, 0.0009520776220597327, 0.08110092580318451, -0.012122227810323238, 0.02251015417277813, 0.04033590853214264, -0.038941316306591034, 0.017620140686631203, -0.008117244578897953, -0.046128831803798676, 0.045306380838155746, 0.05653463676571846, 0.04187353700399399, 0.023475641384720802, -0.011907675303518772, 0.04455544427037239, -0.03529392182826996, -0.00004186990554444492, -0.030359208583831787, 0.012917861342430115, -0.03504360839724541, -0.018326377496123314, -0.02619330957531929, 0.012899981811642647, 0.03329142928123474, -0.04977623000741005, -0.005520262289792299, 0.009744268842041492, -0.0012817289680242538, 0.020042799413204193, -0.00018438123515807092, -0.008273689076304436, -0.07280488312244415, 0.03368477523326874, -0.04358995705842972, 0.025317220017313957, 0.002082949271425605, -0.011255077086389065, 0.008246869780123234, 0.010441564954817295, -0.043804511427879333, 0.050276849418878555, -0.017593322321772575, 0.06340032815933228, -0.052601173520088196, -0.0031467729713767767, 0.03854797035455704, 0.009422440081834793, -0.024548405781388283, 0.046057313680648804, 0.03203986957669258, -0.019649451598525047, -0.04148019105195999, -0.026354223489761353, -0.03708186000585556, -0.024459008127450943, 0.11407051980495453, 0.009078261442482471, 0.06994418054819107, 0.036867305636405945, 0.005859971046447754, -0.030305569991469383, -0.02962615340948105, 0.027480626478791237, -0.02601451613008976, -0.017789995297789574, 0.02161618508398533, -0.03836917504668236, 0.014965051785111427, 0.0052610114216804504, -0.062077250331640244, 0.004083206411451101, 0.0014750498812645674, 0.03701034188270569, 0.007276912685483694, 0.061326317489147186, 0.011666303500533104, -0.020185833796858788, 0.04344692453742027, -0.03395296633243561, 0.020328868180513382, 0.06475915759801865, 0.030001619830727577, 0.007419948000460863, -0.039191629737615585, -0.03783279284834862, -0.0008285981020890176, -0.011550087481737137, 0.016779810190200806, 0.037654001265764236, 0.01278376579284668, 0.07495041191577911, -0.005149264819920063, 0.07609469443559647, 0.021222839131951332, -0.002269565360620618, 0.025174183771014214, -0.020668577402830124, -0.008470362052321434, -0.016717230901122093, 0.025621168315410614, 0.006378473248332739, 0.05646312236785889, -0.012157986871898174, -0.01543885562568903, -0.019953401759266853, -0.012426177971065044, 0.03904859349131584, -0.011228258721530437, 0.03431055322289467, 0.03420327603816986, -0.012184806168079376, -0.018934275954961777, -0.0037479675374925137, 0.009565474465489388, -0.034078121185302734, -0.014652161858975887, -0.015903718769550323, 0.020400386303663254, 0.01675298996269703, -0.019202467054128647, 0.05839409679174423, -0.0721612274646759, -0.05853712931275368, 0.04155170917510986, 0.010495203547179699, -0.04398330673575401, -0.002891991753131151, -0.0030819601379334927, 0.01512596569955349, 0.06883566081523895, 0.006517038680613041, 0.04598579555749893, -0.027033641934394836, -0.007992088794708252, 0.012283142656087875, -0.03507936745882034, -0.007142817135900259, -0.04634338617324829, 0.008403314277529716, 0.03872676193714142, -0.024262335151433945, -0.01268542930483818, 0.0004447498940862715, 0.0015041038859635592, -0.006610905285924673, -0.011094163171947002, 0.024619923904538155, 0.017494985833764076, -0.006843337323516607, 0.014428669586777687, -0.0010487381368875504, -0.03284444287419319, 0.027677299454808235, 0.02385110966861248, -0.009015684016048908, 0.011550087481737137, 0.014830956235527992, 0.01810288429260254, -0.00953865610063076, -0.04680825024843216, -0.03590181842446327, 0.01512596569955349, -0.032737165689468384, -0.027570022270083427, -0.06629678606987, 0.03237957879900932, 0.04866770654916763, 0.02070433646440506, 0.021723462268710136, -0.10269922763109207, 0.034972090274095535, 0.020114315673708916, 0.02141951210796833, -0.014106840826570988, 0.03447146713733673, -0.030305569991469383, -0.035705145448446274, 0.016323884949088097, 0.014285634271800518, 0.008027846924960613, -0.01864820532500744, -0.07191091775894165, -0.02934008277952671, -0.05574794486165047, 0.036134250462055206, -0.022170446813106537, -0.01232784055173397, -0.03087771125137806, 0.027873972430825233, 0.04040742665529251, -0.03854797035455704, 0.03997832164168358, 0.02115132100880146, 0.03286232426762581, -0.05163568630814552, -0.013954865746200085, -0.012363599613308907, 0.0770244225859642, 0.017307251691818237, 0.007782005704939365, 0.06658285856246948, -0.014115780591964722, -0.017217854037880898, 0.05642736330628395, -0.0415874682366848, -0.06704772263765335, -0.019756728783249855, 0.06150510907173157, 0.0036138722207397223, -0.029465237632393837, -0.04798828810453415, 0.04687976837158203, 0.019291864708065987, -0.060897208750247955, -0.00801890715956688, -0.07158908993005753, -0.02494175173342228, 0.07112422585487366, 0.012202685698866844, -0.006910385098308325, 0.00449890224263072, 0.045771244913339615, 0.03077043406665325, -0.01124613732099533, 0.08481983840465546, 0.06955083459615707, -0.0385122112929821, -0.016601014882326126, 0.02107980288565159, 0.003969225101172924, -0.04673673212528229, 0.03701034188270569, 0.021294355392456055, -0.023332607001066208, 0.018952155485749245, -0.020418265834450722, 0.018299557268619537, 0.024351732805371284, 0.010119736194610596, 0.022814104333519936, -0.028195802122354507, -0.05463942140340805, 0.022009531036019325, -0.0016270247288048267, 0.00017041295359376818, 0.011442811228334904, 0.0677986592054367, -0.01601993478834629, 0.11614453047513962, 0.005336998496204615, -0.008962045423686504, 0.020328868180513382, -0.01936338096857071, 0.028195802122354507, 0.12551333010196686, 0.021902255713939667, -0.00023718131706118584, 0.02311805449426174, -0.03527604043483734, 0.0008475949289277196, 0.02925068512558937, 0.0036317515186965466, 0.024530526250600815, -0.03858372941613197, -0.015894779935479164, -0.0015387452440336347, -0.03819038346409798, 0.04798828810453415, 0.0169228445738554, -0.06011051684617996, 0.000943696650210768, -0.06726227700710297, 0.021938014775514603, 0.040085598826408386, -0.024995390325784683, 0.00012082557805115357, 0.039298903197050095, 0.06611799448728561, -0.06325729191303253, -0.0676913782954216, -0.04641490429639816, 0.02206316962838173, -0.04759494215250015, -0.006521508563309908, -0.07151757180690765, -0.024441128596663475, 0.029572514817118645, 0.030681036412715912, -0.04984774440526962, -0.014723679982125759, 0.0628281831741333, -0.0008448013104498386, 0.027784574776887894, -0.0351330041885376, 0.09690630435943604, 0.024548405781388283, -0.0059225489385426044, 0.03332718834280968, 0.05224358290433884, -0.021097682416439056, 0.01846941187977791, -0.03034132905304432, 0.02034674771130085, 0.020954648032784462, -0.031038625165820122, -0.008389905095100403, -0.025424495339393616, 0.0557837039232254, 0.03418539837002754, 0.0006514803390018642, -0.0030082077719271183, -0.014929292723536491, 0.025942998006939888, -0.042982060462236404, -0.02458416484296322, 0.047308873385190964, -0.03958497568964958, 0.06597495824098587, -0.016502678394317627, -0.029465237632393837, -0.056391604244709015, 0.005699056200683117, 0.03436419367790222, -0.018433652818202972, 0.011120982468128204, -0.04931136220693588, -0.0637221559882164, 0.03465026244521141, -0.030091017484664917, -0.017512865364551544, -0.06622526794672012, -0.012006011791527271, 0.059538375586271286, -0.014893533661961555, 0.05825106054544449, -0.012891042046248913, -0.0014929292956367135, 0.016690412536263466, 0.04444817081093788, 0.01728043332695961, 0.011040524579584599, -0.004337987396866083, 0.03411388024687767, -0.05156416818499565, 0.0028070646803826094, -0.00836755521595478, 0.06701195985078812, 0.011442811228334904, -0.07852628827095032, -0.021812858060002327, 0.036688514053821564, -0.011791459284722805, -0.03357749804854393, -0.009556535631418228, 0.03450722619891167, -0.023904748260974884, -0.057214055210351944, 0.00026763216010294855, -0.004675460979342461, -0.07638076692819595, 0.016440100967884064, 0.024512646719813347, 0.022975018247961998, 0.0806002989411354, -0.012238443829119205, -0.005623068660497665, -0.0065483273938298225, 0.02971554920077324, 0.016368582844734192, -0.08052878081798553, 0.007455706596374512, -0.029733428731560707, 0.0030193824786692858, 0.05553339421749115, 0.011085223406553268, 0.010343228466808796, 0.05456790700554848, 0.03445358946919441, -0.015376277267932892, 0.002972448943182826, -0.06561736762523651, -0.016958603635430336, -0.044877275824546814, 0.026801209896802902, -0.016314946115016937, -0.007500404957681894, 0.0028830519877374172, -0.02467356063425541, 0.017173156142234802, -0.05095626786351204, -0.03854797035455704, 0.010852791368961334, -0.04326812922954559, 0.015224302187561989, 0.049025293439626694, -0.019309744238853455, 0.02701576240360737, -0.035168763250112534, -0.007464646361768246, -0.020221592858433723, 0.02240287885069847, -0.0403001494705677, -0.02537085860967636, 0.03005525842308998, 0.001327544916421175, 0.0338456891477108, 0.06704772263765335, 0.04012135788798332, -0.0070981187745928764, -0.007974209263920784, -0.029930103570222855, -0.014884593896567822, -0.05281572416424751, -0.025352979078888893, 0.0012660844950005412, 0.0016449041431769729, -0.090326689183712, 0.04269598796963692, -0.009672751650214195, -0.016064634546637535, 0.03482905775308609, -0.023296847939491272, -0.06075417622923851, -0.023439884185791016, 0.04044318571686745, -0.04201657325029373, 0.03736792877316475, -0.07874084264039993, -0.01675298996269703, -0.010459444485604763, -0.05760740116238594, 0.014294574037194252, -0.01845153234899044, -0.014562765136361122, 0.028303077444434166, -0.05059868097305298, 0.0033657955937087536, 0.06561736762523651, -0.022903501987457275, 0.045771244913339615, -0.005269950721412897, 0.02195589430630207, 0.05156416818499565, -0.01475943811237812, -0.011442811228334904, 0.0079161012545228, 0.01264073047786951, 0.03858372941613197, -0.023922627791762352, -0.011800399050116539, -0.004943652078509331, 0.005725875496864319, 0.07852628827095032, -0.01936338096857071, 0.001793526578694582, 0.008979924954473972, -0.03495421260595322, 0.027480626478791237, 0.0278918519616127, -0.03529392182826996, -0.02474507875740528, 0.04569972679018974, 0.004898953717201948, -0.016601014882326126, 0.0029098710510879755, -0.02494175173342228, 0.020722215995192528, 0.023439884185791016, 0.0012035066029056907, -0.05049140378832817, -0.014509126543998718, 0.0765237957239151, 0.029840705916285515, -0.060074757784605026, -0.013570458628237247, 0.01998916082084179, -0.03141409158706665, -0.025764204561710358, -0.0012403827859088778, 0.04148019105195999, -0.03701034188270569, -0.02798124961555004, 0.03872676193714142, 0.0360269770026207, 0.06390094757080078, 0.022760465741157532, 0.031288936734199524, 0.05020533502101898, 0.01819228194653988, 0.016082514077425003, -0.007419948000460863, -0.0694793164730072, -0.04852467030286789, -0.044877275824546814, 0.017494985833764076, -0.01364197675138712, -0.005520262289792299, 0.025782084092497826, -0.02150890976190567, 0.05803650617599487, 0.048274360597133636, -0.018067125231027603, -0.054138798266649246, -0.01846941187977791, -0.033273547887802124, -0.0072143347933888435, -0.0765237957239151, 0.005721405614167452, 0.02538873627781868, 0.04888225719332695, -0.06761986017227173, -0.00927046500146389, 0.04845315217971802, -0.008979924954473972, -0.01498293038457632, -0.06761986017227173, 0.08460528403520584, 0.03241533786058426, -0.046951282769441605, 0.0109421880915761, -0.019041553139686584, -0.007446766830980778, -0.054782457649707794, 0.024691440165042877, 0.03729641065001488, -0.020865250378847122, 0.0171195175498724, 0.03693882375955582, -0.0010649412870407104, 0.0013286623870953918, 0.021365873515605927, -0.0218843761831522, -0.001578973839059472, -0.015796443447470665, 0.021133441478013992, -0.05875168368220329, 0.030484363436698914, -0.07745352387428284, -0.01654737815260887, 0.041730500757694244, -0.06493795663118362, 0.044698480516672134, 0.018415773287415504, -0.003707739058881998, 0.00753616401925683, 0.0491325706243515, 0.010200193151831627, -0.08231671899557114, 0.009726389311254025, -0.031896837055683136, 0.003893237793818116, 0.013579398393630981, 0.028732184320688248, 0.004876604303717613, -0.03886979818344116, 0.019220346584916115, 0.06254211068153381, 0.007665789686143398, -0.016958603635430336, -0.056927986443042755, 0.013856529258191586, 0.0223313607275486, 0.05052716284990311, -0.04480575770139694, -0.04652217775583267, -0.03268352895975113, -0.0172714926302433, 0.03557999059557915, -0.007889281958341599, -0.0232253298163414, -0.06704772263765335, -0.011496448889374733, 0.03252261504530907, 0.0052297222428023815, -0.03211138769984245, 0.0110673438757658, -0.03127105534076691, -0.03309475630521774, 0.021473150700330734, -0.015859020873904228, -0.0030551410745829344, -0.10906429588794708, -0.02989434450864792, -0.08810964226722717, -0.0116126649081707, -0.009923062287271023, 0.03277292475104332, -0.04637914523482323, 0.0034507226664572954, -0.023296847939491272, -0.0030260870698839426, 0.00981578603386879, -0.04770221933722496, -0.0397995263338089, -0.019864004105329514, 0.01918458752334118, -0.029465237632393837, 0.013874408788979053, -0.07788263261318207, 0.017754236236214638, -0.009172128513455391, -0.02951887622475624, 0.025585411116480827, 0.01916670799255371, -0.029304323717951775, 0.0681920051574707, 0.0018080535810440779, 0.00427764467895031, -0.007987618446350098, 0.01738770864903927, 0.03869100660085678, -0.01367773488163948, 0.040729254484176636, -0.011585846543312073, 0.01819228194653988, -0.02150890976190567, 0.0017175391549244523, 0.02746274694800377, 0.001267201965674758, -0.0012504400219768286, 0.018523050472140312, 0.03608061373233795, 0.04105108603835106, -0.014008504338562489, -0.01880912110209465, -0.014768377877771854, -0.05556914955377579, -0.037761278450489044, 0.006137101445347071, -0.009797907434403896, 0.00899780448526144, -0.024101421236991882, -0.018219100311398506, -0.010557780973613262, 0.02554965205490589, 0.03665275499224663, -0.020471904426813126, -0.000677740725222975, 0.0022371590603142977, 0.02646150067448616, -0.005672237370163202, 0.02150890976190567, -0.04301781952381134, -0.01684238761663437, -0.02023947238922119, -0.031378332525491714, 0.02672969177365303, 0.01880912110209465, 0.03445358946919441, -0.017888331785798073, -0.03393508493900299, -0.017879392951726913, 0.008966514840722084, -0.10198405385017395, 0.022259842604398727, 0.009149778634309769, -0.032004110515117645, 0.05138537287712097, -0.027051521465182304, 0.0103968670591712, 0.012390418909490108, -0.0030685507226735353, -0.011407052166759968, -0.003144538030028343, 0.04727311432361603, 0.04777373746037483, 0.03139621391892433, -0.03264776989817619, 0.05678495019674301, -0.029018253087997437, 0.04105108603835106, 0.0007928393315523863, -0.03341658413410187, -0.021491030231118202, -0.01463428232818842, -0.005292300134897232, 0.030359208583831787, 0.002650619950145483, -0.005931488238275051, -0.03529392182826996, 0.01927398517727852, -0.0223313607275486, 0.007844583131372929, -0.07580862194299698, 0.037761278450489044, 0.024548405781388283, 0.03697458282113075, 0.0015711515443399549, 0.019327623769640923, 0.006610905285924673, 0.029411600902676582, 0.038655247539281845, 0.009190008044242859, 0.0739491656422615, -0.01399062480777502, 0.043804511427879333, -0.0019298569532111287, -0.056141290813684464, 0.012891042046248913, 0.044877275824546814, -0.02197377383708954, 0.01799560897052288, 0.0028495281003415585, -0.01681556925177574, 0.11871916800737381, -0.017986668273806572, 0.02610391192138195, 0.0006464517791755497, 0.06504523009061813, -0.03143197298049927, 0.025603290647268295, -0.08710839599370956, -0.05664191395044327, -0.10205557197332382, -0.021812858060002327, -0.07545103877782822, 0.012533454224467278, 0.03522240370512009, -0.024512646719813347, 0.041909296065568924, 0.0009448141208849847, 0.036599114537239075 ]
717,694
pytorch_optimizer.optimizer.shampoo_utils
add_statistics
Add the statistics.
def add_statistics(self, grad: torch.Tensor, beta2: float): r"""Add the statistics.""" self.statistics.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2)
(self, grad: torch.Tensor, beta2: float)
[ -0.03434999659657478, -0.004001539200544357, 0.005146394018083811, 0.02472013607621193, 0.05380162224173546, 0.020201776176691055, -0.022801142185926437, -0.005783150903880596, -0.0022853477858006954, 0.01605849340558052, -0.009202449582517147, 0.01263919472694397, 0.008260398171842098, 0.01612827554345131, -0.028470898047089577, 0.02937805838882923, 0.017584966495633125, -0.01575319841504097, 0.01232517696917057, -0.03530949726700783, -0.06985139101743698, -0.042182985693216324, -0.0233593937009573, 0.05596485361456871, -0.054883237928152084, -0.00041978000081144273, -0.0009382355492562056, -0.06088445708155632, 0.015360677614808083, 0.008194978348910809, -0.019748196005821228, -0.07766693085432053, 0.002448898507282138, -0.029168713837862015, 0.005333932116627693, 0.014244171790778637, 0.006398101337254047, -0.0024183690547943115, -0.06828130781650543, 0.06280344724655151, 0.05819786339998245, 0.016965653747320175, 0.0214752908796072, 0.031855303794145584, 0.047102589160203934, 0.005983773153275251, -0.0560346357524395, 0.02445845492184162, -0.02751140110194683, -0.0165033508092165, -0.005294679664075375, -0.021440399810671806, 0.019469069316983223, -0.0051769232377409935, -0.013842927291989326, 0.022399896755814552, 0.06454799324274063, -0.029098931699991226, 0.017829202115535736, 0.03368707373738289, 0.05865144357085228, -0.04256678372621536, -0.035257160663604736, -0.03628643974661827, -0.01967841386795044, 0.0029351890552788973, -0.0497891791164875, -0.03349517285823822, 0.017768142744898796, 0.06730436533689499, -0.017026713117957115, 0.06294301152229309, 0.026360003277659416, 0.015456627123057842, -0.013057883828878403, 0.005560722202062607, 0.011618638411164284, -0.026865920051932335, -0.004119295626878738, -0.03204720467329025, 0.05261533334851265, -0.03319860249757767, 0.003362601390108466, -0.03068646416068077, 0.023132603615522385, -0.033006701618433, -0.011261007748544216, -0.06273366510868073, -0.019748196005821228, 0.00041023956146091223, -0.03827521204948425, -0.07668998837471008, 0.06137292832136154, -0.035571176558732986, 0.04713748022913933, -0.01216816809028387, -0.06594362109899521, -0.013337010517716408, -0.029046595096588135, -0.003814001102000475, 0.044660232961177826, 0.028802359476685524, 0.04776551201939583, 0.02608087658882141, 0.03715870901942253, -0.07850431650876999, -0.012569412589073181, -0.045358046889305115, -0.019503960385918617, 0.033844079822301865, -0.012246672995388508, -0.01953885145485401, 0.018160663545131683, -0.049963634461164474, -0.012290285900235176, -0.021074047312140465, -0.013607414439320564, 0.007728313561528921, -0.012900875881314278, 0.0759921744465828, 0.034454669803380966, 0.03792630508542061, 0.0435786172747612, 0.03063412755727768, -0.05582528933882713, 0.0050766123458743095, 0.02346406690776348, -0.01810832880437374, 0.014505852945148945, -0.04008953645825386, -0.0023355032317340374, -0.026691466569900513, 0.024807363748550415, 0.0516732819378376, 0.08659897744655609, -0.05847699195146561, 0.06339659541845322, -0.014549465849995613, 0.07361959666013718, 0.052894461899995804, 0.008626751601696014, -0.007222396787256002, -0.05048699676990509, -0.02782541699707508, -0.03747272491455078, 0.006590000819414854, -0.033652182668447495, 0.027476510033011436, -0.013040438294410706, -0.08604072779417038, 0.014313952997326851, 0.00010998781363014132, 0.028366224840283394, -0.032832249999046326, 0.005421158857643604, -0.0013378442963585258, 0.03653067350387573, -0.0026909534353762865, 0.0154130132868886, -0.03970573842525482, 0.0011252284748479724, 0.023115158081054688, -0.03373941034078598, 0.030163101851940155, -0.005682840012013912, -0.04124093055725098, 0.038065869361162186, 0.03206465020775795, -0.07606195658445358, -0.022958150133490562, 0.004854183178395033, -0.08799461275339127, 0.07606195658445358, 0.0722239688038826, 0.0014534201472997665, -0.006315235979855061, 0.0065114968456327915, 0.02721482887864113, 0.013616137206554413, 0.00401462335139513, 0.045288264751434326, -0.01569213904440403, -0.0411013700067997, -0.05090568587183952, 0.0030682103242725134, -0.0028479620814323425, 0.0211787186563015, -0.010563191026449203, 0.024004874750971794, -0.0233419481664896, 0.04577673599123955, -0.0385892316699028, -0.011042940430343151, -0.030302664265036583, 0.029064040631055832, 0.021754417568445206, -0.0033037231769412756, 0.009594971314072609, 0.017846647650003433, -0.014139498583972454, -0.01441862527281046, -0.016904596239328384, -0.01216816809028387, -0.008705255575478077, 0.06402462720870972, -0.03206465020775795, -0.02447590045630932, 0.04015931859612465, 0.00104236276820302, -0.03970573842525482, -0.023690856993198395, 0.03928704559803009, 0.010938267223536968, 0.03307648375630379, -0.015587467700242996, -0.05558105185627937, 0.009943879209458828, -0.02048090286552906, 0.002342045307159424, -0.020079659298062325, 0.04239232838153839, -0.06189629063010216, -0.027842862531542778, 0.01556129939854145, 0.012447294779121876, 0.011993714608252048, 0.08045820146799088, -0.03094814531505108, -0.020585576072335243, 0.03267524018883705, 0.07508501410484314, 0.011261007748544216, -0.004684090614318848, -0.036146875470876694, -0.021684635430574417, 0.05945393443107605, -0.04179918393492699, 0.011374402791261673, 0.0016911136917769909, 0.019626079127192497, -0.050835903733968735, -0.04490446671843529, 0.009481576271355152, 0.08248186111450195, -0.07710868120193481, -0.041868966072797775, -0.007218035403639078, 0.026883365586400032, -0.016154443845152855, 0.05561594292521477, -0.033006701618433, -0.022923259064555168, 0.0098043167963624, 0.009708366356790066, -0.0690837949514389, -0.030895808711647987, -0.007811178918927908, 0.007671616040170193, 0.023115158081054688, -0.08122579753398895, 0.015386844985187054, -0.03417554497718811, -0.05896546319127083, 0.05645332485437393, -0.018073437735438347, 0.036460891366004944, 0.05491812899708748, 0.04619542509317398, 0.038379885256290436, 0.006049193441867828, 0.03168085217475891, 0.02346406690776348, 0.02072513848543167, -0.024074656888842583, 0.03970573842525482, 0.01580553501844406, 0.041554950177669525, 0.0037812909577041864, 0.030773689970374107, -0.012717698700726032, 0.06590873003005981, -0.0348733589053154, -0.031017925590276718, -0.023708302527666092, -0.005578167736530304, -0.010685308836400509, -0.02062046527862549, 0.03459423407912254, -0.016023602336645126, 0.003881602082401514, 0.01581425778567791, -0.028331333771348, 0.03541416674852371, 0.02820921689271927, 0.033582400530576706, 0.05285957083106041, 0.011042940430343151, 0.06381528079509735, 0.005089696496725082, 0.05966327711939812, 0.006869127508252859, 0.0008995285606943071, -0.03883346542716026, 0.01188904233276844, -0.04406708851456642, -0.04738171398639679, 0.07194484025239944, -0.002073822310194373, 0.027441618964076042, -0.0130753293633461, -0.028436006978154182, -0.004780040588229895, 0.006502774078398943, 0.07620152086019516, -0.028907032683491707, -0.041938748210668564, -0.02527838945388794, -0.01985286921262741, -0.01587531715631485, 0.04706769809126854, -0.01313638873398304, -0.06929314136505127, 0.06294301152229309, 0.0006885482580401003, -0.015011768788099289, -0.004128018394112587, 0.01313638873398304, -0.002551390090957284, 0.047730620950460434, -0.013110220432281494, -0.08171426504850388, -0.07278221845626831, 0.055197253823280334, 0.016032325103878975, -0.028784913942217827, -0.017593689262866974, 0.020411120727658272, 0.011409293860197067, 0.021510181948542595, -0.0040037198923528194, -0.020323894917964935, -0.030302664265036583, -0.016014879569411278, 0.02857556939125061, 0.0778064951300621, -0.02813943475484848, 0.017070326954126358, -0.06008196622133255, -0.030791135504841805, 0.039007920771837234, 0.005682840012013912, -0.00173472729511559, -0.05498791113495827, 0.03038989193737507, 0.06514113396406174, 0.04333437979221344, 0.004245774820446968, -0.008181894198060036, 0.028226662427186966, -0.03218676894903183, -0.027284611016511917, 0.09287932515144348, -0.008648558519780636, 0.04158984124660492, 0.04888201877474785, -0.0016845717327669263, -0.023708302527666092, 0.03155873343348503, -0.00658563943579793, -0.04288079962134361, 0.06496667861938477, -0.004993746522814035, 0.012525799684226513, 0.055999744683504105, -0.011208671145141125, -0.053208477795124054, 0.002904659602791071, -0.0020520156249403954, 0.005608696956187487, -0.02042856626212597, -0.03195997700095177, 0.0020018599461764097, -0.03998486325144768, 0.05121970176696777, 0.027685854583978653, 0.06276855617761612, -0.040682680904865265, -0.07787627726793289, -0.02062046527862549, 0.0013890902046114206, 0.03394875302910805, 0.015517685562372208, 0.02198120765388012, 0.0032753744162619114, -0.07173549383878708, 0.015421736054122448, 0.034838467836380005, -0.03625154867768288, -0.019713304936885834, 0.02634255774319172, -0.022696468979120255, -0.046649008989334106, -0.03279735893011093, 0.04322970658540726, -0.029290830716490746, -0.04071757197380066, -0.0529293529689312, 0.03262290358543396, -0.01357252337038517, 0.10683564841747284, -0.06674610823392868, -0.06699034571647644, -0.027877753600478172, 0.03907770290970802, 0.0154130132868886, -0.0012211782159283757, 0.008849180303514004, -0.04863778501749039, 0.006620530504733324, 0.0460558645427227, 0.025540070608258247, -0.020341340452432632, 0.008225507102906704, 0.005582529120147228, -0.027912644669413567, -0.02714504674077034, -0.05847699195146561, -0.017471570521593094, -0.07543392479419708, -0.026813583448529243, 0.02501670829951763, 0.01556129939854145, 0.011479075066745281, -0.02527838945388794, -0.01475881040096283, -0.03653067350387573, -0.04549761116504669, -0.015203668735921383, 0.030895808711647987, 0.015779366716742516, 0.028226662427186966, 0.027371836826205254, 0.025697078555822372, -0.002954815048724413, -0.06046576797962189, -0.03248333930969238, 0.0036940639838576317, -0.049963634461164474, 0.01861424557864666, -0.030040983110666275, -0.004723342601209879, 0.040438443422317505, 0.057116247713565826, 0.04643966257572174, 0.01491581927984953, -0.040996696799993515, -0.03876368701457977, -0.07424763590097427, 0.03560606762766838, 0.04204342141747475, -0.041938748210668564, -0.007322707679122686, -0.09720578789710999, 0.028156880289316177, -0.003504345193505287, 0.015613636001944542, 0.08422640711069107, -0.00375076150521636, -0.003519610036164522, 0.017532629892230034, -0.012988102622330189, -0.0354839488863945, 0.02203354425728321, -0.05442965775728226, -0.05097546800971031, -0.001184106688015163, -0.054255202412605286, -0.012831093743443489, 0.031349390745162964, 0.001656222972087562, 0.03764718025922775, 0.02883725054562092, 0.009202449582517147, 0.054499439895153046, 0.02091703750193119, 0.0454627200961113, 0.025365615263581276, -0.006271622143685818, 0.05160350352525711, 0.023446621373295784, 0.029151268303394318, -0.014889650978147984, 0.04190385714173317, -0.014889650978147984, -0.09246063232421875, -0.007248565088957548, 0.019957540556788445, -0.00047647758037783206, 0.03653067350387573, 0.04291569069027901, -0.022016098722815514, -0.014610525220632553, -0.01065041869878769, -0.02508648857474327, -0.003554500872269273, 0.006799345836043358, -0.04532315582036972, 0.025941314175724983, -0.04462534189224243, -0.012403681874275208, -0.015665972605347633, -0.0011568482732400298, -0.016224224120378494, 0.04930070787668228, 0.029029149562120438, -0.03335560858249664, -0.019887758418917656, 0.05938415229320526, 0.015282172709703445, -0.02390020154416561, -0.04270634800195694, 0.03490824997425079, 0.0034607318229973316, -0.03761228919029236, 0.03473379835486412, -0.01798621006309986, -0.04228765517473221, 0.008020523935556412, 0.013084052130579948, 0.017881538718938828, -0.029988648369908333, 0.021074047312140465, -0.03351261839270592, -0.0404733344912529, -0.016843536868691444, 0.00018072346574626863, 0.025103934109210968, -0.03810076043009758, -0.06301279366016388, -0.02559240534901619, 0.017506461590528488, -0.04103158786892891, 0.04787018522620201, -0.07079344242811203, -0.07082833349704742, 0.06158227100968361, -0.004114934243261814, 0.006145142950117588, 0.002605907153338194, -0.002114164875820279, -0.04937049001455307, -0.026569347828626633, -0.10878953337669373, 0.02775563672184944, -0.015857871621847153, 0.07180527597665787, -0.06918846815824509, -0.009734534658491611, 0.022870922461152077, 0.02440611831843853, -0.010013661347329617, -0.023655965924263, 0.003135811071842909, 0.05844210088253021, -0.026447230949997902, 0.024318892508745193, 0.002120706718415022, 0.006498412694782019, -0.03621665760874748, -0.013511464931070805, -0.015674695372581482, -0.029849084094166756, -0.03824032470583916, -0.04581162706017494, -0.017794311046600342, 0.026307666674256325, 0.06426886469125748, 0.008966936729848385, 0.04022910073399544, 0.013834204524755478, -0.0784345343708992, 0.01506410539150238, 0.029604848474264145, 0.013642305508255959, 0.01238623633980751, 0.02658679336309433, -0.06953737884759903, 0.04029887914657593, 0.048149313777685165, 0.002710579428821802, -0.005717730615288019, -0.013398068957030773, -0.0385892316699028, -0.10634717345237732, -0.032971810549497604, -0.0640944093465805, -0.05010319873690605, -0.013494019396603107, -0.030669018626213074, 0.053452715277671814, -0.03785652294754982, -0.042811017483472824, 0.04720725864171982, -0.009830484166741371, -0.025976205244660378, 0.0311225987970829, 0.002998428652063012, -0.004513998050242662, -0.07065387815237045, -0.022085880860686302, -0.023673411458730698, 0.02981419302523136, -0.02353384904563427, 0.03911259397864342, 0.017951318994164467, -0.05069633945822716, -0.004710258916020393, -0.023184940218925476, 0.04152005910873413, 0.07452676445245743, -0.034960586577653885, 0.053138695657253265, 0.017951318994164467, 0.05627886950969696, 0.006341403815895319, -0.0021774042397737503, 0.02745906449854374, -0.060116857290267944, 0.005159477703273296, -0.005015553440898657, -0.07382894307374954, 0.0152560044080019, 0.01768963783979416, -0.04762595146894455, 0.015953820198774338, -0.05596485361456871, -0.0192946158349514, 0.027441618964076042, 0.035902637988328934, -0.04103158786892891, 0.029098931699991226, -0.0038772406987845898, -0.007174422033131123, 0.0005162748857401311, -0.010528300888836384, 0.04333437979221344, -0.012569412589073181, -0.0010080172214657068, 0.04992874339222908, -0.022766251116991043, 0.006437353789806366, 0.038135651499032974, 0.014113331213593483, 0.0523013174533844, 0.01024045143276453, -0.027040373533964157, 0.008504633791744709, 0.05509258061647415, 0.002680049976333976, -0.03100048005580902, 0.04682346060872078, -0.04898669198155403, 0.030145656317472458, 0.013799313455820084, 0.03218676894903183, 0.03391386196017265, 0.011758201755583286, 0.03037244640290737, 0.03056434541940689, -0.06238476186990738, 0.0007986723212525249, 0.012708975933492184, -0.0053688227199018, 0.011758201755583286, 0.0015864412998780608, 0.008434852585196495, -0.007566943299025297, 0.022190552204847336, -0.05219664424657822, 0.045532502233982086, 0.013712086714804173, 0.029849084094166756, 0.008517717942595482, 0.005333932116627693, -0.046649008989334106, 0.041554950177669525, -0.004175993148237467, 0.005996857304126024, -0.022748805582523346, 0.019381843507289886, -0.038135651499032974, -0.03761228919029236, 0.008705255575478077, 0.023795530200004578, 0.03372196480631828, 0.02745906449854374, 0.0031728825997561216, -0.021702080965042114, 0.019346952438354492, -0.03865901380777359, -0.011662252247333527, -0.01854446344077587, -0.009970047511160374, 0.042811017483472824, 0.021893979981541634, 0.004130199085921049, 0.011845428496599197, -0.0435786172747612, 0.025313278660178185, -0.02520860731601715, -0.01693076267838478, 0.05366205796599388, 0.004614308942109346, 0.02564474195241928, 0.0006383926956914365, 0.015456627123057842, 0.028732579201459885, -0.006812429986894131, 0.00038189077167771757, 0.024824807420372963, 0.023586183786392212, -0.003912131767719984, 0.05470878258347511, 0.02285347692668438, -0.029221050441265106, -0.010755090974271297, 0.06252432614564896, -0.024824807420372963, -0.03604220226407051, -0.05404585972428322, 0.01148779783397913, -0.017855370417237282, 0.025697078555822372, 0.06451310217380524, -0.006999968085438013, 0.02883725054562092, -0.009446685202419758, -0.009926434606313705, 0.06608318537473679, 0.03417554497718811, 0.032151877880096436, 0.02384786494076252, 0.007811178918927908, -0.03094814531505108, -0.03529205173254013, -0.03393130749464035, -0.007357598748058081, 0.029029149562120438, 0.02658679336309433, 0.03107026219367981, 0.08017907291650772, 0.003737677587196231, 0.010196837596595287, 0.06050065532326698, 0.056627776473760605, 0.020777475088834763, 0.07480588555335999, -0.08422640711069107, -0.021527627483010292, -0.07641086727380753, 0.039252158254384995, -0.001498123980127275, 0.03189019486308098, -0.01332828775048256, 0.0021327005233615637, 0.049963634461164474, -0.037961196154356, 0.027476510033011436 ]
717,697
pytorch_optimizer.optimizer.ranger
Ranger
a synergistic optimizer combining RAdam and LookAhead, and now GC in one optimizer. :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 n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: bool. perform SGD update when variance of gradient is high. :param use_gc: bool. use Gradient Centralization (both convolution & fc layers). :param gc_conv_only: bool. use Gradient Centralization (only convolution layer). :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 Ranger(Optimizer, BaseOptimizer): r"""a synergistic optimizer combining RAdam and LookAhead, and now GC in one optimizer. :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 n_sma_threshold: int. (recommended is 5). :param degenerated_to_sgd: bool. perform SGD update when variance of gradient is high. :param use_gc: bool. use Gradient Centralization (both convolution & fc layers). :param gc_conv_only: bool. use Gradient Centralization (only convolution layer). :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.95, 0.999), alpha: float = 0.5, k: int = 6, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, use_gc: bool = True, gc_conv_only: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-5, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_range(alpha, 'alpha', 0.0, 1.0, range_type='[]') self.validate_positive(k, 'k') 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 self.use_gc = use_gc self.gc_gradient_threshold: int = 3 if gc_conv_only else 1 defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'alpha': alpha, 'k': k, 'step_counter': 0, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'adanorm': adanorm, 'adam_debias': adam_debias, 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults) def __str__(self) -> str: return 'Ranger' @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['slow_buffer'] = torch.empty_like(p) state['slow_buffer'].copy_(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=True, 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['slow_buffer'] = torch.empty_like(p) state['slow_buffer'].copy_(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) if self.use_gc and grad.dim() > self.gc_gradient_threshold: centralize_gradient(grad, gc_conv_only=False) 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'], ) 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) if n_sma >= self.n_sma_threshold: de_nom = exp_avg_sq.sqrt().add_(group['eps']) p.addcdiv_(exp_avg, de_nom, value=-step_size) else: p.add_(exp_avg, alpha=-step_size) if group['step'] % group['k'] == 0: slow_p = state['slow_buffer'] slow_p.add_(p - slow_p, alpha=group['alpha']) p.copy_(slow_p) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.95, 0.999), alpha: float = 0.5, k: int = 6, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, use_gc: bool = True, gc_conv_only: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-05)
[ -0.01028098352253437, -0.05053683742880821, -0.02551943063735962, 0.028949910774827003, 0.014286696910858154, -0.0005745793459936976, -0.06969732791185379, -0.04999298229813576, -0.039283186197280884, -0.015133858658373356, -0.01887810230255127, 0.009627309627830982, 0.03863474354147911, 0.08496715128421783, -0.03558078035712242, 0.027527516707777977, -0.027966784313321114, 0.029577437788248062, 0.006134076043963432, -0.02777852676808834, -0.04894710332155228, -0.06873512268066406, -0.03664757311344147, 0.026021450757980347, -0.05463667958974838, 0.010003825649619102, 0.034911416471004486, -0.01047447044402361, -0.054887689650058746, 0.03436756134033203, 0.008021886460483074, -0.0932086706161499, 0.018386539071798325, 0.002222491428256035, 0.008241521194577217, -0.07442469894886017, 0.012540080584585667, 0.025895945727825165, -0.08509265631437302, -0.02125224657356739, -0.003555986098945141, -0.03043505735695362, 0.046060480177402496, -0.028845323249697685, -0.005626825150102377, 0.011431449092924595, -0.019150031730532646, 0.04028723016381264, -0.02025866135954857, -0.01754983700811863, 0.028970828279852867, -0.07337881624698639, 0.023804189637303352, 0.029702942818403244, 0.010647040791809559, 0.033698197454214096, 0.047441039234399796, 0.017769472673535347, 0.03746335953474045, -0.08919250220060349, 0.07279312610626221, -0.06865145266056061, 0.039178598672151566, -0.008612807840108871, -0.008272897452116013, -0.012226317077875137, -0.07145440578460693, -0.015060647390782833, 0.027213752269744873, 0.015280281193554401, 0.013993850909173489, -0.03131359443068504, 0.02263280563056469, -0.004845031071454287, -0.040977511554956436, -0.018281951546669006, -0.039868880063295364, -0.017340661957859993, -0.00883244164288044, -0.04451257735490799, 0.04181421175599098, 0.039283186197280884, 0.012090352363884449, -0.03221305087208748, 0.024285294115543365, -0.06040992960333824, -0.020541049540042877, -0.028071371838450432, -0.009627309627830982, -0.07923574000597, 0.026126038283109665, -0.018292410299181938, 0.058527346700429916, 0.03223396837711334, 0.04735736921429634, 0.0407683365046978, -0.04162595421075821, -0.050495002418756485, 0.00952795147895813, -0.02731833979487419, -0.010050890035927296, 0.05861101672053337, 0.029075415804982185, 0.05877835676074028, 0.014401744119822979, -0.0188885610550642, -0.03290332853794098, -0.024515386670827866, 0.04877976328134537, -0.028510641306638718, -0.057314127683639526, 0.01489330641925335, -0.01108630932867527, -0.008680789731442928, -0.05099702253937721, 0.013554582372307777, -0.03712867945432663, 0.018344704061746597, -0.03899034112691879, 0.04995114728808403, 0.06902796775102615, 0.010552912019193172, -0.06287819892168045, 0.007817939855158329, 0.019672969356179237, -0.006745914928615093, 0.04279733821749687, 0.0368567518889904, 0.016493501141667366, -0.03712867945432663, -0.02708824723958969, 0.02227720618247986, -0.015562668442726135, 0.009099140763282776, 0.03376094996929169, -0.0028264860156923532, -0.0032500666566193104, 0.029807530343532562, -0.036522068083286285, 0.0035141510888934135, 0.03618738800287247, 0.02545667625963688, 0.020415544509887695, -0.033405352383852005, 0.02292565070092678, -0.023427672684192657, 0.022381795570254326, 0.015688173472881317, -0.010484929196536541, -0.0011341242352500558, 0.009716209024190903, 0.01146282535046339, 0.034325726330280304, 0.026690812781453133, 0.021440504118800163, 0.006369398441165686, -0.036061882972717285, 0.03505783900618553, -0.039178598672151566, -0.005752330645918846, -0.052921440452337265, -0.04070558398962021, -0.01761258952319622, -0.023657767102122307, 0.01656671240925789, -0.011964847333729267, 0.009350151754915714, 0.031376346945762634, -0.030748821794986725, 0.022841980680823326, 0.016315700486302376, -0.06852594763040543, -0.02811320871114731, 0.01801002398133278, -0.05438566952943802, 0.12399932742118835, 0.01708965003490448, 0.018334245309233665, -0.007232248317450285, -0.012634209357202053, 0.030916161835193634, -0.019369665533304214, -0.017518460750579834, -0.06639235466718674, -0.023866942152380943, 0.03089524433016777, 0.013585958629846573, -0.01605423167347908, -0.00966914463788271, 0.03443031385540962, 0.015311657451093197, -0.019767099991440773, 0.016828181222081184, -0.027569351717829704, -0.018459752202033997, 0.007127660326659679, -0.0003113122074864805, 0.01356504112482071, 0.06760556995868683, 0.06626684963703156, -0.0318574532866478, 0.030121294781565666, -0.010286212898790836, -0.004173054359853268, -0.005621595773845911, -0.022319043055176735, -0.01663992367684841, 0.034911416471004486, 0.0018551265820860863, 0.0359363779425621, -0.06409142166376114, 0.01604377292096615, 0.041479531675577164, 0.05074601247906685, 0.03978521004319191, -0.039534199982881546, 0.03327984735369682, 0.06007524952292442, 0.0526704303920269, 0.009015470743179321, 0.015071106143295765, -0.05890386551618576, -0.000289250718196854, -0.005401961039751768, 0.043675877153873444, -0.017183780670166016, 0.017246533185243607, -0.004735213704407215, -0.005077738780528307, -0.033112507313489914, 0.032359473407268524, -0.027820361778140068, -0.006306645926088095, -0.0030330470763146877, 0.06589033454656601, -0.0005657547735609114, 0.0009229875868186355, 0.023427672684192657, -0.03192020580172539, -0.030560562387108803, -0.024850066751241684, 0.0038017674814909697, -0.01836562156677246, 0.020363250747323036, -0.01801002398133278, -0.0006798208924010396, 0.08777010440826416, 0.029577437788248062, -0.026000533252954483, 0.014454037882387638, -0.025624018162488937, -0.04064282774925232, -0.03382370248436928, 0.04601864516735077, -0.08559467643499374, -0.02309299260377884, 0.030853409320116043, 0.061288464814424515, 0.016420288011431694, -0.05756514146924019, 0.0136277936398983, -0.0015531291719526052, -0.07241661101579666, 0.04765021428465843, -0.008006198331713676, 0.045014601200819016, 0.05693761259317398, -0.042127978056669235, 0.0075930762104690075, 0.0202691201120615, 0.07806435227394104, 0.08735175430774689, -0.08132749050855637, 0.01748708449304104, -0.035183344036340714, 0.048988938331604004, 0.00622297590598464, 0.010908510535955429, -0.012749255634844303, 0.014056604355573654, 0.049281783401966095, -0.026293380185961723, -0.03043505735695362, -0.004753516521304846, -0.04522377625107765, 0.026021450757980347, -0.034848663955926895, -0.013910180889070034, 0.04677167534828186, 0.0281759612262249, 0.02246546559035778, -0.008361796848475933, 0.06647602468729019, -0.006217746529728174, 0.10216139256954193, 0.011964847333729267, 0.01616927795112133, 0.01229952834546566, -0.027109164744615555, -0.015071106143295765, 0.05689577758312225, -0.008482072502374649, 0.031794700771570206, 0.017811307683587074, -0.014223944395780563, -0.032359473407268524, 0.015520833432674408, 0.002983367769047618, 0.055347878485918045, 0.007990510202944279, -0.015750925987958908, -0.014872388914227486, 0.019076820462942123, 0.010647040791809559, 0.011117685586214066, -0.09588611871004105, -0.0032579107210040092, -0.020237743854522705, 0.021900691092014313, 0.06087011471390724, -0.04497276619076729, 0.033405352383852005, 0.004280257038772106, -0.016441205516457558, -0.03988979756832123, -0.04907260835170746, 0.03574812039732933, 0.04388505220413208, -0.032756906002759933, -0.0377771221101284, -0.06718721985816956, -0.04497276619076729, 0.014673671685159206, 0.012508704327046871, -0.04710635542869568, -0.005171868018805981, 0.021043071523308754, 0.0008353952434845269, 0.01287476159632206, -0.05229391157627106, 0.0735461562871933, 0.06743822991847992, -0.03572720289230347, 0.05538971349596977, 0.005229391157627106, -0.04101934656500816, 0.05133170634508133, -0.008670330978929996, 0.005977194290608168, -0.004831957630813122, -0.0031297907698899508, 0.0034749305341392756, -0.0286361463367939, 0.09973495453596115, 0.081076480448246, 0.015029271133244038, -0.02505924366414547, 0.008173538371920586, 0.03313342481851578, -0.059782400727272034, -0.02154509164392948, 0.040914759039878845, -0.04907260835170746, 0.055640723556280136, 0.03679399564862251, -0.002070839051157236, -0.02794586680829525, -0.04392688721418381, 0.03942961245775223, -0.062334343791007996, 0.017654424533247948, -0.07927757501602173, 0.004005713853985071, 0.017047815024852753, -0.029702942818403244, 0.005171868018805981, -0.03296608477830887, -0.0030199734028428793, 0.03495325148105621, 0.051248036324977875, 0.030393222346901894, 0.037505194544792175, 0.011682460084557533, 0.026481637731194496, 0.034681323915719986, -0.02620971016585827, -0.0037024090997874737, -0.004816269502043724, 0.04965829849243164, -0.052921440452337265, 0.04173054173588753, -0.00037651616730727255, 0.004933930933475494, -0.01807277649641037, -0.07827352732419968, 0.06676886975765228, 0.028510641306638718, 0.06275269389152527, -0.09479840844869614, -0.03457673639059067, -0.013293112628161907, -0.017654424533247948, 0.000014350184756040107, -0.008272897452116013, -0.02643980272114277, -0.06091194972395897, 0.06551381200551987, 0.04576763138175011, -0.01077254582196474, 0.09513308852910995, -0.03671032562851906, 0.0008170923683792353, -0.027443844825029373, 0.04001530259847641, -0.03880208358168602, -0.041605036705732346, -0.012853844091296196, 0.0024931123480200768, 0.005391502287238836, 0.029012663289904594, 0.023009322583675385, 0.029702942818403244, 0.012843385338783264, 0.03497416898608208, 0.022611888125538826, -0.0020695317070931196, -0.06860961765050888, 0.005247693974524736, -0.0767674669623375, -0.02777852676808834, 0.01611698418855667, -0.009229876101016998, -0.02620971016585827, -0.03233855590224266, -0.03353085741400719, 0.023720519617199898, -0.013063019141554832, 0.038885753601789474, 0.0625016838312149, -0.02136729285120964, 0.014454037882387638, -0.0380072146654129, 0.03430480882525444, 0.0038174556102603674, 0.009982908144593239, -0.0437595471739769, 0.017058273777365685, -0.0206142608076334, -0.061288464814424515, -0.012257693335413933, 0.04256724566221237, 0.002210725098848343, 0.02430621162056923, 0.021984361112117767, -0.014025227166712284, 0.004492047242820263, 0.007943445816636086, -0.015196611173450947, -0.01777993142604828, 0.0025336400140076876, -0.006562886293977499, 0.026188792660832405, -0.03227580338716507, 0.02892899326980114, -0.012132188305258751, 0.07296046614646912, 0.07484304904937744, -0.0022878586314618587, -0.01992398127913475, 0.007012613583356142, -0.02811320871114731, -0.04635332524776459, -0.002338845282793045, -0.03991071507334709, -0.04459625110030174, -0.004735213704407215, -0.02101169526576996, 0.003966493532061577, -0.012686503119766712, -0.006348480936139822, 0.026816319674253464, -0.05836000666022301, 0.021566009148955345, 0.05463667958974838, 0.018501587212085724, 0.01835516281425953, 0.013993850909173489, 0.010537223890423775, -0.015458080917596817, 0.03988979756832123, -0.07409001886844635, -0.059907905757427216, 0.04409422725439072, 0.020969858393073082, -0.06701987981796265, -0.013115313835442066, 0.01564633846282959, 0.014976976439356804, 0.07279312610626221, -0.022737393155694008, 0.028196878731250763, -0.035894542932510376, -0.0655556470155716, -0.016367994248867035, 0.04635332524776459, -0.023657767102122307, -0.07099421322345734, 0.007410047575831413, -0.04493093118071556, 0.04672984033823013, -0.02315574511885643, -0.017915895208716393, 0.03535068407654762, 0.007237477693706751, -0.006745914928615093, -0.03210846334695816, 0.008042803965508938, 0.013742840848863125, -0.01484101265668869, -0.050662342458963394, 0.013272195123136044, 0.04978380724787712, -0.016765428707003593, -0.03014221228659153, 0.03350993990898132, 0.025101078674197197, 0.009805108420550823, -0.0016564097022637725, 0.050034817308187485, -0.013334947638213634, 0.004980995319783688, -0.012194940820336342, 0.018177364021539688, 0.04309018328785896, 0.011002639308571815, -0.002001549582928419, 0.03204571083188057, -0.033802784979343414, -0.08300089836120605, -0.029493767768144608, -0.014077521860599518, -0.0017165477620437741, 0.023427672684192657, -0.058401841670274734, -0.019505629315972328, 0.03516242653131485, 0.02349042519927025, 0.008236291818320751, -0.029828447848558426, -0.02286289818584919, -0.013847428373992443, -0.0006667473935522139, 0.01102355681359768, 0.047273699194192886, 0.04127035662531853, -0.013701004907488823, -0.026711730286478996, -0.0039115846157073975, 0.03426297381520271, 0.001987168798223138, -0.023197580128908157, -0.0517500564455986, -0.018281951546669006, -0.0178531426936388, 0.010228689759969711, 0.03348902240395546, 0.020112238824367523, 0.01756029576063156, -0.0357062853872776, 0.03332168236374855, -0.01933828927576542, -0.014537707902491093, -0.028155043721199036, -0.01743479073047638, -0.05815083160996437, 0.018689844757318497, 0.000987701234407723, -0.01293751411139965, -0.009324004873633385, -0.031146254390478134, 0.08220603317022324, -0.03430480882525444, -0.026607142761349678, -0.032882411032915115, 0.020080862566828728, 0.0595732256770134, -0.06522096693515778, 0.05739779770374298, -0.008487301878631115, 0.012425033375620842, -0.01472596637904644, 0.030978914350271225, -0.0258750282227993, -0.07429919391870499, -0.014014768414199352, 0.041605036705732346, -0.02876165322959423, 0.020582884550094604, 0.0421488955616951, 0.032589565962553024, -0.024034282192587852, -0.020697930827736855, 0.03493233397603035, -0.013931098394095898, -0.011253650300204754, -0.01177658885717392, 0.00888996571302414, 0.027046412229537964, 0.04723186418414116, -0.02436896413564682, -0.0318574532866478, -0.025895945727825165, -0.0033285075332969427, -0.018668927252292633, -0.03463948890566826, -0.029933035373687744, -0.013146690092980862, 0.02158692665398121, 0.0941290408372879, 0.026126038283109665, -0.004167824983596802, 0.025707688182592392, -0.013230360113084316, 0.019474253058433533, -0.009857403114438057, -0.027297422289848328, 0.03353085741400719, -0.08584568649530411, -0.008597119711339474, -0.0549713633954525, -0.01790543645620346, -0.014454037882387638, 0.01853296346962452, -0.033802784979343414, 0.043215688318014145, 0.01645166426897049, 0.04831957444548607, 0.05099702253937721, -0.031501851975917816, -0.03543435409665108, 0.019087279215455055, 0.02113720029592514, -0.012006682343780994, 0.001076600980013609, -0.040036220103502274, -0.023804189637303352, 0.015280281193554401, 0.026837237179279327, 0.06011708453297615, 0.06162314862012863, -0.01431807316839695, 0.06212516874074936, -0.04798489436507225, -0.04200247302651405, -0.0009896623669192195, 0.02761118672788143, 0.012372739613056183, 0.03719143196940422, 0.0006131461123004556, -0.028970828279852867, -0.0074518825858831406, 0.00802711583673954, 0.02130454033613205, 0.00017632853996474296, -0.04476359114050865, -0.010783004574477673, -0.018208740279078484, 0.03112533688545227, 0.029410097748041153, 0.06467711180448532, -0.10400213301181793, -0.04739920422434807, -0.0526704303920269, 0.016326159238815308, 0.03443031385540962, -0.00318208453245461, 0.03499508649110794, -0.05463667958974838, -0.02482914924621582, -0.016064690425992012, 0.02597961574792862, 0.05907120555639267, -0.00947042740881443, 0.00710151344537735, 0.030455974861979485, -0.0007981358794495463, -0.023239415138959885, 0.006860961206257343, 0.03746335953474045, -0.013397700153291225, -0.03752611204981804, -0.008042803965508938, 0.036396563053131104, -0.027402009814977646, 0.039283186197280884, -0.03512059152126312, -0.045349281281232834, -0.029535602778196335, 0.004635855555534363, -0.07011567801237106, -0.005017600953578949, -0.028280548751354218, -0.05492952838540077, -0.02148233912885189, 0.00538627291098237, 0.0591130405664444, 0.011996223591268063, 0.006442610174417496, 0.009475656785070896, -0.025017408654093742, 0.01877351477742195, 0.026000533252954483, 0.015248904936015606, 0.017047815024852753, 0.02558218315243721, -0.028887158259749413, 0.02643980272114277, -0.0004974458715878427, -0.032945167273283005, 0.05333979055285454, -0.03348902240395546, 0.02326033264398575, 0.045349281281232834, 0.011619707569479942, -0.04200247302651405, -0.038028132170438766, 0.021524174138903618, -0.03486958146095276, 0.03407471254467964, -0.03112533688545227, 0.04384321719408035, 0.018093694001436234, 0.00840363185852766, 0.0019139571813866496, -0.004505120683461428, -0.02014361508190632, 0.03863474354147911, -0.01600193791091442, 0.010082266293466091, 0.058067161589860916, 0.01749754324555397, 0.032652318477630615, -0.06530463695526123, -0.0526704303920269, -0.0021375135984271765, 0.045642126351594925, -0.017581213265657425, -0.022068031132221222, 0.01801002398133278, -0.04827773943543434, 0.07367166876792908, -0.011849801056087017, 0.03545527160167694, 0.06329654902219772, 0.048821598291397095, -0.0382373109459877, 0.01218448206782341, -0.041312191635370255, -0.07011567801237106, -0.0763072818517685, 0.04273458570241928, -0.06275269389152527, 0.0377771221101284, -0.010552912019193172, -0.006960319820791483, -0.005247693974524736, 0.015071106143295765, 0.011117685586214066 ]
717,699
pytorch_optimizer.optimizer.ranger
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, betas: BETAS = (0.95, 0.999), alpha: float = 0.5, k: int = 6, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, use_gc: bool = True, gc_conv_only: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-5, ): self.validate_learning_rate(lr) self.validate_betas(betas) self.validate_range(alpha, 'alpha', 0.0, 1.0, range_type='[]') self.validate_positive(k, 'k') 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 self.use_gc = use_gc self.gc_gradient_threshold: int = 3 if gc_conv_only else 1 defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'alpha': alpha, 'k': k, 'step_counter': 0, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, '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.95, 0.999), alpha: float = 0.5, k: int = 6, n_sma_threshold: int = 5, degenerated_to_sgd: bool = False, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, use_gc: bool = True, gc_conv_only: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-05)
[ 0.004557107109576464, -0.0652526244521141, -0.04779602214694023, 0.02033427357673645, -0.030911143869161606, -0.015093481168150902, -0.09635434299707413, -0.024012356996536255, -0.034646399319171906, 0.006727271247655153, -0.037200093269348145, 0.058963675051927567, 0.028776712715625763, 0.05061652138829231, -0.06479524821043015, 0.04623331502079964, 0.014283540658652782, 0.020410502329468727, -0.0013852366246283054, -0.018819207325577736, 0.0028419385198503733, -0.007813544943928719, -0.05389440059661865, 0.07805921882390976, 0.006389001850038767, 0.04989233985543251, 0.011777489446103573, 0.010710272938013077, -0.034646399319171906, 0.012311097234487534, -0.0005318212788552046, -0.02326911687850952, 0.008351916447281837, 0.04642388969659805, 0.02607055753469467, -0.03683800250291824, -0.0014555108500644565, -0.0016151168383657932, -0.12372080981731415, 0.036857061088085175, 0.03380787372589111, -0.03176872804760933, 0.074590764939785, -0.04242182895541191, -0.012044292874634266, 0.0037304910365492105, 0.008566312491893768, 0.05191242694854736, -0.00881405919790268, -0.03577078878879547, 0.030110731720924377, -0.03437959775328636, 0.010891318321228027, -0.0013900010380893946, -0.0653669685125351, 0.06391860544681549, 0.038248252123594284, 0.06426163762807846, 0.04124026745557785, 0.00032099851523526013, 0.016313156113028526, -0.031025489792227745, 0.03279782831668854, 0.0077277859672904015, -0.024260103702545166, -0.0037733702920377254, -0.08690185844898224, -0.01360700186342001, 0.01639891415834427, 0.040134940296411514, 0.11030437797307968, 0.0027371228206902742, 0.008947460912168026, 0.031120775267481804, -0.02570846676826477, -0.009033219888806343, -0.07622970640659332, -0.043412815779447556, -0.05149316415190697, -0.019066954031586647, 0.05606694519519806, 0.05873498693108559, -0.00680826511234045, -0.06532885879278183, 0.021001283079385757, -0.03975379094481468, -0.024793710559606552, -0.039296410977840424, -0.003854364389553666, -0.011510685086250305, -0.02584186941385269, -0.0022225722204893827, 0.03142569586634636, 0.0006926183123141527, 0.05290341377258301, 0.009057041257619858, -0.0040520853362977505, -0.059878431260585785, 0.019571976736187935, -0.023097600787878036, -0.015989180654287338, -0.01571284793317318, -0.03365541249513626, 0.024107644334435463, 0.03375070169568062, -0.038839034736156464, -0.04710995778441429, -0.021935097873210907, 0.038362596184015274, -0.04768167808651924, -0.022754566743969917, 0.03960132971405983, -0.002537019783630967, 0.010891318321228027, -0.05557145178318024, -0.0035542098339647055, -0.00020784504886250943, 0.01057687122374773, -0.022411532700061798, 0.000750386156141758, 0.036399684846401215, 0.009638292714953423, -0.03119700588285923, 0.052407920360565186, 0.03333143889904022, -0.0008486509905196726, 0.022049441933631897, 0.03577078878879547, 0.01751377433538437, -0.030396593734622, 0.029843928292393684, -0.012454027310013771, -0.011405869387090206, -0.00987174641340971, 0.022163785994052887, -0.045127984136343, 0.021325258538126945, 0.048215288668870926, -0.0313875786960125, 0.00961923599243164, 0.06635795533657074, 0.003306463360786438, 0.01646561548113823, -0.018523817881941795, -0.0055218893103301525, -0.006698685232549906, -0.0062270136550068855, -0.011358225718140602, -0.03866751492023468, 0.016456086188554764, 0.01744707301259041, 0.016246454790234566, 0.002770473249256611, 0.019781608134508133, 0.00268947915174067, -0.0556095689535141, 0.020772593095898628, -0.002756180241703987, -0.023040426895022392, 0.009257144294679165, -0.051150131970644, 0.022411532700061798, 0.01890496537089348, -0.04299355298280716, -0.0016174990450963378, 0.020715421065688133, -0.01573190465569496, 0.020753536373376846, -0.031616270542144775, -0.005526653490960598, -0.000998728210106492, -0.08217561990022659, -0.04619520157575607, 0.019000252708792686, -0.04501364007592201, 0.0701313242316246, 0.03531340882182121, -0.00583633640781045, -0.014883849769830704, -0.01197759248316288, 0.03937264159321785, -0.0023071395698934793, -0.024584079161286354, -0.07405715435743332, 0.004983516875654459, -0.002383369253948331, -0.011015191674232483, 0.026566050946712494, -0.015789076685905457, 0.009037984535098076, 0.0679587796330452, 0.0014233514666557312, 0.02302137017250061, 0.023059485480189323, 0.0024512612726539373, -0.006512875203043222, 0.0317496694624424, -0.010776974260807037, 0.00563623383641243, 0.0642235279083252, 0.06346122920513153, 0.035789843648672104, 0.00537895830348134, -0.03786710649728775, 0.03026319108903408, -0.01987689547240734, -0.016980165615677834, 0.015951065346598625, -0.014274012297391891, 0.0045714001171290874, -0.035675499588251114, -0.03963944688439369, 0.04600462689995766, 0.043069783598184586, 0.0030515703838318586, -0.05236980691552162, 0.00980504509061575, 0.02849085070192814, 0.017389900982379913, 0.007480039726942778, 0.06906411051750183, -0.03460828587412834, -0.014626573771238327, -0.02511768788099289, 0.04127838462591171, -0.0025822811294347048, 0.02033427357673645, -0.03914395347237587, -0.05713416263461113, -0.022602107375860214, 0.0017913980409502983, -0.044480033218860626, -0.014569401741027832, 0.002965811872854829, 0.02103939838707447, 0.0005097861285321414, -0.012110994197428226, 0.03256914019584656, -0.07752560824155807, -0.050082914531230927, 0.03216893598437309, 0.023535920307040215, 0.0055790613405406475, 0.024221988394856453, 0.00487870117649436, 0.005640998017042875, 0.03893432021141052, 0.0196100901812315, -0.0339793898165226, -0.021820751950144768, -0.036971405148506165, -0.04017305374145508, -0.02185886725783348, 0.04566159099340439, -0.05827760696411133, -0.024393504485487938, 0.040249284356832504, 0.014912435784935951, 0.040592316538095474, -0.016703832894563675, -0.007056011818349361, -0.0014340713387355208, -0.029043516144156456, 0.07039812952280045, -0.0006783252465538681, 0.029176918789744377, 0.017094511538743973, -0.000029963335691718385, 0.0073132868856191635, -0.0065366970375180244, 0.08720678091049194, 0.059421055018901825, -0.03472262993454933, -0.0018950228113681078, -0.017084982246160507, 0.00765155628323555, 0.006598633714020252, -0.03155909851193428, -0.020886939018964767, 0.04547101631760597, 0.059192363172769547, -0.03525623679161072, 0.033483896404504776, 0.012520728632807732, -0.015465101227164268, 0.0026704217307269573, -0.024927113205194473, -0.02887200005352497, 0.015884364023804665, 0.00537895830348134, -0.02197321131825447, 0.00324452668428421, 0.07089362293481827, 0.012482614256441593, 0.12189129739999771, -0.0043165069073438644, 0.04112592339515686, -0.0354849249124527, 0.02955806814134121, -0.008552019484341145, 0.06300385296344757, -0.04051608592271805, 0.053589481860399246, 0.010005148127675056, -0.05454235151410103, -0.027957243844866753, 0.053360793739557266, 0.008956990204751492, 0.03466545790433884, 0.02513674460351467, 0.0028943466022610664, 0.03607570752501488, 0.0974215567111969, 0.0032302336767315865, 0.030777743086218834, -0.07691577076911926, 0.010500641539692879, -0.06731082499027252, 0.03845788538455963, 0.06601492315530777, -0.01949574612081051, 0.018247485160827637, 0.000050695729441940784, -0.0313875786960125, -0.02780478447675705, -0.06391860544681549, 0.026546994224190712, 0.023288173601031303, -0.025556007400155067, -0.032435737550258636, -0.049587421119213104, -0.024336332455277443, 0.021935097873210907, -0.017227912321686745, -0.04676692187786102, 0.011053306981921196, -0.004566635470837355, 0.032321393489837646, -0.010338653810322285, -0.05046406388282776, 0.0974215567111969, 0.008437675423920155, -0.024088585749268532, 0.0660911500453949, -0.014636103063821793, -0.02361215092241764, 0.04310789704322815, -0.05153127759695053, 0.020963167771697044, 0.01648467406630516, -0.010519699193537235, 0.041773878037929535, -0.002067730762064457, 0.13027656078338623, 0.06365180015563965, -0.0036447327584028244, -0.003115889150649309, 0.007327580358833075, 0.026470763608813286, -0.05442800745368004, 0.008613956160843372, 0.021077513694763184, -0.035789843648672104, 0.04310789704322815, 0.029157862067222595, -0.01279706135392189, -0.021668292582035065, -0.03262631222605705, 0.026451706886291504, -0.027728553861379623, 0.016751477494835854, -0.06449032574892044, -0.01830465719103813, 0.002880053361877799, 0.02140148915350437, -0.007218000013381243, -0.04897758364677429, 0.008351916447281837, 0.020543904975056648, 0.016837235540151596, 0.012778003700077534, 0.021896982565522194, 0.03983001783490181, 0.035808902233839035, 0.03051093779504299, -0.04265051707625389, -0.01086273230612278, -0.006951196119189262, 0.07481945306062698, -0.021172799170017242, 0.012501670978963375, -0.017094511538743973, 0.015169710852205753, -0.0047476813197135925, -0.050082914531230927, 0.02115374244749546, 0.03342672437429428, 0.05503784492611885, -0.054504238069057465, -0.035561155527830124, -0.026566050946712494, -0.05740096792578697, -0.013978621922433376, 0.01748518832027912, -0.024622194468975067, -0.03268348425626755, 0.044098883867263794, 0.0000912672039703466, 0.0035804137587547302, 0.08026988059282303, -0.011415397748351097, 0.0013554594479501247, -0.039906248450279236, -0.004099728539586067, -0.045966509729623795, -0.04116404056549072, -0.0065938690677285194, 0.002489376114681363, 0.011005663312971592, -0.004326035734266043, 0.015112538821995258, 0.02591809816658497, 0.0551903061568737, 0.028071587905287743, 0.04989233985543251, 0.031120775267481804, -0.040249284356832504, 0.006965489126741886, -0.036628372967243195, -0.06651041656732559, -0.03466545790433884, 0.0040282635018229485, -0.0466906912624836, -0.014921964146196842, -0.007008368149399757, 0.028204990550875664, -0.0316924974322319, -0.006965489126741886, 0.025212973356246948, -0.013006692752242088, 0.01625598408281803, -0.07497191429138184, 0.0026942435652017593, -0.024031413719058037, -0.039296410977840424, -0.04897758364677429, -0.01803785376250744, -0.019124126061797142, -0.040821004658937454, -0.017551889643073082, 0.031006431207060814, 0.027537979185581207, 0.04303166642785072, -0.00803746934980154, -0.023402519524097443, -0.025498835369944572, -0.009957504458725452, -0.025079572573304176, 0.020029354840517044, -0.019009782001376152, 0.040477972477674484, 0.009862218052148819, -0.0351228341460228, 0.011891833506524563, -0.010691216215491295, 0.05782023072242737, 0.07131288945674896, -0.012082408182322979, -0.008766415528953075, -0.008985576219856739, -0.002780002076178789, -0.007899302989244461, 0.02140148915350437, -0.026585109531879425, -0.03449394181370735, 0.007408574223518372, -0.04280297830700874, -0.008737829513847828, -0.03679988905787468, -0.0029062575194984674, 0.021306201815605164, -0.04619520157575607, 0.005321786273270845, 0.09505844116210938, 0.008552019484341145, 0.0016401297179982066, -0.031940244138240814, -0.00439035426825285, -0.01569378934800625, 0.03727632388472557, -0.07950758188962936, -0.0302441343665123, 0.0257275253534317, 0.06658664345741272, -0.036514028906822205, 0.0007337108836509287, 0.028910115361213684, 0.01974349282681942, 0.04074477776885033, -0.001719932653941214, 0.004621425643563271, -0.029005402699112892, -0.05679112672805786, -0.024698423221707344, 0.03285500034689903, -0.031978361308574677, -0.08713054656982422, 0.0056267050094902515, -0.03647591173648834, 0.00047107573482207954, -0.030415650457143784, -0.012530256994068623, -0.010796031914651394, 0.026680396869778633, -0.015322170220315456, -0.02338346093893051, -0.04733864590525627, 0.02757609449326992, -0.040592316538095474, -0.038172025233507156, 0.044098883867263794, 0.053818169981241226, 0.042116910219192505, -0.02957712486386299, 0.008261393755674362, 0.05564768239855766, 0.020848823711276054, -0.03106360323727131, 0.0839289054274559, 0.031006431207060814, -0.0005562386359088123, -0.0500066839158535, -0.03636156767606735, 0.04577593505382538, 0.008270923048257828, 0.04112592339515686, 0.008313802070915699, -0.031501926481723785, -0.04348904639482498, -0.03443676978349686, 0.004950166214257479, 0.02525108866393566, 0.029481837525963783, -0.05816326290369034, -0.03352201357483864, 0.02231624536216259, -0.0054266019724309444, 0.0514550507068634, -0.044937409460544586, -0.030758684501051903, 0.05911613628268242, -0.00866636447608471, -0.018638161942362785, 0.02957712486386299, 0.056829243898391724, -0.0009897950803861022, 0.009581120684742928, -0.020181814208626747, 0.05980220064520836, 0.007794487290084362, -0.021115627139806747, -0.01202523522078991, -0.01103424932807684, -0.014941021800041199, -0.04943496361374855, 0.026356419548392296, 0.029939215630292892, -0.00842338241636753, -0.0813370943069458, 0.019953124225139618, -0.011301053687930107, -0.01290187705308199, -0.005779164377599955, -0.014779034070670605, -0.06052638217806816, 0.02839556336402893, -0.004764356650412083, 0.008318566717207432, -0.07390469312667847, -0.02908163145184517, 0.026127731427550316, -0.01946716010570526, -0.0537419393658638, -0.07851659506559372, 0.023516863584518433, 0.03190213069319725, -0.06761574745178223, 0.01010996475815773, -0.01746612973511219, 0.022849854081869125, -0.008566312491893768, 0.04428945854306221, -0.03458922728896141, -0.04977799579501152, -0.05313210189342499, 0.042345598340034485, -0.004752445500344038, -0.02523203194141388, 0.038972433656454086, 0.058582525700330734, -0.058811213821172714, -0.017161210998892784, 0.013425956480205059, 0.040935348719358444, 0.005064510740339756, -0.0014102495042607188, 0.007880245335400105, 0.0418119914829731, 0.04619520157575607, -0.0574771948158741, 0.0015686643309891224, -0.008247100748121738, 0.00970022939145565, -0.03700952231884003, -0.012920934706926346, -0.04657634720206261, -0.03436053916811943, 0.023859897628426552, 0.10908470302820206, 0.018323713913559914, 0.019915008917450905, -0.001199426711536944, -0.024850882589817047, 0.04718618467450142, -0.056257519870996475, -0.027290234342217445, 0.0040282635018229485, -0.11281996220350266, -0.002396471332758665, -0.03598041832447052, 0.028567081317305565, -0.020848823711276054, 0.01946716010570526, -0.07996495813131332, 0.022144729271531105, 0.03477980196475983, 0.029767699539661407, 0.05949728190898895, 0.012110994197428226, 0.0003635799512267113, 0.033941276371479034, 0.053360793739557266, 0.0006146020023152232, 0.01554133091121912, -0.02300231344997883, -0.028452737256884575, -0.01946716010570526, -0.010129021480679512, 0.06975017488002777, 0.040973465889692307, -0.035103779286146164, 0.0723038762807846, -0.054046858102083206, -0.03649497032165527, -0.017246970906853676, 0.011129536665976048, 0.0175614170730114, 0.027861956506967545, 0.029615240171551704, -0.037219151854515076, -0.032321393489837646, -0.00958588533103466, 0.03500849008560181, 0.011958534829318523, -0.003323138691484928, -0.01377851888537407, -0.017999738454818726, -0.009490597993135452, -0.015808135271072388, 0.01138681173324585, -0.06464278697967529, -0.007999354042112827, -0.03577078878879547, 0.026699453592300415, 0.009814574383199215, 0.01707545295357704, -0.02406952902674675, -0.06327065080404282, 0.014121551997959614, -0.012015706859529018, 0.048215288668870926, 0.07512437552213669, -0.01155832875519991, -0.04021116718649864, 0.011120008304715157, 0.0021177565213292837, -0.06853049993515015, 0.001637747511267662, -0.0012315860949456692, -0.01987689547240734, -0.044480033218860626, -0.0029872513841837645, 0.030568111687898636, -0.004283156245946884, 0.029729584231972694, -0.0066891564056277275, -0.06285139173269272, -0.05149316415190697, 0.01297810673713684, -0.017428016290068626, -0.009638292714953423, -0.030053559690713882, -0.05545710772275925, 0.053017757833004, -0.021992269903421402, 0.029596181586384773, 0.020048411563038826, -0.002021278254687786, 0.014969607815146446, -0.03251196816563606, 0.04623331502079964, 0.07077927887439728, 0.031330406665802, -0.050082914531230927, -0.0234978049993515, 0.019162241369485855, -0.014921964146196842, 0.001141063403338194, -0.047148071229457855, 0.024908054620027542, -0.03718103840947151, 0.025613179430365562, 0.033026520162820816, 0.002958665369078517, -0.013159152120351791, -0.048672664910554886, 0.015579445287585258, 0.003999677021056414, 0.05103578418493271, -0.034512996673583984, 0.044213227927684784, 0.020772593095898628, -0.030549053102731705, -0.0008915301878005266, 0.010958019644021988, -0.03401750326156616, 0.05092144012451172, 0.008733064867556095, 0.06086941808462143, 0.08720678091049194, 0.026737568899989128, 0.04486117884516716, -0.06003089249134064, -0.01625598408281803, -0.002982487203553319, 0.055914487689733505, -0.018228428438305855, -0.0011928757885470986, 0.047148071229457855, -0.013225853443145752, 0.03260725364089012, -0.02103939838707447, 0.0035780316684395075, 0.046995609998703, 0.04265051707625389, -0.03268348425626755, 0.011301053687930107, -0.027290234342217445, -0.04314601048827171, -0.08339529484510422, -0.0018021177966147661, -0.054504238069057465, 0.0556095689535141, 0.01705639623105526, 0.010014677420258522, 0.0328359454870224, 0.033102747052907944, -0.005764871370047331 ]
717,702
pytorch_optimizer.optimizer.ranger
__str__
null
def __str__(self) -> str: return 'Ranger'
(self) -> str
[ 0.01762893795967102, -0.038678936660289764, 0.028171392157673836, -0.008312654681503773, 0.01499332394450903, -0.076101154088974, 0.0034537881147116423, 0.03384406864643097, 0.0908326655626297, -0.03609568625688553, -0.025657959282398224, -0.004760685842484236, -0.002725067315623164, 0.05341044440865517, -0.006270491052418947, -0.022760529071092606, -0.016380948945879936, -0.06419725716114044, -0.009041376411914825, 0.017314758151769638, 0.010891541838645935, 0.03895820677280426, 0.0361655056476593, -0.007199937477707863, -0.04360107704997063, 0.08643415570259094, -0.0235808864235878, -0.014138058759272099, -0.024052154272794724, 0.030423007905483246, -0.022655803710222244, -0.0739368125796318, 0.007649388164281845, 0.008247201330959797, -0.06548888236284256, 0.028066664934158325, -0.06053183972835541, 0.018466748297214508, -0.013963514938950539, 0.016162768006324768, 0.009573735296726227, 0.029916830360889435, -0.014871143735945225, -0.04566069319844246, -0.050547923892736435, -0.038225121796131134, -0.015010778792202473, 0.023964883759617805, -0.015682773664593697, 0.0041585094295442104, 0.011327901855111122, 0.006410126108676195, -0.05149046331644058, -0.005437043495476246, -0.023249253630638123, 0.013474792242050171, 0.02047400362789631, 0.021905263885855675, -0.011039904318749905, 0.015848590061068535, -0.0001611804182175547, -0.023371433839201927, 0.036025870591402054, -0.020351823419332504, -0.013387519866228104, 0.0039185113273561, -0.0028167027048766613, 0.03920256718993187, 0.04803449288010597, 0.03770149126648903, 0.042693447321653366, -0.011031176894903183, -0.031871724873781204, 0.014731508679687977, 0.018990380689501762, -0.008478472009301186, -0.0846887156367302, 0.006829031743109226, 0.029532834887504578, -0.01559550128877163, 0.06335944682359695, 0.006641396787017584, 0.021259451285004616, -0.008042111992835999, -0.0038334212731570005, -0.11052121967077255, -0.03380916267633438, -0.08203565329313278, -0.029410654678940773, -0.011528627015650272, -0.05033847317099571, -0.02108490839600563, -0.025815049186348915, -0.0023868882562965155, -0.025727776810526848, 0.020805638283491135, 0.018152570351958275, -0.06730414181947708, 0.03466442599892616, 0.0031352455262094736, -0.0024457969702780247, 0.09062321484088898, 0.0007265391759574413, 0.013509701006114483, -0.03426297381520271, -0.020369278267025948, -0.05382934957742691, 0.021748173981904984, 0.017742391675710678, 0.026949584484100342, -0.04653341323137283, 0.018204933032393456, 0.01918237842619419, 0.023999791592359543, -0.002855975180864334, -0.036025870591402054, -0.03499605879187584, -0.009050102904438972, 0.04279817268252373, -0.008853740990161896, 0.04765049368143082, 0.01739330403506756, -0.04932611808180809, -0.00483050337061286, 0.017724936828017235, 0.08112802356481552, -0.04342653229832649, 0.007601388730108738, 0.05414352938532829, -0.008836287073791027, 0.022167081013321877, 0.01698312535881996, -0.0699223056435585, -0.0279968474060297, 0.09851259738206863, 0.029916830360889435, 0.02159108594059944, 0.030562642961740494, 0.09104211628437042, 0.1318155825138092, -0.003124336479231715, 0.004573051352053881, 0.05609842389822006, 0.03265717253088951, -0.006287945434451103, 0.008216655813157558, -0.0309466402977705, 0.07645024359226227, -0.009093739092350006, 0.007858840748667717, 0.018641293048858643, 0.0495704784989357, 0.06873540580272675, 0.01892056316137314, 0.007038484327495098, 0.021189633756875992, -0.029759742319583893, -0.0318891778588295, 0.022341623902320862, -0.023109616711735725, -0.01464423630386591, -0.053759533911943436, 0.005821040365844965, -0.027420852333307266, 0.008190474472939968, 0.008731560781598091, -0.006187582854181528, 0.013431156054139137, 0.01682603545486927, 0.0067199417389929295, -0.03070227801799774, -0.08594543486833572, -0.1138724684715271, 0.013658063486218452, 0.002965065184980631, 0.053759533911943436, 0.009757006540894508, 0.08238474279642105, 0.01509805116802454, -0.0012327166041359305, 0.0072086649015545845, -0.03906293213367462, -0.03119100257754326, 0.008190474472939968, 0.058611854910850525, -0.07135356217622757, 0.02974228747189045, 0.025361234322190285, 0.025273961946368217, -0.007343936245888472, 0.018362022936344147, 0.024296516552567482, -0.05222354829311371, 0.018362022936344147, 0.0021807083394378424, -0.035030968487262726, -0.012322802096605301, -0.07652006298303604, -0.0018774382770061493, -0.013020978309214115, -0.005794858559966087, 0.061823464930057526, -0.04988465830683708, 0.062172550708055496, 0.041436731815338135, -0.01749802939593792, 0.023615794256329536, -0.0015447138575837016, 0.025500869378447533, -0.03986583650112152, 0.023912519216537476, 0.047196682542562485, 0.0059694028459489346, 0.004295962862670422, 0.029026657342910767, -0.06786268204450607, 0.006353399250656366, -0.010123548097908497, -0.04265853762626648, 0.019566375762224197, 0.05578424409031868, -0.021817991510033607, -0.020753273740410805, -0.02679249458014965, -0.07295936346054077, 0.022673258557915688, 0.003215972101315856, -0.038085486739873886, -0.013160613365471363, -0.021521268412470818, 0.007348299957811832, -0.061718735843896866, -0.02998664788901806, 0.0060217659920454025, -0.012593344785273075, -0.0012818070827051997, -0.040075287222862244, 0.025605596601963043, -0.0763804242014885, -0.014626782387495041, -0.018204933032393456, 0.030126284807920456, 0.006253036670386791, 0.016215132549405098, 0.057808954268693924, -0.07274991273880005, 0.027577942237257957, 0.009722097776830196, -0.06712959706783295, -0.016363494098186493, 0.036235321313142776, -0.08803996443748474, -0.014129332266747952, 0.008997740224003792, 0.017995480448007584, -0.03672404587268829, -0.06486053019762039, 0.022306716069579124, 0.016808580607175827, -0.006388308014720678, -0.032168447971343994, -0.0011607172200456262, -0.04681268334388733, 0.022009991109371185, -0.011092266999185085, 0.010830451734364033, -0.04803449288010597, 0.03339025378227234, 0.0345597006380558, -0.03263971582055092, 0.12748689949512482, 0.02288271114230156, -0.07652006298303604, 0.0388534814119339, -0.0372476764023304, -0.022149626165628433, 0.0009741733665578067, 0.05257263407111168, -0.08482835441827774, -0.04988465830683708, -0.02213217131793499, -0.033878978341817856, 0.00707339309155941, 0.006715578027069569, -0.017777299508452415, -0.05749477446079254, 0.03206372261047363, 0.013841334730386734, 0.019339468330144882, 0.03265717253088951, 0.07777678221464157, 0.0013516246108338237, -0.03634004667401314, 0.018449293449521065, 0.05739004537463188, 0.011921350844204426, 0.03469933569431305, 0.03440260887145996, -0.012881342321634293, -0.019444195553660393, 0.012261711992323399, -0.0318891778588295, -0.007418117485940456, -0.02007255330681801, -0.0388534814119339, -0.017995480448007584, 0.00509668281301856, -0.007479207590222359, 0.01532495766878128, 0.03864402696490288, -0.020247096195816994, -0.0003122700145468116, 0.013300248421728611, 0.05257263407111168, 0.035886235535144806, 0.035781506448984146, 0.020194733515381813, 0.020561276003718376, 0.008413017727434635, 0.06775795668363571, -0.03201135993003845, 0.016834763810038567, -0.07177247107028961, 0.03244771808385849, -0.008164293132722378, -0.033180803060531616, -0.04820903763175011, 0.08517744392156601, 0.01412060484290123, 0.05508606880903244, -0.05456243455410004, -0.05473697930574417, 0.04031965136528015, -0.018012935295701027, -0.04216981679201126, 0.01988055557012558, 0.048243943601846695, -0.023615794256329536, -0.009931550361216068, -0.02668776921927929, 0.09865223616361618, -0.010324274189770222, -0.04908175393939018, 0.019461648538708687, 0.03672404587268829, 0.06129983067512512, -0.030859367921948433, -0.011240629479289055, 0.024575786665081978, 0.010524999350309372, -0.026181591674685478, -0.00624867295846343, -0.01249734591692686, 0.012776616029441357, 0.009922822937369347, -0.004175963811576366, -0.031068820506334305, 0.04066873714327812, -0.0003725422138813883, 0.009608644060790539, -0.0340360663831234, -0.04311235249042511, -0.0030021558050066233, 0.03864402696490288, -0.043845437467098236, -0.011930078268051147, -0.007038484327495098, 0.0031570633873343468, 0.06946849077939987, -0.02242889627814293, 0.0043985070660710335, 0.0008252655388787389, -0.04831376299262047, -0.0030807005241513252, -0.007435571867972612, 0.0519791841506958, 0.03339025378227234, 0.02274307608604431, 0.006287945434451103, -0.0137976985424757, 0.032866623252630234, 0.012148258276283741, 0.009722097776830196, 0.04370580241084099, 0.021364178508520126, -0.006427580490708351, 0.011048631742596626, 0.037073131650686264, 0.005759949795901775, -0.025500869378447533, -0.002279980108141899, -0.04091309756040573, 0.018990380689501762, -0.027525579556822777, -0.07191210240125656, -0.043286897242069244, -0.013605699874460697, -0.010682089254260063, -0.07575207203626633, 0.02312707155942917, 0.02413942664861679, -0.01690458133816719, -0.04091309756040573, -0.01832711324095726, -0.03560696542263031, 0.04733631759881973, 0.019409285858273506, 0.032273173332214355, -0.02127690613269806, -0.028066664934158325, -0.02148635871708393, -0.0034559699706733227, -0.026775039732456207, -0.04440397769212723, 0.05208391323685646, -0.016223859041929245, -0.02623395435512066, -0.01083917822688818, 0.002258162247017026, 0.006798486225306988, -0.0401800163090229, 0.04440397769212723, 0.034070976078510284, 0.08245455473661423, 0.025413597002625465, 0.050652652978897095, 0.06461616605520248, 0.04035455733537674, 0.06294054538011551, 0.021957628428936005, -0.014487147331237793, -0.00874901469796896, -0.022411441430449486, -0.048243943601846695, 0.03459461033344269, -0.030021557584404945, -0.0007058120681904256, -0.03787603601813316, -0.038085486739873886, 0.015394775196909904, 0.02623395435512066, -0.04677777737379074, 0.015281321480870247, 0.010743179358541965, 0.019060198217630386, -0.06123001500964165, -0.05742495507001877, -0.024313971400260925, 0.06328963488340378, -0.026827404275536537, -0.0142689673230052, 0.016965670511126518, -0.013754062354564667, -0.010045004077255726, 0.036130595952272415, -0.00887992326170206, -0.026705222204327583, -0.043740712106227875, 0.002211253624409437, -0.011607171967625618, -0.05557478964328766, 0.025116872042417526, -0.04552105814218521, 0.03414079546928406, 0.023301616311073303, 0.02127690613269806, 0.015141686424612999, 0.015604227781295776, -0.06667578220367432, -0.027159037068486214, 0.01744566671550274, -0.048139218240976334, -0.008557016961276531, -0.025518324226140976, -0.014452238567173481, 0.07428590208292007, -0.038225121796131134, -0.014242785051465034, -0.01998528093099594, -0.024802694097161293, -0.06904958188533783, -0.034734245389699936, -0.013335157185792923, 0.06178855523467064, -0.025500869378447533, -0.00018613474094308913, -0.016686400398612022, 0.029829559847712517, -0.0202296432107687, 0.000017744163415045477, -0.005013774614781141, 0.000984536949545145, -0.08447926491498947, 0.0026203407905995846, -0.03496115282177925, 0.0519791841506958, -0.016834763810038567, -0.014827507548034191, -0.07198192179203033, 0.009652280248701572, 0.027019402012228966, -0.035327691584825516, 0.0008449017768725753, -0.014591873623430729, 0.04740613326430321, -0.021364178508520126, 0.003853057511150837, 0.0009518099250271916, -0.005266863387078047, -0.0006763577694073319, 0.012750434689223766, -0.02178308367729187, 0.04653341323137283, 0.012549709528684616, -0.013370065949857235, -0.04000547155737877, -0.005249409005045891, 0.029183747246861458, -0.0038028759881854057, 0.009303191676735878, 0.0006878122221678495, -0.021608538925647736, -0.022306716069579124, -0.039377111941576004, 0.004361416678875685, 0.018449293449521065, -0.02113727107644081, 0.007361390627920628, -0.01151989959180355, 0.06541907042264938, 0.007649388164281845, 0.04091309756040573, 0.010524999350309372, 0.021451450884342194, -0.00337306153960526, 0.0688750371336937, -0.046987228095531464, 0.010385364294052124, 0.014242785051465034, 0.014591873623430729, 0.019391831010580063, -0.04566069319844246, -0.007378845009952784, -0.03143536299467087, 0.021364178508520126, -0.0519791841506958, -0.003689422504976392, 0.0013068977277725935, 0.008312654681503773, 0.003008701140061021, -0.024558331817388535, -0.027368489652872086, -0.03544987365603447, -0.03640986606478691, -0.014548237435519695, 0.045695602893829346, -0.016764946281909943, 0.005864676553755999, 0.08461890369653702, 0.021521268412470818, -0.0255881417542696, -0.038539301604032516, 0.04838357865810394, 0.05271226912736893, 0.04587014764547348, 0.06678050756454468, -0.011336629278957844, 0.052747178822755814, 0.00889737717807293, -0.04520688205957413, 0.007348299957811832, -0.037073131650686264, 0.011903896927833557, 0.044543612748384476, -0.06545397639274597, 0.05218863859772682, 0.057564590126276016, 0.022708166390657425, -0.020002735778689384, 0.000671994173899293, -0.0186238382011652, 0.030021557584404945, -0.0005945402663201094, -0.0648256167769432, -0.033774252980947495, -0.011537354439496994, -0.029166292399168015, 0.019060198217630386, 0.021154725924134254, -0.009146102704107761, -0.03255244344472885, -0.0072086649015545845, -0.03899311646819115, -0.03328552842140198, 0.05079228803515434, -0.06761832535266876, 0.019810736179351807, -0.0321509949862957, 0.012174439616501331, 0.023109616711735725, 0.045590877532958984, -0.007213028147816658, -0.0007636297377757728, 0.020212188363075256, 0.03265717253088951, 0.028729932382702827, 0.02298743650317192, 0.011772988364100456, -0.020142370834946632, 0.035676781088113785, -0.01993291825056076, -0.03651459142565727, 0.0021545267663896084, -0.0020847092382609844, 0.008216655813157558, -0.0222368985414505, 0.03469933569431305, -0.01963619329035282, -0.018466748297214508, 0.05012901872396469, 0.0014181694714352489, 0.06786268204450607, -0.027019402012228966, 0.03319825604557991, -0.04300762712955475, 0.019269650802016258, 0.0030457917600870132, -0.01597077026963234, 0.04618432745337486, -0.1256716400384903, 0.019950373098254204, -0.01792566291987896, -0.003709058742970228, -0.09893150627613068, -0.030073920264840126, 0.002851611701771617, 0.02583250217139721, 0.04244908690452576, -0.025012146681547165, 0.0032225174363702536, 0.012130803428590298, 0.010996268130838871, -0.053061358630657196, 0.04077346250414848, -0.0656285211443901, 0.012540982104837894, -0.055365338921546936, -0.02783975750207901, -0.0226383488625288, -0.03826003149151802, -0.038050577044487, 0.036025870591402054, -0.007509753108024597, 0.032377902418375015, -0.019967826083302498, -0.0017367121763527393, 0.008557016961276531, 0.008221019990742207, -0.04157636687159538, -0.0032639717683196068, -0.006052311044186354, -0.0018468931084498763, 0.024924874305725098, -0.009713370352983475, 0.0685957670211792, 0.019409285858273506, 0.0024370697792619467, -0.008853740990161896, 0.00370033155195415, -0.035921141505241394, -0.014452238567173481, 0.019706010818481445, 0.005140319000929594, -0.0578787699341774, 0.02108490839600563, 0.011127175763249397, 0.002890883944928646, -0.003925056662410498, 0.0771484225988388, -0.03319825604557991, -0.01685221679508686, -0.003892329754307866, -0.03145281597971916, -0.04670795798301697, 0.052153728902339935, 0.07973167300224304, -0.06622196733951569, 0.029916830360889435, 0.025204144418239594, -0.026949584484100342, -0.07330845296382904, -0.039377111941576004, -0.04251890257000923, 0.01625876873731613, 0.08154692500829697, 0.034629516303539276, -0.03314589336514473, -0.03997056186199188, -0.02703685685992241, -0.022568531334400177, 0.0538642592728138, 0.016276221722364426, -0.02162599377334118, -0.012418800964951515, -0.01432133000344038, -0.02754303440451622, 0.006641396787017584, -0.022673258557915688, 0.027176491916179657, -0.02974228747189045, 0.05557478964328766, 0.060008205473423004, -0.004064692184329033, -0.0011399900540709496, 0.008583198301494122, -0.06904958188533783, 0.01677367277443409, 0.03167972341179848, -0.029777195304632187, 0.013762789778411388, -0.008343200199306011, 0.0024261607322841883, 0.011738079600036144, 0.013064613565802574, 0.04785994812846184, 0.055365338921546936, -0.002530887024477124, -0.03113863803446293, -0.06049693003296852, -0.010455181822180748, 0.021049998700618744, 0.023249253630638123, -0.021189633756875992, 0.007156301289796829, 0.049605388194322586, 0.006292309146374464, 0.009914095513522625, 0.004874139558523893, 0.07847495377063751, 0.05058283358812332, 0.035083331167697906, 0.01744566671550274, -0.027525579556822777, -0.04723158851265907, 0.019514013081789017, 0.04014510661363602, 0.033023715019226074, 0.040040381252765656, -0.028729932382702827, 0.027961939573287964, 0.08210547268390656, 0.017724936828017235, -0.0036174231208860874, 0.03169718012213707, -0.0012239894131198525, -0.027752486988902092, 0.016712581738829613, 0.01011482160538435, -0.0013679881813004613, 0.011834079399704933, 0.05348026379942894, -0.030161192640662193, 0.01932201348245144, -0.01176426187157631, 0.0050094109028577805, 0.048593033105134964, 0.005288681481033564, 0.00681157736107707 ]
717,723
pytorch_optimizer.optimizer.ranger
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=True, 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['slow_buffer'] = torch.empty_like(p) state['slow_buffer'].copy_(p) if group['adanorm']: state['exp_grad_norm'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) if self.use_gc and grad.dim() > self.gc_gradient_threshold: centralize_gradient(grad, gc_conv_only=False) 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'], ) 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) if n_sma >= self.n_sma_threshold: de_nom = exp_avg_sq.sqrt().add_(group['eps']) p.addcdiv_(exp_avg, de_nom, value=-step_size) else: p.add_(exp_avg, alpha=-step_size) if group['step'] % group['k'] == 0: slow_p = state['slow_buffer'] slow_p.add_(p - slow_p, alpha=group['alpha']) p.copy_(slow_p) return loss
(self)
[ -0.007938137277960777, -0.02631152607500553, -0.034195054322481155, 0.05961298197507858, 0.006016899831593037, 0.0019237200031057, -0.0348900742828846, -0.040509819984436035, -0.04579198360443115, 0.003060576505959034, -0.01895422674715519, 0.009556544944643974, 0.02513991855084896, 0.08090049028396606, -0.026529960334300995, 0.04178071767091751, 0.011239489540457726, 0.05012097209692001, 0.02813843823969364, -0.009209034033119678, -0.012967114336788654, -0.06406112015247345, -0.026192378252744675, 0.04424307867884636, -0.06835038959980011, 0.0057885353453457355, 0.05103442817926407, 0.0019572300370782614, -0.02426617592573166, 0.008747341111302376, -0.004152752924710512, -0.08022532612085342, 0.030660374090075493, 0.0008700178586877882, 0.026986688375473022, -0.05687261000275612, 0.0030307897832244635, 0.012450812384486198, -0.08967762440443039, -0.04086725786328316, -0.02212153933942318, -0.011755790561437607, 0.011884866282343864, 0.005867966450750828, 0.00039715509046800435, 0.003149936441332102, -0.032527003437280655, 0.04245587810873985, -0.005932504311203957, -0.0064140548929572105, 0.016223786398768425, -0.05536342039704323, 0.04110555350780487, -0.0010437732562422752, 0.02527892217040062, 0.09055136144161224, 0.06517314910888672, -0.048333775252103806, 0.022558409720659256, -0.05190817266702652, 0.0565548874437809, -0.061956197023391724, 0.043647345155477524, -0.002296052873134613, -0.00199446314945817, -0.00669206352904439, -0.06735750287771225, -0.022220827639102936, 0.02394845150411129, 0.033003587275743484, 0.016005350276827812, 0.007297724951058626, 0.008702660910785198, 0.005604851525276899, -0.057786066085100174, -0.027006546035408974, -0.023511581122875214, -0.05127272382378578, 0.026529960334300995, -0.03556523844599724, 0.012411097064614296, 0.006150939501821995, -0.025517214089632034, 0.0024809781461954117, 0.003363407216966152, -0.03792831301689148, -0.012818180955946445, -0.027979576960206032, -0.014972747303545475, -0.029389476403594017, 0.0415821373462677, 0.0034900004975497723, 0.0316135473549366, 0.04372677579522133, 0.045672837644815445, 0.03399647772312164, -0.042694173753261566, -0.01699823886156082, -0.026668963953852654, -0.01862657442688942, 0.01513160951435566, 0.04742031916975975, 0.02760227955877781, 0.05333792790770531, 0.04360762983560562, -0.032328423112630844, -0.005758748855441809, -0.027860431000590324, 0.04757918044924736, -0.05937468633055687, -0.021426517516374588, -0.00419991509988904, -0.040172237902879715, -0.014247938990592957, -0.05035926774144173, -0.013195478357374668, -0.015379831194877625, 0.017008166760206223, -0.044997673481702805, 0.03772973269224167, 0.046983446925878525, -0.021029362455010414, -0.05921582505106926, -0.004304168280214071, 0.020225122570991516, 0.019867682829499245, 0.06104273721575737, 0.01949038729071617, 0.015677697956562042, -0.06433912366628647, -0.010524610057473183, 0.013950073160231113, 0.0053169140592217445, -0.001985775539651513, 0.015072035603225231, -0.013225264847278595, -0.010286317206919193, 0.020254909992218018, -0.012778465636074543, 0.00131061184220016, -0.01074304524809122, -0.0031871695537120104, -0.006433912552893162, 0.004237148445099592, 0.02764199487864971, 0.01796134002506733, 0.05091528221964836, 0.03872262313961983, 0.004604517016559839, -0.0005194044206291437, 0.023888878524303436, 0.016720229759812355, 0.02512005902826786, 0.018239347264170647, 0.011914652772247791, 0.02412717230618, -0.029012179002165794, 0.058778952807188034, -0.026907257735729218, -0.02944905124604702, -0.026827827095985413, -0.0257952231913805, -0.022856276482343674, 0.00016522272198926657, 0.011874937452375889, 0.0037928312085568905, -0.0023295627906918526, 0.05361593887209892, -0.039834655821323395, 0.02313428372144699, 0.01230187900364399, -0.01912301778793335, 0.04618913680315018, 0.03355960547924042, -0.04436222463846207, 0.13940143585205078, 0.011418209411203861, 0.009784908965229988, -0.025040628388524055, -0.012252234853804111, -0.002842141082510352, -0.00703460955992341, -0.02363072894513607, -0.04618913680315018, -0.005560171324759722, 0.025556931272149086, 0.017037954181432724, -0.015528764575719833, 0.023372577503323555, 0.011199773289263248, -0.01006291713565588, -0.014287654310464859, 0.05254361778497696, -0.018547143787145615, -0.012798323296010494, 0.021227939054369926, 0.020830783993005753, 0.00839486625045538, 0.08872444927692413, 0.020513061434030533, -0.016581226140260696, -0.005465846974402666, 0.030997956171631813, -0.005495633464306593, -0.03393690288066864, -0.01230187900364399, -0.027224982157349586, 0.06449798494577408, -0.016412435099482536, 0.024027884006500244, -0.0782792717218399, -0.00891116727143526, 0.03481064364314079, 0.07768353819847107, 0.056515172123909, -0.06501428782939911, 0.010594111867249012, 0.028337016701698303, 0.07005815953016281, 0.0005795982433483005, -0.03908006101846695, -0.07549918442964554, 0.016591154038906097, 0.004018713254481554, 0.060963306576013565, -0.021585378795862198, 0.02813843823969364, -0.0432899072766304, -0.00616086833178997, -0.007128933910280466, -0.00262122368440032, -0.020731495693325996, 0.014446516521275043, -0.01129906252026558, 0.04237644746899605, 0.019033657386898994, -0.04527568072080612, -0.021664811298251152, -0.0003223782405257225, -0.014535876922309399, -0.03197098523378372, -0.03707442805171013, -0.02361087128520012, 0.04146299138665199, -0.01628335937857628, 0.0349496491253376, 0.0664837658405304, 0.013930215500295162, -0.014247938990592957, 0.04060911014676094, -0.03316245228052139, -0.038007743656635284, -0.02611294761300087, 0.031077386811375618, -0.05639602243900299, -0.031156817451119423, 0.07502260059118271, 0.04674515500664711, 0.038146745413541794, -0.043647345155477524, 0.03075966238975525, -0.0548471175134182, -0.04936637729406357, 0.0465862937271595, -0.03939778730273247, 0.012778465636074543, 0.04753946512937546, -0.04742031916975975, 0.04277360439300537, 0.045156534761190414, 0.0615193247795105, 0.08459403365850449, -0.06533201038837433, -0.029190899804234505, -0.00207885866984725, 0.044918242841959, 0.011696217581629753, 0.017057811841368675, -0.003934317734092474, -0.028158295899629593, 0.06767522543668747, -0.05174930766224861, -0.06346538662910461, -0.0014123828150331974, -0.06803266704082489, 0.03355960547924042, -0.0249413400888443, -0.018179774284362793, 0.06803266704082489, 0.006558023393154144, 0.030978098511695862, 0.015528764575719833, 0.0880890041589737, 0.005143158603459597, 0.08443517237901688, 0.013096189126372337, -0.007923244498670101, 0.00284710549749434, -0.03624040260910988, 0.003564466955140233, 0.08006646484136581, -0.024564042687416077, 0.01048489473760128, 0.01122956071048975, -0.021565521135926247, -0.022737128660082817, 0.0016258537070825696, -0.0007794168777763844, 0.027502991259098053, -0.023015137761831284, -0.018418068066239357, -0.005505562759935856, 0.011567141860723495, 0.01915280520915985, -0.0006720608798786998, -0.09293429553508759, -0.007585662417113781, -0.04460051655769348, 0.024861909449100494, 0.05806407704949379, -0.03177240863442421, 0.023670444265007973, 0.02676825411617756, 0.024564042687416077, -0.02032441273331642, -0.015181253664195538, 0.07764381915330887, 0.01766347326338291, -0.029230615124106407, -0.04277360439300537, -0.08570607006549835, -0.007297724951058626, 0.04845292121171951, 0.03197098523378372, -0.04388563707470894, -0.016581226140260696, 0.026986688375473022, -0.014803956262767315, 0.02065206505358219, -0.057468343526124954, 0.07545946538448334, 0.03540637716650963, -0.020195337012410164, 0.029727058485150337, 0.03592268005013466, -0.035505667328834534, 0.04618913680315018, 0.0091593898832798, 0.025378210470080376, 0.015280541963875294, 0.0028818566352128983, -0.025358352810144424, -0.02627180889248848, 0.06727807223796844, 0.04090697318315506, 0.03711414337158203, -0.004440690390765667, -0.017216673120856285, 0.021684668958187103, -0.07339426130056381, 0.01762375794351101, 0.028893033042550087, -0.04444165527820587, 0.09356974065303802, 0.08554720878601074, -0.0016680513508617878, -0.041184984147548676, -0.033023446798324585, 0.04420336335897446, -0.023591013625264168, 0.0158067736774683, -0.04078782722353935, 0.008295577019453049, 0.03008449822664261, -0.039516933262348175, -0.022002391517162323, -0.038166604936122894, -0.008419687859714031, 0.05917610973119736, 0.054132238030433655, 0.040013376623392105, -0.030223503708839417, -0.027562564238905907, 0.032169561833143234, 0.041701287031173706, -0.02430589124560356, 0.01189479511231184, -0.060129281133413315, 0.034195054322481155, -0.06783409416675568, 0.06564974039793015, 0.013701850548386574, -0.0002531863865442574, 0.002317151753231883, -0.061479609459638596, 0.04009280726313591, 0.03759073093533516, 0.04690401628613472, -0.04702316224575043, -0.01406921911984682, -0.023690301924943924, -0.009839517995715141, 0.013503273017704487, 0.00814664363861084, -0.02527892217040062, -0.07418857514858246, 0.016710299998521805, 0.028853317722678185, 0.013801139779388905, 0.07549918442964554, -0.009660798124969006, 0.006483557168394327, -0.05520455911755562, 0.0008005157578736544, 0.005619744770228863, -0.0432104729115963, -0.02827744372189045, -0.011785577051341534, -0.00590271782130003, 0.005212660878896713, 0.0382460355758667, 0.01861664466559887, 0.021069077774882317, 0.025556931272149086, -0.03582338988780975, -0.04618913680315018, -0.052980490028858185, -0.009943771176040173, -0.06282993406057358, -0.00157124490942806, -0.022240685299038887, -0.03727300465106964, -0.028178153559565544, -0.012867825105786324, -0.03373832628130913, 0.015250755473971367, -0.01565784029662609, 0.03894105553627014, 0.05949383229017258, -0.0004620030813384801, -0.002293570665642619, -0.005217625293880701, 0.005247411783784628, -0.0029463942628353834, 0.009442362003028393, -0.03878219425678253, 0.04841320589184761, -0.04313104227185249, -0.08864501863718033, 0.018864866346120834, 0.012172803282737732, 0.01513160951435566, 0.05174930766224861, 0.009690584614872932, 0.013721708208322525, -0.007605520077049732, -0.03906020522117615, -0.032507143914699554, -0.020890358835458755, 0.03342059999704361, 0.004353812895715237, 0.027403701096773148, -0.027840571478009224, 0.009789872914552689, -0.0016308181220665574, 0.0027006545569747686, 0.0798281729221344, 0.04753946512937546, -0.012282021343708038, 0.006359445862472057, -0.011100484989583492, -0.029528481885790825, 0.027999434620141983, -0.027483133599162102, -0.009576402604579926, -0.030223503708839417, -0.041343845427036285, 0.004544943571090698, 0.021505948156118393, -0.033519890159368515, 0.0032045452389866114, -0.06421998143196106, 0.026688821613788605, 0.03060080111026764, -0.0025268993340432644, 0.04622885212302208, 0.010584183037281036, 0.011974225752055645, 0.041026122868061066, 0.05786549672484398, -0.054648540914058685, -0.07506231218576431, 0.04793662205338478, 0.023372577503323555, -0.046824585646390915, -0.04189986363053322, 0.039159491658210754, 0.014377014711499214, 0.08530891686677933, -0.039854515343904495, 0.008792021311819553, 0.028734171763062477, -0.059454116970300674, -0.018388280645012856, 0.00790338683873415, -0.02160523645579815, -0.05055784434080124, 0.014337299391627312, -0.06187676265835762, 0.025537073612213135, -0.009288464672863483, -0.018904583528637886, -0.002401547273620963, 0.000442765885964036, -0.004180057439953089, -0.033678751438856125, 0.036836136132478714, 0.05087556689977646, 0.029925636947155, -0.060288142412900925, 0.01980810984969139, 0.013741566799581051, -0.007382120471447706, -0.007411906961351633, -0.014178437180817127, 0.042535312473773956, 0.0015129126841202378, 0.0037109178956598043, 0.0014992605429142714, 0.0005504321306943893, -0.015002533793449402, 0.018715934827923775, 0.05901724845170975, 0.08189338445663452, -0.0002434126363368705, -0.04009280726313591, -0.018835080787539482, -0.06735750287771225, -0.12160889059305191, -0.03943750262260437, -0.004882525652647018, -0.013423842377960682, 0.033261738717556, -0.028575308620929718, -0.04456080123782158, 0.03280501067638397, 0.01645215041935444, 0.022181112319231033, -0.020592492073774338, -0.016432292759418488, -0.012669247575104237, 0.033500030636787415, -0.002646045759320259, 0.031156817451119423, 0.0315936878323555, 0.005237482953816652, -0.033023446798324585, 0.02065206505358219, 0.006006971001625061, -0.007317582610994577, -0.050994712859392166, -0.05734919756650925, -0.0002615638659335673, -0.040331099182367325, 0.000003922100404452067, 0.021069077774882317, 0.036180827766656876, -0.020254909992218018, -0.0415821373462677, 0.015032320283353329, -0.02613280527293682, 0.006975036580115557, -0.009730299934744835, -0.023054853081703186, -0.03139511123299599, 0.006840996444225311, 0.011328849010169506, -0.043687060475349426, -0.0028520701453089714, -0.0233130045235157, 0.04289275035262108, -0.04213815554976463, -0.015260684303939342, -0.0037531156558543444, -0.0007725907489657402, 0.06406112015247345, -0.10723187774419785, 0.035664528608322144, -0.004152752924710512, 0.01827906258404255, -0.027820713818073273, 0.008528905920684338, -0.07001844048500061, -0.08379972726106644, 0.011239489540457726, 0.02909161150455475, -0.03973536565899849, 0.012341594323515892, 0.02043362893164158, 0.022220827639102936, -0.045156534761190414, 0.004492816980928183, 0.03389718756079674, 0.011666431091725826, -0.013364269398152828, 0.0009748916490934789, -0.015915989875793457, 0.037193574011325836, 0.028337016701698303, -0.03064051643013954, -0.053814515471458435, -0.021724384278059006, 0.0020478309597820044, -0.014664951711893082, -0.07248080521821976, -0.020890358835458755, -0.009730299934744835, -0.002710583619773388, 0.07466515898704529, 0.00419743312522769, -0.030402222648262978, 0.007411906961351633, -0.03443334624171257, -0.006314766127616167, 0.024405181407928467, -0.030064640566706657, 0.0565548874437809, -0.07831898331642151, -0.03280501067638397, -0.038166604936122894, -0.04678487032651901, 0.030680231750011444, 0.03377804160118103, -0.041701287031173706, 0.059295255690813065, 0.009377825073897839, 0.0499223954975605, 0.04213815554976463, -0.026688821613788605, -0.06418026238679886, -0.016035137698054314, 0.040192097425460815, -0.01897408440709114, -0.032348282635211945, -0.022181112319231033, -0.011438067071139812, -0.01196429692208767, 0.042535312473773956, 0.0515507310628891, 0.022240685299038887, -0.020354198291897774, 0.055482566356658936, -0.04122469946742058, 0.004669054411351681, 0.02214139699935913, 0.02013576403260231, 0.03461206704378128, 0.03373832628130913, 0.009194140322506428, -0.038007743656635284, -0.005728962365537882, -0.016045065596699715, -0.01505217794328928, -0.012033799663186073, -0.023690301924943924, -0.00931328721344471, 0.0005733926664106548, -0.022737128660082817, -0.007833884097635746, 0.002618741476908326, -0.09754129499197006, -0.0315738320350647, -0.0749431699514389, 0.002406511688604951, 0.023730017244815826, -0.013960001990199089, 0.03010435588657856, -0.04009280726313591, -0.041701287031173706, 0.012222448363900185, 0.028674598783254623, 0.037491440773010254, -0.021267656236886978, 0.03594253584742546, 0.032527003437280655, 0.0016320592258125544, 0.012004013173282146, 0.009516828693449497, 0.0011349947890266776, -0.009933841414749622, -0.035366661846637726, -0.014079147949814796, 0.0182989202439785, 0.02827744372189045, 0.027820713818073273, -0.06934327632188797, -0.031017813831567764, -0.013989788480103016, 0.023015137761831284, -0.06052643805742264, 0.013890499249100685, -0.03230856731534004, -0.019698893651366234, -0.011586999520659447, 0.029508624225854874, 0.040509819984436035, 0.027185266837477684, -0.009680655784904957, 0.008692732080817223, 0.02710583619773388, 0.0017611345974728465, 0.030342649668455124, -0.030521368607878685, 0.01681951805949211, 0.0011505086440593004, -0.021903103217482567, -0.029151184484362602, -0.032030560076236725, -0.06084416061639786, 0.06239306554198265, -0.029667485505342484, -0.01357277575880289, 0.037650302052497864, -0.001767340232618153, -0.05961298197507858, -0.0191329475492239, 0.03908006101846695, -0.013175620697438717, 0.03510851040482521, 0.004544943571090698, 0.021188223734498024, 0.008166501298546791, 0.0032020630314946175, 0.017921622842550278, -0.007962959818542004, -0.004626857116818428, 0.04690401628613472, 0.016908878460526466, -0.011934510432183743, 0.005336771719157696, 0.01677980273962021, 0.025020770728588104, -0.0019162733806297183, -0.03381775692105293, 0.01728617586195469, 0.04579198360443115, -0.022260542958974838, -0.017087597399950027, 0.02098964713513851, -0.0681120976805687, 0.07013759016990662, 0.030362507328391075, 0.02875402942299843, 0.058302368968725204, 0.07383113354444504, -0.049485526978969574, 0.007297724951058626, -0.07033617049455643, -0.0665631964802742, -0.07061417400836945, -0.010504752397537231, -0.029508624225854874, 0.07212336361408234, 0.029826348647475243, 0.0071438271552324295, 0.012361451983451843, 0.04424307867884636, 0.025318637490272522 ]
717,738
pytorch_optimizer.optimizer.ranger21
Ranger21
Integrating the latest deep learning components into a single optimizer. Here's the components * uses the AdamW optimizer as its core (or, optionally, MadGrad) * Adaptive gradient clipping * Gradient centralization * Positive-Negative momentum * Norm loss * Stable weight decay * Linear learning rate warm-up * Explore-exploit learning rate schedule * Lookahead * Softplus transformation * Gradient Normalization * Corrects the denominator (AdamD). :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta0: float. Manages the amplitude of the noise introduced by positive negative momentum While 0.9 is a recommended default value, you can use -0.5 to minimize the noise. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param use_softplus: bool. use softplus to smooth. :param beta_softplus: float. beta. :param agc_clipping_value: float. :param agc_eps: float. eps for AGC :param centralize_gradients: bool. use GC both convolution & fc layers. :param normalize_gradients: bool. use gradient normalization. :param lookahead_merge_time: int. merge time. :param lookahead_blending_alpha: float. blending alpha. :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 norm_loss_factor: float. norm loss factor. :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 Ranger21(Optimizer, BaseOptimizer): r"""Integrating the latest deep learning components into a single optimizer. Here's the components * uses the AdamW optimizer as its core (or, optionally, MadGrad) * Adaptive gradient clipping * Gradient centralization * Positive-Negative momentum * Norm loss * Stable weight decay * Linear learning rate warm-up * Explore-exploit learning rate schedule * Lookahead * Softplus transformation * Gradient Normalization * Corrects the denominator (AdamD). :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta0: float. Manages the amplitude of the noise introduced by positive negative momentum While 0.9 is a recommended default value, you can use -0.5 to minimize the noise. :param betas: BETAS. coefficients used for computing running averages of gradient and the squared hessian trace. :param use_softplus: bool. use softplus to smooth. :param beta_softplus: float. beta. :param agc_clipping_value: float. :param agc_eps: float. eps for AGC :param centralize_gradients: bool. use GC both convolution & fc layers. :param normalize_gradients: bool. use gradient normalization. :param lookahead_merge_time: int. merge time. :param lookahead_blending_alpha: float. blending alpha. :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 norm_loss_factor: float. norm loss factor. :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__( # pylint: disable=R0913 self, params: PARAMETERS, num_iterations: int, lr: float = 1e-3, beta0: float = 0.9, betas: BETAS = (0.9, 0.999), use_softplus: bool = True, beta_softplus: float = 50.0, num_warm_up_iterations: Optional[int] = None, num_warm_down_iterations: Optional[int] = None, warm_down_min_lr: float = 3e-5, agc_clipping_value: float = 1e-2, agc_eps: float = 1e-3, centralize_gradients: bool = True, normalize_gradients: bool = True, lookahead_merge_time: int = 5, lookahead_blending_alpha: float = 0.5, weight_decay: float = 1e-4, weight_decouple: bool = True, fixed_decay: bool = False, norm_loss_factor: float = 1e-4, adam_debias: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_learning_rate(warm_down_min_lr) self.validate_betas(betas) self.validate_range(beta0, 'beta0', 0.0, 1.0, range_type='[]') self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(agc_clipping_value, 'agc_clipping_value') self.validate_non_negative(eps, 'eps') self.validate_non_negative(agc_eps, 'agc_eps') self.min_lr = warm_down_min_lr self.use_softplus = use_softplus self.beta_softplus = beta_softplus self.agc_clipping_value = agc_clipping_value self.agc_eps = agc_eps self.centralize_gradients = centralize_gradients self.normalize_gradients = normalize_gradients self.lookahead_merge_time = lookahead_merge_time self.lookahead_blending_alpha = lookahead_blending_alpha self.norm_loss_factor = norm_loss_factor self.lookahead_step: int = 0 self.starting_lr: float = lr self.current_lr: float = lr defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'adam_debias': adam_debias, 'eps': eps, } super().__init__(params, defaults) self.num_warm_up_iterations: int = ( self.build_warm_up_iterations(num_iterations, betas[1]) if num_warm_up_iterations is None else num_warm_up_iterations ) self.num_warm_down_iterations: int = ( self.build_warm_down_iterations(num_iterations) if num_warm_down_iterations is None else num_warm_down_iterations ) self.start_warm_down: int = num_iterations - self.num_warm_down_iterations self.warm_down_lr_delta: float = self.starting_lr - self.min_lr def __str__(self) -> str: return 'Ranger21' @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['grad_ma'] = torch.zeros_like(p) state['variance_ma'] = torch.zeros_like(p) state['lookahead_params'] = p.clone() state['neg_grad_ma'] = torch.zeros_like(p) state['max_variance_ma'] = torch.zeros_like(p) @staticmethod def build_warm_up_iterations(total_iterations: int, beta2: float, warm_up_pct: float = 0.22) -> int: warm_up_iterations: int = math.ceil(2.0 / (1.0 - beta2)) # default un-tuned linear warmup beta_pct: float = warm_up_iterations / total_iterations return int(warm_up_pct * total_iterations) if beta_pct > 0.45 else warm_up_iterations @staticmethod def build_warm_down_iterations(total_iterations: int, warm_down_pct: float = 0.72) -> int: start_warm_down: int = int(warm_down_pct * total_iterations) return total_iterations - start_warm_down def warm_up_dampening(self, lr: float, step: int) -> float: if step > self.num_warm_up_iterations: return lr warm_up_current_pct: float = min(1.0, (step / self.num_warm_up_iterations)) self.current_lr = lr * warm_up_current_pct return self.current_lr def warm_down(self, lr: float, iteration: int) -> float: if iteration < self.start_warm_down: return lr # start iteration from 1, not 0 warm_down_iteration: int = max((iteration + 1) - self.start_warm_down, 1) warm_down_pct: float = min(warm_down_iteration / (self.num_warm_down_iterations + 1), 1.0) self.current_lr = max(self.starting_lr - self.warm_down_lr_delta * warm_down_pct, self.min_lr) return self.current_lr @torch.no_grad() def step(self, closure: CLOSURE = None) -> LOSS: loss: LOSS = None if closure is not None: with torch.enable_grad(): loss = closure() param_size: int = 0 variance_ma_sum: float = 1.0 # Phase 1 - Accumulate all the variance_ma_sum to use in stable weight decay for group in self.param_groups: if 'step' in group: group['step'] += 1 else: group['step'] = 1 beta1, beta2 = group['betas'] bias_correction2: float = 1.0 - beta2 ** group['step'] for p in group['params']: if p.grad is None: continue grad = p.grad if grad.is_sparse: raise NoSparseGradientError(str(self)) param_size += p.numel() state = self.state[p] if len(state) == 0: state['grad_ma'] = torch.zeros_like(p) state['variance_ma'] = torch.zeros_like(p) state['lookahead_params'] = p.clone() state['neg_grad_ma'] = torch.zeros_like(p) state['max_variance_ma'] = torch.zeros_like(p) # Apply Adaptive Gradient Clipping (AGC) grad.copy_(agc(p, grad, self.agc_eps, self.agc_clipping_value)) # App
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], num_iterations: int, lr: float = 0.001, beta0: float = 0.9, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), use_softplus: bool = True, beta_softplus: float = 50.0, num_warm_up_iterations: Optional[int] = None, num_warm_down_iterations: Optional[int] = None, warm_down_min_lr: float = 3e-05, agc_clipping_value: float = 0.01, agc_eps: float = 0.001, centralize_gradients: bool = True, normalize_gradients: bool = True, lookahead_merge_time: int = 5, lookahead_blending_alpha: float = 0.5, weight_decay: float = 0.0001, weight_decouple: bool = True, fixed_decay: bool = False, norm_loss_factor: float = 0.0001, adam_debias: bool = False, eps: float = 1e-08)
[ -0.017808351665735245, -0.049818940460681915, -0.03499043360352516, 0.020444756373763084, 0.0022967520635575056, -0.0016528029227629304, -0.06626363843679428, -0.05709178000688553, -0.04012182354927063, -0.009348627179861069, -0.04804113507270813, 0.024444816634058952, 0.052445244044065475, 0.08832457661628723, -0.027212535962462425, 0.049051251262426376, -0.011414315551519394, 0.036990463733673096, 0.015333566814661026, 0.003896523965522647, -0.034545980393886566, -0.05495033040642738, -0.02620241977274418, 0.06646566092967987, -0.040243037045001984, 0.014990127645432949, 0.0063637332059443, -0.00757587281987071, -0.05555640161037445, 0.011909272521734238, -0.02333368919789791, -0.07123340666294098, 0.020212428644299507, -0.017394203692674637, 0.03216210752725601, -0.06707172840833664, 0.02620241977274418, 0.008298106491565704, -0.10117325931787491, -0.025939788669347763, 0.01900028996169567, -0.05616247281432152, 0.031737856566905975, -0.023778140544891357, 0.0040783449076116085, -0.011838563717901707, -0.026828691363334656, 0.02335389144718647, -0.017636632546782494, -0.017020462080836296, 0.027071120217442513, -0.09082966297864914, 0.036626819521188736, 0.02939438633620739, 0.0034646992571651936, 0.04327338561415672, 0.037939973175525665, 0.006990005262196064, 0.05276848003268242, -0.07769815623760223, 0.029252970591187477, -0.08222347497940063, 0.0036389443557709455, -0.009929443709552288, 0.009363778866827488, -0.01809118501842022, -0.06796062737703323, -0.009692066349089146, 0.03561670333147049, 0.031354013830423355, 0.019879091531038284, -0.011373911052942276, 0.03351566195487976, -0.007181927561759949, -0.029515601694583893, -0.02505088597536087, -0.053010907024145126, -0.04036425054073334, -0.023273082450032234, -0.0515967458486557, 0.04448552429676056, 0.03789956867694855, -0.0009918080177158117, -0.05486952140927315, 0.025717563927173615, -0.05890998989343643, -0.0407278947532177, -0.027939818799495697, 0.003020247910171747, -0.0663040429353714, 0.004401582293212414, -0.005096037406474352, 0.04448552429676056, 0.03911170735955238, 0.051919981837272644, 0.04222286492586136, -0.035333871841430664, -0.04973813146352768, 0.006055647972971201, -0.03301060199737549, -0.005772815085947514, 0.03676823526620865, 0.01091935858130455, 0.06707172840833664, 0.007969818077981472, -0.032505545765161514, -0.06408178061246872, -0.0034192439634352922, 0.033798493444919586, -0.062465596944093704, -0.06622323393821716, -0.017262889072299004, -0.007646581158041954, -0.007459709420800209, -0.0486472062766552, 0.033616673201322556, -0.02238417975604534, 0.0003009831125382334, -0.004545523785054684, 0.05652611330151558, 0.06044536456465721, 0.01622246950864792, -0.04258650541305542, -0.015697209164500237, 0.015424476936459541, -0.009798129089176655, 0.012969894334673882, 0.05935443937778473, 0.008505180478096008, -0.062223169952631, -0.03206109255552292, 0.015980040654540062, -0.040424857288599014, -0.004750072490423918, 0.032465141266584396, -0.016687123104929924, -0.009161755442619324, 0.03442476689815521, -0.04654616490006447, 0.013818392530083656, 0.03404092416167259, 0.045131999999284744, 0.026040799915790558, -0.02448522113263607, 0.01017187163233757, -0.01654570735991001, 0.022283168509602547, 0.015899231657385826, -0.008252650499343872, 0.0021023047156631947, 0.005434426013380289, -0.008636495098471642, 0.023293284699320793, 0.01638408750295639, 0.014626485295593739, -0.012262812815606594, -0.040990523993968964, 0.006126355845481157, -0.0151618467643857, -0.020010406151413918, -0.05030379816889763, -0.04335419461131096, -0.018010376021265984, -0.025273112580180168, 0.01524265669286251, 0.007919312454760075, -0.00932842493057251, 0.03240453451871872, -0.021151836961507797, 0.015969939529895782, 0.022525595501065254, -0.078304223716259, -0.011747653596103191, 0.010979965329170227, -0.028101438656449318, 0.10028435289859772, 0.01205068826675415, -0.009479942731559277, 0.00022869666281621903, 0.00447481544688344, 0.02484886348247528, 0.0014886590652167797, -0.011889070272445679, -0.09357718378305435, -0.026081204414367676, 0.02955600619316101, 0.006767780054360628, 0.0056718033738434315, 0.004535422660410404, 0.03899049386382103, 0.01025773212313652, -0.022747822105884552, 0.035495489835739136, -0.007631429471075535, -0.029333779588341713, -0.004787951707839966, 0.030566122382879257, 0.023677127435803413, 0.09446608275175095, 0.005287959240376949, -0.0023081160616129637, 0.03426314890384674, 0.018525535240769386, 0.00296469172462821, 0.0003481745079625398, -0.015424476936459541, -0.03127320483326912, 0.022889237850904465, 0.011050673201680183, 0.011565832421183586, -0.04165720194578171, 0.014485069550573826, 0.05438466742634773, 0.0380207821726799, 0.027071120217442513, -0.056970566511154175, 0.038889482617378235, 0.03216210752725601, 0.033838897943496704, 0.0073081920854747295, 0.00875265896320343, -0.04602090269327164, -0.02672768011689186, -0.026222622022032738, 0.037374306470155716, -0.010181973688304424, 0.016050750389695168, 0.006338480394333601, 0.02055586874485016, -0.003941979259252548, 0.01902049221098423, -0.0576978474855423, -0.01602044515311718, 0.006085951346904039, 0.047556281089782715, 0.010697132907807827, -0.02769739180803299, 0.01977807842195034, -0.02165689505636692, -0.04985934495925903, -0.027010511606931686, -0.006575857754796743, 0.0027222635690122843, 0.046990614384412766, -0.0056313988752663136, 0.012798174284398556, 0.05802108719944954, 0.015091138891875744, -0.029899444431066513, 0.004906640388071537, -0.022161953151226044, -0.038344018161296844, -0.02051546424627304, 0.05458668991923332, -0.07624358683824539, -0.009096098132431507, 0.030646931380033493, 0.0241013765335083, 0.018212398514151573, -0.04953610897064209, 0.020687183365225792, -0.018121488392353058, -0.06747577339410782, 0.040020812302827835, -0.028889328241348267, 0.03503083810210228, 0.04917246475815773, -0.02301045134663582, -0.010697132907807827, 0.0002214364503743127, 0.10343591868877411, 0.07050612568855286, -0.06767779588699341, 0.024222591891884804, -0.036465201526880264, 0.0452532134950161, 0.004080870188772678, -0.017969971522688866, 0.0022613981273025274, 0.017666935920715332, 0.037212688475847244, -0.034202542155981064, -0.05353616923093796, 0.001282216515392065, -0.013161816634237766, -0.0029596409294754267, -0.018333612009882927, 0.010136517696082592, 0.037960175424814224, 0.020475059747695923, 0.04876841977238655, -0.04278853163123131, 0.09123371541500092, 0.006808184552937746, 0.11038552224636078, 0.026687275618314743, 0.024242794141173363, 0.02690950036048889, -0.02579837292432785, -0.02351550944149494, 0.06278883665800095, -0.023495307192206383, 0.013798190280795097, -0.004590978845953941, -0.006192013621330261, -0.014404259622097015, 0.021394265815615654, -0.002388925291597843, 0.034545980393886566, 0.015394173562526703, -0.025919586420059204, -0.023818545043468475, 0.01938413269817829, -0.0016742679290473461, -0.007686985656619072, -0.10957742482423782, -0.007883958518505096, -0.025353921577334404, 0.038727860897779465, 0.05878877267241478, -0.029111554846167564, 0.042828936129808426, 0.02111143246293068, -0.01602044515311718, -0.04408147931098938, -0.0554351881146431, 0.059960510581731796, 0.03503083810210228, -0.03521265834569931, -0.056202877312898636, -0.04727344587445259, -0.05741501599550247, 0.0069597018882632256, 0.01751541905105114, -0.03501063585281372, -0.008181942626833916, 0.0229700468480587, 0.01699015684425831, 0.019060896709561348, -0.027030713856220245, 0.09349637478590012, 0.07668803632259369, -0.04674818739295006, 0.044929977506399155, 0.024545827880501747, -0.03240453451871872, 0.05426345393061638, 0.02503068372607231, -0.0014722446212545037, 0.009298121556639671, -0.008242549374699593, 0.011575933545827866, -0.028869125992059708, 0.08921348303556442, 0.06319288164377213, 0.007171826437115669, -0.023091260343790054, -0.012687061913311481, 0.0579402782022953, -0.056970566511154175, -0.043960265815258026, 0.019485145807266235, -0.05163715034723282, 0.06755658239126205, 0.05442507192492485, -0.0009305697167292237, -0.042626913636922836, -0.0493340864777565, 0.02561655268073082, -0.06650606542825699, 0.015232555568218231, -0.0696980282664299, 0.00810618419200182, -0.0038157147355377674, -0.02674788236618042, 0.0012550696264952421, -0.028000425547361374, 0.00715667475014925, 0.032667163759469986, 0.06828387081623077, 0.04969772696495056, 0.027838807553052902, 0.005176846403628588, 0.01328303012996912, 0.06484947353601456, -0.02244478650391102, 0.0028763064183294773, -0.03127320483326912, 0.03258635476231575, -0.0583847276866436, 0.04505119100213051, 0.02072758786380291, -0.009474892169237137, -0.0006221685907803476, -0.06488987803459167, 0.062061551958322525, 0.03892988711595535, 0.05575842410326004, -0.0475158765912056, -0.037798553705215454, -0.010697132907807827, -0.027232738211750984, 0.021980132907629013, 0.01715177670121193, -0.017020462080836296, -0.06387975811958313, 0.058505941182374954, 0.07624358683824539, -0.025535741820931435, 0.09963788092136383, -0.04666737839579582, 0.0010473644360899925, -0.029717624187469482, 0.04985934495925903, -0.019666966050863266, -0.03165704756975174, 0.008979935199022293, -0.004752597771584988, 0.015343667939305305, 0.023778140544891357, 0.04050566628575325, 0.003979858476668596, 0.04161679372191429, 0.050020962953567505, 0.0148790143430233, -0.011969879269599915, -0.05967767536640167, -0.016242671757936478, -0.06529392302036285, -0.04206124693155289, 0.01749521680176258, -0.03470759838819504, -0.02996005304157734, -0.04545523598790169, -0.03484901413321495, 0.018505332991480827, -0.013394143432378769, 0.033636875450611115, 0.04577847570180893, -0.04666737839579582, 0.03357626870274544, -0.04800073057413101, 0.038121793419122696, -0.00875770952552557, -0.02014172077178955, -0.03727329522371292, 0.004250064957886934, -0.01404061820358038, -0.06299085915088654, -0.013616369105875492, 0.0055303871631622314, 0.008267803117632866, 0.007394052110612392, 0.031354013830423355, -0.010889054276049137, 0.01749521680176258, -0.02450542338192463, -0.003820765297859907, -0.0006269034929573536, -0.024707447737455368, 0.0083991177380085, 0.017414405941963196, -0.031737856566905975, 0.042505696415901184, -0.001212771050632, 0.07454659044742584, 0.06387975811958313, -0.005707157775759697, -0.030465111136436462, 0.015091138891875744, -0.01584872603416443, -0.045293617993593216, 0.027838807553052902, -0.04953610897064209, -0.0023081160616129637, 0.0037803605664521456, -0.028768114745616913, -0.013111311011016369, 0.020212428644299507, 0.009909241460263729, 0.02393975853919983, -0.04080870375037193, 0.022323573008179665, 0.05721299350261688, 0.007616277784109116, 0.012646657414734364, -0.024606434628367424, 0.011697147972881794, -0.01828310638666153, 0.036647021770477295, -0.062061551958322525, -0.031535834074020386, 0.04274812713265419, 0.043960265815258026, -0.0667484924197197, -0.00866174791008234, 0.015353769063949585, -0.009788027964532375, 0.07882948219776154, -0.011909272521734238, 0.03422274440526962, -0.014788104221224785, -0.0651727095246315, -0.008207195438444614, 0.033616673201322556, -0.013303233310580254, -0.09010238200426102, -0.005707157775759697, -0.03414193540811539, 0.021555883809924126, -0.002247509080916643, -0.022081144154071808, 0.03424294665455818, -0.0054899826645851135, -0.009227413684129715, -0.021172039210796356, -0.0004687571490649134, 0.03692985698580742, 0.020626576617360115, -0.05438466742634773, 0.005293009802699089, 0.03371768444776535, -0.003477325662970543, -0.051515936851501465, 0.0407278947532177, 0.03357626870274544, 0.002482360927388072, -0.020273035392165184, 0.03276817500591278, 0.015919433906674385, 0.005287959240376949, -0.018535636365413666, 0.02747516520321369, 0.05890998989343643, 0.031737856566905975, -0.03424294665455818, 0.020030608400702477, -0.06408178061246872, -0.06876872479915619, -0.011232494376599789, 0.004964721854776144, -0.013515356928110123, 0.0029217617120593786, -0.05103107914328575, -0.028000425547361374, 0.030808549374341965, -0.0001620921102585271, 0.03634398803114891, -0.04456633701920509, -0.005702107213437557, -0.021778108552098274, 0.00621726643294096, -0.025576146319508553, 0.05410183593630791, 0.031939879059791565, -0.006429390981793404, -0.01699015684425831, 0.002638929057866335, 0.03432375565171242, 0.032667163759469986, -0.03998040780425072, -0.03765713796019554, -0.01563660241663456, -0.04690980538725853, 0.00025521221687085927, 0.046424947679042816, -0.008288005366921425, 0.03503083810210228, -0.04036425054073334, 0.03375808894634247, 0.01053551398217678, -0.03262675926089287, -0.027050917968153954, -0.02771759405732155, -0.07620318233966827, 0.018323510885238647, 0.011596135795116425, -0.022747822105884552, 0.004346025642007589, -0.03577832132577896, 0.07434456795454025, -0.018586141988635063, -0.01120219100266695, -0.055839233100414276, 0.03486921638250351, 0.05418264493346214, -0.0640413761138916, 0.060930222272872925, 0.005828371737152338, -0.024707447737455368, -0.019485145807266235, 0.045495644211769104, -0.02921256609261036, -0.07656682282686234, -0.025495337322354317, 0.05288969352841377, -0.041152141988277435, 0.01919221132993698, 0.06569796800613403, 0.04953610897064209, -0.020313439890742302, -0.012020384892821312, 0.0354146808385849, 0.0070455619134008884, -0.005222301930189133, 0.014666889794170856, 0.019404336810112, 0.012394128367304802, 0.039253123104572296, -0.02111143246293068, -0.012252711690962315, -0.020212428644299507, 0.0020391724538058043, -0.045697666704654694, -0.028889328241348267, -0.0372328907251358, -0.027212535962462425, 0.009252666495740414, 0.0905064269900322, 0.01673762872815132, 0.02634383551776409, 0.0024583707563579082, -0.01584872603416443, 0.026323633268475533, -0.023030653595924377, -0.015283061191439629, 0.035899534821510315, -0.07559710741043091, 0.011909272521734238, -0.0441218838095665, 0.01848513074219227, 0.001220978214405477, 0.015192150138318539, -0.03369748219847679, 0.01678813435137272, 0.028768114745616913, 0.06266762316226959, 0.022646808996796608, -0.01847502961754799, -0.04391986131668091, 0.02185891941189766, 0.023394295945763588, -0.0073283943347632885, 0.01882856898009777, -0.0418592244386673, -0.02260640449821949, 0.00743950717151165, 0.020293237641453743, 0.05240483954548836, 0.05931403487920761, -0.008621343411505222, 0.04307136312127113, -0.05478871241211891, -0.007666783407330513, -0.0013169392477720976, -0.006388986017554998, 0.01846492849290371, 0.04787951707839966, 0.02789941430091858, -0.038889482617378235, -0.018313409760594368, -0.003772784722968936, 0.030808549374341965, -0.0004608656163327396, -0.013182018883526325, 0.002414178103208542, 0.005363718140870333, 0.012767870910465717, 0.04424309730529785, 0.028505485504865646, -0.07814260572195053, -0.040990523993968964, -0.047717899084091187, 0.01422243844717741, 0.026505453512072563, -0.004232387524098158, 0.005197048652917147, -0.030020659789443016, -0.0013396668946370482, -0.016646718606352806, 0.026889298111200333, 0.05539478361606598, -0.02294984459877014, -0.001726036425679922, 0.04448552429676056, -0.012939590960741043, -0.03424294665455818, 0.020646778866648674, 0.03088936023414135, 0.02165689505636692, -0.05155634135007858, -0.017990173771977425, 0.0075152660720050335, 0.0038662205915898085, 0.04618252068758011, -0.034566182643175125, -0.054344262927770615, -0.039455145597457886, 0.006580908317118883, -0.07111219316720963, 0.027454962953925133, -0.028182247653603554, -0.06295045465230942, -0.0028586294502019882, 0.006484947167336941, 0.0579402782022953, 0.0065101999789476395, -0.012272913940250874, 0.0031894424464553595, -0.026222622022032738, 0.027818605303764343, 0.03555609658360481, 0.01921241357922554, -0.024222591891884804, 0.03630358353257179, -0.035333871841430664, -0.0031338860280811787, -0.01110117882490158, -0.02824285440146923, 0.03264696151018143, -0.014464866369962692, 0.04149558022618294, 0.02543473057448864, 0.00024258576740976423, -0.03369748219847679, -0.03563690558075905, 0.008838518522679806, -0.03375808894634247, 0.011949677020311356, -0.02897013910114765, 0.04690980538725853, 0.014808306470513344, -0.0064697954803705215, 0.006176861934363842, 0.02430340088903904, -0.005787966772913933, 0.03446517139673233, 0.0054445271380245686, 0.002425542101264, 0.046424947679042816, 0.002393975853919983, 0.026505453512072563, -0.07095057517290115, -0.0235357116907835, -0.02262660674750805, 0.05765744298696518, 0.000899634906090796, -0.03903089836239815, 0.03844502940773964, -0.04787951707839966, 0.06905155628919601, -0.00932842493057251, 0.01621236838400364, 0.0391521118581295, 0.04561685770750046, -0.03581872582435608, 0.03971777483820915, -0.04278853163123131, -0.054142240434885025, -0.10707233846187592, 0.042667318135499954, -0.05200079083442688, 0.046788591891527176, -0.003843492828309536, 0.004449562635272741, 0.013485053554177284, 0.008464775048196316, 0.0083738649263978 ]
717,740
pytorch_optimizer.optimizer.ranger21
__init__
null
def __init__( # pylint: disable=R0913 self, params: PARAMETERS, num_iterations: int, lr: float = 1e-3, beta0: float = 0.9, betas: BETAS = (0.9, 0.999), use_softplus: bool = True, beta_softplus: float = 50.0, num_warm_up_iterations: Optional[int] = None, num_warm_down_iterations: Optional[int] = None, warm_down_min_lr: float = 3e-5, agc_clipping_value: float = 1e-2, agc_eps: float = 1e-3, centralize_gradients: bool = True, normalize_gradients: bool = True, lookahead_merge_time: int = 5, lookahead_blending_alpha: float = 0.5, weight_decay: float = 1e-4, weight_decouple: bool = True, fixed_decay: bool = False, norm_loss_factor: float = 1e-4, adam_debias: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_learning_rate(warm_down_min_lr) self.validate_betas(betas) self.validate_range(beta0, 'beta0', 0.0, 1.0, range_type='[]') self.validate_non_negative(weight_decay, 'weight_decay') self.validate_non_negative(agc_clipping_value, 'agc_clipping_value') self.validate_non_negative(eps, 'eps') self.validate_non_negative(agc_eps, 'agc_eps') self.min_lr = warm_down_min_lr self.use_softplus = use_softplus self.beta_softplus = beta_softplus self.agc_clipping_value = agc_clipping_value self.agc_eps = agc_eps self.centralize_gradients = centralize_gradients self.normalize_gradients = normalize_gradients self.lookahead_merge_time = lookahead_merge_time self.lookahead_blending_alpha = lookahead_blending_alpha self.norm_loss_factor = norm_loss_factor self.lookahead_step: int = 0 self.starting_lr: float = lr self.current_lr: float = lr defaults: DEFAULTS = { 'lr': lr, 'betas': betas, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'adam_debias': adam_debias, 'eps': eps, } super().__init__(params, defaults) self.num_warm_up_iterations: int = ( self.build_warm_up_iterations(num_iterations, betas[1]) if num_warm_up_iterations is None else num_warm_up_iterations ) self.num_warm_down_iterations: int = ( self.build_warm_down_iterations(num_iterations) if num_warm_down_iterations is None else num_warm_down_iterations ) self.start_warm_down: int = num_iterations - self.num_warm_down_iterations self.warm_down_lr_delta: float = self.starting_lr - self.min_lr
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], num_iterations: int, lr: float = 0.001, beta0: float = 0.9, betas: Union[Tuple[float, float], Tuple[float, float, float]] = (0.9, 0.999), use_softplus: bool = True, beta_softplus: float = 50.0, num_warm_up_iterations: Optional[int] = None, num_warm_down_iterations: Optional[int] = None, warm_down_min_lr: float = 3e-05, agc_clipping_value: float = 0.01, agc_eps: float = 0.001, centralize_gradients: bool = True, normalize_gradients: bool = True, lookahead_merge_time: int = 5, lookahead_blending_alpha: float = 0.5, weight_decay: float = 0.0001, weight_decouple: bool = True, fixed_decay: bool = False, norm_loss_factor: float = 0.0001, adam_debias: bool = False, eps: float = 1e-08)
[ 0.014523911289870739, -0.0632571205496788, -0.05184755101799965, 0.017211368307471275, -0.016706863418221474, -0.02928067184984684, -0.09476925432682037, -0.033665981143713, -0.0698544830083847, -0.00364553090184927, -0.037934865802526474, 0.06593487411737442, 0.03195842728018761, 0.07555926591157913, -0.016279974952340126, 0.047151777893304825, 0.025225231423974037, 0.03073597326874733, 0.007242552004754543, -0.02045184001326561, 0.015144840814173222, -0.0060492041520774364, -0.03966182470321655, 0.08421346545219421, -0.01728898473083973, 0.048859331756830215, -0.015988916158676147, 0.013689538463950157, -0.03690645471215248, -0.006869024131447077, -0.0022156969644129276, -0.03135690093040466, 0.009517673403024673, 0.00017418143397662789, 0.03178378939628601, -0.048742908984422684, 0.019122665748000145, 0.01596951112151146, -0.135672926902771, -0.0004935898468829691, 0.032249487936496735, -0.06069578602910042, 0.03624671697616577, -0.023537080734968185, -0.001691788318566978, -0.007713099475950003, 0.0004059685452375561, 0.026680532842874527, -0.026331260800361633, -0.04730701074004173, 0.01484407763928175, -0.07641304284334183, 0.04722939431667328, 0.017958423122763634, -0.040670834481716156, 0.06030770391225815, 0.029358288273215294, 0.0377214215695858, 0.03892447054386139, -0.032928626984357834, -0.025884967297315598, -0.03562578558921814, 0.0019537426996976137, 0.0016493420116603374, 0.003383576637133956, 0.0028960504569113255, -0.08545532077550888, -0.01838531158864498, 0.038342349231243134, 0.04587111249566078, 0.09205269068479538, 0.005578656680881977, 0.009134444408118725, 0.0011145186144858599, -0.04218434914946556, -0.020005548372864723, -0.05735829472541809, -0.032133061438798904, -0.029319480061531067, -0.05052807927131653, 0.03438393026590347, 0.07132919132709503, -0.0073056151159107685, -0.07260985672473907, 0.0551462359726429, -0.04664727300405502, -0.03137630596756935, -0.010177410207688808, -0.011312546208500862, -0.021732507273554802, -0.04113652929663658, -0.008756065741181374, 0.03221067786216736, 0.023246020078659058, 0.06585725396871567, 0.02268330380320549, -0.01717256009578705, -0.03564519062638283, 0.012699933722615242, -0.01811365596950054, -0.016959115862846375, 0.005205129273235798, -0.027631329372525215, 0.03863340988755226, -0.00041233550291508436, -0.029455307871103287, -0.061277907341718674, -0.007839225232601166, 0.031085245311260223, -0.07963411509990692, -0.06655579805374146, -0.0018057869747281075, 0.011099101044237614, -0.012699933722615242, -0.045172568410634995, 0.025555098429322243, -0.011487182229757309, 0.005408871453255415, 0.021945951506495476, 0.03137630596756935, 0.038167715072631836, 0.007785864640027285, -0.017143454402685165, 0.027340268716216087, 0.03143451735377312, -0.004865558817982674, 0.004892239347100258, 0.04746224358677864, 0.008392239920794964, -0.049674298614263535, 0.00032804926740936935, 0.013359670527279377, -0.021305618807673454, 0.012913377955555916, 0.021945951506495476, -0.0370422825217247, 0.014659740030765533, 0.054680537432432175, -0.0627526119351387, 0.014795567840337753, 0.0566597506403923, 0.014281361363828182, 0.02177131362259388, -0.030755378305912018, -0.010371450334787369, -0.0019889124669134617, 0.01458212360739708, -0.033025648444890976, -0.023925160989165306, 0.0370422825217247, 0.03550936281681061, -0.030930014327168465, -0.0016238741809502244, 0.008367985486984253, 0.004756411071866751, -0.04800555482506752, -0.0268939770758152, -0.015406794846057892, -0.0032671524677425623, -0.0063645197078585625, -0.05048926919698715, -0.012670827098190784, 0.02254747599363327, -0.034616779536008835, 0.005263341590762138, 0.04816078767180443, -0.04641442373394966, 0.016726268455386162, -0.005093556363135576, -0.009406100027263165, 0.025787947699427605, -0.048354826867580414, -0.003369023557752371, 0.018482333049178123, -0.016056830063462257, 0.07311435788869858, 0.01858905516564846, -0.012117812409996986, -0.007533612195402384, 0.0037959120236337185, 0.012476786971092224, 0.013369372114539146, -0.027728348970413208, -0.08188498020172119, -0.0036164249759167433, 0.024740129709243774, 0.013893281109631062, 0.029765771701931953, 0.0016335762338712811, 0.020781708881258965, 0.01482467446476221, -0.009081083349883556, 0.05685378983616829, 0.023401252925395966, -0.021984757855534554, -0.010730424895882607, 0.03785724937915802, 0.012292449362576008, 0.058910615742206573, 0.016512824222445488, 0.00268745725043118, 0.04870409891009331, 0.0316285602748394, -0.030561337247490883, 0.026835763826966286, -0.022838536649942398, -0.043076932430267334, -0.010643106885254383, -0.011331949383020401, -0.0033229391556233168, -0.053749144077301025, -0.035839229822158813, 0.041602227836847305, 0.02953292429447174, 0.006316009908914566, -0.0684962049126625, 0.07202773541212082, 0.023381847888231277, 0.014475401490926743, 0.010720723308622837, 0.05211920663714409, -0.016279974952340126, -0.02334303967654705, -0.05925988778471947, 0.05266252160072327, 0.009954264387488365, 0.02784477360546589, 0.007363826967775822, -0.023692313581705093, 0.003206514986231923, -0.0020907835569232702, -0.061665985733270645, -0.008261263370513916, 0.009032572619616985, 0.013631326146423817, -0.009444908238947392, -0.021674294024705887, 0.019578659906983376, -0.05448649823665619, -0.06903951615095139, 0.02322661690413952, 0.009740820154547691, 0.030231468379497528, 0.024352049455046654, -0.00290332711301744, -0.0005924290744587779, 0.03465558588504791, 0.014174639247357845, -0.041097722947597504, -0.007208594586700201, -0.03838115930557251, -0.02200416289269924, -0.0003947506193071604, 0.019239088520407677, -0.06609010696411133, -0.028271662071347237, 0.0242744330316782, -0.0004987440188415349, 0.03865281492471695, -0.013922386802732944, 0.0085426215082407, -0.026020795106887817, -0.042805276811122894, 0.05708663910627365, -0.017463620752096176, 0.0268939770758152, 0.025884967297315598, -0.014048513025045395, -0.022237010300159454, 0.010604298673570156, 0.0722217783331871, 0.04288289323449135, -0.033433131873607635, 0.006970895454287529, -0.022780323401093483, 0.011787944473326206, 0.010051283985376358, -0.04470686987042427, -0.005258490331470966, 0.021945951506495476, 0.03863340988755226, -0.040049903094768524, 0.007455996237695217, 0.015921002253890038, 0.0003456341801211238, -0.009376994334161282, -0.029882196336984634, 0.02099515311419964, 0.03046431764960289, -0.0016032574931159616, 0.015688152983784676, -0.01740540936589241, 0.0981067419052124, 0.014475401490926743, 0.12977410852909088, 0.005607762839645147, 0.05235205590724945, -0.014067917130887508, 0.00024755290360189974, -0.02270270697772503, 0.06050174683332443, -0.04140818491578102, 0.0480443611741066, 0.013728346675634384, -0.026990996673703194, -0.0012503467733040452, 0.03308385983109474, 0.005214831326156855, 0.04098129644989967, 0.017124051228165627, -0.012884271331131458, 0.014232851564884186, 0.06314069032669067, 0.0076451851055026054, 0.013796260580420494, -0.09686488658189774, 0.006262648850679398, -0.02834927849471569, 0.03787665441632271, 0.060462936758995056, -0.020645881071686745, 0.02916424721479416, 0.025244634598493576, -0.03444214165210724, -0.03576161712408066, -0.058755382895469666, 0.08072073757648468, 0.016891201958060265, -0.03411227464675903, -0.05305059999227524, -0.056504517793655396, -0.03985586389899254, 0.006859322544187307, 0.01947193779051304, -0.03166736662387848, 0.003609148319810629, -0.008222455158829689, 0.026040200144052505, 0.00805266946554184, -0.051110196858644485, 0.10540265589952469, 0.0363631397485733, -0.02702980488538742, 0.040437985211610794, 0.01840471662580967, -0.06589606404304504, 0.05537908151745796, -0.01892862468957901, 0.003873528214171529, 0.018715180456638336, 0.005059598945081234, 0.03432571887969971, -0.01186556089669466, 0.12372005730867386, 0.07016494870185852, 0.004266459494829178, -0.023440061137080193, -0.034869030117988586, 0.052972983568906784, -0.03155094385147095, -0.03638254478573799, 0.016376996412873268, -0.03386002033948898, 0.06931117177009583, 0.01965627633035183, -0.003953570034354925, -0.035257112234830856, -0.05285656079649925, 0.02887318655848503, -0.04156341776251793, 0.024623705074191093, -0.040166329592466354, -0.009139294736087322, -0.026738744229078293, 0.012389468960464, -0.00893070176243782, -0.03564519062638283, 0.012680529616773129, 0.015426198951900005, 0.04672488942742348, 0.032637566328048706, 0.02505059540271759, 0.017803192138671875, 0.022838536649942398, 0.021965354681015015, -0.027088016271591187, 0.009711713530123234, -0.03946778550744057, 0.06589606404304504, -0.026622319594025612, 0.014882885850965977, 0.005035344045609236, -0.0006560985348187387, -0.0038953577168285847, -0.04051560163497925, 0.04823840409517288, 0.04998476430773735, 0.04839363321661949, -0.03228829428553581, -0.03073597326874733, -0.0011703051859512925, -0.030561337247490883, 0.03533472865819931, 0.027262652292847633, -0.014659740030765533, -0.0603853203356266, 0.06787527352571487, 0.03904089704155922, -0.015862789005041122, 0.08832711726427078, -0.03981705754995346, -0.0016481293132528663, -0.027398481965065002, 0.016716565936803818, -0.041873883455991745, -0.05697021260857582, -0.02204297110438347, -0.01186556089669466, 0.025380462408065796, -0.005088705103844404, 0.026990996673703194, 0.021325021982192993, 0.05716425180435181, 0.05246847867965698, 0.027359673753380775, 0.03407346457242966, -0.04521137475967407, -0.007097021676599979, -0.045172568410634995, -0.06554678827524185, -0.011448374018073082, -0.008532918989658356, -0.03902149200439453, -0.03244352713227272, -0.004004505462944508, 0.010342344641685486, -0.01688150130212307, 0.005695080850273371, 0.03663479536771774, -0.04590991884469986, 0.04167984426021576, -0.06457658857107162, 0.046220384538173676, 0.001822765450924635, -0.01815246418118477, -0.03166736662387848, -0.015435900539159775, -0.005549550522118807, -0.026544705033302307, -0.0009762649424374104, 0.02018018439412117, 0.015465007163584232, 0.02336244471371174, -0.004945600405335426, -0.013592518866062164, -0.006970895454287529, -0.035257112234830856, 0.007019405718892813, 0.010982677340507507, -0.015367986634373665, 0.0382259264588356, 0.014417189173400402, -0.023692313581705093, 0.020024951547384262, -0.01693001016974449, 0.06143314018845558, 0.05949273705482483, 0.0047345818020403385, -0.012942483648657799, 0.0175897479057312, -0.007863480597734451, -0.01933610998094082, 0.03007623739540577, -0.040282752364873886, -0.0173374954611063, 0.004188843537122011, -0.013272352516651154, -0.019219685345888138, 0.017909914255142212, 0.003672211430966854, 0.03613029047846794, -0.030813589692115784, -0.000004737310518976301, 0.05945392698049545, 0.009061679244041443, 0.0051808743737638, -0.05475815385580063, -0.011477479711174965, 0.009105337783694267, 0.01377685647457838, -0.09275123476982117, -0.014194043353199959, 0.047811515629291534, 0.06453778594732285, -0.04800555482506752, 0.0037110194098204374, 0.02400277741253376, -0.00785862933844328, 0.060579363256692886, -0.01106999535113573, 0.017056137323379517, -0.007164935581386089, -0.03942897543311119, -0.018191272392868996, 0.018618160858750343, -0.022741515189409256, -0.09445878863334656, -0.022450454533100128, -0.030115043744444847, 0.00008322507346747443, 0.006107416469603777, -0.014863481745123863, 0.009595289826393127, 0.0021526338532567024, -0.030018024146556854, -0.0019961888901889324, -0.026156622916460037, 0.022857939824461937, 0.00453326478600502, -0.033549558371305466, 0.03007623739540577, 0.07753847539424896, 0.032249487936496735, -0.0546417310833931, 0.012117812409996986, 0.030638953670859337, 0.03616910055279732, -0.03504366800189018, 0.056388091295957565, 0.03155094385147095, -0.007014554459601641, -0.06135552376508713, -0.007043660618364811, 0.06368400901556015, 0.02322661690413952, -0.017754681408405304, 0.004688497167080641, -0.06189883500337601, -0.04171865060925484, -0.03785724937915802, 0.009842691011726856, -0.00025437460863031447, 0.04233957827091217, -0.06193764507770538, -0.04447402060031891, 0.02349827252328396, -0.01742481254041195, 0.06449897587299347, -0.06147194653749466, -0.016823288053274155, 0.03483022376894951, 0.0011539330007508397, -0.030541934072971344, 0.021169789135456085, 0.021208597347140312, -0.009604991413652897, 0.009381845593452454, 0.017822595313191414, 0.051110196858644485, 0.03735274448990822, -0.03954540193080902, -0.019530149176716805, -0.023051980882883072, -0.053361065685749054, -0.034364525228738785, 0.018783094361424446, -0.012738741934299469, 0.03921553120017052, -0.051110196858644485, 0.026059603318572044, 0.005515593569725752, -0.018802499398589134, 0.00005385374606703408, -0.01940402388572693, -0.06888428330421448, 0.004443521611392498, -0.029086630791425705, 0.01571725867688656, -0.031085245311260223, -0.04420236498117447, 0.054680537432432175, -0.002235101070255041, -0.05037284642457962, -0.0970977321267128, 0.028582125902175903, 0.0400887131690979, -0.054952193051576614, 0.028562722727656364, -0.00993000902235508, -0.04133056849241257, -0.030386701226234436, 0.055301468819379807, -0.016163552179932594, -0.04587111249566078, -0.053593914955854416, 0.06605129688978195, -0.02652529999613762, -0.006883577443659306, 0.03733334317803383, 0.05596120283007622, -0.026855168864130974, 0.02109217457473278, 0.015639642253518105, 0.016571035608649254, 0.020936941727995872, 0.007810119539499283, 0.006034651305526495, 0.011283439584076405, 0.02200416289269924, -0.05064450204372406, 0.007092170417308807, -0.009731117635965347, -0.01867637224495411, -0.06213168427348137, -0.03347194194793701, -0.05048926919698715, -0.03715870529413223, 0.03182259947061539, 0.0943811684846878, -0.0026001392398029566, 0.027864178642630577, 0.003708594013005495, -0.02332363650202751, 0.055068619549274445, -0.04521137475967407, -0.02307138405740261, 0.028853783383965492, -0.10548027604818344, 0.004625434055924416, -0.02386694960296154, 0.06414970010519028, 0.01792931742966175, -0.001980423228815198, -0.04660846292972565, -0.007591824047267437, 0.055301468819379807, 0.04210673272609711, 0.028659742325544357, 0.02177131362259388, 0.0012903675669804215, 0.020257800817489624, 0.024041585624217987, 0.0075384629890322685, 0.017803192138671875, -0.026020795106887817, -0.026835763826966286, -0.02941649965941906, 0.0015389815671369433, 0.06915593892335892, 0.048742908984422684, -0.023401252925395966, 0.042533621191978455, -0.047151777893304825, -0.024584898725152016, -0.02992100454866886, -0.007834374904632568, -0.00729106180369854, 0.03801248222589493, 0.03372419252991676, -0.03867221996188164, -0.021538466215133667, -0.006655579898506403, 0.041097722947597504, 0.0013522178633138537, -0.018763691186904907, -0.0014274085406213999, 0.007097021676599979, -0.028989611193537712, 0.018026337027549744, 0.032230082899332047, -0.054796963930130005, -0.03203604370355606, -0.0266417246311903, 0.026738744229078293, 0.014620931819081306, 0.021014558151364326, -0.029358288273215294, -0.005020791199058294, 0.024875957518815994, -0.008285517804324627, 0.05475815385580063, 0.058522533625364304, -0.021228002384305, -0.031453922390937805, 0.02889259159564972, -0.019074155017733574, -0.04998476430773735, 0.01749272644519806, 0.012641721405088902, -0.007397783920168877, -0.043193355202674866, -0.0017293835990130901, 0.003468469250947237, 0.019307004287838936, 0.02295495942234993, -0.014436593279242516, -0.08079835772514343, -0.05417603254318237, 0.031085245311260223, -0.04272766038775444, 0.00956618320196867, -0.012670827098190784, -0.07012613862752914, 0.04645323380827904, -0.014795567840337753, 0.05526265874505043, 0.0009732330800034106, 0.003778933547437191, -0.0012442830484360456, -0.04501733556389809, 0.04466806352138519, 0.06228691712021828, 0.029358288273215294, -0.061122674494981766, 0.00828066747635603, -0.021519063040614128, 0.008421346545219421, -0.004154886584728956, -0.0400887131690979, 0.0175897479057312, -0.02916424721479416, 0.04218434914946556, 0.024352049455046654, -0.005214831326156855, -0.012835761532187462, -0.04501733556389809, -0.017027031630277634, -0.02796119824051857, 0.0400887131690979, -0.041873883455991745, 0.035664595663547516, 0.0296881552785635, -0.030949417501688004, 0.007882884703576565, 0.03492724150419235, -0.028795570135116577, 0.03393763676285744, -0.003715870436280966, 0.037372149527072906, 0.04800555482506752, 0.0009568608948029578, 0.022334031760692596, -0.08661956340074539, 0.008663896471261978, -0.030522529035806656, 0.06923355907201767, 0.019151771441102028, -0.042145539075136185, 0.04486210271716118, -0.03826473280787468, 0.019578659906983376, -0.027592521160840988, 0.002134442562237382, 0.04350382089614868, 0.052274439483881, -0.03863340988755226, 0.018569650128483772, -0.016638949513435364, -0.03785724937915802, -0.10237562656402588, 0.011167015880346298, -0.061277907341718674, 0.045677073299884796, -0.002028933260589838, 0.0012454957468435168, 0.0490533709526062, 0.008057520724833012, 0.014174639247357845 ]
717,743
pytorch_optimizer.optimizer.ranger21
__str__
null
def __str__(self) -> str: return 'Ranger21'
(self) -> str
[ 0.014396044425666332, -0.035465750843286514, 0.024458542466163635, -0.003952195402234793, 0.007055015303194523, -0.07405165582895279, 0.006782001815736294, 0.01948362961411476, 0.08202538639307022, -0.04077001288533211, -0.02998814918100834, 0.0009322544210590422, -0.007921724580228329, 0.04839705675840378, 0.004901241976767778, -0.02353982999920845, -0.007596708834171295, -0.0639631599187851, -0.016120797023177147, 0.02047167904675007, 0.0034538372419774532, 0.03376700356602669, 0.018495580181479454, 0.00854575540870428, -0.04101269319653511, 0.0833427831530571, -0.013451331295073032, -0.009672477841377258, -0.03154822438955307, 0.008259741589426994, -0.03288295865058899, -0.0604269839823246, -0.0008499170071445405, 0.007752716541290283, -0.06514188647270203, 0.012541286647319794, -0.05397866666316986, 0.0023249483201652765, -0.012957306578755379, 0.026555979624390602, 0.02437187172472477, 0.023505160585045815, -0.0045935604721307755, -0.050338488072156906, -0.057896193116903305, -0.041151367127895355, -0.013650674372911453, 0.01165724266320467, -0.01608612760901451, 0.000991840730421245, 0.012948639690876007, 0.003052984131500125, -0.04978379234671593, -0.021009037271142006, -0.026295965537428856, 0.008103733882308006, 0.03404434770345688, 0.015982123091816902, 0.0048275720328092575, 0.019899649545550346, -0.012203269638121128, -0.013850017450749874, 0.03522307425737381, -0.02170240506529808, -0.01393668819218874, 0.01093787420541048, 0.0028168058488518, 0.042919453233480453, 0.05442935600876808, 0.04125537350773811, 0.04662897065281868, -0.011388562619686127, -0.021893082186579704, 0.018998272716999054, 0.02459721453487873, -0.013026643544435501, -0.0841054916381836, -0.006049632094800472, 0.02097436971962452, -0.025186577811837196, 0.061397701501846313, 0.0027431354392319918, 0.015288755297660828, -0.009698479436337948, -0.014084029011428356, -0.10657060146331787, -0.017550867050886154, -0.078558549284935, -0.03615912050008774, 0.009759148582816124, -0.05442935600876808, -0.017672207206487656, -0.04451419785618782, -0.0019197615329176188, -0.01438737753778696, 0.010027828626334667, 0.026919996365904808, -0.07536906003952026, 0.026139957830309868, -0.010331177152693272, 0.002701966790482402, 0.06600859761238098, -0.020055657252669334, 0.014118697494268417, -0.052834611386060715, -0.019656971096992493, -0.06008030101656914, 0.03232826292514801, 0.006751666776835918, 0.020905032753944397, -0.0584162212908268, 0.017715541645884514, 0.022499779239296913, 0.015046076849102974, 0.004576226230710745, -0.03387100622057915, -0.018720924854278564, 0.0012881469447165728, 0.04063134267926216, -0.006877339910715818, 0.055954765528440475, 0.0030226493254303932, -0.06742999702692032, 0.006196972914040089, 0.008311743848025799, 0.08271875232458115, -0.04350881651043892, 0.006348647177219391, 0.04416751489043236, -0.0305948443710804, 0.037199173122644424, 0.01383268367499113, -0.062403082847595215, -0.03225892782211304, 0.09325794130563736, 0.012645291164517403, 0.01363334059715271, 0.02392118237912655, 0.07557706534862518, 0.1334039270877838, -0.002868808340281248, 0.012038595043122768, 0.05730682983994484, 0.037580523639917374, -0.015609437599778175, 0.018842265009880066, -0.03432169556617737, 0.09353528916835785, -0.02137305587530136, -0.003362832823768258, 0.012281273491680622, 0.06465652585029602, 0.07682512700557709, 0.01797555573284626, 0.010227171704173088, 0.011059213429689407, -0.004758235067129135, -0.043994173407554626, 0.02827206440269947, -0.03154822438955307, -0.00043633405584841967, -0.045935604721307755, 0.009837152436375618, -0.027301348745822906, 0.004095202311873436, 0.010383179411292076, -0.021997086703777313, 0.0033064966555684805, 0.013277989812195301, 0.015418761409819126, -0.022829128429293633, -0.07606242597103119, -0.10130100697278976, 0.01602545939385891, -0.004849239718168974, 0.044652871787548065, 0.01319131813943386, 0.0707581639289856, 0.01830490492284298, 0.008589090779423714, -0.0012361444532871246, -0.02565460093319416, -0.03343765065073967, 0.01202126033604145, 0.053666651248931885, -0.07640910893678665, 0.0305948443710804, 0.021061040461063385, 0.028861425817012787, -0.01363334059715271, 0.018391575664281845, 0.03688715770840645, -0.044999558478593826, 0.0197609756141901, -0.00015519517182838172, -0.04735700786113739, 0.003752852091565728, -0.06250708550214767, -0.009811151772737503, -0.014474048279225826, 0.0013553169555962086, 0.06060032919049263, -0.04177539795637131, 0.05529606714844704, 0.030646847561001778, -0.01110254880040884, 0.018668921664357185, -0.00740169920027256, 0.0347377173602581, -0.032085586339235306, 0.05370131880044937, 0.045935604721307755, 0.004071367904543877, 0.017732875421643257, 0.0310975369066, -0.07044614851474762, 0.004636895842850208, -0.018616920337080956, -0.04132470861077309, 0.011345227248966694, 0.05089318007230759, -0.02119971439242363, -0.0066389949060976505, -0.03598577901721001, -0.0682273730635643, 0.013520668260753155, 0.008303076960146427, -0.025775941088795662, -0.02392118237912655, -0.007562040351331234, 0.015791447833180428, -0.07162487506866455, -0.03454704210162163, 0.013035310432314873, -0.005187256261706352, 0.00812106765806675, -0.0566481314599514, 0.008979110047221184, -0.06032298132777214, -0.025637267157435417, -0.016736160963773727, 0.0182529017329216, 0.009360462427139282, 0.0167448278516531, 0.060565657913684845, -0.06680596619844437, 0.0151674160733819, 0.009421132504940033, -0.061016347259283066, -0.026070620864629745, 0.04739167541265488, -0.08646293729543686, -0.01383268367499113, 0.018131563439965248, 0.007952059619128704, -0.034425701946020126, -0.06105101481080055, 0.015843449160456657, 0.014058028347790241, -0.011007210239768028, -0.042538102716207504, -0.007627043407410383, -0.0548800453543663, 0.009750481694936752, -0.014586720615625381, 0.009057113900780678, -0.04260743781924248, 0.03362832963466644, 0.04038866236805916, -0.03917526826262474, 0.11017610877752304, 0.028514742851257324, -0.08140135556459427, 0.04007664695382118, -0.036263126879930496, -0.027249345555901527, 0.0063183121383190155, 0.03543108329176903, -0.08854304254055023, -0.05325062945485115, -0.028722751885652542, -0.02900009974837303, 0.0043877167627215385, 0.014474048279225826, -0.005126586649566889, -0.05626678094267845, 0.033194974064826965, 0.003833022667095065, 0.022135760635137558, 0.02877475507557392, 0.06971811503171921, 0.0007513287710025907, -0.02142505906522274, 0.012792631983757019, 0.05279994383454323, 0.013165317475795746, 0.044271521270275116, 0.04201807454228401, -0.010565188713371754, -0.009395130909979343, -0.007098350673913956, -0.0288267582654953, -0.006283643655478954, -0.03232826292514801, -0.03868991136550903, -0.012151267379522324, 0.005668280180543661, -0.014257371425628662, 0.020489012822508812, 0.04545024409890175, -0.0162421353161335, 0.00812106765806675, 0.020679688081145287, 0.05782685801386833, 0.026174627244472504, 0.03165223076939583, 0.01474272832274437, 0.025446590036153793, 0.023799842223525047, 0.0745370164513588, -0.021841078996658325, 0.02059301733970642, -0.060184307396411896, 0.03695649281144142, -0.00879710167646408, -0.034633710980415344, -0.05671747028827667, 0.06663262844085693, 0.00954247172921896, 0.04780769720673561, -0.054949380457401276, -0.06309644877910614, 0.04177539795637131, -0.01318265125155449, -0.013321325182914734, 0.018218234181404114, 0.04545024409890175, -0.034581709653139114, -0.024406539276242256, -0.0187555942684412, 0.10289575159549713, -0.01685749925673008, -0.05047716200351715, 0.016458813101053238, 0.037476517260074615, 0.053389303386211395, -0.025619933381676674, -0.005954293999820948, 0.01668415777385235, 0.013676675967872143, -0.03865524381399155, -0.009897822514176369, 0.0022111926227808, 0.013616005890071392, 0.01563544012606144, -0.0014669058145955205, -0.021321052685379982, 0.04333547502756119, 0.0014929070603102446, 0.012428614310920238, -0.01630280539393425, -0.06060032919049263, -0.004017198458313942, 0.03494572639465332, -0.04101269319653511, -0.020939702168107033, -0.0027193010319024324, 0.0007280359859578311, 0.06871272623538971, -0.016051460057497025, -0.00631397869437933, 0.005624944809824228, -0.04371682554483414, 0.0014571553329005837, -0.018443578854203224, 0.05983762443065643, 0.025914613157510757, 0.01963963732123375, -0.005442935507744551, -0.03128821402788162, 0.02887875959277153, 0.00879710167646408, 0.008558756671845913, 0.04780769720673561, 0.02503057010471821, -0.010053830221295357, 0.018651587888598442, 0.027578696608543396, -0.007354029919952154, -0.027526693418622017, 0.00031391135416924953, -0.021494396030902863, 0.017212850973010063, -0.012523951940238476, -0.06531522423028946, -0.031964246183633804, -0.009733147919178009, -0.020714357495307922, -0.07744915783405304, 0.014526051469147205, 0.02497856691479683, -0.029918812215328217, -0.03300429880619049, -0.005737616680562496, -0.038412563502788544, 0.03454704210162163, 0.01580878160893917, 0.027804041281342506, -0.032241594046354294, -0.025169244036078453, -0.023279817774891853, -0.002357449848204851, -0.02341848984360695, -0.047218333929777145, 0.053111959248781204, 0.0016066627576947212, -0.016224801540374756, -0.011804583482444286, -0.0008217489230446517, -0.003286995692178607, -0.03387100622057915, 0.03335098177194595, 0.021511729806661606, 0.10026095062494278, 0.018443578854203224, 0.04184473305940628, 0.060738999396562576, 0.037580523639917374, 0.07793451845645905, 0.027734704315662384, -0.018616920337080956, -0.011215221136808395, -0.032692283391952515, -0.049055758863687515, 0.037753865122795105, -0.026191961020231247, -0.003952195402234793, -0.029728135094046593, -0.03423502668738365, 0.011969258077442646, 0.019518297165632248, -0.045380908995866776, 0.01568744145333767, 0.003521007252857089, 0.011743913404643536, -0.06840071082115173, -0.05401333421468735, -0.024007853120565414, 0.0433008074760437, -0.03300429880619049, -0.019050274044275284, 0.015436096116900444, -0.028532076627016068, -0.02303713746368885, 0.0511011928319931, -0.01051318645477295, -0.017940886318683624, -0.04347414895892143, 0.014474048279225826, -0.017334189265966415, -0.05543473735451698, 0.03823922201991081, -0.03640179708600044, 0.046039607375860214, 0.017438195645809174, 0.015063410624861717, 0.00976781640201807, -0.0012567287776619196, -0.05768818408250809, -0.01981297880411148, 0.025966616347432137, -0.035465750843286514, 0.00581562053412199, -0.016285471618175507, -0.013988691382110119, 0.0722489058971405, -0.033645663410425186, -0.019622303545475006, -0.0112672233954072, -0.031686898320913315, -0.05883223935961723, -0.04090868681669235, -0.005884957499802113, 0.06476053595542908, -0.03225892782211304, 0.013971356675028801, -0.0410473607480526, 0.02714534103870392, -0.04655963554978371, 0.009256456978619099, 0.002450620988383889, 0.008619425818324089, -0.08826569467782974, 0.006734332535415888, -0.026295965537428856, 0.060738999396562576, -0.011154551059007645, -0.0155487684533, -0.07841987162828445, 0.02459721453487873, 0.0283240657299757, -0.02587994560599327, 0.010608524084091187, -0.016484813764691353, 0.043370142579078674, -0.009421132504940033, 0.0005411517340689898, -0.005555607844144106, -0.00019270743359811604, -0.0035015062894672155, 0.01377201359719038, -0.04125537350773811, 0.05647478997707367, 0.019344955682754517, -0.016363475471735, -0.02671198733150959, -0.007029014173895121, 0.027353351935744286, -0.01301797665655613, 0.03128821402788162, 0.0019630969036370516, -0.026833325624465942, -0.024579880759119987, -0.052175913006067276, 0.004896908532828093, 0.012757963500916958, -0.03355899080634117, 0.0019435960566625, -0.01679682917892933, 0.07647844403982162, -0.0007361613679677248, 0.05078917741775513, 0.01457805372774601, 0.03335098177194595, -0.00618830556049943, 0.0548800453543663, -0.04368215799331665, 0.010053830221295357, 0.02087036520242691, 0.027076004073023796, 0.016268137842416763, -0.06254176050424576, -0.011761248111724854, -0.04285011813044548, 0.028116056695580482, -0.04545024409890175, 0.005871956702321768, 0.009195787832140923, -0.00033693332807160914, 0.004411551170051098, -0.021009037271142006, -0.02142505906522274, -0.021338388323783875, -0.03667914494872093, 0.018010223284363747, 0.06205639988183975, -0.014066695235669613, 0.005711615551263094, 0.07862788438796997, 0.010227171704173088, -0.030906859785318375, -0.03945261612534523, 0.05314662680029869, 0.052938614040613174, 0.029242778196930885, 0.06417117267847061, -0.024683887138962746, 0.03660980984568596, -0.005460269749164581, -0.035639096051454544, 0.0032003247179090977, -0.03432169556617737, 0.023574497550725937, 0.05151721090078354, -0.07793451845645905, 0.041428714990615845, 0.04867440462112427, 0.016606153920292854, -0.01602545939385891, 0.011674576438963413, -0.010201171040534973, 0.03740718215703964, 0.009637809358537197, -0.062021732330322266, -0.017273521050810814, 0.007739715743809938, -0.02754402719438076, 0.01602545939385891, 0.026417305693030357, -0.02587994560599327, -0.011336560361087322, -0.019847648218274117, -0.04642096161842346, -0.024562546983361244, 0.048501063138246536, -0.06340846419334412, 0.0009078782168217003, -0.028289398178458214, 0.018616920337080956, 0.030178824439644814, 0.05169055238366127, 0.016779495403170586, 0.0012458949349820614, 0.03907126560807228, 0.051725223660469055, 0.04586626589298248, 0.028341399505734444, 0.019778311252593994, -0.01931028813123703, 0.03534441441297531, -0.006283643655478954, -0.029676133766770363, 0.0054949382320046425, -0.017438195645809174, 0.003076818771660328, -0.0112672233954072, 0.03993797302246094, -0.027942713350057602, -0.03588177263736725, 0.04323146864771843, -0.002283779438585043, 0.07086216658353806, -0.03556975722312927, 0.04149805009365082, -0.039972640573978424, 0.02009032666683197, 0.0036466801539063454, -0.009048447012901306, 0.06781134754419327, -0.1256382018327713, 0.025359919294714928, -0.012723295018076897, 0.0032674947287887335, -0.08902839571237564, -0.044479530304670334, 0.01015783566981554, 0.032016247510910034, 0.03506706655025482, -0.027162674814462662, 0.017013506963849068, 0.006391982547938824, 0.030005482956767082, -0.06361647695302963, 0.04902108758687973, -0.06600859761238098, 0.008706096559762955, -0.054117340594530106, -0.037199173122644424, -0.024389205500483513, -0.03154822438955307, -0.04597027227282524, 0.028532076627016068, -0.009213121607899666, 0.028844092041254044, -0.022603783756494522, -0.01757686771452427, 0.010079831816256046, 0.013121982105076313, -0.041602056473493576, -0.008134068921208382, -0.01585211604833603, -0.005403933580964804, 0.022187763825058937, -0.025446590036153793, 0.06753400713205338, 0.030421502888202667, 0.009889155626296997, -0.01702217385172844, 0.008909774012863636, -0.04250343516469002, -0.024337202310562134, 0.023245148360729218, 0.017013506963849068, -0.0684700533747673, -0.000997799332253635, 0.013581337407231331, 0.009481801651418209, 0.020662354305386543, 0.07308094203472137, -0.02764803357422352, -0.000561194377951324, 0.0014961572596803308, -0.02003832347691059, -0.05047716200351715, 0.04600493982434273, 0.07190222293138504, -0.08396681398153305, 0.05470670387148857, 0.016224801540374756, -0.022274434566497803, -0.07439834624528885, -0.04839705675840378, -0.04246876388788223, -0.0001393506390741095, 0.08188671618700027, 0.037095166742801666, -0.02426786534488201, -0.026677317917346954, -0.023626500740647316, -0.02620929479598999, 0.04236476123332977, 0.020350338891148567, -0.017117513343691826, -0.0024809560272842646, -0.010019161738455296, -0.04146338254213333, -0.004030199255794287, -0.01835690625011921, 0.023227814584970474, -0.02369583770632744, 0.06032298132777214, 0.05526139587163925, -0.01668415777385235, -0.003204658394679427, 0.00968114472925663, -0.053111959248781204, 0.0036141786258667707, 0.03556975722312927, -0.011813250370323658, 0.00970714632421732, 0.0011733080027624965, -0.002474455628544092, 0.021823745220899582, 0.017160847783088684, 0.03740718215703964, 0.07516104727983475, 0.006634660996496677, -0.028618747368454933, -0.07710247486829758, -0.012090597301721573, 0.022326435893774033, 0.02319314517080784, -0.021286385133862495, -0.010270507074892521, 0.055885426700115204, 0.002985814120620489, 0.02041967585682869, 0.010573855601251125, 0.07013413310050964, 0.046212948858737946, 0.032969627529382706, 0.03567376360297203, -0.03031749837100506, -0.04011131450533867, 0.010669194161891937, 0.038412563502788544, 0.03733784332871437, 0.03882858529686928, -0.02381717599928379, 0.009724480099976063, 0.07398232072591782, 0.027960048988461494, 0.007973727770149708, 0.02220509760081768, -0.0025112908333539963, -0.02437187172472477, 0.014240036718547344, 0.01802755706012249, 0.00594129366800189, -0.0004479804774746299, 0.04940244182944298, -0.031582895666360855, 0.022690454497933388, -0.01029650866985321, -0.005247925873845816, 0.04468754306435585, 0.0035361747723072767, -0.00195443001575768 ]
717,753
pytorch_optimizer.optimizer.ranger21
build_warm_down_iterations
null
@staticmethod def build_warm_down_iterations(total_iterations: int, warm_down_pct: float = 0.72) -> int: start_warm_down: int = int(warm_down_pct * total_iterations) return total_iterations - start_warm_down
(total_iterations: int, warm_down_pct: float = 0.72) -> int
[ -0.031927723437547684, -0.05097139999270439, -0.053830601274967194, 0.0057272231206297874, -0.023720763623714447, 0.013484124094247818, 0.0004974917974323034, -0.020226186141371727, -0.039746396243572235, -0.015169640071690083, 0.00521097844466567, 0.08026936650276184, 0.035969432443380356, 0.027268288657069206, 0.019026027992367744, 0.028662588447332382, 0.044547028839588165, 0.025609247386455536, -0.008758503943681717, -0.029562706127762794, 0.053654108196496964, 0.06286708265542984, -0.011719186790287495, 0.03967580199241638, -0.028909679502248764, 0.07772785425186157, -0.0007109389989636838, 0.007827498950064182, -0.007933394983410835, -0.03709899261593819, -0.05033602565526962, 0.0012067761272192001, -0.016387447714805603, -0.008833513595163822, 0.025238608941435814, -0.02042032964527607, 0.031274694949388504, 0.059690192341804504, -0.13491183519363403, -0.03907572105526924, 0.034133896231651306, -0.03251015394926071, -0.014878424815833569, -0.006543506868183613, -0.01056315191090107, -0.057325176894664764, 0.007703953422605991, -0.04479411989450455, 0.040275879204273224, -0.08288147300481796, -0.0035541432444006205, -0.05852533504366875, 0.0475827194750309, 0.039922893047332764, 0.006027262192219496, 0.08217550069093704, 0.003468102542683482, -0.030445175245404243, 0.0274624302983284, -0.015522627159953117, -0.04242910444736481, -0.03392210230231285, 0.034663375467061996, 0.03492811694741249, -0.004132160451263189, 0.01823180727660656, -0.08379924297332764, 0.015937387943267822, -0.0233148280531168, 0.03268664702773094, 0.045853082090616226, 0.011436796747148037, 0.019273120909929276, 0.010448431596159935, -0.03462807834148407, 0.024426737800240517, -0.048571087419986725, -0.06971503794193268, 0.03706369176506996, -0.008590834215283394, 0.009080604650080204, 0.0034725149162113667, -0.005599264986813068, -0.056795697659254074, 0.05135968700051308, -0.05358351022005081, 0.007430387660861015, -0.030268682166934013, -0.015628524124622345, -0.007717190310359001, -0.04059356823563576, 0.06410253793001175, 0.0034151545260101557, -0.0020594617817550898, 0.040346477180719376, 0.03268664702773094, -0.025432752445340157, 0.014340119436383247, -0.05026542767882347, -0.025785740464925766, 0.07250364124774933, 0.01790529303252697, 0.04747682437300682, 0.01795824058353901, 0.017587604001164436, -0.019449613988399506, -0.04225260764360428, -0.023632517084479332, -0.0076510049402713776, -0.03819325193762779, -0.05457187443971634, -0.05404239520430565, -0.040346477180719376, -0.025468051433563232, -0.03242190554738045, 0.027091793715953827, -0.014093027450144291, -0.007911333814263344, 0.08019877225160599, 0.016405096277594566, 0.02894497849047184, -0.04161723330616951, -0.01601680926978588, -0.020279133692383766, 0.0017550099873915315, 0.001600577961653471, 0.021461643278598785, 0.08563477545976639, -0.005762521643191576, -0.03136294335126877, 0.020137939602136612, -0.02084391377866268, -0.03600472956895828, 0.021443992853164673, 0.017569955438375473, -0.021796980872750282, 0.0233148280531168, 0.04151133447885513, 0.01649334281682968, 0.01717284321784973, 0.024426737800240517, 0.020755667239427567, 0.015346133150160313, 0.020632121711969376, 0.049524154514074326, 0.015752069652080536, 0.021885227411985397, 0.043488066643476486, 0.013228208757936954, 0.02633287012577057, -0.009733631275594234, -0.03716958686709404, -0.01473722979426384, -0.023014787584543228, 0.04888877645134926, 0.015346133150160313, 0.020137939602136612, -0.0225029569119215, -0.008934997022151947, -0.08168131858110428, -0.01999674364924431, -0.01038665883243084, -0.034363336861133575, -0.03678130358457565, 0.018161209300160408, 0.04002878814935684, -0.040452372282743454, 0.013590020127594471, -0.047512125223875046, 0.0041189235635101795, 0.014719580300152302, 0.0034703088458627462, 0.04080536216497421, -0.02645641751587391, 0.02195582538843155, 0.01367826759815216, 0.01257518120110035, -0.011110283434391022, -0.010633749887347221, 0.0549248605966568, -0.03159238398075104, 0.0007727118209004402, -0.019043678417801857, -0.08662314713001251, 0.0026121078990399837, 0.013422351330518723, 0.009954248555004597, 0.02723298966884613, -0.0010319370776414871, -0.020049693062901497, -0.014931373298168182, -0.03138059377670288, 0.0694679468870163, 0.027956614270806313, 0.0017803809605538845, -0.03002159111201763, 0.01606975868344307, 0.024938570335507393, 0.06671464443206787, 0.0007969797006808221, -0.07059750705957413, 0.09156496822834015, 0.04504121094942093, -0.010995562188327312, 0.030092189088463783, 0.03543994948267937, -0.0670323371887207, -0.008648195303976536, -0.007748076692223549, -0.003265134757384658, -0.06890317052602768, -0.024956218898296356, 0.042534999549388885, 0.019979095086455345, 0.019308418035507202, -0.052842237055301666, 0.06502030789852142, -0.00494182575494051, -0.01012191828340292, 0.01296346727758646, -0.0020318846218287945, -0.00887763686478138, 0.01681985706090927, -0.05534844845533371, 0.032651349902153015, -0.0031857124995440245, -0.009627735242247581, 0.01883188635110855, -0.011825082823634148, -0.03522815555334091, -0.031115852296352386, -0.04652375727891922, 0.03776966780424118, -0.020508576184511185, -0.004893289878964424, 0.0006122127524577081, -0.05884302407503128, -0.037557873874902725, -0.005294813308864832, -0.030992306768894196, -0.024479687213897705, 0.01003367081284523, 0.0011803021188825369, 0.0751863494515419, 0.013087013736367226, -0.0052153910510241985, 0.001734051271341741, 0.0074259755201637745, -0.02213231846690178, 0.05248924717307091, 0.012080999091267586, -0.06780891120433807, -0.009777755476534367, 0.004659435711801052, 0.0475827194750309, 0.021867578849196434, -0.013210559263825417, 0.013431176543235779, 0.013501773588359356, 0.039393410086631775, 0.037734366953372955, -0.034292738884687424, -0.04648846015334129, -0.011719186790287495, -0.09022361785173416, 0.023826658725738525, -0.03727548569440842, 0.005135968793183565, -0.085917167365551, 0.024356139823794365, 0.06438492983579636, 0.012389862909913063, 0.009989547543227673, -0.02652701362967491, -0.02663291059434414, -0.006199343595653772, 0.039922893047332764, -0.0011725805234164, -0.041581932455301285, -0.030568720772862434, 0.044723521918058395, -0.07758666574954987, -0.03784026578068733, 0.020561523735523224, -0.01142797153443098, -0.0338515043258667, 0.00834815576672554, 0.051253791898489, 0.06738532334566116, -0.012319264933466911, 0.02698589861392975, -0.005899304524064064, 0.05428948625922203, 0.0030621669720858335, 0.0841522291302681, -0.0027841893024742603, 0.025538649410009384, -0.06837368756532669, -0.019679056480526924, 0.05930190905928612, 0.031239397823810577, -0.06604397296905518, -0.06939735263586044, 0.004165253136307001, 0.027850717306137085, 0.08097534626722336, 0.009010006673634052, -0.008868811652064323, 0.010501379147171974, -0.008908523246645927, -0.06276118755340576, -0.001506815548054874, 0.020526226609945297, -0.020137939602136612, 0.014543087221682072, -0.11472095549106598, -0.01334292907267809, -0.027374183759093285, 0.01418127492070198, 0.029845096170902252, 0.007809849455952644, 0.017684675753116608, 0.023650165647268295, 0.030745215713977814, 0.0026010770816355944, -0.04553539305925369, 0.08450521528720856, 0.03143354132771492, 0.011163230985403061, -0.06420843303203583, -0.04733562842011452, -0.07229185104370117, 0.035298753529787064, 0.02728593721985817, 0.015981510281562805, 0.014507788233458996, 0.03971109911799431, -0.0019315037643536925, 0.006314064841717482, -0.03499871492385864, 0.08577597141265869, 0.028874380514025688, -0.018443599343299866, 0.04369985684752464, 0.0523480549454689, -0.03055107221007347, 0.06639695912599564, 0.016237426549196243, 0.022573553025722504, 0.014031254686415195, 0.0018564938800409436, -0.0009150098776444793, 0.016581589356064796, 0.05153618007898331, 0.04493531584739685, 0.060184378176927567, -0.0032452791929244995, -0.05799585208296776, 0.028044860810041428, -0.04242910444736481, -0.030039239674806595, 0.011913329362869263, 0.022414708510041237, 0.05760756880044937, 0.00330043351277709, 0.0015961655881255865, -0.04002878814935684, -0.02670350857079029, -0.0016193303745239973, 0.0047388579696416855, -0.021885227411985397, -0.04468822479248047, -0.008692318573594093, 0.01594621315598488, 0.01770232617855072, 0.022767696529626846, -0.06833838671445847, 0.012989941984415054, 0.010739645920693874, 0.053301118314266205, -0.014172449707984924, -0.022573553025722504, -0.03907572105526924, 0.02326187863945961, 0.061702221632003784, 0.008480525575578213, 0.006459672003984451, -0.0622670017182827, 0.07603351771831512, -0.04387635365128517, 0.010933789424598217, -0.018496546894311905, -0.016237426549196243, 0.027850717306137085, 0.010086619295179844, 0.013042889535427094, 0.051465585827827454, -0.0075406963005661964, 0.023756062611937523, 0.023279529064893723, 0.028309600427746773, 0.00923944916576147, 0.03185712546110153, 0.03332202509045601, -0.004059356637299061, -0.050830207765102386, 0.03372795879840851, 0.03573998808860779, -0.026968248188495636, 0.02149694226682186, -0.07843383401632309, 0.00368430744856596, -0.03201597183942795, 0.03095700778067112, -0.023526620119810104, -0.04938295856118202, -0.03621652349829674, -0.05308932811021805, 0.002217202913016081, -0.05354820936918259, 0.06427903473377228, -0.038157954812049866, 0.07147997617721558, 0.03367501124739647, 0.011869206093251705, -0.02036738209426403, 0.020985109731554985, -0.04747682437300682, -0.009018831886351109, 0.03581058606505394, -0.03653421252965927, -0.03533405438065529, -0.08132833242416382, -0.0022833882831037045, 0.028733186423778534, -0.006967091932892799, -0.023985503241419792, -0.0044763232581317425, 0.010827893391251564, -0.019626107066869736, -0.006892081815749407, -0.008683493360877037, 0.09445946663618088, 0.015072568319737911, 0.015275536105036736, -0.013572371564805508, -0.03769906982779503, -0.00017745897639542818, -0.011763310059905052, -0.0384756438434124, 0.028627289459109306, -0.011869206093251705, 0.008899698965251446, 0.01929076947271824, 0.032757245004177094, -0.017517007887363434, -0.08535239100456238, 0.04098185524344444, 0.00935417041182518, -0.009927774779498577, 0.036498911678791046, 0.05841943994164467, -0.01574324443936348, 0.04207611456513405, 0.006728825159370899, -0.015557926148176193, -0.001164858927950263, 0.018796587362885475, 0.008206960745155811, 0.0006188313127495348, 0.028274303302168846, -0.018990730866789818, 0.03600472956895828, -0.03243955597281456, 0.07469216734170914, -0.012689902447164059, -0.05870182812213898, -0.0157697182148695, 0.04327627271413803, -0.02213231846690178, 0.009124727919697762, -0.01742875948548317, 0.04207611456513405, -0.0007567170541733503, -0.06004318222403526, -0.022061722353100777, -0.09770695120096207, 0.0030687854159623384, 0.007761313579976559, -0.04881817847490311, -0.060184378176927567, 0.010686698369681835, 0.03185712546110153, 0.003174681682139635, -0.03794616088271141, -0.020208537578582764, 0.04373515769839287, 0.03985229507088661, 0.03573998808860779, 0.0025415103882551193, 0.022714748978614807, 0.02147929184138775, 0.008692318573594093, 0.0016116087790578604, -0.015337308868765831, 0.02486797235906124, -0.011357374489307404, -0.006384662352502346, -0.015963861718773842, 0.02605048008263111, 0.102507583796978, -0.038157954812049866, -0.020137939602136612, 0.03492811694741249, 0.019749652594327927, -0.015672646462917328, -0.005864005535840988, 0.03314553201198578, 0.06477321684360504, -0.011577991768717766, 0.007637768052518368, 0.015107867307960987, 0.04091125726699829, -0.0367107056081295, 0.023456022143363953, 0.007774550933390856, 0.01810826174914837, -0.016352148726582527, -0.006905318703502417, 0.07405678927898407, -0.005497781094163656, -0.017684675753116608, 0.03416919335722923, 0.05870182812213898, 0.027427133172750473, -0.023191282525658607, -0.0007418253808282316, -0.07013862580060959, 0.024285543709993362, -0.0024356141220778227, -0.00023606042668689042, -0.029739201068878174, 0.06646755337715149, -0.01863774284720421, -0.026597611606121063, 0.0504419207572937, -0.05280693620443344, 0.06039616838097572, 0.015928562730550766, -0.01317526027560234, -0.004165253136307001, 0.05008893460035324, -0.05100670084357262, -0.022891242057085037, 0.01521376334130764, 0.015981510281562805, -0.00838786642998457, 0.0028106633108109236, 0.03787556290626526, 0.055207252502441406, -0.017243441194295883, -0.037910863757133484, 0.08909405767917633, -0.08019877225160599, -0.03794616088271141, 0.01966140605509281, -0.04006408527493477, 0.029139121994376183, -0.048041604459285736, -0.03879333287477493, -0.003443834837526083, 0.01027193758636713, 0.012425161898136139, -0.03995819017291069, -0.04730033129453659, -0.03025103360414505, -0.006892081815749407, -0.06639695912599564, 0.04521770402789116, -0.042534999549388885, 0.011004386469721794, -0.03879333287477493, 0.005687511991709471, -0.04959474876523018, -0.02799191325902939, 0.05252454802393913, -0.06438492983579636, -0.01246045995503664, -0.01331645529717207, -0.016360972076654434, -0.03551054745912552, -0.00673323730006814, -0.03960520401597023, -0.01560204941779375, -0.016113881021738052, 0.029033225029706955, -0.03604002669453621, 0.025415103882551193, 0.013934183865785599, -0.022750047966837883, -0.003836533287540078, 0.02776247076690197, -0.012513408437371254, 0.09227094799280167, 0.02396785467863083, 0.01900837942957878, 0.007395089138299227, -0.0022216152865439653, -0.04373515769839287, -0.0026010770816355944, 0.01712872087955475, -0.009433591738343239, 0.016634538769721985, -0.0016822062898427248, -0.034310389310121536, -0.01571677066385746, 0.020685071125626564, -0.04426463693380356, 0.005497781094163656, -0.04225260764360428, -0.04807690531015396, 0.03342792019248009, 0.004443230573087931, -0.0026253447867929935, 0.013325279578566551, -0.005899304524064064, 0.04959474876523018, -0.028786133974790573, 0.009892475791275501, -0.043664559721946716, 0.015566750429570675, 0.05753697082400322, 0.029845096170902252, -0.07384499162435532, -0.032280709594488144, 0.05672509968280792, 0.051712676882743835, 0.023809010162949562, -0.026844702661037445, -0.038687434047460556, 0.028450796380639076, 0.03573998808860779, -0.04408814385533333, 0.01423422247171402, -0.05326582118868828, -0.08817628771066666, -0.02320893108844757, 0.023420723155140877, 0.00634936336427927, 0.035669390112161636, -0.027215339243412018, -0.010677873156964779, 0.03247485309839249, 0.009760105982422829, -0.020155588164925575, -0.025415103882551193, -0.026191676035523415, -0.0014384242240339518, 0.028433145955204964, -0.08888226747512817, -0.02130279876291752, 0.009010006673634052, -0.0220264233648777, -0.01080141868442297, 0.0027952201198786497, 0.029139121994376183, 0.03653421252965927, -0.07723367214202881, -0.008251084014773369, -0.018602443858981133, 0.03446923568844795, -0.018778936937451363, 0.0044851480051875114, -0.046382565051317215, -0.022697098553180695, 0.022979488596320152, -0.0430997796356678, 0.03611062467098236, 0.030815813690423965, 0.005736047402024269, -0.005802232772111893, 0.0068038348108530045, -0.06004318222403526, 0.014534262008965015, 0.04705324023962021, -0.00022682207054458559, 0.0042446753941476345, 0.032227762043476105, -0.004271149169653654, 0.02912147343158722, -0.044017545878887177, -0.006914143450558186, -0.02260885201394558, 0.03734608367085457, -0.010157216340303421, -0.0220264233648777, -0.044017545878887177, -0.0402405820786953, 0.07176236808300018, -0.0522068589925766, 0.03298668563365936, 0.035069312900304794, -0.04539419710636139, -0.01989084854722023, -0.04885347560048103, 0.03339262306690216, 0.016140354797244072, -0.0020054106134921312, -0.009318871423602104, -0.004765331745147705, 0.05852533504366875, 0.025132713839411736, -0.03309258073568344, 0.0031857124995440245, -0.01381946261972189, -0.015178464353084564, 0.012628129683434963, 0.008167249150574207, -0.059937287122011185, 0.008220197632908821, 0.011030861176550388, 0.049877140671014786, 0.022361760959029198, -0.004202757962048054, -0.09064719825983047, -0.016052108258008957, 0.02432084269821644, -0.01106615923345089, -0.00840110331773758, 0.008092239499092102, 0.007443625014275312, -0.039746396243572235, 0.022326461970806122, -0.05439538136124611, 0.028044860810041428, -0.0008422062383033335, 0.01178095955401659, -0.005996375810354948, 0.028433145955204964, -0.01101321168243885, -0.030709916725754738, 0.039393410086631775, -0.05414829030632973, 0.015257886610925198, -0.03219246491789818, 0.03819325193762779, 0.033004336059093475, -0.02929796651005745, 0.05517195537686348, -0.05912541225552559, 0.02456793375313282, 0.02012029103934765, 0.00404170760884881, 0.020508576184511185, 0.05799585208296776, -0.025115063413977623, 0.025009168311953545, -0.025115063413977623, -0.009936599060893059, -0.044017545878887177, 0.015266711823642254, -0.07176236808300018, -0.010916139930486679, -0.000389389373594895, 0.016661012545228004, 0.058101750910282135, 0.02617402747273445, 0.016060933470726013 ]
717,754
pytorch_optimizer.optimizer.ranger21
build_warm_up_iterations
null
@staticmethod def build_warm_up_iterations(total_iterations: int, beta2: float, warm_up_pct: float = 0.22) -> int: warm_up_iterations: int = math.ceil(2.0 / (1.0 - beta2)) # default un-tuned linear warmup beta_pct: float = warm_up_iterations / total_iterations return int(warm_up_pct * total_iterations) if beta_pct > 0.45 else warm_up_iterations
(total_iterations: int, beta2: float, warm_up_pct: float = 0.22) -> int
[ -0.03338583558797836, -0.0734163373708725, -0.06633832305669785, 0.008364515379071236, -0.0030402056872844696, -0.002782905474305153, -0.002891242504119873, -0.0621492974460125, -0.05806860700249672, 0.013487950898706913, 0.010580908507108688, 0.05106281489133835, -0.0001369728852296248, 0.04170972481369972, -0.008071103133261204, 0.021378491073846817, 0.06019923463463783, 0.014824106357991695, -0.005461988039314747, -0.037304025143384933, 0.015103976242244244, 0.06814394146203995, -0.03237469121813774, 0.07720813155174255, -0.022389637306332588, 0.055179622024297714, 0.012178879231214523, -0.0023924410343170166, 0.008039504289627075, -0.03176078200340271, -0.008942312560975552, -0.03921797499060631, -0.00435153441503644, -0.01651235669851303, 0.036762338131666183, -0.01582622341811657, 0.03975966200232506, 0.05651577562093735, -0.09721435606479645, -0.05221841111779213, 0.05947698652744293, -0.03957910090684891, -0.00394752761349082, -0.015194257721304893, -0.002782905474305153, -0.044562600553035736, -0.008116243407130241, 0.012251103296875954, 0.03176078200340271, -0.06167983636260033, -0.025603633373975754, -0.05218229815363884, 0.0672411322593689, 0.015699829906225204, -0.020836807787418365, 0.06059646978974342, 0.005136976949870586, -0.04001244902610779, 0.02852873131632805, -0.02231741137802601, -0.029305145144462585, -0.05048501864075661, 0.0011804213281720877, 0.027246743440628052, -0.02114376239478588, 0.007321772165596485, -0.09078636765480042, -0.0026000868529081345, -0.013948382809758186, 0.06012700870633125, 0.03838739171624184, 0.021775728091597557, 0.005859223660081625, 0.016557497903704643, -0.049401648342609406, 0.049221087247133255, -0.04048190638422966, -0.08327500522136688, 0.012892097234725952, -0.013876157812774181, 0.02979266084730625, -0.004130346234887838, -0.0013023004867136478, -0.09244753420352936, 0.037773482501506805, -0.07583586871623993, -0.021884065121412277, -0.055251844227313995, 0.002997322240844369, -0.007913111709058285, -0.043804239481687546, 0.014219224452972412, 0.06247431039810181, -0.011853868141770363, 0.04777659475803375, 0.022227130830287933, -0.017676979303359985, -0.012214991264045238, -0.008653414435684681, -0.061065927147865295, 0.05680467560887337, 0.006233888678252697, 0.0056380354799330235, 0.02303965762257576, 0.015690801665186882, -0.004888704977929592, -0.03907352685928345, -0.03129132464528084, 0.014255337417125702, -0.018814517185091972, -0.04694601148366928, -0.055974092334508896, -0.055324070155620575, -0.02993711084127426, -0.042756982147693634, 0.01980760507285595, -0.02293132059276104, 0.024754993617534637, 0.06482160836458206, 0.019356202334165573, 0.037809595465660095, -0.0164401326328516, -0.004170972853899002, 0.0006156021845526993, -0.0032839637715369463, -0.012919181026518345, 0.03860406577587128, 0.0585019551217556, 0.0023292445112019777, -0.03907352685928345, 0.004313164856284857, 0.0023653567768633366, -0.022136850282549858, 0.0017864311812445521, 0.02526056580245495, -0.043587565422058105, 0.004830022342503071, 0.021053481847047806, 0.022407691925764084, 0.026398103684186935, 0.0461515411734581, 0.015880391001701355, -0.009750325232744217, -0.02601892501115799, 0.03291637822985649, 0.015167172998189926, 0.04246808588504791, 0.015835251659154892, 0.016277626156806946, -0.008585703559219837, -0.003913672175258398, -0.03334972634911537, -0.002816760679706931, -0.012846956960856915, 0.021757671609520912, 0.024466095492243767, 0.063593789935112, -0.04481538385152817, -0.011014256626367569, -0.09497539699077606, 0.003692484460771084, -0.004888704977929592, -0.056010205298662186, -0.010039224289357662, 0.01977149397134781, 0.03650955110788345, -0.034216418862342834, 0.020295122638344765, -0.030406571924686432, -0.026434216648340225, -0.007998878136277199, -0.01347892265766859, 0.04102359339594841, -0.0031846549827605486, 0.024682769551873207, 0.038423504680395126, -0.012657367624342442, -0.031345490366220474, 0.015961643308401108, 0.05832139402627945, -0.017749203369021416, -0.009145444259047508, -0.02558557689189911, -0.09165306389331818, -0.009994084015488625, 0.028077326714992523, 0.018101299181580544, 0.031056592240929604, -0.01991594210267067, -0.012855985201895237, 0.00007314154936466366, -0.021414604038000107, 0.0803137943148613, 0.044562600553035736, -0.018868686631321907, -0.009858662262558937, 0.03439698368310928, 0.042793095111846924, 0.05070169270038605, -0.009894775226712227, -0.07153850048780441, 0.07901374995708466, 0.004602063447237015, 0.021847952157258987, 0.038748517632484436, 0.01604289747774601, -0.043045882135629654, -0.02085486240684986, -0.007682895287871361, 0.009407258592545986, -0.0682883933186531, -0.015320650301873684, 0.027120349928736687, 0.031814951449632645, 0.0002791651349980384, -0.03864017874002457, 0.05806860700249672, -0.007010303437709808, -0.004031037446111441, 0.015997756272554398, 0.01973538100719452, -0.03678039461374283, 0.048787739127874374, -0.030153784900903702, 0.03972354903817177, 0.01805615797638893, 0.016665834933519363, 0.027752315625548363, -0.04048190638422966, 0.0016363393515348434, -0.018995078280568123, -0.028402337804436684, 0.0643160343170166, -0.012512917630374432, -0.034938666969537735, 0.01342475414276123, -0.05684078857302666, -0.04246808588504791, -0.022281300276517868, -0.030334345996379852, -0.01672000251710415, -0.02336466871201992, -0.005994644481688738, 0.05604631453752518, -0.029485706239938736, -0.00416194461286068, -0.0033020200207829475, 0.007353370543569326, -0.027337023988366127, 0.032356634736061096, -0.01353309117257595, -0.027734259143471718, 0.009326006285846233, 0.03255525231361389, 0.005457473918795586, 0.011194818653166294, 0.0048435647040605545, 0.019067304208874702, 0.026795338839292526, 0.015040780417621136, 0.037448473274707794, -0.0029928083531558514, -0.05120726674795151, 0.004599806386977434, -0.08399724960327148, 0.03139965981245041, -0.038315169513225555, 0.04524873197078705, -0.0396152101457119, 0.0287092924118042, 0.08876407891511917, 0.027716202661395073, 0.017126265913248062, -0.02253408543765545, 0.01640401966869831, 0.00045337885967455804, 0.03860406577587128, 0.008414169773459435, -0.016674863174557686, -0.03378307446837425, 0.044165365397930145, -0.07204407453536987, -0.026109205558896065, 0.002367613837122917, -0.007908597588539124, -0.04604320600628853, -0.015221341513097286, 0.04268475994467735, 0.05171283707022667, -0.02522445283830166, 0.031959399580955505, -0.043515343219041824, 0.04246808588504791, 0.037448473274707794, 0.06167983636260033, 0.021378491073846817, 0.018977021798491478, -0.05243508517742157, 0.003699255408719182, 0.04495983570814133, 0.016674863174557686, -0.03838739171624184, -0.061968736350536346, -0.01496855542063713, 0.054637935012578964, 0.04849884286522865, 0.0228952094912529, 0.007931167259812355, 0.012178879231214523, 0.019428426399827003, -0.05680467560887337, -0.00816589780151844, 0.016069980338215828, -0.016069980338215828, -0.0015990985557436943, -0.11996512115001678, -0.021486828103661537, -0.03291637822985649, 0.02659672126173973, 0.012630282901227474, 0.009497539140284061, -0.0007803646149113774, 0.0196270439773798, 0.00589533569291234, 0.0016938933404162526, -0.06413547694683075, 0.09237530827522278, 0.024032747372984886, -0.00715023884549737, -0.069046750664711, -0.0388929657638073, -0.08688623458147049, 0.03313305228948593, 0.03459560126066208, -0.0265244971960783, -0.004631404764950275, 0.03907352685928345, 0.00674848910421133, 0.02336466871201992, -0.023346612229943275, 0.06536329537630081, 0.01442687027156353, -0.029088471084833145, 0.04131248965859413, 0.037629034370183945, -0.04727102443575859, 0.05402402579784393, 0.01042743120342493, -0.005913392174988985, 0.021522941067814827, -0.014526179991662502, -0.010445487685501575, 0.030713526532053947, 0.048571065068244934, 0.04582653194665909, 0.061860401183366776, -0.0128108449280262, -0.035516463220119476, 0.048607178032398224, -0.024303589016199112, -0.027228686958551407, 0.037448473274707794, -0.000594160461332649, 0.05362679064273834, 0.03990411013364792, 0.0031237155199050903, -0.037809595465660095, 0.006757517345249653, -0.009641989134252071, -0.030316289514303207, 0.011429548263549805, -0.043045882135629654, 0.013975466601550579, 0.01834505796432495, 0.024068860337138176, 0.027589811012148857, -0.06482160836458206, 0.006017215084284544, 0.005859223660081625, 0.012160822749137878, -0.010129504837095737, -0.011808727867901325, -0.034505318850278854, 0.029377369210124016, 0.06839673221111298, 0.02917875163257122, -0.008301318623125553, -0.07312744110822678, 0.05720191076397896, -0.016566526144742966, 0.011438576504588127, 0.01068021822720766, 0.013235163874924183, 0.02601892501115799, -0.0118990084156394, 0.04109581559896469, 0.03369279205799103, -0.030605189502239227, 0.0061661782674491405, 0.02666894532740116, 0.016060953959822655, -0.008025962859392166, 0.02739119343459606, 0.025025835260748863, -0.01139343623071909, -0.06254653632640839, 0.03148994222283363, 0.03463171049952507, -0.03968743607401848, 0.07735258340835571, -0.09548096358776093, -0.001842856639996171, -0.01704501360654831, -0.00715023884549737, -0.043045882135629654, -0.003478067461401224, -0.004263510461896658, -0.06554385274648666, 0.002683596685528755, -0.02979266084730625, 0.05402402579784393, -0.044273700565099716, 0.06218541041016579, 0.043732017278671265, 0.013785877265036106, -0.027463417500257492, -0.010021167807281017, -0.07204407453536987, -0.021486828103661537, -0.014490067027509212, -0.019681213423609734, -0.05745469778776169, -0.05759914591908455, -0.0019455511355772614, 0.016710974276065826, -0.010310066863894463, -0.02536890283226967, -0.006035271100699902, 0.0035841474309563637, -0.018137412145733833, 0.019753437489271164, 0.00017125137674156576, 0.062040962278842926, 0.03405391424894333, -0.016178317368030548, -0.010454515926539898, -0.018182551488280296, 0.01687348075211048, -0.043623678386211395, -0.031002424657344818, 0.0396152101457119, -0.019374258816242218, -0.002823531860485673, 0.02110764943063259, 0.06597720086574554, -0.024104971438646317, -0.043118108063936234, 0.017902681604027748, 0.021649334579706192, 0.015465100295841694, 0.028185663744807243, 0.07626921683549881, 0.027842596173286438, 0.07323578000068665, 0.0022841040045022964, -0.02634393610060215, 0.013596286997199059, 0.021577108651399612, 0.028691235929727554, 0.009231210686266422, -0.007809288799762726, -0.016358880326151848, 0.04152916371822357, -0.03932631388306618, 0.03994022309780121, 0.0027987046632915735, -0.043190330266952515, 0.00413711741566658, 0.05192951112985611, -0.013921298086643219, -0.007190864998847246, -0.004969957750290632, 0.044273700565099716, 0.01797490566968918, -0.03571508079767227, 0.0060081868432462215, -0.04842661693692207, 0.002512063132598996, 0.016097065061330795, -0.02648838423192501, -0.038531843572854996, 0.012305271811783314, 0.043334782123565674, 0.034071970731019974, -0.10292010754346848, -0.043154217302799225, 0.049618322402238846, 0.055829644203186035, 0.033114995807409286, 0.0268856193870306, 0.030677413567900658, -0.011980261653661728, 0.019049247726798058, -0.01797490566968918, -0.010255898348987103, -0.011817756108939648, -0.03972354903817177, -0.032248299568891525, -0.030857974663376808, 0.018065186217427254, 0.0737774670124054, -0.023202164098620415, -0.009235724806785583, 0.011808727867901325, 0.032212186604738235, 0.012034430168569088, 0.014228252694010735, 0.031634390354156494, 0.0534101165831089, -0.016422076150774956, 0.015013695694506168, 0.017460305243730545, 0.06489383429288864, -0.05889919027686119, 0.041420828551054, -0.007741577923297882, 0.017451277002692223, -0.0015347735024988651, -0.019085358828306198, 0.05792415514588356, -0.04055413231253624, -0.019970111548900604, -0.00005311049608280882, 0.030803807079792023, 0.012928209267556667, -0.04026523232460022, -0.007899569347500801, -0.07139404863119125, 0.019572876393795013, -0.027643978595733643, 0.0005177039420232177, -0.030135728418827057, 0.07511361688375473, -0.061752062290906906, -0.03986799716949463, 0.05048501864075661, -0.0519656240940094, 0.06911897659301758, -0.01013853307813406, -0.014327561482787132, -0.014851190149784088, 0.028655122965574265, -0.054962947964668274, 0.004419244825839996, -0.02587447501718998, 0.0009242496453225613, -0.042756982147693634, 0.00534010911360383, 0.021649334579706192, 0.05286843329668045, -0.012287216261029243, -0.011294127441942692, 0.08616399019956589, -0.05629910156130791, -0.028799572959542274, 0.017577670514583588, -0.060921479016542435, 0.04116804152727127, -0.04517650976777077, -0.019085358828306198, 0.002141911769285798, -0.008766264654695988, -0.019338145852088928, -0.07366912811994553, -0.044093139469623566, -0.03517339751124382, 0.00926280952990055, -0.0388929657638073, 0.03600398078560829, -0.014661600813269615, 0.014544235542416573, -0.010219785384833813, 0.022588254883885384, -0.0447070486843586, -0.02296743355691433, 0.026795338839292526, -0.09569764137268066, 0.02350911870598793, -0.012485833838582039, 0.008888144046068192, -0.050196122378110886, 0.011862896382808685, -0.05431292578577995, -0.05954921245574951, -0.021974345669150352, 0.017360996454954147, -0.05647966265678406, 0.024827217683196068, 0.006622096057981253, -0.023852186277508736, -0.007773176301270723, 0.010662161745131016, -0.009172528982162476, 0.08731958270072937, 0.032031625509262085, 0.01812838390469551, -0.013108771294355392, 0.00043701546383090317, -0.027716202661395073, -0.005290454253554344, 0.015374818816781044, 0.0038617609534412622, 0.007087042089551687, -0.012070542201399803, -0.05239897221326828, -0.018074214458465576, 0.006310627330094576, -0.054637935012578964, 0.03571508079767227, -0.04644044116139412, -0.08233608305454254, 0.04593486711382866, 0.015094948932528496, 0.019428426399827003, 0.010553824715316296, -0.019247865304350853, 0.05398791283369064, -0.05156838893890381, 0.022371580824255943, -0.05023223161697388, -0.01955481991171837, 0.07034679502248764, 0.037448473274707794, -0.0806749165058136, 0.005353651009500027, 0.05091836676001549, 0.03965132310986519, 0.04001244902610779, -0.010319095104932785, -0.020945144817233086, 0.02293132059276104, 0.02717451937496662, -0.042756982147693634, 0.00531302485615015, -0.005209201946854591, -0.049004413187503815, -0.025531407445669174, 0.0368887335062027, 0.04467093572020531, 0.03255525231361389, -0.026687001809477806, -0.02648838423192501, 0.04568208009004593, 0.02275075949728489, -0.01919369585812092, -0.03298860043287277, -0.001057413755916059, 0.028727348893880844, 0.031887177377939224, -0.06994955986738205, -0.012088597752153873, -0.034108083695173264, -0.003719568718224764, 0.001990691525861621, 0.019428426399827003, 0.056010205298662186, 0.02943153865635395, -0.09042524546384811, -0.018471449613571167, -0.03405391424894333, 0.007628727238625288, -0.0143546462059021, -0.0009146572556346655, -0.03434281423687935, -0.012242075987160206, 0.03363862261176109, -0.0661216527223587, 0.03571508079767227, -0.0016826082719489932, 0.017902681604027748, 0.01480604987591505, -0.02917875163257122, -0.06381046772003174, 0.014553263783454895, 0.026542553678154945, -0.0088114058598876, 0.013831017538905144, 0.04474316164851189, 0.0006697706412523985, 0.021486828103661537, -0.04066246747970581, -0.02031317912042141, -0.01995205506682396, 0.055324070155620575, -0.0035976895596832037, 0.02002427913248539, -0.049293313175439835, -0.02329244464635849, 0.04745158553123474, -0.05301288142800331, 0.037881821393966675, 0.019157584756612778, -0.04560985788702965, -0.0007132182363420725, -0.05319344252347946, 0.0657605305314064, 0.02031317912042141, -0.01440881472080946, -0.021793782711029053, -0.024935554713010788, 0.024448039010167122, 0.037881821393966675, -0.013921298086643219, -0.014381729997694492, -0.01820060797035694, -0.0019162098178640008, 0.030839918181300163, -0.0037489100359380245, -0.044057026505470276, 0.030749637633562088, 0.01037326268851757, 0.043081995099782944, 0.02121598646044731, -0.010662161745131016, -0.0948309451341629, -0.009723241440951824, 0.025061948224902153, -0.015320650301873684, -0.013840045779943466, 0.014363674446940422, 0.027896765619516373, -0.020836807787418365, -0.005055724177509546, -0.034938666969537735, 0.04059024527668953, -0.007624213118106127, -0.006622096057981253, -0.012738619931042194, 0.0450681708753109, -0.01686445251107216, -0.007646783255040646, 0.04040968418121338, -0.038026269525289536, 0.009181556291878223, -0.021866008639335632, 0.0479571558535099, 0.042540308088064194, -0.02231741137802601, 0.061535388231277466, -0.02332855761051178, 0.0040107243694365025, 0.014453954994678497, 0.02336466871201992, 0.04842661693692207, 0.08703068643808365, -0.024736937135457993, 0.043118108063936234, -0.05752691999077797, -0.03510117158293724, -0.038676291704177856, 0.02387024089694023, -0.06994955986738205, 0.01820060797035694, 0.0013000434264540672, 0.030316289514303207, 0.0417819507420063, 0.01998816803097725, 0.020728470757603645 ]
717,759
pytorch_optimizer.optimizer.ranger21
lookahead_process_step
null
def lookahead_process_step(self): self.lookahead_step += 1 if self.lookahead_step >= self.lookahead_merge_time: self.lookahead_step: int = 0 for group in self.param_groups: for p in group['params']: if p.grad is None: continue state = self.state[p] p.mul_(self.lookahead_blending_alpha).add_( state['lookahead_params'], alpha=1.0 - self.lookahead_blending_alpha, ) state['lookahead_params'].copy_(p)
(self)
[ 0.0005606423364952207, 0.018492434173822403, -0.07364403456449509, 0.08627389371395111, -0.02392074093222618, 0.007595106493681669, -0.026327289640903473, -0.038975246250629425, -0.029964255169034004, 0.015172118321061134, -0.009029083885252476, -0.02886050008237362, 0.08612914383411407, 0.04686438664793968, -0.025784458965063095, 0.0012779140379279852, 0.058770474046468735, 0.059023793786764145, -0.0371658094227314, -0.0205009076744318, 0.016284922137856483, 0.005292599555104971, -0.01002427376806736, 0.03316695615649223, -0.027738649398088455, -0.0021328723523765802, 0.022780796512961388, 0.007640342228114605, -0.028751933947205544, 0.05207556113600731, -0.008355069905519485, -0.08743193745613098, -0.04053135961294174, -0.027449140325188637, -0.015597335994243622, -0.03414405137300491, -0.019397150725126266, 0.031230861321091652, -0.06398164480924606, -0.0020831129513680935, 0.02422834374010563, -0.008400305174291134, 0.0004927885020151734, 0.03352884575724602, -0.019017169252038002, -0.03199082240462303, -0.014973080717027187, 0.011146124452352524, 0.0273948572576046, -0.03588110953569412, 0.016293969005346298, -0.07751622796058655, 0.06365595012903214, 0.02887859381735325, 0.058082886040210724, 0.02466260828077793, 0.03479544818401337, -0.030669935047626495, 0.02368551306426525, -0.036532506346702576, 0.03472307324409485, 0.0020763275679200888, -0.03030804917216301, 0.04132751375436783, 0.020699944347143173, -0.06304074078798294, -0.04328170418739319, -0.02471689134836197, -0.020681850612163544, -0.018239112570881844, 0.006925615482032299, 0.01854671724140644, -0.011480869725346565, -0.005527826026082039, -0.09495918452739716, 0.01161657739430666, 0.01452976930886507, -0.0007701410795561969, 0.05833620950579643, -0.0003392692015040666, 0.012991748750209808, 0.049252841621637344, -0.009381924755871296, 0.007463922258466482, 0.024210250005126, -0.02714153565466404, -0.02759389579296112, -0.01578732766211033, -0.0386495478451252, -0.021640852093696594, -0.002931285882368684, -0.005238316487520933, 0.02985568903386593, 0.05272695794701576, 0.0715450868010521, 0.04035041853785515, -0.022545568645000458, 0.050483256578445435, -0.0492890290915966, 0.02837195247411728, -0.03157465532422066, 0.016284922137856483, -0.03649631887674332, 0.031357523053884506, -0.005446401424705982, -0.036297280341386795, -0.006821572780609131, -0.02618253603577614, 0.013977890834212303, -0.002388455206528306, -0.02493402361869812, -0.027792932465672493, -0.06937376409769058, -0.0003115622093901038, -0.018320536240935326, 0.0023432192392647266, 0.01979522779583931, 0.015561147592961788, 0.021640852093696594, 0.06774527579545975, 0.08620151877403259, -0.007798667997121811, 0.00305794645100832, 0.054174505174160004, 0.015579241327941418, -0.038034338504076004, 0.053921185433864594, 0.06372832506895065, -0.0018637188477441669, -0.0900375247001648, -0.049252841621637344, -0.004953330382704735, -0.03807052969932556, -0.0503385029733181, -0.020482812076807022, -0.004301933571696281, -0.02276270091533661, -0.009354783222079277, -0.07382497936487198, -0.013027937151491642, 0.021315153688192368, -0.010178076103329659, 0.024137873202562332, -0.06336644291877747, 0.02373979613184929, -0.004713580012321472, 0.00990666076540947, 0.021441813558340073, -0.006970851216465235, 0.018049120903015137, 0.024789270013570786, -0.045561593025922775, -0.013878372497856617, 0.0007899318006820977, 0.032624125480651855, 0.05066420137882233, -0.02882431074976921, 0.050447069108486176, -0.003967187833040953, 0.011363256722688675, 0.01981332153081894, -0.043643590062856674, 0.0034582840744405985, -0.009160268120467663, 0.03454212844371796, 0.059783756732940674, -0.025784458965063095, 0.06854142248630524, -0.061448436230421066, -0.03644203767180443, 0.05012137070298195, 0.003338408889248967, 0.05580299720168114, 0.006970851216465235, -0.01930668018758297, 0.04179796576499939, 0.006183746736496687, 0.0003884632315021008, 0.044620685279369354, 0.00758153572678566, 0.03157465532422066, 0.02663489431142807, 0.009083367884159088, -0.03671345114707947, -0.023902645334601402, -0.01076614297926426, 0.002363575389608741, 0.015181166119873524, 0.019125735387206078, 0.049976613372564316, 0.029674746096134186, -0.0006542241317220032, 0.04784148186445236, -0.05464496091008186, -0.03926475718617439, 0.02350457012653351, -0.0004673433140851557, 0.01981332153081894, 0.044837817549705505, 0.020627567544579506, -0.028932876884937286, -0.07650294154882431, -0.025277817621827126, 0.006120416335761547, 0.005233793053776026, -0.0026779649779200554, -0.016891082748770714, 0.05055563524365425, -0.04795004799962044, -0.02614634670317173, -0.04979567229747772, -0.03584492206573486, 0.1015455350279808, 0.04719008505344391, -0.014927844516932964, -0.0577571876347065, 0.03204510733485222, 0.009110509417951107, 0.07657532393932343, 0.031628936529159546, -0.011851804330945015, -0.07418686896562576, 0.028643367812037468, -0.02366741932928562, 0.03788958489894867, -0.013073173351585865, 0.021695135161280632, 0.014231212437152863, -0.04259411618113518, -0.008255550637841225, 0.011191359721124172, -0.036261092871427536, -0.041689399629831314, -0.009065273217856884, 0.049723293632268906, 0.004234079737216234, 0.008554107509553432, -0.02634538523852825, -0.05355929955840111, 0.009327641688287258, 0.010340925306081772, 0.04570634663105011, 0.015488769859075546, 0.023902645334601402, -0.039228565990924835, -0.03660488501191139, 0.06600821763277054, -0.06749195605516434, -0.00244047655723989, 0.014348825439810753, -0.0179948378354311, 0.05030231177806854, -0.010132839903235435, 0.014204070903360844, -0.03788958489894867, -0.03667726367712021, 0.014620240777730942, 0.019216207787394524, -0.001487129949964583, -0.020663756877183914, -0.003935522865504026, -0.003227581037208438, -0.04820336773991585, -0.010078556835651398, -0.022780796512961388, 0.07650294154882431, 0.05174986273050308, -0.02104373835027218, 0.005021184217184782, -0.006224459037184715, 0.09228122234344482, 0.003933261148631573, -0.030181387439370155, 0.0465024970471859, -0.04129132255911827, -0.007622248027473688, 0.023305531591176987, 0.00421598507091403, -0.0205009076744318, 0.0004509453137870878, 0.091774582862854, 0.0077850972302258015, -0.06980802863836288, -0.02269032411277294, -0.038034338504076004, 0.04038660600781441, 0.011788473464548588, 0.06868617981672287, 0.026110157370567322, -0.012150361202657223, -0.018148640170693398, 0.0035487557761371136, 0.09893994778394699, 0.04476543888449669, 0.03886668011546135, -0.016782516613602638, -0.018691470846533775, 0.014267400838434696, -0.015443533658981323, 0.0072603607550263405, 0.03577254340052605, -0.05135178565979004, -0.006432543974369764, 0.03734675422310829, -0.07780573517084122, 0.0065003978088498116, 0.013154597952961922, 0.018980981782078743, -0.007459398824721575, -0.00163527752738446, 0.023052211850881577, 0.07635819166898727, 0.020446624606847763, -0.01903526484966278, 0.010919944383203983, -0.105381540954113, 0.004580134060233831, 0.038975246250629425, -0.0152897322550416, 0.04809480160474777, 0.0002367816341575235, -0.02860717847943306, 0.009228122420608997, -0.011661813594400883, 0.004627631977200508, -0.018239112570881844, 0.08960326015949249, 0.0261282529681921, -0.004433117341250181, -0.010965180583298206, -0.09843330085277557, -0.009617150761187077, -0.017479149624705315, 0.02373979613184929, -0.03857716917991638, -0.012412728741765022, -0.04834812134504318, -0.05891522765159607, 0.038034338504076004, -0.029511896893382072, -0.007233219221234322, -0.01905335858464241, -0.0503385029733181, -0.015108788385987282, 0.06864999234676361, -0.01711726188659668, 0.04270268231630325, 0.07512777298688889, 0.026761554181575775, -0.006970851216465235, 0.005966614466160536, -0.004532636608928442, -0.008101748302578926, 0.04646630957722664, -0.015199259854853153, -0.01575113832950592, -0.03615252673625946, -0.05887904018163681, 0.048022422939538956, 0.01883622631430626, -0.014828326180577278, 0.03278697654604912, -0.005441877990961075, 0.04295600578188896, 0.022038927301764488, -0.027702461928129196, -0.0738973543047905, -0.0015742090763524175, 0.008011276833713055, -0.021459907293319702, 0.008160554803907871, 0.007839380763471127, 0.028643367812037468, -0.005260934587568045, -0.05848096311092377, 0.00437657255679369, 0.028408141806721687, -0.001247379812411964, 0.02372170239686966, 0.028046254068613052, 0.011281832121312618, 0.010015226900577545, -0.03738294169306755, 0.038975246250629425, 0.00800222996622324, 0.001984724774956703, 0.036532506346702576, -0.05960281193256378, 0.05189461633563042, -0.018492434173822403, 0.049252841621637344, -0.022599851712584496, -0.001651110127568245, -0.054391637444496155, -0.012267974205315113, 0.005079990718513727, 0.036261092871427536, -0.005695199128240347, -0.034343089908361435, 0.02393883466720581, 0.013561720959842205, 0.0018761586397886276, -0.04903570935130119, -0.02882431074976921, 0.015723995864391327, -0.031357523053884506, -0.010838519781827927, 0.08873473107814789, -0.04176177829504013, -0.0142854955047369, -0.08591201156377792, -0.008472682908177376, 0.008644578978419304, -0.024590231478214264, -0.011263737455010414, -0.05844477564096451, -0.04136370122432709, 0.0009629590786062181, -0.039228565990924835, 0.012774616479873657, 0.03492210805416107, 0.006310407072305679, -0.06792622059583664, 0.010322830639779568, -0.0031077058520168066, 0.004550730809569359, -0.03208129480481148, 0.022147493436932564, -0.04299219325184822, -0.0035872063599526882, -0.019234301522374153, -0.046755820512771606, -0.006975374650210142, 0.013805994763970375, 0.010132839903235435, 0.003720652312040329, -0.021423719823360443, 0.034379277378320694, 0.040133286267519, -0.02151419036090374, 0.014620240777730942, 0.042159851640462875, 0.08012181520462036, -0.003252460854128003, 0.05699722468852997, 0.0003047768259420991, 0.036785829812288284, -0.00897027738392353, -0.07299263775348663, 0.007097511552274227, -0.004580134060233831, 0.032388899475336075, 0.019125735387206078, 0.007848427630960941, -0.016990602016448975, -0.005582109093666077, -0.010657576844096184, -0.01927049085497856, 0.03182797506451607, 0.00555044412612915, 0.007070370018482208, 0.02415596693754196, -0.03079659678041935, 0.067781463265419, 0.0032728170044720173, 0.013769806362688541, 0.04035041853785515, 0.001085096038877964, -0.034596409648656845, 0.050953712314367294, -0.03564588353037834, -0.03273269161581993, 0.0020457932259887457, -0.05334216728806496, 0.02153228595852852, 0.007011563517153263, 0.015642572194337845, -0.039735209196805954, 0.0273948572576046, 0.037491507828235626, -0.012657002545893192, -0.029475707560777664, 0.03079659678041935, 0.00953572615981102, -0.011571341194212437, 0.035103052854537964, -0.01977713219821453, 0.005604727193713188, -0.01811245083808899, 0.007961517199873924, -0.04121894761919975, -0.05493446812033653, 0.012286068871617317, 0.07176221907138824, -0.033329807221889496, -0.011354208923876286, 0.03622490167617798, 0.016891082748770714, 0.11160599440336227, -0.03807052969932556, -0.018031027168035507, 0.018619094043970108, 0.017153451219201088, -0.06390926986932755, 0.015434486791491508, -0.0015470675425603986, -0.03369169309735298, -0.010711859911680222, -0.058300018310546875, 0.06296836584806442, 0.0410018153488636, -0.009626198559999466, -0.03468688204884529, 0.02643585577607155, -0.020392341539263725, -0.016538241878151894, 0.0038676687981933355, -0.008097224868834019, 0.05848096311092377, -0.006188270170241594, 0.05464496091008186, 0.01794055476784706, 0.03763626515865326, -0.07831238210201263, 0.018302442505955696, -0.0006819310947321355, -0.02149609662592411, 0.0028475995641201735, -0.02422834374010563, 0.0026892737951129675, 0.026996782049536705, -0.023866457864642143, 0.023649325594305992, 0.043607402592897415, 0.04968710616230965, -0.03591730073094368, 0.03890286758542061, -0.018302442505955696, -0.06716625392436981, -0.0008741836645640433, 0.009752858430147171, -0.053197409957647324, 0.0031913924030959606, -0.02149609662592411, -0.0011964894365519285, 0.06014564260840416, -0.0281367264688015, 0.0011580388527363539, -0.06716625392436981, 0.023540759459137917, -0.03472307324409485, 0.022310342639684677, -0.07483826577663422, 0.050483256578445435, 0.03933713212609291, -0.026001591235399246, 0.0025038067251443863, 0.03550112992525101, 0.036261092871427536, 0.016293969005346298, 0.015479722991585732, -0.02296173945069313, -0.023576946929097176, -0.0709298774600029, -0.03398120403289795, -0.06575489789247513, -0.01600445993244648, 0.02911382168531418, -0.018166735768318176, 0.07295645028352737, 0.05725054815411568, 0.005735911428928375, -0.07349927723407745, -0.012611767277121544, 0.008531489409506321, -0.033402182161808014, -0.01639348827302456, 0.03461450710892677, -0.01379694789648056, 0.008952183648943901, 0.04823955520987511, -0.016773469746112823, 0.01662871427834034, -0.028408141806721687, 0.011218501254916191, -0.006559204775840044, -0.032352712005376816, 0.015932081267237663, -0.010901850648224354, -0.018221018835902214, -0.09438017010688782, 0.030905162915587425, 0.01149896439164877, -0.02497021295130253, -0.03785339742898941, 0.005957567133009434, -0.02395692840218544, 0.0033135293051600456, -0.03398120403289795, 0.013724570162594318, 0.03256984427571297, -0.013172692619264126, 0.007228695787489414, 0.026761554181575775, -0.02638157270848751, -0.03577254340052605, 0.005048325750976801, 0.014195023104548454, -0.026291102170944214, -0.025549232959747314, -0.003471854841336608, 0.011924181133508682, 0.016556337475776672, -0.011906087398529053, -0.06720244139432907, -0.03126705065369606, -0.0033610269892960787, 0.003259246237576008, 0.07161746919155121, 0.052654579281806946, 0.01592303439974785, -0.00354649405926466, -0.012783663347363472, 0.06593583524227142, 0.022346531972289085, -0.02174941822886467, 0.0586257167160511, -0.0636921375989914, 0.0435350239276886, -0.058806661516427994, -0.012503201141953468, 0.04787766933441162, -0.012738428078591824, -0.08909661322832108, 0.0012564269127324224, 0.0465024970471859, 0.0159863643348217, -0.030235670506954193, -0.012675097212195396, -0.04892714321613312, -0.05457258224487305, -0.01161657739430666, -0.012503201141953468, -0.03304029628634453, -0.008680768311023712, -0.028281480073928833, -0.053378354758024216, 0.0068170493468642235, 0.06253410130739212, 0.07100225985050201, 0.016692044213414192, 0.006495874375104904, -0.03247937187552452, -0.025531139224767685, 0.01649300754070282, -0.037238188087940216, 0.004238603170961142, 0.09908469766378403, -0.0006672294111922383, -0.0376000739634037, -0.07491064071655273, 0.023341720923781395, 0.014982127584517002, -0.024590231478214264, -0.0075046345591545105, -0.0009199850028380752, -0.01782294176518917, -0.025332100689411163, 0.018691470846533775, -0.006934662349522114, -0.12260736525058746, -0.05283552408218384, -0.05453639477491379, 0.06390926986932755, -0.0016386702191084623, -0.012403681874275208, -0.004283838905394077, -0.014629287645220757, 0.0405675508081913, 0.005496161058545113, 0.008707909844815731, -0.002854384947568178, -0.00013309248606674373, 0.01076614297926426, 0.037781018763780594, 0.008029371500015259, -0.008124366402626038, 0.02837195247411728, 0.026707271113991737, 0.048022422939538956, -0.019125735387206078, 0.006441591307520866, 0.030217576771974564, -0.022183682769536972, -0.04574253410100937, -0.0167282335460186, -0.013616004027426243, -0.007947946898639202, 0.033872637897729874, -0.07168984413146973, 0.0012179764453321695, -0.030868973582983017, -0.031610842794179916, -0.013353635556995869, -0.02100754901766777, 0.02247319184243679, -0.0010579545050859451, 0.002162275603041053, -0.013923607766628265, -0.023631229996681213, -0.03810671716928482, -0.0371658094227314, -0.0266529880464077, 0.024517854675650597, 0.02024758607149124, 0.013199834153056145, -0.03427071124315262, -0.014375966973602772, -0.01881813257932663, 0.018338631838560104, -0.04422260820865631, 0.07295645028352737, 0.04208747670054436, 0.026055874302983284, -0.04129132255911827, -0.022563664242625237, 0.007708196062594652, -0.015705902129411697, 0.017641998827457428, -0.007911757566034794, -0.03077850118279457, 0.007314643822610378, -0.06181032583117485, 0.01979522779583931, 0.027232008054852486, 0.0018512789392843843, -0.03300410881638527, -0.017262017354369164, 0.031086105853319168, -0.005812812130898237, 0.03465069457888603, -0.02565779909491539, -0.022418908774852753, -0.0273948572576046, 0.0000639310383121483, 0.06886712461709976, 0.035320185124874115, -0.05062801018357277, -0.0029878306668251753, -0.1393265575170517, 0.04903570935130119, -0.005885189864784479, 0.04342645779252052, 0.0018671115394681692, 0.03915619105100632, 0.015434486791491508, 0.08185887336730957, 0.022346531972289085, 0.014719760045409203, -0.017868177965283394, 0.007961517199873924, -0.05399356409907341, 0.05739530175924301, -0.009752858430147171, 0.019125735387206078, 0.02786531113088131, 0.0011919657699763775, 0.0318460687994957 ]
717,780
pytorch_optimizer.optimizer.ranger21
warm_down
null
def warm_down(self, lr: float, iteration: int) -> float: if iteration < self.start_warm_down: return lr # start iteration from 1, not 0 warm_down_iteration: int = max((iteration + 1) - self.start_warm_down, 1) warm_down_pct: float = min(warm_down_iteration / (self.num_warm_down_iterations + 1), 1.0) self.current_lr = max(self.starting_lr - self.warm_down_lr_delta * warm_down_pct, self.min_lr) return self.current_lr
(self, lr: float, iteration: int) -> float
[ -0.008738244883716106, 0.024161387234926224, -0.06522838026285172, 0.03740226849913597, -0.027163144201040268, -0.029391443356871605, 0.007485978305339813, -0.03093836084008217, -0.038415130227804184, 0.0027117105200886726, -0.02543206885457039, 0.03202488645911217, 0.037862662225961685, 0.055946867913007736, 0.03209855034947395, 0.03357180580496788, 0.002842922229319811, 0.048396434634923935, 0.021288538351655006, -0.005377381574362516, 0.07948212325572968, 0.04773347079753876, -0.020957056432962418, 0.06136108189821243, -0.05045899376273155, 0.029225701466202736, -0.014023548923432827, 0.037052370607852936, -0.040993329137563705, 0.019299644976854324, -0.034787241369485855, -0.017881635576486588, 0.011730794794857502, -0.04147213697433472, -0.009263092651963234, -0.022909119725227356, -0.026316022500395775, -0.014935125596821308, -0.07778787612915039, -0.020330922678112984, -0.03837829828262329, 0.03736543655395508, -0.008010825142264366, -0.011850496754050255, 0.03139875456690788, -0.012900191359221935, -0.024087723344564438, -0.06062445417046547, 0.0431663803756237, -0.007472166791558266, 0.02828650176525116, 0.012283265590667725, 0.022706547752022743, 0.012752866372466087, 0.019852114841341972, 0.026923740282654762, 0.010561399161815643, -0.022577637806534767, 0.009539327584207058, -0.03915175795555115, -0.017964506521821022, -0.08331258594989777, -0.019778452813625336, 0.05403163656592369, 0.06456541270017624, 0.009350567124783993, -0.03254052624106407, -0.014097210951149464, -0.004702907055616379, -0.00028918389580212533, -0.012421383522450924, 0.0007418070454150438, -0.04408716410398483, -0.02283545583486557, -0.03719969466328621, -0.019888946786522865, -0.012973854318261147, -0.07896648347377777, -0.0020809730049222708, -0.03395853564143181, 0.033442895859479904, 0.045265767723321915, 0.023185355588793755, -0.021712100133299828, -0.014566811732947826, -0.0318591445684433, -0.012789697386324406, -0.06412343680858612, -0.020864978432655334, 0.037494346499443054, -0.03296408802270889, 0.005575350485742092, 0.018203910440206528, 0.010386449284851551, 0.026463348418474197, 0.03697870671749115, -0.07410474121570587, -0.005690448451787233, -0.019446969032287598, -0.03353497385978699, 0.063681460916996, 0.07712491601705551, 0.008738244883716106, 0.052705708891153336, 0.03471357747912407, -0.0031836125999689102, -0.012283265590667725, -0.0036417029332369566, 0.014189289882779121, -0.07414156943559647, -0.02456653118133545, 0.01569937728345394, -0.0485805943608284, 0.01641758903861046, -0.05484192818403244, 0.023185355588793755, -0.0367208868265152, -0.014308991841971874, 0.02688690833747387, 0.03714444860816002, 0.025781966745853424, -0.05149027332663536, -0.017006890848279, -0.04125114902853966, -0.023074861615896225, -0.01468651369214058, 0.007131476420909166, 0.09973938018083572, 0.021601606160402298, 0.01098496001213789, 0.00941502209752798, -0.0077299862168729305, -0.0458919033408165, -0.02462177909910679, 0.02465861104428768, -0.03434526175260544, 0.031288258731365204, 0.06824854761362076, 0.016021650284528732, 0.035542283207178116, -0.011519014835357666, 0.0169976819306612, 0.0809553787112236, 0.01352632511407137, 0.050385329872369766, 0.05053265765309334, -0.0017172631341964006, 0.09171014279127121, 0.03202488645911217, 0.0050228796899318695, -0.023627331480383873, -0.005543122999370098, 0.0367024727165699, -0.01139010488986969, 0.021233292296528816, 0.04069867730140686, -0.04257707670331001, 0.032043300569057465, -0.008015429601073265, -0.047917626798152924, -0.004972236696630716, -0.004431275650858879, -0.02876530960202217, -0.06968497484922409, 0.03202488645911217, -0.020165180787444115, -0.0019532141741365194, 0.010460112243890762, -0.02775244601070881, -0.0014387258561328053, 0.03519238531589508, -0.047254662960767746, 0.07421523332595825, -0.004719020798802376, -0.006790786050260067, 0.0707162544131279, 0.026002954691648483, 0.02856273576617241, 0.005846981890499592, 0.05421579256653786, -0.0037061579059809446, 0.007412315811961889, 0.014879878610372543, -0.11358798295259476, -0.004963028710335493, -0.013765729032456875, -0.06482323259115219, 0.04055135324597359, 0.01150059886276722, 0.013019893318414688, 0.05716230347752571, -0.04894890636205673, 0.024437621235847473, -0.04673902317881584, 0.017135800793766975, 0.001663167029619217, 0.04327687248587608, 0.045744575560092926, 0.11528222262859344, 0.004893969744443893, -0.012762073427438736, 0.07053209841251373, 0.015017995610833168, 0.02127012237906456, -0.04382934421300888, -0.005101146176457405, -0.051637597382068634, 0.00979714747518301, -0.01710817776620388, 0.023387927561998367, -0.02795501798391342, 0.004893969744443893, 0.04939088225364685, -0.0261871125549078, 0.0010750159854069352, -0.03937274590134621, -0.04710733890533447, 0.0031421773601323366, 0.058819714933633804, 0.0034299225080758333, -0.027126312255859375, -0.07134238630533218, -0.01710817776620388, -0.04438181594014168, 0.03099360689520836, -0.009714276529848576, -0.017025306820869446, -0.07524651288986206, 0.011472975835204124, 0.05204274132847786, -0.04718099907040596, -0.05874605476856232, 0.032908838242292404, -0.014134042896330357, 0.06651747226715088, 0.007780629210174084, -0.04773347079753876, 0.030864698812365532, -0.019944192841649055, -0.0377889983355999, -0.018268365412950516, 0.02786293998360634, -0.011749210767447948, 0.046076059341430664, -0.02644493244588375, 0.031048854812979698, 0.041693124920129776, -0.004104397259652615, -0.02154635824263096, 0.015054827556014061, -0.004702907055616379, -0.032577358186244965, -0.0015238984487950802, 0.03736543655395508, 0.037328604608774185, 0.0005165025941096246, 0.004875554237514734, 0.003374675288796425, -0.007532017771154642, 0.04220876470208168, 0.057199135422706604, -0.05863555893301964, -0.05602053180336952, 0.0075596412643790245, -0.04662853106856346, -0.0006209540879353881, -0.015137697570025921, -0.01559809036552906, -0.00043363196891732514, 0.004631546325981617, 0.13833867013454437, -0.03434526175260544, -0.020054686814546585, -0.002391737885773182, -0.023719409480690956, 0.06990595906972885, -0.018912915140390396, 0.013756521046161652, -0.018203910440206528, -0.023682579398155212, 0.05874605476856232, -0.05521024018526077, -0.02731047011911869, 0.012191187590360641, -0.010902089066803455, -0.020220428705215454, -0.006404056679457426, 0.01495354063808918, 0.02456653118133545, 0.017237085849046707, 0.07248415797948837, 0.015220568515360355, 0.07403107732534409, 0.007094644941389561, 0.09922374039888382, 0.0085034454241395, 0.016933226957917213, -0.05834090709686279, 0.030054407194256783, 0.05602053180336952, 0.05266887694597244, -0.053405504673719406, -0.015911156311631203, 0.029999161139130592, 0.019520632922649384, 0.010404865257441998, 0.007412315811961889, 0.013839391991496086, 0.0026150280609726906, 0.03541337326169014, -0.07439938932657242, 0.02202516607940197, 0.005142581649124622, -0.008250229991972446, -0.024640195071697235, -0.0858171209692955, -0.008738244883716106, -0.0299623291939497, -0.008927006274461746, -0.014750968664884567, -0.01233851257711649, 0.014833838678896427, 0.02417980134487152, 0.01829598844051361, -0.03449258953332901, -0.06364462524652481, 0.027163144201040268, 0.054657772183418274, -0.02499009296298027, -0.06003515422344208, 0.003234255826100707, -0.08169200271368027, 0.0004992378526367247, 0.025818798691034317, 0.034952979534864426, 0.00793716311454773, 0.05808309093117714, 0.03804681822657585, 0.018857667222619057, -0.0057410914450883865, 0.08589078485965729, 0.03605792298913002, -0.0025620830710977316, -0.004815703257918358, 0.07594630867242813, 0.021656852215528488, 0.06651747226715088, 0.004279346205294132, 0.024732273072004318, -0.003399997018277645, -0.03644465282559395, -0.06983230262994766, -0.06493372470140457, 0.03093836084008217, 0.0018243043450638652, 0.0022478653118014336, -0.06379195302724838, -0.024953261017799377, 0.05815675109624863, -0.07314712554216385, -0.05480509623885155, 0.017550153657794, -0.030754202976822853, 0.0976768210530281, 0.01615056023001671, 0.000394498638343066, -0.11329332739114761, -0.0080936960875988, -0.01906023919582367, 0.01721867173910141, -0.018093416467308998, -0.017633024603128433, 0.03731019049882889, 0.0007141834939830005, 0.019207565113902092, 0.00591143686324358, -0.01400513295084238, 0.0027301262598484755, 0.030349059030413628, 0.03815731033682823, 0.001460594474337995, -0.001346647390164435, -0.01776193454861641, 0.0010542982490733266, 0.08986857533454895, 0.008194982074201107, -0.0334797278046608, -0.08729037642478943, 0.03443734347820282, -0.060808610171079636, -0.009760316461324692, 0.021417448297142982, -0.03567119315266609, 0.02758670412003994, -0.04066184535622597, 0.025892460718750954, -0.0019336475525051355, -0.0008931609918363392, 0.022098829969763756, 0.005354362074285746, -0.010938920080661774, 0.01586511731147766, -0.028673231601715088, -0.0005409609293565154, 0.011463767848908901, 0.00909274723380804, 0.034621499478816986, 0.03567119315266609, -0.008839531801640987, 0.05646250769495964, -0.034952979534864426, -0.0069473194889724255, -0.057898931205272675, 0.02406930737197399, 0.00982477143406868, -0.03539495915174484, 0.03427160158753395, 0.01802896149456501, 0.014879878610372543, 0.02417980134487152, 0.008752057328820229, -0.01883925125002861, 0.028139175847172737, -0.007288009859621525, -0.046186551451683044, 0.015119282528758049, 0.03331398591399193, -0.02294595167040825, -0.05815675109624863, 0.010036551393568516, -0.026739582419395447, -0.04762297496199608, -0.027163144201040268, -0.022430311888456345, -0.009484080597758293, -0.0023387926630675793, -0.0029027732089161873, -0.0029649261850863695, -0.0015135395806282759, -0.06353413313627243, 0.01787242852151394, -0.06861686706542969, 0.03659197688102722, 0.0016010141698643565, 0.01150059886276722, 0.0033815812785178423, -0.014428693801164627, -0.011307233944535255, -0.023038029670715332, 0.0007751854718662798, -0.05200590938329697, -0.0002758037589956075, 0.002826808486133814, 0.03753117844462395, 0.0012154355645179749, -0.029870251193642616, -0.07325761765241623, 0.0038166518788784742, 0.030570046976208687, 0.0002969530178233981, -0.028028681874275208, 0.04176678881049156, 0.01640838012099266, -0.0004180937248747796, 0.027163144201040268, 0.07038477063179016, 0.04136164113879204, 0.02764195203781128, -0.020312506705522537, -0.0035289067309349775, -0.040772341191768646, -0.02845224179327488, 0.04924355819821358, -0.02127012237906456, 0.047954458743333817, -0.042613908648490906, -0.03491615131497383, 0.004069867543876171, 0.07498869299888611, -0.037549592554569244, 0.002624236047267914, -0.03963056579232216, 0.016003236174583435, -0.006896676030009985, 0.00017566842143423855, -0.006026534829288721, -0.11159908771514893, 0.03259577229619026, -0.02775244601070881, 0.023719409480690956, -0.05322134494781494, -0.002840620232746005, 0.001807039720006287, 0.00711306044831872, -0.03421635553240776, -0.04176678881049156, 0.024087723344564438, 0.00790953915566206, 0.0755779966711998, -0.006565193645656109, 0.022098829969763756, -0.005994307342916727, -0.02769719995558262, 0.022282985970377922, -0.018424898386001587, 0.021251706406474113, -0.037752166390419006, -0.02370099350810051, -0.0044266716577112675, -0.021030718460679054, 0.044123996049165726, -0.000688861939124763, -0.008259437046945095, 0.00554772699251771, -0.03458466753363609, -0.04475012794137001, -0.015938781201839447, 0.06121375784277916, 0.08066072314977646, -0.02789977192878723, -0.029115207493305206, -0.011666339822113514, 0.02149111218750477, -0.009861602447926998, 0.005552330985665321, 0.011657132767140865, 0.03666564077138901, -0.0041458322666585445, 0.01571779139339924, 0.022430311888456345, 0.009861602447926998, 0.013314544223248959, 0.020202012732625008, 0.02336951158940792, 0.027770861983299255, 0.023608915507793427, -0.02629760652780533, -0.04567091166973114, -0.035008229315280914, -0.028636399656534195, 0.026739582419395447, -0.030459553003311157, 0.05974050238728523, -0.002311169169843197, -0.0631658211350441, -0.006542174145579338, -0.08596444875001907, 0.07498869299888611, -0.0077622137032449245, 0.024695441126823425, -0.0383414700627327, 0.025726720690727234, -0.05974050238728523, -0.03312982618808746, -0.013038309291005135, 0.049427714198827744, -0.013563156127929688, 0.06887468695640564, 0.06754875183105469, 0.03309299796819687, -0.03999888151884079, -0.012172771617770195, 0.06217137351632118, -0.040183037519454956, 0.056388843804597855, 0.00968665350228548, -0.03318507596850395, 0.015634922310709953, -0.02629760652780533, -0.01411562692373991, 0.015432349406182766, -0.021620020270347595, 0.026095034554600716, -0.024713857099413872, -0.05550489202141762, 0.004760456271469593, 0.03449258953332901, -0.03033064305782318, 0.015349478460848331, -0.02440079115331173, 0.018526185303926468, -0.027660368010401726, 0.013130387291312218, -0.001793227856978774, -0.013204050250351429, -0.03125142678618431, -0.03837829828262329, 0.03325873613357544, -0.05742012336850166, -0.02467702515423298, 0.000990418833680451, 0.017835596576333046, -0.039004433900117874, -0.051306113600730896, 0.0051195621490478516, -0.012126732617616653, -0.02465861104428768, 0.006846033036708832, 0.03469516336917877, 0.0031974243465811014, 0.013342168182134628, -0.008623147383332253, -0.009898433461785316, 0.013194842264056206, -0.006509946659207344, 0.035229217261075974, 0.01443790178745985, -0.031048854812979698, 0.014824631623923779, -0.01787242852151394, -0.008752057328820229, 0.012642371468245983, -0.014474732801318169, -0.020367754623293877, 0.009511704556643963, -0.02775244601070881, 0.03044113703072071, -0.06327631324529648, -0.002060255501419306, -0.08427020162343979, 0.02602137066423893, 0.010045759379863739, -0.007380088325589895, -0.007472166791558266, -0.026813246309757233, 0.02045983262360096, 0.03386645391583443, -0.01382097601890564, 0.017881635576486588, -0.060587622225284576, -0.034952979534864426, -0.020367754623293877, -0.00029724076739512384, -0.026371268555521965, -0.012172771617770195, 0.053736984729766846, 0.003399997018277645, 0.03325873613357544, 0.00008207930659409612, -0.055136580020189285, 0.06375512480735779, 0.036407820880413055, -0.013111972250044346, 0.0045716953463852406, -0.08839531987905502, -0.08139735460281372, 0.02370099350810051, 0.033056166023015976, 0.04522893577814102, 0.01171237975358963, -0.018912915140390396, 0.0334797278046608, 0.03519238531589508, -0.001195868942886591, -0.04530259966850281, -0.042024604976177216, 0.03443734347820282, 0.02235664799809456, 0.03434526175260544, -0.06681212782859802, -0.030367475003004074, -0.032743100076913834, -0.02521108090877533, -0.010570606216788292, 0.025137418881058693, 0.02440079115331173, 0.03602109104394913, -0.03823097422719002, -0.00047305304906331003, -0.06338680535554886, -0.022209323942661285, 0.0007780629675835371, -0.026573842391371727, -0.01548759639263153, -0.007403107825666666, -0.006730935070663691, -0.06062445417046547, -0.04349786043167114, 0.0539948046207428, 0.0063994526863098145, -0.01889449916779995, 0.04224559664726257, -0.044271320104599, 0.005777922924607992, 0.0253768227994442, 0.013867015019059181, 0.013461870141327381, 0.034787241369485855, 0.00021940568694844842, 0.03211696445941925, -0.04044085741043091, -0.01883925125002861, -0.03766008839011192, 0.03421635553240776, 0.009787939488887787, -0.029980745166540146, 0.009815563447773457, -0.04106698930263519, 0.05266887694597244, -0.04581823945045471, 0.035542283207178116, 0.014824631623923779, -0.017504114657640457, 0.011813665740191936, -0.0007596472278237343, 0.05259521305561066, 0.043424200266599655, -0.04066184535622597, -0.04335053637623787, -0.008816512301564217, 0.05679399147629738, 0.036573562771081924, -0.0426507405936718, -0.013839391991496086, 0.00947487261146307, -0.021712100133299828, -0.05955634266138077, -0.010754763148725033, -0.0647495687007904, 0.0035749459639191628, -0.012697618454694748, -0.002190316328778863, 0.01116911694407463, 0.018968161195516586, -0.0734417736530304, -0.0066342526115477085, 0.011832081712782383, 0.0458919033408165, -0.05053265765309334, 0.03985155373811722, -0.011859704740345478, 0.014069587923586369, 0.055136580020189285, 0.005874605383723974, 0.058046258985996246, 0.010395657271146774, 0.0213253702968359, 0.008917798288166523, 0.08338624984025955, 0.0083699319511652, 0.01368285808712244, 0.03602109104394913, -0.02445603720843792, 0.0218594241887331, -0.019833698868751526, 0.07498869299888611, -0.06706994771957397, -0.018121039494872093, 0.02504533901810646, -0.027789277955889702, 0.06706994771957397, -0.03440051153302193, -0.006298166234046221, 0.004792683757841587, 0.006846033036708832, -0.020165180787444115, -0.005110354162752628, 0.0027163145132362843, -0.035063475370407104, -0.018378859385848045, 0.03465833142399788, -0.036573562771081924, 0.01414325088262558, 0.031177764758467674, -0.0015561259351670742, 0.008291664533317089, -0.004622338339686394, -0.030791034922003746 ]
717,781
pytorch_optimizer.optimizer.ranger21
warm_up_dampening
null
def warm_up_dampening(self, lr: float, step: int) -> float: if step > self.num_warm_up_iterations: return lr warm_up_current_pct: float = min(1.0, (step / self.num_warm_up_iterations)) self.current_lr = lr * warm_up_current_pct return self.current_lr
(self, lr: float, step: int) -> float
[ -0.06577016413211823, -0.01425799448043108, -0.04890510067343712, 0.04876125976443291, -0.019220422953367233, 0.006324400193989277, 0.03173437342047691, -0.08508048951625824, -0.0718473419547081, 0.036624886095523834, -0.03155457600951195, -0.0035262913443148136, 0.06350471079349518, 0.09061827510595322, 0.01621779426932335, 0.043079640716314316, 0.031932152807712555, 0.04254024475812912, 0.007852684706449509, -0.0038431857246905565, 0.06321703642606735, 0.026718007400631905, -0.004877025261521339, 0.061023496091365814, -0.05811076611280441, 0.015624459832906723, 0.008801120333373547, -0.004872530233114958, -0.05224934592843056, 0.014860318042337894, 0.00254863896407187, 0.0039510647766292095, 0.029702655971050262, -0.05019964650273323, 0.03173437342047691, -0.04843762516975403, -0.0009074188419617712, -0.02225901186466217, -0.07310593128204346, -0.05142227187752724, 0.0011293571442365646, 0.02376931719481945, 0.00703909806907177, 0.003613943001255393, 0.012630820274353027, 0.008634806610643864, -0.027131542563438416, -0.016927996650338173, 0.07224290072917938, -0.008104401640594006, 0.015363752841949463, 0.01201950665563345, 0.005722076632082462, 0.016748199239373207, 0.04858146235346794, 0.009502332657575607, 0.024254770949482918, -0.06940209120512009, 0.014950216747820377, -0.0029531847685575485, 0.03515053912997246, -0.06073581799864769, 0.01652345061302185, 0.034125689417123795, 0.028839625418186188, -0.027670936658978462, -0.023337801918387413, -0.0003913419204764068, -0.022546689957380295, 0.003984776791185141, -0.0025059368927031755, -0.029361039400100708, -0.01048223301768303, 0.011561021208763123, -0.023122042417526245, 0.008477482944726944, -0.02835416980087757, -0.08428937941789627, 0.015183954499661922, -0.004616317804902792, 0.06807158142328262, 0.018591130152344704, -0.013269104063510895, -0.027563057839870453, -0.023427700623869896, -0.030799424275755882, -0.04588449001312256, -0.08026190102100372, -0.012010517530143261, 0.011228394694626331, -0.0015181706985458732, 0.020191334187984467, 0.040059030055999756, 0.016307692974805832, 0.06825137883424759, 0.028426088392734528, -0.09701908379793167, 0.015103045850992203, -0.023913154378533363, 0.015669409185647964, 0.0493006557226181, 0.055126115679740906, 0.0028745231684297323, 0.018860826268792152, 0.06170672923326492, -0.020083455368876457, 0.0013158977963030338, -0.014141125604510307, 0.01601102575659752, -0.045129336416721344, 0.00039696061867289245, -0.012415062636137009, -0.07465219497680664, 0.027329320088028908, -0.04599237069487572, 0.007992028258740902, 0.016559410840272903, 0.006634552031755447, 0.05239318311214447, 0.04811398684978485, 0.000020736486476380378, -0.030116191133856773, -0.036265287548303604, -0.037865493446588516, -0.017170723527669907, -0.03608549013733864, 0.061023496091365814, 0.059980664402246475, -0.006728946231305599, -0.023337801918387413, -0.001172059215605259, 0.00566813675686717, -0.05602510645985603, -0.06569825112819672, 0.03800933063030243, -0.03836892545223236, 0.023265881463885307, 0.04890510067343712, 0.060340262949466705, 0.04383479058742523, -0.029792554676532745, 0.03342447802424431, 0.06584208458662033, 0.0017519083339720964, 0.05552167072892189, 0.02966669574379921, -0.0184023417532444, 0.12916699051856995, 0.03024205006659031, 0.03633720800280571, -0.019849717617034912, 0.01907658390700817, 0.05832652375102043, -0.003182427491992712, 0.03295700252056122, 0.017665168270468712, -0.006818845402449369, 0.015264864079654217, -0.042144689708948135, -0.05289661884307861, 0.0016496480675414205, -0.05469460040330887, -0.005290560889989138, -0.02986447513103485, 0.02137800119817257, 0.001963171176612377, -0.012010517530143261, 0.058937836438417435, -0.022708507254719734, 0.0008377470658160746, 0.0348089225590229, -0.07493986934423447, 0.0602683424949646, 0.025099823251366615, 0.015399712137877941, 0.08608736097812653, 0.008023492991924286, 0.004670257214456797, -0.011057586409151554, 0.01642456278204918, 0.031141040846705437, 0.027958614751696587, 0.02080264687538147, -0.11406395584344864, -0.019993554800748825, -0.020317191258072853, -0.053615812212228775, 0.015570520423352718, -0.012882538139820099, 0.02774285525083542, 0.04192893207073212, -0.04973217099905014, 0.010293444618582726, -0.022510729730129242, -0.016559410840272903, 0.009807989932596684, 0.0312848798930645, -0.0007023365469649434, 0.1101803109049797, 0.013574761338531971, -0.013637690804898739, 0.04045458510518074, -0.0001290894579142332, 0.009502332657575607, -0.014087186194956303, 0.0031284880824387074, -0.049084898084402084, 0.023391740396618843, 0.005978288594633341, 0.025063863024115562, 0.013538801111280918, -0.014950216747820377, 0.048869140446186066, 0.0035262913443148136, -0.0062479861080646515, -0.041317615658044815, -0.029325079172849655, 0.013170215301215649, 0.0509907566010952, -0.006782885640859604, -0.015570520423352718, -0.08414553850889206, -0.004427529871463776, -0.015813248232007027, 0.03283114358782768, -0.02272648736834526, -0.008410058915615082, -0.0730699747800827, -0.02878568507730961, 0.013529811054468155, -0.026394369080662727, -0.034790944308042526, 0.024326691403985023, -0.01034738402813673, 0.061958447098731995, 0.04185701161623001, -0.042144689708948135, 0.04160529375076294, -0.02815639227628708, -0.012819608673453331, -0.0440865084528923, -0.005065813194960356, 0.004935459699481726, 0.04998388886451721, -0.013529811054468155, 0.0163706224411726, 0.04592045024037361, -0.03718226030468941, -0.008747180923819542, 0.03200407326221466, -0.009807989932596684, -0.013934357091784477, -0.01574132964015007, 0.0371103398501873, -0.006072682794183493, 0.021342040970921516, 0.03434144705533981, 0.03471902385354042, -0.033550336956977844, -0.0002668878878466785, 0.000577039725612849, -0.04426630586385727, -0.016721228137612343, 0.002341870917007327, -0.09169705957174301, 0.029325079172849655, 0.003009371692314744, -0.002532906597480178, 0.0010995781049132347, 0.007915614172816277, 0.10802273452281952, 0.003040836425498128, -0.035420238971710205, -0.01735052280128002, -0.008356119506061077, 0.04113781824707985, -0.010563141666352749, 0.00703909806907177, -0.009133746847510338, -0.011345263570547104, 0.0660938024520874, -0.0729980543255806, -0.0014440040104091167, 0.016181834042072296, -0.05980086699128151, -0.0035262913443148136, 0.007951573468744755, 0.040850140154361725, 0.02143194153904915, -0.004993893671780825, 0.017188703641295433, 0.009169706143438816, 0.06390026956796646, 0.004634297452867031, 0.07860775291919708, 0.038404885679483414, 0.018627088516950607, -0.03507862240076065, 0.01136324368417263, 0.0614190511405468, 0.0070615727454423904, -0.0509907566010952, -0.024110933765769005, 0.060807738453149796, 0.016550419852137566, 0.0006978416349738836, -0.012154355645179749, -0.014015266671776772, -0.008122381754219532, -0.016100924462080002, -0.07788856327533722, 0.022402850911021233, 0.010320414789021015, 0.013718599453568459, -0.009475363418459892, -0.08831685781478882, -0.05710389465093613, -0.02612467296421528, -0.004072428215295076, 0.0005438894149847329, -0.011704860255122185, 0.012433042749762535, 0.017422441393136978, 0.03660690411925316, -0.05631278455257416, -0.06997744739055634, 0.06483521312475204, 0.05242914333939552, -0.026052752509713173, -0.06224612146615982, -0.0597289502620697, -0.08249139785766602, 0.009286575019359589, 0.008225766010582447, -0.003436392406001687, -0.01361072063446045, 0.0330469012260437, -0.006850309669971466, 0.019741838797926903, 0.025944873690605164, 0.057895008474588394, 0.04397863149642944, -0.011426173150539398, 0.018591130152344704, 0.0729980543255806, -0.004980409052222967, 0.05875803902745247, 0.01165092084556818, 0.040993981063365936, -0.0350426621735096, -0.04484166204929352, -0.0741487592458725, -0.05307641625404358, 0.037937410175800323, 0.03669680282473564, 0.015966076403856277, -0.042144689708948135, -0.03908811882138252, 0.054299045354127884, -0.07731320708990097, -0.033855993300676346, 0.0001581661927048117, -0.014797388575971127, 0.09766636043787003, 0.04268408194184303, 0.010805869475007057, -0.07109219580888748, -0.03202205151319504, -0.037254177033901215, 0.03229174762964249, -0.03549215570092201, -0.019849717617034912, 0.00564566208049655, -0.003890382591634989, -0.008455008268356323, 0.0021519591100513935, -0.01850123144686222, 0.021306082606315613, 0.013430922292172909, 0.03930387645959854, 0.009897888638079166, 0.02101840451359749, -0.02736528031527996, 0.02069476805627346, 0.08831685781478882, -0.0037173270247876644, -0.006068187765777111, -0.047214996069669724, 0.019202442839741707, -0.0637204647064209, 0.031824275851249695, 0.02774285525083542, -0.02330184169113636, 0.019508101046085358, -0.05688813701272011, 0.027329320088028908, -0.02340972051024437, -0.008917988277971745, -0.018429310992360115, 0.0006023238529451191, 0.00560520775616169, -0.015939107164740562, -0.003092528320848942, 0.011920617893338203, -0.027616998180747032, -0.03682266175746918, -0.00035959630622528493, 0.05019964650273323, -0.02398507483303547, 0.03905215859413147, -0.033963873982429504, -0.015372742898762226, -0.018968705087900162, 0.016757188364863396, 0.0117318294942379, -0.05458671972155571, -0.00039752249722369015, -0.03696650266647339, 0.0042589688673615456, 0.030511748045682907, 0.01788092777132988, -0.017943857237696648, 0.026340430602431297, 0.023104064166545868, -0.0065940977074205875, -0.028551947325468063, 0.003092528320848942, -0.017871936783194542, -0.042000848799943924, 0.008769655600190163, 0.00348583678714931, -0.010176575742661953, -0.023373760282993317, -0.012504962272942066, 0.00997879821807146, 0.027401238679885864, 0.011974557302892208, 0.03754185512661934, 0.025675177574157715, -0.04728691652417183, -0.018752947449684143, -0.044913578778505325, 0.010122636333107948, -0.008374099619686604, -0.0023935630451887846, -0.011579001322388649, -0.01850123144686222, -0.03612145036458969, -0.03822508826851845, 0.007735815830528736, -0.008679755963385105, 0.00008182221063179895, -0.02168365754187107, 0.013979307375848293, 0.022978205233812332, -0.012585870921611786, -0.04257620498538017, -0.005452379118651152, 0.009915868751704693, 0.020784666761755943, 0.0234636589884758, 0.033909931778907776, 0.00502985343337059, 0.035941652953624725, 0.006486218422651291, 0.04743075370788574, 0.030313970521092415, 0.02173759788274765, -0.01222627516835928, -0.015058095566928387, -0.0026789926923811436, 0.023337801918387413, 0.06742431223392487, -0.02215113304555416, 0.02299618534743786, -0.030044272541999817, -0.0736093670129776, -0.002242982154712081, 0.05573742836713791, -0.005416419357061386, -0.018645068630576134, -0.046999238431453705, 0.058470360934734344, 0.009924858808517456, 0.012397083453834057, 0.002404800383374095, -0.0776728019118309, 0.02127012237906456, 0.026682047173380852, 0.03018811158835888, -0.01814163476228714, -0.030943263322114944, 0.01992163620889187, -0.02308608405292034, -0.07227885723114014, -0.042827922850847244, 0.04822186753153801, 0.0028745231684297323, 0.06321703642606735, 0.01584920845925808, 0.019741838797926903, -0.05224934592843056, -0.012963447719812393, 0.02991841360926628, -0.004728691652417183, 0.018752947449684143, -0.0498400516808033, 0.004337630700320005, -0.03346043825149536, 0.020658807829022408, 0.06228208169341087, -0.011929607950150967, -0.05019964650273323, 0.0074076843447983265, 0.022960225120186806, -0.050595201551914215, -0.019615979865193367, 0.07281825691461563, 0.033388517796993256, -0.045488934963941574, -0.026106692850589752, -0.02204325422644615, 0.02110830321907997, -0.031159020960330963, -0.002959927311167121, 0.025783056393265724, -0.0029239675495773554, 0.002517174230888486, -0.016595371067523956, 0.01777304895222187, 0.01092273835092783, -0.0021025147289037704, 0.026052752509713173, 0.035420238971710205, 0.056492581963539124, 0.05519803613424301, -0.05239318311214447, -0.06512289494276047, -0.006014248356223106, -0.02763497643172741, 0.015183954499661922, -0.045021459460258484, 0.04915681853890419, -0.002964422106742859, -0.051997628062963486, 0.01584021747112274, -0.09629989415407181, 0.08558392524719238, -0.03477296233177185, 0.010032737627625465, -0.03890832141041756, 0.02038911171257496, -0.04124569892883301, 0.013511831872165203, 0.02945093810558319, 0.03180629387497902, 0.005483843851834536, 0.04761055111885071, 0.04534509405493736, 0.027023663744330406, -0.0475386343896389, -0.040634382516145706, 0.05947723239660263, -0.0324355885386467, 0.02774285525083542, -0.0272214412689209, -0.02612467296421528, 0.01745840162038803, -0.07163158804178238, -0.04610024765133858, -0.002861038316041231, 0.049660250544548035, -0.001983398338779807, -0.010823849588632584, -0.07152371108531952, -0.02481214515864849, 0.03779357299208641, -0.01804274506866932, 0.026735985651612282, -0.027958614751696587, -0.0076009673066437244, -0.011192435398697853, 0.003009371692314744, -0.007565007545053959, -0.00754702789708972, -0.017656179144978523, -0.05483843758702278, 0.031212961301207542, -0.02928912080824375, -0.001051819184795022, -0.04509337991476059, -0.023679418489336967, -0.0660218819975853, -0.05613298714160919, 0.014042235910892487, -0.029630737379193306, -0.03905215859413147, -0.01078788936138153, 0.04879721999168396, 0.027023663744330406, 0.004205029457807541, -0.019310321658849716, 0.007965058088302612, 0.005587227642536163, 0.021467899903655052, -0.013260114006698132, -0.006985158659517765, -0.009700111113488674, -0.003182427491992712, -0.02653820812702179, 0.022061234340071678, 0.026915784925222397, 0.034323468804359436, -0.00016547049744985998, -0.014042235910892487, -0.022079214453697205, 0.02909134142100811, -0.1009027287364006, 0.03416164964437485, -0.02617861144244671, 0.012145365588366985, -0.02700568363070488, 0.0027778814546763897, 0.003391442820429802, 0.00400275643914938, -0.026753965765237808, 0.041461456567049026, -0.03707437962293625, -0.0058704097755253315, -0.11614961177110672, -0.03373013436794281, 0.0024744721595197916, 0.024830125272274017, -0.0834263488650322, 0.002807098673656583, 0.060088545083999634, -0.01407819613814354, 0.009214655496180058, -0.01052718237042427, -0.07911118865013123, 0.06577016413211823, 0.06756814569234848, -0.021449919790029526, -0.007290815468877554, -0.05900975689291954, -0.03466508537530899, -0.03847680613398552, 0.01405122596770525, 0.013359003700315952, 0.04207276925444603, -0.008221270516514778, 0.005587227642536163, 0.031824275851249695, 0.0469273179769516, -0.01803375594317913, -0.03466508537530899, 0.018806887790560722, 0.031212961301207542, 0.047574594616889954, -0.08522433042526245, -0.038332968950271606, -0.00847298838198185, 0.01313425600528717, -0.013673650100827217, 0.02272648736834526, 0.04858146235346794, 0.011021627113223076, -0.02278042770922184, -0.011884658597409725, -0.05915359407663345, -0.05875803902745247, 0.012460012920200825, -0.016352642327547073, 0.002242982154712081, -0.001345115015283227, -0.01637961156666279, -0.020245272666215897, -0.039699435234069824, 0.0052501060999929905, -0.02429073117673397, -0.0157952681183815, -0.0018496735719963908, -0.027616998180747032, 0.005632177460938692, 0.02475820668041706, 0.030457807704806328, -0.004827580414712429, 0.013952337205410004, -0.0011686880607157946, 0.04782630875706673, -0.040993981063365936, -0.021701637655496597, -0.04311559721827507, 0.045381054282188416, 0.01313425600528717, -0.04775439202785492, 0.008194301277399063, -0.03811721131205559, 0.048042070120573044, -0.0527527816593647, 0.03430549055337906, 0.022133152931928635, -0.005173692014068365, -0.04797014966607094, 0.010653041303157806, 0.07285421341657639, 0.06904249638319016, -0.010158595629036427, -0.03916003927588463, 0.034377407282590866, 0.02357153780758381, 0.02903740294277668, -0.03908811882138252, -0.011345263570547104, 0.04203680902719498, -0.02143194153904915, -0.04254024475812912, -0.028444068506360054, -0.025297600775957108, 0.02794063463807106, -0.02470426633954048, -0.0018361887196078897, 0.008144856430590153, -0.01783597655594349, -0.06904249638319016, -0.0074076843447983265, 0.030871344730257988, 0.028498008847236633, -0.030260030180215836, 0.02486608549952507, -0.012127385474741459, 0.03346043825149536, 0.011668900959193707, 0.008230260573327541, 0.06537461280822754, 0.02783275581896305, 0.018069714307785034, 0.02601679414510727, 0.06764006614685059, -0.0025059368927031755, 0.025836994871497154, 0.04505741968750954, 0.005726571194827557, -0.009754050523042679, -0.0062974304892122746, 0.04333135485649109, -0.008684251457452774, -0.03944771736860275, 0.013538801111280918, -0.022978205233812332, 0.07152371108531952, 0.011587991379201412, -0.013781528919935226, 0.00646374374628067, 0.044446103274822235, -0.061598848551511765, 0.02033517137169838, -0.017422441393136978, -0.012316173873841763, -0.008648291230201721, 0.016064966097474098, -0.041461456567049026, 0.0428638830780983, 0.030529728159308434, 0.020712748169898987, 0.023913154378533363, 0.01891476660966873, -0.022079214453697205 ]
717,784
pytorch_optimizer.optimizer.rotograd
RotoGrad
Implementation of RotoGrad as described in the original paper. :param backbone: nn.Module. shared module. :param heads: List[nn.Module]. task-specific modules. :param latent_size: int. size of the shared representation, size of the output of the backbone.z. :param burn_in_period: int. When back-propagating towards the shared parameters, *each task loss is normalized dividing by its initial value*, :math:`{L_k(t)}/{L_k(t_0 = 0)}`. This parameter sets a number of iterations after which the denominator will be replaced by the value of the loss at that iteration, that is, :math:`t_0 = burn\_in\_period`. This is done to overcome problems with losses quickly changing in the first iterations. :param normalize_losses: bool. Whether to use this normalized losses to back-propagate through the task-specific parameters as well.
class RotoGrad(RotateOnly): r"""Implementation of RotoGrad as described in the original paper. :param backbone: nn.Module. shared module. :param heads: List[nn.Module]. task-specific modules. :param latent_size: int. size of the shared representation, size of the output of the backbone.z. :param burn_in_period: int. When back-propagating towards the shared parameters, *each task loss is normalized dividing by its initial value*, :math:`{L_k(t)}/{L_k(t_0 = 0)}`. This parameter sets a number of iterations after which the denominator will be replaced by the value of the loss at that iteration, that is, :math:`t_0 = burn\_in\_period`. This is done to overcome problems with losses quickly changing in the first iterations. :param normalize_losses: bool. Whether to use this normalized losses to back-propagate through the task-specific parameters as well. """ num_tasks: int backbone: nn.Module heads: Sequence[nn.Module] rep: torch.Tensor def __init__( self, backbone: nn.Module, heads: Sequence[nn.Module], latent_size: int, *args, burn_in_period: int = 20, normalize_losses: bool = False, ): super().__init__(backbone, heads, latent_size, burn_in_period, *args, normalize_losses=normalize_losses) self.initial_grads = None self.counter: int = 0 def _rep_grad(self): super()._rep_grad() grad_norms = [torch.linalg.norm(g, keepdim=True).clamp_min(1e-15) for g in self.original_grads] if self.initial_grads is None or self.counter == self.burn_in_period: self.initial_grads = grad_norms conv_ratios = [torch.ones((1,)) for _ in range(len(self.initial_grads))] else: conv_ratios = [x / y for x, y, in zip(grad_norms, self.initial_grads)] self.counter += 1 alphas = [x / torch.clamp(sum(conv_ratios), 1e-15) for x in conv_ratios] weighted_sum_norms = sum(a * g for a, g in zip(alphas, grad_norms)) return sum(g / n * weighted_sum_norms for g, n in zip(self.original_grads, grad_norms))
(backbone: torch.nn.modules.module.Module, heads: Sequence[torch.nn.modules.module.Module], latent_size: int, *args, burn_in_period: int = 20, normalize_losses: bool = False)
[ -0.05647706612944603, -0.06233394518494606, -0.004599458072334528, 0.04712126776576042, 0.016486739739775658, -0.009469891898334026, -0.06187756359577179, -0.013482235372066498, 0.018749624490737915, -0.049441199749708176, 0.03462785854935646, 0.037746455520391464, 0.06438765674829483, 0.06069858372211456, -0.03367706388235092, 0.04617047682404518, 0.024169141426682472, 0.04552393779158592, 0.033296748995780945, 0.0098977480083704, 0.009674311615526676, -0.05811242759227753, -0.007012093439698219, 0.04316597059369087, -0.08617981523275375, -0.00964103452861309, 0.0038079232908785343, -0.022039366886019707, -0.016762468963861465, 0.03147122636437416, -0.022838031873106956, -0.07092911005020142, -0.000675656832754612, 0.017817849293351173, 0.05548823997378349, -0.06815279275178909, -0.008937448263168335, 0.06891342997550964, -0.07971443235874176, -0.0221724770963192, 0.010373144410550594, -0.057960301637649536, 0.008908924646675587, -0.04050375521183014, -0.0174185149371624, -0.01335863210260868, -0.0008301605703309178, 0.04841434583067894, -0.013254045508801937, -0.02707856521010399, 0.04480133578181267, -0.07674795389175415, -0.010858048684895039, 0.025671392679214478, 0.0009876355761662126, 0.08093143999576569, 0.04620850831270218, 0.03342985734343529, 0.025253044441342354, -0.011998998932540417, 0.059557631611824036, -0.08328940719366074, 0.04506755620241165, 0.011200333945453167, 0.023370476439595222, 0.029531609266996384, -0.03352493792772293, -0.0158211849629879, 0.024340283125638962, -0.015697581693530083, 0.011922935955226421, -0.010544287040829659, 0.028447706252336502, -0.003988573793321848, 0.0221724770963192, -0.012769141234457493, -0.03226989135146141, -0.028866054490208626, -0.011808840557932854, -0.052293580025434494, 0.022857047617435455, -0.004796747118234634, -0.021792160347104073, 0.002207026816904545, 0.008267139084637165, -0.08473461121320724, -0.027325771749019623, -0.03797464445233345, -0.008913678117096424, -0.08990692347288132, -0.05708557367324829, -0.002752543892711401, 0.04700717329978943, -0.027116596698760986, 0.03888740763068199, 0.010639366693794727, -0.0633227676153183, -0.050848376005887985, -0.013292076997458935, -0.049593329429626465, -0.012303252704441547, 0.006821935065090656, -0.06583286076784134, 0.028599834069609642, 0.05351059138774872, -0.02342752367258072, -0.054803669452667236, 0.023142285645008087, 0.022381652146577835, -0.08526705950498581, -0.05605871602892876, 0.04651276022195816, -0.041226357221603394, 0.009427106007933617, -0.03053944930434227, -0.02386488765478134, 0.03651042655110359, -0.011837364174425602, 0.011133777908980846, 0.027306756004691124, 0.049289073795080185, 0.02515796571969986, -0.039781153202056885, 0.01908240281045437, -0.005272143520414829, -0.009945288300514221, 0.01171376183629036, 0.061915598809719086, -0.011656713671982288, -0.048794664442539215, -0.03670058399438858, 0.013406172394752502, -0.030881734564900398, -0.0185879897326231, 0.0395149290561676, 0.05552627146244049, -0.00347989983856678, 0.026850376278162003, -0.01722835749387741, 0.04970742389559746, -0.02390291914343834, -0.02105054259300232, 0.005414762534201145, 0.02338949218392372, 0.06134512275457382, -0.00034377086558379233, 0.040884070098400116, 0.04229124262928963, 0.04449708014726639, 0.0029022935777902603, 0.045333780348300934, 0.0261087566614151, 0.051647040992975235, 0.01772276870906353, 0.004335612989962101, 0.028599834069609642, -0.0284857377409935, 0.06214378774166107, -0.06727806478738785, 0.004449707921594381, -0.03301151096820831, -0.027820182964205742, 0.015916263684630394, -0.0043546287342906, 0.009541201405227184, -0.020765304565429688, 0.06724003702402115, 0.0004572717007249594, -0.028276564553380013, 0.03099583089351654, -0.023199332877993584, -0.09409040957689285, 0.005899666342884302, -0.006066055037081242, 0.04080800712108612, 0.07051075994968414, -0.009184653870761395, -0.0072545455768704414, -0.025728439912199974, 0.017969975247979164, 0.013976647518575191, -0.04776780679821968, 0.026546122506260872, -0.08405004441738129, -0.015241201035678387, 0.047387491911649704, 0.032345954328775406, -0.03898248448967934, 0.022020351141691208, 0.008932693861424923, 0.02515796571969986, 0.0019693286158144474, 0.011903920210897923, 0.029170308262109756, 0.03213677927851677, -0.00017188543279189616, 0.005647706333547831, -0.013786489143967628, 0.06925571709871292, 0.005305421072989702, -0.016714928671717644, -0.020651210099458694, 0.051989324390888214, 0.01694311946630478, -0.011257381178438663, -0.024872727692127228, 0.021716097369790077, 0.04620850831270218, 0.021107589825987816, 0.005010675638914108, -0.022115429863333702, 0.008347956463694572, 0.02483469620347023, 0.029664721339941025, 0.009674311615526676, -0.015783153474330902, 0.033772144466638565, 0.022723937407135963, 0.03458982706069946, 0.020346956327557564, 0.004725438077002764, -0.02671726420521736, -0.03445671498775482, -0.028238533064723015, 0.03369608148932457, -0.01573561318218708, -0.007687156088650227, -0.023693745955824852, 0.01541234366595745, -0.012084570713341236, 0.061307091265916824, -0.03272627294063568, -0.03373411297798157, 0.027896247804164886, 0.04065588116645813, -0.004102668724954128, -0.05157097801566124, 0.001549791544675827, 0.009004003368318081, 0.00007702903531026095, -0.036301251500844955, 0.0036462885327637196, -0.03310658782720566, 0.0221724770963192, 0.035654712468385696, -0.0363583005964756, 0.04487739875912666, -0.02627990022301674, -0.04632260277867317, 0.006365554872900248, -0.02626088447868824, -0.017085738480091095, -0.015459883026778698, 0.0098977480083704, -0.020442035049200058, 0.0046232277527451515, 0.03780350461602211, 0.023826856166124344, 0.0031399917788803577, -0.035502586513757706, 0.027896247804164886, -0.08800534158945084, -0.05506989359855652, -0.01249341107904911, -0.011209841817617416, 0.00640834029763937, -0.0002249218086944893, -0.00001532966962258797, -0.023142285645008087, 0.03128106892108917, 0.07404770702123642, 0.0339813195168972, -0.0742378681898117, -0.0024601751938462257, 0.019548291340470314, 0.017865387722849846, 0.010572810657322407, 0.07207006216049194, 0.032060716301202774, -0.008842368610203266, -0.005785571411252022, -0.04712126776576042, -0.009222685359418392, -0.015554962679743767, 0.004228648729622364, 0.013653378002345562, 0.00037675147177651525, 0.008609424345195293, 0.046740952879190445, 0.02705954946577549, 0.06906555593013763, -0.022248540073633194, 0.0339813195168972, -0.004784862510859966, 0.03843102604150772, 0.009080067276954651, -0.04134045168757439, 0.05335846543312073, -0.012864219956099987, -0.04662685468792915, 0.0474635548889637, -0.03865921497344971, -0.020442035049200058, -0.038811344653367996, -0.0053006671369075775, -0.009175145998597145, 0.02595663070678711, -0.018939783796668053, 0.027401834726333618, -0.008799582719802856, -0.02276196889579296, -0.03453277796506882, 0.013776981271803379, 0.021925270557403564, -0.009631526656448841, -0.057503920048475266, 0.0073733944445848465, -0.021563969552516937, 0.042975813150405884, 0.04540984332561493, -0.033620018512010574, 0.049935612827539444, -0.012978315353393555, 0.03462785854935646, -0.014214345254004002, -0.040085405111312866, 0.0045875729992985725, 0.056401003152132034, -0.06583286076784134, 0.03128106892108917, -0.04917497932910919, 0.004005212802439928, 0.0003351542982272804, 0.03477998450398445, -0.1092270240187645, 0.015212677419185638, 0.06393127888441086, 0.005676230415701866, 0.018635530024766922, -0.022020351141691208, 0.052787989377975464, -0.04985954985022545, -0.013853044249117374, 0.06609908491373062, 0.03382918983697891, -0.015393327921628952, 0.04240533709526062, 0.022666890174150467, 0.05392894148826599, -0.007891576737165451, 0.004456839058548212, 0.0584927462041378, -0.013330108486115932, 0.07321100682020187, -0.0013049624394625425, 0.030102085322141647, -0.022552793845534325, -0.007658632472157478, 0.0521794818341732, -0.041530609130859375, -0.07648173719644547, -0.0001561379322083667, -0.008267139084637165, 0.06739216297864914, 0.04841434583067894, 0.013101918622851372, -0.051647040992975235, 0.01566905714571476, 0.02167806588113308, -0.02591859921813011, 0.01949124224483967, -0.061801500618457794, -0.012845204211771488, 0.014898915775120258, -0.037594329565763474, -0.024606505408883095, -0.027801167219877243, -0.026945454999804497, 0.05004970729351044, -0.02595663070678711, 0.01994762383401394, 0.018987322226166725, -0.002341326093301177, 0.03071059286594391, -0.013872059993445873, 0.0009169203694909811, 0.05157097801566124, -0.029968975111842155, 0.05982385203242302, -0.05240767449140549, -0.008457297459244728, -0.030653545632958412, 0.05503186210989952, -0.0170096755027771, -0.11249774694442749, 0.0042048790492117405, 0.04031359404325485, 0.029341451823711395, -0.052141450345516205, -0.03917264565825462, 0.030406339094042778, -0.06507223099470139, 0.011894412338733673, 0.026317931711673737, -0.012645537964999676, -0.014223853126168251, 0.0584927462041378, 0.02133578062057495, 0.038031693547964096, 0.027953295037150383, -0.01194195169955492, 0.007839282974600792, 0.0181791502982378, 0.02373177744448185, 0.027591994032263756, -0.011428523808717728, -0.053054213523864746, -0.048490408807992935, -0.014204837381839752, 0.04556196928024292, 0.042633529752492905, 0.05176113545894623, 0.04069391265511513, 0.03765137493610382, 0.03940083459019661, 0.004143077414482832, -0.02089841477572918, -0.013843536376953125, -0.033620018512010574, 0.01510808989405632, -0.007378148380666971, -0.009569725021719933, 0.016287073493003845, -0.017732277512550354, 0.010915095917880535, -0.0031447457149624825, 0.006983569823205471, 0.04366038367152214, 0.008100750856101513, -0.013101918622851372, 0.05518398806452751, -0.003482277039438486, 0.008718765340745449, -0.06735412776470184, 0.004299958236515522, -0.020917430520057678, 0.0007386467768810689, -0.006646038498729467, -0.08306121826171875, 0.025994662195444107, 0.02196330390870571, 0.011209841817617416, 0.039020515978336334, 0.029816847294569016, -0.050201836973428726, 0.0026717265136539936, 0.0007000208715908229, -0.033296748995780945, -0.010582318529486656, -0.018920768052339554, 0.015982819721102715, 0.04156864061951637, -0.013311092741787434, 0.01249341107904911, 0.019310591742396355, -0.04366038367152214, 0.07214612513780594, -0.03449474647641182, -0.061307091265916824, -0.012360299937427044, 0.016743453219532967, -0.040579818189144135, 0.02943653054535389, -0.018055547028779984, -0.03846905753016472, 0.03493211045861244, -0.034437697380781174, 0.005680984351783991, 0.013776981271803379, -0.034437697380781174, 0.007382902316749096, -0.042633529752492905, 0.03230792284011841, 0.06925571709871292, 0.006907506380230188, 0.04700717329978943, -0.03732810541987419, 0.03592093288898468, 0.05400500446557999, 0.015326772816479206, -0.06613711267709732, -0.029835863038897514, -0.013662885874509811, 0.10162068158388138, -0.07207006216049194, 0.019643370062112808, 0.002964095212519169, -0.010620350018143654, 0.023161301389336586, -0.012968807481229305, 0.0617254376411438, -0.0029736030846834183, 0.005272143520414829, -0.019186988472938538, 0.022685905918478966, -0.02802935801446438, -0.06294245272874832, -0.00017114261572714895, -0.03997131064534187, 0.01171376183629036, 0.006047039292752743, 0.02150692231953144, 0.0076348623260855675, 0.0035417014732956886, 0.004670767579227686, -0.06461584568023682, -0.019662385806441307, 0.039781153202056885, 0.04617047682404518, -0.10093611478805542, 0.011647205799818039, 0.05332043394446373, -0.023484570905566216, 0.04191092774271965, 0.02038498781621456, 0.0474255234003067, 0.01511759776622057, -0.014280901290476322, 0.022039366886019707, 0.017389992251992226, 0.007492243777960539, 0.016344120725989342, 0.003301626304164529, 0.024606505408883095, 0.0053719766438007355, -0.032383985817432404, -0.0023092369083315134, -0.07130942493677139, 0.024150125682353973, -0.05255980044603348, -0.027934279292821884, 0.03008306957781315, -0.007687156088650227, -0.0010945997200906277, -0.009688573889434338, 0.05252176895737648, 0.02656513825058937, 0.04202502220869064, -0.054499417543411255, -0.019643370062112808, -0.06735412776470184, -0.0011112384963780642, -0.004925104323774576, 0.04514361917972565, -0.007492243777960539, 0.020442035049200058, -0.07359132915735245, -0.006883736699819565, 0.029531609266996384, 0.017608674243092537, -0.01923452876508236, -0.031071893870830536, 0.022419683635234833, -0.01884470321238041, -0.011656713671982288, 0.0474255234003067, 0.036947790533304214, -0.023446539416909218, -0.03221284598112106, 0.02388390339910984, 0.003147122683003545, -0.015868723392486572, 0.0363583005964756, 0.03824086859822273, 0.0011462990660220385, -0.013501251116394997, 0.014214345254004002, -0.02200133539736271, -0.005890158470720053, -0.07541684806346893, 0.033772144466638565, -0.05183719843626022, 0.018321767449378967, -0.055944621562957764, 0.036453377455472946, 0.018445370718836784, -0.05666722357273102, 0.08366972208023071, 0.017627689987421036, -0.00024884019512683153, -0.032041702419519424, 0.040922101587057114, -0.01509858202189207, -0.05929141119122505, 0.003368181874975562, -0.018778149038553238, -0.0427476242184639, -0.01811259426176548, 0.03352493792772293, 0.028866054490208626, -0.013795997016131878, -0.011609174311161041, 0.038697246462106705, -0.02388390339910984, -0.06689774990081787, -0.016477230936288834, -0.024340283125638962, 0.012845204211771488, 0.05408106744289398, -0.04955529794096947, -0.009603003039956093, -0.002505337819457054, 0.011799332685768604, -0.03685270994901657, -0.04160667210817337, -0.04069391265511513, -0.07480834424495697, 0.022857047617435455, 0.07290675491094589, 0.04331810027360916, -0.00937956664711237, -0.02656513825058937, -0.022229524329304695, 0.03464687243103981, -0.05016380548477173, -0.0030948291532695293, 0.028048373758792877, -0.0681147649884224, -0.006774395238608122, -0.07317297905683517, -0.008276646956801414, -0.051951292902231216, 0.05913928151130676, -0.009859716519713402, 0.03831693157553673, -0.03221284598112106, 0.04164470359683037, 0.04529574513435364, -0.03824086859822273, -0.055944621562957764, -0.028828023001551628, -0.053244370967149734, -0.025195997208356857, 0.043280068784952164, -0.032022684812545776, -0.05666722357273102, 0.023370476439595222, 0.02816246822476387, 0.0056334445253014565, 0.04632260277867317, -0.009631526656448841, 0.08891809731721878, 0.011723269708454609, -0.041188325732946396, -0.05571643263101578, 0.020917430520057678, 0.04925104230642319, 0.0038007923867553473, -0.010411175899207592, -0.021887239068746567, 0.009992827661335468, 0.002657464472576976, -0.0031732693314552307, 0.03373411297798157, 0.04529574513435364, -0.002852377016097307, -0.027572978287935257, 0.05172310397028923, 0.0181981660425663, 0.003829316236078739, -0.058758966624736786, 0.007496997714042664, -0.0490608848631382, 0.0068504586815834045, 0.042329274117946625, -0.021602001041173935, 0.0340573824942112, -0.014033694751560688, -0.036301251500844955, -0.015279232524335384, 0.022400667890906334, 0.014993995428085327, -0.036643534898757935, 0.02169708162546158, 0.02531009167432785, 0.02388390339910984, -0.0031804004684090614, 0.017057213932275772, -0.02738281898200512, -0.01573561318218708, 0.01399566326290369, 0.022704921662807465, 0.0363963320851326, 0.0056334445253014565, 0.05115262791514397, -0.03784153610467911, -0.09796964377164841, 0.02913227677345276, 0.009945288300514221, -0.1043589636683464, 0.027953295037150383, -0.035844869911670685, -0.017817849293351173, -0.0031019600573927164, -0.027097580954432487, 0.03651042655110359, -0.013643870130181313, -0.004478232003748417, -0.02342752367258072, -0.00909908302128315, 0.01806505396962166, 0.03382918983697891, 0.026983486488461494, 0.01217964943498373, 0.020613178610801697, -0.05499383062124252, 0.01777030900120735, -0.01543135941028595, -0.046740952879190445, -0.002212969120591879, -0.04046571999788284, 0.01345371175557375, 0.055754464119672775, 0.019871558994054794, 0.011476063169538975, -0.05503186210989952, 0.04655079171061516, -0.019662385806441307, -0.044230859726667404, -0.016962135210633278, 0.050239868462085724, 0.02749691531062126, 0.03613010793924332, -0.02103152684867382, 0.019814511761069298, -0.006755379494279623, 0.04179682955145836, 0.006726855877786875, -0.019329607486724854, 0.03689074143767357, -0.0284857377409935, -0.02295212633907795, -0.0490608848631382, 0.00015509799413848668, 0.017608674243092537, 0.018616514280438423, -0.02785821631550789, -0.016201501712203026, 0.04191092774271965, -0.026793327182531357, 0.07351526618003845, 0.0169906597584486, -0.01770375296473503, -0.03211776539683342, 0.06708790361881256, -0.04514361917972565, 0.03253611549735069, -0.05172310397028923, -0.04567606374621391, -0.07260250300168991, -0.0037722685374319553, -0.05506989359855652, 0.006175396032631397, 0.003952919039875269, 0.031033862382173538, 0.027953295037150383, -0.014394995756447315, 0.009175145998597145 ]
717,789
pytorch_optimizer.optimizer.rotograd
__getitem__
Get an end-to-end model for the selected task.
def __getitem__(self, item) -> nn.Module: r"""Get an end-to-end model for the selected task.""" return nn.Sequential(self.backbone, self.heads[item])
(self, item) -> torch.nn.modules.module.Module
[ 0.025125471875071526, 0.03556971624493599, -0.11082407832145691, -0.017322801053524017, 0.002260159235447645, -0.004433137364685535, -0.039266180247068405, 0.00816882960498333, 0.04362521320581436, -0.03867334872484207, -0.0055272551253438, -0.015596623532474041, -0.024898802861571312, 0.03675537556409836, 0.01940641924738884, 0.04275340586900711, 0.002074900083243847, 0.043171871453523636, -0.014611481688916683, 0.018360251560807228, -0.0040103113278746605, 0.05213404819369316, 0.0340876467525959, -0.00038277768180705607, -0.019301801919937134, -0.01853461191058159, 0.03203018009662628, -0.009380641393363476, 0.021324394270777702, -0.03658101335167885, -0.01977257803082466, -0.0426139160990715, -0.010540144518017769, 0.007597796153277159, 0.010165267623960972, 0.06210751831531525, -0.011621184647083282, 0.09171407669782639, 0.018151016905903816, 0.015430980361998081, -0.0026568311732262373, -0.05910849943757057, 0.06235162168741226, 0.02535214275121689, -0.012902740389108658, -0.007205483037978411, 0.05046017840504646, 0.003249659901484847, 0.06866350024938583, -0.013155564665794373, 0.00800754502415657, -0.0323091596364975, 0.034052774310112, -0.040242601186037064, -0.04578729346394539, 0.032623011618852615, -0.04557805880904198, 0.014463274739682674, 0.01909256912767887, 0.05227353423833847, 0.04139338806271553, -0.03372148796916008, 0.024898802861571312, 0.031245555728673935, 0.03274506330490112, 0.03098401427268982, -0.018796155229210854, 0.0008799799834378064, -0.017305364832282066, 0.03783641383051872, 0.02130695804953575, -0.02571830153465271, 0.021394139155745506, 0.018098710104823112, -0.016041245311498642, -0.060886986553668976, -0.022736720740795135, 0.02280646562576294, 0.023381859064102173, 0.03665075823664665, -0.021341830492019653, 0.05342432111501694, -0.0255439393222332, -0.014995076693594456, -0.04230006784200668, -0.06542038172483444, 0.0022024018689990044, -0.03420969843864441, -0.07005839794874191, -0.07274355739355087, -0.07138354331254959, 0.02876962535083294, -0.035360485315322876, 0.05046017840504646, 0.03286711499094963, -0.0043917265720665455, -0.011429387144744396, -0.03218710795044899, -0.07909031212329865, -0.06392087787389755, -0.02130695804953575, 0.03014707937836647, -0.05478433892130852, 0.024480335414409637, -0.016058681532740593, -0.03797590360045433, -0.04020772874355316, 0.010566298849880695, -0.03947541117668152, -0.03257070109248161, -0.042823150753974915, 0.1363505870103836, -0.06266546994447708, 0.00544443354010582, -0.037557438015937805, -0.00015719766088295728, 0.027706019580364227, -0.009380641393363476, -0.025456758216023445, 0.009345768950879574, -0.024044431746006012, 0.02332955040037632, -0.10064137727022171, 0.008072931319475174, 0.004524677526205778, -0.002839910564944148, -0.002067271852865815, -0.0272526815533638, 0.02350391075015068, -0.11717083305120468, -0.034994326531887054, -0.040870301425457, -0.02230081893503666, 0.013591468334197998, -0.021376702934503555, 0.032623011618852615, -0.01923205889761448, -0.018691537901759148, -0.054749466478824615, 0.05907363072037697, -0.02538701333105564, 0.046589355915784836, 0.02706088311970234, 0.024236228317022324, -0.011185280978679657, -0.05537716671824455, -0.016930488869547844, -0.015457134693861008, 0.010522708296775818, -0.021917223930358887, 0.0026306770741939545, 0.013173000887036324, 0.03609280288219452, 0.0374528206884861, -0.024898802861571312, 0.0578879714012146, -0.02657267078757286, 0.008133957162499428, -0.018342815339565277, -0.002717857714742422, -0.041602618992328644, -0.011708365753293037, 0.004169416148215532, 0.03902207314968109, -0.0357092060148716, -0.019702833145856857, -0.022039275616407394, -0.01888333447277546, -0.03968464583158493, 0.027217809110879898, -0.003094914136454463, 0.022858774289488792, -0.0187089741230011, -0.01755818910896778, -0.026502925902605057, 0.03255326673388481, 0.0036179982125759125, 0.016407404094934464, 0.039928752928972244, 0.0127719696611166, 0.016904333606362343, 0.01293761283159256, -0.007270868867635727, -0.047740139067173004, 0.027688583359122276, 0.029414761811494827, -0.032605573534965515, 0.043136999011039734, 0.006760861724615097, 0.01717459410429001, 0.013521723449230194, 0.008055495098233223, 0.03478509187698364, -0.025282397866249084, -0.0425790436565876, 0.017941784113645554, -0.01584944687783718, 0.037871286273002625, 0.03605793043971062, 0.009973470121622086, 0.013730957172811031, -0.033808667212724686, 0.00417377520352602, 0.105593241751194, -0.0510878786444664, 0.021498756483197212, 0.024829057976603508, 0.014873024076223373, -0.05910849943757057, -0.005767002236098051, -0.08962173759937286, 0.016773562878370285, -0.006447011139243841, 0.04787962883710861, 0.05670231580734253, -0.021882351487874985, -0.06761733442544937, 0.020696694031357765, 0.06852401793003082, -0.01972026936709881, -0.02148132026195526, -0.05516793578863144, 0.05262225866317749, 0.022562360391020775, 0.0011050151661038399, -0.043485723435878754, -0.0021816964726895094, -0.010060650296509266, -0.0048123737797141075, 0.0297983568161726, 0.032413776963949203, 0.003077477915212512, -0.009232434444129467, -0.02449777163565159, 0.054086893796920776, 0.05248276889324188, -0.04578729346394539, 0.018848463892936707, -0.048960670828819275, 0.04704269394278526, -0.024410590529441833, 0.02278902940452099, -0.022039275616407394, -0.023120315745472908, 0.003530817572027445, 0.08425141125917435, 0.08013647794723511, -0.01369608473032713, -0.07413844764232635, 0.003960182424634695, 0.02331211417913437, 0.012205295264720917, 0.012057088315486908, 0.02538701333105564, 0.003964541479945183, -0.029345016926527023, -0.02573573775589466, -0.06723374128341675, 0.01496892236173153, 0.01806383766233921, -0.029083475470542908, 0.007074712309986353, -0.007436512038111687, 0.04651961103081703, -0.010444245301187038, 0.038708221167325974, -0.047775011509656906, 0.03461072966456413, 0.025264961645007133, 0.02744447812438011, 0.09338794648647308, 0.029885537922382355, -0.007789593655616045, -0.04498523101210594, 0.03468047454953194, -0.0035787669476121664, -0.03253582864999771, 0.020347971469163895, -0.0816708579659462, -0.024794185534119606, -0.0032017105259001255, -0.01618073508143425, -0.05635359138250351, -0.014402247965335846, -0.01652073860168457, -0.0357789508998394, 0.054261256009340286, 0.049448881298303604, 0.04275340586900711, 0.013329925946891308, -0.020330535247921944, 0.0042413403280079365, 0.008439090102910995, 0.006015466991811991, 0.02706088311970234, -0.051192495971918106, -0.06542038172483444, 0.022736720740795135, 0.06402549147605896, 0.03626716136932373, 0.023713145405054092, -0.04669397324323654, -0.045717548578977585, -0.014280195347964764, -0.029676303267478943, 0.012100678868591785, 0.034994326531887054, 0.055935125797986984, -0.014942768961191177, -0.06758246570825577, 0.018639229238033295, -0.016416121274232864, 0.001519123325124383, 0.03319840133190155, -0.031908128410577774, -0.021411575376987457, -0.0340876467525959, 0.033651743084192276, 0.030077334493398666, 0.06378138810396194, -0.08787812292575836, 0.03335532918572426, 0.01251042727380991, 0.024480335414409637, 0.036336906254291534, 0.022911082953214645, 0.008565502241253853, 0.001715279882773757, -0.05122736841440201, 0.05855054408311844, 0.07553333789110184, 0.026659851893782616, 0.0044200606644153595, 0.019824886694550514, -0.08439090102910995, -0.0032823525834828615, 0.056074611842632294, 0.05565614625811577, 0.06594346463680267, -0.011595030315220356, 0.035186123102903366, -0.046763718128204346, -0.007074712309986353, 0.05248276889324188, 0.0749056413769722, -0.015056103467941284, 0.03766205534338951, 0.012615044601261616, 0.029920410364866257, -0.00355261261574924, -0.04310212656855583, 0.04397393390536308, -0.013992499560117722, 0.012492991052567959, -0.023277241736650467, 0.019476164132356644, 0.002635036129504442, -0.018935643136501312, -0.026607543230056763, -0.016302786767482758, -0.003862104145810008, -0.0031602997332811356, -0.04578729346394539, 0.029362453147768974, -0.05590025335550308, -0.01635509543120861, -0.01251042727380991, 0.04414829611778259, 0.11166101694107056, -0.026014715433120728, -0.029850665479898453, -0.029397325590252876, 0.010836558416485786, 0.07427793741226196, -0.007471384480595589, -0.028351157903671265, -0.026258820667862892, -0.015204310417175293, 0.04644986614584923, -0.04104466363787651, -0.01252786349505186, -0.019511036574840546, 0.014698662795126438, 0.007684976793825626, 0.011612466536462307, -0.0009628016268834472, 0.028874240815639496, -0.02585778944194317, -0.0031254272907972336, -0.010758096352219582, 0.02604958787560463, -0.013818138279020786, -0.017636651173233986, -0.030931705608963966, -0.07037224620580673, -0.02571830153465271, 0.03898720070719719, -0.04362521320581436, -0.040870301425457, -0.06946556270122528, 0.007833183743059635, 0.011289898306131363, 0.035133812576532364, 0.04868169128894806, 0.01473353523761034, -0.02960655838251114, 0.025979842990636826, 0.0425790436565876, 0.0001893455337267369, -0.0628747045993805, -0.005697257351130247, 0.012737097218632698, -0.10587222129106522, -0.011708365753293037, 0.00036452422500588, -0.001756690675392747, 0.03511637821793556, -0.035848695784807205, 0.026258820667862892, 0.05537716671824455, 0.038917455822229385, 0.05569101870059967, 0.04296264052391052, -0.05213404819369316, -0.014698662795126438, -0.005797515157610178, 0.028560390695929527, 0.043694958090782166, -0.010069368407130241, 0.0037574872840195894, -0.07567282766103745, -0.07176713645458221, 0.012841714546084404, -0.03387841209769249, 0.017784858122467995, -0.029345016926527023, 0.025264961645007133, -0.06573422998189926, 0.019040260463953018, 0.025927534326910973, 0.033599432557821274, 0.04184672608971596, -0.0019746425095945597, -0.021742861717939377, 0.010566298849880695, -0.053040724247694016, 0.012336065992712975, -0.020138736814260483, -0.007789593655616045, -0.0032256850972771645, -0.028682444244623184, 0.027514223009347916, 0.08948224782943726, 0.029920410364866257, 0.025160344317555428, -0.04721705615520477, 0.013390952721238136, -0.052692003548145294, 0.0016695100348442793, -0.008578578941524029, -0.04240468144416809, 0.03504663333296776, 0.02690395712852478, -0.0063859848305583, 0.040242601186037064, -0.02857782691717148, 0.01227504014968872, -0.025456758216023445, -0.06615269929170609, -0.020696694031357765, -0.043171871453523636, -0.02315518818795681, -0.007266509812325239, -0.08299601078033447, -0.016799716278910637, 0.03675537556409836, 0.031123502179980278, -0.016607919707894325, 0.05991056188941002, -0.061549559235572815, 0.005623153876513243, -0.07567282766103745, 0.00996475201100111, 0.05701616406440735, -0.03030400536954403, 0.05352893844246864, -0.000885973684489727, 0.010278602130711079, 0.01769767887890339, -0.030042462050914764, 0.029728611931204796, -0.041323643177747726, 0.011281180195510387, 0.05328483134508133, 0.008757299743592739, -0.0029663227032870054, 0.008011904545128345, 0.014628917910158634, 0.044008806347846985, -0.012745815329253674, 0.0631188154220581, 0.005004171282052994, 0.023974686861038208, -0.07371998578310013, -0.010348347015678883, 0.017104849219322205, -0.07922980189323425, -0.005575204733759165, -0.06144494190812111, -0.029885537922382355, 0.05684180185198784, -0.0008118700934574008, -0.013556595891714096, -0.0030469647608697414, -0.0009573528659529984, 0.027043446898460388, -0.025805480778217316, 0.05590025335550308, 0.08759915083646774, 0.010609888471662998, 0.054714594036340714, 0.002604522742331028, 0.01856948435306549, 0.00911038089543581, -0.017322801053524017, 0.027653710916638374, -0.05307559669017792, -0.008735504001379013, 0.020661821588873863, 0.0510530062019825, 0.019702833145856857, 0.007467025425285101, 0.031960438936948776, 0.06751272082328796, -0.00920628011226654, -0.03762718290090561, -0.0015300209634006023, 0.0035918441135436296, -0.030251696705818176, -0.012205295264720917, -0.020853618159890175, -0.0019038080936297774, 0.016477148979902267, -0.04292776808142662, 0.03933592140674591, -0.006957018282264471, -0.011935034766793251, 0.030513238161802292, -0.03630203381180763, 0.04100979119539261, -0.07392922043800354, -0.011821700260043144, -0.0007710041245445609, -0.040626198053359985, 0.038533858954906464, 0.0238177627325058, -0.05907363072037697, 0.003247480373829603, -0.011106818914413452, 0.013591468334197998, -0.020679257810115814, -0.011560157872736454, 0.020888490602374077, 0.04564780369400978, 0.04059132561087608, 0.03588356822729111, -0.004576985724270344, -0.040068238973617554, 0.03727845847606659, -0.000788440287578851, 0.012763251550495625, -0.017749985679984093, 0.017976656556129456, 0.02535214275121689, 0.03783641383051872, -0.002981579164043069, 0.012902740389108658, -0.010348347015678883, -0.03216966986656189, -0.041114408522844315, -0.008382422849535942, 0.008273446932435036, 0.01823819801211357, 0.02045258693397045, -0.001986629795283079, -0.02861269935965538, -0.02006899192929268, 0.06050339341163635, -0.011167844757437706, 0.03509894013404846, 0.020330535247921944, 0.019511036574840546, 0.0036179982125759125, 0.04359034076333046, 0.08697144687175751, -0.05042530596256256, -0.08460013568401337, -0.01046168152242899, -0.022248510271310806, 0.03129786252975464, 0.0029205528553575277, 0.024759313091635704, 0.05659769847989082, 0.002720037242397666, 0.033616870641708374, -0.015945347025990486, -0.08153137564659119, -0.05000683665275574, -0.03780154138803482, -0.046763718128204346, 0.016285350546240807, -0.006922145839780569, -0.023224933072924614, 0.01581457629799843, -0.050843771547079086, -0.059701330959796906, -0.006298804190009832, 0.038220010697841644, 0.031908128410577774, -0.010775531642138958, 0.04345085099339485, 0.007453948259353638, 0.005867259576916695, -0.0012684789253398776, -0.014742253348231316, 0.01379198394715786, 0.05516793578863144, -0.053005851805210114, 0.045054975897073746, -0.004725192673504353, -0.015762267634272575, 0.01602380909025669, -0.002720037242397666, 0.015709958970546722, 0.04073081538081169, -0.02230081893503666, 0.026468055322766304, 0.016607919707894325, 0.019284365698695183, -0.01635509543120861, -0.05767873674631119, 0.016651509329676628, -0.02057464048266411, -0.053389448672533035, 0.004374290816485882, -0.029746048152446747, -0.0035504333209246397, 0.030582983046770096, 0.025840353220701218, 0.0037596668116748333, -0.017593061551451683, 0.019458727911114693, -0.003391328500583768, -0.0023560579866170883, 0.01430634967982769, -0.011560157872736454, 0.031245555728673935, -0.03759231045842171, 0.0008527360041625798, -0.05370330065488815, -0.028141923248767853, -0.0055926404893398285, -0.004638012032955885, -0.03937079384922981, 0.04850732907652855, -0.007174970116466284, -0.03117581084370613, 0.005052120424807072, -0.05004170909523964, 0.01430634967982769, -0.023904941976070404, -0.04892579838633537, -0.06946556270122528, 0.020836181938648224, 0.008648323826491833, -0.037906158715486526, 0.00014834337343927473, -0.024462899193167686, 0.01653817482292652, -0.004468009807169437, 0.05070428550243378, -0.04550831392407417, -0.030077334493398666, 0.03818513825535774, 0.04575242102146149, 0.034052774310112, -0.015003794804215431, -0.00007301381992874667, 0.007545487955212593, -0.07392922043800354, 0.004633652977645397, 0.031960438936948776, -0.00010223296703770757, 0.022039275616407394, 0.03067016415297985, -0.014681226573884487, -0.04976273328065872, -0.03366917744278908, -0.040277473628520966, 0.006250854581594467, 0.017462290823459625, -0.027374733239412308, -0.001616111840121448, -0.046380121260881424, 0.02332955040037632, 0.02521265298128128, -0.049448881298303604, -0.011551439762115479, -0.0698840320110321, -0.03982413560152054, 0.011595030315220356, 0.023591091856360435, 0.020470023155212402, 0.03553484380245209, 0.04020772874355316, -0.013216591440141201, -0.010304756462574005, 0.02999015338718891, -0.061200838536024094, 0.02092336304485798, -0.011656057089567184, -0.06392087787389755, 0.06043364852666855, 0.01806383766233921, 0.03290198743343353, -0.028734752908349037, -0.029188090935349464, 0.011839136481285095, -0.018604356795549393, 0.06496704369783401, -0.004330700263381004, -0.026119330897927284, -0.016206888481974602, -0.022248510271310806, 0.031245555728673935, -0.027828073129057884, 0.03162915259599686, 0.026136767119169235, -0.028159359470009804, -0.012004779651761055, -0.006499319802969694, -0.008190625347197056, -0.009633464738726616, -0.022039275616407394, 0.01602380909025669, 0.0064121391624212265, -0.02502085454761982, -0.00236477586440742, 0.019005388021469116, -0.04644986614584923, 0.08194983750581741, 0.05248276889324188, 0.02416648529469967, 0.023608528077602386, 0.07075583934783936, -0.035360485315322876, 0.05820182338356972, 0.02216132916510105, -0.007711131125688553, -0.05555152893066406, -0.022754156962037086, -0.0032169672194868326, 0.05851567164063454, 0.015631496906280518, -0.04338110610842705, 0.0005819310317747295, 0.02810705080628395, 0.015561751089990139 ]
717,791
pytorch_optimizer.optimizer.rotograd
__init__
null
def __init__( self, backbone: nn.Module, heads: Sequence[nn.Module], latent_size: int, *args, burn_in_period: int = 20, normalize_losses: bool = False, ): super().__init__(backbone, heads, latent_size, burn_in_period, *args, normalize_losses=normalize_losses) self.initial_grads = None self.counter: int = 0
(self, backbone: torch.nn.modules.module.Module, heads: Sequence[torch.nn.modules.module.Module], latent_size: int, *args, burn_in_period: int = 20, normalize_losses: bool = False)
[ -0.07773914933204651, -0.025894954800605774, -0.047664087265729904, 0.020882444456219673, -0.035377103835344315, 0.05019748583436012, -0.08396407216787338, 0.004155226517468691, -0.013019859790802002, -0.028989320620894432, -0.0370057187974453, 0.03362182155251503, -0.006333496887236834, 0.05515570938587189, -0.03219226002693176, 0.02638353779911995, 0.0781734511256218, 0.032843705266714096, -0.033115141093730927, -0.019199542701244354, -0.0015867671463638544, 0.038869574666023254, -0.0021375552751123905, 0.0864974707365036, -0.05801483243703842, 0.003743549110367894, -0.016087081283330917, -0.003969745244830847, -0.008509505540132523, 0.03539520129561424, -0.008373787626624107, -0.0315227173268795, -0.00091609510127455, 0.03282561153173447, 0.05019748583436012, -0.04335730895400047, 0.004580475389957428, 0.06992180645465851, -0.10401411354541779, 0.020574817433953285, 0.07053706049919128, -0.0952557921409607, 0.05233278125524521, 0.02792167291045189, -0.006301829591393471, -0.004994414746761322, 0.05178990960121155, -0.0018299282528460026, -0.005374424625188112, -0.020158616825938225, -0.03401992470026016, -0.028500735759735107, 0.034508511424064636, -0.006206826772540808, -0.03611902892589569, 0.07564005255699158, 0.04744694009423256, 0.06604932248592377, 0.015851838514208794, 0.015435636974871159, -0.0029066225979477167, -0.01912716031074524, 0.02499016933143139, -0.016973771154880524, 0.020828157663345337, -0.0033838970120996237, -0.08512219786643982, 0.008120447397232056, 0.01214221864938736, -0.017290446907281876, 0.04552879557013512, 0.01790570095181465, 0.013065099716186523, 0.07716009020805359, 0.008437123149633408, -0.01415988989174366, -0.030654124915599823, -0.024212053045630455, -0.01514610555022955, -0.007197566796094179, 0.03351324796676636, 0.025496849790215492, -0.06264733523130417, 0.0008810346480458975, -0.014322751201689243, -0.09178141504526138, -0.013164625503122807, -0.025641614571213722, 0.015878980979323387, -0.042199186980724335, -0.10126356780529022, 0.03724096342921257, 0.028916938230395317, 0.017625216394662857, 0.04125820845365524, 0.02303583361208439, -0.039557211101055145, -0.03637236729264259, -0.011925069615244865, -0.04382779821753502, -0.04042580723762512, 0.0074373348616063595, -0.03246369585394859, 0.03905053064227104, -0.008894039317965508, -0.015752311795949936, -0.04140297323465347, -0.05551762506365776, -0.007138755638152361, -0.052803266793489456, -0.05620526149868965, 0.04943746700882912, -0.039122916758060455, 0.021280549466609955, -0.03868861868977547, -0.01738092489540577, 0.059788212180137634, -0.02385013923048973, 0.03307894989848137, 0.016078034415841103, 0.032590366899967194, 0.009188094176352024, -0.04817076772451401, 0.015372301451861858, 0.02093673124909401, 0.018729055300354958, 0.02944171242415905, 0.03588378429412842, -0.0035693778190761805, -0.11342388391494751, 0.002350179711356759, -0.020466243848204613, -0.05884723365306854, 0.007722342386841774, 0.025424465537071228, -0.011364103294909, 0.010585987940430641, -0.02385013923048973, -0.050740357488393784, 0.04770027846097946, -0.005157276056706905, 0.020864348858594894, 0.04393637180328369, 0.01512800995260477, -0.0070528010837733746, 0.028229299932718277, -0.006003250367939472, -0.04697645083069801, 0.0012191981077194214, -0.007152327802032232, 0.011536012403666973, 0.001919275731779635, 0.017100442200899124, 0.02484540455043316, -0.06507215648889542, 0.040389616042375565, -0.02386823482811451, -0.011689825914800167, 0.00037746509769931436, 0.03601045534014702, -0.04683168604969978, 0.011156002059578896, 0.003103413386270404, -0.03868861868977547, -0.07976587116718292, -0.01609613001346588, -0.021099593490362167, -0.051681336015462875, -0.03709619492292404, 0.027975961565971375, 0.009400718845427036, -0.04241633415222168, 0.023470129817724228, 0.0015132533153519034, 0.021171975880861282, 0.03821812942624092, 0.026817835867404938, 0.014295607805252075, -0.027396898716688156, 0.0334770567715168, 0.061054911464452744, -0.041801080107688904, 0.001748497597873211, -0.09351860731840134, -0.01004311628639698, 0.0071297078393399715, -0.01061313133686781, -0.0029156706295907497, 0.04306777939200401, 0.043755415827035904, 0.06376926600933075, 0.03490661457180977, 0.017290446907281876, -0.010839327238500118, 0.018511906266212463, 0.016394708305597305, 0.032735131680965424, -0.033296097069978714, 0.020556721836328506, -0.0003862302110064775, 0.023759661242365837, 0.010133595205843449, 0.007265425752848387, -0.04017246514558792, 0.016874246299266815, 0.03778383135795593, 0.0025062551721930504, 0.038326703011989594, -0.018656672909855843, -0.014784191735088825, -0.012187457643449306, -0.040534380823373795, 0.06290066987276077, 0.05117465555667877, 0.013626066036522388, -0.07202091068029404, -0.029676957055926323, 0.004119034856557846, 0.07013895362615585, -0.027668334543704987, 0.057689107954502106, -0.009084044024348259, -0.0376390665769577, -0.02426634170114994, -0.06521692126989365, 0.03602854907512665, 0.001310807652771473, -0.007003038190305233, 0.001527956104837358, 0.013626066036522388, -0.00780829694122076, 0.007966633886098862, -0.04817076772451401, 0.011427437886595726, 0.019000491127371788, 0.02526160515844822, -0.03069031611084938, 0.021551985293626785, -0.047374557703733444, -0.02900741621851921, -0.01912716031074524, 0.020031945779919624, 0.008093304000794888, -0.04096867889165878, 0.012730328366160393, -0.0012418178375810385, 0.017399020493030548, -0.020683391019701958, -0.06738840788602829, 0.027975961565971375, -0.06612170487642288, -0.01054074801504612, 0.008482362143695354, 0.014992292039096355, 0.009255953133106232, -0.04466019943356514, -0.020882444456219673, -0.011897926218807697, -0.035521868616342545, -0.006270161829888821, -0.011183146387338638, -0.039412446320056915, -0.03890576586127281, 0.01938050054013729, -0.02024909481406212, 0.03546758368611336, -0.0351780503988266, 0.03125128522515297, 0.007174947299063206, -0.005903724115341902, 0.09887493401765823, 0.019344309344887733, -0.027034984901547432, -0.015327062457799911, 0.00019014628196600825, -0.01262175478041172, -0.0062430184334516525, -0.002644235035404563, -0.03876100108027458, 0.04990795627236366, 0.06478262692689896, -0.05178990960121155, -0.02453777752816677, -0.015996603295207024, 0.0004176149668637663, -0.007554957177489996, 0.0001011521671898663, 0.04071533679962158, -0.003245917148888111, -0.041366782039403915, 0.01659376174211502, 0.023795852437615395, 0.06930655241012573, 0.04187346249818802, 0.015869934111833572, -0.05711004510521889, -0.026166390627622604, 0.039412446320056915, 0.005378948524594307, 0.00024514025426469743, 0.06796746701002121, -0.10104642063379288, -0.011662682518362999, -0.005003462545573711, -0.02301773801445961, -0.045420221984386444, 0.0371323861181736, 0.03054555132985115, 0.01606898568570614, -0.007971158251166344, 0.021533889696002007, 0.030943656340241432, 0.038290511816740036, 0.04473258554935455, 0.023813948035240173, -0.04773646965622902, -0.030798891559243202, -0.05566238984465599, 0.005935391411185265, 0.07068182528018951, -0.00801639724522829, 0.010359791107475758, 0.010993140749633312, 0.033097043633461, -0.04437066987156868, -0.0030672221910208464, 0.07390286028385162, 0.035232339054346085, -0.05034225434064865, 0.02944171242415905, -0.04925651103258133, -0.02093673124909401, 0.007948538288474083, -0.008767369203269482, -0.10032258927822113, -0.0077721052803099155, 0.020810062065720558, 0.007233758457005024, 0.024664446711540222, -0.052803266793489456, 0.08077923208475113, -0.02039385959506035, -0.026274964213371277, 0.054468072950839996, 0.045456413179636, -0.019470978528261185, 0.040823910385370255, -0.025352083146572113, 0.056711941957473755, 0.03559425100684166, -0.027795003727078438, 0.04614404961466789, -0.022927258163690567, 0.06141682341694832, 0.044985923916101456, 0.0373857282102108, -0.026039719581604004, 0.0037820024881511927, -0.011400294490158558, -0.04321254417300224, -0.04838791489601135, -0.007107088342308998, -0.031178900972008705, 0.014512755908071995, 0.03025601990520954, -0.009862159378826618, 0.0016274824738502502, 0.007224710192531347, 0.024193957448005676, 0.01939859613776207, -0.023669183254241943, -0.06000535935163498, -0.03847147151827812, 0.05787006765604019, -0.013553683646023273, -0.028156917542219162, -0.04549260437488556, 0.0076997228898108006, 0.02790357731282711, -0.01723616011440754, -0.01255841925740242, -0.005903724115341902, 0.036064740270376205, -0.010305504314601421, -0.00933738425374031, -0.002366013592109084, 0.036354273557662964, -0.003770692739635706, 0.054504264146089554, -0.036064740270376205, 0.05374424532055855, -0.05696528032422066, 0.0167385283857584, -0.008482362143695354, -0.06847415119409561, 0.003748073009774089, 0.07846298068761826, -0.00035286624915897846, -0.015553259290754795, -0.044044945389032364, 0.030527455732226372, -0.051427993923425674, -0.0028093582950532436, 0.07006657123565674, -0.015453732572495937, -0.01178935170173645, 0.03988293558359146, 0.03240940719842911, 0.011897926218807697, 0.004238918889313936, 0.002199759241193533, 0.03387515991926193, -0.04071533679962158, 0.0024655398447066545, 0.018765246495604515, -0.03155891224741936, 0.006134444382041693, -0.06905321031808853, 0.01138219889253378, 0.014440372586250305, 0.06691791862249374, 0.0840364545583725, 0.05989678576588631, 0.047410748898983, 0.05229659005999565, 0.03948482871055603, -0.019579553976655006, -0.006496358197182417, -0.02176913432776928, 0.006957798730581999, -0.08295071125030518, -0.03000267967581749, -0.013363678939640522, -0.016059938818216324, 0.025641614571213722, 0.02719784528017044, -0.00603944156318903, -0.02062910422682762, -0.024664446711540222, 0.010296456515789032, 0.02287297137081623, 0.01054074801504612, 0.03025601990520954, -0.04042580723762512, -0.0005892413901165128, -0.026166390627622604, 0.003049126360565424, -0.006785889621824026, -0.029115989804267883, -0.0024858976248651743, -0.0021556508727371693, -0.016186608001589775, 0.04621643200516701, -0.012214601039886475, -0.02955028787255287, -0.030636029317975044, -0.03919529914855957, -0.008731178008019924, 0.0028930508997291327, -0.03193892166018486, -0.010893614962697029, 0.02526160515844822, -0.007070897147059441, 0.01965193636715412, 0.010025020688772202, -0.007649959530681372, 0.052658502012491226, -0.005387996323406696, -0.0681484267115593, -0.007600196171551943, 0.0027256656903773546, -0.010748849250376225, 0.06141682341694832, -0.05019748583436012, 0.009382623247802258, -0.012495084665715694, -0.03977436199784279, -0.015517067164182663, 0.007726866286247969, -0.05258611962199211, -0.004356541205197573, -0.03184844180941582, 0.042090609669685364, 0.04827934131026268, -0.004098677076399326, 0.03810955584049225, -0.035521868616342545, 0.009052376262843609, 0.012106026522815228, 0.007631863933056593, -0.04784504696726799, -0.02385013923048973, 0.0064737387001514435, 0.02998458407819271, 0.04896697774529457, 0.04002770036458969, 0.015661833807826042, 0.026021623983979225, 0.05305660888552666, -0.006636600010097027, -0.0019418953452259302, -0.0315227173268795, 0.014123697765171528, -0.034237075597047806, -0.02299964241683483, 0.027813099324703217, -0.05591572821140289, -0.0023818472400307655, -0.05066797509789467, 0.02386823482811451, 0.043574459850788116, -0.015725167468190193, -0.03166748583316803, 0.047229792922735214, 0.009581675752997398, 0.008007349446415901, -0.050414636731147766, 0.031088421121239662, 0.028627406805753708, -0.007070897147059441, 0.05772529914975166, 0.05403377488255501, 0.017145680263638496, -0.024754924699664116, 0.02147960290312767, 0.017290446907281876, 0.03363991528749466, -0.010549796745181084, 0.06496357917785645, 0.041764888912439346, 0.03155891224741936, 0.011508869007229805, -0.006754221860319376, 0.09815111011266708, 0.036897145211696625, 0.004587261471897364, 0.0277407169342041, -0.04531164839863777, 0.04397256299853325, -0.028645502403378487, -0.02401300147175789, 0.014232272282242775, 0.027975961565971375, -0.031215092167258263, -0.0076047200709581375, 0.02763214148581028, -0.022257717326283455, 0.06782270222902298, -0.04983557388186455, -0.0037571208085864782, -0.07853536307811737, -0.04075152799487114, -0.041222017258405685, -0.021787229925394058, 0.027270227670669556, -0.02147960290312767, -0.03727715462446213, -0.011183146387338638, 0.04042580723762512, 0.04842410609126091, -0.014105602167546749, -0.019326213747262955, 0.05765291675925255, 0.029188372194767, -0.019724318757653236, 0.026184486225247383, 0.014738951809704304, -0.02788548171520233, -0.025026360526680946, 0.031613197177648544, 0.02553304098546505, 0.008437123149633408, -0.0429953970015049, 0.03430945798754692, -0.038037173449993134, -0.01463942602276802, 0.0011649110820144415, 0.010938853956758976, 0.00455333199352026, -0.04089629277586937, 0.02956838347017765, -0.041801080107688904, -0.023542512208223343, -0.010585987940430641, 0.020140519365668297, 0.05048701912164688, -0.053382329642772675, 0.046650730073451996, 0.005166323855519295, -0.0136803537607193, -0.036788567900657654, 0.016123274341225624, -0.0068085091188549995, -0.024754924699664116, 0.01110171526670456, -0.0012893190141767263, -0.06807604432106018, -0.04817076772451401, 0.040136273950338364, 0.028283588588237762, -0.00929214432835579, 0.02748737670481205, -0.022565344348549843, 0.0667007714509964, -0.023397747427225113, -0.07003038376569748, -0.02495397813618183, 0.05595192313194275, 0.0010308896889910102, -0.03756668418645859, 0.0014578353147953749, 0.013282247819006443, 0.002169222803786397, -0.023687278851866722, -0.06775031983852386, -0.07831821590662003, -0.0033047283068299294, -0.017579978331923485, 0.10792278498411179, 0.024519680067896843, 0.0068085091188549995, -0.027306418865919113, -0.00829688087105751, 0.024754924699664116, -0.030907465144991875, -0.0390867255628109, 0.02956838347017765, -0.08251641690731049, 0.01690138876438141, -0.0510660819709301, 0.021280549466609955, -0.03597426414489746, -0.01773379184305668, -0.02538827434182167, 0.0359380729496479, -0.020013850182294846, -0.0008301404886879027, 0.02301773801445961, -0.007355904206633568, -0.02218533493578434, -0.006595884449779987, -0.0024248245172202587, -0.0031305570155382156, -0.005804197397083044, -0.030762698501348495, -0.04382779821753502, -0.009133807383477688, 0.01646709255874157, 0.04335730895400047, 0.02902551181614399, -0.002280058804899454, 0.06898082792758942, -0.00005637236245092936, 0.021931994706392288, -0.026021623983979225, 0.016512330621480942, 0.01910906471312046, 0.009129283018410206, 0.05215182155370712, -0.04661453887820244, -0.01881953328847885, 0.009527388960123062, 0.06376926600933075, -0.00035682469024322927, 0.04650596156716347, -0.017760934308171272, -0.01178030390292406, -0.03246369585394859, -0.04382779821753502, 0.00707994494587183, -0.09373575448989868, -0.007934967055916786, -0.07147803902626038, -0.0024293484166264534, 0.001059729722328484, -0.018765246495604515, -0.036643803119659424, -0.0024723256938159466, 0.026437826454639435, 0.009061424992978573, 0.04006389155983925, -0.015598498284816742, -0.03639046475291252, -0.04111344367265701, 0.01387035846710205, 0.03237321600317955, -0.05414235219359398, 0.037856217473745346, -0.012648898176848888, 0.0014555733650922775, -0.003202939871698618, 0.005347280763089657, 0.05501094460487366, 0.02426634170114994, 0.012956525199115276, -0.00961786787956953, -0.05996916815638542, -0.04759170487523079, 0.002931504277512431, -0.04867744818329811, 0.05566238984465599, 0.012603659182786942, -0.061597783118486404, 0.028211204335093498, -0.03639046475291252, 0.021099593490362167, -0.027016887441277504, -0.0024768495932221413, -0.02679974026978016, 0.032554175704717636, 0.04599928483366966, 0.03459898754954338, 0.053092800080776215, -0.005709195043891668, 0.018457619473338127, 0.0034381840378046036, 0.04523926228284836, 0.02553304098546505, -0.06514453887939453, 0.012006500735878944, -0.025370178744196892, -0.006369688548147678, 0.06478262692689896, 0.00579062569886446, 0.015318014658987522, -0.0703561007976532, 0.02442920207977295, 0.04096867889165878, 0.03282561153173447, -0.025894954800605774, 0.027089271694421768, -0.02137102745473385, -0.023053929209709167, -0.03211987763643265, 0.01981479674577713, -0.009590723551809788, 0.0429953970015049, 0.025985432788729668, 0.020954826846718788, 0.010965997353196144, 0.010088356211781502, -0.029894106090068817, -0.03724096342921257, 0.01898239552974701, 0.025894954800605774, 0.028573118150234222, -0.011418390087783337, -0.018910013139247894, 0.04632500559091568, -0.03966578468680382, 0.07484383881092072, 0.036897145211696625, 0.0156980250030756, -0.04270586371421814, 0.07039229571819305, -0.05012510344386101, 0.04777266085147858, -0.004650596529245377, -0.0349247120320797, -0.1045931801199913, 0.004168798215687275, -0.07839059829711914, 0.05428711697459221, -0.002356965560466051, 0.0123412711545825, 0.05334613844752312, 0.04259729012846947, -0.014738951809704304 ]
717,792
pytorch_optimizer.optimizer.rotograd
__len__
Get the number of tasks.
def __len__(self) -> int: r"""Get the number of tasks.""" return self.num_tasks
(self) -> int
[ 0.0008730725385248661, -0.004532679915428162, -0.03806283324956894, 0.00788944773375988, 0.01849767006933689, 0.039030250161886215, 0.006146430503576994, -0.01809735968708992, 0.015470324084162712, -0.04383397474884987, 0.013452093116939068, -0.022801006212830544, 0.023334752768278122, -0.03732893243432045, 0.025419702753424644, 0.025703255087137222, 0.04783707857131958, -0.025519778952002525, 0.016320982947945595, 0.018464311957359314, -0.01077501755207777, 0.061514344066381454, 0.07052132487297058, -0.0506058894097805, -0.04156554862856865, 0.06148098409175873, 0.06588439643383026, -0.03184134513139725, 0.04526842013001442, -0.014219353906810284, -0.09654149413108826, 0.031741268932819366, -0.049538396298885345, 0.044801391661167145, 0.03973079472780228, 0.030390221625566483, -0.016187546774744987, 0.03729557245969772, -0.007897787727415562, 0.002758387941867113, -0.005550134927034378, -0.056143514811992645, 0.005391678772866726, -0.006947051268070936, 0.014102596789598465, -0.0458688847720623, 0.04123195633292198, -0.0004042195505462587, -0.007826900109648705, -0.045001544058322906, 0.014636344276368618, 0.02638711780309677, -0.028538785874843597, 0.0007427631644532084, -0.03264196589589119, 0.06932039558887482, 0.0345267616212368, 0.029356086626648903, -0.038096193224191666, 0.02213382162153721, -0.020349105820059776, 0.018013961613178253, 0.03836306557059288, -0.04506826400756836, 0.029372766613960266, 0.02880566008388996, -0.009916018694639206, 0.056777339428663254, 0.053341343998909, 0.04463459551334381, 0.06178121641278267, 0.022750966250896454, -0.039764154702425, 0.0340263731777668, 0.015111712738871574, -0.026837468147277832, -0.043567102402448654, 0.002547807991504669, 0.03629479929804802, -0.024519003927707672, 0.03936384245753288, 0.0062006390653550625, 0.03629479929804802, 0.009282194077968597, 0.06721876561641693, -0.03606128320097923, 0.0061047314666211605, -0.03225833550095558, -0.09847632795572281, -0.01560376025736332, -0.04833746328949928, 0.09293869882822037, 0.0034005523193627596, -0.022867724299430847, 0.0032963049598038197, -0.04053141549229622, -0.0472366102039814, -0.05617687478661537, -0.038496505469083786, -0.06164778023958206, -0.019214892759919167, 0.019848717376589775, 0.01506167370826006, -0.02210046350955963, 0.025553138926625252, -0.056577183306217194, -0.04753684252500534, -0.013310316018760204, -0.060580287128686905, 0.00010502932127565145, 0.029456164687871933, 0.0813964232802391, -0.036161359399557114, 0.0085065932944417, 0.02757136896252632, 0.014753101393580437, 0.024769198149442673, -0.025553138926625252, 0.011217026971280575, -0.009407291188836098, 0.029356086626648903, 0.05654382333159447, -0.04176570475101471, -0.052540723234415054, 0.057911552488803864, 0.07072147727012634, -0.057911552488803864, 0.001179038779810071, 0.06274863332509995, -0.054275400936603546, 0.07305662333965302, -0.011917570605874062, 0.025803333148360252, 0.028672222048044205, 0.049338240176439285, 0.002029698109254241, 0.0572110079228878, 0.037695884704589844, -0.04169898480176926, 0.013810704462230206, -0.01334367599338293, -0.0008610840886831284, -0.002679159864783287, 0.009257175028324127, 0.014936576597392559, 0.007080487906932831, 0.002087034285068512, 0.01754693314433098, 0.007276473101228476, 0.016979826614260674, 0.018864620476961136, -0.036761827766895294, 0.013410394079983234, -0.01114196889102459, -0.008481573313474655, 0.07152210175991058, 0.014836499467492104, -0.04566872864961624, 0.0022871894761919975, -0.1339704990386963, -0.04833746328949928, 0.007309832144528627, -0.04660278558731079, -0.0012749464949592948, -0.021666793152689934, 0.018914660438895226, 0.03956399857997894, -0.012985064648091793, -0.050172220915555954, 0.08199688792228699, 0.021583395078778267, -0.006238168105483055, 0.0031336788088083267, 0.02495267242193222, 0.03712877631187439, 0.05590999871492386, -0.00628820713609457, 0.02213382162153721, 0.02520286664366722, -0.006396624259650707, -0.04289991781115532, -0.009015320800244808, -0.02381846122443676, -0.05083940550684929, 0.06665165722370148, 0.0562102347612381, 0.012693171389400959, 0.0443677194416523, -0.008581651374697685, 0.025519778952002525, -0.03732893243432045, -0.030206745490431786, 0.01503665465861559, 0.025269584730267525, -0.030206745490431786, -0.03042357973754406, -0.030707133933901787, 0.010174552910029888, 0.030657093971967697, -0.0283553097397089, -0.015620440244674683, 0.013185219839215279, 0.012884986586868763, -0.015445304103195667, 0.030340181663632393, -0.015820594504475594, -0.020682696253061295, 0.01799728162586689, -0.051806818693876266, -0.007568365894258022, -0.03476027399301529, -0.054809145629405975, 0.0016856815200299025, 0.051806818693876266, 0.057377804070711136, -0.08586655557155609, 0.040865007787942886, -0.015353566966950893, -0.019548485055565834, -0.011166988871991634, 0.11709075421094894, 0.013835723511874676, 0.03939720243215561, -0.05137315019965172, 0.007597555406391621, -0.039330482482910156, -0.002270509721711278, 0.0036674258299171925, -0.0013406224315986037, -0.02041582390666008, 0.008573311381042004, 0.023017840459942818, 0.01284328754991293, 0.06641814857721329, 0.026003487408161163, -0.026570593938231468, -0.025486420840024948, -0.00008554807573091239, -0.028422029688954353, -0.022500772029161453, -0.05277423560619354, -0.015670478343963623, -0.01338537409901619, 0.006801104638725519, -0.0238684993237257, -0.014744761399924755, -0.008706748485565186, 0.04740340635180473, 0.005120635498315096, -0.012859967537224293, -0.012793248519301414, -0.0803956463932991, -0.07886112481355667, -0.04576880857348442, -0.024001935496926308, -0.0020964164286851883, -0.021967025473713875, -0.01321857888251543, -0.019398368895053864, 0.0010419534519314766, 0.05103955790400505, -0.03856322169303894, -0.026603953912854195, 0.04893793165683746, -0.021333200857043266, 0.04987198859453201, 0.016346001997590065, -0.010658260434865952, -0.06858649104833603, 0.012976724654436111, -0.03007330931723118, 0.010141193866729736, -0.007897787727415562, -0.06765243411064148, -0.051306433975696564, -0.056143514811992645, -0.0033734480384737253, 0.029155930504202843, -0.05631031095981598, -0.037562448531389236, 0.002574912505224347, -0.016654575243592262, -0.028388669714331627, -0.019148174673318863, -0.045835524797439575, 0.002545722993090749, 0.022717608138918877, 0.03462683781981468, -0.05514273792505264, 0.0029502033721655607, -0.0070221093483269215, -0.0027604729402810335, 0.031240880489349365, 0.0011217027204111218, 0.08459890633821487, -0.044601235538721085, -0.04313343018293381, 0.024885954335331917, 0.030190065503120422, 0.0027917472179979086, -0.025903409346938133, -0.036361515522003174, -0.09941038489341736, -0.051306433975696564, -0.024418925866484642, 0.004290825687348843, 0.06374941021203995, 0.012401278130710125, 0.051706742495298386, -0.022750966250896454, 0.00528743164613843, 0.02218385972082615, 0.0262370016425848, 0.0421326570212841, 0.07152210175991058, 0.052340567111968994, -0.031390998512506485, 0.03395965322852135, -0.030757172033190727, 0.06291542947292328, -0.04076492786407471, 0.009115397930145264, 0.03722885623574257, -0.01928161084651947, 0.02953956089913845, -0.0029898174107074738, 0.030490297824144363, -0.013643908314406872, -0.0034401663579046726, 0.03576105087995529, -0.015386926010251045, -0.027454612776637077, 0.03832970932126045, -0.004557698965072632, -0.07545848190784454, 0.006721876561641693, 0.06665165722370148, 0.05320790782570839, -0.042532965540885925, 0.008940262719988823, 0.032858800143003464, -0.03245849162340164, -0.025369662791490555, 0.06932039558887482, 0.019048096612095833, -0.05270751938223839, 0.04360045865178108, -0.040798287838697433, 0.08953606337308884, -0.050972841680049896, 0.019214892759919167, 0.02943948470056057, 0.004201172851026058, 0.032325055450201035, 0.017680369317531586, 0.002535298466682434, 0.03466019779443741, 0.04413420706987381, 0.042332809418439865, 0.02021566778421402, -0.05400852859020233, -0.022300617769360542, 0.0030940647702664137, 0.02109968662261963, -0.053975168615579605, 0.010691620409488678, -0.018130719661712646, -0.0033525985199958086, 0.02805507741868496, -0.014336111024022102, -0.0037549936678260565, -0.02263421006500721, 0.01607912965118885, -0.02144995890557766, 0.034293245524168015, 0.03170790895819664, -0.028488747775554657, 0.010674940422177315, -0.060880519449710846, -0.03432660549879074, -0.03506050631403923, 0.0035110546741634607, 0.010099494829773903, -0.003002326935529709, -0.052440643310546875, 0.023601626977324486, -0.08159657567739487, -0.03959735855460167, 0.0009137290180660784, 0.0429999940097332, -0.0020234433468431234, 0.017296738922595978, -0.09000308811664581, -0.0326586477458477, -0.06001318246126175, -0.018864620476961136, 0.023701703175902367, -0.012209462933242321, 0.013418734073638916, -0.015136731788516045, 0.05374165251851082, -0.0007250411435961723, 0.05854537710547447, 0.06828626245260239, 0.0012999658938497305, 0.01141718216240406, 0.03425988554954529, -0.010983512736856937, -0.0440007708966732, -0.023101238533854485, 0.028088437393307686, 0.006396624259650707, -0.016337662935256958, -0.0010904284426942468, -0.03179130703210831, -0.04987198859453201, -0.03274204209446907, -0.01612916775047779, 0.09080371260643005, -0.0034922901540994644, -0.00807709340006113, 0.04313343018293381, 0.05590999871492386, 0.05580992251634598, -0.015478664077818394, 0.037162136286497116, 0.013502132147550583, 0.031090764328837395, 0.026503875851631165, -0.03486035391688347, -0.0590791217982769, 0.040164463222026825, 0.0029043343383818865, 0.007881108671426773, 0.008519102819263935, -0.03682854399085045, 0.020048871636390686, -0.08926919102668762, 0.021816909313201904, 0.02603684738278389, 0.04059813171625137, 0.020182309672236443, 0.03322575241327286, 0.026370439678430557, 0.03159115090966225, -0.08693404495716095, -0.014394490048289299, -0.04466795548796654, 0.010674940422177315, -0.047470126301050186, -0.07198912650346756, 0.021583395078778267, 0.017346778884530067, -0.0326586477458477, 0.000605156528763473, -0.01756361313164234, -0.028889058157801628, -0.013910781592130661, -0.06952054798603058, -0.07098835706710815, 0.005345810204744339, 0.07585879415273666, -0.030540337786078453, -0.009624126367270947, 0.005283261649310589, -0.042332809418439865, 0.000832937250379473, -0.00892358273267746, -0.02109968662261963, -0.0013969159917905927, 0.011108609847724438, -0.007764351088553667, -0.044801391661167145, -0.04156554862856865, 0.005283261649310589, 0.038763377815485, 0.015537042170763016, 0.0319080650806427, 0.008589991368353367, -0.0191314946860075, 0.03576105087995529, 0.028522105887532234, 0.03866330161690712, 0.03117416240274906, -0.03746236860752106, -0.013677267357707024, -0.0421326570212841, -0.02603684738278389, 0.02963963896036148, -0.03609464317560196, 0.006083881948143244, -0.048604339361190796, 0.01168405544012785, 0.005791989155113697, 0.034093089401721954, 0.001363556832075119, 0.032875481992959976, 0.0029439483769237995, -0.006788595113903284, 0.04990534484386444, -0.02041582390666008, 0.04310007020831108, 0.039330482482910156, -0.009857640601694584, -0.006696857046335936, -0.014719742350280285, -0.0024852596689015627, -0.007063808385282755, -0.021816909313201904, -0.031674548983573914, 0.027538010850548744, 0.026553913950920105, 0.007376550696790218, 0.025820011273026466, 0.057377804070711136, 0.00701376935467124, 0.0070221093483269215, 0.022917762398719788, 0.0363948754966259, 0.05661054328083992, 0.015120052732527256, 0.016454419121146202, -0.023501548916101456, 0.003354683518409729, -0.03796275705099106, 0.030340181663632393, -0.007063808385282755, -0.037362292408943176, 0.012768229469656944, 0.12429633736610413, 0.029773076996207237, -0.03729557245969772, 0.01047478523105383, 0.03456011787056923, 0.01412761677056551, 0.04783707857131958, -0.08546624332666397, -0.03862994164228439, 0.0163877010345459, 0.047903794795274734, -0.025769973173737526, -0.055009301751852036, 0.033008918166160583, -0.031924743205308914, -0.05864545330405235, 0.03512722626328468, 0.02978975512087345, 0.012226142920553684, 0.028221873566508293, -0.0043075052089989185, -0.027838243171572685, 0.010216251946985722, 0.008164661936461926, -0.04990534484386444, 0.07952830940485, 0.035827767103910446, -0.00317537784576416, -0.049972064793109894, 0.04807059094309807, 0.01839759200811386, -0.005946275312453508, -0.05467570945620537, -0.02747129276394844, 0.02006555162370205, -0.010099494829773903, 0.004766194149851799, -0.02505275048315525, -0.01590399257838726, -0.005033067427575588, 0.010533164255321026, -0.03956399857997894, -0.01309348177164793, -0.009057019837200642, -0.004520169924944639, 0.01779712736606598, -0.01284328754991293, -0.040064387023448944, 0.039664074778556824, -0.009649145416915417, -0.045735448598861694, -0.038496505469083786, 0.03307563439011574, 0.026804108172655106, 0.0013760665897279978, -0.05597671866416931, -0.011308765038847923, -0.0679193064570427, -0.03022342547774315, -0.020532580092549324, 0.023584946990013123, -0.032575249671936035, 0.016187546774744987, -0.002310123760253191, 0.03012334741652012, 0.0191314946860075, 0.008523272350430489, -0.0038467315025627613, -0.02785492315888405, 0.00747245829552412, 0.009390612132847309, 0.019948795437812805, 0.013001743704080582, -0.0018524774350225925, 0.046769581735134125, 0.04540185630321503, 0.00248942943289876, -0.043266866356134415, 0.04003102704882622, -0.007509987335652113, -0.010282970033586025, 0.010282970033586025, -0.05354149639606476, 0.046035680919885635, -0.05013886094093323, -0.07118850946426392, -0.013110160827636719, -0.005754460114985704, 0.04526842013001442, 0.030089987441897392, 0.0032983897253870964, 0.0027542179450392723, 0.047670282423496246, 0.013919121585786343, 0.01085007656365633, -0.056977495551109314, 0.038930173963308334, -0.025369662791490555, -0.032675325870513916, -0.03344258666038513, -0.031140802428126335, 0.002393521834164858, -0.043767254799604416, 0.05854537710547447, -0.03032350353896618, 0.011992628686130047, -0.04947167634963989, -0.030290143564343452, 0.036761827766895294, 0.018914660438895226, -0.02712102048099041, -0.0018889640923589468, 0.01481981948018074, -0.05424204096198082, -0.010533164255321026, -0.0006828209152445197, -0.03117416240274906, -0.03364274278283119, 0.010099494829773903, 0.01190923061221838, -0.012659812346100807, -0.03324243053793907, 0.02094957046210766, 0.037595804780721664, 0.012901666574180126, -0.044167567044496536, -0.0340263731777668, 0.006021333392709494, -0.025086110457777977, -0.057277727872133255, -0.07105506956577301, -0.04380061477422714, -0.019198212772607803, -0.036027923226356506, -0.03766252472996712, 0.019548485055565834, -0.01819743774831295, 0.0005108125624246895, -0.005274921655654907, -0.019615203142166138, -0.008823505602777004, 0.0401311032474041, 0.0557098463177681, 0.07125522941350937, 0.01716330274939537, 0.008327287621796131, 0.016496118158102036, -0.023601626977324486, 0.006709367036819458, 0.014294411987066269, -0.00819385051727295, 0.011158648878335953, -0.015220129862427711, -0.04967183247208595, -0.025019392371177673, 0.013677267357707024, 0.06348253786563873, -0.07625910639762878, -0.014961596578359604, 0.0851326510310173, -0.005654382519423962, 0.005183184053748846, 0.006571760401129723, 0.008706748485565186, 0.04286655783653259, 0.0006020290893502533, 0.009832620620727539, -0.05250736325979233, 0.003884260542690754, 0.03886345401406288, -0.017346778884530067, 0.008164661936461926, -0.014085917733609676, 0.023017840459942818, -0.04887121170759201, -0.04483475163578987, 0.00807709340006113, -0.0665515810251236, 0.007055468391627073, -0.05420868098735809, -0.0016481524799019098, 0.0238684993237257, 0.09213808178901672, 0.026153603568673134, -0.048304107040166855, -0.03032350353896618, -0.011175327934324741, 0.057911552488803864, 0.0676857978105545, -0.010533164255321026, 0.020832814276218414, 0.00994103867560625, 0.025603177025914192, 0.044167567044496536, 0.022450733929872513, -0.005729440599679947, 0.023351432755589485, -0.02248409390449524, -0.005654382519423962, -0.00042168100480921566, 0.007072147913277149, -0.010883435606956482, -0.03214157745242119, -0.009640805423259735, -0.03812955319881439, 0.029122572392225266, 0.00959076639264822, 0.06344917416572571, 0.01602908968925476, -0.0037320591509342194, 0.011834172531962395, 0.08720091730356216, -0.00904867984354496, 0.027437932789325714, -0.010116173885762691, 0.05641038715839386, -0.03145771473646164, 0.003594452515244484, 0.05444219708442688, 0.016829710453748703, -0.02608688548207283, 0.014619664289057255, 0.0288556981831789, 0.0006061990279704332, -0.051706742495298386, 0.003992678131908178, 0.011308765038847923, 0.002416456351056695, -0.0038175422232598066, -0.03392629325389862, 0.025236226618289948, -0.012709851376712322, -0.018080679699778557, -0.025719935074448586, 0.07218928635120392, 0.03220829740166664, 0.06384948641061783, 0.008093773387372494, 0.03322575241327286 ]
717,801
pytorch_optimizer.optimizer.rotograd
_hook
null
def _hook(self, index): def _hook_(g): self.original_grads[index] = g return _hook_
(self, index)
[ -0.03489597514271736, -0.05569637566804886, -0.059194546192884445, 0.08313301205635071, -0.0660879984498024, 0.015570292249321938, -0.03421005606651306, 0.04914587736129761, 0.06042919307947159, -0.03889143466949463, -0.041669394820928574, -0.03302685171365738, 0.008170973509550095, -0.0032731052488088608, -0.04852855205535889, -0.001764090033248067, -0.00023685535416007042, 0.04599066451191902, 0.015235907398164272, -0.0350160077214241, 0.0036032022908329964, -0.006070355884730816, 0.025430332869291306, 0.005765981040894985, -0.012063547037541866, 0.07236412912607193, 0.007948051206767559, 0.02815684862434864, 0.0434870719909668, -0.04105206951498985, -0.015767492353916168, -0.10933499783277512, 0.03457016497850418, -0.008513931185007095, 0.05058630183339119, -0.08381892740726471, -0.08306442201137543, 0.030643295496702194, -0.0028529816772788763, 0.04533904418349266, 0.07984061539173126, -0.004805698525160551, -0.00682915048673749, -0.02323540300130844, 0.006923464126884937, 0.1011040061712265, 0.0039311558939516544, 0.05027763918042183, 0.035530444234609604, -0.036490727216005325, -0.05185524374246597, -0.04839136824011803, 0.009688562713563442, 0.03206656873226166, -0.026750721037387848, 0.059811871498823166, 0.025584664195775986, 0.020731808617711067, 0.047362495213747025, -0.010228721424937248, 0.018245363608002663, -0.02198360674083233, 0.025310298427939415, -0.010494514368474483, 0.0441729873418808, -0.03386709839105606, -0.019960153847932816, -0.0019848693627864122, 0.01699356734752655, -0.02210364118218422, 0.013323917053639889, 0.011814902536571026, 0.04324699938297272, -0.052987005561590195, -0.06046349182724953, 0.01702786237001419, 0.015767492353916168, 0.010031520389020443, 0.07476484030485153, 0.014189885929226875, -0.013255325146019459, 0.009508510120213032, -0.024521494284272194, 0.07332441210746765, -0.010082964785397053, -0.036284953355789185, 0.035873401910066605, -0.009285586886107922, -0.03379850834608078, -0.04575059190392494, -0.01719076745212078, -0.010348756797611713, 0.009748579934239388, -0.018725505098700523, -0.03366132453083992, -0.02788248285651207, 0.012706592679023743, -0.04026326537132263, 0.03206656873226166, 0.01439566072076559, -0.01446425262838602, 0.0010974655160680413, -0.018914131447672844, -0.005427309777587652, 0.019085610285401344, -0.024727270007133484, 0.02849980816245079, -0.04053763300180435, -0.05147799104452133, 0.030711885541677475, 0.015355942770838737, -0.035770516842603683, -0.012483670376241207, 0.0023278272710740566, 0.004664228297770023, 0.013932667672634125, -0.03283822536468506, -0.02177783101797104, 0.0332154780626297, 0.03302685171365738, 0.03590770065784454, -0.04698524251580238, -0.043315593153238297, 0.03933727741241455, -0.0021649221889674664, 0.027042236179113388, 0.010923211462795734, 0.0669453963637352, 0.06818004697561264, -0.04012608155608177, -0.017936700955033302, 0.00788803305476904, -0.04276685789227486, -0.0014672171091660857, 0.047705452889204025, 0.024264276027679443, -0.019017020240426064, -0.027093680575489998, -0.05257545784115791, 0.014824358746409416, -0.036319248378276825, -0.03489597514271736, 0.019617196172475815, 0.024710122495889664, 0.025155967101454735, -0.011429074220359325, -0.02246374636888504, 0.06701398640871048, -0.03896002471446991, -0.03230664134025574, 0.007206404581665993, 0.053364261984825134, 0.041875168681144714, 0.0464022122323513, -0.015664605423808098, 0.05569637566804886, -0.06516201794147491, 0.04444735124707222, 0.007133525796234608, -0.0013868362875655293, 0.02287529595196247, 0.008882611058652401, -0.008676836267113686, -0.013872649520635605, -0.005024334415793419, 0.03268389403820038, 0.03861706703901291, -0.04499608650803566, -0.05120362341403961, 0.02736804634332657, -0.0322723463177681, -0.02844836376607418, 0.012363635003566742, 0.07332441210746765, -0.018073884770274162, 0.1439051628112793, -0.0040983478538692, 0.0217435359954834, 0.020217372104525566, 0.02301247976720333, -0.001755516161210835, -0.010863193310797215, -0.01769663207232952, -0.020560329779982567, -0.02867128700017929, -0.019874414429068565, 0.021331986412405968, -0.01131761260330677, 0.047568269073963165, 0.04499608650803566, 0.020080188289284706, 0.002702937461435795, 0.03896002471446991, -0.07250131666660309, 0.01743083819746971, -0.00714638689532876, -0.059331730008125305, 0.01570747420191765, -0.026939349249005318, 0.0019612908363342285, 0.0018358968663960695, -0.03324977681040764, -0.013555414043366909, -0.0004704954626504332, 0.007184969261288643, 0.047499679028987885, 0.04276685789227486, 0.01593039743602276, -0.05511334538459778, 0.004104778170585632, -0.0009527801303192973, 0.004698524251580238, 0.0344158336520195, 0.031277768313884735, -0.024161389097571373, -0.06533349305391312, 0.0286369901150465, 0.03294111415743828, 0.0455448180437088, 0.03823981434106827, -0.025756143033504486, -0.031534984707832336, -0.06708257645368576, -0.048768624663352966, 0.012972385622560978, 0.004702811129391193, 0.026682130992412567, -0.05456461384892464, 0.015433108434081078, -0.019788675010204315, 0.012149286456406116, 0.0006918105063959956, -0.007090656086802483, -0.02278955653309822, 0.054050177335739136, 0.009817171841859818, -0.014832932502031326, -0.015373091213405132, 0.006987768691033125, 0.07359877973794937, 0.05048341304063797, 0.04870003089308739, 0.04509897157549858, 0.0773027241230011, -0.005890303291380405, 0.048117004334926605, -0.01454141829162836, 0.019891561940312386, 0.0001925119577208534, 0.036970868706703186, -0.03302685171365738, 0.004659941419959068, -0.03525608032941818, 0.02321825549006462, -0.04883721470832825, 0.017902405932545662, -0.014335643500089645, 0.01577606610953808, -0.015030133537948132, -0.04527045041322708, 0.012457948178052902, 0.009577101096510887, -0.03187794238328934, -0.04516756534576416, -0.0006827007164247334, 0.03275248780846596, 0.059057362377643585, 0.02783103846013546, 0.026579242199659348, 0.04033185914158821, 0.05216390639543533, 0.036490727216005325, 0.008076660335063934, 0.012766610831022263, -0.019737230613827705, 0.01743083819746971, 0.0023021053057163954, 0.06783708930015564, -0.02248089574277401, -0.019291386008262634, 0.10919781774282455, 0.047808341681957245, -0.019668638706207275, 0.036284953355789185, -0.04660798981785774, 0.018536878749728203, 0.02309821918606758, 0.07277568429708481, 0.018982723355293274, -0.04352136701345444, 0.02237800695002079, 0.025413185358047485, 0.07840019464492798, 0.036525022238492966, 0.05768553167581558, -0.006319000385701656, -0.06265842169523239, 0.06893455237150192, -0.026373468339443207, 0.02894565276801586, 0.01397553738206625, -0.0643732100725174, -0.025841882452368736, 0.03443298116326332, -0.010417348705232143, -0.025155967101454735, 0.029631568118929863, -0.013855502009391785, 0.0030287476256489754, -0.047053832560777664, -0.0016794223338365555, 0.036765094846487045, -0.030883364379405975, -0.005873155314475298, 0.04472171887755394, -0.09458781033754349, -0.012500817887485027, -0.03559903800487518, 0.027093680575489998, 0.08093807846307755, -0.031071992591023445, -0.04043474420905113, -0.04094918072223663, -0.0174651350826025, 0.05545630306005478, 0.006340435706079006, 0.02321825549006462, 0.007064934354275465, -0.02786533534526825, -0.019651491194963455, -0.09671414643526077, -0.03443298116326332, -0.018451139330863953, -0.004501323215663433, -0.07380455732345581, -0.0011874919291585684, 0.006794854998588562, -0.018502581864595413, -0.02254948578774929, -0.0793604776263237, -0.03460446000099182, -0.0029322905465960503, -0.04376143589615822, 0.02789963036775589, 0.02287529595196247, 0.008882611058652401, -0.003648215439170599, -0.0001943875104188919, 0.025035932660102844, 0.0226009301841259, 0.026956496760249138, -0.08814019709825516, -0.011257595382630825, 0.02853410318493843, 0.040983475744724274, -0.0180224422365427, -0.005131508689373732, -0.057273980230093, -0.031466394662857056, -0.015193037688732147, -0.007596518844366074, -0.006314713507890701, 0.007759423926472664, 0.013461099937558174, 0.06389307230710983, 0.03343840315937996, -0.027196567505598068, -0.023732692003250122, -0.011737736873328686, -0.03230664134025574, 0.02815684862434864, -0.01090606302022934, -0.020234519615769386, 0.053604330867528915, -0.024384312331676483, -0.06708257645368576, 0.015690326690673828, 0.009491361677646637, -0.06145806983113289, -0.05792560055851936, 0.030831921845674515, 0.02832832932472229, 0.018639765679836273, 0.05751405283808708, 0.0026214849203824997, -0.024092797189950943, 0.0076608238741755486, 0.024830156937241554, 0.04489319771528244, -0.036936573684215546, -0.006717689335346222, -0.07689117640256882, 0.0171221774071455, -0.0032088004518300295, -0.024555791169404984, -0.05713679641485214, -0.01113756000995636, -0.03247812017798424, -0.03463875502347946, -0.03923439234495163, 0.007497918792068958, -0.0039933170191943645, -0.03748530521988869, -0.013675449416041374, 0.026373468339443207, -0.0012796618975698948, -0.01766233518719673, 0.11550824344158173, 0.0029537256341427565, -0.036696501076221466, -0.03961164504289627, 0.06252124160528183, -0.013246751390397549, -0.06601940840482712, 0.053089894354343414, -0.030591851100325584, -0.00028829905204474926, 0.0327010415494442, -0.03542755916714668, 0.021160507574677467, -0.007665110751986504, 0.04904298856854439, 0.0069749075919389725, 0.036147769540548325, -0.03239237889647484, -0.010854619555175304, -0.029751604422926903, -0.0031916527077555656, -0.0807323083281517, 0.04533904418349266, -0.01642768643796444, -0.0314149484038353, 0.04942024499177933, 0.03383280336856842, -0.0004123533726669848, -0.053775809705257416, -0.0434870719909668, -0.005238682962954044, -0.029048539698123932, 0.06526490300893784, 0.06286419928073883, 0.02784818783402443, -0.0009693921310827136, -0.03280393034219742, 0.04012608155608177, 0.0002864234847947955, -0.030866216868162155, -0.03357558697462082, 0.00403618672862649, -0.03926868736743927, -0.0033095444086939096, 0.031243471428751945, 0.0350160077214241, 0.03796544671058655, 0.00136111443862319, -0.023441176861524582, -0.10501372814178467, -0.0779886394739151, 0.020405998453497887, 0.030334632843732834, -0.01651342585682869, 0.00438557518646121, -0.02839691936969757, -0.01578463986515999, -0.01644483394920826, 0.02884276583790779, 0.00690631614997983, -0.012200729921460152, -0.06811144948005676, 0.009448491968214512, 0.004544192925095558, -0.03937157616019249, -0.04396721348166466, -0.09842893481254578, -0.015081577003002167, -0.0017351530259475112, -0.03215231001377106, -0.018622618168592453, -0.009002646431326866, -0.024041354656219482, -0.013006680645048618, -0.027196567505598068, 0.04115495830774307, 0.024915896356105804, -0.012003528885543346, 0.04671087488532066, 0.009422770701348782, 0.0009270582813769579, 0.003633210901170969, 0.036216363310813904, -0.031054845079779625, -0.023681247606873512, 0.005195813253521919, 0.02807110920548439, 0.042629674077034, 0.012740888632833958, 0.048185594379901886, 0.02222367562353611, 0.05494186654686928, -0.058645814657211304, -0.013409656472504139, -0.02234371192753315, -0.05806278437376022, -0.026990791782736778, 0.03405572474002838, -0.09026654064655304, -0.03463875502347946, 0.030643295496702194, -0.06495624035596848, -0.015690326690673828, 0.03318118304014206, 0.02309821918606758, 0.023835578933358192, -0.006576219107955694, 0.012800905853509903, -0.041532211005687714, -0.037108052521944046, -0.006876307539641857, -0.020234519615769386, -0.0013107424601912498, 0.07250131666660309, -0.036182064563035965, 0.01660773903131485, -0.030043117702007294, 0.02858554758131504, -0.0023664101026952267, 0.05994905158877373, 0.014824358746409416, 0.02884276583790779, -0.03294111415743828, -0.0009940422605723143, 0.03974882885813713, 0.018879836425185204, 0.054050177335739136, -0.008899759501218796, 0.0540158785879612, 0.03971453383564949, -0.052849821746349335, -0.01699356734752655, 0.008831167593598366, -0.024590086191892624, -0.010494514368474483, -0.030403224751353264, -0.07298145443201065, -0.006357583217322826, 0.019274238497018814, -0.05257545784115791, -0.06804285943508148, -0.012312191538512707, -0.06649955362081528, -0.020954731851816177, -0.01779951900243759, 0.005890303291380405, -0.00831244420260191, 0.0029622993897646666, -0.004134787246584892, 0.012175007723271847, -0.007305004633963108, 0.0344158336520195, -0.005114360712468624, -0.011772031895816326, 0.026870757341384888, 0.023869873955845833, -0.036387842148542404, 0.00857823621481657, 0.0036567894276231527, 0.04585348069667816, 0.04019467532634735, -0.014884375967085361, -0.018142476677894592, 0.015107298269867897, -0.04077770188450813, 0.01741369068622589, -0.02203504927456379, -0.06663673371076584, 0.015227333642542362, 0.02169209159910679, -0.0584743358194828, -0.015158742666244507, -0.0755879357457161, -0.02735089883208275, -0.000680557219311595, 0.005071491003036499, -0.012312191538512707, -0.007557936478406191, 0.023955613374710083, 0.013246751390397549, 0.0700320154428482, -0.009577101096510887, 0.003375992411747575, -0.02836262434720993, 0.04293833673000336, -0.024881601333618164, -0.047533974051475525, 0.0080895209684968, 0.041395027190446854, -0.03889143466949463, -0.01130903884768486, -0.02179497852921486, 0.025104522705078125, -0.007617953699082136, -0.006254695821553469, -0.021331986412405968, 0.02263522520661354, -0.024435754865407944, -0.025807587429881096, 0.021177655085921288, -0.019394272938370705, 0.0028294031508266926, -0.024229981005191803, -0.041909463703632355, 0.013495395891368389, 0.03731382638216019, -0.001943071256391704, -0.01733652502298355, -0.035839106887578964, -0.006837724708020687, 0.05144369602203369, 0.029442941769957542, 0.04962601885199547, -0.031517837196588516, 0.00857823621481657, -0.03995460271835327, -0.00714638689532876, 0.02203504927456379, -0.08285864442586899, 0.048048410564661026, -0.01728508248925209, -0.010494514368474483, 0.04856284707784653, -0.03806833550333977, 0.013606857508420944, 0.03285537287592888, -0.08807160705327988, 0.052609752863645554, 0.025447482243180275, 0.006104651838541031, 0.011892067268490791, -0.0276081170886755, -0.03923439234495163, 0.002975160488858819, -0.02882561832666397, 0.06317286193370819, -0.024367162957787514, 0.007467909716069698, -0.007442187983542681, 0.0023535490036010742, -0.012492244131863117, 0.003781111678108573, -0.030746182426810265, -0.0038882859516888857, 0.02810540609061718, -0.07078652828931808, 0.0140612768009305, -0.008513931185007095, 0.07078652828931808, 0.05020904541015625, 0.02285814844071865, 0.0341586135327816, -0.010082964785397053, -0.023801283910870552, 0.05734257400035858, 0.011000377126038074, 0.01625620760023594, 0.0025121672078967094, 0.000002901243533415254, 0.012895219959318638, -0.02246374636888504, 0.00682915048673749, 0.005534484051167965, -0.03847988322377205, -0.03847988322377205, -0.0628298968076706, 0.030677590519189835, 0.021417725831270218, -0.06536778807640076, 0.05257545784115791, 0.06622518599033356, 0.012200729921460152, -0.01686495915055275, -0.052678342908620834, 0.03168931603431702, -0.025310298427939415, 0.0042441049590706825, 0.011823476292192936, 0.07332441210746765, -0.002272096462547779, 0.007562223356217146, 0.05092925950884819, 0.011669144965708256, 0.00141148641705513, -0.03944016620516777, 0.03223804756999016, 0.013486822135746479, -0.05086066573858261, 0.004415583796799183, -0.00572311133146286, -0.085259348154068, 0.006357583217322826, 0.0007871956913731992, 0.06468187272548676, 0.0019516452448442578, 0.0172507856041193, -0.021074768155813217, 0.0012142856139689684, -0.0654020830988884, -0.001387908007018268, -0.03923439234495163, -0.007099229842424393, 0.03438153490424156, 0.026527799665927887, -0.018794097006320953, 0.03748530521988869, 0.07311864197254181, 0.02729945443570614, 0.0014489974128082395, -0.06766560673713684, -0.0322723463177681, -0.020011598244309425, 0.018879836425185204, -0.0026364894583821297, 0.021297689527273178, 0.042389605194330215, 0.02851695567369461, 0.03559903800487518, -0.01778237149119377, 0.058988772332668304, -0.02251519076526165, -0.01598184183239937, -0.025876179337501526, 0.03251241520047188, -0.04094918072223663, -0.004089773632586002, -0.015527422539889812, 0.018725505098700523, -0.012680871412158012, 0.03472449630498886, 0.04458453506231308, -0.014755766838788986, -0.004822846502065659, -0.02179497852921486, -0.02789963036775589, -0.03937157616019249, 0.008925480768084526, 0.0051272218115627766, 0.025344593450427055, 0.012320765294134617, 0.025430332869291306, -0.018228216096758842, 0.01357256155461073, 0.048014115542173386, 0.08779723942279816, -0.008642541244626045, 0.024487199261784554, 0.018331103026866913, -0.03810263052582741, 0.05771982669830322, 0.0017405117396265268, 0.011094690300524235, -0.00884831603616476, -0.018999870866537094, 0.012543687596917152, -0.025516072288155556, -0.003729667980223894, 0.023698395118117332, 0.004835707601159811, 0.02362980507314205, -0.0058645810931921005 ]
717,807
pytorch_optimizer.optimizer.rotograd
_rep_grad
null
def _rep_grad(self): super()._rep_grad() grad_norms = [torch.linalg.norm(g, keepdim=True).clamp_min(1e-15) for g in self.original_grads] if self.initial_grads is None or self.counter == self.burn_in_period: self.initial_grads = grad_norms conv_ratios = [torch.ones((1,)) for _ in range(len(self.initial_grads))] else: conv_ratios = [x / y for x, y, in zip(grad_norms, self.initial_grads)] self.counter += 1 alphas = [x / torch.clamp(sum(conv_ratios), 1e-15) for x in conv_ratios] weighted_sum_norms = sum(a * g for a, g in zip(alphas, grad_norms)) return sum(g / n * weighted_sum_norms for g, n in zip(self.original_grads, grad_norms))
(self)
[ -0.051239013671875, -0.04436960816383362, 0.022353723645210266, 0.0377441942691803, 0.0006135074072517455, 0.013363434933125973, -0.019632237032055855, -0.04985011741518974, 0.023329704999923706, 0.010876559652388096, -0.006545643322169781, 0.019388241693377495, 0.0632886290550232, 0.04099120944738388, -0.026182573288679123, 0.006775561720132828, -0.01842164434492588, 0.041103824973106384, -0.02171558141708374, -0.046696946024894714, -0.0016868520760908723, -0.059910230338573456, -0.015418626368045807, 0.06985773146152496, -0.08258302509784698, 0.0006047094939276576, -0.0020786523818969727, -0.01036980003118515, -0.04684709757566452, 0.02638903073966503, 0.01734243519604206, -0.05732012540102005, 0.032826751470565796, -0.02903544157743454, 0.020045151934027672, -0.044782523065805435, 0.005499278660863638, -0.007188477087765932, -0.036768216639757156, -0.018168264999985695, 0.04091613367199898, -0.0014886059798300266, 0.01913486234843731, -0.014611564576625824, -0.003873425303027034, 0.015991076827049255, -0.03284551948308945, 0.03654298931360245, -0.03539808839559555, 0.02291679009795189, 0.0033971653319895267, -0.042793020606040955, 0.007085248362272978, 0.042342569679021835, 0.034328263252973557, 0.06779315322637558, 0.0512765496969223, 0.02614503540098667, 0.014527104794979095, -0.05626906827092171, 0.040841057896614075, -0.09346897155046463, 0.0071603236719965935, -0.04215488210320473, 0.006709870882332325, -0.024793677031993866, -0.03723743557929993, -0.016047382727265358, 0.053528815507888794, -0.017736582085490227, -0.0017067940207198262, 0.02948589436709881, -0.01622568815946579, -0.0512765496969223, -0.03509778529405594, -0.012884828262031078, 0.04786061495542526, -0.029467124491930008, 0.012575142085552216, -0.08964011818170547, 0.04174196347594261, 0.011974538676440716, -0.015765849500894547, 0.03149416297674179, 0.03201968967914581, -0.06392677128314972, -0.05386665463447571, -0.026989633217453957, 0.021415280178189278, -0.046997249126434326, 0.02730870433151722, 0.001360743073746562, 0.06989526748657227, -0.009900578297674656, 0.03930201381444931, 0.029335742816329002, -0.07244783639907837, -0.038438644260168076, 0.033539969474077225, 0.001998884603381157, -0.007165015675127506, 0.039039246737957, -0.055743541568517685, 0.02171558141708374, 0.040878597646951675, 0.012471913360059261, -0.006808407139033079, -0.07785326987504959, -0.024474605917930603, -0.02516905404627323, -0.006109267007559538, 0.0027637160383164883, 0.0027777927462011576, -0.006845945026725531, -0.029898809269070625, -0.021021133288741112, -0.001643449068069458, -0.03359627723693848, 0.04418191686272621, 0.08183226734399796, 0.03703097999095917, 0.016601065173745155, -0.01575646549463272, 0.024962596595287323, -0.013607430271804333, 0.031588006764650345, -0.0031203245744109154, 0.04557081311941147, 0.026539180427789688, -0.024962596595287323, 0.0028129841666668653, 0.03196338564157486, -0.039039246737957, -0.008530450984835625, 0.06632918119430542, -0.009004364721477032, -0.009529893286526203, 0.014808638021349907, 0.019059786573052406, 0.05172700434923172, -0.002953750779852271, 0.015221552923321724, 0.01659168116748333, 0.06396430730819702, 0.024568449705839157, 0.07507547736167908, -0.0011918231612071395, 0.09955008327960968, -0.020364223048090935, -0.02002638392150402, 0.019425779581069946, 0.031100016087293625, 0.043093323707580566, 0.020777137950062752, 0.022822944447398186, 0.027627775445580482, -0.06298832595348358, 0.04729755222797394, -0.037706658244132996, -0.014592795632779598, -0.021096209064126015, -0.04365639016032219, -0.015071402303874493, -0.010970404371619225, -0.024286916479468346, -0.028847752138972282, 0.04339362680912018, -0.03979000449180603, -0.03577346354722977, 0.04665940999984741, 0.03384027257561684, -0.09061609953641891, 0.02755269967019558, -0.014780484139919281, 0.014761715196073055, 0.07747789472341537, 0.0064283376559615135, -0.012875444255769253, -0.05292821303009987, 0.047973230481147766, 0.03049941174685955, -0.053641427308321, 0.04440714418888092, -0.04973750188946724, 0.02271033264696598, 0.024943826720118523, -0.005180208012461662, -0.02468106336891651, 0.03385904058814049, 0.008506990037858486, 0.0002690693363547325, -0.0075873155146837234, 0.009482971392571926, -0.030649563297629356, 0.008741600438952446, -0.02242879942059517, -0.019669774919748306, -0.0077562350779771805, 0.010548104532063007, -0.015390472486615181, -0.07334873825311661, -0.04444468393921852, -0.007413703482598066, -0.02199711464345455, 0.010651333257555962, -0.0536038912832737, -0.018553027883172035, 0.03847618028521538, 0.01754889264702797, 0.004856444895267487, -0.009412587620317936, 0.041066285222768784, 0.05484263598918915, -0.012668986804783344, -0.029335742816329002, -0.03701220825314522, 0.04778553918004036, -0.009023133665323257, 0.02590104006230831, -0.021415280178189278, -0.03384027257561684, -0.045720964670181274, 0.017239205539226532, -0.05311590060591698, -0.010332262143492699, -0.030931096524000168, 0.010548104532063007, 0.010229033417999744, -0.005851195193827152, 0.004563181195408106, 0.052102379500865936, -0.024080459028482437, -0.01681690663099289, 0.001106776762753725, 0.07822864502668381, 0.01929439790546894, -0.06955742835998535, 0.03155047073960304, 0.07241030037403107, 0.04290563613176346, -0.049136899411678314, -0.013551123440265656, -0.02631395496428013, 0.05345373973250389, 0.006386107765138149, -0.0027684082742780447, 0.02753393165767193, -0.020364223048090935, -0.0022182457614690065, 0.05788319185376167, -0.045495737344026566, -0.05484263598918915, -0.03369012102484703, 0.0018135419813916087, -0.015277859754860401, 0.0012047267518937588, -0.009553354233503342, 0.0756385400891304, -0.009628430008888245, -0.06865652650594711, 0.02929820492863655, -0.024568449705839157, -0.04947473853826523, -0.009675351902842522, -0.04346870258450508, 0.04065337032079697, 0.037894345819950104, 0.0014463759725913405, -0.023798925802111626, 0.04301824793219566, 0.05386665463447571, 0.04853629693388939, -0.012406222522258759, 0.012518836185336113, 0.008267686702311039, 0.04557081311941147, 0.046021267771720886, 0.06317601352930069, 0.04346870258450508, -0.021790657192468643, 0.0317944660782814, -0.044256992638111115, 0.011571007780730724, 0.012256071902811527, -0.002925597596913576, 0.027909308671951294, 0.002881021471694112, 0.015099555253982544, -0.0006352089112624526, 0.000933751231059432, 0.059609927237033844, 0.009506432339549065, 0.09331881999969482, 0.02443706803023815, 0.036280225962400436, 0.010407337918877602, 0.0329393669962883, 0.010078882798552513, -0.04373146593570709, 0.01972608081996441, 0.020908519625663757, -0.02590104006230831, -0.012781599536538124, 0.025244129821658134, 0.023010633885860443, -0.040090303868055344, -0.01183377206325531, -0.0036669678520411253, 0.04789815470576286, 0.003094517393037677, -0.04515789821743965, -0.035754695534706116, -0.007516932208091021, 0.03216984122991562, 0.026745637878775597, -0.07226014882326126, -0.011721158400177956, -0.02192203886806965, 0.026295185089111328, 0.0464341826736927, -0.02419307269155979, 0.06753039360046387, -0.013260206207633018, 0.05822103098034859, -0.07398688048124313, 0.01805565133690834, 0.0561564564704895, 0.08400946110486984, -0.034009192138910294, -0.01626322604715824, -0.07278567552566528, -0.013710658997297287, 0.0040118456818163395, 0.022766638547182083, -0.034046728163957596, -0.019651006907224655, 0.0901656448841095, -0.04286809638142586, -0.019594699144363403, -0.07770311832427979, 0.022541411221027374, 0.016741830855607986, -0.03582977131009102, 0.05469248443841934, 0.04703478515148163, 0.009665967896580696, 0.02809699811041355, 0.00042816484346985817, -0.012453144416213036, -0.05732012540102005, -0.003976654261350632, -0.03708728402853012, -0.04508282244205475, 0.06456491351127625, 0.03956477716565132, 0.036524221301078796, -0.03686206042766571, -0.03215107321739197, 0.03455348685383797, -0.021809425204992294, -0.037162359803915024, 0.03479748219251633, -0.013504201546311378, 0.07845387607812881, 0.04313085973262787, 0.005846502725034952, -0.043769001960754395, -0.016441529616713524, -0.01887209713459015, -0.005152054596692324, 0.0304618738591671, -0.03196338564157486, -0.02492505870759487, -0.006869405973702669, -0.08078121393918991, -0.031118785962462425, -0.0438816174864769, -0.02271033264696598, 0.05668198689818382, 0.007409011013805866, -0.01612245850265026, 0.011045479215681553, -0.019078556448221207, 0.04485759884119034, 0.031381551176309586, -0.025750888511538506, 0.06644179672002792, -0.055030323565006256, 0.047447700053453445, -0.03787557780742645, 0.016075536608695984, -0.017211053520441055, 0.028866520151495934, 0.0011531123891472816, -0.09677229076623917, 0.0077562350779771805, 0.028678832575678825, 0.03948970139026642, -0.06415199488401413, 0.03299567103385925, 0.011683621443808079, -0.04346870258450508, -0.01158977672457695, 0.013466663658618927, -0.03979000449180603, -0.034290723502635956, 0.04688463360071182, 0.04459483176469803, 0.04046568274497986, 0.07184723019599915, -0.02342354878783226, 0.03808203712105751, 0.0012821484124287963, -0.006911635864526033, 0.024249378591775894, -0.056944750249385834, -0.04958735406398773, -0.05311590060591698, -0.00043168399133719504, 0.05799580737948418, 0.03952723741531372, 0.021283898502588272, 0.030893558636307716, 0.053341127932071686, 0.005930962506681681, -0.030180342495441437, -0.02149035595357418, 0.007348012179136276, -0.06163696572184563, 0.0316818505525589, -0.014226802624762058, 0.0031414395198225975, 0.030649563297629356, -0.004771985113620758, 0.03363381326198578, -0.011289474554359913, 0.01438633818179369, 0.061111439019441605, -0.023817695677280426, -0.040090303868055344, 0.030161572620272636, -0.05150177702307701, 0.016723062843084335, -0.06430214643478394, 0.004847060423344374, -0.03742512688040733, -0.020833445712924004, -0.06028560921549797, -0.09204253554344177, 0.0075873155146837234, -0.01880640722811222, -0.006958558224141598, 0.017276743426918983, 0.03658052533864975, -0.02755269967019558, 0.016657371073961258, 0.0020012306049466133, -0.013100670650601387, -0.005546201020479202, 0.009787965565919876, 0.010219649411737919, 0.031043710187077522, -0.01305374875664711, 0.02976742573082447, 0.012237302958965302, -0.013766965828835964, 0.05803334340453148, 0.015784619376063347, -0.051351625472307205, 0.024981364607810974, 0.0378568097949028, -0.014001576229929924, 0.014555257745087147, -0.06760546565055847, -0.01852487400174141, -0.014883712865412235, -0.05679459869861603, 0.03566085174679756, 0.035266704857349396, -0.02631395496428013, -0.04016537964344025, -0.027383780106902122, 0.006799022667109966, 0.03121262975037098, -0.012490682303905487, 0.02468106336891651, -0.035735927522182465, 0.0463591068983078, 0.03873894736170769, 0.032338760793209076, -0.019078556448221207, -0.03763158246874809, -0.000669814005959779, 0.05105132609605789, -0.0632510855793953, -0.0243807602673769, 0.003103901632130146, -0.009468894451856613, 0.07105893641710281, 0.01948208548128605, 0.012124689295887947, -0.011383319273591042, -0.030405567958950996, 0.04726001247763634, 0.006020114757120609, -0.024512143805623055, -0.04838614538311958, 0.039377085864543915, -0.011674236506223679, 0.015456164255738258, 0.015033864416182041, -0.014226802624762058, -0.04249272122979164, 0.010097651742398739, 0.01618815027177334, -0.04680956155061722, -0.024024153128266335, 0.0015343551058322191, 0.027627775445580482, -0.05345373973250389, -0.040353067219257355, 0.06272555887699127, -0.09189238399267197, -0.017051517963409424, -0.0031109401024878025, 0.024549681693315506, 0.02021407149732113, -0.02124636061489582, -0.006860021501779556, -0.01050118263810873, 0.00819261185824871, 0.02389276959002018, 0.057470276951789856, 0.02096482738852501, 0.023235859349370003, -0.006024807225912809, -0.006967942696064711, -0.10615672171115875, -0.03997769206762314, -0.01659168116748333, -0.003530893474817276, 0.012969288975000381, 0.031043710187077522, -0.047184936702251434, -0.04489513486623764, 0.03658052533864975, 0.03121262975037098, -0.02119005285203457, 0.006104574538767338, -0.004720370750874281, -0.08183226734399796, 0.005105132237076759, -0.0438440777361393, 0.03243260458111763, 0.007592007517814636, 0.05563092976808548, -0.04609634354710579, 0.00016569392755627632, 0.007629545405507088, 0.019200554117560387, -0.02584473229944706, -0.09414464980363846, 0.05807088315486908, -0.007460625376552343, -0.04365639016032219, 0.008370915427803993, 0.008098767139017582, 0.034572258591651917, -0.021358972415328026, 0.03346489369869232, -0.023611238226294518, -0.002000057604163885, -0.018215186893939972, 0.044744983315467834, 0.0014979903353378177, -0.04361885040998459, 0.0329018272459507, -0.06805592030286789, 0.05675705894827843, -0.05758289247751236, 0.02736501209437847, -0.04564588889479637, 0.003157862229272723, -0.032094765454530716, 0.011702390387654305, 0.05878409743309021, -0.051877155900001526, 0.07027064263820648, 0.03248891234397888, -0.06944481283426285, -0.0438816174864769, 0.010961019434034824, -0.010548104532063007, -0.06250033527612686, -0.026539180427789688, -0.011786850169301033, -0.0731985867023468, 0.025075208395719528, 0.004861136898398399, 0.019688542932271957, -0.008445991203188896, 0.019707312807440758, 0.01378573477268219, -0.0060154227539896965, -0.05082609876990318, -0.015709543600678444, 0.02999265305697918, -0.01563446782529354, 0.01636645384132862, -0.0512014739215374, -0.004518605303019285, 0.01817764900624752, 0.011486547999083996, -0.032582756131887436, -0.03188830986618996, -0.07973015308380127, -0.04605880379676819, 0.0040564220398664474, 0.05412941798567772, 0.06914451718330383, -0.03753773868083954, 0.010773330926895142, -0.01880640722811222, 0.01840287633240223, -0.010970404371619225, 0.01626322604715824, 0.05713243782520294, -0.02143404819071293, -0.017295513302087784, -0.0010363934561610222, -0.019575931131839752, -0.012546989135444164, -0.004389569163322449, -0.009947501122951508, 0.014470797963440418, 0.008572680875658989, 0.011392703279852867, 0.01195576973259449, 0.0030475950334221125, -0.05885917320847511, 0.04542066529393196, -0.012622064910829067, -0.013269590213894844, -0.016525989398360252, -0.07755296677350998, -0.016601065173745155, 0.005503971129655838, -0.0390767864882946, -0.003094517393037677, 0.007906385697424412, -0.008225456811487675, 0.03806326538324356, 0.0011818521888926625, -0.012753446586430073, -0.020626986399292946, 0.023554930463433266, 0.019087940454483032, 0.05457987263798714, 0.024005383253097534, -0.040841057896614075, 0.025750888511538506, 0.028866520151495934, 0.03096863441169262, -0.028134534135460854, 0.006193726789206266, 0.012894213199615479, 0.004992519039660692, 0.0015214515151455998, 0.03650544956326485, -0.04361885040998459, -0.07259798794984818, -0.004903367254883051, -0.07383672893047333, 0.03851372003555298, -0.0033056670799851418, -0.0035965845454484224, 0.000024340877644135617, 0.011176861822605133, 0.03155047073960304, 0.009966269135475159, 0.009473586454987526, -0.02511274628341198, -0.037650350481271744, 0.010182111524045467, 0.03434703126549721, 0.017267359420657158, -0.013569892384111881, 0.022860482335090637, 0.03365258127450943, 0.04301824793219566, -0.016666755080223083, -0.026670563966035843, 0.017013980075716972, -0.020063921809196472, 0.06141173839569092, -0.02340478077530861, -0.029072977602481842, -0.01111117098480463, 0.0231795534491539, -0.0438440777361393, 0.05446725711226463, 0.014489566907286644, -0.02272910065948963, -0.01378573477268219, 0.009379742667078972, 0.009816118516027927, 0.025018902495503426, 0.020833445712924004, -0.05442972108721733, 0.04973750188946724, 0.01695767417550087, 0.06054837256669998, -0.034572258591651917, 0.029711119830608368, 0.0009208476403728127, -0.017727196216583252, 0.01876886934041977, -0.03216984122991562, -0.03414057195186615, -0.01451772078871727, 0.013128823600709438, 0.04466990754008293, 0.01598169282078743, 0.04245518147945404, 0.00011884506966453046, -0.017501970753073692, 0.05713243782520294, 0.0036059690173715353, -0.06524059176445007, -0.028472375124692917, 0.024005383253097534, 0.017107823863625526, 0.05018795654177666, -0.013476047664880753, 0.007859463803470135, 0.03742512688040733, 0.0438440777361393, 0.03027418628334999, -0.03665560111403465, 0.0053397431038320065, -0.031043710187077522, -0.017145361751317978, -0.0164321456104517, 0.01256575807929039, -0.017511354759335518, 0.036223918199539185, 0.00939381867647171, -0.06771808117628098, 0.023573700338602066, -0.05934716388583183, 0.08018060773611069, 0.0731610506772995, -0.007925154641270638, -0.008319301530718803, 0.019181784242391586, -0.04756031557917595, 0.049925193190574646, -0.0660288855433464, -0.0438440777361393, -0.05566846579313278, 0.02413676492869854, -0.03776296600699425, 0.0329018272459507, 0.027383780106902122, -0.004851752892136574, 0.02755269967019558, 0.012387453578412533, 0.009511124342679977 ]
717,814
pytorch_optimizer.optimizer.rotograd
backward
Compute the backward computations for the entire model. It also computes the gradients for the rotation matrices. :param losses: Sequence[torch.Tensor]. losses. :param backbone_loss: Optional[torch.Tensor]. backbone loss.
def backward(self, losses: Sequence[torch.Tensor], backbone_loss=None, **kwargs) -> None: r"""Compute the backward computations for the entire model. It also computes the gradients for the rotation matrices. :param losses: Sequence[torch.Tensor]. losses. :param backbone_loss: Optional[torch.Tensor]. backbone loss. """ if not self.training: raise AssertionError('Backward should only be called when training') if self.iteration_counter in (0, self.burn_in_period): for i, loss in enumerate(losses): self.initial_losses[i] = loss.item() if self.normalize_losses and backbone_loss is not None: self.initial_backbone_loss = backbone_loss.item() self.iteration_counter += 1 for i in range(len(losses)): loss = losses[i] / self.initial_losses[i] self.losses[i] = loss.item() if self.normalize_losses: loss.backward(**kwargs) else: losses[i].backward(**kwargs) if backbone_loss is not None: if self.normalize_losses: (backbone_loss / self.initial_backbone_loss).backward(retain_graph=True) else: backbone_loss.backward(retain_graph=True) self.rep.backward(self._rep_grad())
(self, losses: Sequence[torch.Tensor], backbone_loss=None, **kwargs) -> NoneType
[ -0.023496001958847046, 0.00009526938811177388, -0.06176304817199707, 0.003106755670160055, -0.048591893166303635, -0.04643390700221062, -0.0678277313709259, -0.0056368084624409676, 0.033653419464826584, 0.018054530024528503, -0.018454501405358315, 0.01581282913684845, 0.011748000979423523, 0.04788496345281601, 0.03558816388249397, 0.07244135439395905, 0.00438108341768384, 0.023105332627892494, 0.012789787724614143, -0.007520395331084728, -0.015859337523579597, -0.05145680531859398, -0.009664428420364857, 0.014519897289574146, -0.04654552415013313, -0.030323423445224762, -0.00876216683536768, 0.021617066115140915, 0.010575992055237293, 0.06503723561763763, -0.020091593265533447, -0.04676876589655876, -0.029597893357276917, -0.01833357848227024, 0.018389388918876648, -0.008250575512647629, -0.023477399721741676, 0.04595021903514862, -0.0009278409415856004, -0.026007451117038727, 0.03348599001765251, -0.01538495160639286, 0.0809616819024086, 0.03268604725599289, 0.015357047319412231, -0.01158057153224945, -0.0013150227023288608, -0.029021190479397774, -0.0009092376567423344, 0.015403554774820805, -0.039513468742370605, -0.012882804498076439, 0.023030919954180717, -0.032965097576379776, 0.03709503635764122, 0.02468661591410637, 0.03713224083185196, 0.07043220102787018, 0.005487981718033552, -0.025170302018523216, 0.03988553583621979, -0.10157416760921478, -0.031086159870028496, 0.01349671371281147, 0.05205211043357849, 0.009427236393094063, 0.03183029219508171, -0.013757160864770412, 0.046694353222846985, 0.02444477193057537, -0.004334575496613979, 0.043717820197343826, -0.03778335824608803, 0.007669221609830856, 0.005580998491495848, -0.029597893357276917, -0.007422727532684803, 0.01857542246580124, -0.051977697759866714, 0.0016998790670186281, 0.005915858317166567, -0.004581069573760033, -0.025188906118273735, 0.013366490602493286, -0.003583465935662389, -0.051531217992305756, -0.04382944107055664, -0.02342158928513527, 0.03733687847852707, 0.00020943277922924608, -0.043531786650419235, -0.054507751017808914, 0.014826851896941662, -0.0019161427626386285, -0.010938756167888641, -0.05331713706254959, -0.1024671271443367, -0.0013208362506702542, -0.022900696843862534, -0.027570132166147232, 0.03569978475570679, 0.014743137173354626, -0.0336720235645771, 0.012743279337882996, 0.05205211043357849, 0.029579291120171547, -0.0632513165473938, -0.04464798793196678, 0.03017459809780121, -0.06090729311108589, -0.011134091764688492, 0.06496281921863556, 0.03610906004905701, -0.011524761095643044, -0.06005154177546501, -0.0143524669110775, 0.0036904350854456425, -0.03158845007419586, -0.025598179548978806, 0.03644391894340515, -0.0012371212942525744, -0.009138884954154491, -0.007827349938452244, 0.022193768993020058, -0.01664997823536396, -0.011785208247601986, 0.017580144107341766, 0.036164868623018265, 0.034230124205350876, -0.035513751208782196, -0.016742995008826256, -0.008571483194828033, -0.05335434526205063, -0.04591301083564758, 0.0290956050157547, 0.016380229964852333, 0.0012743279803544283, 0.02022181637585163, -0.027365494519472122, 0.03558816388249397, 0.025635385885834694, 0.024295946583151817, 0.06764169782400131, 0.07333431392908096, -0.0033230194821953773, 0.026286501437425613, 0.039327435195446014, -0.006678594741970301, -0.00990627147257328, 0.008831929415464401, 0.04152262583374977, 0.03473241254687309, 0.04345737397670746, -0.050526637583971024, -0.038694921880960464, 0.006920437794178724, -0.044387537986040115, 0.06239556148648262, -0.03419291600584984, 0.057447075843811035, 0.02064969390630722, 0.03370922803878784, -0.030323423445224762, -0.03832285478711128, 0.03183029219508171, 0.006622784771025181, 0.034881237894296646, 0.037411291152238846, -0.0004624670837074518, 0.017328999936580658, 0.033002302050590515, -0.0017777804750949144, -0.025170302018523216, 0.001402225811034441, 0.015096600167453289, -0.01856612041592598, -0.004253185819834471, 0.008120352402329445, -0.040778495371341705, 0.023961085826158524, 0.05182887241244316, -0.04885233938694, 0.006822770461440086, -0.06797655671834946, 0.014491992071270943, 0.0032486061099916697, -0.060163162648677826, 0.02109617367386818, 0.04580139368772507, -0.033020906150341034, -0.012901407666504383, 0.004474100191146135, 0.0730738714337349, -0.017254585400223732, 0.00842730700969696, -0.0012138671008870006, 0.05372640863060951, 0.034899841994047165, 0.08944480121135712, -0.00100283557549119, -0.0312349870800972, 0.007022756151854992, 0.031904708594083786, -0.01683601178228855, -0.03839726746082306, -0.0070506613701581955, -0.010910851880908012, -0.004529910162091255, -0.03690900281071663, -0.0501173660159111, 0.042080726474523544, 0.011329426430165768, 0.023496001958847046, -0.02256583608686924, 0.04810820519924164, 0.0029114207718521357, 0.03054666332900524, 0.010520181618630886, 0.05097311735153198, -0.021431032568216324, -0.038062408566474915, -0.05964226648211479, -0.05354037508368492, -0.028593314811587334, -0.0437922328710556, -0.015403554774820805, 0.015543079935014248, -0.021449636667966843, 0.03556956350803375, 0.046731557697057724, 0.0005982132279314101, 0.02801661193370819, -0.05558674409985542, 0.003143962472677231, 0.0539124421775341, -0.04200631380081177, -0.0705438181757927, 0.0035811406560242176, 0.035309117287397385, -0.005199630279093981, -0.004148541949689388, -0.04442474618554115, -0.03713224083185196, 0.03558816388249397, 0.06477678567171097, 0.017022045329213142, 0.057447075843811035, -0.019235840067267418, -0.05287065729498863, 0.01833357848227024, -0.03333716467022896, 0.031309399753808975, -0.006590228993445635, 0.03836006298661232, -0.003857864998281002, -0.0437922328710556, 0.010641103610396385, -0.03702062368392944, 0.03501146286725998, 0.02130080945789814, 0.05212652310729027, -0.044834017753601074, -0.031309399753808975, -0.0242773424834013, -0.023291366174817085, 0.019347460940480232, 0.016315117478370667, -0.02636091597378254, 0.001882424228824675, 0.01750573143362999, 0.05339154973626137, -0.02384946681559086, -0.08431027829647064, -0.01031554490327835, 0.00015754693595226854, 0.05845165625214577, 0.02448197826743126, -0.03205353394150734, 0.048777926713228226, -0.015543079935014248, 0.049261610954999924, -0.07500861585140228, -0.05082429200410843, 0.01242702268064022, 0.05707500874996185, 0.02719806507229805, -0.02025902457535267, -0.07244135439395905, 0.045243293046951294, 0.02829566039144993, 0.1249399483203888, -0.035532355308532715, 0.021654272451996803, 0.0392158143222332, -0.014845455065369606, -0.05432171747088432, 0.034676603972911835, -0.010715516284108162, 0.04870351031422615, -0.011217806488275528, -0.022007737308740616, -0.012036353349685669, 0.06239556148648262, -0.004260161891579628, -0.016566263511776924, -0.035532355308532715, 0.04010877385735512, 0.0042996942065656185, 0.007399473339319229, 0.018835868686437607, -0.030193200334906578, -0.034248724579811096, 0.0127711845561862, 0.019942767918109894, -0.030881524085998535, -0.03158845007419586, 0.013840875588357449, -0.04170865938067436, -0.003106755670160055, -0.011878225021064281, 0.013115345500409603, 0.00011743350478354841, 0.016398834064602852, 0.05242417752742767, -0.016343023627996445, 0.00905516929924488, -0.024072706699371338, 0.021858910098671913, 0.0051345182582736015, 0.018212657421827316, -0.00632978230714798, -0.0316256582736969, 0.032797668129205704, 0.03839726746082306, -0.020965950563549995, -0.011403840035200119, 0.005301948171108961, 0.03800659999251366, 0.045652564615011215, 0.020482264459133148, 0.03350459411740303, -0.02024042047560215, -0.03264883905649185, 0.011245711706578732, 0.014817550778388977, 0.04010877385735512, 0.007743635214865208, 0.06034919619560242, 0.04833144322037697, 0.0025765609461814165, -0.05603322386741638, 0.0501173660159111, -0.05231255665421486, 0.07456213980913162, -0.0825243592262268, 0.010789929889142513, -0.008590086363255978, -0.008604039438068867, 0.028184041380882263, -0.09048658609390259, -0.05034060403704643, 0.022305389866232872, -0.07329711318016052, 0.03516028821468353, 0.00970163568854332, -0.001261538127437234, -0.02678879164159298, -0.001580120180733502, 0.005562394857406616, -0.05034060403704643, 0.022472819313406944, 0.018389388918876648, 0.04725245386362076, 0.05309389531612396, -0.05547512322664261, -0.017235983163118362, 0.026825997978448868, -0.014557103626430035, 0.10856901854276657, 0.01816614903509617, -0.0075296969152987, -0.0602375753223896, -0.010250433348119259, -0.01872424967586994, 0.10209506005048752, 0.07139956951141357, 0.002502147573977709, -0.06075846776366234, 0.004039247520267963, -0.06098170951008797, 0.00016205242718569934, -0.004560140892863274, -0.038062408566474915, -0.026472534984350204, -0.09398400783538818, 0.01999857649207115, 0.0569261834025383, 0.05041501671075821, 0.010473673231899738, -0.01816614903509617, -0.0278305783867836, 0.004822912625968456, -0.0485546849668026, 0.018863774836063385, -0.03270465135574341, 0.019440477713942528, 0.019459079951047897, 0.04382944107055664, 0.001587096368893981, -0.008348243311047554, 0.018268467858433723, -0.03744849935173988, -0.08364056050777435, 0.001169102848507464, 0.06965085864067078, 0.016956932842731476, -0.03244420513510704, 0.0021475215908139944, 0.0320163257420063, 0.03564397618174553, 0.02171008288860321, 0.06518606096506119, 0.049261610954999924, -0.012892105616629124, 0.014715231955051422, 0.029597893357276917, -0.06979968398809433, -0.04368061199784279, -0.054879818111658096, 0.0012510737869888544, -0.019366063177585602, -0.08244995027780533, -0.03287208080291748, -0.030862919986248016, 0.034509170800447464, 0.0014312935527414083, 0.04580139368772507, 0.009664428420364857, -0.014464086852967739, -0.011003868654370308, -0.006655340548604727, -0.03188610449433327, -0.027718957513570786, 0.002074270974844694, -0.032593030482530594, -0.02615627832710743, 0.05119635909795761, -0.04241558536887169, -0.03906698897480965, 0.022249579429626465, -0.045243293046951294, 0.03880654275417328, -0.0037206655833870173, 0.006655340548604727, -0.03125359117984772, 0.00376484845764935, -0.03134660795331001, -0.04118776693940163, 0.02781197428703308, -0.0014754764270037413, 0.0036532285157591105, -0.004360154736787081, 0.0374671034514904, 0.028742142021656036, -0.02146824076771736, -0.015329142101109028, 0.05837724357843399, -0.03601604327559471, 0.0033648768439888954, 0.04293648153543472, -0.012594453059136868, -0.05499143525958061, 0.047959379851818085, -0.006469307001680136, -0.03270465135574341, 0.0063437349162995815, 0.004455497022718191, -0.06068405508995056, -0.014464086852967739, -0.045206084847450256, -0.0370764322578907, -0.009971383959054947, -0.049224406480789185, -0.004781055264174938, 0.027886388823390007, 0.0301187876611948, -0.0399971529841423, 0.008097098208963871, 0.034025486558675766, 0.019254444167017937, -0.03884374722838402, -0.05607042834162712, -0.011850319802761078, 0.08751004934310913, -0.015254728496074677, 0.011227108538150787, -0.011375934816896915, -0.00029692656244151294, -0.010752723552286625, -0.0422295518219471, 0.05182887241244316, 0.01095736026763916, 0.015952354297041893, -0.04267603158950806, -0.06194908171892166, -0.008264528587460518, -0.0009051681845448911, 0.008483117446303368, 0.015161711722612381, -0.031141970306634903, 0.007055311929434538, 0.012361911125481129, -0.00536706019192934, 0.053131103515625, -0.08267318457365036, -0.031737275421619415, -0.0028579363133758307, 0.021226396784186363, 0.08237553387880325, -0.0009133071289397776, 0.019868353381752968, 0.012994424439966679, 0.011348029598593712, 0.016184894368052483, -0.003523005172610283, 0.012296799570322037, -0.007836651988327503, 0.028184041380882263, 0.02991415001451969, -0.009245853871107101, -0.04844306409358978, 0.03458358719944954, 0.017756875604391098, 0.05447054281830788, 0.003169541945680976, -0.052386969327926636, 0.00210682675242424, -0.07407844811677933, -0.06261879950761795, 0.0028742142021656036, 0.005980969872325659, 0.015087299048900604, 0.010724818333983421, -0.00029968799208290875, -0.08021754771471024, -0.007287853397428989, -0.00024591272813268006, -0.02784918062388897, -0.02740270085632801, 0.009269108064472675, -0.045615360140800476, 0.00769247580319643, 0.0028509600088000298, 0.009496998973190784, 0.017580144107341766, 0.052647415548563004, -0.0863194391131401, 0.07679453492164612, 0.02401689626276493, 0.01752433367073536, -0.05171725153923035, -0.0075157443061470985, 0.06633946299552917, 0.019087014719843864, 0.04085290804505348, 0.06965085864067078, 0.031960517168045044, -0.0447596050798893, -0.006892533041536808, 0.046917591243982315, -0.004467124119400978, -0.0005624599871225655, 0.040145982056856155, -0.03274185582995415, 0.004560140892863274, 0.02444477193057537, -0.0020242745522409678, -0.05930740758776665, 0.023291366174817085, 0.0057670315727591515, 0.03649972751736641, -0.061651427298784256, -0.04743848368525505, -0.003888095496222377, 0.035085875540971756, 0.03316973149776459, -0.05964226648211479, 0.04420150816440582, 0.04003436118364334, -0.028202645480632782, 0.004560140892863274, 0.02148684300482273, 0.009971383959054947, -0.03899257630109787, 0.005004295147955418, 0.014185037463903427, -0.055996015667915344, -0.013143250718712807, -0.05290786176919937, 0.057261042296886444, 0.03685319051146507, 0.03966229408979416, 0.08341731876134872, -0.00781339779496193, -0.034453362226486206, 0.01771966926753521, -0.07523185759782791, 0.03947626054286957, 0.021040363237261772, 0.011143392883241177, -0.03305811434984207, 0.01706855371594429, 0.012520039454102516, 0.005622855853289366, -0.02613767609000206, -0.003999715205281973, -0.00833429116755724, -0.002864912385120988, 0.005464727524667978, 0.033597610890865326, 0.01875215396285057, -0.0015510524390265346, -0.010092305019497871, 0.06410706788301468, -0.03940184786915779, 0.01643604040145874, 0.012036353349685669, -0.06172583997249603, 0.021449636667966843, -0.00506940670311451, 0.0005307762185111642, -0.06109332665801048, 0.06477678567171097, 0.019459079951047897, 0.01327347382903099, -0.018305674195289612, 0.049038372933864594, 0.019459079951047897, 0.010808533057570457, -0.07664570957422256, -0.008557531051337719, -0.023533210158348083, 0.015459365211427212, -0.001249911030754447, -0.05454495549201965, 0.0290956050157547, 0.018240563571453094, 0.042452793568372726, 0.022491423413157463, 0.03264883905649185, -0.0240354984998703, 0.02827705815434456, 0.014668723568320274, -0.017440618947148323, -0.018082434311509132, 0.026286501437425613, 0.05145680531859398, 0.01795221120119095, 0.002217284170910716, -0.02126360312104225, 0.00981325563043356, -0.06819979846477509, 0.005618204828351736, 0.015217522159218788, -0.002062643878161907, 0.002294022822752595, -0.0032788363751024008, 0.04330854490399361, -0.014491992071270943, -0.028593314811587334, -0.006511164829134941, -0.05376361683011055, -0.03037923388183117, -0.005562394857406616, -0.028091024607419968, -0.018277769908308983, -0.04643390700221062, -0.032574426382780075, 0.024202929809689522, -0.019254444167017937, 0.022882092744112015, 0.060646846890449524, -0.0399971529841423, 0.008478466421365738, 0.031737275421619415, 0.03140241652727127, 0.01076202467083931, 0.09792791306972504, -0.038694921880960464, -0.05595880746841431, 0.007701777387410402, 0.010566690005362034, 0.05320551618933678, -0.005329853389412165, 0.01752433367073536, 0.025635385885834694, 0.01528263371437788, -0.013868780806660652, 0.00896215345710516, -0.038285646587610245, -0.02533773146569729, 0.005785634741187096, -0.003457893617451191, 0.045838598161935806, -0.021598463878035545, 0.04762451723217964, -0.003378829453140497, -0.019328856840729713, -0.053651995956897736, -0.016556961461901665, -0.0008307548705488443, -0.010603896342217922, 0.033597610890865326, -0.01983114704489708, 0.028314264491200447, -0.06392103433609009, 0.04531770572066307, 0.0013638564851135015, -0.042043522000312805, 0.012622357346117496, -0.061018913984298706, 0.022863490507006645, 0.07459934055805206, -0.0242773424834013, 0.03119778074324131, -0.09532345086336136, 0.004674085881561041, 0.010269036516547203, -0.009376076981425285, 0.0029416512697935104, 0.027998007833957672, -0.038248442113399506, 0.04412709176540375, 0.01528263371437788, 0.016556961461901665, -0.04408988729119301, 0.035085875540971756, -0.028723537921905518, -0.009710936807096004, 0.03313252702355385, 0.02803521417081356, 0.003948556259274483, -0.050489429384469986, 0.05443333461880684, -0.04661994054913521, 0.04914999008178711, -0.10700634121894836, -0.0065576727502048016, 0.014585008844733238, -0.06280483305454254, 0.055140264332294464, -0.021654272451996803, -0.00035055645275861025, -0.018454501405358315, 0.049633678048849106, 0.0198497511446476, 0.04803379252552986, -0.044387537986040115, -0.04319692775607109, -0.04788496345281601, 0.014715231955051422, -0.0028904920909553766, 0.005227535031735897, 0.0019940442871302366, -0.008534276857972145, 0.02342158928513527, -0.014929170720279217, -0.021040363237261772 ]
717,825
pytorch_optimizer.optimizer.rotograd
forward
Forward the input through the backbone and all heads, returning a list with all the task predictions.
def forward(self, x: Any) -> Sequence[Any]: r"""Forward the input through the backbone and all heads, returning a list with all the task predictions.""" out = self.backbone(x) if isinstance(out, (list, tuple)): rep, extra_out = out[0], out[1:] extra_out = list(extra_out) else: rep = out extra_out = [] if self.training: self.rep = rep preds = [] for i, head in enumerate(self.heads): rep_i = rep if self.training: rep_i = rep.detach().clone() rep_i.requires_grad = True rep_i.register_hook(self._hook(i)) out_i = head(rep_i) if isinstance(out_i, (list, tuple)): preds.append(out_i[0]) extra_out.append(out_i[1:]) else: preds.append(out_i) return preds if len(extra_out) == 0 else preds, extra_out
(self, x: Any) -> Sequence[Any]
[ -0.04703153297305107, 0.001966818468645215, -0.11413661390542984, -0.006118990480899811, -0.015145747922360897, 0.026668110862374306, -0.05387972667813301, 0.0223019327968359, 0.07311990112066269, -0.0038634338416159153, 0.03753826394677162, -0.012192688882350922, 0.0009488738141953945, 0.027084799483418465, 0.0440603569149971, 0.02547239325940609, 0.03840787708759308, 0.017718350514769554, -0.02264615334570408, 0.007704221643507481, 0.027157267555594444, 0.005647950805723667, -0.04159645363688469, 0.02489265240728855, -0.007079187780618668, -0.002873796969652176, 0.0016905353404581547, -0.03527364879846573, -0.003152344608679414, 0.049133095890283585, -0.01902276836335659, -0.008116381242871284, -0.0431545116007328, -0.04703153297305107, 0.01593383401632309, 0.020200368016958237, -0.02547239325940609, 0.05174193158745766, -0.005756652448326349, -0.014330485835671425, 0.04040073603391647, -0.11870207637548447, -0.013288762420415878, 0.042973339557647705, -0.03811800479888916, -0.00035780921461991966, -0.00017409230349585414, 0.043226975947618484, 0.06590936332941055, -0.049314264208078384, -0.023914339020848274, -0.06369910389184952, 0.026052134111523628, 0.016703803092241287, 0.04152398556470871, -0.010607458651065826, 0.01618747040629387, 0.03536423295736313, 0.02545427717268467, 0.007400762755423784, 0.0632280632853508, 0.007885390892624855, 0.01581607386469841, 0.004560935311019421, 0.05369855836033821, 0.006580972112715244, -0.008601008914411068, -0.03255610913038254, -0.0436980165541172, -0.026106486096978188, -0.021468553692102432, -0.01565302163362503, 0.008465131744742393, 0.030472664162516594, 0.03601644188165665, 0.006359039805829525, 0.06239468231797218, -0.0009913353715091944, 0.012065870687365532, -0.03469390794634819, 0.0005440738168545067, 0.045654647052288055, -0.12167325615882874, -0.024167975410819054, -0.045944515615701675, -0.06464117765426636, -0.02482018433511257, -0.04163268953561783, -0.05985831469297409, 0.008877292275428772, -0.06471364945173264, 0.007373587694019079, -0.00963820330798626, 0.058408960700035095, 0.012772430665791035, 0.013642042875289917, -0.06978638470172882, -0.058445192873477936, -0.06507598608732224, -0.006485858466476202, -0.04431399330496788, 0.11544103175401688, -0.10399113595485687, 0.031124873086810112, -0.013107594102621078, -0.002837562933564186, -0.048988159745931625, -0.03610702604055405, -0.05670596659183502, -0.04224866256117821, -0.05797415226697922, 0.05163323134183884, -0.01875101588666439, 0.020925045013427734, -0.006223163101822138, -0.027139149606227875, 0.013134769164025784, -0.00814808625727892, -0.03728462755680084, 0.01882348209619522, 0.029947273433208466, 0.012455384247004986, -0.017229193821549416, 0.0039426954463124275, -0.05156076326966286, 0.017808934673666954, 0.05166946351528168, 0.019765563309192657, -0.01631428860127926, -0.09659942984580994, -0.026903631165623665, 0.0007694030646234751, -0.08065654337406158, 0.03880644962191582, -0.0015093660913407803, 0.033244553953409195, -0.0013112123124301434, -0.014122141525149345, -0.021251151338219643, -0.05018387734889984, -0.002767360070720315, -0.008247729390859604, 0.061887409538030624, 0.05348115786910057, -0.005919704679399729, -0.026776811107993126, 0.03482072427868843, 0.005231261253356934, 0.02260991930961609, 0.012727138586342335, 0.010045833885669708, 0.03521929681301117, 0.033353254199028015, -0.061670005321502686, -0.0652209222316742, 0.09717917442321777, -0.0713082104921341, -0.0039630769751966, 0.021432319656014442, 0.023407064378261566, -0.04054567217826843, -0.026015901938080788, -0.013324996456503868, 0.0001704122987575829, 0.016875913366675377, -0.010607458651065826, 0.011558596976101398, 0.0023846400436013937, 0.012989833950996399, 0.04699529707431793, 0.05387972667813301, 0.0074913473799824715, 0.01096073817461729, 0.016848737373948097, 0.007301120087504387, -0.029693637043237686, 0.012654670514166355, -0.0038294645491987467, 0.03728462755680084, 0.06739494949579239, 0.040147099643945694, -0.0224831011146307, -0.030436430126428604, -0.14000758528709412, -0.015000811778008938, -0.0224831011146307, -0.01270902156829834, 0.03371559455990791, 0.020852578803896904, 0.04837218299508095, 0.027737008407711983, -0.016975557431578636, 0.036994755268096924, 0.017935752868652344, -0.030816886574029922, -0.009339273907244205, -0.01938510686159134, 0.02179465815424919, 0.05489427596330643, -0.0702211931347847, -0.0046243444085121155, -0.055763889104127884, 0.05076361820101738, 0.039857231080532074, -0.07283002883195877, 0.013152886182069778, 0.0022691446356475353, -0.0017301661428064108, -0.04453139752149582, -0.05018387734889984, 0.02501947060227394, -0.011132849380373955, 0.0144663630053401, -0.0281174648553133, 0.006227692123502493, -0.018080689013004303, -0.002742449287325144, -0.016866855323314667, 0.07913471758365631, -0.039386190474033356, 0.008265846408903599, -0.023552000522613525, -0.05297388136386871, 0.020146017894148827, 0.004083101637661457, -0.014638473279774189, -0.0037683199625462294, 0.006454153917729855, -0.008985993452370167, -0.0385165773332119, 0.03538234904408455, -0.0018603814532980323, -0.024367261677980423, -0.007133538369089365, 0.06282948702573776, 0.03177708387374878, -0.017935752868652344, -0.02572602964937687, -0.020073549821972847, -0.013777920044958591, 0.024675248190760612, 0.03786436840891838, -0.0077449847012758255, -0.0704023614525795, 0.01884160004556179, 0.02559921145439148, 0.0188959501683712, -0.02482018433511257, -0.05355362221598625, -0.00028647383442148566, -0.0052493782714009285, 0.02583473175764084, -0.01867854781448841, -0.017935752868652344, -0.03460332378745079, -0.030925586819648743, 0.016649452969431877, -0.0383354090154171, 0.02170407399535179, 0.05464063957333565, 0.014520714059472084, 0.02233816497027874, 0.05090855434536934, 0.02804499678313732, -0.027990644797682762, 0.0017358276527374983, -0.046596724539995193, 0.0069750151596963406, 0.021323617547750473, 0.0071244798600673676, 0.09696177393198013, -0.049205563962459564, -0.030635716393589973, -0.020925045013427734, -0.004506584722548723, -0.01423084270209074, -0.011477070860564709, 0.01268184557557106, -0.006109932437539101, 0.007024836726486683, 0.027048565447330475, -0.0934833213686943, -0.043118275701999664, -0.04438646137714386, -0.005362608935683966, -0.026197070255875587, 0.030979938805103302, 0.0223925169557333, 0.01617841236293316, -0.042683470994234085, 0.06938781589269638, -0.010797685943543911, 0.05185063183307648, -0.0283892173320055, 0.0015127630904316902, -0.011911876499652863, -0.049205563962459564, -0.0012602584902197123, 0.055655185133218765, 0.01119625847786665, 0.05953220650553703, -0.027102917432785034, 0.006680615246295929, -0.013252529315650463, -0.03866151347756386, -0.030454548075795174, 0.03554540127515793, 0.046306855976581573, -0.05652479827404022, -0.06373533606529236, 0.030581366270780563, -0.011540479958057404, -0.020236602053046227, -0.033751826733350754, -0.032827865332365036, -0.06406144052743912, -0.004977624397724867, 0.055872589349746704, 0.01091544609516859, 0.00972878746688366, -0.020888812839984894, 0.05101725459098816, 0.010208886116743088, 0.05420583486557007, 0.013288762420415878, 0.05764804780483246, 0.03458520397543907, -0.001279507647268474, -0.043371912091970444, 0.03398734703660011, 0.026052134111523628, 0.007065599784255028, -0.01628711447119713, 0.058372724801301956, -0.08471473306417465, 0.027121033519506454, 0.011848467402160168, 0.07025742530822754, 0.0637715682387352, 0.0046243444085121155, -0.0188053660094738, 0.01271807961165905, -0.021233033388853073, 0.055546484887599945, 0.020544590428471565, 0.029729871079325676, -0.04384295269846916, 0.08225082606077194, 0.05906116962432861, 0.010933563113212585, -0.0215772558003664, 0.011187199503183365, -0.012111162766814232, 0.02206641249358654, -0.0161240603774786, 0.01847020350396633, -0.017392246052622795, -0.026215188205242157, 0.032827865332365036, -0.014212725684046745, 0.02596154995262623, -0.005765710491687059, -0.04732140153646469, 0.03902385011315346, 0.009737846441566944, -0.055329080671072006, -0.014040615409612656, 0.036469366401433945, -0.0006986338412389159, 0.040147099643945694, -0.020146017894148827, 0.02232004888355732, -0.04137905314564705, 0.039277490228414536, -0.05108972266316414, 0.02253745123744011, 0.05637986212968826, 0.013343113474547863, 0.06453248113393784, 0.009153575636446476, 0.00162033224478364, -0.002255556872114539, -0.0013440492330119014, -0.016567924991250038, 0.017020849511027336, -0.011495187878608704, 0.026251420378684998, -0.05728571116924286, 0.09101942181587219, -0.013288762420415878, 0.0372483916580677, -0.06551079452037811, -0.05971337854862213, -0.03181331604719162, -0.0702211931347847, -0.06583689898252487, 0.05989454686641693, 0.03934995457530022, -0.019910497590899467, -0.027664540335536003, 0.024457845836877823, 0.00817073229700327, -0.009909956716001034, 0.01949380896985531, -0.008175261318683624, 0.032990917563438416, 0.03114299103617668, 0.061742473393678665, -0.020925045013427734, 0.015127630904316902, 0.01628711447119713, 0.0390600860118866, -0.00957479327917099, -0.029041428118944168, -0.0042801229283213615, 0.029421882703900337, 0.00312969833612442, 0.013542399741709232, -0.014167433604598045, 0.03916878625750542, 0.04982153698801994, 0.08007679879665375, 0.016866855323314667, 0.02270050346851349, 0.0005290707340463996, 0.048662055283784866, -0.0025680738035589457, 0.033534422516822815, 0.01433954481035471, 0.02204829454421997, -0.04101671278476715, -0.062068577855825424, -0.017455654218792915, -0.02795441262423992, -0.001415384584106505, 0.00318857841193676, 0.02512817271053791, -0.0015908923232927918, 0.004445440135896206, 0.015607728622853756, -0.023950571194291115, 0.026197070255875587, 0.04090801253914833, -0.039458658546209335, -0.0007371322717517614, 0.024023039266467094, -0.05949597433209419, -0.020816344767808914, -0.05989454686641693, -0.000047450768761336803, -0.033371370285749435, -0.00156824616715312, 0.08043913543224335, 0.014484480023384094, -0.0074460553005337715, 0.004422793630510569, -0.02503758668899536, -0.03775566816329956, -0.03467579185962677, 0.016749095171689987, 0.02895084209740162, -0.026360122486948967, 0.03619761019945145, -0.02866097167134285, 0.0008718768949620426, -0.05435076728463173, 0.0158523079007864, 0.008397193625569344, -0.061597537249326706, -0.00927586480975151, 0.02563544549047947, -0.008773120120167732, 0.03257422894239426, -0.027791360393166542, -0.023896221071481705, 0.055292848497629166, 0.033534422516822815, -0.013216295279562473, 0.05645233020186424, -0.055220380425453186, -0.0160334762185812, -0.05739441141486168, 0.0075955200009047985, 0.034023579210042953, -0.011540479958057404, 0.039494890719652176, -0.010725217871367931, 0.0018456615507602692, 0.03811800479888916, -0.02804499678313732, -0.009139987640082836, -0.029331298545002937, 0.009882781654596329, 0.027012331411242485, -0.017274485900998116, 0.006811962928622961, 0.007731396704912186, -0.003401452209800482, 0.05500297620892525, 0.03750203177332878, 0.0223925169557333, -0.026034018024802208, 0.018144099041819572, -0.026903631165623665, -0.017147667706012726, 0.06725002080202103, -0.026468824595212936, -0.023914339020848274, -0.05474933981895447, 0.01425801869481802, -0.02260991930961609, -0.02476583421230316, -0.011694473214447498, -0.00315913837403059, -0.022827323526144028, -0.01435766089707613, 0.010217944160103798, 0.0317046158015728, -0.0223019327968359, -0.01119625847786665, 0.03898761793971062, 0.011015089228749275, -0.001469735405407846, 0.01856984570622444, 0.02887837402522564, 0.0748591274023056, -0.0034173044841736555, -0.007436996791511774, 0.020943162962794304, 0.015517144463956356, 0.01625088043510914, -0.008428898639976978, 0.026088368147611618, 0.027809476479887962, 0.014638473279774189, 0.00558001222088933, 0.02851603738963604, -0.03259234502911568, -0.008881821297109127, 0.007722338195890188, 0.017120491713285446, -0.004687753971666098, -0.036378782242536545, 0.010942621156573296, -0.019783679395914078, -0.04166892170906067, -0.033135849982500076, 0.031161107122898102, -0.05985831469297409, -0.00027727385167963803, -0.1017446368932724, -0.04213996231555939, -0.027139149606227875, 0.03677735477685928, 0.00820243638008833, -0.027483372017741203, 0.007577402982860804, 0.05728571116924286, -0.003510153852403164, 0.027048565447330475, -0.0013225353322923183, -0.03713969141244888, 0.040219567716121674, -0.003867963096126914, -0.014094965532422066, 0.04485750198364258, 0.010344763286411762, -0.01263655349612236, -0.010815802961587906, -0.032918449491262436, 0.05634362995624542, 0.0194394588470459, 0.01288113184273243, 0.02226569876074791, 0.01567113772034645, 0.0010938092600554228, 0.008379076607525349, -0.006282043177634478, -0.01572548970580101, -0.017238251864910126, 0.013397464528679848, -0.04203126206994057, 0.0053988429717719555, -0.01934887282550335, 0.017808934673666954, 0.004859864711761475, -0.007645341567695141, 0.049314264208078384, -0.02232004888355732, -0.01873289793729782, -0.06061922386288643, 0.023805636912584305, 0.013279704377055168, 0.04040073603391647, 0.02558109536767006, -0.030472664162516594, -0.04054567217826843, -0.02570791356265545, -0.020725760608911514, -0.009035815484821796, 0.06275702267885208, 0.04156022146344185, 0.055401548743247986, -0.00648132897913456, -0.017491888254880905, -0.0632280632853508, -0.0820334255695343, 0.017863286659121513, -0.006055581383407116, -0.0282080490142107, 0.03808177262544632, -0.008682535029947758, 0.019874263554811478, -0.022990375757217407, -0.03819047287106514, -0.015598670579493046, 0.027084799483418465, 0.07609107345342636, 0.011939052492380142, 0.023425180464982986, 0.09210643917322159, -0.05656103417277336, -0.018171273171901703, 0.052212972193956375, 0.006037464365363121, 0.008315667510032654, 0.018443027511239052, -0.08304797112941742, 0.03462143987417221, 0.0015908923232927918, 0.05942350625991821, -0.03902385011315346, 0.008591950871050358, 0.036849819123744965, 0.03174084797501564, -0.002296319929882884, -0.0014233107212930918, 0.018243741244077682, -0.03407793119549751, -0.09826619178056717, -0.05971337854862213, -0.0013191384496167302, 0.030490780249238014, -0.018261857330799103, 0.014991753734648228, -0.04775620996952057, -0.017147667706012726, -0.010217944160103798, 0.052575308829545975, 0.048662055283784866, -0.02539992518723011, 0.01623276248574257, -0.01609688624739647, 0.046016983687877655, -0.000053112307796254754, 0.04474879801273346, 0.01577078178524971, 0.012863014824688435, -0.023316480219364166, -0.03509248048067093, -0.04420529305934906, 0.013922855257987976, 0.039494890719652176, -0.010589341633021832, 0.01565302163362503, 0.052104268223047256, -0.030907470732927322, -0.024222325533628464, -0.06714131683111191, 0.018261857330799103, -0.07036612927913666, -0.020164135843515396, -0.030527014285326004, 0.01924017257988453, 0.03728462755680084, -0.05011140927672386, 0.019946731626987457, 0.011558596976101398, 0.013968147337436676, -0.05500297620892525, 0.01106944028288126, -0.03732085973024368, 0.01450259704142809, 0.0077902767807245255, 0.009153575636446476, -0.05692337080836296, -0.015408443287014961, 0.042538534849882126, -0.02476583421230316, 0.011422719806432724, -0.006032935343682766, 0.052647776901721954, 0.06315559148788452, -0.006771199870854616, -0.0037796429824084044, 0.01909523643553257, -0.022954141721129417, -0.05416959896683693, 0.02514628879725933, -0.0497853048145771, 0.008736886084079742, -0.024222325533628464, -0.027682658284902573, -0.01287207379937172, 0.010562165640294552, 0.04112541303038597, -0.03543670102953911, -0.006875372026115656, -0.03822670876979828, -0.017500948160886765, 0.04065437614917755, -0.0188959501683712, -0.010127360001206398, 0.013180061243474483, 0.04413282498717308, -0.01621464639902115, 0.016459224745631218, 0.017129549756646156, -0.029965389519929886, 0.06561949104070663, -0.030907470732927322, 0.006562855094671249, 0.06898923963308334, 0.02572602964937687, -0.013560516759753227, -0.039277490228414536, 0.013497107662260532, -0.01875101588666439, -0.016613218933343887, 0.030563248321413994, 0.03213942050933838, 0.03469390794634819, -0.0014244430931285024, 0.017736466601490974, 0.0158975999802351, -0.05706830695271492, 0.02286355569958687, 0.004123864695429802, 0.016622276976704597, -0.00011960000119870529, 0.0145569471642375, -0.07272132486104965, -0.033353254199028015, -0.023044725880026817, 0.04018333554267883, 0.010408172383904457, 0.017111433669924736, -0.05681467056274414, -0.0002789722930174321, -0.07388081401586533, 0.03710345923900604, 0.01913147047162056, -0.02815369889140129, -0.055691421031951904, 0.09043967723846436, 0.01942134089767933, 0.02572602964937687, -0.038951385766267776, -0.016567924991250038, -0.08254069834947586, -0.03130604326725006, -0.0370672233402729, 0.0195300430059433, 0.009547618217766285, 0.013107594102621078, 0.0035078891087323427, 0.05735817924141884, 0.05717700719833374 ]
717,833
pytorch_optimizer.optimizer.rotograd
model_parameters
null
def model_parameters(self, recurse=True): for param in self.backbone.parameters(recurse=recurse): yield param for h in self.heads: for param in h.parameters(recurse=recurse): yield param
(self, recurse=True)
[ 0.025562072172760963, -0.036151573061943054, -0.03388990834355354, 0.009493732824921608, -0.04733717069029808, 0.007591479457914829, -0.03224187344312668, -0.0642382949590683, 0.029804885387420654, 0.053228020668029785, 0.017505986616015434, 0.003990786615759134, -0.03429315239191055, 0.043690454214811325, -0.010063531808555126, 0.009747950360178947, 0.042778775095939636, 0.0272451713681221, 0.003055000677704811, 0.002539989771321416, 0.007950891740620136, 0.02566726692020893, 0.0019000614993274212, 0.03976322337985039, -0.010037233121693134, -0.06202922761440277, -0.007806250359863043, 0.008143746294081211, 0.03765935078263283, 0.025053635239601135, -0.06514997035264969, -0.010948912240564823, -0.005364879500120878, -0.01507776603102684, 0.0034845417831093073, -0.019390707835555077, 0.010528137907385826, 0.08156019449234009, -0.08373419940471649, -0.009704120457172394, 0.06490451842546463, -0.04312942177057266, 0.021319258958101273, 0.022406261414289474, -0.007806250359863043, -0.02736789733171463, 0.06984862685203552, 0.03329380974173546, 0.015945613384246826, -0.020723162218928337, 0.01024762075394392, -0.013736546039581299, 0.005943445023149252, -0.032978229224681854, -0.011404751800000668, -0.04495278000831604, -0.007547649089246988, 0.013482327573001385, 0.0660967156291008, 0.02181016281247139, 0.005040531978011131, -0.02787633426487446, 0.0013280706480145454, 0.031102275475859642, -0.010668396018445492, -0.05915393307805061, -0.03769441321492195, -0.013175512664020061, -0.012781036086380482, 0.02394910156726837, -0.03236459940671921, -0.05435008555650711, -0.005737440660595894, 0.07637063413858414, -0.023195214569568634, -0.033363938331604004, -0.01786539889872074, 0.004319516941905022, 0.020302386954426765, -0.013070318847894669, -0.03797493129968643, 0.02566726692020893, -0.07156679034233093, -0.05235140398144722, -0.03846583515405655, -0.00019518364570103586, -0.03241719678044319, -0.035906121134757996, 0.07265379279851913, 0.02775360830128193, -0.07426676154136658, 0.0515449196100235, 0.010773589834570885, 0.0775628313422203, 0.014446603134274483, 0.04902027174830437, -0.015253088437020779, 0.015182958915829659, -0.06658761948347092, -0.03539768606424332, -0.05245659872889519, 0.014788483269512653, -0.014078425243496895, 0.04014893248677254, -0.024299748241901398, -0.04719691351056099, -0.038009993731975555, -0.051615048199892044, 0.026491284370422363, -0.00416610948741436, -0.042568389326334, 0.0880822017788887, -0.0022320791613310575, 0.02593025006353855, -0.012193704955279827, -0.022651713341474533, -0.0038987419102340937, 0.007644076365977526, 0.016830993816256523, -0.006850740406662226, 0.0050054676830768585, 0.0441112294793129, -0.020845888182520866, 0.002290154807269573, -0.02671920321881771, 0.06146819517016411, 0.03604637831449509, 0.03027825802564621, -0.04933585226535797, -0.08029786497354507, -0.005110661033540964, 0.017251769080758095, -0.017374495044350624, -0.027175042778253555, -0.004619757179170847, -0.047512494027614594, 0.001387242111377418, -0.07931605726480484, 0.027963995933532715, -0.012649544514715672, -0.023633521050214767, 0.055086441338062286, 0.040639836341142654, -0.01190442219376564, -0.04561900720000267, -0.01732189767062664, 0.0578916072845459, -0.0656408742070198, 0.0218276958912611, 0.005009850487112999, -0.018706949427723885, 0.02550947479903698, 0.054665666073560715, 0.0020403198432177305, -0.07328495383262634, 0.03527496010065079, -0.017690075561404228, 0.0025290322955697775, -0.011133001185953617, -0.0023164532613009214, -0.030050337314605713, -0.027455559000372887, -0.026245832443237305, 0.011413518339395523, -0.016480349004268646, 0.012710907496511936, -0.04603978246450424, -0.02843736670911312, 0.014569329097867012, -0.0076835243962705135, 0.045934587717056274, -0.013394665904343128, -0.049791689962148666, -0.02286210097372532, 0.051755305379629135, 0.011457348242402077, 0.0047074188478291035, -0.03902686759829521, 0.006631587166339159, 0.06188896670937538, 0.047512494027614594, -0.03751908987760544, 0.042638517916202545, -0.05894354358315468, 0.022827036678791046, -0.023440666496753693, -0.024895844981074333, 0.003328942693769932, -0.010019700974225998, -0.024247150868177414, 0.03066396713256836, 0.011729098856449127, 0.008227025158703327, 0.04414629563689232, -0.03594118729233742, 0.037904802709817886, 0.08134980499744415, 0.020127063617110252, 0.02275690622627735, 0.004632906522601843, 0.0039031251799315214, -0.0964275673031807, -0.03783467411994934, -0.0005741823697462678, -0.0315055176615715, 0.005684843752533197, 0.02906852960586548, -0.0280165933072567, -0.02643868699669838, -0.024492602795362473, 0.007736120838671923, 0.006166981533169746, 0.06984862685203552, -0.03303082659840584, 0.04298916459083557, -0.011588840745389462, -0.075529083609581, 0.004409370012581348, 0.01163267157971859, -0.03243472799658775, 0.022669244557619095, -0.025053635239601135, 0.025071168318390846, 0.016629373654723167, 0.0006032201927155256, -0.020723162218928337, -0.004808229394257069, -0.0608370304107666, -0.0694979801774025, -0.007490668911486864, 0.003861485980451107, -0.00032982611446641386, -0.003578777890652418, 0.001565852202475071, -0.06364219635725021, 0.06595645844936371, -0.04467226192355156, -0.02645621821284294, -0.025702331215143204, -0.018987465649843216, -0.016313791275024414, 0.0048783584497869015, -0.030383450910449028, -0.012938826344907284, -0.013368368148803711, -0.01480601541697979, 0.05512150749564171, 0.030436048284173012, -0.0021356516517698765, -0.0007927880506031215, -0.006022340152412653, 0.03737883269786835, -0.001676524756476283, 0.06146819517016411, -0.0016469390830025077, -0.03871128708124161, 0.03871128708124161, 0.01942577213048935, 0.005860166624188423, 0.02510623261332512, -0.012255067937076092, -0.007674757856875658, -0.011334622278809547, 0.07882515341043472, 0.01057196781039238, 0.010186257772147655, -0.03329380974173546, 0.01797059364616871, -0.06132793426513672, -0.0025027338415384293, 0.07728231698274612, -0.00952879711985588, -0.021512113511562347, 0.005430625285953283, 0.03329380974173546, 0.0004281712754163891, -0.002375624608248472, 0.01302648801356554, -0.07054992020130157, -0.005759355612099171, 0.017243003472685814, -0.052000757306814194, 0.0022945378441363573, -0.00028928270330652595, 0.004076256416738033, -0.002840230241417885, -0.003988594748079777, 0.012053445912897587, -0.026543879881501198, -0.02366858534514904, 0.01653294451534748, -0.006789377424865961, 0.04028919339179993, -0.011667735874652863, 0.03397756814956665, -0.06665775179862976, -0.01071222685277462, -0.0026736734434962273, 0.08043812960386276, -0.013719013892114162, 0.046741072088479996, -0.010729759000241756, 0.06490451842546463, 0.01916278898715973, 0.01302648801356554, -0.005264068953692913, 0.036572348326444626, 0.004472924396395683, -0.020530305802822113, -0.008770525455474854, -0.039868418127298355, 0.0481436550617218, 0.03383731096982956, 0.01301772240549326, -0.040534645318984985, -0.085136778652668, -0.018198512494564056, 0.013552457094192505, 0.00654830876737833, 0.046741072088479996, -0.005829485133290291, 0.033521730452775955, 0.01825110986828804, -0.02365105412900448, 0.02221340499818325, 0.0399385467171669, 0.020004337653517723, 0.020688097923994064, -0.07016420364379883, -0.001669950201176107, -0.02947177179157734, 0.03727363795042038, 0.005785654298961163, 0.0626954510807991, -0.045548878610134125, 0.03571326658129692, 0.005781271029263735, 0.07023433595895767, 0.03487171605229378, -0.03765935078263283, 0.06479933112859726, -0.057856541126966476, -0.013780376873910427, 0.006631587166339159, -0.009020361118018627, 0.04004374146461487, 0.002949807094410062, 0.030173063278198242, 0.033381473273038864, 0.023370536044239998, -0.011588840745389462, 0.02829710952937603, 0.03944764286279678, 0.00108152290340513, -0.011667735874652863, 0.01690112240612507, -0.033661987632513046, -0.03169837221503258, -0.01143105048686266, 0.03183862939476967, 0.05010727047920227, 0.052561793476343155, -0.0244575385004282, 0.03678273409605026, 0.053368277847766876, -0.025614669546484947, -0.031645774841308594, 0.06707852333784103, 0.06413310021162033, -0.027841269969940186, -0.012851165607571602, -0.001862805336713791, 0.02435234561562538, -0.01625242829322815, 0.005040531978011131, 0.007644076365977526, -0.03955283761024475, 0.019390707835555077, 0.0407099686563015, 0.02047771029174328, -0.0068551236763596535, -0.009888209402561188, 0.09951325505971909, -0.05119427293539047, 0.0015483199385926127, -0.053368277847766876, 0.0687265619635582, -0.04523329809308052, 0.013368368148803711, 0.024825716391205788, 0.0027963996399194, -0.021967953070998192, -0.05042285472154617, 0.023703649640083313, -0.029664626345038414, -0.05487605556845665, 0.08689000457525253, -0.0035020741634070873, -0.057576026767492294, -0.04439174756407738, 0.022160809487104416, -0.1082092672586441, -0.07868489623069763, 0.025053635239601135, 0.0489150770008564, -0.10245867818593979, 0.02419455349445343, 0.1023184210062027, 0.021336792036890984, -0.033363938331604004, -0.046881332993507385, -0.01691865548491478, -0.022301066666841507, 0.022809503600001335, 0.03797493129968643, -0.020951081067323685, 0.07065510749816895, 0.006136300042271614, 0.02856009267270565, 0.05105401575565338, 0.07777322083711624, -0.008165662176907063, 0.014402772299945354, 0.03438081219792366, 0.043445002287626266, 0.04505797475576401, -0.0047731646336615086, 0.026403622701764107, 0.0012294515036046505, 0.01705014705657959, -0.06045132130384445, -0.04870469123125076, -0.0017192597733810544, -0.03713338077068329, 0.0036971208173781633, 0.006811292842030525, 0.03420548886060715, 0.005250919610261917, -0.006228344514966011, 0.0186543520539999, 0.027139978483319283, 0.04709171876311302, -0.015700161457061768, -0.0828225165605545, 0.0038921674713492393, 0.013990763574838638, 0.012868697755038738, 0.0410255491733551, -0.035783395171165466, 0.012579414993524551, 0.0090554254129529, 0.02578999288380146, 0.0571201853454113, -0.08990556001663208, 0.007871996611356735, 0.009292111732065678, 0.039587900042533875, -0.013175512664020061, -0.018479028716683388, 0.008086767047643661, 0.04856443032622337, -0.005066830664873123, 0.08050825446844101, -0.0003846145118586719, 0.0005528148612938821, -0.06669281423091888, 0.046986524015665054, 0.006504477933049202, -0.05908380076289177, -0.03373211622238159, 0.03268017992377281, 0.018145915120840073, -0.029787352308630943, -0.02024978958070278, 0.009397304616868496, -0.004067490343004465, 0.006653502583503723, 0.005619097501039505, -0.044216424226760864, -0.07826412469148636, -0.039202190935611725, -0.06409803777933121, 0.01243039034307003, 0.011615139432251453, 0.029927611351013184, 0.009467434138059616, -0.01944330520927906, -0.01585795171558857, -0.0223711971193552, -0.04400603845715523, -0.02722764015197754, 0.00020723709894809872, -0.01302648801356554, 0.05736563727259636, -0.008770525455474854, 0.031172404065728188, 0.028928270563483238, 0.02126666158437729, 0.02591271884739399, 0.0061406828463077545, -0.015638798475265503, -0.035888589918613434, 0.09264059364795685, -0.05999547988176346, -0.060731835663318634, 0.009747950360178947, -0.021740034222602844, -0.02975228801369667, -0.018934868276119232, 0.016953719779849052, 0.0373087041079998, -0.05207088962197304, -0.041586581617593765, 0.029138658195734024, -0.01679592952132225, -0.013587521389126778, -0.025088701397180557, 0.028875675052404404, 0.04695146158337593, 0.012333963066339493, 0.026929590851068497, -0.03541521728038788, 0.05298256874084473, -0.026333492249250412, 0.038290511816740036, 0.04232293739914894, -0.04035932198166847, -0.024773119017481804, 0.029576966539025307, 0.029576966539025307, 0.046355362981557846, -0.014770950190722942, -0.02100367844104767, 0.06146819517016411, -0.019776418805122375, -0.07623037695884705, 0.031172404065728188, -0.028735416010022163, -0.05329814925789833, 0.01956603117287159, 0.011334622278809547, 0.03874634951353073, 0.023475730791687965, 0.024264683946967125, 0.02682439610362053, -0.012789802625775337, -0.007289047818630934, -0.001477095065638423, -0.03541521728038788, -0.02619323506951332, -0.046881332993507385, -0.045689135789871216, -0.08457574248313904, 0.0046153743751347065, -0.03741389885544777, -0.04218268021941185, -0.007293430622667074, -0.019110191613435745, -0.015472241677343845, 0.0455138124525547, 0.061818838119506836, 0.005575266666710377, 0.019934209063649178, -0.0165241789072752, 0.007933359593153, 0.04046451672911644, -0.015042700804769993, 0.017400793731212616, -0.05768121778964996, 0.033363938331604004, 0.03506457060575485, 0.05683967098593712, 0.015051467344164848, 0.027683479711413383, 0.027402961626648903, -0.01944330520927906, -0.02803412452340126, 0.040674902498722076, -0.06350193917751312, -0.012386559508740902, 0.044602133333683014, -0.012193704955279827, 0.021582243964076042, 0.019004996865987778, 0.017628712579607964, 0.012859931215643883, 0.016866058111190796, 0.04390084370970726, -0.021512113511562347, 0.03397756814956665, -0.02061796747148037, 0.025316620245575905, -0.016866058111190796, -0.014911209233105183, 0.020021870732307434, 0.0042976015247404575, -0.060731835663318634, -0.03420548886060715, -0.05010727047920227, -0.03797493129968643, -0.009826846420764923, -0.016462815925478935, 0.0414813868701458, 0.04586445912718773, -0.07328495383262634, -0.05936431884765625, -0.010624565184116364, 0.02999773994088173, -0.030488643795251846, 0.02010953240096569, 0.013499859720468521, 0.005325431935489178, 0.05052804574370384, -0.022949762642383575, -0.04695146158337593, 0.0280165933072567, -0.0455138124525547, 0.021740034222602844, 0.057996802031993866, -0.04239306598901749, 0.003166769165545702, -0.027175042778253555, -0.021792631596326828, 0.02195042185485363, -0.07181224226951599, 0.02671920321881771, 0.011878123506903648, -0.09670808911323547, 0.013464795425534248, -0.015419645234942436, 0.051369596272706985, -0.05501631274819374, 0.004332666285336018, 0.03560807183384895, -0.005987275391817093, -0.006500094663351774, -0.0033355173654854298, -0.0769316703081131, -0.05143972486257553, 0.012000849470496178, -0.01071222685277462, -0.0017608989728614688, -0.006640353240072727, -0.00492657208815217, 0.0019175937632098794, 0.04786314070224762, -0.04582939296960831, -0.012868697755038738, 0.030330853536725044, -0.006583373062312603, -0.02326534315943718, 0.018829675391316414, -0.008152512833476067, 0.009476200677454472, 0.02326534315943718, 0.0009001732687465847, 0.02007446624338627, 0.003236898221075535, 0.03864115849137306, -0.019601095467805862, -0.02550947479903698, -0.03811518847942352, 0.030436048284173012, -0.07875502854585648, -0.008345368318259716, 0.019916675984859467, -0.08015760779380798, -0.031102275475859642, 0.008191960863769054, -0.006916486658155918, -0.004446625709533691, -0.013193044811487198, -0.04547875002026558, -0.013885569758713245, -0.04032425582408905, -0.001789388945326209, -0.04852936789393425, -0.015472241677343845, 0.019601095467805862, -0.006074937060475349, 0.02245885692536831, -0.018479028716683388, -0.0032149828039109707, 0.0682707205414772, 0.054805923253297806, -0.04200735688209534, -0.006092469207942486, 0.045163169503211975, 0.03275030851364136, 0.042112551629543304, -0.023703649640083313, -0.0537189245223999, 0.033767182379961014, 0.012579414993524551, -0.003964487928897142, 0.02894580364227295, 0.027017252519726753, -0.08394458144903183, 0.04537355527281761, 0.005132576450705528, -0.013122916221618652, -0.002369050169363618, -0.057576026767492294, 0.026017911732196808, -0.001094672130420804, 0.024685457348823547, 0.06420323252677917, 0.011921954341232777, -0.019004996865987778, -0.035783395171165466, -0.03553794324398041, 0.013631352223455906, 0.01612093672156334, -0.0716719850897789, 0.003811080474406481, 0.03737883269786835, 0.00813498068600893, 0.04239306598901749, 0.012123575434088707, 0.036186639219522476, -0.0017214512918144464, -0.0023471347521990538, 0.049125462770462036, 0.025421814993023872, 0.031400322914123535, 0.027858801186084747, -0.024036763235926628, 0.03685286268591881, 0.04561900720000267, -0.009467434138059616, 0.014025828801095486, -0.018864739686250687, -0.02233613096177578, -0.0036160338204354048, 0.0026298428419977427, 0.000988382613286376, 0.005553351249545813, 0.0003637949121184647, -0.06921746581792831, -0.0011768547119572759, 0.00277886725962162, 0.04309435933828354, -0.032452259212732315, 0.03955283761024475, 0.006964700296521187, 0.03054124116897583, 0.017374495044350624, 0.002980488585308194, 0.037869736552238464, -0.09888209402561188, 0.0489150770008564, 0.013307005167007446, 0.015866719186306, -0.06543049216270447, 0.037869736552238464, 0.03632689639925957, 0.026491284370422363, -0.047793012112379074, -0.017278067767620087, -0.016164766624569893, -0.030839290469884872, -0.042252808809280396, 0.04127100110054016, 0.06371232867240906, 0.014543031342327595, 0.035871054977178574, 0.046355362981557846, -0.0025027338415384293 ]
717,835
pytorch_optimizer.optimizer.rotograd
mtl_parameters
null
def mtl_parameters(self, recurse: bool = True): return self.parameters(recurse=recurse)
(self, recurse: bool = True)
[ 0.03356407210230827, -0.007290899287909269, 0.042800046503543854, 0.028009099885821342, -0.04711686074733734, -0.0033129043877124786, -0.038583625108003616, -0.06759663671255112, 0.020814409479498863, 0.02124943770468235, 0.0028569616843014956, 0.016012370586395264, -0.03277767449617386, 0.024344827979803085, -0.014038014225661755, 0.009763028472661972, -0.001647040480747819, 0.07408858835697174, -0.009754662401974201, 0.004960990510880947, 0.01279149204492569, 0.07449015229940414, 0.01469055563211441, 0.03818206116557121, -0.01867273449897766, -0.06187434494495392, 0.043368928134441376, -0.021667733788490295, 0.005257980898022652, 0.009737931191921234, -0.08084825426340103, 0.02566664293408394, -0.0014629903016611934, 0.005659544840455055, -0.0422980934381485, -0.001077112159691751, -0.03040175326168537, 0.044573623687028885, -0.11471349745988846, -0.02002801187336445, -0.012992274016141891, -0.026754211634397507, -0.005203602369874716, -0.0026415393222123384, -0.008650361560285091, -0.03751278668642044, 0.058427587151527405, 0.03627463057637215, -0.007838867604732513, 0.009553880430758, 0.06304557621479034, -0.014539969153702259, -0.0004888834664598107, -0.04500865191221237, -0.034400664269924164, 0.010750207118690014, -0.0005720197805203497, -0.009227610193192959, 0.0851985290646553, -0.02160080522298813, 0.018990639597177505, -0.041896529495716095, -0.015786491334438324, 0.03503647446632385, -0.011436212807893753, -0.05283915251493454, -0.022571252658963203, -0.009353098459541798, -0.0025181418750435114, 0.059431497007608414, -0.04075876250863075, -0.059431497007608414, -0.022286811843514442, 0.021684464067220688, -0.018488682806491852, -0.022554520517587662, -0.0038817869499325752, -0.0290130116045475, 0.0021395841613411903, 0.0007701875292696059, -0.0678308829665184, 0.05156753212213516, -0.06311250478029251, 0.0023529150057584047, -0.01464872620999813, 0.02678767591714859, -0.014707287773489952, -0.05531546473503113, 0.02402692288160324, -0.002844412811100483, -0.06786434352397919, 0.04490825906395912, 0.007303448393940926, 0.07208076864480972, -0.011595165356993675, 0.023575162515044212, 0.02225334756076336, 0.013352008536458015, -0.06953752785921097, -0.019258348271250725, -0.032376110553741455, 0.005667910911142826, 0.016514325514435768, 0.013485862873494625, 0.0561855211853981, -0.07054144144058228, -0.041896529495716095, -0.02707211673259735, 0.06418333947658539, 0.036073848605155945, -0.03737892955541611, 0.03915250673890114, -0.013485862873494625, 0.038583625108003616, -0.001353187602944672, 0.011729019694030285, -0.03898518905043602, -0.02124943770468235, -0.017568431794643402, 0.012942078523337841, 0.028611447662115097, 0.041896529495716095, 0.02088133618235588, -0.03761317580938339, -0.02844412811100483, 0.06341367214918137, 0.018254438415169716, 0.02964882180094719, 0.009871785528957844, -0.05866183340549469, 0.0077133784070611, 0.010072567500174046, -0.002421933924779296, 0.018722929060459137, -0.027473682537674904, -0.011795947328209877, 0.0326940156519413, -0.05163446068763733, 0.015535513870418072, -0.013644815422594547, -0.008842777460813522, 0.06408295035362244, 0.0349360816180706, -0.015661003068089485, -0.006266074255108833, -0.035806138068437576, 0.0815175250172615, 0.011009550653398037, -0.04129417985677719, -0.011017916724085808, -0.014372650533914566, -0.05240412428975105, -0.023056475445628166, -0.01654778979718685, -0.06512032449245453, 0.021667733788490295, 0.03915250673890114, -0.019743571057915688, -0.024896977469325066, -0.02754060924053192, -0.025097759440541267, -0.03158971294760704, -0.04146150127053261, 0.014958265237510204, 0.02272183820605278, -0.010825500823557377, 0.016188055276870728, -0.039855241775512695, -0.01569446548819542, 0.008918071165680885, 0.03587306663393974, -0.01587851718068123, 0.009110487066209316, -0.03794781491160393, 0.04868965595960617, 0.018036924302577972, -0.014364284463226795, -0.020998459309339523, -0.0034049295354634523, 0.06940367072820663, 0.01464872620999813, -0.023792676627635956, 0.0349360816180706, -0.04166228324174881, 0.05367574468255043, -0.0026248074136674404, -0.041628818958997726, 0.020931532606482506, -0.052337195724248886, -0.01533473189920187, 0.030686194077134132, 0.01589524745941162, 0.03788088634610176, 0.033748120069503784, -0.06251015514135361, 0.035705745220184326, 0.04122725501656532, 0.02327398955821991, 0.030318094417452812, 0.027557341381907463, 0.00642084376886487, -0.05735674872994423, -0.0169577207416296, -0.004153679125010967, -0.031623177230358124, -0.006019279360771179, -0.0096542714163661, -0.006621625740081072, -0.04029027000069618, -0.018220974132418633, 0.01538492739200592, -0.02954842895269394, 0.06515378504991531, -0.024712927639484406, 0.006274439860135317, -0.02909667044878006, -0.03480222821235657, 0.00279212580062449, 0.015242706052958965, -0.013937623240053654, 0.05357535183429718, -0.01049086358398199, 0.04236501827836037, -0.03389870747923851, 0.041896529495716095, -0.005881241988390684, 0.00006450908404076472, -0.07415551692247391, -0.08526545763015747, -0.009001730009913445, 0.032660551369190216, -0.029414575546979904, 0.015661003068089485, 0.02566664293408394, -0.02760753594338894, -0.00026875518960878253, -0.020362649112939835, -0.044205520302057266, -0.004505048040300608, -0.0101143978536129, -0.015911979600787163, -0.0016062567010521889, -0.017501505091786385, 0.04266619309782982, -0.04450669512152672, 0.014841142110526562, 0.034032564610242844, 0.040223345160484314, 0.06164009869098663, 0.03102083131670952, 0.002288079122081399, 0.007612987421452999, -0.01533473189920187, 0.06846669316291809, -0.04574485123157501, 0.00091240816982463, 0.009955445304512978, 0.03674311935901642, 0.016782036051154137, 0.004408840090036392, 0.056587085127830505, -0.008608532138168812, -0.046046026051044464, 0.04544367641210556, -0.011636994779109955, 0.00932800117880106, -0.02049650438129902, 0.016296813264489174, -0.07341931760311127, -0.013569522649049759, 0.034300271421670914, 0.013000640086829662, -0.022554520517587662, 0.008842777460813522, 0.025900889188051224, 0.02345803938806057, 0.04855579882860184, -0.008119125850498676, -0.0694705992937088, -0.0010614261263981462, 0.025365469977259636, -0.01867273449897766, 0.0009981588227674365, -0.00012829923070967197, -0.04306775704026222, -0.005847778171300888, 0.0031811411026865244, 0.032660551369190216, -0.07736802846193314, -0.020295722410082817, 0.006487770937383175, 0.002313176868483424, 0.07502557337284088, 0.006052743177860975, 0.0676300972700119, -0.04182960093021393, -0.04691607877612114, -0.07134456932544708, 0.05069747567176819, -0.030903708189725876, 0.027958905324339867, -0.013101031072437763, 0.06271094083786011, -0.02568337507545948, 0.03851669654250145, -0.010976087301969528, 0.005270529538393021, 0.004149496555328369, 0.0008010368328541517, 0.02662035822868347, -0.0535418875515461, 0.06418333947658539, 0.013460765592753887, -0.006433392409235239, -0.03711122274398804, -0.08660400658845901, 0.018405023962259293, 0.001210966962389648, 0.039855241775512695, 0.05163446068763733, -0.001734882709570229, -0.016372105106711388, 0.03824898600578308, -0.052805688232183456, 0.05320725217461586, -0.003202055813744664, 0.018354829400777817, -0.010106031782925129, -0.017518237233161926, -0.033480413258075714, -0.009143950417637825, 0.01556897722184658, -0.018137315288186073, 0.006956262513995171, -0.024629268795251846, 0.02688806690275669, -0.010474132373929024, 0.0365758016705513, 0.022604716941714287, -0.010674914345145226, 0.05668747425079346, -0.05384306237101555, -0.023491503670811653, -0.012364829890429974, 0.012348097749054432, 0.03888479620218277, 0.04172920808196068, 0.047351107001304626, 0.05384306237101555, 0.0007618215749971569, -0.002277621766552329, -0.0018844235455617309, 0.01663144864141941, 0.02041284553706646, -0.00932800117880106, 0.0005406475975178182, -0.017769213765859604, 0.0011367193656042218, -0.009846688248217106, 0.018639270216226578, 0.044941723346710205, 0.05973266810178757, -0.012732930481433868, 0.044740941375494, 0.08633629232645035, -0.03232591599225998, -0.0314725898206234, 0.0241105817258358, 0.08412769436836243, -0.017852872610092163, 0.010792036540806293, -0.032543428242206573, 0.0006263982504606247, -0.005249614827334881, 0.014230430126190186, 0.024980638176202774, -0.021483682096004486, 0.016330275684595108, -0.011603531427681446, 0.036977365612983704, -0.040859155356884, -0.029966725036501884, 0.09918634593486786, -0.037178147584199905, -0.006788944359868765, -0.002271347213536501, 0.06033501774072647, -0.04905775561928749, 0.01802019216120243, 0.028979547321796417, -0.03557189181447029, -0.0005866601713933051, -0.04765228182077408, 0.016154590994119644, -0.04664837196469307, -0.03406602516770363, 0.07756881415843964, -0.01274966262280941, -0.05765791982412338, -0.04879004508256912, 0.03834937885403633, -0.09128891676664352, -0.0502624474465847, 0.002779576927423477, 0.0201284047216177, -0.07328546047210693, 0.024361560121178627, 0.04875658079981804, -0.00794762372970581, -0.012415025383234024, -0.020847873762249947, -0.01894044317305088, -0.030451949685811996, 0.016271714121103287, 0.04233155399560928, -0.030167508870363235, 0.039487142115831375, 0.06441758573055267, 0.036810047924518585, 0.027105581015348434, 0.07509250193834305, -0.05293954163789749, -0.01636373996734619, 0.05708903819322586, 0.06461836397647858, 0.02623552456498146, -0.020195331424474716, -0.00849140901118517, -0.03483569249510765, -0.011293992400169373, -0.04146150127053261, -0.019542789086699486, -0.021567342802882195, -0.011636994779109955, 0.01708320900797844, 0.0019001095788553357, -0.017074843868613243, 0.0007450897828675807, -0.01024825219064951, 0.010457400232553482, 0.02928072027862072, -0.007244886830449104, -0.010666548274457455, -0.05909685790538788, 0.0012642997317016125, -0.02272183820605278, -0.006625808775424957, 0.03724507614970207, -0.04464054852724075, -0.011904704384505749, 0.01791980117559433, 0.03610731288790703, 0.06133892759680748, -0.06779741495847702, 0.026302453130483627, -0.018605805933475494, -0.012063656933605671, -0.015008460730314255, -0.00604856014251709, -0.005596800707280636, 0.05608512833714485, -0.015309633687138557, 0.07823808491230011, 0.04313468560576439, 0.015359829179942608, -0.07074221968650818, -0.0017495231004431844, 0.0030912074726074934, -0.04514250531792641, -0.061104681342840195, 0.02566664293408394, 0.02760753594338894, -0.030987368896603584, -0.06180741637945175, 0.0441385954618454, 0.006734565831720829, -0.01699955016374588, 0.017719019204378128, -0.03804820403456688, -0.027122313156723976, -0.016865694895386696, -0.08379305899143219, 0.05892954021692276, 0.010365375317633152, -0.018438488245010376, -0.0330955795943737, -0.002675002906471491, -0.0016208969755098224, -0.05936456844210625, -0.02936437912285328, 0.01039047259837389, 0.05146713927388191, 0.030602535232901573, 0.04574485123157501, -0.02327398955821991, -0.008232065476477146, -0.0008287489763461053, -0.020914800465106964, 0.022403934970498085, 0.054813507944345474, -0.02954842895269394, -0.027490412816405296, 0.08821026235818863, -0.01873966120183468, 0.005015369039028883, 0.009537149220705032, -0.0017463858239352703, -0.016656547784805298, -0.030368290841579437, -0.0004948964342474937, -0.02345803938806057, -0.01543512288480997, -0.05119943246245384, 0.03296172618865967, -0.0002658794110175222, -0.0007560700178146362, -0.030535608530044556, 0.04192999005317688, 0.04112686216831207, -0.046782225370407104, 0.014205331914126873, 0.019174689427018166, 0.04323507472872734, -0.049927812069654465, 0.057858701795339584, 0.039955634623765945, -0.062476690858602524, -0.017150135710835457, 0.008516506291925907, 0.05053015798330307, 0.060167696326971054, -0.02633591741323471, -0.026352647691965103, 0.02603474259376526, -0.024813318625092506, -0.03369792550802231, -0.026386111974716187, -0.019325274974107742, -0.04728418216109276, 0.024077117443084717, 0.0029092486947774887, 0.020161867141723633, 0.004174594301730394, 0.014054745435714722, -0.005161772482097149, 0.009486953727900982, -0.0023173599038273096, 0.011059746146202087, -0.01039883866906166, -0.01579485647380352, -0.02973248064517975, -0.07228154689073563, -0.09804858267307281, 0.02742348611354828, -0.014857874251902103, -0.021115582436323166, 0.011511506512761116, -0.02954842895269394, -0.04353624954819679, 0.007336911745369434, 0.04644758999347687, -0.006893518380820751, -0.000864827015902847, -0.0070901173166930676, -0.06066965311765671, -0.013879061676561832, -0.022019101306796074, 0.05655362084507942, -0.08580087870359421, 0.056955184787511826, 0.05728982016444206, 0.006253525149077177, -0.022939352318644524, -0.009361464530229568, 0.031255077570676804, 0.022838961333036423, 0.018455220386385918, 0.04443976655602455, -0.06739585101604462, 0.022788766771554947, 0.06425026804208755, 0.01847195252776146, 0.007859782315790653, 0.005772484932094812, 0.00724906986579299, 0.034869156777858734, 0.012573977932333946, 0.025198152288794518, -0.0261518657207489, -0.004814587067812681, -0.0424988754093647, 0.042632728815078735, 0.037077758461236954, -0.008503957651555538, -0.002070565242320299, 0.03304538503289223, -0.03272747993469238, 0.03483569249510765, 0.014280625618994236, -0.05591781064867973, -0.039754852652549744, -0.01020642276853323, -0.012758027762174606, 0.04865619167685509, -0.068667471408844, -0.021868515759706497, 0.023039743304252625, 0.030418485403060913, -0.010934257879853249, 0.0365758016705513, 0.006312086712568998, -0.03547150269150734, 0.06117160618305206, -0.045577533543109894, -0.014247162267565727, 0.02086460404098034, -0.07341931760311127, 0.016740206629037857, 0.07930891960859299, -0.07134456932544708, -0.03918597102165222, -0.006968811620026827, -0.043168146163225174, -0.008081478998064995, -0.03624116629362106, 0.031087759882211685, -0.037077758461236954, -0.08272221684455872, 0.0075376941822469234, -0.004090934991836548, 0.029146865010261536, -0.015317999757826328, 0.032560162246227264, 0.018137315288186073, 0.00859179999679327, 0.012758027762174606, -0.010607986710965633, -0.08432847261428833, -0.003850414650514722, 0.010097665712237358, -0.03684351220726967, 0.04203038290143013, -0.021082118153572083, -0.025716839358210564, -0.011795947328209877, 0.029531698673963547, -0.05461272597312927, -0.024461951106786728, 0.07301775366067886, 0.011795947328209877, -0.0463806614279747, 0.051868703216314316, 0.006851688493043184, 0.028042564168572426, 0.04276658222079277, -0.020262258127331734, 0.013644815422594547, 0.03463491052389145, 0.04062490910291672, -0.034601446241140366, -0.039754852652549744, -0.03610731288790703, 0.021115582436323166, -0.06465183198451996, -0.02086460404098034, -0.015702832490205765, -0.08687171339988708, 0.0034990462008863688, 0.09055271744728088, -0.02946477010846138, 0.014933167025446892, 0.00947022158652544, 0.01459853071719408, 0.02456234209239483, -0.010666548274457455, 0.016639815643429756, -0.03503647446632385, -0.059899989515542984, 0.04490825906395912, 0.023056475445628166, -0.018789855763316154, -0.00644175847992301, -0.015142315067350864, 0.06003384292125702, -0.0036370838060975075, 0.0010572432074695826, 0.0028004918713122606, 0.06458490341901779, 0.017434578388929367, 0.05146713927388191, -0.006634174846112728, -0.07201384007930756, 0.03583960235118866, 0.014473041519522667, 0.04959317296743393, 0.09322981536388397, -0.00683495681732893, -0.0676300972700119, 0.06271094083786011, 0.005404384341090918, -0.043368928134441376, -0.0025892523117363453, -0.05467965453863144, 0.01103464886546135, -0.02290588989853859, -0.01671510748565197, 0.1040051206946373, -0.0023905616253614426, -0.019526056945323944, -0.017685554921627045, -0.004168319515883923, 0.0308535136282444, 0.030987368896603584, -0.04333546757698059, 0.004822953138500452, -0.01875639334321022, 0.029063206166028976, 0.03794781491160393, 0.027574073523283005, -0.00784723274409771, 0.00182481633964926, 0.014063111506402493, 0.036073848605155945, 0.008315724320709705, 0.0424988754093647, 0.061372388154268265, -0.03855016082525253, -0.02078094519674778, 0.05936456844210625, -0.03343021497130394, 0.013368740677833557, -0.021651001647114754, -0.009252707473933697, -0.024980638176202774, 0.007638085167855024, -0.0014629903016611934, 0.00792670901864767, 0.034501053392887115, -0.057590994983911514, -0.004852233454585075, -0.01694098860025406, 0.09088735282421112, 0.008098210208117962, 0.035806138068437576, -0.0032606173772364855, 0.019459130242466927, -0.0062911720015108585, -0.0010086162947118282, 0.026268988847732544, -0.06793127208948135, 0.05056362226605415, 0.008432847447693348, -0.0014337095199152827, -0.05929764360189438, 0.025616446509957314, 0.041428036987781525, 0.015677735209465027, -0.054545797407627106, -0.0010269166668877006, -0.023759212344884872, -0.05554971098899841, -0.016790401190519333, 0.03470183536410332, 0.05053015798330307, -0.011118307709693909, 0.0461798794567585, 0.008867875672876835, 0.009194145910441875 ]
717,855
pytorch_optimizer.optimizer.rotograd
to
null
def to(self, *args, **kwargs): self.backbone.to(*args, **kwargs) for head in self.heads: head.to(*args, **kwargs) return super().to(*args, **kwargs)
(self, *args, **kwargs)
[ -0.08900456875562668, -0.01172785833477974, -0.06367507576942444, -0.0416916161775589, -0.08358399569988251, 0.015207735821604729, -0.057953353971242905, 0.03257366642355919, 0.015216100960969925, 0.043598856776952744, 0.012848780490458012, -0.008034669794142246, 0.02976299449801445, 0.04182545468211174, -0.015375037677586079, 0.02579794079065323, 0.042595043778419495, 0.023204762488603592, 0.02929455041885376, 0.04129008948802948, 0.026433687657117844, -0.002762571442872286, 0.05738452449440956, 0.008632774464786053, -0.012915700674057007, 0.01424575038254261, -0.07153826206922531, -0.006612604483962059, 0.011853334493935108, 0.04349847510457039, -0.029328009113669395, -0.042394284158945084, 0.042595043778419495, -0.024911241605877876, 0.04988940432667732, 0.019959107041358948, -0.017800914123654366, 0.05132820084691048, 0.04737987741827965, 0.01723208837211132, 0.01877126470208168, -0.041725076735019684, 0.05497537925839424, 0.04667720943689346, 0.033008649945259094, -0.02367320843040943, 0.04687797278165817, 0.02646714821457863, 0.04885213449597359, -0.059091005474328995, -0.029997216537594795, -0.02198345959186554, 0.038379039615392685, -0.011527095921337605, -0.021832888945937157, 0.027102895081043243, -0.011518730781972408, 0.044736508280038834, 0.02641695737838745, 0.042193520814180374, -0.003789386246353388, -0.014120274223387241, -0.0036241759080439806, -0.011401619762182236, 0.003523794701322913, -0.018754534423351288, -0.010029744356870651, -0.015684546902775764, -0.024426067247986794, 0.022301333025097847, -0.011192492209374905, -0.012940796092152596, 0.0227363184094429, 0.06708803027868271, -0.022686127573251724, -0.006240358110517263, 0.00519472174346447, 0.039449770003557205, 0.00826052762567997, -0.016152990981936455, 0.005709175020456314, 0.006236175540834665, -0.09114603698253632, 0.021197142079472542, -0.010606936179101467, -0.018537042662501335, -0.02218422293663025, -0.009644949808716774, -0.01172785833477974, -0.057551827281713486, -0.07481737434864044, 0.005332745611667633, -0.04329771175980568, -0.009460918605327606, -0.0015182640636339784, 0.02077888697385788, -0.02795613557100296, 0.0027416585944592953, -0.034430716186761856, -0.0004799471062142402, -0.06247050315141678, 0.034497637301683426, -0.07628963142633438, 0.019724885001778603, -0.005512595176696777, 0.009343806654214859, -0.026366768404841423, -0.02755461074411869, -0.04908635467290878, 0.003354401560500264, -0.08291478455066681, 0.11001767963171005, 0.008511479943990707, -0.01652105525135994, -0.040052056312561035, -0.06695418804883957, 0.0238572396337986, 0.004073799587786198, 0.005725904833525419, -0.022819969803094864, -0.040118977427482605, 0.018118787556886673, 0.023890700191259384, -0.011133936233818531, -0.03613719344139099, 0.04567340016365051, -0.0009907404892146587, 0.00921833049505949, -0.023372065275907516, -0.12554329633712769, -0.06899527460336685, -0.008352543227374554, -0.040319740772247314, -0.031084679067134857, 0.030197979882359505, -0.0004409971588756889, -0.06718841195106506, -0.10787621885538101, -0.012296684086322784, 0.03235617280006409, -0.017248818650841713, -0.012463985942304134, 0.08104100078344345, 0.031469471752643585, -0.04323079064488411, 0.005148713476955891, 0.022418444976210594, -0.043331172317266464, -0.014044987969100475, 0.00653731869533658, -0.00004260968489688821, 0.05226508900523186, 0.0733451172709465, 0.028056515380740166, -0.04737987741827965, 0.04922019690275192, -0.04182545468211174, -0.006976486183702946, 0.021080030128359795, 0.04754718020558357, -0.015149179846048355, -0.01481457706540823, 0.0059057543985545635, 0.03948323056101799, -0.029461851343512535, -0.03536760434508324, 0.02400781214237213, -0.027872484177350998, -0.020862538367509842, 0.012857145629823208, 0.010422904044389725, -0.007553677540272474, 0.005562785547226667, 0.02057812362909317, -0.040453583002090454, -0.021013109013438225, -0.004040339030325413, 0.004259922541677952, -0.010180315934121609, 0.043130408972501755, 0.021096760407090187, -0.031402554363012314, 0.017616882920265198, 0.006687890272587538, 0.026032164692878723, -0.01877126470208168, -0.015793291851878166, -0.004366577602922916, -0.0017221631715074182, -0.014923322945833206, 0.05413886904716492, 0.00802630465477705, 0.007043406832963228, 0.007415653206408024, -0.013459431938827038, -0.029127247631549835, 0.027905944734811783, -0.014187194406986237, -0.014220654964447021, -0.002036899793893099, 0.017215358093380928, -0.04095548763871193, 0.028842834755778313, -0.004571522586047649, 0.05423925071954727, 0.04818292707204819, 0.03694024309515953, -0.02057812362909317, 0.022485366091132164, -0.0555107444524765, 0.03357747569680214, -0.007637328468263149, -0.006445302627980709, -0.04376615583896637, 0.018537042662501335, -0.04898597300052643, -0.05979367345571518, -0.006905382964760065, 0.07956875115633011, -0.02775537222623825, -0.025245845317840576, 0.02164885587990284, -0.06595037877559662, 0.02775537222623825, -0.08485548943281174, 0.020009297877550125, 0.0013143649557605386, -0.05765220895409584, 0.03894786536693573, 0.003515429561957717, -0.004487871658056974, -0.020193330943584442, -0.03453109785914421, 0.009134680032730103, -0.050826296210289, 0.05965983122587204, -0.04055396094918251, 0.00018050298967864364, -0.07635655254125595, 0.04754718020558357, -0.00012978962331544608, 0.016688356176018715, 0.017817644402384758, -0.014864766970276833, 0.044401902705430984, 0.029595693573355675, 0.035033002495765686, -0.04855098947882652, -0.02989683672785759, 0.018269360065460205, -0.03573567047715187, -0.008590948767960072, 0.007754439488053322, 0.02400781214237213, -0.00637001683935523, -0.08385167270898819, 0.03183753788471222, -0.053402744233608246, -0.029595693573355675, 0.004165815655142069, -0.01481457706540823, -0.013384145684540272, 0.022284602746367455, 0.0376763716340065, 0.01729900948703289, 0.0010707316687330604, -0.08779999613761902, 0.019340090453624725, -0.03483223915100098, 0.037308305501937866, 0.019657963886857033, -0.061700914055109024, -0.005454039666801691, 0.04557301849126816, 0.012480716221034527, 0.007035041693598032, -0.06645228713750839, 0.012530907057225704, -0.06491310894489288, -0.029411660507321358, 0.04875175282359123, -0.035702209919691086, -0.058421798050403595, -0.05005670711398125, -0.003582350444048643, -0.027052704244852066, 0.018620694056153297, 0.007398923393338919, -0.004479506518691778, -0.07930106669664383, 0.02278650924563408, 0.03881402313709259, -0.007687518838793039, 0.020009297877550125, 0.004479506518691778, -0.035836052149534225, -0.02601543441414833, 0.041390471160411835, 0.07140441983938217, -0.01622827723622322, 0.03359420597553253, -0.08391859382390976, 0.007812995463609695, 0.016445768997073174, -0.016437403857707977, -0.012054096907377243, 0.0119286198168993, 0.05444001406431198, -0.01330886036157608, -0.034564558416604996, -0.005052515305578709, -0.008574218489229679, -0.03914862871170044, 0.015425228513777256, -0.02271958813071251, -0.005851381458342075, -0.013216843828558922, 0.00007332525274250656, -0.009360536932945251, 0.04590762034058571, -0.07220746576786041, -0.029311280697584152, -0.034966081380844116, -0.0014147460460662842, 0.04791524261236191, 0.02561390958726406, 0.02332187443971634, 0.020477743819355965, -0.032272521406412125, 0.02566410042345524, 0.016537785530090332, 0.047480259090662, 0.0548415370285511, 0.010205411352217197, -0.09382286667823792, 0.0046719033271074295, 0.007997027598321438, 0.04376615583896637, 0.04450228437781334, -0.013007717207074165, 0.03422995284199715, -0.00832744874060154, 0.0009212056756950915, 0.0244093369692564, 0.035233765840530396, 0.05437309294939041, 0.010941538959741592, 0.017483040690422058, -0.00586392916738987, 0.04276234656572342, -0.015492148697376251, 0.03660564124584198, 0.014764386229217052, 0.009243425913155079, -0.016613071784377098, 0.0403532013297081, -0.03613719344139099, -0.05865601822733879, -0.010673856362700462, -0.042862728238105774, 0.028976676985621452, -0.012564366683363914, -0.002319221617653966, -0.00794683676213026, 0.013057907111942768, -0.012756763957440853, 0.007516034413129091, 0.04671066999435425, 0.02808997593820095, -0.03197138011455536, 0.012254858389496803, 0.011945350095629692, 0.03177061676979065, 0.058221034705638885, -0.0261994656175375, -0.0011962080607190728, -0.026918863877654076, 0.013392510823905468, 0.020795617252588272, 0.008984108455479145, 0.01698950119316578, -0.017148436978459358, 0.0501570887863636, -0.010941538959741592, 0.04674413055181503, -0.027989596128463745, 0.06708803027868271, -0.02655079960823059, 0.02271958813071251, 0.010297426953911781, 0.06591691821813583, 0.00183090940117836, 0.010615300387144089, -0.031185060739517212, -0.07100289314985275, -0.0227363184094429, 0.037977512925863266, -0.00024663947988301516, 0.02405800297856331, -0.03319268301129341, 0.035769131034612656, -0.04456920549273491, 0.003074171021580696, 0.044468823820352554, 0.023020731285214424, 0.02380705066025257, 0.033477094024419785, 0.061901673674583435, 0.039851292967796326, -0.021397903561592102, -0.018068596720695496, 0.023556096479296684, -0.056280333548784256, -0.022569015622138977, 0.04691143333911896, -0.012756763957440853, 0.058488719165325165, -0.005976857617497444, 0.01997583732008934, 0.040922027081251144, 0.015333211980760098, 0.07903338223695755, 0.061232466250658035, 0.040185898542404175, 0.07990334928035736, -0.030733345076441765, -0.029143977910280228, -0.012723303399980068, 0.0012892696540802717, 0.04135701060295105, -0.040988948196172714, -0.07113673537969589, 0.006365834269672632, 0.00978715717792511, 0.037509068846702576, 0.0483836866915226, 0.024526447057724, -0.019139328971505165, 0.02594851329922676, 0.035635288804769516, 0.04604146257042885, 0.029545502737164497, -0.014505067840218544, -0.08900456875562668, -0.001132424222305417, -0.009444188326597214, 0.0005839879158884287, -0.009661680087447166, -0.04597454145550728, 0.044401902705430984, 0.017583422362804413, 0.042059678584337234, 0.035099923610687256, -0.025714291259646416, -0.04617530480027199, -0.013952972367405891, 0.04761410132050514, -0.05420579016208649, 0.018537042662501335, 0.036371417343616486, 0.03178734704852104, -0.036438338458538055, 0.03359420597553253, -0.0026747379451990128, 0.018620694056153297, -0.05945906788110733, -0.03016451932489872, -0.03573567047715187, -0.05025746673345566, -0.01283205021172762, 0.04691143333911896, -0.02347244694828987, 0.004901943262666464, -0.03285807743668556, 0.03332652524113655, 0.031737156212329865, 0.0029424207750707865, -0.06601729989051819, -0.04952134191989899, -0.06407660245895386, -0.06558231264352798, -0.06300586462020874, 0.015274656936526299, 0.011418350040912628, -0.012681478634476662, 0.056548018008470535, 0.025764480233192444, -0.01667162775993347, 0.018921837210655212, -0.010632030665874481, -0.02367320843040943, -0.038847483694553375, -0.06551539152860641, 0.024158382788300514, 0.031402554363012314, 0.06126592680811882, -0.018721073865890503, 0.010096665471792221, -0.058823321014642715, -0.04741333797574043, 0.00698903389275074, -0.02762153185904026, 0.017483040690422058, -0.02742076851427555, -0.0416916161775589, 0.03546798601746559, 0.010673856362700462, -0.014404687099158764, -0.058020271360874176, 0.02601543441414833, 0.05119435861706734, 0.006098151672631502, -0.055744968354701996, 0.019407011568546295, -0.00938563235104084, 0.01681383326649666, -0.0720067024230957, 0.04497073218226433, 0.018470121547579765, -0.006060508545488119, 0.04088856652379036, -0.008068130351603031, 0.028474770486354828, -0.005830468609929085, 0.017516501247882843, 0.02399108186364174, 0.018353009596467018, 0.034564558416604996, 0.057886432856321335, -0.009736966341733932, 0.004006878938525915, 0.012321779504418373, 0.01611953042447567, 0.057150304317474365, -0.00005264125866233371, -0.034564558416604996, -0.020461013540625572, 0.012012271210551262, 0.0468110516667366, -0.0038939500227570534, -0.031937919557094574, -0.01581002213060856, -0.022418444976210594, -0.0628720223903656, -0.026333307847380638, -0.018470121547579765, -0.04363231733441353, -0.025697560980916023, -0.00586392916738987, 0.0006435891846194863, -0.07220746576786041, -0.033276334404945374, -0.010707316920161247, 0.09107911586761475, -0.023154573515057564, 0.0020985922310501337, -0.0561799518764019, 0.0011240590829402208, 0.006386747118085623, 0.005399666260927916, 0.010263967327773571, 0.0448034293949604, 0.04553955793380737, 0.01823589950799942, 0.026985784992575645, 0.0628720223903656, 0.022552285343408585, 0.013459431938827038, -0.0009510063100606203, -0.006315643899142742, 0.008632774464786053, 0.04095548763871193, -0.02588159218430519, -0.001828818116337061, 0.04841714724898338, -0.016169721260666847, 0.012087556533515453, 0.013969702646136284, -0.015291387215256691, -0.03754252940416336, -0.03208848834037781, 0.016270102933049202, 0.013902781531214714, -0.010632030665874481, 0.03894786536693573, -0.003074171021580696, -0.03827865794301033, 0.06551539152860641, 0.03774329274892807, -0.01823589950799942, -0.015567434951663017, -0.011100475676357746, -0.029461851343512535, -0.019992567598819733, 0.020159870386123657, -0.031737156212329865, -0.04376615583896637, -0.04737987741827965, -0.027654992416501045, -0.006897017825394869, 0.017382659018039703, 0.025095274671912193, 0.013350686058402061, 0.028257278725504875, -0.012773494236171246, -0.04470304772257805, -0.025563718751072884, 0.0008887909352779388, -0.009519473649561405, 0.009059393778443336, 0.04691143333911896, 0.04607492312788963, 0.017583422362804413, -0.017800914123654366, -0.06099824607372284, -0.042327363044023514, -0.005997770465910435, -0.011008460074663162, 0.03600335121154785, 0.024108193814754486, 0.034079380333423615, -0.05718376487493515, -0.03868018090724945, 0.03801097348332405, -0.05025746673345566, 0.03593643382191658, 0.031603313982486725, -0.02835765853524208, 0.029595693573355675, 0.03222233057022095, 0.01843666099011898, -0.07682500034570694, 0.012522541917860508, -0.012999352067708969, -0.009837347082793713, -0.029595693573355675, -0.014396321959793568, -0.007624780759215355, -0.039650533348321915, -0.016203181818127632, -0.027805563062429428, -0.04189237579703331, 0.018871646374464035, -0.06394276022911072, -0.03090064786374569, -0.004567340016365051, -0.015048799104988575, 0.005324380472302437, -0.045204952359199524, -0.021966729313135147, 0.01005483977496624, 0.026835212484002113, -0.028943216428160667, 0.05892370268702507, -0.00809322576969862, 0.10546707361936569, 0.06411006301641464, 0.011067016050219536, 0.03177061676979065, 0.020260250195860863, 0.018085326999425888, 0.012681478634476662, 0.09154755622148514, -0.0481494665145874, 0.05189702659845352, 0.021213872358202934, 0.008252162486314774, -0.029344739392399788, -0.05019054934382439, 0.032473284751176834, -0.03888094425201416, -0.029328009113669395, -0.07836417853832245, -0.008791711181402206, -0.02024352177977562, -0.020159870386123657, -0.014237385243177414, -0.012104286812245846, 0.019423741847276688, -0.06193513423204422, -0.03540106490254402, -0.018888376653194427, -0.03351055458188057, 0.01783437468111515, 0.009301981888711452, 0.026584260165691376, 0.0033042109571397305, 0.08552469313144684, -0.005219817161560059, -0.059559449553489685, 0.05296775698661804, 0.015291387215256691, 0.0005188970826566219, 0.04687797278165817, -0.003935775253921747, 0.0740143284201622, -0.03364439681172371, -0.11724512279033661, 0.03613719344139099, -0.01417882926762104, 0.06387583911418915, -0.0005615067784674466, -0.005106888245791197, -0.006093969102948904, 0.0112008573487401, 0.013392510823905468, 0.018001675605773926, -0.006595874670892954, -0.02782229334115982, -0.007198160979896784, -0.004847570322453976, 0.04754718020558357, 0.0329919196665287, 0.04055396094918251, 0.02708616480231285, -0.05162934213876724, 0.038178276270627975, 0.03734176605939865, -0.0244093369692564, 0.03476531803607941, -0.01602751575410366, -0.04684451222419739, 0.05096013471484184, -0.04262850433588028, 0.06966447830200195, -0.021029839292168617, -0.008540757931768894, 0.06166745349764824, -0.0032895721960812807, -0.01700623147189617, -0.008356725797057152, -0.03332652524113655, 0.01257273182272911, 0.018386470153927803, 0.0031055400613695383, -0.008411099202930927, -0.006365834269672632, -0.007595502771437168, -0.016337024047970772, -0.012564366683363914, -0.007386375684291124, -0.042260441929101944, -0.03172042593359947, 0.017533231526613235, 0.04577377811074257, -0.019256440922617912, 0.03774329274892807, 0.019022217020392418, 0.003182917134836316, -0.02722000703215599, 0.04410076141357422, 0.03894786536693573, 0.002902686595916748, -0.051395121961832047, 0.04456920549273491, -0.0019218797096982598, 0.07120365649461746, 0.002545078983530402, -0.002423785161226988, -0.0682256817817688, -0.0012892696540802717, -0.007332002278417349, 0.0025513528380542994, 0.029244359582662582, 0.09536203742027283, 0.06802492588758469, 0.06277164816856384, 0.03148620203137398 ]
717,857
pytorch_optimizer.optimizer.rotograd
train
null
def train(self, mode: bool = True) -> nn.Module: super().train(mode) self.backbone.train(mode) for head in self.heads: head.train(mode) return self
(self, mode: bool = True) -> torch.nn.modules.module.Module
[ -0.03552011400461197, 0.016207948327064514, -0.026849711313843727, -0.03471729904413223, -0.010534720495343208, 0.05708908662199974, -0.03295110538601875, -0.008402800187468529, 0.0020750544499605894, 0.002094009891152382, -0.015993863344192505, 0.00026453877217136323, -0.005320881027728319, 0.07885430008172989, 0.02833045832812786, -0.04684872925281525, 0.03122059442102909, 0.020373666658997536, -0.06122804433107376, 0.013621099293231964, -0.014736120589077473, 0.030935147777199745, 0.016778839752078056, 0.01396898552775383, -0.006141536869108677, 0.01621686853468418, -0.024066617712378502, -0.021568970754742622, 0.012541758827865124, 0.05045247822999954, -0.015931423753499985, 0.019588692113757133, 0.009838947094976902, -0.018125783652067184, 0.0346994586288929, -0.006663366686552763, -0.009169934317469597, 0.08192283660173416, -0.03634076938033104, 0.016537994146347046, -0.007666885852813721, -0.08913033455610275, 0.003505626693367958, 0.06369001418352127, -0.054769840091466904, -0.02255018800497055, 0.0451003760099411, 0.02337084338068962, 0.03917738422751427, -0.03637645021080971, -0.07507214695215225, -0.006748108193278313, 0.03271918371319771, 0.0066678267903625965, -0.03359336033463478, -0.006110316142439842, -0.010686363093554974, 0.014218750409781933, -0.02242530696094036, 0.01932108774781227, 0.005610786844044924, -0.053057167679071426, -0.021658170968294144, 0.012283073738217354, 0.016288230195641518, -0.019285406917333603, -0.06190597638487816, 0.022353945299983025, 0.013273212127387524, 0.022835634648799896, -0.003806682303547859, -0.041246864944696426, 0.042709771543741226, 0.0665801465511322, -0.021783053874969482, 0.0008468586020171642, -0.05002431198954582, 0.023816851899027824, 0.009865707717835903, 0.0007453916477970779, -0.0014617927372455597, 0.05972945690155029, -0.03896329924464226, 0.008826508186757565, -0.05138017609715462, -0.026706987991929054, 0.0007810723618604243, -0.02444126456975937, 0.05212946981191635, -0.05830222740769386, -0.058659035712480545, 0.02005254104733467, 0.014611237682402134, -0.007359140086919069, -0.0065384842455387115, 0.05295012518763542, -0.024566147476434708, -0.044386763125658035, -0.0644393041729927, -0.03874921798706055, -0.053271252661943436, 0.07607120275497437, -0.01926756650209427, 0.012943166308104992, -0.016805600374937057, -0.007952331565320492, -0.05334261432290077, -0.007996931672096252, -0.016609355807304382, -0.03746471181511879, -0.029133273288607597, 0.0673651173710823, 0.03642997145652771, 0.028062853962183, -0.030150173231959343, -0.038570813834667206, 0.016511233523488045, -0.04799051210284233, -0.031184913590550423, 0.03703654557466507, -0.007484022062271833, 0.04163935035467148, -0.032612141221761703, -0.06411817669868469, 0.025707928463816643, 0.022282583639025688, 0.05459143593907356, -0.0018219446064904332, 0.017902780324220657, -0.12602415680885315, 0.004544826224446297, 0.012925325892865658, -0.020766153931617737, -0.0295257605612278, -0.0247445497661829, -0.04174639284610748, -0.04834732040762901, -0.015075086615979671, -0.03004313074052334, 0.06572380661964417, -0.013005606830120087, 0.02008822187781334, 0.07607120275497437, 0.04827595874667168, -0.03418209031224251, -0.006248578894883394, -0.03703654557466507, -0.07571440190076828, 0.013496216386556625, 0.01550325471907854, 0.0657951682806015, -0.002314784098416567, 0.03214829042553902, 0.03341495618224144, -0.05501960590481758, 0.0436374694108963, -0.054769840091466904, -0.031755805015563965, 0.03512762859463692, 0.02970416471362114, -0.006569704972207546, -0.005142477806657553, -0.01485208235681057, 0.020248785614967346, -0.03932010754942894, -0.030168013647198677, -0.040890056639909744, -0.034128569066524506, -0.02544032409787178, 0.01722484827041626, 0.057445891201496124, 0.005414542742073536, 0.06147781014442444, 0.03971259668469429, 0.011542699299752712, 0.014325791969895363, 0.023870373144745827, 0.007153975777328014, -0.017126725986599922, 0.05116609111428261, 0.021961458027362823, -0.0096159428358078, 0.016350671648979187, -0.040247805416584015, 0.003922644536942244, 0.005570645909756422, 0.011667582206428051, 0.0008000276866368949, 0.048097554594278336, 0.019107002764940262, 0.03384312242269516, 0.002856684383004904, -0.03889193758368492, -0.014191989786922932, -0.02915111370384693, 0.031577400863170624, 0.011622981168329716, -0.027652526274323463, 0.00008738978795008734, 0.012381195090711117, 0.004214779939502478, 0.027670366689562798, 0.019374608993530273, 0.005905152298510075, -0.01351405680179596, 0.07642801105976105, 0.0044266339391469955, 0.0421745628118515, 0.0525219589471817, -0.03971259668469429, 0.01058824174106121, -0.036501333117485046, 0.02337084338068962, 0.06304775923490524, 0.04099709913134575, -0.03989099711179733, -0.07542895525693893, 0.020230945199728012, 0.03999803960323334, -0.01597602292895317, -0.03742903098464012, 0.026546424254775047, -0.05273604393005371, -0.0040898979641497135, -0.08056697249412537, 0.0066678267903625965, 0.011863825842738152, -0.05020271614193916, -0.03159524127840996, 0.0061459969729185104, 0.0007414891151711345, 0.03742903098464012, -0.039034660905599594, 0.008625803515315056, -0.0043262820690870285, 0.07046934217214584, 0.016752079129219055, 0.054091908037662506, -0.07118295133113861, -0.008728385902941227, 0.016662877053022385, -0.022139860317111015, -0.020962398499250412, -0.051808346062898636, -0.03141683712601662, 0.06104964017868042, 0.04117550328373909, -0.019107002764940262, -0.04681304842233658, 0.01390654407441616, -0.022407466545701027, 0.0031376697588711977, -0.00756876403465867, 0.016591515392065048, -0.02672482840716839, -0.07371628284454346, 0.02556520514190197, -0.03400368615984917, -0.02081967517733574, 0.001431687269359827, -0.04552854597568512, -0.025886332616209984, -0.012113590724766254, 0.020891036838293076, 0.017661936581134796, -0.012845044024288654, -0.05073792487382889, 0.038570813834667206, 0.03357551991939545, 0.0024887272156774998, 0.11046738177537918, -0.010374156758189201, 0.011150212027132511, 0.015690578147768974, 0.017537053674459457, -0.010507959872484207, -0.07257449626922607, 0.024298541247844696, -0.016350671648979187, 0.002816543448716402, 0.028348298743367195, -0.053913503885269165, -0.06522428244352341, -0.029133273288607597, -0.03018585406243801, -0.03527035191655159, 0.019428130239248276, 0.06682991236448288, 0.014566636644303799, -0.04117550328373909, -0.01649339310824871, 0.059943538159132004, 0.028865668922662735, 0.024369902908802032, 0.014272271655499935, -0.050381116569042206, 0.004174639470875263, 0.0071138353087008, 0.02048070915043354, -0.01049903966486454, 0.01932108774781227, -0.046063754707574844, -0.00257569900713861, -0.008848807774484158, 0.03453889489173889, -0.046634647995233536, 0.03150603920221329, 0.02931167744100094, -0.0031733503565192223, -0.04827595874667168, -0.004433324094861746, 0.02909759245812893, -0.024245020002126694, 0.04181775450706482, -0.035591475665569305, -0.010623921640217304, 0.007533083204180002, -0.001176347373984754, 0.009865707717835903, 0.028954870998859406, -0.02642154134809971, 0.03807128220796585, 0.00004177845039521344, 0.03307598829269409, -0.03889193758368492, -0.0010994109325110912, 0.07268153876066208, 0.0038222926668822765, -0.06711535900831223, 0.02522623911499977, 0.01013331301510334, 0.033307913690805435, 0.03828536719083786, 0.0061995177529752254, -0.1534269154071808, 0.00417686952278018, 0.04360178858041763, -0.015601377002894878, 0.0243520624935627, 0.01616334728896618, 0.039427150040864944, 0.01944596879184246, -0.050773605704307556, 0.024369902908802032, 0.014994804747402668, 0.0032982327975332737, -0.0031019889283925295, 0.0451003760099411, 0.06376136839389801, 0.0421745628118515, -0.015601377002894878, 0.027045954018831253, 0.009000451304018497, 0.006922051776200533, 0.01750137284398079, -0.020123902708292007, -0.06244118884205818, -0.012309834361076355, -0.039819635450839996, -0.06754352152347565, -0.05020271614193916, -0.017171327024698257, -0.03473513945937157, 0.07578576356172562, 0.000613819167483598, 0.01755489408969879, 0.004337432328611612, 0.04492197558283806, 0.03896329924464226, -0.01789386011660099, 0.0007303388556465507, -0.0027920131105929613, -0.02635018154978752, 0.027616845443844795, -0.012283073738217354, -0.00870608538389206, -0.016047384589910507, -0.012229552492499352, 0.06447498500347137, 0.019089162349700928, 0.02255018800497055, -0.0017372029833495617, 0.013737061060965061, -0.033218711614608765, 0.03523467108607292, 0.0011211538221687078, 0.03241589665412903, -0.015663817524909973, 0.054769840091466904, -0.04570695012807846, 0.05551913380622864, -0.007055853959172964, -0.04331634193658829, 0.0022300423588603735, -0.09805050492286682, 0.015092927031219006, 0.008942469954490662, -0.027973651885986328, -0.008380499668419361, -0.02875862643122673, 0.01880371756851673, -0.009981669485569, 0.037179265171289444, 0.0878458321094513, 0.014379313215613365, 0.046884410083293915, 0.04260272905230522, 0.040426209568977356, -0.0006037839921191335, -0.03398584574460983, -0.011284014210104942, 0.06797169148921967, -0.08035288751125336, 0.02626097947359085, -0.012907485477626324, -0.009731904603540897, 0.11068146675825119, -0.038570813834667206, 0.037928562611341476, 0.05195106938481331, 0.07132567465305328, 0.03298678621649742, 0.03678677976131439, -0.023085398599505424, 0.033218711614608765, 0.03678677976131439, 0.0284553412348032, 0.01237227488309145, -0.017430011183023453, 0.03509194776415825, -0.1034739688038826, -0.04299521818757057, -0.012229552492499352, -0.050987690687179565, 0.0060166544280946255, -0.006360081024467945, 0.003956095315515995, -0.022389626130461693, -0.033950164914131165, -0.001658036489970982, 0.02827693708240986, -0.015315931290388107, -0.026439381763339043, -0.03732198849320412, -0.01504832599312067, 0.0188393983989954, 0.0036951801739633083, 0.01360325887799263, -0.06037170812487602, 0.023602768778800964, -0.017331888899207115, 0.04142526909708977, 0.0732167512178421, 0.04196047782897949, -0.032790541648864746, 0.020498549565672874, 0.026136096566915512, -0.02142624743282795, 0.03138115629553795, -0.018206065520644188, 0.013335653580725193, -0.01413846854120493, -0.03262998163700104, 0.032665662467479706, 0.0287943072617054, 0.0004256593529134989, 0.05202242732048035, 0.013656779192388058, -0.013692460022866726, -0.03953419253230095, 0.013888703659176826, -0.043387703597545624, 0.0688280314207077, -0.051451537758111954, -0.009187774732708931, 0.05195106938481331, -0.00426830118522048, -0.0510590523481369, 0.045243099331855774, -0.06679423153400421, -0.0538778230547905, -0.03785720095038414, 0.022924836724996567, -0.000055158703617053106, 0.01725160703063011, -0.013924384489655495, -0.004031916614621878, -0.0040898979641497135, 0.012220632284879684, -0.00952674075961113, 0.014566636644303799, -0.06943459808826447, 0.033646877855062485, 0.023424364626407623, 0.001592250308021903, 0.03657269477844238, -0.0020951249171048403, 0.02768820710480213, -0.004150108899921179, 0.017635175958275795, 0.02936519868671894, 0.04163935035467148, -0.029561441391706467, -0.01664503663778305, -0.02781308814883232, 0.07864021509885788, -0.04402995854616165, -0.02224690280854702, -0.04649192467331886, 0.03189852461218834, 0.03971259668469429, -0.0049685342237353325, -0.014548796229064465, 0.01118589285761118, 0.011560539714992046, 0.031149232760071754, 0.033950164914131165, 0.05940832942724228, 0.037750158458948135, -0.027224358171224594, 0.04649192467331886, -0.020730474963784218, 0.031077871099114418, -0.004000695887953043, 0.00041004904778674245, 0.05705340579152107, 0.017358649522066116, -0.00880866777151823, 0.07742707431316376, 0.0435304269194603, 0.05216515064239502, 0.011997628025710583, -0.016591515392065048, 0.06608061492443085, 0.017082124948501587, -0.06665150821208954, 0.027277879416942596, 0.005490364506840706, 0.03214829042553902, -0.010026270523667336, -0.023656290024518967, -0.03628724813461304, 0.03864217549562454, -0.0010046340757980943, 0.020801834762096405, 0.020712634548544884, 0.0036438892129808664, 0.012684481218457222, 0.010365237481892109, -0.012211712077260017, -0.03760743513703346, -0.01521780900657177, -0.03478866070508957, -0.0034810961224138737, 0.06757920235395432, -0.019713575020432472, 0.008086133748292923, -0.01905348151922226, -0.003940484952181578, 0.027135156095027924, -0.012479317374527454, -0.04113982245326042, 0.016422031447291374, 0.012987767346203327, 0.07285994291305542, -0.001313494984060526, -0.004161259159445763, -0.02376333251595497, -0.00916101410984993, -0.023388683795928955, 0.02638586238026619, 0.04402995854616165, -0.03341495618224144, 0.03514546900987625, 0.016698557883501053, 0.005142477806657553, -0.013781662099063396, 0.000791665050201118, -0.04474357143044472, -0.01646663248538971, -0.024798071011900902, -0.05352101847529411, 0.016118746250867844, 0.0517369844019413, 0.016689637675881386, -0.014878842979669571, -0.028865668922662735, 0.04402995854616165, 0.023388683795928955, -0.01707320474088192, -0.006592005491256714, 0.005004215054214001, 0.02858022414147854, -0.02039150707423687, 0.024566147476434708, -0.01588682271540165, -0.06515292078256607, -0.05651819333434105, 0.05312852934002876, 0.060121942311525345, -0.02444126456975937, 0.008665944449603558, 0.008509841747581959, -0.04049757122993469, -0.042745452374219894, -0.0487041249871254, -0.05277172476053238, 0.04570695012807846, 0.0004161816614214331, 0.0009862362639978528, 0.03000744991004467, 0.009901388548314571, -0.030328577384352684, -0.0725388154387474, -0.016876960173249245, -0.05569753795862198, 0.0027095014229416847, -0.04906093329191208, 0.09862139821052551, -0.030150173231959343, 0.024298541247844696, -0.018482591956853867, -0.01987413689494133, 0.004919473547488451, -0.031363315880298615, -0.006462662946432829, -0.000282657885691151, -0.08656132221221924, 0.04160366952419281, 0.009794346056878567, 0.014994804747402668, -0.05708908662199974, -0.00543238315731287, -0.002843304071575403, 0.0391417033970356, -0.011230493895709515, -0.0035435373429208994, 0.025850651785731316, 0.022657230496406555, -0.04303089901804924, -0.04181775450706482, -0.05002431198954582, 0.049346376210451126, -0.06151349097490311, -0.037999920547008514, -0.0421745628118515, 0.001327990205027163, 0.0071138353087008, 0.021961458027362823, -0.013558657839894295, -0.004433324094861746, -0.002346004592254758, 0.022835634648799896, 0.048525720834732056, 0.020284466445446014, 0.028437500819563866, 0.019909817725419998, -0.01621686853468418, 0.08527681976556778, -0.06643742322921753, -0.025083517655730247, -0.01935676857829094, 0.07742707431316376, 0.008973690681159496, 0.0049908347427845, 0.010543640702962875, -0.0009444229654036462, -0.04406563937664032, -0.06222710385918617, 0.015619216486811638, -0.10240354388952255, 0.01069528330117464, -0.07079046219587326, -0.023335164412856102, 0.016020623967051506, 0.019802777096629143, -0.04845436289906502, -0.06622333824634552, 0.01272016204893589, -0.011114531196653843, -0.017171327024698257, 0.0036862599663436413, 0.012987767346203327, -0.002945885993540287, 0.04028348624706268, 0.04684872925281525, -0.041068460792303085, 0.028259096667170525, -0.016903720796108246, -0.04413699731230736, -0.026582105085253716, 0.035198990255594254, 0.04281681403517723, 0.006114776246249676, -0.004040836822241545, 0.026653466746211052, 0.01164082158356905, -0.062369827181100845, -0.058444950729608536, 0.004154569003731012, 0.004928393755108118, -0.002346004592254758, -0.036073166877031326, -0.0517369844019413, -0.018821557983756065, 0.02203281968832016, -0.03782152011990547, 0.01354081742465496, -0.0732167512178421, -0.037999920547008514, -0.0009421929134987295, 0.045849673449993134, 0.011658661998808384, 0.01541405264288187, 0.025583045557141304, 0.024726709350943565, 0.010882606729865074, 0.026796190068125725, -0.035288192331790924, 0.02164033055305481, 0.03760743513703346, -0.0576956570148468, 0.01832202821969986, 0.021230002865195274, 0.03771447762846947, -0.057838380336761475, -0.02781308814883232, 0.052914444357156754, 0.019945498555898666, -0.01616334728896618, 0.035502273589372635, -0.025618726387619972, -0.035894762724637985, -0.030667543411254883, -0.024798071011900902, -0.03742903098464012, 0.06775760650634766, 0.021015919744968414, -0.0026381402276456356, -0.018223905935883522, 0.020766153931617737, -0.04246000573039055, -0.033004626631736755, 0.013496216386556625, 0.022211221978068352, 0.015940342098474503, 0.007216417230665684, 0.004471234977245331, 0.016939401626586914, 0.0026916612405329943, 0.005967593286186457, -0.008973690681159496, 0.020070381462574005, -0.018732355907559395, 0.0074929422698915005, -0.023531407117843628, 0.014254431240260601, 0.002986026694998145, -0.04427972063422203, -0.10782700777053833, 0.00935725774616003, -0.05130881443619728, 0.003991775680333376, 0.03082810528576374, -0.024298541247844696, 0.045421503484249115, 0.07064774632453918, -0.004665248561650515 ]
717,861
pytorch_optimizer.optimizer.sam
SAM
Sharpness-Aware Minimization for Efficiently Improving Generalization. Example: ------- Here's an example:: model = YourModel() base_optimizer = Ranger21 optimizer = SAM(model.parameters(), base_optimizer) for input, output in data: # first forward-backward pass loss = loss_function(output, model(input)) loss.backward() optimizer.first_step(zero_grad=True) # second forward-backward pass # make sure to do a full forward pass loss_function(output, model(input)).backward() optimizer.second_step(zero_grad=True) Alternative example with a single closure-based step function:: model = YourModel() base_optimizer = Ranger21 optimizer = SAM(model.parameters(), base_optimizer) def closure(): loss = loss_function(output, model(input)) loss.backward() return loss for input, output in data: loss = loss_function(output, model(input)) loss.backward() optimizer.step(closure) optimizer.zero_grad() :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param base_optimizer: Optimizer. base optimizer. :param rho: float. size of the neighborhood for computing the max loss. :param adaptive: bool. element-wise Adaptive SAM. :param kwargs: Dict. parameters for optimizer.
class SAM(Optimizer, BaseOptimizer): r"""Sharpness-Aware Minimization for Efficiently Improving Generalization. Example: ------- Here's an example:: model = YourModel() base_optimizer = Ranger21 optimizer = SAM(model.parameters(), base_optimizer) for input, output in data: # first forward-backward pass loss = loss_function(output, model(input)) loss.backward() optimizer.first_step(zero_grad=True) # second forward-backward pass # make sure to do a full forward pass loss_function(output, model(input)).backward() optimizer.second_step(zero_grad=True) Alternative example with a single closure-based step function:: model = YourModel() base_optimizer = Ranger21 optimizer = SAM(model.parameters(), base_optimizer) def closure(): loss = loss_function(output, model(input)) loss.backward() return loss for input, output in data: loss = loss_function(output, model(input)) loss.backward() optimizer.step(closure) optimizer.zero_grad() :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param base_optimizer: Optimizer. base optimizer. :param rho: float. size of the neighborhood for computing the max loss. :param adaptive: bool. element-wise Adaptive SAM. :param kwargs: Dict. parameters for optimizer. """ def __init__( self, params: PARAMETERS, base_optimizer: OPTIMIZER, rho: float = 0.05, adaptive: bool = False, **kwargs, ): self.validate_non_negative(rho, 'rho') defaults: DEFAULTS = {'rho': rho, 'adaptive': adaptive} defaults.update(kwargs) super().__init__(params, defaults) self.base_optimizer = base_optimizer(self.param_groups, **kwargs) self.param_groups = self.base_optimizer.param_groups def __str__(self) -> str: return 'SAM' @torch.no_grad() def reset(self): pass @torch.no_grad() def first_step(self, zero_grad: bool = False): grad_norm = self.grad_norm() for group in self.param_groups: scale = group['rho'] / (grad_norm + 1e-12) for p in group['params']: if p.grad is None: continue self.state[p]['old_p'] = p.clone() e_w = (torch.pow(p, 2) if group['adaptive'] else 1.0) * p.grad * scale.to(p) # climb to the local maximum "w + e(w)" p.add_(e_w) if zero_grad: self.zero_grad() @torch.no_grad() def second_step(self, zero_grad: bool = False): for group in self.param_groups: for p in group['params']: if p.grad is None: continue # get back to "w" from "w + e(w)" p.data = self.state[p]['old_p'] # do the actual "sharpness-aware" update self.base_optimizer.step() if zero_grad: self.zero_grad() @torch.no_grad() def step(self, closure: CLOSURE = None): if closure is None: raise NoClosureError(str(self)) self.first_step(zero_grad=True) # the closure should do a full forward-backward pass with torch.enable_grad(): closure() self.second_step() def grad_norm(self) -> torch.Tensor: # put everything on the same device, in case of model parallelism shared_device = self.param_groups[0]['params'][0].device return torch.norm( torch.stack( [ ((torch.abs(p) if group['adaptive'] else 1.0) * p.grad).norm(p=2).to(shared_device) for group in self.param_groups for p in group['params'] if p.grad is not None ] ), p=2, ) def load_state_dict(self, state_dict: Dict): super().load_state_dict(state_dict) self.base_optimizer.param_groups = self.param_groups
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], base_optimizer: Type[torch.optim.optimizer.Optimizer], rho: float = 0.05, adaptive: bool = False, **kwargs)
[ -0.022214490920305252, -0.04855040833353996, -0.026521382853388786, 0.01253944169729948, -0.02691291831433773, 0.002493463223800063, -0.07439175248146057, -0.0055587743408977985, -0.008361345157027245, -0.010087192058563232, -0.04414048045873642, 0.01772213540971279, 0.02030833065509796, 0.0687866136431694, -0.0369073785841465, 0.03484666347503662, -0.00198343675583601, 0.047190338373184204, 0.005991524551063776, -0.02196720615029335, -0.028314203023910522, -0.047767337411642075, -0.0024574007838964462, 0.049251049757003784, -0.04912740737199783, 0.0013909816043451428, 0.034331485629081726, -0.02324484847486019, -0.031075559556484222, -0.01599113643169403, -0.028932416811585426, -0.042697980999946594, -0.00543513149023056, 0.016465099528431892, 0.06635497510433197, -0.04768490791320801, -0.0011340363416820765, 0.05860669165849686, -0.09421581774950027, -0.017794260755181313, -0.027180809527635574, -0.040060270577669144, 0.032476842403411865, -0.000398941250750795, 0.004925105255097151, 0.015362618491053581, -0.013703744858503342, 0.0469430536031723, -0.01860824227333069, -0.006795202381908894, 0.025779524818062782, -0.051229335367679596, 0.01835065335035324, 0.026377132162451744, 0.008443773724138737, 0.03441391512751579, 0.06103833392262459, -0.024687347933650017, 0.07690582424402237, -0.06565432995557785, 0.08288189768791199, -0.06845690310001373, 0.039421446621418, -0.009185629896819592, -0.017711831256747246, -0.044099267572164536, -0.041234876960515976, -0.004894194658845663, 0.018567027524113655, 0.0519711934030056, 0.0038020163774490356, -0.029839130118489265, 0.038906268775463104, 0.016186904162168503, -0.007995568215847015, -0.019442832097411156, -0.05279547721147537, -0.035938844084739685, 0.024625524878501892, -0.06969332695007324, 0.046159982681274414, -0.015135940164327621, -0.04026634246110916, -0.049251049757003784, -0.08580810576677322, -0.03115798719227314, 0.02643895335495472, -0.034558165818452835, 0.01651661843061447, -0.08115089684724808, -0.010921780951321125, 0.025800133123993874, 0.031013736501336098, 0.052259694784879684, 0.03898869827389717, 0.04587148129940033, -0.036268558353185654, -0.07022911310195923, -0.011570906266570091, -0.03474362939596176, -0.006769443862140179, 0.03622734174132347, 0.04127608984708786, 0.050652336329221725, 0.03185863047838211, -0.029736094176769257, 0.0015597024466842413, -0.00789768435060978, -0.003065311349928379, -0.029344558715820312, -0.00715582724660635, -0.015280189923942089, -0.0783483237028122, -0.016887547448277473, -0.03756680712103844, 0.0035959449596703053, -0.015445047058165073, 0.005945158191025257, -0.024110347032546997, 0.030642809346318245, 0.02819056063890457, 0.029385773465037346, -0.06969332695007324, -0.008119210600852966, -0.00009498601139057428, 0.016506314277648926, 0.03552670031785965, 0.010324174538254738, 0.025037668645381927, -0.027386881411075592, -0.04001905396580696, 0.018257921561598778, -0.033280521631240845, 0.02136959880590439, 0.02239995449781418, -0.011653334833681583, -0.01579536870121956, 0.002094200113788247, 0.004121426958590746, 0.0259855967015028, 0.016629956662654877, 0.013992244377732277, 0.02149324119091034, -0.017258474603295326, 0.06474761664867401, 0.01461045816540718, 0.04838555306196213, 0.0042244624346494675, 0.021534455940127373, -0.006156381219625473, 0.033156879246234894, 0.017433635890483856, 0.06186261773109436, 0.04599512368440628, -0.03416663035750389, 0.0019654054194688797, -0.027737202122807503, 0.002280952176079154, -0.02530556172132492, 0.003317748662084341, -0.030210059136152267, -0.05131176486611366, -0.03307444974780083, -0.01897917129099369, -0.01679481379687786, -0.008448924869298935, -0.01178728137165308, 0.02781963162124157, -0.02608863264322281, 0.017340904101729393, -0.012858851812779903, -0.08123332262039185, -0.0366600938141346, 0.04756126552820206, 0.026047417894005775, 0.10732195526361465, 0.03103434480726719, 0.015434743836522102, 0.0006974227144382894, -0.04550055414438248, 0.03241502121090889, -0.01953556388616562, -0.025552846491336823, -0.06066740304231644, -0.00793374702334404, 0.056298691779375076, 0.01512563694268465, -0.014394083060324192, 0.029694881290197372, 0.02930334582924843, 0.013796476647257805, 0.0005048747989349067, 0.008886827155947685, -0.0026815033052116632, 0.01724817231297493, -0.000577643746510148, 0.012220030650496483, 0.01787668839097023, 0.06058497354388237, 0.02656259573996067, -0.0183300469070673, 0.01852581463754177, -0.00046752436901442707, 0.016485707834362984, -0.03686616197228432, -0.0018662336515262723, 0.005107993260025978, 0.05024019256234169, -0.015496565029025078, 0.027737202122807503, -0.034104809165000916, 0.0056051407009363174, 0.040657877922058105, 0.053537335246801376, 0.051229335367679596, -0.053290050476789474, 0.057658761739730835, 0.04479990899562836, 0.06359361857175827, 0.013343119993805885, 0.005038444418460131, -0.046736981719732285, -0.04199733957648277, -0.011313316412270069, 0.035712163895368576, -0.03760802000761032, 0.024790382012724876, -0.06499490141868591, -0.0015403833240270615, -0.056504763662815094, 0.010215986520051956, -0.061120759695768356, -0.007300077471882105, 0.018721582368016243, 0.011910923756659031, 0.010705406777560711, -0.018865831196308136, -0.024522490799427032, -0.05407312139868736, -0.03876202180981636, -0.022729668766260147, -0.008943496271967888, -0.04311012476682663, 0.030210059136152267, -0.02287391945719719, -0.007567970082163811, 0.053537335246801376, 0.05176512151956558, 0.0031734986696392298, 0.03921537846326828, -0.013343119993805885, -0.012209727428853512, -0.05943097546696663, 0.03849412873387337, -0.07604032754898071, -0.020998669788241386, 0.02816995233297348, 0.01569233275949955, 0.005254819523543119, -0.04286283999681473, -0.03369266539812088, -0.06969332695007324, -0.05576290562748909, 0.04278041049838066, 0.005020413082093, 0.022626632824540138, 0.029818523675203323, -0.011519388295710087, 0.0165681354701519, 0.02369820512831211, 0.1142459511756897, 0.051806334406137466, -0.08448924869298935, 0.006465488579124212, -0.020844116806983948, 0.03457877039909363, -0.0037118601612746716, 0.033053845167160034, 0.028664523735642433, -0.018546421080827713, 0.09627652913331985, -0.01201395969837904, -0.05291911959648132, -0.014765012077987194, -0.002184356329962611, 0.03843230754137039, -0.0011675229761749506, -0.011004209518432617, 0.055804118514060974, 0.011694548651576042, 0.03249745070934296, 0.0059554618783295155, 0.051105692982673645, -0.03276534378528595, 0.10328295826911926, 0.01333281584084034, -0.03824684023857117, 0.038679592311382294, -0.0007721235742792487, -0.04838555306196213, 0.05493862181901932, 0.0015133364358916879, 0.011684245429933071, -0.0027278694324195385, -0.006058497354388237, -0.04207976907491684, -0.0014656824059784412, -0.039854198694229126, 0.0013459034962579608, -0.018391868099570274, -0.008902282454073429, 0.011684245429933071, 0.0070940060541033745, 0.005934854503720999, 0.00887652300298214, -0.05934854596853256, 0.003199257655069232, -0.013147352263331413, 0.02030833065509796, 0.08539596199989319, -0.051929980516433716, 0.0028463604394346476, 0.0021276867482811213, -0.009350487031042576, -0.023059383034706116, -0.02794327400624752, -0.006748836487531662, 0.02691291831433773, -0.07735918462276459, -0.019473742693662643, -0.05357854813337326, -0.010993906296789646, 0.0466957651078701, 0.0175778865814209, -0.04069909080862999, 0.006506702862679958, 0.054897405207157135, 0.02922091633081436, 0.03128163143992424, -0.06656104326248169, 0.06783868372440338, 0.026645025238394737, -0.01920584961771965, 0.04739641025662422, -0.021431419998407364, -0.03828805685043335, -0.010272656567394733, -0.005388765595853329, 0.015135940164327621, -0.02872634492814541, 0.009144416078925133, 0.005780301056802273, -0.029633060097694397, 0.09207267314195633, 0.06194504722952843, 0.01998892053961754, -0.010530245490372181, -0.0143116544932127, -0.00033583189360797405, -0.07575182616710663, 0.01367283333092928, 0.006661256309598684, -0.050982050597667694, 0.0720425397157669, 0.06989940255880356, -0.0013021132908761501, -0.03426966443657875, -0.02746931090950966, 0.04232705384492874, -0.04706669598817825, -0.025614667683839798, -0.07245468348264694, -0.0038664136081933975, 0.019545866176486015, -0.04356348142027855, -0.0012679827632382512, -0.014692886732518673, -0.0021405660081654787, 0.040431197732686996, 0.009489585645496845, 0.04855040833353996, -0.0035109405871480703, 0.01015416532754898, 0.025243740528821945, 0.03956569731235504, -0.0287469532340765, 0.031570129096508026, -0.026274096220731735, 0.024172168225049973, -0.056958120316267014, 0.02852027490735054, -0.004819493740797043, 0.000094100549176801, -0.014455905184149742, -0.045129623264074326, 0.036062486469745636, 0.01677420735359192, 0.07999689877033234, -0.0730728954076767, -0.0313846655189991, -0.014394083060324192, -0.07698825746774673, 0.0075422110967338085, 0.008222246542572975, -0.019144028425216675, -0.10962995886802673, 0.06969332695007324, 0.08003810793161392, 0.01829913631081581, 0.054196763783693314, -0.030951915308833122, -0.03082827292382717, -0.06037890538573265, 0.03583580628037453, 0.017155438661575317, -0.010401451028883457, 0.026232881471514702, 0.01591901108622551, -0.0039024760480970144, 0.048014622181653976, 0.06515976041555405, 0.009360791184008121, 0.026232881471514702, 0.03152891620993614, 0.022276312112808228, -0.025243740528821945, -0.056628406047821045, -0.001061267452314496, -0.03346598520874977, -0.000579575658775866, -0.009705960750579834, -0.0173202957957983, -0.0271189883351326, -0.03367205709218979, -0.04496476799249649, -0.002019499195739627, -0.0013600708916783333, 0.03618612885475159, 0.06297540664672852, -0.009680201299488544, 0.04496476799249649, -0.011117548681795597, -0.044552624225616455, -0.015517172403633595, -0.015826279297471046, -0.03233259543776512, 0.010622978210449219, 0.014342566020786762, -0.04253312572836876, -0.004806614015251398, 0.030848881229758263, 0.014528029598295689, 0.014672279357910156, -0.0006935588899068534, 0.01025720126926899, 0.007434023544192314, -0.0015043207677081227, -0.027902059257030487, -0.0028515122830867767, -0.011014513671398163, 0.007866773754358292, 0.011457567103207111, -0.021472634747624397, 0.023718811571598053, -0.020174384117126465, 0.013157655484974384, 0.049498338252305984, -0.006604586727917194, -0.038679592311382294, -0.015702636912465096, 0.009422612376511097, -0.027551738545298576, 0.015414136461913586, -0.030395522713661194, -0.0014012851752340794, -0.015826279297471046, -0.046159982681274414, 0.0028824228793382645, -0.011983049102127552, -0.0044562928378582, 0.011601816862821579, -0.025552846491336823, 0.005569078028202057, 0.06487125903367996, 0.021101705729961395, 0.0070373364724218845, 0.03367205709218979, -0.013075226917862892, 0.016485707834362984, 0.045253265649080276, -0.03851473331451416, -0.042821627110242844, 0.06210990250110626, 0.04245069622993469, -0.06845690310001373, 0.020844116806983948, 0.03278595209121704, -0.01051994226872921, 0.056752048432826996, -0.005089962389320135, 0.03497030586004257, -0.011519388295710087, -0.0816042497754097, -0.02990095131099224, 0.05263062193989754, 0.0008416726486757398, -0.05790604650974274, -0.007774041499942541, -0.06701440364122391, 0.06070861965417862, -0.008984711021184921, -0.006146077997982502, 0.017845777794718742, 0.0032585030421614647, 0.012889762409031391, -0.025903167203068733, 0.0029571237973868847, 0.057329047471284866, 0.016228118911385536, -0.048921335488557816, 0.010653888806700706, -0.002011771546676755, -0.024460667744278908, 0.015393529087305069, 0.01674329675734043, 0.028767559677362442, 0.017886992543935776, -0.0272426325827837, 0.05543319135904312, -0.03128163143992424, 0.009108353406190872, 0.009896576404571533, -0.000106819010397885, 0.06528340280056, 0.030663415789604187, -0.02063804492354393, 0.02161688357591629, -0.03913294896483421, -0.04447019472718239, -0.04148216173052788, 0.010437513701617718, 0.004979198798537254, 0.0001951238082256168, 0.021987812593579292, -0.0037350431084632874, 0.022606026381254196, -0.00864984467625618, -0.011416352353990078, -0.05493862181901932, -0.02990095131099224, -0.054897405207157135, 0.007176434621214867, -0.006001827772706747, 0.008335585705935955, 0.05980190262198448, -0.010653888806700706, -0.02033924125134945, 0.01097329892218113, -0.004971471149474382, 0.050198979675769806, -0.040657877922058105, -0.019092509523034096, 0.0049148015677928925, -0.0569993332028389, -0.019494349136948586, 0.04912740737199783, 0.07970839738845825, 0.014744404703378677, -0.019679812714457512, -0.0017722136108204722, 0.011735763400793076, 0.0274899173527956, -0.007109461352229118, 0.01817549206316471, -0.05291911959648132, 0.03210591524839401, 0.03863837569952011, -0.030910702422261238, -0.03249745070934296, -0.04508841037750244, 0.06524218618869781, -0.020349545404314995, -0.014167404733598232, -0.0024792959447950125, -0.018443385139107704, 0.033383559435606, -0.09858453273773193, 0.04228584095835686, -0.012951583601534367, 0.04809705168008804, 0.011560602113604546, -0.007655550260096788, -0.04119366034865379, -0.06870418787002563, -0.015754153952002525, 0.043851982802152634, -0.050075337290763855, -0.030292486771941185, 0.05947218835353851, 0.03655705600976944, -0.082346111536026, 0.0037711055483669043, 0.03979237750172615, 0.00927836261689663, 0.014538333751261234, 0.00456963200122118, -0.014074672944843769, 0.0031966818496584892, -0.013662530109286308, -0.015754153952002525, -0.046613339334726334, 0.006692166905850172, 0.013714048080146313, -0.05184755101799965, -0.04094637557864189, 0.00617698859423399, -0.04020451754331589, 0.01576445810496807, 0.08049146831035614, -0.005368158686906099, -0.002440657466650009, 0.002619681879878044, -0.03035430982708931, 0.003990056458860636, 0.00015825635637156665, -0.022935740649700165, 0.05056990683078766, -0.0881161093711853, -0.011581209488213062, -0.03241502121090889, -0.047643695026636124, -0.023883668705821037, 0.04471748322248459, -0.031178593635559082, 0.059060048311948776, -0.004958591889590025, 0.021184133365750313, 0.061326831579208374, -0.054773762822151184, -0.02703656069934368, -0.009942942298948765, 0.009056835435330868, 0.02965366654098034, 0.020122867077589035, -0.03946266323328018, -0.054567690938711166, 0.0075319078750908375, 0.03497030586004257, 0.02505827508866787, 0.025223132222890854, -0.02056591957807541, 0.05563926324248314, -0.06070861965417862, 0.013868601061403751, 0.04508841037750244, 0.006846720352768898, 0.005074507091194391, -0.004690698813647032, 0.035114556550979614, -0.03628916293382645, 0.017619099467992783, 0.0006922709289938211, 0.004108547233045101, 0.0323944166302681, -0.04090516269207001, -0.009999612346291542, -0.012302459217607975, 0.0098553616553545, 0.03577398508787155, 0.021822955459356308, -0.06994061172008514, -0.016011742874979973, -0.057658761739730835, -0.021328384056687355, 0.01149878092110157, -0.04517083987593651, 0.051806334406137466, -0.043975625187158585, -0.05633990466594696, -0.005239363759756088, -0.0074443272314965725, 0.013435851782560349, -0.007681309245526791, 0.02689231000840664, 0.051105692982673645, 0.01137513853609562, -0.011735763400793076, -0.022111454978585243, 0.010911477729678154, -0.0027742355596274137, -0.02196720615029335, -0.03400177136063576, 0.027222024276852608, 0.0032018334604799747, 0.04047241061925888, -0.05671083554625511, -0.0220908485352993, -0.06874539703130722, 0.015063815750181675, -0.05633990466594696, 0.030086416751146317, -0.026583204045891762, -0.02942698821425438, 0.0058009084314107895, 0.015084422193467617, 0.04933347925543785, 0.016052957624197006, -0.007691612932831049, 0.07097097486257553, -0.035485487431287766, 0.0010908901458606124, -0.012529137544333935, 0.007707068230956793, 0.05745268985629082, 0.028891202062368393, -0.04484112560749054, -0.005154359620064497, 0.003652614541351795, -0.011333923786878586, 0.023986704647541046, -0.011024816893041134, -0.004582511726766825, 0.022255705669522285, -0.010128406807780266, -0.05403190478682518, -0.008917737752199173, 0.05160026624798775, -0.023512739688158035, 0.019978616386651993, -0.009685353375971317, 0.03220895305275917, 0.0065582203678786755, -0.0341460220515728, 0.017557278275489807, 0.030436737462878227, -0.0027407489251345396, 0.055474404245615005, 0.032353200018405914, -0.04129669815301895, 0.015754153952002525, 0.007212497293949127, 0.037092842161655426, -0.025202525779604912, -0.04999290779232979, -0.0014708342496305704, 0.05407312139868736, -0.0026737756561487913, -0.013507976196706295, 0.04356348142027855, -0.06384090334177017, 0.08819853514432907, 0.03538244962692261, 0.03519698604941368, 0.03952448442578316, 0.04760248214006424, -0.05205362290143967, 0.022214490920305252, -0.03746376931667328, -0.0635111853480339, -0.10542610287666321, -0.008371648378670216, -0.007774041499942541, 0.08959981799125671, 0.00817072857171297, 0.025944381952285767, 0.014569244347512722, 0.02769598923623562, 0.01938101090490818 ]
717,863
pytorch_optimizer.optimizer.sam
__init__
null
def __init__( self, params: PARAMETERS, base_optimizer: OPTIMIZER, rho: float = 0.05, adaptive: bool = False, **kwargs, ): self.validate_non_negative(rho, 'rho') defaults: DEFAULTS = {'rho': rho, 'adaptive': adaptive} defaults.update(kwargs) super().__init__(params, defaults) self.base_optimizer = base_optimizer(self.param_groups, **kwargs) self.param_groups = self.base_optimizer.param_groups
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], base_optimizer: Type[torch.optim.optimizer.Optimizer], rho: float = 0.05, adaptive: bool = False, **kwargs)
[ -0.016117071732878685, -0.030419697985053062, 0.0015297794016078115, 0.012053088285028934, -0.04436128959059715, -0.010257159359753132, -0.049730561673641205, -0.01579306274652481, -0.08035392314195633, 0.026975959539413452, -0.018301809206604958, 0.05173015221953392, -0.01850547082722187, 0.06924508512020111, -0.06050613150000572, -0.004934174939990044, 0.023828456178307533, 0.032123055309057236, -0.031530581414699554, -0.009822063148021698, -0.0024555157870054245, -0.0158393494784832, -0.042546845972537994, 0.07283694297075272, 0.01530242245644331, 0.047323644161224365, -0.01674657128751278, -0.00020221555314492434, -0.058987922966480255, -0.012154919095337391, 0.0023108695168048143, -0.007493836339563131, 0.0035224270541220903, 0.0847974568605423, 0.050508178770542145, -0.009386966936290264, -0.010423791594803333, 0.08657486736774445, -0.10938501358032227, 0.053174298256635666, 0.007364233024418354, -0.0389920175075531, 0.03688133880496025, -0.054766565561294556, -0.0026869499124586582, -0.010053497739136219, 0.049397293478250504, 0.019477494060993195, 0.012765904888510704, -0.018181463703513145, 0.033307995647192, -0.03271552547812462, 0.029605049639940262, 0.00025703650317154825, -0.01764453575015068, 0.04299119859933853, 0.053137268871068954, 0.01609855704009533, 0.04924917593598366, -0.024383896961808205, -0.02690190076828003, -0.060543160885572433, -0.01026641670614481, -0.06391283869743347, -0.006054316181689501, -0.05254479870200157, -0.11064401268959045, -0.01790374144911766, 0.017579734325408936, 0.032641466706991196, 0.042806051671504974, -0.015635687857866287, -0.011682793498039246, -0.02031065709888935, -0.0056516206823289394, 0.01842215470969677, -0.04276902228593826, -0.04376881942152977, -0.025457751005887985, -0.04910105839371681, 0.02297677844762802, -0.0063551804050803185, -0.03775152936577797, -0.030956625938415527, -0.04636088013648987, -0.07642880082130432, -0.03099365532398224, -0.0740589126944542, 0.04425020143389702, -0.03373383358120918, -0.048434529453516006, -0.022717570886015892, 0.02362479269504547, 0.02590210549533367, 0.04821235314011574, 0.05550715699791908, 0.010377504862844944, -0.033252451568841934, 0.029679110273718834, -0.03451145440340042, -0.04662008583545685, -0.009035187773406506, -0.0023189696948975325, -0.0008262197370640934, 0.002798038301989436, -0.02031065709888935, 0.008711179718375206, -0.017718594521284103, 0.01966264098882675, -0.02505042776465416, -0.06609757989645004, 0.03582599759101868, -0.10849630832672119, 0.032900672405958176, -0.03528907150030136, 0.033511657267808914, -0.01631147600710392, -0.0055821905843913555, 0.03147503733634949, 0.021328967064619064, -0.01778339594602585, 0.06202434003353119, -0.0320119634270668, 0.04113972559571266, 0.02582804672420025, 0.0037608041893690825, 0.020292142406105995, 0.02005145139992237, -0.019273832440376282, -0.009160161949694157, 0.030715934932231903, -0.006521813105791807, -0.034030068665742874, -0.008262197487056255, 0.014654407277703285, -0.023217469453811646, 0.007280916906893253, 0.03269701078534126, -0.02138451114296913, -0.008900955319404602, 0.05335944518446922, -0.011303241364657879, 0.018357353284955025, -0.03456699848175049, 0.022476879879832268, 0.015857864171266556, 0.01868136040866375, -0.03717757388949394, -0.010868145152926445, -0.00490640290081501, -0.005563675891608, 0.022014012560248375, 0.02092164382338524, 0.027901696041226387, 0.006026544142514467, -0.03408561646938324, 0.0053600138053298, -0.014441488310694695, 0.0010802187025547028, -0.00411952706053853, -0.010831115767359734, 0.02125490829348564, 0.011525418609380722, -0.030438212677836418, -0.0357334241271019, -0.029679110273718834, -0.04010290279984474, -0.03839954733848572, -0.0238840002566576, 0.0019313176162540913, -0.006521813105791807, -0.11094025522470474, -0.01919977366924286, 0.02560586854815483, -0.013913818635046482, 0.07565117627382278, 0.01707983762025833, 0.00882226787507534, 0.009646173566579819, -0.002909126691520214, 0.06643084436655045, -0.0001900652569020167, -0.02543923631310463, -0.035881541669368744, 0.023735880851745605, 0.0074151488952338696, 0.020588377490639687, 0.01095146220177412, -0.005591447930783033, 0.03356720134615898, 0.05332241579890251, 0.021014217287302017, -0.021662231534719467, -0.012053088285028934, 0.005438701249659061, -0.012617787346243858, 0.06643084436655045, -0.03340056911110878, 0.004026953596621752, 0.10782977938652039, 0.019273832440376282, 0.013173229061067104, 0.011738337576389313, 0.0017160838469862938, 0.039362311363220215, 0.009886864572763443, -0.011016263626515865, -0.0032817355822771788, 0.002064392203465104, 0.019088685512542725, 0.010858887806534767, -0.009516570717096329, 0.02621685527265072, -0.009757261723279953, -0.02229173295199871, -0.02027362771332264, 0.016385534778237343, 0.045694347470998764, 0.07072626054286957, 0.013895303942263126, 0.08361250907182693, -0.005341499112546444, 0.01756121963262558, 0.001702197827398777, 0.04695335030555725, -0.002772580599412322, 0.04750879108905792, -0.060320984572172165, -0.0487307645380497, 0.0107200276106596, -0.036214809864759445, -0.07105952501296997, 0.0026800069026649, -0.003554827766492963, -0.005665506701916456, 0.030438212677836418, -0.022476879879832268, 0.0028489537071436644, -0.09635064750909805, -0.040213990956544876, 0.01936640590429306, 0.023273013532161713, -0.01273813284933567, -0.014173024334013462, -0.07187417149543762, -0.024180235341191292, -0.003839491866528988, 0.04617573320865631, 0.004117212723940611, -0.010062755085527897, 0.021291937679052353, -0.03186384588479996, -0.05572933331131935, 0.03103068470954895, -0.0487307645380497, 0.0342707633972168, 0.029642079025506973, -0.008433458395302296, 0.008627863600850105, -0.04880482330918312, -0.011766109615564346, -0.021106790751218796, -0.048101264983415604, 0.07428108900785446, 0.0173853300511837, 0.024180235341191292, 0.008942613378167152, -0.027309224009513855, 0.002453201450407505, -0.008998158387839794, 0.11612437665462494, 0.06509778648614883, 0.015089503489434719, -0.0006763661513105035, -0.0014742352068424225, 0.011442102491855621, -0.03628886863589287, -0.008192767389118671, -0.022051041945815086, -0.002180109266191721, 0.024476470425724983, -0.025753986090421677, 0.002994757378473878, -0.01233080867677927, -0.008988900110125542, 0.011506903916597366, -0.00047038981574587524, 0.024069147184491158, -0.04213952273130417, 0.018181463703513145, -0.0032076765783131123, 0.05098956078290939, 0.03025306575000286, 0.04636088013648987, 0.07790997624397278, -0.025365177541971207, 0.0019209031015634537, 0.04106566682457924, -0.006790276616811752, -0.009498056024312973, 0.04832344129681587, -0.025550324469804764, 0.014709951356053352, -0.024124691262841225, -0.021143820136785507, -0.024865280836820602, 0.029512476176023483, 0.022328762337565422, 0.03782558813691139, 0.023143410682678223, 0.06794904917478561, 0.05061926692724228, -0.005054520908743143, 0.012145661748945713, 0.03612223640084267, -0.08013174682855606, -0.004961946979165077, -0.04898997023701668, 0.003332650987431407, 0.05521091818809509, -0.012904766015708447, 0.015089503489434719, -0.05917306989431381, -0.05650695040822029, -0.07983551174402237, -0.020680950954556465, 0.013173229061067104, 0.02573547139763832, -0.06631975620985031, 0.007470692973583937, -0.028438622131943703, 0.031567610800266266, -0.00027367082657292485, -0.0073966337367892265, -0.011997544206678867, -0.008516775444149971, 0.03327096626162529, 0.0389920175075531, 0.01532093808054924, 0.0007388533558696508, 0.050508178770542145, 0.018394382670521736, -0.0013006596127524972, 0.025753986090421677, -0.03599263355135918, -0.061950281262397766, -0.018755419179797173, -0.07394782453775406, 0.03584451228380203, -0.06483858078718185, -0.02573547139763832, 0.0035386274103075266, -0.03008643351495266, 0.0030965881887823343, 0.050508178770542145, 0.010877402499318123, -0.03717757388949394, 0.02801278419792652, 0.003147503826767206, -0.06013583764433861, -0.02134748175740242, 0.012895508669316769, -0.02586507610976696, 0.06250572204589844, 0.047656912356615067, -0.027012988924980164, 0.007623439189046621, -0.023606278002262115, 0.04239872843027115, -0.03843657672405243, 0.013089912943542004, -0.058728717267513275, 0.0013168600853532553, -0.00452916556969285, 0.011423586867749691, 0.037344206124544144, -0.026142796501517296, -0.03528907150030136, 0.02190292440354824, 0.015033959411084652, 0.03689985349774361, 0.012062345631420612, 0.08257568627595901, 0.0012312293983995914, -0.05047114938497543, -0.04595355689525604, 0.02138451114296913, 0.03880687057971954, 0.03928825259208679, -0.027494370937347412, -0.007979847490787506, -0.04250981658697128, 0.017792653292417526, 0.0006254506879486144, -0.009794291108846664, 0.0034553110599517822, 0.045990586280822754, 0.0159226655960083, -0.07561414688825607, -0.031104743480682373, 0.013700898736715317, -0.0789467990398407, 0.05143391340970993, 0.006785647943615913, 0.027142591774463654, -0.07039299607276917, 0.047916118055582047, 0.06902290880680084, 0.03301176056265831, 0.029327329248189926, 0.0010229387553408742, -0.000575981626752764, -0.013228773139417171, 0.04769394174218178, -0.04961947351694107, -0.02482825145125389, 0.05746971815824509, 0.0004122419923078269, 0.03784410282969475, -0.009035187773406506, 0.05135985463857651, 0.011590220034122467, -0.009572114795446396, 0.029160697013139725, 0.06306116282939911, 0.018653588369488716, 0.0027124076150357723, -0.03219711408019066, 0.0032747925724834204, -0.048656705766916275, -0.033122848719358444, 0.02082906849682331, -0.013737928122282028, -0.004677283111959696, 0.00932216551154852, 0.0032609065528959036, 0.01504321675747633, 0.002756380243226886, 0.021162334829568863, 0.02384697087109089, 0.049730561673641205, -0.07424405962228775, 0.00461479602381587, -0.029493961483240128, -0.05917306989431381, 0.013136199675500393, 0.025624383240938187, 0.03093811124563217, -0.019607096910476685, -0.005461844615638256, 0.07776185870170593, -0.005022120196372271, 0.024606073275208473, -0.022273218259215355, -0.03917716443538666, -0.03099365532398224, -0.003723774803802371, 0.006299636326730251, 0.017200183123350143, -0.027235165238380432, 0.028290504589676857, 0.020643921568989754, 0.008132594637572765, -0.057358626276254654, -0.07457732409238815, 0.07239259034395218, 0.06132078170776367, -0.00580899603664875, 0.01252521388232708, -0.012395610101521015, 0.011442102491855621, 0.02169926092028618, -0.022365791723132133, -0.037122029811143875, -0.04002884402871132, 0.016644740477204323, 0.0032030479051172733, 0.026068737730383873, 0.009174047969281673, -0.012090117670595646, -0.002000747714191675, -0.010812601074576378, 0.04102863743901253, 0.020384715870022774, 0.033030275255441666, 0.0033974526450037956, -0.018607301637530327, 0.0001479008496971801, -0.001467292197048664, 0.04806423559784889, -0.039103105664253235, 0.0074799503199756145, 0.026050223037600517, 0.05413706600666046, 0.017588991671800613, 0.03141949325799942, 0.034752145409584045, 0.03267849609255791, 0.08938910812139511, 0.012312293983995914, 0.014904356561601162, -0.043583668768405914, -0.05147094279527664, -0.01868136040866375, 0.014367429539561272, -0.035622335970401764, -0.06332036852836609, 0.023347072303295135, -0.07172605395317078, 0.03976963460445404, -0.006054316181689501, 0.017450131475925446, -0.03689985349774361, -0.011497646570205688, -0.022828659042716026, 0.0025758615229278803, -0.05517388880252838, 0.04724958539009094, -0.034437395632267, -0.021069761365652084, 0.05039709061384201, 0.029253270477056503, 0.006095974240452051, -0.01450628973543644, 0.017153896391391754, 0.021810349076986313, 0.01446000300347805, -0.02703150361776352, 0.07087437808513641, 0.002166223246604204, 0.003360423259437084, -0.05724753811955452, -0.053951919078826904, 0.06702331453561783, 0.03284512832760811, 0.0315120667219162, 0.021143820136785507, -0.00040587756666354835, -0.014413716271519661, -0.038029253482818604, 0.01712612435221672, 0.011155123822391033, 0.03132691979408264, -0.03490026295185089, -0.010479336604475975, -0.010664483532309532, -0.020755009725689888, 0.056840214878320694, -0.017672307789325714, -0.0067115891724824905, 0.008743580430746078, -0.0207920391112566, -0.07305911928415298, 0.04339852184057236, -0.013210258446633816, -0.02066243626177311, 0.019218288362026215, -0.01700577698647976, 0.00163855345454067, 0.04936026409268379, 0.03467808663845062, -0.018699875101447105, 0.021014217287302017, 0.047323644161224365, -0.022606482729315758, 0.007970590144395828, 0.003550199093297124, 0.04295416921377182, -0.011182895861566067, 0.012228977866470814, 0.011062550358474255, -0.06891182065010071, -0.04373178631067276, 0.0057117934338748455, -0.04376881942152977, 0.032734040170907974, 0.0107200276106596, 0.042065463960170746, -0.055544186383485794, -0.012765904888510704, 0.014478517696261406, -0.012673331424593925, -0.05695130303502083, -0.015857864171266556, -0.02186589315533638, 0.019181258976459503, -0.032734040170907974, 0.02797575481235981, 0.017098352313041687, 0.003263220889493823, -0.014173024334013462, 0.0274573415517807, -0.000386205647373572, -0.04606464505195618, -0.07820621132850647, 0.029716139659285545, -0.05021194368600845, -0.06520887464284897, 0.04584246873855591, 0.015061731450259686, -0.09338828921318054, -0.014108222909271717, 0.012164176441729069, 0.015570886433124542, -0.0024717161431908607, -0.03293770179152489, -0.015385739505290985, 0.04617573320865631, -0.03171572834253311, -0.026364972814917564, 0.006452383007854223, -0.02031065709888935, 0.028346048668026924, 0.0009170576231554151, -0.027735063806176186, -0.008905583992600441, -0.04236169904470444, 0.02982722781598568, 0.1046452447772026, -0.03869578242301941, -0.04565731808543205, -0.0003488869115244597, 0.012488184496760368, 0.033937495201826096, -0.0734294131398201, 0.011506903916597366, 0.04480564221739769, -0.12849222123622894, -0.01093294657766819, -0.002012319630011916, 0.0024346867576241493, -0.024939339607954025, -0.0316786989569664, 0.006396838463842869, -0.01897759735584259, -0.034715116024017334, 0.0019637183286249638, 0.04747176170349121, 0.01678360067307949, -0.027401797473430634, 0.03304878994822502, 0.023235984146595, 0.03958448767662048, -0.003982980735599995, 0.010257159359753132, -0.025939134880900383, -0.030438212677836418, 0.030623359605669975, 0.033511657267808914, 0.026142796501517296, -0.012515956535935402, 0.0031775902025401592, -0.060580190271139145, -0.008613977581262589, 0.035751938819885254, 0.040991608053445816, 0.007766928523778915, 0.03869578242301941, 0.08761169761419296, 0.014885841868817806, 0.0047536566853523254, -0.006591243203729391, 0.03795519471168518, 0.02401360310614109, -0.011821653693914413, -0.008433458395302296, -0.07291100174188614, -0.08731545507907867, -0.015200591646134853, 0.004679597448557615, -0.02156965807080269, -0.011090322397649288, -0.016376277431845665, -0.003885778598487377, 0.02693893015384674, 0.03241929039359093, -0.05047114938497543, -0.03954745829105377, -0.0316786989569664, -0.00959988683462143, 0.021328967064619064, 0.0014510918408632278, 0.03254889324307442, -0.053433503955602646, 0.01979224383831024, -0.024087661877274513, -0.07542899996042252, 0.04858264699578285, 0.005008234176784754, -0.02336558699607849, -0.04606464505195618, -0.01545054093003273, 0.020292142406105995, 0.00914627593010664, 0.028605254366993904, -0.056840214878320694, -0.062690868973732, -0.055803392082452774, 0.027901696041226387, 0.012275264598429203, -0.014154509641230106, -0.006322779692709446, -0.06676410883665085, 0.06154295802116394, -0.010173843242228031, 0.03817737102508545, 0.01095146220177412, 0.01752419024705887, 0.058728717267513275, -0.06683816760778427, 0.020329171791672707, 0.01910720020532608, 0.0030063290614634752, -0.051026590168476105, 0.021458569914102554, 0.07820621132850647, 0.03947339951992035, 0.001552922884002328, -0.027512885630130768, -0.0034113386645913124, -0.009748004376888275, -0.03258592262864113, 0.035103924572467804, 0.023513704538345337, 0.020847583189606667, -0.026457546278834343, 0.022958263754844666, -0.007530865725129843, 0.03943637013435364, -0.03369680419564247, 0.025679927319288254, 0.02164371684193611, -0.03969557583332062, -0.05413706600666046, 0.004471306689083576, -0.0023189696948975325, 0.026068737730383873, -0.005452587269246578, 0.010164585895836353, 0.0789467990398407, 0.02199549786746502, 0.0272907093167305, -0.045212965458631516, -0.05021194368600845, 0.03047524206340313, 0.040176961570978165, 0.005697907414287329, -0.01795002818107605, 0.07313317805528641, -0.0026429775170981884, -0.019273832440376282, -0.0013619896490126848, 0.07020784914493561, 0.07057814300060272, 0.013941590674221516, -0.036825794726610184, 0.018107404932379723, 0.012210463173687458, -0.030456727370619774, -0.06976349651813507, -0.019014626741409302, -0.0854639858007431, 0.035103924572467804, 0.002726293634623289, -0.0002551561046857387, 0.012941795401275158, 0.06546808034181595, 0.0055868192575871944 ]
717,866
pytorch_optimizer.optimizer.sam
__str__
null
def __str__(self) -> str: return 'SAM'
(self) -> str
[ 0.02549949660897255, -0.015958577394485474, 0.025841770693659782, -0.03960122913122177, 0.01126085128635168, -0.063389353454113, 0.0009925977792590857, 0.017182210460305214, 0.08837543427944183, -0.03963545709848404, -0.06140415742993355, 0.0003960230096708983, -0.012655622325837612, 0.021546218544244766, 0.024951856583356857, -0.006755655165761709, 0.023582754656672478, -0.04877420514822006, 0.003217386081814766, 0.022401906549930573, 0.010413720272481441, 0.046994373202323914, 0.03205406293272972, -0.016531888395547867, -0.036383844912052155, 0.07475288212299347, -0.017781192436814308, -0.039703913033008575, -0.008779356256127357, 0.003185297828167677, -0.009036063216626644, -0.061301473528146744, 0.005634704139083624, -0.011038372293114662, -0.03287552297115326, 0.0061951796524226665, -0.04415348917245865, 0.031249718740582466, -0.03249902278184891, -0.005403668154031038, -0.015470835380256176, 0.034398648887872696, -0.012030970305204391, -0.02217942662537098, -0.03260170295834541, -0.009523805230855942, 0.010080002248287201, 0.03212251886725426, -0.0077140252105891705, 0.0029243130702525377, 0.0033264863304793835, 0.028049444779753685, -0.05781026557087898, -0.020040208473801613, -0.03458689898252487, -0.017216438427567482, 0.04829501733183861, -0.024079054594039917, 0.00964360125362873, 0.01528258342295885, 0.0042313761077821255, -0.02508876658976078, 0.03301243484020233, -0.02736489474773407, -0.03051382675766945, 0.020844554528594017, 0.00960081722587347, 0.02579043060541153, 0.04333202913403511, 0.050690945237874985, 0.038334812968969345, -0.053223781287670135, -0.0017691345419734716, 0.03278995677828789, 0.03162622079253197, -0.02313779853284359, -0.1055576428771019, -0.007504381705075502, 0.033354710787534714, -0.06913956999778748, 0.0481923371553421, -0.0012632091529667377, -0.03278995677828789, -0.004278439097106457, -0.0388139970600605, -0.039498548954725266, -0.027809852734208107, -0.07475288212299347, -0.022076744586229324, 0.0015156370354816318, -0.010362379252910614, -0.0018589816754683852, -0.007414534687995911, 0.08686942607164383, -0.03022289276123047, -0.008603940717875957, 0.000620373641140759, -0.05038289725780487, -0.0029521228279918432, 0.03727376088500023, 0.0006123515777289867, 0.013964824378490448, 0.0009942022152245045, 0.046960145235061646, -0.05418214946985245, -0.016780037432909012, -0.03330336883664131, 0.03532279282808304, 0.02354852855205536, 0.035801976919174194, -0.03545970097184181, 0.031455084681510925, 0.0008792192093096673, 0.00045779297943226993, 0.0013851446565240622, -0.05739953741431236, 0.016865605488419533, -0.005733108147978783, -0.014238644391298294, -0.039327409118413925, 0.048500385135412216, -0.007153549697250128, -0.05233386531472206, 0.004419627599418163, 0.026919938623905182, 0.06516918540000916, -0.050690945237874985, -0.01565052941441536, 0.05093053728342056, -0.03847172111272812, 0.03039403073489666, 0.01766139641404152, -0.049082253128290176, -0.026526320725679398, 0.08187220990657806, 0.00559619814157486, 0.060103509575128555, 0.021238170564174652, 0.019509682431817055, 0.15511907637119293, -0.010892905294895172, -0.002954262075945735, 0.04042269289493561, 0.020057322457432747, 0.018517084419727325, -0.0011712226551026106, 0.004111579619348049, 0.06735974550247192, 0.0021434978116303682, -0.004663498606532812, 0.041894473135471344, 0.0032943980768322945, 0.033560074865818024, 0.013271717354655266, -0.03936163708567619, 0.03850594907999039, 0.0030847545713186264, -0.046994373202323914, 0.029213180765509605, -0.033406052738428116, -0.003373549086973071, -0.051272813230752945, -0.04240788519382477, 0.034894946962594986, 0.00883069820702076, 0.0337996669113636, -0.02106703259050846, 0.05117012932896614, 0.012339018285274506, -0.033320482820272446, -0.02905915677547455, -0.02284686453640461, -0.09446793049573898, 0.0416206531226635, 0.03140374273061752, 0.027193758636713028, 0.016283739358186722, 0.10062888264656067, 0.0352543368935585, -0.05294996127486229, 0.005266758147627115, 0.013323059305548668, -0.0323963388800621, 0.03133528679609299, 0.05277882143855095, -0.02579043060541153, 0.011560342274606228, 0.0574679933488369, 0.03867708891630173, -0.02098146453499794, 0.0016878441674634814, 0.012039527297019958, -0.05038289725780487, 0.009583703242242336, -0.009660715237259865, -0.024524012580513954, -0.00397894810885191, -0.04980102926492691, -0.030821874737739563, -0.013939154334366322, -0.006819831673055887, 0.044632673263549805, -0.050485581159591675, 0.03703416883945465, 0.05729685351252556, -0.0014899664092808962, 0.049287617206573486, -0.003944720607250929, -0.00517263263463974, -0.033115118741989136, 0.02060496248304844, 0.007910833694040775, -0.009386895224452019, 0.0080734146758914, 0.06219138950109482, -0.05661230534315109, 0.018089240416884422, -0.028836678713560104, -0.018808018416166306, 0.006546011660248041, 0.05079362541437149, -0.02591022662818432, 0.024352874606847763, -0.030548054724931717, -0.025277016684412956, -0.00009633172885514796, 0.02957257069647312, -0.053052641451358795, -0.04822656512260437, -0.00151349778752774, 0.011209510266780853, -0.070508673787117, -0.023531414568424225, 0.031027238816022873, -0.033474504947662354, 0.029675252735614777, -0.024489784613251686, -0.039293184876441956, -0.06670942157506943, -0.03308089077472687, -0.016326522454619408, 0.03778717294335365, 0.012236335314810276, 0.032276544719934464, 0.03142085671424866, -0.032943978905677795, 0.003968252334743738, 0.016737252473831177, -0.01786676049232483, -0.03980659693479538, 0.057159945368766785, -0.03761603683233261, -0.0229666605591774, 0.009130188263952732, -0.018345946446061134, -0.07345224171876907, -0.030154436826705933, 0.030085982754826546, 0.016762923449277878, 0.0008412480819970369, -0.08488422632217407, -0.025687746703624725, -0.034809380769729614, 0.017293449491262436, 0.00708081666380167, 0.02948700077831745, -0.023873688653111458, 0.04055960103869438, 0.041278377175331116, -0.008762243203818798, 0.11254005879163742, 0.03593888878822327, -0.06540877372026443, -0.006575960665941238, -0.014153076335787773, -0.02077609859406948, -0.00620801467448473, 0.02363409660756588, -0.07625889778137207, -0.0452829971909523, 0.009275655262172222, -0.03412482887506485, 0.015008763410151005, 0.054045241326093674, 0.015616302378475666, -0.07002948969602585, 0.03152353689074516, 0.005668931640684605, 0.017900988459587097, 0.013297388330101967, 0.03030846081674099, 0.016215283423662186, -0.03446710482239723, -0.0215633325278759, 0.01490608137100935, 0.012313347309827805, 0.017404690384864807, 0.04240788519382477, -0.013074909336864948, -0.011645910330116749, -0.009994433261454105, -0.007423091679811478, 0.014965979382395744, -0.01762716844677925, -0.05941896140575409, -0.016044145449995995, -0.040114644914865494, -0.033406052738428116, 0.013134807348251343, -0.006451885681599379, -0.04665209725499153, 0.03669189289212227, 0.029384318739175797, 0.06612755358219147, 0.006165230646729469, 0.07441060990095139, -0.009900307282805443, 0.03366275876760483, 0.03456978499889374, 0.07002948969602585, -0.0351516529917717, -0.008197489194571972, -0.03417617082595825, -0.020160004496574402, 0.028220582753419876, -0.028785336762666702, -0.044803813099861145, 0.055825069546699524, -0.0014621565351262689, 0.06256788969039917, -0.06783892959356308, -0.050519805401563644, 0.04569372907280922, -0.011295078322291374, -0.041449517011642456, 0.0011894060298800468, 0.014965979382395744, -0.038540177047252655, -0.012236335314810276, -0.02205963060259819, 0.05784449353814125, -0.03573352098464966, -0.015924349427223206, 0.01844862848520279, 0.025431040674448013, 0.03441576287150383, -0.04665209725499153, -0.01138064730912447, 0.0018728866707533598, 0.005544856656342745, 0.004000340588390827, 0.010867235250771046, 0.041894473135471344, 0.021169716492295265, 0.01602703146636486, 0.01229623332619667, -0.007936504669487476, 0.048568837344646454, -0.02806655876338482, 0.007328965701162815, -0.019646592438220978, -0.07310996204614639, 0.008548321202397346, 0.00708937318995595, -0.017764078453183174, -0.0049116481095552444, -0.020639188587665558, -0.005206860136240721, 0.07420524209737778, -0.03142085671424866, -0.017610054463148117, 0.011440545320510864, -0.048363473266363144, -0.000051073864597128704, -0.03809522092342377, 0.07078249007463455, 0.045591045171022415, 0.01553073339164257, -0.050314441323280334, -0.0524023212492466, 0.023736778646707535, 0.01092713326215744, 0.027638714760541916, 0.07331532984972, -0.0022354843094944954, -0.022624384611845016, 0.013400070369243622, 0.028186354786157608, -0.012681293301284313, -0.010807336308062077, 0.008235994726419449, -0.03771871700882912, -0.016566116362810135, -0.03744489699602127, -0.048329245299100876, -0.07057712972164154, -0.060514241456985474, -0.013554094359278679, -0.06000082939863205, 0.05158086121082306, -0.0053694406524300575, -0.027142416685819626, -0.013006454333662987, -0.02039959654211998, -0.03587043285369873, 0.022624384611845016, 0.04514608904719353, -0.021049920469522476, -0.036007340997457504, -0.0070594241842627525, -0.000013102719094604254, -0.031078580766916275, -0.05058826133608818, -0.07468443363904953, 0.074615977704525, 0.014863296411931515, -0.017088085412979126, 0.01534248236566782, -0.016215283423662186, 0.012783975340425968, -0.038916680961847305, 0.03176312893629074, 0.022983774542808533, 0.08351512998342514, 0.03686302900314331, 0.027056848630309105, 0.005425060633569956, 0.02815212868154049, 0.06872884184122086, -0.032772842794656754, -0.036349616944789886, 0.02928163670003414, -0.032071176916360855, -0.03042825683951378, 0.03203694894909859, -0.02089589647948742, 0.008458473719656467, -0.027912534773349762, -0.048363473266363144, 0.013708118349313736, 0.03788985684514046, -0.06332089751958847, -0.022949546575546265, 0.03665766492486, 0.0251743346452713, -0.02637229673564434, -0.06708592176437378, -0.004321223124861717, 0.06924225389957428, 0.011200953274965286, 0.019218748435378075, 0.050109077244997025, -0.004783294629305601, -0.053052641451358795, 0.04983525723218918, -0.030342688784003258, 0.025550836697220802, -0.05233386531472206, -0.0013263160362839699, -0.02823769673705101, -0.06530608981847763, 0.028956474736332893, -0.009481020271778107, 0.05692035332322121, 0.025396812707185745, 0.006302140653133392, 0.0019060445483773947, 0.04199715703725815, -0.05274459347128868, -0.020091548562049866, 0.026937050744891167, -0.01681426540017128, -0.002532835816964507, -0.010379493236541748, -0.019184520468115807, 0.04418771713972092, -0.024233078584074974, -0.015890121459960938, -0.02048516646027565, 0.005989814642816782, -0.05113590136170387, -0.021717356517910957, -0.009943092241883278, 0.09392029047012329, -0.008398575708270073, 0.012330461293458939, -0.010182684287428856, -0.008899153210222721, -0.062430981546640396, -0.014503908343613148, 0.035220108926296234, 0.0123989162966609, -0.05366873741149902, -0.008462752215564251, -0.03860863298177719, 0.045214541256427765, 0.005579084157943726, -0.012629951350390911, -0.09125054627656937, 0.04726819321513176, 0.024438442662358284, -0.02561929263174534, 0.0003470883530098945, -0.04025155305862427, 0.05123858526349068, -0.023394504562020302, -0.002438710303977132, -0.03118126280605793, -0.028579972684383392, -0.007397420704364777, 0.01908183842897415, -0.002849440323188901, 0.024250192567706108, -0.007299016695469618, 0.015154230408370495, 0.016942618414759636, 0.0061780656687915325, 0.009155859239399433, -0.007641291711479425, 0.04288707301020622, -0.023993484675884247, -0.05431906133890152, -0.04141528904438019, -0.017242109403014183, -0.0010813754051923752, 0.013177592307329178, -0.009147302247583866, 0.017798306420445442, -0.03943009302020073, 0.07139858603477478, 0.0013573347823694348, 0.025516610592603683, -0.012869544327259064, 0.03458689898252487, -0.0016653824131935835, 0.08467886596918106, -0.060685377568006516, 0.014974536374211311, 0.03604156896471977, 0.037958309054374695, 0.014238644391298294, -0.05130704119801521, -0.007144993171095848, -0.020125776529312134, 0.010644756257534027, -0.022983774542808533, -0.03583620488643646, -0.003970391117036343, 0.031112808734178543, 0.010952803306281567, -0.0024515455588698387, -0.034313078969717026, -0.023702552542090416, -0.05199158936738968, 0.0014375555329024792, 0.06842079758644104, -0.012698406353592873, -0.0010471479035913944, 0.02669745869934559, 0.03403925895690918, -0.028870906680822372, -0.006828388664871454, 0.05548279732465744, 0.03237922489643097, 0.05668075755238533, 0.027142416685819626, -0.0010765622137114406, 0.035357020795345306, 0.018636880442500114, -0.03936163708567619, 0.007752531208097935, -0.03792408108711243, 0.03325202688574791, 0.06345780938863754, -0.08878616243600845, 0.06410812586545944, 0.05976123362779617, 0.04785006120800972, -0.049116477370262146, 0.029076270759105682, -0.006379152648150921, 0.04295552521944046, 0.008342956192791462, -0.014880410395562649, -0.054627109318971634, -0.007555723190307617, -0.05476401746273041, -0.03566506877541542, -0.006845502182841301, -0.0283574927598238, -0.042270977050065994, -0.0005417573265731335, -0.035391245037317276, 0.006717149168252945, 0.04863729327917099, -0.05171776935458183, 0.01915029250085354, -0.04117569699883461, 0.02611559070646763, -0.022042516618967056, 0.026902824640274048, 0.032653044909238815, 0.013853585347533226, 0.05366873741149902, 0.09152436256408691, 0.048158109188079834, 0.0004722326993942261, -0.006537454668432474, -0.06301284581422806, 0.03669189289212227, -0.040217325091362, -0.0028922248166054487, -0.00961793027818203, -0.021580446511507034, 0.0015541429165750742, -0.010328151285648346, 0.031746018677949905, -0.017028186470270157, -0.0009952718392014503, -0.0024237355682998896, 0.021922720596194267, 0.06568259745836258, -0.041244152933359146, 0.040867649018764496, -0.030582280829548836, -0.01244170032441616, 0.008805027231574059, -0.009378338232636452, 0.051683541387319565, -0.09624776244163513, 0.00678988266736269, -0.004851749632507563, -0.00666580768302083, -0.09022372215986252, -0.0022739903070032597, 0.03143797069787979, 0.00810336321592331, 0.030240006744861603, -0.015813110396265984, 0.029264522716403008, -0.02247036062180996, -0.028186354786157608, -0.007465875707566738, 0.050519805401563644, -0.05171776935458183, 0.03662343695759773, -0.06472422182559967, -0.03131817281246185, -0.030376916751265526, -0.038334812968969345, -0.04100455716252327, 0.02252170257270336, -0.02022845856845379, 0.014897524379193783, 0.018003670498728752, -0.030924556776881218, -0.04014886915683746, 0.0019712906796485186, -0.024198850616812706, -0.01550506241619587, -0.016240954399108887, -0.05113590136170387, 0.009831852279603481, -0.034432876855134964, 0.07297305762767792, 0.01923586055636406, 0.004599321633577347, -0.02815212868154049, -0.015368152409791946, 0.017028186470270157, -0.017199324443936348, 0.009472464211285114, 0.02404482662677765, -0.062294069677591324, 0.009848966263234615, 0.0033393215853720903, 0.048705749213695526, -0.021426422521471977, 0.06978989392518997, -0.03652075305581093, -0.009361224249005318, -0.04514608904719353, 0.020177118480205536, -0.0466863252222538, 0.04042269289493561, 0.05140972137451172, -0.028870906680822372, -0.03860863298177719, 0.049732573330402374, -0.060103509575128555, -0.0438796691596508, -0.0451803132891655, -0.04702860116958618, 0.03131817281246185, 0.05072517320513725, 0.03316645696759224, 0.016831379383802414, -0.03030846081674099, -0.02599579468369484, 0.008659560233354568, 0.030787646770477295, 0.034775152802467346, 0.003151070326566696, -0.005266758147627115, -0.011106827296316624, -0.007534331176429987, -0.00841996818780899, 0.01981772854924202, 0.05004062131047249, -0.040525373071432114, 0.08159838616847992, 0.06640136986970901, -0.0294356606900692, 0.015120003372430801, 0.04278438910841942, -0.08885461837053299, -0.009771954268217087, 0.05650962144136429, 0.014452566392719746, 0.025054538622498512, 0.0029906288255006075, -0.013776573352515697, -0.01786676049232483, -0.027125302702188492, 0.03648652881383896, 0.05842636153101921, -0.0380609929561615, -0.006400544662028551, -0.05291573330760002, 0.014118848368525505, 0.016531888395547867, 0.04230520501732826, -0.0568176694214344, 0.050314441323280334, 0.024061940610408783, 0.02057073451578617, 0.004406792111694813, 0.013271717354655266, 0.06852348148822784, 0.024609580636024475, 0.04346894100308418, 0.060924969613552094, 0.03160910680890083, -0.03552815690636635, -0.0141787463799119, 0.048568837344646454, 0.02591022662818432, 0.012227778322994709, -0.01505154836922884, -0.00019359936413820833, 0.05965855345129967, 0.03424462676048279, -0.009344110265374184, 0.021375080570578575, -0.02342873252928257, -0.05216272920370102, 0.004244211595505476, 0.02537970058619976, 0.010353822261095047, 0.011243737302720547, 0.019372770562767982, -0.00906173326075077, 0.02765582874417305, -0.01969793252646923, -0.006918235681951046, 0.04398235306143761, -0.015633415430784225, 0.003071919083595276 ]
717,877
pytorch_optimizer.optimizer.sam
first_step
null
@torch.no_grad() def second_step(self, zero_grad: bool = False): for group in self.param_groups: for p in group['params']: if p.grad is None: continue # get back to "w" from "w + e(w)" p.data = self.state[p]['old_p'] # do the actual "sharpness-aware" update self.base_optimizer.step() if zero_grad: self.zero_grad()
(self, zero_grad: bool = False)
[ -0.0237690769135952, -0.015334305353462696, -0.015379459597170353, 0.05765265226364136, -0.04388970881700516, 0.004181262571364641, -0.008990165777504444, -0.004921788349747658, 0.012299954891204834, -0.014259640127420425, -0.006696341093629599, 0.019434290006756783, 0.03693598881363869, 0.041722316294908524, -0.027327213436365128, 0.027507830411195755, -0.016264477744698524, 0.058808598667383194, 0.033143050968647, -0.03279988095164299, -0.029079189524054527, -0.09868862479925156, 0.02981971576809883, 0.06296277046203613, -0.045298513025045395, -0.05599098652601242, -0.004547009710222483, -0.01409708522260189, -0.014241578057408333, -0.01048476342111826, -0.018016453832387924, -0.07621999084949493, 0.0030930503271520138, 0.0505363792181015, 0.07257154583930969, 0.0002613289107102901, -0.0029259806033223867, 0.04215579479932785, -0.09189746528863907, 0.02512369677424431, 0.02031930908560753, -0.049452684819698334, 0.019054997712373734, 0.009437190368771553, -0.018296409398317337, -0.004113531205803156, 0.0059874230064451694, 0.04006064683198929, -0.008385101333260536, 0.02031930908560753, 0.0057932608760893345, -0.03933818265795708, 0.0202651247382164, 0.052306417375802994, 0.02261313423514366, -0.001444928697310388, 0.03847122564911842, -0.03760426864027977, 0.03278182074427605, -0.023136921226978302, 0.06513015925884247, -0.07083763182163239, -0.003639414208009839, 0.04136108234524727, 0.0038945344276726246, -0.04435931146144867, -0.023949692025780678, 0.015171751379966736, -0.002478955779224634, 0.04533463716506958, 0.0005881311371922493, 0.016327694058418274, -0.003300759010016918, 0.04071086645126343, -0.03800162300467491, -0.03807387128472328, 0.00007852566341171041, 0.028609586879611015, -0.02324528992176056, -0.01009643916040659, 0.010529917664825916, 0.013320435769855976, -0.07896535098552704, -0.007834223099052906, -0.09052477777004242, -0.003316562855616212, 0.030795041471719742, -0.013961623422801495, 0.003420417197048664, -0.08510629832744598, 0.009753268212080002, 0.030361562967300415, 0.03500339761376381, 0.018729887902736664, 0.09500405937433243, 0.047176919877529144, -0.06209580972790718, -0.029765531420707703, -0.07759267091751099, -0.026333825662732124, -0.0021673929877579212, 0.013275282457470894, 0.012399294413626194, 0.0012925338232889771, 0.06997066736221313, -0.05494341254234314, 0.007391713093966246, -0.023660706356167793, -0.015334305353462696, -0.03057830221951008, 0.018070640042424202, -0.02559329941868782, -0.07419708371162415, 0.004547009710222483, -0.044467680156230927, -0.01406096201390028, 0.016255447641015053, 0.022125469520688057, 0.01806160807609558, 0.06744204461574554, 0.05006678029894829, 0.025810038670897484, -0.07513628900051117, -0.0405302494764328, -0.010069346986711025, 0.025250129401683807, 0.0372791588306427, 0.014051930978894234, 0.041216589510440826, -0.046779565513134, -0.022233840078115463, -0.005310113076120615, -0.053028881549835205, -0.009437190368771553, -0.009690052829682827, -0.04616547003388405, -0.0054094516672194, -0.027381397783756256, 0.032637327909469604, -0.002447347855195403, -0.003005000064149499, 0.002270118333399296, 0.00462828716263175, 0.032059356570243835, 0.028338663280010223, 0.07903759926557541, 0.013103696517646313, 0.052631527185440063, 0.033739086240530014, 0.00725625129416585, 0.030217070132493973, 0.04313112050294876, 0.030253194272518158, 0.007915499620139599, -0.01467505656182766, -0.021836483851075172, -0.040241263806819916, 0.020806973800063133, -0.04540688544511795, -0.009852607734501362, 0.002227222081273794, -0.07087375223636627, 0.019470414146780968, -0.005870022810995579, 0.0014358978951349854, 0.009951946325600147, 0.01624641753733158, 0.03151750564575195, -0.002797291614115238, 0.03455185517668724, -0.013528144918382168, -0.05642446503043175, -0.015812939032912254, 0.00773036852478981, 0.057905517518520355, 0.1058410257101059, 0.008204485289752483, -0.0380377471446991, -0.009861637838184834, -0.031481385231018066, 0.026550564914941788, -0.0013489763950929046, 0.00781164551153779, -0.049524929374456406, 0.0035445906687527895, 0.052378665655851364, -0.007816161029040813, -0.0237690769135952, 0.01772746816277504, 0.021258512511849403, 0.05266765132546425, 0.0255210530012846, 0.011369782499969006, -0.02962103858590126, 0.04995840787887573, 0.0054726675152778625, 0.033739086240530014, -0.019452352076768875, 0.06578037887811661, 0.06968168169260025, -0.01590324565768242, -0.03272763267159462, -0.008823095820844173, 0.008290278725326061, -0.04558749869465828, 0.005856476724147797, 0.0015149173559620976, 0.08777941763401031, -0.027905184775590897, 0.038868580013513565, -0.007509113755077124, 0.01994001492857933, 0.06614161282777786, 0.03624964877963066, 0.024527663365006447, -0.03370296210050583, 0.010412517003715038, 0.025484928861260414, 0.017330113798379898, 0.025232067331671715, -0.05266765132546425, -0.031264644116163254, -0.009816484525799751, -0.0007049671257846057, 0.03227609395980835, -0.035888414829969406, 0.015496860258281231, -0.0650579109787941, -0.0031675545033067465, -0.02882632613182068, 0.026640871539711952, -0.008547656238079071, -0.011911630630493164, -0.018368655815720558, 0.047574277967214584, 0.032637327909469604, -0.04248090460896492, -0.056279972195625305, -0.03850734978914261, -0.008276731707155704, -0.03522013500332832, -0.027110474184155464, -0.08315564692020416, 0.01981358416378498, -0.030704734846949577, 0.004714079666882753, 0.06252928823232651, -0.029639098793268204, 0.016210293397307396, 0.06585262715816498, 0.0043912287801504135, 0.012670218013226986, -0.03995227813720703, 0.04273376613855362, -0.02331753633916378, -0.045695871114730835, 0.027832938358187675, -0.002254314487800002, -0.01637284830212593, -0.05342623591423035, -0.032962433993816376, -0.056279972195625305, -0.059205953031778336, 0.0108189033344388, -0.017899053171277046, 0.02649637870490551, 0.022938242182135582, -0.001803903141990304, 0.0240219384431839, 0.0307769812643528, 0.07701469957828522, 0.0011486053699627519, -0.041216589510440826, 0.031156275421380997, 0.017763592302799225, 0.04388970881700516, 0.030090639367699623, 0.0407831110060215, 0.05259540304541588, 0.02884438820183277, 0.10779167711734772, 0.007202066481113434, -0.066286101937294, 0.0005438237567432225, -0.0003138204338029027, 0.006642156280577183, 0.01295920368283987, 0.01656249538064003, 0.03682762011885643, -0.005991938523948193, 0.021728115156292915, 0.026315763592720032, 0.10519080609083176, -0.006258347537368536, 0.029729407280683517, -0.0006806968594901264, -0.012950173579156399, 0.02039155550301075, -0.008565717376768589, -0.008750849403440952, 0.045370761305093765, 0.001884051482193172, -0.058158379048109055, 0.005255928263068199, 0.05273989588022232, -0.00737365148961544, 0.03818223997950554, -0.010475733317434788, 0.012056123465299606, -0.033341728150844574, -0.034642163664102554, 0.007960653863847256, -0.026586687192320824, 0.05194518715143204, -0.035238198935985565, -0.06274602562189102, -0.0007309307111427188, -0.01876601204276085, -0.00438671326264739, 0.06578037887811661, -0.03175230696797371, -0.00929269753396511, 0.010277055203914642, 0.025557175278663635, -0.03350428491830826, 0.011956784874200821, 0.019831646233797073, 0.01617417111992836, -0.046273842453956604, -0.020680541172623634, -0.04475666582584381, 0.007734884042292833, 0.016607649624347687, 0.011261412873864174, -0.04966942220926285, -0.03424480929970741, 0.03112015128135681, 0.008579264394938946, 0.028754079714417458, -0.039446551352739334, 0.02326335199177265, -0.019921954721212387, -0.019759399816393852, 0.010918241925537586, 0.03417256474494934, 0.005906146019697189, -0.008692149072885513, 0.011649737134575844, 0.05747203901410103, -0.04580423980951309, -0.005382359493523836, -0.001877278438769281, -0.04526238888502121, 0.07022353261709213, 0.0510421060025692, 0.06169845536351204, -0.032890189439058304, 0.029765531420707703, 0.002659571822732687, -0.04006064683198929, 0.006755041424185038, 0.04136108234524727, -0.06039801985025406, 0.07318563759326935, 0.0615539625287056, -0.009960977360606194, -0.027688445523381233, 0.016914695501327515, -0.018233193084597588, -0.051981307566165924, -0.03265538811683655, -0.05292051285505295, 0.024238677695393562, 0.001976617379114032, -0.0344073623418808, -0.014331886544823647, -0.054257072508335114, -0.007477506063878536, 0.10627450048923492, 0.015099504962563515, -0.010529917664825916, -0.044576048851013184, -0.027760691940784454, 0.03904919698834419, 0.0248888973146677, 0.004822449292987585, 0.03966329246759415, -0.04526238888502121, 0.06021740287542343, -0.06552751362323761, 0.04226416349411011, 0.021204328164458275, 0.021728115156292915, -0.0040819235146045685, 0.017375268042087555, 0.05906146019697189, 0.008330916985869408, 0.03175230696797371, -0.07336625456809998, -0.01656249538064003, -0.034262869507074356, -0.049850039184093475, -0.038868580013513565, 0.01643606275320053, -0.04345623031258583, -0.08496180921792984, -0.013681668788194656, 0.07065701484680176, 0.03307080641388893, 0.024798588827252388, -0.04125271365046501, -0.013744884170591831, -0.02546686865389347, -0.0057932608760893345, 0.05656895786523819, -0.0036055485252290964, 0.024906957522034645, 0.04515402019023895, -0.009554591029882431, 0.06917595863342285, 0.02949460595846176, 0.0030727311968803406, 0.021258512511849403, 0.012950173579156399, -0.0030140308663249016, -0.05165620148181915, -0.05714692920446396, -0.007635544985532761, -0.01956072263419628, 0.060036785900592804, -0.039988402277231216, -0.03233027830719948, -0.005084342788904905, 0.003720691427588463, 0.0019088862463831902, 0.01292308047413826, 0.0202651247382164, 0.03563555330038071, 0.03547300025820732, 0.018160946667194366, 0.016481216996908188, -0.00045125800534151495, -0.028880512341856956, -0.051403336226940155, -0.0031878738664090633, -0.035888414829969406, 0.010304147377610207, 0.011857446283102036, -0.08445607870817184, -0.0015036289114505053, 0.019831646233797073, -0.0008917918894439936, 0.022378332912921906, -0.008935980498790741, 0.0014900827081874013, -0.004560556262731552, -0.028338663280010223, -0.00027586283977143466, 0.04519014433026314, -0.005454605910927057, -0.006068700458854437, 0.022829873487353325, -0.0810604989528656, 0.01604773849248886, 0.013085635378956795, -0.015072411857545376, 0.03832673281431198, -0.026785364374518394, -0.01536139752715826, 0.009572652168571949, -0.021095959469676018, -0.027074351906776428, 0.029313990846276283, -0.08423934131860733, 0.023985816165804863, -0.02261313423514366, -0.06567201018333435, 0.0007467346149496734, 0.012932111509144306, -0.029187560081481934, -0.042444780468940735, -0.036069031804800034, 0.022251902148127556, 0.04670732095837593, 0.007522659841924906, -0.01218255516141653, 0.005386874545365572, 0.005707468371838331, 0.0583028718829155, 0.03890470415353775, -0.005499759688973427, -0.05866410583257675, 0.020861158147454262, 0.010845995508134365, -0.06538302451372147, -0.0030930503271520138, -0.0001903524243971333, 0.004863088019192219, 0.07585875689983368, 0.007260766811668873, 0.01655346341431141, -0.0003222868253942579, -0.014783426187932491, -0.05331786721944809, -0.026875672861933708, -0.007721337489783764, -0.04417869448661804, 0.020355433225631714, -0.008168362081050873, 0.07448607683181763, 0.03847122564911842, 0.001564586884342134, -0.010683441534638405, 0.03027125634253025, 0.0402773879468441, -0.019958076998591423, -0.01637284830212593, 0.05927819758653641, 0.04482891038060188, -0.03310692682862282, 0.00828576274216175, 0.004664410371333361, -0.002220449037849903, 0.012480571866035461, 0.025159820914268494, 0.020030323415994644, -0.01039445586502552, -0.03337785229086876, 0.02129463665187359, -0.017293989658355713, -0.007685214281082153, -0.011378813534975052, 0.0014302536146715283, 0.05169232189655304, 0.011631675995886326, -0.0702957808971405, 0.0047231107018888, -0.0702957808971405, -0.09103050827980042, -0.06462443619966507, 0.0035716830752789974, -0.02196291647851467, 0.003587486920878291, -0.021601684391498566, 0.004165458492934704, 0.03460604324936867, -0.05183681473135948, -0.010177716612815857, -0.07369136065244675, -0.038543473929166794, -0.07275215536355972, -0.004637317731976509, -0.02629770152270794, 0.03196904808282852, 0.05125884339213371, -0.0017497183289378881, -0.028284478932619095, 0.013997746631503105, -0.009690052829682827, 0.05071699619293213, -0.018025485798716545, -0.06733367592096329, 0.06657508760690689, -0.01337462104856968, -0.02969328500330448, 0.022233840078115463, 0.03615934029221535, 0.0064976634457707405, -0.06242091953754425, 0.008452832698822021, 0.003361716866493225, -0.02487083524465561, -0.03323335945606232, 0.022847935557365417, -0.0007111758459359407, 0.009048866108059883, 0.0667918249964714, -0.021908730268478394, 0.00782519206404686, -0.0342809334397316, 0.034118376672267914, -0.009075958281755447, 0.01622835546731949, 0.014991135336458683, 0.0040796659886837006, 0.050428010523319244, -0.04338398203253746, 0.04360072314739227, 0.015758752822875977, 0.007007903885096312, -0.022125469520688057, -0.009346882812678814, 0.01052088662981987, -0.08171071857213974, -0.015045319683849812, 0.0031336890533566475, -0.01916336640715599, -0.011974846012890339, 0.06072312593460083, 0.02156556025147438, -0.04417869448661804, -0.009590714238584042, 0.10150624066591263, -0.00040158856427296996, -0.05216192454099655, -0.00764457555487752, -0.017303021624684334, 0.03034350275993347, -0.009301728568971157, -0.02969328500330448, -0.0028492186684161425, 0.006976296193897724, 0.00558555219322443, -0.012950173579156399, -0.0437813401222229, -0.021710053086280823, -0.03435317799448967, -0.01793517731130123, 0.06671958416700363, 0.005892599932849407, -0.03200516849756241, 0.010900180786848068, -0.007071119733154774, 0.026153208687901497, -0.03240252658724785, -0.0018490571528673172, 0.06816451251506805, -0.08604550361633301, -0.011740045621991158, -0.005621675401926041, -0.06112048402428627, -0.025900347158312798, 0.012805680744349957, -0.036863744258880615, 0.004097727593034506, -0.024328986182808876, 0.014629903249442577, 0.012074185535311699, -0.028465094044804573, -0.018802134320139885, -0.011803261004388332, 0.02981971576809883, 0.03742365166544914, 0.0037635876797139645, -0.05707468092441559, -0.03368489816784859, 0.010448640212416649, -0.0017135951202362776, -0.0014866961864754558, 0.009491375647485256, -0.002937269164249301, 0.04385358467698097, -0.012299954891204834, 0.02882632613182068, 0.023028550669550896, -0.010042253881692886, 0.04197517782449722, 0.01804354600608349, 0.04547912999987602, -0.06097599118947983, 0.04493728280067444, 0.019109182059764862, 0.018549270927906036, 0.012281893752515316, -0.025430744513869286, 0.0052965665236115456, -0.004420578479766846, 0.015415582805871964, 0.030668610706925392, -0.06523852795362473, -0.0710543692111969, 0.00222609331831336, -0.08272216469049454, 0.021655868738889694, 0.015478798188269138, -0.06093986704945564, 0.03709854185581207, -0.04063861817121506, -0.03912144526839256, 0.0014979846309870481, 0.020247062668204308, 0.002621190855279565, -0.017980331555008888, 0.03847122564911842, 0.022288024425506592, 0.037640392780303955, 0.003700372064486146, 0.007852284237742424, 0.01584906131029129, -0.025250129401683807, -0.04132496193051338, -0.08893536031246185, 0.04526238888502121, 0.027254967018961906, 0.04974167048931122, -0.06574425101280212, -0.011243350803852081, -0.04930819198489189, 0.012020000256597996, -0.028483156114816666, -0.00436639366671443, -0.023624584078788757, -0.034714411944150925, 0.007391713093966246, -0.007053058128803968, 0.0367734357714653, 0.02299242839217186, -0.02642413228750229, 0.025448806583881378, -0.05273989588022232, -0.06513015925884247, -0.030506055802106857, -0.029458483681082726, 0.02721884474158287, -0.0024925018660724163, -0.01707725040614605, -0.07470281422138214, -0.024274801835417747, -0.021457191556692123, 0.010376393795013428, -0.009346882812678814, 0.018747949972748756, 0.006953719072043896, 0.05682181939482689, -0.02604483999311924, -0.02006644755601883, 0.011541367508471012, -0.026135146617889404, 0.008299308829009533, -0.022938242182135582, -0.0024225132074207067, -0.032565079629421234, 0.007382682524621487, 0.01143299788236618, 0.029187560081481934, 0.019705215469002724, 0.07119885832071304, 0.03104790486395359, -0.032836005091667175, 0.009428159333765507, 0.005043704062700272, 0.03214966133236885, -0.001711337361484766, -0.018016453832387924, -0.022577010095119476, 0.054546058177948, 0.021222390234470367, -0.031138213351368904, 0.015180781483650208, -0.06718918681144714, 0.10475733131170273, 0.05342623591423035, 0.038687966763973236, 0.012877927161753178, 0.06292664259672165, -0.008371555246412754, 0.02436511032283306, -0.027778754010796547, -0.06592486798763275, -0.06668345630168915, -0.008281247690320015, -0.007766491733491421, 0.0675504133105278, 0.04721304401755333, 0.016869543120265007, 0.01966909132897854, 0.04670732095837593, -0.009888730943202972 ]
717,880
pytorch_optimizer.optimizer.sam
grad_norm
null
def grad_norm(self) -> torch.Tensor: # put everything on the same device, in case of model parallelism shared_device = self.param_groups[0]['params'][0].device return torch.norm( torch.stack( [ ((torch.abs(p) if group['adaptive'] else 1.0) * p.grad).norm(p=2).to(shared_device) for group in self.param_groups for p in group['params'] if p.grad is not None ] ), p=2, )
(self) -> torch.Tensor
[ -0.022654548287391663, -0.016276171430945396, 0.025911591947078705, 0.026454433798789978, 0.029041973873972893, 0.027522020041942596, 0.011435842141509056, -0.07125687599182129, -0.015859993174672127, 0.05037561058998108, -0.01598665677011013, -0.023667851462960243, 0.007364537566900253, 0.03524845093488693, -0.005156985949724913, 0.027974385768175125, -0.013761010020971298, 0.005690779071301222, 0.012575807981193066, -0.012648186646401882, -0.018709907308220863, -0.04773378372192383, -0.026798231527209282, -0.018139924854040146, -0.05341551825404167, -0.01602284610271454, 0.0010969904251396656, -0.038107410073280334, -0.02848103828728199, 0.023667851462960243, -0.008359745144844055, -0.02004891447722912, 0.05594877153635025, -0.00681264977902174, 0.024663059040904045, -0.03345707803964615, -0.009060914628207684, 0.007310253567993641, -0.0671674832701683, -0.05106320604681969, 0.002732297871261835, -0.036876972764730453, 0.003112286329269409, 0.03307708725333214, 0.033782780170440674, 0.019668925553560257, -0.023396430537104607, 0.0022018973249942064, -0.08200512081384659, 0.00856783427298069, 0.023450715467333794, 0.011218706145882607, -0.004071304574608803, -0.009762084111571312, -0.022238370031118393, 0.041219696402549744, 0.03054383210837841, -0.017542799934744835, 0.007744526024907827, -0.043029166758060455, 0.059133436530828476, -0.07179971784353256, -0.027105841785669327, -0.014738122932612896, 0.02706965245306492, -0.028824837878346443, -0.0429929755628109, 0.05019466206431389, 0.06626274436712265, 0.050918448716402054, -0.05714302137494087, 0.006441708654165268, -0.02122506871819496, -0.027395356446504593, 0.02147839404642582, -0.01836610771715641, 0.06376567482948303, -0.0011099959956482053, 0.006486945319920778, -0.06416375935077667, -0.013326737098395824, 0.026110634207725525, 0.0046231928281486034, 0.008798541501164436, -0.022401222959160805, -0.031050482764840126, -0.04762521758675575, -0.026671569794416428, -0.019976533949375153, -0.038288358598947525, 0.013163885101675987, 0.015624762512743473, 0.03296852111816406, 0.03886738792061806, 0.04889184609055519, 0.0462862104177475, -0.05381359905004501, -0.027829628437757492, 0.003428943222388625, -0.03571891412138939, 0.013571015559136868, 0.07411584258079529, 0.012195819057524204, 0.030091464519500732, 0.06021912023425102, -0.04237775877118111, -0.0052746012806892395, -0.06832554191350937, 0.018320871517062187, 0.033565644174814224, -0.044259604066610336, 0.014910022728145123, 0.005654589738696814, -0.023903081193566322, -0.02395736612379551, -0.022437412291765213, -0.03542939946055412, 0.025531603023409843, 0.02169553004205227, 0.034560851752758026, 0.01880037970840931, 0.08171560615301132, -0.012946749106049538, -0.05432024970650673, -0.057685863226652145, 0.040568288415670395, -0.004369867034256458, -0.016574732959270477, -0.005496261175721884, 0.002687060972675681, -0.008644737303256989, -0.0003551082336343825, 0.02272692695260048, -0.01794992946088314, 0.038686443120241165, -0.043246302753686905, 0.009006630629301071, 0.017687557265162468, 0.03202759847044945, 0.06532181799411774, 0.0004611317999660969, 0.05236602574586868, -0.0035442968364804983, 0.015516194514930248, 0.023866891860961914, 0.06644368916749954, 0.019162273034453392, 0.06799983233213425, 0.005876249633729458, -0.02889721654355526, 0.0038383356295526028, 0.028770552948117256, 0.08395934849977493, 0.013181979767978191, 0.0023930224124342203, 0.0356646291911602, -0.03836073726415634, -0.03141237795352936, 0.010458729229867458, -0.04422341659665108, -0.08157084882259369, -0.05678112804889679, -0.029222920536994934, -0.011092043481767178, 0.019542261958122253, -0.031104767695069313, 0.0441148467361927, 0.009933982975780964, -0.047806162387132645, 0.02741345204412937, 0.0035578678362071514, -0.0767938569188118, 0.010947286151349545, 0.0013751962687820196, -0.026273485273122787, 0.06571990251541138, 0.0359722375869751, 0.018510865047574043, -0.028372470289468765, 0.02231074869632721, 0.037057921290397644, -0.036026522517204285, 0.05591258406639099, -0.0816432312130928, 0.017398042604327202, 0.02477162703871727, 0.009644468314945698, -0.03345707803964615, -0.0004611317999660969, -0.0022313010413199663, 0.00810189638286829, -0.013281500898301601, -0.012946749106049538, -0.004691047593951225, 0.0031891886610537767, 0.012051061727106571, 0.019144179299473763, 0.00938209518790245, 0.030019085854291916, -0.02741345204412937, 0.007604292593896389, -0.061196234077215195, -0.01786850392818451, 0.01133632194250822, -0.022220276296138763, -0.0495794452726841, -0.05059274658560753, 0.03119524195790291, 0.03941022977232933, 0.02911435253918171, -0.019940344616770744, 0.023903081193566322, 0.011390605941414833, 0.014611460268497467, 0.01957845129072666, -0.03919309377670288, 0.0370941087603569, -0.0010687174508348107, 0.010721102356910706, 0.017388993874192238, -0.035809386521577835, -0.10241593420505524, 0.06886838376522064, -0.011933445930480957, -0.04103875160217285, -0.0032774002756923437, -0.004930802155286074, -0.03731124475598335, -0.02934958226978779, -0.005374121945351362, 0.0644894689321518, -0.073066346347332, -0.016258075833320618, 0.040785424411296844, 0.023794513195753098, -0.00742334546521306, -0.03977212309837341, 0.04093018174171448, 0.03861406445503235, 0.007907378487288952, -0.07426059991121292, -0.019922250881791115, -0.024029744789004326, 0.08388697355985641, 0.04719094559550285, 0.009002107195556164, 0.03032669611275196, 0.009445426985621452, 0.02578493021428585, 0.040314964950084686, -0.05298124626278877, -0.030055275186896324, -0.03141237795352936, 0.012729612179100513, -0.02165934070944786, -0.03861406445503235, 0.0015866778558120131, 0.08410410583019257, -0.0024948050267994404, -0.04143683239817619, -0.016791870817542076, -0.07751764357089996, -0.04483863711357117, 0.02064603753387928, -0.02225646562874317, 0.01854705438017845, 0.01880037970840931, 0.026906799525022507, -0.017488515004515648, 0.045490045100450516, 0.08395934849977493, 0.08540692180395126, -0.03575510159134865, -0.017180904746055603, 0.019886061549186707, 0.018456581979990005, 0.011526315473020077, 0.029403867200016975, 0.06007436290383339, -0.009644468314945698, 0.04813186824321747, -0.052764106541872025, -0.08099181950092316, -0.015552383847534657, 0.004682000260800123, 0.035375114530324936, 0.013019127771258354, -0.059965793043375015, 0.018890853971242905, 0.03635222837328911, 0.03962736576795578, 0.015199537388980389, 0.029023878276348114, -0.008147132582962513, 0.04371676594018936, -0.03305899351835251, -0.008332603611052036, 0.03405420109629631, 0.002060532569885254, 0.021333636716008186, 0.04483863711357117, 0.02042890153825283, -0.0280829556286335, 0.06731224060058594, -0.006975501775741577, -0.01384243555366993, 0.02437354438006878, -0.01939750462770462, 0.04458530992269516, -0.015036685392260551, -0.05236602574586868, -0.02164124697446823, -0.006649797782301903, 0.045272909104824066, 0.02413831278681755, -0.02062794379889965, 0.014910022728145123, -0.039735931903123856, 0.03427133709192276, 0.07024357467889786, -0.006866933777928352, 0.06666082888841629, 0.029801949858665466, 0.04610526189208031, -0.0772281289100647, 0.011300132609903812, 0.02316119894385338, 0.0342351496219635, -0.006179335527122021, 0.03465132787823677, -0.02621920220553875, -0.002863484201952815, 0.0064281378872692585, 0.051497481763362885, 0.01596856117248535, 0.011173469014465809, 0.09061819314956665, -0.024319259449839592, 0.014575270935893059, -0.06749318540096283, -0.013706726022064686, 0.04317392408847809, -0.03096001036465168, -0.002379451412707567, -0.019126083701848984, 0.00003891064625349827, 0.01896323263645172, 0.014575270935893059, 0.013552920892834663, -0.04071304574608803, -0.008427600376307964, 0.0014351349091157317, -0.05117177590727806, 0.06767413020133972, 0.022545980289578438, 0.06532181799411774, -0.03770932927727699, 0.006220048759132624, 0.03202759847044945, -0.017144715413451195, 0.006500516552478075, 0.03977212309837341, -0.014059572480618954, 0.025079237297177315, 0.05381359905004501, -0.0016353073297068477, -0.014774312265217304, -0.06246286258101463, 0.015045732259750366, 0.006274332758039236, -0.006174812093377113, -0.023269768804311752, 0.010395398363471031, -0.02788391336798668, -0.05073750391602516, -0.0278658177703619, -0.06514087319374084, -0.03879500925540924, 0.0886639654636383, -0.03486846387386322, -0.02062794379889965, 0.004980562720447779, 0.055224984884262085, -0.0015244773821905255, 0.038722630590200424, -0.016529496759176254, 0.04668429493904114, -0.01715376414358616, -0.02701536752283573, -0.04831281676888466, 0.018492771312594414, -0.009961125440895557, -0.004415103700011969, -0.014113856479525566, -0.0627523735165596, 0.0018807165324687958, 0.020754605531692505, 0.03307708725333214, -0.0719444751739502, -0.03300470858812332, -0.043029166758060455, -0.03421705216169357, -0.01412290334701538, 0.034398000687360764, -0.0594591423869133, -0.06756556034088135, 0.011354416608810425, 0.07578054815530777, 0.013353879563510418, 0.050665125250816345, -0.06416375935077667, 0.04067685827612877, 0.0032660909928381443, 0.04006163775920868, 0.053958356380462646, -0.018945137038826942, 0.006446232553571463, 0.004157254472374916, 0.018510865047574043, 0.07111211866140366, 0.0106396758928895, -0.0336742140352726, 0.0142586138099432, 0.0328056700527668, 0.019089894369244576, -0.025459224358201027, -0.02603825554251671, -0.009870652109384537, -0.05471833422780037, -0.019361315295100212, -0.0006061720196157694, 0.03253424912691116, 0.01547095738351345, -0.0229259692132473, -0.004496529698371887, 0.011924399062991142, 0.035157978534698486, 0.0789652168750763, -0.006414566654711962, -0.028589606285095215, 0.0323713943362236, -0.006333140656352043, 0.008097372949123383, -0.045091960579156876, -0.024065934121608734, -0.010766338557004929, -0.014937164261937141, -0.03627984970808029, -0.05801156908273697, -0.02478972263634205, -0.005514355842024088, 0.0052655539475381374, 0.05888011306524277, 0.0002903631830122322, -0.027123935520648956, 0.03904833644628525, -0.02974766679108143, -0.06799983233213425, -0.02205742336809635, 0.003670959733426571, 0.020266050472855568, 0.02971147745847702, -0.046177640557289124, -0.0009952078107744455, -0.02620110660791397, 0.002854436868801713, 0.10755482316017151, -0.0019734518136829138, -0.0379626527428627, -0.010811575688421726, 0.05435644090175629, -0.0023364764638245106, 0.0351036936044693, -0.03407229483127594, -0.02068222686648369, -0.00043059702147729695, -0.022962158545851707, 0.016574732959270477, 0.007586197461932898, -0.03781789541244507, -0.08048517256975174, -0.049615632742643356, -0.003410848556086421, 0.07082260400056839, -0.015335247851908207, 0.01713566854596138, -0.0341084860265255, 0.03036288544535637, 0.02790200710296631, 0.028734363615512848, -0.004525933880358934, -0.005971246864646673, 0.06709510087966919, -0.007251446135342121, -0.04226918891072273, 0.001013867906294763, 0.02316119894385338, -0.011372511275112629, 0.04545385390520096, 0.03817978873848915, -0.003494536504149437, 0.004295226186513901, 0.0007933389279060066, 0.03749219328165054, -0.011028711684048176, -0.014511939138174057, -0.06293332576751709, 0.035592250525951385, -0.037890274077653885, 0.0370941087603569, 0.03412657976150513, -0.01343530509620905, -0.029801949858665466, 0.012132488191127777, 0.008400458842515945, -0.022184086963534355, -0.035176072269678116, 0.007201685570180416, 0.041219696402549744, -0.029820045456290245, -0.030833346769213676, 0.04313773289322853, -0.1035739928483963, -0.02086317539215088, -0.0006287904107011855, 0.03058002144098282, -0.021822193637490273, -0.015335247851908207, 0.021387919783592224, -0.040568288415670395, 0.021369826048612595, 0.0074323927983641624, 0.03781789541244507, 0.005410311743617058, 0.012847227975726128, -0.03054383210837841, -0.018013261258602142, -0.04520053043961525, -0.10465966910123825, -0.01921655796468258, -0.019705114886164665, -0.045272909104824066, 0.0341084860265255, 0.020157482475042343, 0.015606667846441269, -0.0022674906067550182, 0.011417747475206852, 0.0013910291017964482, -0.03749219328165054, -0.0015855469973757863, -0.0403873436152935, 0.02764868177473545, -0.06452565640211105, -0.012521523982286453, -0.004654858261346817, 0.033312320709228516, -0.07411584258079529, 0.01763327233493328, -0.022545980289578438, 0.00392654724419117, -0.007265016902238131, -0.10994332283735275, 0.031466662883758545, 0.010883954353630543, -0.021514583379030228, 0.006808126345276833, 0.004575693979859352, 0.006021007429808378, -0.021822193637490273, -0.00041759145096875727, -0.06354854255914688, 0.013181979767978191, 0.03738362342119217, 0.03202759847044945, 0.03253424912691116, 0.007907378487288952, 0.06988168507814407, -0.0323713943362236, -0.011092043481767178, -0.0590248703956604, 0.0379626527428627, -0.05348789691925049, 0.0018908948404714465, 0.034398000687360764, -0.009002107195556164, 0.014991448260843754, -0.05142510309815407, 0.033095184713602066, 0.016873296350240707, -0.03349326550960541, -0.02580302394926548, 0.017560893669724464, -0.00038903579115867615, -0.04505577310919762, 0.01363434735685587, -0.01901751570403576, -0.07411584258079529, -0.01578761450946331, 0.059748657047748566, 0.06083434075117111, -0.019886061549186707, 0.01590522937476635, 0.06774651259183884, 0.031014293432235718, -0.010178261436522007, -0.055007848888635635, -0.026961084455251694, -0.03627984970808029, -0.024681152775883675, -0.014330992475152016, -0.01580571010708809, -0.01898132637143135, -0.03734743595123291, -0.02810104936361313, 0.024011651054024696, -0.02558588795363903, -0.05779443308711052, -0.00005792420415673405, 0.0643085166811943, 0.07816904783248901, -0.008875444531440735, 0.017027100548148155, -0.007984280586242676, -0.011535363271832466, -0.0017235189443454146, 0.0077626206912100315, 0.015109064057469368, -0.050918448716402054, -0.03656936436891556, -0.025459224358201027, -0.03512178733944893, -0.025115426629781723, 0.004614145494997501, -0.0007130437879823148, 0.013652442023158073, -0.01596856117248535, 0.010721102356910706, -0.013254358433187008, -0.020718416199088097, -0.015995703637599945, 0.03405420109629631, 0.044078659266233444, -0.015760472044348717, 0.002727774204686284, -0.03363802284002304, -0.019524168223142624, 0.0010494919260963798, -0.002460877411067486, -0.0008306592353619635, -0.016330454498529434, -0.030200032517313957, 0.04064066708087921, 0.013860530219972134, 0.014457655139267445, 0.020302239805459976, -0.005984817631542683, -0.01598665677011013, 0.05308981239795685, 0.004037376958876848, -0.03262472152709961, -0.025242088362574577, 0.009354953654110432, 0.033728498965501785, -0.006161240860819817, -0.06398281455039978, -0.01271151751279831, -0.0016398309962823987, -0.005898868199437857, -0.015552383847534657, -0.07346443086862564, -0.06217334419488907, 0.03349326550960541, -0.03430752828717232, 0.0026621809229254723, -0.014050524681806564, 0.009228290989995003, 0.02290787361562252, -0.03432562202215195, -0.01506382692605257, 0.015733331441879272, 0.013978146016597748, 0.027594398707151413, -0.01104680635035038, 0.05178699642419815, 0.020917458459734917, -0.04729951173067093, 0.015832850709557533, 0.011806783266365528, 0.008585928939282894, 0.03656936436891556, -0.05938676372170448, -0.02974766679108143, 0.022220276296138763, -0.011797736398875713, 0.06832554191350937, -0.06372948735952377, -0.008196893148124218, -0.0011557982070371509, 0.008780446834862232, -0.001415909267961979, 0.00011627250205492601, -0.01602284610271454, -0.0719444751739502, 0.030254317447543144, 0.040749236941337585, -0.0011252633994445205, 0.08844683319330215, 0.007106688339263201, -0.021188879385590553, 0.055623069405555725, 0.020483186468482018, 0.0017212571110576391, 0.0355379655957222, 0.010874907486140728, 0.005713397637009621, 0.0015459648566320539, 0.04418722540140152, 0.0055957818403840065, 0.011698215268552303, -0.0187641903758049, 0.027811534702777863, -0.020754605531692505, 0.0618838295340538, 0.010395398363471031, -0.009273527190089226, 0.0178323145955801, 0.03836073726415634, 0.045091960579156876, -0.037456002086400986, -0.029150541871786118, 0.0006451886729337275, -0.017787078395485878, 0.046937618404626846, 0.044874824583530426, 0.020338429138064384, 0.05269172787666321, 0.03814360126852989, 0.019288936629891396, -0.12687994539737701, -0.0017563155852258205, 0.024355448782444, 0.05916962772607803, 0.007160972338169813, -0.03673221543431282, 0.022147897630929947, 0.017162811011075974, -0.027522020041942596, -0.08663736283779144, 0.06923027336597443, -0.09503329545259476, 0.08576881885528564, 0.014729075133800507, 0.01158059947192669, -0.009617326781153679, 0.045960504561662674, -0.049253739416599274, 0.05037561058998108, -0.04874708876013756, -0.07335586100816727, -0.07650433480739594, 0.03716648742556572, -0.011607741937041283, -0.0004071304574608803, 0.05175080522894859, -0.019343221560120583, 0.005754110403358936, 0.04176253825426102, -0.0054510245099663734 ]
717,905
pytorch_optimizer.optimizer.shampoo_utils
SGDGraft
Graft using SGD + momentum. momentum maintains an exponentially weighted moving average of gradients.
class SGDGraft(Graft): r"""Graft using SGD + momentum. momentum maintains an exponentially weighted moving average of gradients.""" def __init__(self, var: torch.Tensor): super().__init__(var) self.momentum: torch.Tensor = torch.zeros_like(var, device=var.device) def update_momentum(self, update: torch.Tensor, beta1: float) -> torch.Tensor: r"""Update momentum.""" self.momentum.mul_(beta1).add_(update) return self.momentum
(var: torch.Tensor)
[ 0.025584930554032326, -0.04580109938979149, -0.02582559920847416, -0.018512973561882973, 0.03785903379321098, -0.004878168925642967, -0.057723455131053925, 0.013190493918955326, 0.04306117817759514, 0.006076883990317583, -0.02525169774889946, 0.0003621600626502186, -0.03854401409626007, 0.05568702518939972, -0.05061447247862816, 0.02571452036499977, 0.0043968316167593, 0.013625549152493477, 0.010663473047316074, -0.024455638602375984, 0.0012473115930333734, -0.040025051683187485, -0.02913942188024521, 0.05242874473333359, -0.049540720880031586, 0.031194360926747322, 0.02628842368721962, -0.030935179442167282, -0.026418013498187065, -0.02510359324514866, 0.054094910621643066, -0.07375568896532059, 0.012135254219174385, 0.022382186725735664, 0.0008920939289964736, -0.024289023131132126, -0.0021405627485364676, 0.03591516986489296, -0.09693393111228943, -0.020160628482699394, 0.038062676787376404, -0.011163323186337948, 0.044431138783693314, -0.0020653537940233946, 0.03817375376820564, 0.00032253071549348533, 0.02121586911380291, 0.047837525606155396, -0.02845444157719612, 0.021141815930604935, 0.012274102307856083, -0.04091367498040199, 0.0026542977429926395, -0.014116142876446247, -0.03491546958684921, 0.07371866703033447, 0.0732003003358841, 0.051984433084726334, 0.011820534244179726, -0.007673627696931362, 0.04069151729345322, -0.035063572227954865, 0.02080858312547207, -0.012505514547228813, -0.00993221066892147, -0.016439521685242653, -0.04202445223927498, -0.01878141239285469, -0.004910566378384829, 0.03813672810792923, -0.0175873264670372, 0.025696007534861565, -0.010922654531896114, 0.021234381943941116, -0.011228119023144245, 0.019494161009788513, -0.010080314241349697, -0.02421496994793415, -0.0037025948986411095, -0.015560154803097248, 0.02597370371222496, -0.023418912664055824, -0.014578967355191708, 0.023252295330166817, 0.02902834303677082, -0.0639808401465416, 0.01608777418732643, -0.0033485342282801867, -0.0028579405043274164, -0.05065149813890457, 0.00812256708741188, 0.009321282617747784, 0.011191093362867832, -0.023474451154470444, 0.041987426578998566, 0.012348153628408909, -0.04024720564484596, -0.0628330335021019, -0.015754541382193565, -0.005262312944978476, -0.011690943501889706, 0.10034032166004181, 0.0001544676342746243, 0.029269011691212654, 0.029102396219968796, -0.004984618164598942, -0.023844711482524872, -0.05024421215057373, -0.0032328281085938215, -0.021456537768244743, -0.002188002225011587, -0.0019693176727741957, -0.02277095802128315, 0.0019612181931734085, -0.011783508583903313, -0.05790858343243599, 0.025288723409175873, 0.04361656680703163, 0.026973403990268707, 0.018901746720075607, 0.03678527846932411, 0.023974301293492317, -0.02286352403461933, 0.03756282478570938, 0.017217066138982773, 0.020734531804919243, 0.04058044031262398, -0.0006282840622588992, 0.02338188700377941, -0.046393513679504395, -0.05065149813890457, 0.015958184376358986, -0.005428929813206196, 0.02530723623931408, 0.025214670225977898, -0.010783807374536991, 0.03006507083773613, -0.005396531894803047, 0.038729142397642136, 0.03895129635930061, -0.0100895706564188, 0.03315673768520355, -0.0069284806959331036, -0.012403693050146103, -0.025011029094457626, 0.029306037351489067, 0.00908061396330595, 0.04772644862532616, -0.002181059680879116, -0.008900112472474575, -0.0011987150646746159, 0.025270210579037666, 0.05801966041326523, 0.02634396217763424, 0.02799161709845066, 0.01660613715648651, -0.03289755433797836, -0.0216231532394886, -0.0024390844628214836, 0.0330086313188076, -0.04102475196123123, 0.0034804390743374825, -0.01956821419298649, 0.0009158136672340333, 0.007442215457558632, -0.014699301682412624, 0.03341591730713844, -0.019272007048130035, -0.07138603180646896, 0.060611478984355927, 0.01275543961673975, -0.016069261357188225, -0.004225586540997028, 0.02003103867173195, 0.08116088062524796, 0.06931257247924805, 0.011283657513558865, 0.0429501011967659, 0.0036192864645272493, -0.019123902544379234, 0.012699900195002556, -0.01226484589278698, -0.023067165166139603, -0.029046855866909027, -0.002610329305753112, 0.028954291716217995, -0.031194360926747322, 0.003977975342422724, 0.006363834720104933, 0.005234543699771166, 0.01908687688410282, -0.0022620540112257004, 0.012311127968132496, -0.01914241537451744, -0.00877514947205782, 0.03576706722378731, -0.02721407264471054, -0.03263837471604347, 0.029157934710383415, 0.04021017998456955, 0.002297922968864441, -0.011005963198840618, 0.021974900737404823, 0.002941248705610633, 0.02132694609463215, -0.03160164877772331, -0.033304840326309204, -0.0035498628858476877, -0.05324331298470497, -0.04557894170284271, -0.08715908229351044, 0.028861727565526962, 0.034804392606019974, 0.05416896194219589, 0.01510658673942089, -0.10419102013111115, 0.04880020022392273, 0.024344561621546745, 0.03356402367353439, -0.02034575864672661, 0.02204895205795765, -0.031638674437999725, -0.040950700640678406, -0.006053742486983538, 0.011857559904456139, 0.004905938170850277, 0.013218263164162636, -0.04346846416592598, -0.0370444618165493, -0.07071956247091293, 0.026769760996103287, -0.03237919136881828, -0.013755139894783497, -0.014032834209501743, 0.06731317192316055, 0.011246631853282452, -0.005424301605671644, 0.002285195281729102, 0.03461926057934761, 0.012320384383201599, -0.02441861294209957, -0.03563747555017471, 0.005229915026575327, 0.0752367302775383, 0.009774850681424141, 0.010570907965302467, 0.04021017998456955, -0.0033415919169783592, -0.05753832310438156, 0.05020718649029732, -0.06335140019655228, -0.03906237706542015, -0.012005663476884365, 0.05657564848661423, -0.011552096344530582, -0.012172280810773373, -0.033915769308805466, 0.06679481267929077, -0.013412649743258953, -0.03261986002326012, -0.037747953087091446, -0.0648694634437561, -0.07579211890697479, 0.06738722324371338, -0.0018188997637480497, 0.011209606193006039, 0.02312270551919937, 0.007756936363875866, 0.009876672178506851, 0.008742752484977245, 0.14306826889514923, 0.08316028118133545, -0.03115733526647091, -0.03693338483572006, 0.009636003524065018, -0.022882036864757538, -0.0209011472761631, 0.041320957243442535, 0.026991916820406914, -0.059796907007694244, 0.027491766959428787, -0.05279900133609772, 0.002874139230698347, 0.02917644754052162, -0.007007160689681768, 0.02441861294209957, -0.030416816473007202, -0.026047755032777786, 0.0348784439265728, -0.004038142506033182, 0.006743350997567177, 0.018661078065633774, 0.0740889236330986, 0.01986442133784294, 0.08478942513465881, -0.004919822793453932, -0.025733035057783127, 0.06379570811986923, -0.02291906252503395, 0.03571152687072754, 0.107819564640522, -0.005428929813206196, -0.02530723623931408, 0.06094470992684364, -0.014310529455542564, -0.007488497998565435, 0.026732735335826874, 0.006669299211353064, 0.01676349900662899, -0.019272007048130035, -0.008289184421300888, -0.01991995982825756, -0.07001607120037079, 0.04176526889204979, 0.0028024015482515097, -0.05061447247862816, -0.0144123500213027, -0.06120389327406883, 0.016939371824264526, 0.043542515486478806, -0.013718114234507084, -0.007303368300199509, 0.05313223600387573, 0.0625368282198906, -0.0720524936914444, -0.039876945316791534, -0.006257385481148958, 0.03000953048467636, -0.053058184683322906, 0.02153058908879757, -0.048133734613657, -0.04109880328178406, 0.05246577039361, 0.020882634446024895, -0.0498739518225193, -0.015504616312682629, 0.047837525606155396, -0.03286052867770195, 0.024622255936264992, -0.058093711733818054, 0.07116387039422989, 0.034637775272130966, -0.013366367667913437, 0.04502355307340622, 0.05716806277632713, -0.017318887636065483, 0.033249299973249435, -0.051095809787511826, 0.04972584918141365, 0.00838637724518776, -0.03876616805791855, 0.010145110078155994, -0.03611881285905838, 0.05783453211188316, 0.04850399121642113, 0.01971631683409214, 0.028398903086781502, -0.042357686907052994, 0.0032767965458333492, -0.04839291423559189, -0.045764073729515076, 0.04720808565616608, -0.008599276654422283, 0.03782200813293457, 0.0025686752051115036, -0.003140263259410858, -0.03352699801325798, -0.0255108792334795, 0.044171955436468124, -0.017115244641900063, 0.02349296398460865, -0.031953394412994385, -0.061351995915174484, 0.054872456938028336, -0.05453922227025032, -0.03695189580321312, -0.08404890447854996, -0.02271541953086853, 0.0663134753704071, -0.00031819174182601273, 0.06068553030490875, -0.024899950250983238, -0.0008475470822304487, 0.024177944287657738, 0.0784209594130516, 0.025177644565701485, 0.016476547345519066, -0.020327245816588402, 0.02049386315047741, -0.052243612706661224, 0.0008469685562886298, -0.035989221185445786, 0.06075958162546158, 0.02230813354253769, -0.0965636745095253, -0.006877569947391748, 0.03043532930314541, -0.011024476028978825, -0.03954371437430382, -0.003022243035957217, 0.026066267862915993, 0.005220658611506224, -0.039099402725696564, 0.016791267320513725, -0.01925349235534668, -0.09360159933567047, 0.018383383750915527, 0.05546487122774124, -0.019327545538544655, 0.06923852115869522, -0.020678991451859474, 0.007002532482147217, -0.03787754476070404, 0.04565299302339554, 0.042616866528987885, -0.08027225732803345, -0.014912201091647148, -0.05098473280668259, -0.010913398116827011, 0.04880020022392273, 0.012144511565566063, 0.05405788496136665, 0.03965479135513306, 0.03628543019294739, -0.007007160689681768, -0.009464758448302746, -0.05387275665998459, -0.019586727023124695, -0.06209251657128334, 0.029454141855239868, -0.00024544153711758554, 0.018040893599390984, -0.01687457598745823, -0.014375324361026287, 0.03263837471604347, -0.04891127720475197, -0.0071645211428403854, -0.01846669241786003, -0.008492826484143734, 0.022845009341835976, 0.03680379316210747, -0.0037997879553586245, 0.03595219552516937, -0.01718929596245289, 0.0001677738327998668, -0.06068553030490875, 0.03089815378189087, -0.01350521482527256, 0.005646456964313984, 0.0009331696201115847, -0.0012658246560022235, 0.012412949465215206, 0.05572405084967613, 0.0709046944975853, -0.012542540207505226, -0.015624950639903545, -0.013495958410203457, -0.0281026940792799, -0.05753832310438156, -0.0066831838339567184, -0.04506057873368263, 0.00717840576544404, -0.07397784292697906, 0.057871557772159576, -0.026047755032777786, -0.006021345034241676, 0.0683128759264946, -0.048466965556144714, -0.04165419191122055, -0.007881898432970047, 0.027658384293317795, -0.04335738718509674, 0.01332934107631445, -0.08345648646354675, -0.026103293523192406, -0.030453842133283615, -0.05020718649029732, -0.008900112472474575, -0.014495658688247204, -0.026825299486517906, 0.011366966180503368, -0.04983692616224289, -0.013570009730756283, 0.08064251393079758, -0.029213473200798035, 0.05405788496136665, 0.020530888810753822, 0.009460129775106907, 0.08708503097295761, -0.03052789531648159, -0.03534126654267311, -0.011737225577235222, 0.04724511131644249, -0.018401896581053734, -0.02975034900009632, 0.004910566378384829, -0.04931856319308281, 0.022900549694895744, 0.05450219660997391, -0.009395334869623184, -0.009737824089825153, 0.04176526889204979, -0.08575209975242615, 0.003461926244199276, 0.01464376226067543, -0.034286029636859894, -0.029991017654538155, 0.03439710661768913, -0.021549101918935776, 0.0017425337573513389, 0.007988348603248596, -0.016754241660237312, -0.004630557727068663, 0.03341591730713844, 0.005396531894803047, -0.04061746597290039, -0.009756337851285934, 0.048763174563646317, 0.042246606200933456, -0.06035229563713074, -0.0023256924469023943, 0.031953394412994385, -0.021900849416851997, -0.02101222611963749, -0.0031587763223797083, 0.01630993001163006, 0.0021405627485364676, -0.009811876341700554, 0.03798862174153328, 0.022882036864757538, 0.055131636559963226, 0.03569301590323448, 0.03700743615627289, 0.06727614998817444, -0.0009673028835095465, -0.011746481992304325, 0.00933979544788599, -0.05272495001554489, -0.10152515023946762, -0.045356787741184235, -0.01696714013814926, -0.02804715558886528, 0.015717515721917152, 0.024492664262652397, -0.029972504824399948, 0.04420898109674454, 0.02199341356754303, -0.03208298608660698, -0.023159731179475784, -0.022530289366841316, -0.06305518746376038, -0.0019739458803087473, -0.041320957243442535, 0.01707821898162365, 0.028528492897748947, 0.024862924590706825, -0.07105279713869095, 0.010441317223012447, 0.03643353283405304, -0.016957884654402733, -0.04335738718509674, -0.049651797860860825, 0.07671776413917542, 0.0469859279692173, -0.027750948444008827, 0.01821676641702652, -0.006280526518821716, 0.011533582583069801, -0.035581935197114944, 0.041209880262613297, 0.002788516692817211, -0.020993713289499283, 0.048874251544475555, 0.03528572991490364, 0.001720549538731575, 0.007395933382213116, -0.013357111252844334, -0.028287824243307114, 0.007557921577244997, -0.02395578846335411, 0.01722632348537445, -0.06479541212320328, 0.006400860846042633, -0.020771557465195656, -0.01625439152121544, 0.04580109938979149, -0.08316028118133545, 0.030250199139118195, 0.0059380363672971725, 0.012792465277016163, 0.023215269669890404, 0.026677196845412254, 0.017115244641900063, -0.03680379316210747, 0.0037766466848552227, -0.04776347428560257, -0.032157037407159805, 0.008946394547820091, 0.036711227148771286, 0.021826796233654022, -0.03972884267568588, 0.035211678594350815, 0.03037979081273079, 0.0068127745762467384, 0.0034549839328974485, -0.04735618829727173, 0.00957120768725872, -0.0021313061006367207, 0.031897854059934616, -0.08345648646354675, -0.03824780508875847, -0.009904441423714161, -0.043801698833703995, 0.03482290357351303, -0.03724810481071472, -0.01252402737736702, -0.012412949465215206, 0.007132123224437237, 0.04061746597290039, -0.0025918164756149054, -0.026640169322490692, 0.02804715558886528, -0.029194960370659828, -0.029065368697047234, 0.041580140590667725, -0.04646756500005722, 0.02110479027032852, -0.08552993834018707, -0.028028642758727074, -0.0677574872970581, -0.0009557323064655066, -0.0033091942314058542, 0.016013722866773605, -0.05339141935110092, 0.00962674617767334, -0.018614795058965683, -0.031805288046598434, 0.010617190971970558, -0.0374702587723732, -0.01765212044119835, -0.0037581338547170162, 0.03263837471604347, -0.013773652724921703, -0.002714464906603098, -0.05154012143611908, -0.02539980039000511, -0.025584930554032326, -0.02219705656170845, 0.008659443818032742, 0.017300374805927277, -0.029879940673708916, 0.045356787741184235, 0.01951267570257187, 0.022993113845586777, -0.0017436908092349768, 0.014671532437205315, 0.02412240579724312, -0.03099071979522705, 0.0631292387843132, -0.033601049333810806, 0.014930713921785355, -0.0031564622186124325, -0.012051946483552456, 0.07160818576812744, -0.02312270551919937, 0.0017691460670903325, -0.00835397932678461, -0.019160928204655647, 0.03441561758518219, -0.009839645586907864, -0.043653592467308044, 0.00006638636841671541, -0.05257684737443924, -0.03700743615627289, -0.024437125772237778, -0.046393513679504395, 0.052910082042217255, 0.030453842133283615, 0.011598378419876099, 0.018327845260500908, 0.03730364143848419, 0.03939560800790787, 0.016791267320513725, 0.00043823680607602, -0.008145708590745926, 0.01510658673942089, -0.029472654685378075, 0.02136397175490856, -0.0024228855036199093, -0.02986142784357071, -0.026047755032777786, -0.03667420148849487, 0.006206474732607603, 0.00026409915881231427, 0.04017315432429314, -0.011968637816607952, -0.017411451786756516, 0.005155863240361214, -0.036452047526836395, -0.06394381076097488, 0.02401132695376873, 0.026195857673883438, -0.03498952090740204, 0.031194360926747322, 0.010867116041481495, -0.002010971773415804, -0.013847704976797104, 0.009089870378375053, -0.03336038067936897, 0.010265444405376911, 0.042876049876213074, 0.011505813337862492, 0.03069451078772545, 0.03785903379321098, 0.07257086038589478, -0.01363480556756258, 0.028898753225803375, -0.0008458115044049919, -0.031805288046598434, 0.016263647004961967, -0.0344526469707489, -0.0006097711157053709, 0.04187634959816933, 0.02303013950586319, 0.003420271910727024, -0.04994800314307213, 0.008705725893378258, -0.007719910237938166, -0.005114209372550249, -0.06101876497268677, 0.04206147789955139, 0.03824780508875847, 0.029157934710383415, -0.057982634752988815, 0.013718114234507084, -0.019179441034793854, 0.01863330788910389, 0.03302714601159096, 0.0014185566687956452, 0.05805668607354164, -0.031897854059934616, 0.01353298407047987, -0.013727370649576187, -0.04139501228928566, 0.02934306487441063, 0.014134655706584454, -0.01389398705214262, -0.03219406306743622, -0.017689146101474762, 0.016217365860939026, 0.10478343069553375, -0.014421607367694378, 0.022900549694895744, 0.020660478621721268, 0.09263892471790314, -0.03965479135513306, 0.00820124801248312, -0.05546487122774124, -0.04580109938979149, -0.08782555162906647, -0.006859057117253542, -0.07871716469526291, 0.0671650692820549, 0.0007572963368147612, -0.029787376523017883, 0.03152759373188019, -0.014042090624570847, 0.029250498861074448 ]
717,906
pytorch_optimizer.optimizer.shampoo_utils
__init__
null
def __init__(self, var: torch.Tensor): super().__init__(var) self.momentum: torch.Tensor = torch.zeros_like(var, device=var.device)
(self, var: torch.Tensor)
[ 0.011964959092438221, 0.035730261355638504, 0.05579604580998421, 0.014815409667789936, 0.030739808455109596, 0.031588878482580185, -0.06470261514186859, 0.03832945600152016, -0.013099941425025463, 0.011834999546408653, -0.00502944178879261, 0.06352432072162628, -0.015378568321466446, 0.01005888357758522, -0.018852824345231056, 0.05860317498445511, 0.008317423053085804, 0.0361461341381073, 0.0064763268455863, 0.01987517438828945, 0.004873489961028099, -0.021313395351171494, -0.04695878177881241, 0.02522951550781727, -0.011358480900526047, 0.028851060196757317, -0.026685064658522606, -0.024796316400170326, -0.009435076266527176, -0.04020087793469429, -0.013871035538613796, 0.01435621827840805, 0.02127874083817005, 0.06061321869492531, 0.03943844512104988, -0.045607201755046844, -0.00024611124536022544, 0.032905805855989456, -0.12101849913597107, 0.0182810015976429, 0.05285029113292694, -0.05704365670681, -0.0000944915518630296, 0.04415165260434151, -0.006103775463998318, -0.020810885354876518, 0.0319354385137558, -0.017934443429112434, 0.0051767295226454735, -0.012640750035643578, -0.0010959937935695052, -0.010552730411291122, 0.03836411237716675, -0.006415678653866053, -0.07554992288351059, 0.10459159314632416, 0.048414330929517746, 0.05780608952045441, -0.06487590074539185, 0.06556901335716248, -0.04526064172387123, 0.010864634066820145, -0.003781828097999096, -0.032351307570934296, -0.0036020504776388407, -0.01150576863437891, -0.03663131594657898, 0.026841016486287117, 0.03526240587234497, 0.04862226918339729, -0.004687214270234108, 0.027742071077227592, 0.005505960434675217, 0.05361272022128105, 0.0666780099272728, -0.021781250834465027, -0.05489499121904373, -0.002713992493227124, -0.010102203115820885, -0.02127874083817005, -0.008590338751673698, -0.006164423190057278, -0.05097886919975281, 0.06698991358280182, 0.01080398540943861, -0.06009338051080704, -0.0287124365568161, -0.011999615468084812, -0.02441510185599327, -0.003937779925763607, -0.05884576588869095, 0.03638872504234314, -0.006212075240910053, 0.01795177161693573, 0.027083607390522957, 0.011375808157026768, 0.009946251288056374, -0.03047988936305046, -0.015612496063113213, -0.014087635092437267, 0.008482038974761963, 0.03467325493693352, 0.00829143077135086, 0.02309817634522915, 0.014503506012260914, -0.008356411010026932, -0.01883549802005291, -0.038572046905756, 0.029180292040109634, 0.0030887096654623747, -0.04280007258057594, 0.04633497819304466, -0.04397837445139885, 0.031866125762462616, -0.053231507539749146, -0.04144848883152008, 0.007719608023762703, 0.0013201743131503463, 0.014711441472172737, 0.05763280764222145, 0.04366647079586983, 0.05052834376692772, -0.03496783226728439, -0.00502944178879261, 0.01694674976170063, 0.033390987664461136, 0.027655430138111115, -0.040859341621398926, -0.01423492282629013, -0.03621544688940048, -0.033841513097286224, -0.017111364752054214, 0.016045695170760155, 0.05659313127398491, -0.01770917885005474, -0.03999294340610504, 0.023912589997053146, 0.005155069287866354, -0.00045323456288315356, 0.04127521067857742, -0.006788230035454035, 0.07506474107503891, 0.01290933322161436, -0.02578401006758213, 0.007312400732189417, 0.04883020371198654, 0.018904808908700943, 0.02261299267411232, -0.019528616219758987, -0.05125612020492554, -0.031034383922815323, 0.009911595843732357, 0.024120526388287544, 0.026979640126228333, 0.009374428540468216, 0.00817013531923294, -0.020135095342993736, -0.04602307453751564, 0.03521042317152023, 0.0166695024818182, -0.0574248731136322, 0.03465592861175537, -0.014468850567936897, -0.03995828703045845, -0.01764853112399578, 0.017561892047524452, 0.0005217341822572052, -0.015378568321466446, -0.03437868133187294, 0.03443066403269768, -0.00979896355420351, -0.08268904685974121, 0.03047988936305046, 0.028521828353405, 0.03269786760210991, 0.024085870012640953, 0.0018378471722826362, -0.0013526641996577382, -0.023080848157405853, 0.048414330929517746, 0.02486562915146351, -0.006021467503160238, -0.028383204713463783, -0.028417861089110374, 0.005003449507057667, -0.00038933768519200385, -0.016322942450642586, -0.011964959092438221, 0.016626181080937386, -0.014590146020054817, 0.022595666348934174, 0.02438044548034668, -0.02309817634522915, -0.02581866644322872, 0.026979640126228333, 0.0034287709277123213, 0.04304266348481178, -0.044359587132930756, 0.018540922552347183, -0.007321064826101065, 0.02706628106534481, -0.00043482359615154564, 0.016721485182642937, -0.01357646007090807, -0.011375808157026768, -0.012207550927996635, -0.031675517559051514, 0.09169958531856537, -0.04373578354716301, -0.03649269416928291, -0.041309867054224014, 0.0005945657612755895, 0.04876089096069336, 0.047374654561281204, 0.009287788532674313, -0.09246201813220978, -0.02075890079140663, 0.005133409518748522, 0.02947486750781536, 0.011653056368231773, 0.0863625705242157, -0.038572046905756, -0.04910745099186897, 0.002085853600874543, 0.003287981264293194, 0.015681806951761246, -0.0138537073507905, -0.055761389434337616, -0.04304266348481178, -0.0128486854955554, 0.009651675820350647, -0.005570940673351288, -0.08456046879291534, -0.029821425676345825, 0.038537394255399704, 0.055761389434337616, 0.02883373200893402, 0.019060760736465454, -0.03826014697551727, -0.02782871015369892, -0.02108813263475895, -0.021053476259112358, 0.02883373200893402, 0.01779581978917122, 0.05489499121904373, 0.021140117198228836, 0.014772089198231697, 0.05770212039351463, -0.09655141830444336, 0.015985047444701195, -0.0461963526904583, -0.016920756548643112, 0.006554302293807268, 0.03645803779363632, 0.059573542326688766, -0.03531439229846001, -0.0005222756881266832, -0.00141331204213202, 0.0172759797424078, -0.022699633613228798, -0.048899516463279724, -0.06619282066822052, -0.004934137687087059, 0.07402506470680237, -0.02032570168375969, -0.0265117846429348, -0.051152151077985764, 0.015066664665937424, -0.023566031828522682, -0.002029537921771407, 0.08483771234750748, 0.028244581073522568, -0.004483610857278109, -0.07139120995998383, 0.044359587132930756, -0.04172573983669281, -0.0194766316562891, -0.005614260211586952, -0.03507180139422417, 0.04806777462363243, -0.012840021401643753, -0.056246571242809296, -0.008451714180409908, 0.012320182286202908, -0.04124055430293083, 0.011531759984791279, 0.00984228402376175, -0.020793557167053223, -0.01819436252117157, -0.030219970270991325, 0.008707301691174507, 0.05402859300374985, 0.038779985159635544, 0.050666969269514084, 0.023028865456581116, -0.02834855020046234, -0.0449833944439888, 0.10105668753385544, -0.0008100823033601046, -0.0035912205930799246, 0.0799165740609169, -0.02221444994211197, -0.03683925047516823, 0.02245704084634781, -0.030098674818873405, -0.011679047718644142, 0.00854701828211546, 0.03188345581293106, 0.048934172838926315, 0.009539044462144375, 0.07894620299339294, 0.047651901841163635, -0.022751616314053535, 0.04543392360210419, 0.035799574106931686, 0.05056300014257431, 0.033148396760225296, -0.0658462643623352, 0.014009659178555012, 0.07652029395103455, 0.021382708102464676, -0.0017869463190436363, 0.025090891867876053, 0.041344523429870605, -0.04304266348481178, -0.02224910631775856, 0.027880694717168808, -0.021555988118052483, -0.05000850558280945, 0.03663131594657898, -0.02639048919081688, 0.015439216047525406, 0.012762045487761497, -0.01011953130364418, -0.061063747853040695, -0.014503506012260914, -0.0035738926380872726, 0.012441478669643402, 0.010526738129556179, -0.0010884127113968134, 0.03519309684634209, -0.001613666652701795, -0.03611147776246071, 0.028365878388285637, 0.05565742030739784, -0.03683925047516823, 0.024571053683757782, -0.035487670451402664, 0.04474080353975296, 0.018488937988877296, -0.060232002288103104, 0.06116771325469017, -0.008967221714556217, 0.049939192831516266, 0.07024756819009781, 0.012666742317378521, -0.030705152079463005, -0.014104963280260563, -0.034915849566459656, -0.02895502746105194, -0.03919585421681404, 0.04855295643210411, 0.006190415471792221, -0.02410319820046425, 0.01461613830178976, -0.002376097021624446, 0.00946106854826212, 0.008633658289909363, 0.011315160430967808, 0.023427408188581467, -0.017362620681524277, -0.05669710040092468, -0.031155679374933243, 0.036042165011167526, -0.005116081330925226, -0.030635841190814972, -0.09426412731409073, -0.015647152438759804, 0.046646878123283386, -0.019303351640701294, 0.05104818195104599, -0.028660451993346214, 0.008555682376027107, 0.005783208180218935, -0.008599001914262772, 0.025333484634757042, 0.014538162387907505, -0.022266434505581856, 0.016756141558289528, 0.02855648472905159, -0.00184976018499583, -0.025038909167051315, 0.0329231321811676, -0.034084104001522064, -0.005155069287866354, 0.011852327734231949, 0.025333484634757042, 0.00973831582814455, 0.005848187953233719, -0.053716689348220825, -0.008525358512997627, -0.02633850648999214, 0.0009487060597166419, 0.09329375624656677, -0.016695493832230568, -0.021625299006700516, 0.012900669127702713, -0.00008907656592782587, -0.0015042838640511036, -0.0036128805950284004, 0.007238756865262985, 0.009937587194144726, 0.004193367436528206, 0.008590338751673698, 0.03832945600152016, -0.03940379247069359, 0.021902546286582947, -0.11505768448114395, 0.03420540317893028, 0.013247229158878326, -0.02096683718264103, 0.05628122761845589, 0.0457804799079895, 0.016964077949523926, 0.01030147448182106, 0.014104963280260563, 0.003734176279976964, 0.005943491589277983, -0.03016798570752144, 0.020152421668171883, -0.03501981496810913, 0.03415341675281525, 0.001416561077348888, -0.04824105277657509, 0.043146632611751556, -0.017743835225701332, -0.009010541252791882, -0.03884929418563843, -0.04706275090575218, 0.029492195695638657, 0.0265117846429348, 0.004665554501116276, 0.07548061013221741, -0.004007091745734215, -0.05513758212327957, -0.01200827956199646, -0.0026468464639037848, 0.025732027366757393, -0.053682032972574234, -0.02807130292057991, -0.01835031434893608, -0.005939159542322159, 0.06082115322351456, 0.01130649633705616, 0.0417603924870491, -0.02413785457611084, -0.11748360097408295, -0.028851060196757317, 0.018055738881230354, -0.04772121459245682, -0.05285029113292694, 0.045849792659282684, -0.07444093376398087, -0.039819661527872086, -0.015066664665937424, -0.011964959092438221, 0.08268904685974121, -0.05988544598221779, -0.032628558576107025, -0.00559260044246912, 0.012701397761702538, -0.002373930998146534, 0.0224916972219944, -0.0594349168241024, -0.011800344102084637, -0.03526240587234497, -0.021504003554582596, -0.005882843863219023, -0.022197121754288673, -0.042106952518224716, -0.03826014697551727, -0.030861103907227516, 0.0006801225827075541, 0.047374654561281204, -0.0012801033444702625, 0.055449485778808594, -0.028209926560521126, 0.0013786561321467161, 0.07638166844844818, 0.0026555105578154325, -0.05791005492210388, 0.05326616391539574, -0.0033616251312196255, 0.024207165464758873, -0.012805365957319736, 0.014208930544555187, -0.011228520423173904, 0.031467583030462265, 0.029821425676345825, 0.028903044760227203, -0.03992363065481186, 0.01703338883817196, -0.0803324431180954, 0.020949508994817734, -0.021694611757993698, 0.008118151687085629, -0.05510292574763298, -0.00045323456288315356, -0.01724998839199543, -0.025454780086874962, 0.04928072914481163, 0.019372664391994476, -0.0513947419822216, 0.013706419616937637, -0.011271840892732143, -0.015898406505584717, -0.08331285417079926, 0.0077672600746154785, 0.022578338161110878, -0.03517576679587364, -0.032230012118816376, 0.05413256213068962, 0.0024237490724772215, -0.024588381871581078, -0.020533638074994087, 0.0028526161331683397, -0.05312753841280937, -0.047374654561281204, 0.04165642708539963, 0.05097886919975281, -0.00810948759317398, -0.06383621692657471, -0.0050727613270282745, 0.09287788718938828, -0.004877822007983923, 0.0006627946277149022, 0.0028981019277125597, -0.07319331914186478, -0.091560959815979, -0.03425738587975502, -0.027898022904992104, -0.014087635092437267, 0.048656925559043884, 0.0026880004443228245, 0.008096490986645222, -0.0011945465812459588, -0.052434418350458145, 0.053959280252456665, 0.002373930998146534, 0.0017024724511429667, -0.06605420261621475, -0.02245704084634781, -0.05052834376692772, 0.006658270489424467, -0.019649911671876907, 0.025454780086874962, -0.03028928115963936, -0.03791358694434166, 0.029007012024521828, 0.02907632477581501, 0.014468850567936897, -0.026373161002993584, 0.08989747613668442, 0.05558810755610466, -0.05056300014257431, 0.010310138575732708, -0.007251753006130457, -0.021018819883465767, -0.0010288478806614876, 0.022924896329641342, 0.004912477917969227, -0.04245351254940033, 0.013654435984790325, 0.035799574106931686, -0.014304234646260738, 0.03649269416928291, 0.012545445933938026, -0.010162850841879845, -0.0028656120412051678, -0.020031126216053963, 0.0009996069129556417, -0.015499863773584366, -0.03638872504234314, -0.018766185268759727, -0.0022168965078890324, 0.01831565797328949, -0.05274632200598717, 0.03297511488199234, 0.023150160908699036, -0.01417427510023117, 0.007823576219379902, 0.02140003629028797, -0.03105171211063862, 0.01733662746846676, -0.003463426837697625, -0.031623534858226776, -0.042834728956222534, -0.0036388724111020565, 0.05791005492210388, 0.026199882850050926, -0.023080848157405853, -0.010691354051232338, -0.033148396760225296, 0.012831357307732105, -0.026321178302168846, -0.08428321778774261, -0.024467086419463158, 0.0618608333170414, -0.003012899775058031, -0.021815907210111618, 0.0014912879560142756, -0.005830859765410423, -0.009391756728291512, 0.026979640126228333, 0.024882957339286804, -0.03443066403269768, -0.047132063657045364, 0.0011512265773490071, 0.033962808549404144, 0.008226451463997364, -0.02517753280699253, 0.005848187953233719, -0.022786272689700127, -0.017847802489995956, 0.0018313492182642221, -0.00019412735127843916, 0.03968103975057602, -0.10826512426137924, -0.034603945910930634, -0.054167214781045914, 0.03157155215740204, -0.0034006130881607533, -0.02782871015369892, -0.008815601468086243, -0.0132558923214674, -0.04300800710916519, -0.009720987640321255, -0.0038814640138298273, 0.06529176980257034, -0.0019374829716980457, -0.009651675820350647, 0.012458805926144123, 0.029110979288816452, -0.0128486854955554, -0.004747861996293068, -0.05687037855386734, -0.014364882372319698, 0.0026468464639037848, -0.017561892047524452, 0.013446500524878502, -0.014564153738319874, 0.028123285621404648, 0.007650296203792095, 0.06009338051080704, 0.042037639766931534, -0.011332488618791103, 0.01975387893617153, -0.004033083561807871, 0.08580807596445084, -0.0028916040901094675, -0.0409633070230484, 0.014451522380113602, -0.027742071077227592, 0.046092383563518524, 0.052191827446222305, -0.03898791968822479, -0.0042670113034546375, -0.04269610345363617, -0.02599194645881653, 0.025073563680052757, 0.006775233894586563, 0.007381712552160025, -0.04550323262810707, -0.04023553431034088, 0.06359362602233887, -0.020100438967347145, 0.04754793271422386, 0.010708682239055634, 0.028175270184874535, 0.03418807312846184, 0.062068767845630646, 0.013767067342996597, 0.023080848157405853, -0.006346366833895445, -0.006814221851527691, 0.024761661887168884, -0.02334076724946499, 0.037740305066108704, -0.00901920534670353, -0.06348966062068939, -0.023999230936169624, -0.04401303082704544, -0.0047088745050132275, 0.0026381826028227806, -0.002034952864050865, -0.030098674818873405, -0.09648210555315018, 0.002861279994249344, -0.014338890090584755, 0.000927046115975827, 0.03562629595398903, 0.017475251108407974, -0.0815107449889183, 0.03157155215740204, -0.009686332195997238, -0.015733791515231133, 0.002497392939403653, -0.01520528830587864, -0.022353073582053185, 0.01112455315887928, 0.06161824241280556, 0.05732090398669243, 0.010812649503350258, -0.06348966062068939, 0.025680042803287506, 0.0658462643623352, -0.001415478065609932, 0.011323824524879456, -0.027724742889404297, 0.009625684469938278, 0.022803600877523422, -0.04127521067857742, 0.06362828612327576, 0.06640075892210007, 0.0297174584120512, -0.05482567846775055, 0.004000593908131123, 0.025194860994815826, -0.00787989143282175, -0.035002488642930984, 0.038779985159635544, 0.056489162147045135, 0.0269103292375803, -0.048171740025281906, 0.005358673166483641, -0.006753574125468731, 0.025489434599876404, 0.04952332377433777, -0.014217594638466835, 0.04844898730516434, -0.03469058498740196, -0.03645803779363632, 0.017622539773583412, 0.02703162468969822, 0.050666969269514084, -0.02088019624352455, -0.0027378182858228683, -0.027534134685993195, 0.028989683836698532, 0.004513934720307589, 0.03255924582481384, -0.0019948817789554596, -0.01715468429028988, 0.026927655562758446, 0.07693616300821304, -0.05253838747739792, 0.017596548423171043, -0.028660451993346214, -0.029457539319992065, -0.08774881064891815, -0.037324436008930206, -0.05378600209951401, 0.04654291272163391, 0.025524090975522995, -0.0510135255753994, 0.05628122761845589, 0.05652381852269173, 0.006017135456204414 ]
717,910
pytorch_optimizer.optimizer.sgdp
SGDP
SGD + Slowing Down the Slowdown for Momentum Optimizers on Scale-invariant Weights. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param dampening: float. dampening for momentum. :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 delta: float. threshold that determines whether a set of parameters is scale invariant or not. :param wd_ratio: float. relative weight decay applied on scale-invariant parameters compared to that applied on scale-variant parameters. :param nesterov: bool. enables nesterov momentum. :param eps: float. term added to the denominator to improve numerical stability.
class SGDP(Optimizer, BaseOptimizer): r"""SGD + Slowing Down the Slowdown for Momentum Optimizers on Scale-invariant Weights. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param dampening: float. dampening for momentum. :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 delta: float. threshold that determines whether a set of parameters is scale invariant or not. :param wd_ratio: float. relative weight decay applied on scale-invariant parameters compared to that applied on scale-variant parameters. :param nesterov: bool. enables nesterov momentum. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-3, momentum: float = 0.0, dampening: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, delta: float = 0.1, wd_ratio: float = 0.1, nesterov: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_range(wd_ratio, 'wd_ratio', 0.0, 1.0) self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'momentum': momentum, 'dampening': dampening, 'delta': delta, 'wd_ratio': wd_ratio, 'nesterov': nesterov, 'eps': eps, } super().__init__(params, defaults) def __str__(self) -> str: return 'SGDP' @torch.no_grad() def reset(self): for group in self.param_groups: for p in group['params']: state = self.state[p] state['momentum'] = 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: 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: state['momentum'] = torch.zeros_like(p) buf = state['momentum'] buf.mul_(momentum).add_(grad, alpha=1.0 - group['dampening']) d_p = buf.clone() if group['nesterov']: d_p = d_p.mul_(momentum).add_(grad) wd_ratio: float = 1.0 if len(p.shape) > 1: d_p, wd_ratio = projection( p, grad, d_p, group['delta'], group['wd_ratio'], group['eps'], ) 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'], ratio=wd_ratio / (1.0 - momentum), ) p.add_(d_p, alpha=-group['lr']) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, momentum: float = 0.0, dampening: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, delta: float = 0.1, wd_ratio: float = 0.1, nesterov: bool = False, eps: float = 1e-08)
[ 0.01660233363509178, -0.03918031230568886, -0.022687532007694244, -0.0030251704156398773, -0.018922876566648483, -0.01187161449342966, -0.039100635796785355, -0.04402058571577072, 0.024779008701443672, 0.036770135164260864, -0.05210762470960617, 0.022050131112337112, 0.041470978409051895, 0.0588003471493721, -0.028882283717393875, 0.07772321999073029, 0.008490395732223988, 0.020456625148653984, -0.019351130351424217, 0.013684227131307125, -0.00399372261017561, -0.03912055492401123, 0.02151232212781906, 0.07218579202890396, -0.05800359323620796, -0.00610013771802187, 0.0014565634774044156, -0.030953841283917427, -0.07800208777189255, -0.022528182715177536, 0.0025745071470737457, -0.04358237236738205, -0.00983989518135786, 0.023822905495762825, 0.024918440729379654, 0.010945389978587627, 0.0014266852522268891, 0.007947607897222042, -0.11170472204685211, -0.03212905302643776, 0.012787880375981331, -0.023225340992212296, 0.0324278324842453, -0.027527805417776108, 0.03308515623211861, 0.012847636826336384, 0.003677511587738991, 0.051749087870121, -0.021153783425688744, -0.007912750355899334, 0.03989738970994949, -0.047526296228170395, 0.0002643911575432867, -0.011642548255622387, -0.03370263800024986, 0.04744662344455719, 0.06429794430732727, 0.025496086105704308, 0.049757204949855804, -0.06505485624074936, 0.04091325029730797, -0.06840121746063232, -0.0004354128905106336, -0.002214723499491811, -0.0349973626434803, -0.0385628305375576, -0.05234665051102638, -0.03639167919754982, 0.005930827930569649, 0.02503795363008976, 0.015198057517409325, -0.036471351981163025, -0.00959588959813118, 0.02394241839647293, -0.03282621130347252, -0.01118441578000784, -0.013295810669660568, -0.06469631940126419, -0.023583879694342613, -0.04541490226984024, 0.035714440047740936, 0.02063589356839657, -0.008669665083289146, -0.034340038895606995, 0.025555841624736786, -0.040534790605306625, 0.007608987856656313, 0.007255428936332464, -0.014959031715989113, -0.05051412060856819, 0.029718874022364616, -0.003124764421954751, 0.04238724336028099, 0.043064482510089874, 0.06895894557237625, 0.058043431490659714, -0.04537506401538849, -0.03495752438902855, -0.02240866981446743, -0.02979855053126812, 0.01058685127645731, 0.04278561845421791, 0.040335603058338165, 0.0558125264942646, 0.02523714117705822, -0.026213163509964943, -0.02038690820336342, -0.021452566608786583, -0.006110097281634808, -0.06919796764850616, -0.02756764180958271, 0.01938100904226303, -0.032348159700632095, -0.02450014464557171, -0.029121309518814087, 0.00423772819340229, 0.009575971402227879, 0.01499886903911829, 0.014112481847405434, 0.03469857946038246, -0.01006398256868124, 0.05131087079644203, -0.06389956176280975, 0.006697702221572399, -0.0027388373855501413, -0.01953040063381195, 0.05306372791528702, 0.026750970631837845, 0.005950746592134237, 0.0005683087510988116, -0.025097709149122238, 0.011961249634623528, -0.012260031886398792, 0.02354404143989086, 0.03836364299058914, -0.04880110174417496, -0.00534322252497077, 0.0384831540286541, -0.0056021674536168575, 0.02826480194926262, 0.025575760751962662, 0.036212410777807236, -0.007574130315333605, 0.02473917044699192, 0.05151006206870079, 0.021532241255044937, 0.021293215453624725, 0.030575383454561234, 0.007828094996511936, 0.044498637318611145, -0.026810728013515472, 0.012947230599820614, 0.03808477893471718, 0.004324872978031635, 0.03340385481715202, -0.029639199376106262, -0.014321628957986832, 0.006413858849555254, -0.04477750137448311, 0.016174079850316048, -0.02796601876616478, -0.0567287914454937, -0.03298556059598923, -0.02177126705646515, -0.011054943315684795, -0.01103502418845892, 0.0029479849617928267, 0.022826964035630226, -0.014849478378891945, 0.05517512187361717, 0.01686127856373787, -0.05939791351556778, -0.0068968902342021465, 0.012628530152142048, 0.01939096860587597, 0.09242331236600876, 0.060911741107702255, 0.024579819291830063, -0.0006971585680730641, -0.031411975622177124, 0.04664986953139305, -0.002224682830274105, -0.036072976887226105, -0.05206778645515442, -0.03089408576488495, 0.06346134841442108, -0.02870301529765129, 0.012877515517175198, -0.04230756685137749, 0.030455870553851128, 0.024420469999313354, -0.028444070369005203, 0.01715010218322277, -0.013674267567694187, -0.012738083489239216, 0.03561484441161156, 0.017877137288451195, -0.019271455705165863, 0.054617397487163544, 0.042666107416152954, 0.03888152912259102, 0.010865714401006699, 0.020954595878720284, 0.003687470918521285, 0.010477297939360142, -0.015506799332797527, -0.05186859890818596, 0.02127329632639885, -0.01135372556746006, -0.0026417330373078585, -0.060712553560733795, -0.0023690941743552685, 0.04139130190014839, 0.03073473460972309, 0.052227139472961426, -0.053422268480062485, 0.02453998290002346, 0.0238428246229887, 0.02360379882156849, -0.02643227018415928, 0.014341548085212708, -0.05720684304833412, 0.008360923267900944, 0.023822905495762825, 0.05676862969994545, -0.012777920812368393, 0.03133229911327362, -0.044299449771642685, 0.0034733437933027744, -0.017030589282512665, 0.008520273491740227, -0.07218579202890396, 0.026452189311385155, -0.013674267567694187, 0.09306070953607559, -0.0005975645035505295, -0.04848239943385124, 0.00678235711529851, 0.002893208060413599, -0.009078000672161579, -0.03704899922013283, -0.04095308855175972, -0.042068541049957275, 0.04274578019976616, -0.0021587018854916096, 0.004718269687145948, 0.06788332760334015, 0.002132558263838291, 0.0018885527970269322, 0.04386123642325401, -0.005477674771100283, -0.05170924961566925, -0.026850564405322075, 0.02354404143989086, -0.05549382418394089, -0.001241191290318966, 0.006483574863523245, 0.047167759388685226, -0.011712264269590378, -0.051549896597862244, -0.03330426290631294, -0.03981771320104599, -0.12309829145669937, 0.0689191073179245, -0.01321613509207964, 0.019371049478650093, 0.02547616697847843, -0.02930057980120182, -0.017817381769418716, 0.02617332525551319, 0.1034184992313385, 0.03716851398348808, -0.07465572655200958, 0.003231828100979328, -0.020396867766976357, 0.024022093042731285, -0.026392431929707527, 0.0017528558382764459, 0.01854441873729229, -0.026651376858353615, 0.051390547305345535, -0.038941286504268646, -0.030216844752430916, 0.013743983581662178, -0.02071557007730007, 0.05409950762987137, -0.026113569736480713, -0.027348535135388374, 0.05557350069284439, 0.04334334656596184, 0.009341925382614136, 0.012748043052852154, 0.10612745583057404, 0.01408260315656662, 0.054219018667936325, 0.03198961913585663, 0.02390258014202118, 0.004451855551451445, -0.012638489715754986, -0.01958019658923149, 0.0872444212436676, -0.005607146769762039, 0.00038592706550844014, 0.06748495250940323, -0.013295810669660568, -0.014222035184502602, 0.006249528843909502, -0.022727370262145996, 0.05162957310676575, -0.004207849968224764, -0.03916039317846298, -0.012359625659883022, -0.019450724124908447, 0.047924675047397614, 0.031431894749403, -0.08278260380029678, -0.03003757633268833, -0.043263670057058334, 0.01993873529136181, 0.06788332760334015, -0.028842447325587273, 0.03109327331185341, 0.012977109290659428, -0.003821922931820154, -0.048323050141334534, -0.03173067420721054, 0.009939489886164665, 0.021831022575497627, -0.008316106162965298, -0.010427501052618027, -0.03969820216298103, -0.04744662344455719, 0.058481644839048386, 0.027846505865454674, -0.03475833684206009, -0.02593429945409298, 0.05051412060856819, 0.014769802801311016, 0.013445201329886913, -0.07023374736309052, 0.09170623123645782, 0.03551524877548218, -0.05063363164663315, 0.030435951426625252, 0.016622252762317657, -0.03679005429148674, 0.0293603353202343, -0.009959408082067966, 0.04314415901899338, -0.01769786886870861, -0.0037322882562875748, 0.0034957523457705975, -0.018275514245033264, 0.08979402482509613, 0.04657019302248955, 0.012608611024916172, -0.007459596730768681, 0.009366823360323906, 0.039001043885946274, -0.06852073222398758, -0.026013974100351334, 0.03125262260437012, -0.03643151745200157, 0.05087265744805336, 0.0758906900882721, -0.009810017421841621, -0.010666526854038239, -0.04282545670866966, 0.044100262224674225, -0.031710755079984665, -0.009984306991100311, -0.08581026643514633, -0.01710030436515808, 0.001104871858842671, -0.052984051406383514, -0.0010233292123302817, -0.04521571472287178, -0.016930993646383286, 0.0425465926527977, 0.03312499076128006, 0.040275849401950836, -0.023763148114085197, 0.025356654077768326, 0.059676773846149445, 0.07150854915380478, -0.01923161745071411, 0.03348353132605553, -0.011363685131072998, 0.0557328499853611, -0.08453545719385147, 0.01440130453556776, 0.014441141858696938, 0.026113569736480713, 0.030077412724494934, -0.053422268480062485, 0.022687532007694244, 0.03927990794181824, 0.048123862594366074, -0.07059228420257568, -0.004780516028404236, -0.004972234833985567, -0.018554378300905228, -0.025954218581318855, 0.03069489635527134, -0.01909218542277813, -0.08286228030920029, 0.044299449771642685, 0.10062986612319946, -0.021591996774077415, 0.09345909208059311, -0.015028747729957104, -0.012220194563269615, -0.06318248808383942, 0.024779008701443672, -0.0005430990131571889, -0.03625224530696869, -0.04808402433991432, 0.03306523710489273, 0.038602668792009354, 0.0021387829910963774, 0.03149164840579033, -0.016024688258767128, 0.055414147675037384, 0.018275514245033264, 0.012180356308817863, -0.039200231432914734, -0.05003606900572777, -0.010298028588294983, -0.05354177951812744, 0.0126882866024971, -0.005452776327729225, -0.0026890402659773827, -0.03511687368154526, 0.006876971572637558, 0.02022755891084671, -0.014490939676761627, -0.0041182152926921844, 0.04123195260763168, 0.019719628617167473, -0.031511567533016205, -0.0015549126546829939, -0.022448506206274033, 0.012917352840304375, -0.024161525070667267, 0.02290663868188858, -0.034180689603090286, 0.022966396063566208, -0.00949629582464695, -0.0486815869808197, -0.02776683121919632, 0.03796526417136192, -0.015994809567928314, 0.05194827541708946, -0.005507552996277809, -0.017667990177869797, -0.003719839034602046, 0.004912478383630514, -0.02702983468770981, -0.03256726637482643, -0.024958277121186256, 0.004070908296853304, -0.0023703391198068857, -0.028842447325587273, 0.026691215112805367, -0.04115227609872818, 0.042028702795505524, 0.054418206214904785, -0.017289532348513603, -0.008161734789609909, 0.009142736904323101, -0.0016420574393123388, 0.01306674350053072, 0.02607373148202896, -0.05589219927787781, -0.03987747058272362, -0.016771644353866577, -0.07079147547483444, -0.027189185842871666, 0.012399463914334774, 0.015556596219539642, 0.054816585034132004, -0.07059228420257568, 0.03716851398348808, 0.06254508346319199, -0.01754847727715969, -0.022428587079048157, 0.003866740269586444, 0.010143657214939594, 0.011094780638813972, 0.021432647481560707, -0.02354404143989086, -0.027487967163324356, 0.07457605004310608, -0.008679624646902084, -0.03133229911327362, -0.02151232212781906, -0.013694186694920063, -0.015735864639282227, 0.08357935398817062, -0.03776607662439346, 0.0030749673023819923, -0.003401137888431549, -0.040096577256917953, -0.014461060985922813, 0.06617031246423721, -0.012080762535333633, -0.048522237688302994, 0.06047352775931358, -0.06039385125041008, 0.016741765663027763, 0.010805957950651646, -0.00023202309967018664, -0.010766120627522469, 0.03119286708533764, 0.010955349542200565, -0.026910321786999702, -0.027388373389840126, 0.05696781724691391, 0.047526296228170395, -0.04282545670866966, 0.036112815141677856, 0.02240866981446743, -0.027388373389840126, 0.007369962055236101, 0.02683064714074135, -0.0019408396910876036, -0.04676938056945801, -0.02503795363008976, 0.05712716653943062, 0.022767208516597748, 0.03987747058272362, 0.000895101809874177, 0.028424151241779327, 0.08780214190483093, 0.009531154297292233, -0.026711134240031242, -0.009511235170066357, -0.041072599589824677, -0.07616955786943436, -0.025217222049832344, -0.0002759067283477634, -0.006473615299910307, 0.016283633187413216, 0.002537159249186516, -0.0008646011701785028, 0.05995563790202141, -0.01959015615284443, 0.015457001514732838, -0.040733981877565384, -0.01534744817763567, -0.04645068198442459, 0.0189925916492939, -0.03808477893471718, 0.041630327701568604, 0.025057870894670486, -0.016492780297994614, -0.04641084372997284, 0.05326291546225548, 0.0075293127447366714, 0.004317403770983219, -0.08270292729139328, -0.06330200284719467, 0.038104698061943054, -0.026312757283449173, -0.012558814138174057, 0.02390258014202118, -0.013226094655692577, -0.0037696361541748047, -0.043064482510089874, 0.04597263038158417, 0.005871071480214596, -0.020217599347233772, 0.012230153195559978, 0.0020591076463460922, -0.04541490226984024, -0.003562978468835354, 0.024181444197893143, -0.014829559251666069, 0.002473667962476611, -0.033344101160764694, 0.027248941361904144, -0.038503073155879974, 0.008878812193870544, 0.005632045678794384, -0.005383060313761234, 0.04991655424237251, -0.06704673916101456, 0.014122441411018372, -0.011194375343620777, -0.00163334293756634, -0.015307610854506493, 0.02493835799396038, 0.022886721417307854, -0.05553366243839264, -0.012588691897690296, 0.0069018700160086155, -0.05214746296405792, 0.022289156913757324, 0.0852525383234024, 0.03481809049844742, -0.06389956176280975, 0.012011046521365643, 0.05469707027077675, 0.004997133277356625, 0.025157466530799866, -0.01929137483239174, 0.016333429142832756, 0.002529689809307456, 0.03208921477198601, -0.03878193721175194, -0.03157132491469383, -0.0029081471730023623, -0.0023479305673390627, -0.009326986037194729, -0.01660233363509178, -0.005811315029859543, -0.005776457022875547, 0.007678703870624304, 0.07138904184103012, -0.0526653528213501, -0.01854441873729229, 0.020695650950074196, 0.0014204606413841248, -0.002611854812130332, -0.033742476254701614, -0.024998115375638008, 0.027487967163324356, -0.0768866315484047, -0.020755406469106674, -0.07971510291099548, -0.014510857872664928, -0.001518809818662703, 0.0051888516172766685, -0.04139130190014839, 0.0033662801142781973, 0.014471020549535751, 0.0233448538929224, -0.02459973841905594, -0.025117628276348114, -0.008211532607674599, 0.028822528198361397, 0.04784499853849411, 0.009879733435809612, 0.0036526131443679333, -0.05445804446935654, -0.021950535476207733, 0.005791395902633667, 0.017518598586320877, 0.01566614955663681, 0.05409950762987137, -0.016044607385993004, 0.02810545079410076, -0.05286454036831856, -0.02896196022629738, 0.037606727331876755, -0.00026205694302916527, 0.028145289048552513, 0.0004712045192718506, 0.04601246863603592, -0.04617181792855263, 0.02157207950949669, -0.0026890402659773827, 0.021552160382270813, 0.04115227609872818, -0.05051412060856819, 0.005681842565536499, -0.029818469658493996, -0.005432857200503349, 0.01909218542277813, -0.028384314849972725, -0.05776456743478775, -0.022089967504143715, -0.06202719733119011, -0.008540192618966103, -0.01784726046025753, 0.003331422107294202, 0.03119286708533764, -0.02597413770854473, -0.03390182554721832, -0.016074486076831818, 0.04425961151719093, 0.0187834445387125, 0.005104196723550558, -0.004197890870273113, 0.01963995397090912, -0.027647318318486214, -0.02290663868188858, -0.012668367475271225, 0.01551675796508789, -0.00770858209580183, -0.03844331577420235, -0.02028731442987919, -0.008540192618966103, -0.009655646048486233, 0.05214746296405792, -0.08581026643514633, -0.026013974100351334, -0.023285096511244774, 0.030376195907592773, -0.06433777511119843, -0.00180016306694597, 0.005402978975325823, -0.041869353502988815, -0.012090722098946571, 0.03688964992761612, 0.040674224495887756, 0.00241017690859735, -0.0056569441221654415, 0.06370037794113159, -0.008495375514030457, 0.01210068166255951, -0.00008512182103004307, 0.021193621680140495, -0.007947607897222042, 0.03551524877548218, -0.025117628276348114, 0.00360032613389194, -0.019560277462005615, -0.022986315190792084, 0.028085531666874886, -0.020167801529169083, -0.013654349371790886, 0.01884320005774498, -0.014560654759407043, -0.04230756685137749, -0.036570947617292404, 0.021990373730659485, -0.009232372045516968, 0.04473766312003136, -0.027348535135388374, 0.0022595408372581005, 0.01611432246863842, -0.011224253103137016, -0.047127921134233475, 0.0006047228234820068, 0.013056784868240356, 0.03794534504413605, 0.028543664142489433, -0.01665213145315647, 0.05736619234085083, -0.028025776147842407, 0.07776305824518204, -0.024958277121186256, -0.03828396648168564, 0.00275128660723567, 0.04433928802609444, -0.018185880035161972, -0.05553366243839264, 0.036770135164260864, -0.051151521503925323, 0.08087039738893509, -0.026392431929707527, -0.0023666045162826777, -0.0022408668883144855, 0.03471849858760834, -0.07051261514425278, 0.020954595878720284, -0.036770135164260864, -0.07509393990039825, -0.097203828394413, -0.0006271314923651516, -0.04342301934957504, 0.09919571131467819, 0.02469933219254017, -0.0003616510075516999, 0.031352218240499496, 0.03453923016786575, 0.030356276780366898 ]
717,912
pytorch_optimizer.optimizer.sgdp
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-3, momentum: float = 0.0, dampening: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, delta: float = 0.1, wd_ratio: float = 0.1, nesterov: bool = False, eps: float = 1e-8, ): self.validate_learning_rate(lr) self.validate_non_negative(weight_decay, 'weight_decay') self.validate_range(wd_ratio, 'wd_ratio', 0.0, 1.0) self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = { 'lr': lr, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'fixed_decay': fixed_decay, 'momentum': momentum, 'dampening': dampening, 'delta': delta, 'wd_ratio': wd_ratio, 'nesterov': nesterov, 'eps': eps, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.001, momentum: float = 0.0, dampening: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, fixed_decay: bool = False, delta: float = 0.1, wd_ratio: float = 0.1, nesterov: bool = False, eps: float = 1e-08)
[ 0.009513232856988907, -0.0028292054776102304, -0.007153614424169064, -0.009634717367589474, -0.029791930690407753, -0.018222792074084282, -0.07528349757194519, -0.02796030603349209, -0.02306351438164711, 0.05375256761908531, -0.03197866678237915, 0.04579060897231102, 0.041641417890787125, 0.09180549532175064, -0.02278316393494606, 0.048930536955595016, 0.012073768302798271, 0.02029738761484623, -0.027194013819098473, 0.010307558812201023, -0.002586234826594591, -0.025642739608883858, -0.006214439403265715, 0.11027126014232635, -0.01612016372382641, 0.02594178169965744, -0.02876397781074047, 0.002649313770234585, -0.053939465433359146, -0.009606682695448399, -0.0014811860164627433, -0.010045899078249931, -0.006761123426258564, 0.07887198776006699, 0.053266625851392746, -0.015241730958223343, -0.03433360904455185, -0.000032817089959280565, -0.11243930459022522, 0.03650165721774101, 0.034146711230278015, -0.030184421688318253, 0.0641816109418869, -0.03072643280029297, -0.017241565510630608, 0.016933180391788483, 0.04280019924044609, 0.03567929565906525, -0.009302969090640545, -0.025810951367020607, -0.0028151879087090492, -0.01381194218993187, 0.013774562627077103, -0.029698479920625687, -0.05315448343753815, 0.027324844151735306, 0.05300496518611908, 0.020446907728910446, 0.03179176524281502, 0.0039552804082632065, 0.002934336895123124, -0.045528948307037354, 0.027754714712500572, -0.00350204692222178, -0.016437893733382225, -0.0033361727837473154, -0.08305855840444565, -0.021699141710996628, 0.027025803923606873, 0.04399636387825012, 0.1036176010966301, -0.01860593818128109, -0.0029039655346423388, 0.020091798156499863, 0.004705218598246574, 0.007859163917601109, -0.0921792984008789, -0.051397621631622314, -0.019643235951662064, -0.00769562553614378, 0.032614126801490784, 0.053603045642375946, -0.021568311378359795, -0.019250744953751564, 0.03156748414039612, -0.03352993726730347, -0.05109858140349388, -0.05356566607952118, 0.01595195196568966, 0.014092293567955494, -0.050164077430963516, 0.0000523102207807824, -0.004165543708950281, -0.04792127385735512, 0.08821700513362885, 0.03648296743631363, 0.0005320821655914187, -0.041304998099803925, 0.01491465512663126, -0.023213034495711327, -0.02764257602393627, 0.02633427269756794, -0.025455839931964874, 0.004868756514042616, 0.015877192839980125, -0.03835197165608406, -0.05719153583049774, -0.01158782746642828, 0.006307889707386494, -0.052369505167007446, -0.04059477522969246, 0.059696000069379807, -0.044631823897361755, 0.024427887052297592, -0.03541763499379158, 0.03491300344467163, 0.023044824600219727, 0.015017450787127018, 0.01662479341030121, 0.005499545484781265, 0.023493384942412376, 0.032950546592473984, -0.054163746535778046, 0.034146711230278015, 0.03343648836016655, -0.035548463463783264, 0.0017288291128352284, 0.008246981538832188, 0.025979161262512207, -0.016774315387010574, 0.014269848354160786, -0.001219525351189077, -0.030689051374793053, -0.022465432062745094, 0.02476430870592594, -0.04268806055188179, 0.0022334603127092123, 0.051509760320186615, -0.028053756803274155, 0.013802597299218178, 0.05158452317118645, 0.018353622406721115, 0.054163746535778046, 0.014746444299817085, -0.0312497541308403, 0.013568972237408161, -0.04287496209144592, 0.0052519021555781364, 0.01316713634878397, 0.058275558054447174, 0.0016645820578560233, 0.026409031823277473, 0.03345517814159393, 0.029193848371505737, 0.03511859104037285, -0.051397621631622314, 0.01833493262529373, -0.025698810815811157, -0.00013842314365319908, 0.021063679829239845, -0.03186652436852455, 0.002190239494666457, 0.02211032249033451, -0.019418954849243164, -0.0037940789479762316, 0.0055322530679404736, -0.03947337344288826, -0.021568311378359795, 0.013793252408504486, -0.007709643337875605, 0.012270013801753521, -0.08993649482727051, -0.016325753182172775, 0.027866855263710022, -0.003396915504708886, 0.07363877445459366, 0.021680451929569244, 0.01246625930070877, -0.023923255503177643, -0.005644393153488636, 0.05909791961312294, -0.0016785996267572045, -0.016054747626185417, -0.07580681890249252, 0.015690291300415993, 0.02982931025326252, -0.04702414944767952, 0.05543467029929161, -0.044295404106378555, 0.032165564596652985, 0.0649665966629982, -0.008929168805480003, 0.00046987939276732504, 0.03083857335150242, -0.014391333796083927, 0.01826951839029789, 0.05420112609863281, -0.01178407296538353, 0.027380915358662605, 0.05932220071554184, 0.06691035628318787, 0.044856104999780655, 0.020428217947483063, -0.01709204539656639, 0.004684192128479481, -0.01341945119202137, -0.04257592186331749, 0.02115713059902191, -0.023755045607686043, -0.022764474153518677, 0.008410519920289516, -0.012802680023014545, 0.053266625851392746, 0.029287299141287804, 0.007289117202162743, -0.045304667204618454, -0.015129590407013893, 0.03033394180238247, -0.00003489781738608144, -0.038763150572776794, 0.07120906561613083, -0.021848661825060844, -0.009690787643194199, 0.002059409162029624, 0.04522990807890892, 0.007550777867436409, 0.04280019924044609, -0.05745319649577141, -0.07061098515987396, 0.02971716970205307, -0.019194675609469414, -0.05558419227600098, -0.012129838578402996, -0.002588571049273014, 0.05603275075554848, -0.014456748962402344, -0.048070792108774185, 0.03711842745542526, -0.07382567226886749, -0.030819881707429886, 0.025175489485263824, 0.005312644876539707, -0.0014169389614835382, -0.007312479894608259, 0.022988753393292427, 0.012157873250544071, 0.04724843055009842, 0.022913994267582893, -0.03195997700095177, -0.01635378785431385, -0.014867929741740227, -0.02893218770623207, -0.019605856388807297, 0.05644393339753151, -0.034707412123680115, 0.046052269637584686, 0.02216639183461666, 0.0023105565924197435, 0.009316987358033657, -0.02295137383043766, 0.0012896130792796612, 0.009587992914021015, -0.017120080068707466, 0.09180549532175064, -0.0009496878483332694, 0.007546105422079563, -0.004990241955965757, -0.01709204539656639, 0.020203936845064163, -0.005742515902966261, 0.10257095843553543, 0.02153092995285988, -0.009915068745613098, 0.004878101404756308, -0.025138109922409058, -0.03296923637390137, -0.001392408274114132, -0.03601571545004845, -0.014466093853116035, 0.04668772965669632, 0.011830797418951988, -0.05188356339931488, 0.00899458397179842, 0.01923205517232418, -0.0017732179258018732, 0.022241152822971344, -0.016475273296236992, 0.018633974716067314, 0.016783660277724266, 0.013269931077957153, -0.015316491015255451, 0.010522495023906231, 0.08111479133367538, 0.021699141710996628, 0.09479590505361557, -0.01435395423322916, 0.027885545045137405, -0.0028268692549318075, 0.06470493227243423, 0.00212949700653553, 0.04990241676568985, -0.032726265490055084, 0.031137613579630852, -0.00048448098823428154, -0.051285479217767715, -0.015316491015255451, 0.023755045607686043, 0.02452133782207966, 0.05364042520523071, 0.028165895491838455, 0.022241152822971344, 0.016606103628873825, 0.024147536605596542, 0.05079954117536545, 0.02966110035777092, -0.08111479133367538, -0.010943020693957806, -0.04437016323208809, 0.04455706477165222, 0.06134072318673134, 0.006854573730379343, 0.04515514522790909, 0.015363216400146484, -0.00434309896081686, -0.05786437541246414, -0.07857294380664825, 0.026708072051405907, 0.028053756803274155, -0.01940026506781578, 0.001969463424757123, -0.02463347837328911, -0.020428217947483063, 0.01214852835983038, -0.025642739608883858, -0.055173009634017944, -0.015400595963001251, 0.01826951839029789, 0.0662001371383667, 0.001876013120636344, -0.02496989816427231, 0.08963745087385178, 0.003146936185657978, -0.030072281137108803, 0.03401587903499603, -0.009485197253525257, -0.05973337963223457, 0.009003928862512112, -0.028558386489748955, 0.047397952526807785, -0.03162355348467827, -0.0034716755617409945, 0.01234477385878563, -0.001623697578907013, 0.08388091623783112, 0.04298710078001022, -0.015447321347892284, -0.028689216822385788, -0.0035043831449002028, 0.02538107894361019, -0.06313496828079224, -0.04126761853694916, 0.006602257955819368, -0.03399718925356865, 0.06829342246055603, 0.02153092995285988, -0.015372561290860176, 0.021119749173521996, -0.027866855263710022, 0.014774479903280735, 0.008303051814436913, -0.004737926181405783, -0.07932054996490479, -0.019643235951662064, -0.028053756803274155, 0.021867351606488228, -0.016166888177394867, -0.04201521724462509, 0.0012989580864086747, 0.05124809965491295, -0.008943186141550541, 0.0033291641157120466, 0.014531509019434452, 0.04825769364833832, 0.019643235951662064, -0.0026025886181741953, -0.024614788591861725, 0.0028432230465114117, 0.04149189591407776, 0.05524776875972748, -0.011326166801154613, -0.020895469933748245, 0.008971220813691616, 0.018073271960020065, 0.00698073161765933, -0.06268640607595444, 0.05722891539335251, 0.01578374207019806, 0.03212818503379822, -0.07554515451192856, -0.03274495527148247, -0.006644310429692268, -0.06021932139992714, -0.016260338947176933, 0.05091167986392975, -0.004772969987243414, -0.014690374955534935, 0.012877440080046654, 0.06399471312761307, 0.010615944862365723, 0.05879887938499451, 0.017634056508541107, -0.021007608622312546, -0.03969765454530716, 0.029623718932271004, -0.030016209930181503, -0.04504300653934479, 0.007162959314882755, -0.020278697833418846, 0.03751091659069061, -0.013269931077957153, 0.023811116814613342, -0.006976058706641197, 0.08021766692399979, 0.04194045811891556, 0.0664244145154953, 0.030128350481390953, 0.0031936613377183676, 0.021960802376270294, -0.007088199257850647, -0.048295073211193085, -0.05513563007116318, 0.020839398726820946, -0.03603440523147583, -0.03801554813981056, 0.03153010457754135, 0.0012101803440600634, 0.00510238204151392, 0.013045650906860828, 0.015858503058552742, -0.021231889724731445, -0.012793335132300854, -0.06380780786275864, 0.01116730086505413, -0.025960471481084824, -0.05330400541424751, -0.01833493262529373, 0.016652829945087433, -0.0008579898276366293, -0.05775223672389984, -0.021755211055278778, 0.026091301813721657, 0.004023031797260046, 0.031829144805669785, -0.028390176594257355, -0.017017284408211708, -0.027754714712500572, -0.024315746501088142, -0.00525657506659627, 0.04347304254770279, -0.03440837189555168, 0.04190307855606079, -0.006022866815328598, -0.017624711617827415, -0.016325753182172775, -0.06410685181617737, 0.03738008812069893, 0.061602383852005005, -0.022428052499890327, -0.0022229470778256655, -0.005541597958654165, 0.023923255503177643, 0.02493251860141754, 0.029848000034689903, -0.028184587135910988, -0.03399718925356865, 0.02809113636612892, -0.03992193564772606, -0.04493086412549019, 0.02239067293703556, -0.026072612032294273, -0.0035394271835684776, -0.047173671424388885, 0.024334438145160675, 0.0665365532040596, -0.00031393434619531035, -0.03478217124938965, -0.06111644208431244, -0.004803341347724199, 0.023755045607686043, 0.03242722526192665, -0.0637330487370491, -0.010307558812201023, 0.026315581053495407, 0.02683890238404274, -0.01855921372771263, -0.008433882147073746, 0.013297966681420803, 0.016774315387010574, 0.04433278366923332, 0.0061350069008767605, 0.029063018038868904, -0.02487644925713539, -0.04238902032375336, -0.009176811203360558, 0.030483461916446686, -0.018690044060349464, -0.10346808284521103, 0.032333776354789734, -0.0333804190158844, 0.005041639320552349, 0.011073851026594639, 0.009475852362811565, -0.017335016280412674, 0.016447238624095917, -0.03704366832971573, -0.04459444433450699, -0.047173671424388885, 0.09247833490371704, 0.00840584747493267, -0.01996096782386303, 0.051621902734041214, 0.037809960544109344, 0.030315252020955086, -0.04022097587585449, 0.001504548592492938, 0.043398283421993256, -0.021418791264295578, -0.03541763499379158, 0.08126430958509445, 0.03016573190689087, -0.010793500579893589, -0.05491134896874428, -0.03695021569728851, 0.05367780476808548, -0.01748453639447689, 0.01815737783908844, 0.02384849637746811, -0.023998016491532326, -0.0349503830075264, -0.024988587945699692, 0.015269765630364418, 0.005350024905055761, 0.029904071241617203, -0.029063018038868904, -0.006560205481946468, 0.022465432062745094, -0.022409362718462944, 0.054612308740615845, -0.06220046803355217, -0.0005306220264174044, -0.003649231046438217, -0.04354780167341232, -0.05109858140349388, 0.03711842745542526, 0.028334107249975204, 0.003574470989406109, 0.021867351606488228, -0.021044990047812462, 0.04993979632854462, 0.039099570363759995, -0.05356566607952118, -0.030016209930181503, -0.0038361314218491316, 0.009008601307868958, -0.0005414272309280932, 0.014905310235917568, 0.0040931194089353085, -0.03958551213145256, -0.09591730684041977, 0.02407277747988701, -0.0015220704954117537, 0.021044990047812462, 0.03067036159336567, 0.010214108973741531, -0.07580681890249252, 0.015176315791904926, -0.002031374257057905, 0.01871807873249054, -0.028577078133821487, -0.04870625585317612, -0.005466837901622057, -0.024614788591861725, -0.06848032027482986, -0.07576943933963776, 0.013540936633944511, -0.011494376696646214, -0.04848197475075722, 0.01601736806333065, -0.01589588262140751, -0.0005601172451861203, 0.02108236961066723, 0.014054913073778152, -0.02448395825922489, -0.029623718932271004, -0.03969765454530716, 0.002196080284193158, -0.03457657992839813, -0.029231227934360504, 0.06044360250234604, 0.05535991117358208, -0.08216143399477005, -0.012354118749499321, 0.034034568816423416, -0.011494376696646214, 0.006994748953729868, -0.021699141710996628, -0.003511392045766115, 0.04721105098724365, 0.012017698027193546, -0.05633179098367691, 0.012223288416862488, -0.025698810815811157, -0.0034646668937057257, -0.044071123003959656, 0.019213365390896797, -0.02468954771757126, -0.03980979323387146, 0.013475521467626095, 0.07094740867614746, -0.03564191237092018, 0.012998925521969795, -0.026259511709213257, -0.009709477424621582, 0.017671436071395874, -0.08642276376485825, -0.030651671811938286, 0.004072093404829502, -0.12006483972072601, 0.00414685346186161, -0.058499839156866074, 0.027586504817008972, -0.02779209613800049, -0.016101472079753876, -0.061153825372457504, -0.0011021285317838192, 0.04567846655845642, 0.02222246304154396, -0.002328078495338559, 0.04126761853694916, 0.0026516499929130077, 0.024726929143071175, 0.06156500428915024, 0.011008435860276222, -0.013868012465536594, -0.03418409079313278, -0.025698810815811157, -0.010980401188135147, 0.005803258623927832, 0.027081873267889023, 0.033417798578739166, -0.020278697833418846, 0.04201521724462509, -0.03424016013741493, 0.017634056508541107, -0.013821288011968136, -0.007359204813838005, 0.015185660682618618, -0.0008001675014384091, 0.04952861741185188, -0.03771650791168213, -0.002644641324877739, -0.00028443909832276404, 0.024465268477797508, 0.024465268477797508, 0.017905062064528465, 0.002922655548900366, -0.02745567448437214, -0.0006267005228437483, -0.023082204163074493, -0.02351207472383976, -0.030595602467656136, -0.012241979129612446, -0.02068987861275673, 0.024259677156805992, 0.015101555734872818, 0.007289117202162743, -0.04511776566505432, -0.02029738761484623, 0.012830715626478195, -0.016895798966288567, 0.03872577100992203, 0.036445584148168564, 0.0012872767401859164, -0.053827326744794846, 0.027250085026025772, -0.00544347520917654, -0.0716950073838234, 0.02650248259305954, -0.020484289154410362, -0.027025803923606873, -0.06724677979946136, 0.007307806983590126, 0.0011178982676938176, -0.011634552851319313, 0.050612639635801315, -0.07576943933963776, -0.07561992108821869, -0.056369174271821976, 0.015437976457178593, -0.040520016103982925, -0.010419699363410473, 0.009218864142894745, -0.05266854539513588, 0.03141796216368675, 0.016335098072886467, 0.040183596312999725, 0.003999669570475817, -0.0007738846470601857, 0.02125057950615883, -0.053042344748973846, 0.029698479920625687, 0.047397952526807785, 0.02734353393316269, -0.07487231492996216, -0.010606599971652031, 0.038763150572776794, 0.04216473922133446, -0.017017284408211708, -0.03627737611532211, -0.0013748863711953163, -0.007602175232023001, -0.04324876144528389, 0.014503474347293377, 0.006214439403265715, 0.00972816813737154, -0.05939695984125137, -0.03424016013741493, 0.010326249524950981, 0.03078250214457512, -0.04896791651844978, 0.02356814593076706, 0.016821039840579033, -0.011531757190823555, -0.022129012271761894, 0.016092127189040184, -0.019830137491226196, 0.04822031408548355, 0.01226066891103983, 0.04089381545782089, 0.05797651782631874, -0.0005928248283453286, 0.04844459518790245, -0.05479921028017998, -0.015157626010477543, -0.0010495628230273724, 0.05330400541424751, -0.0006757618975825608, -0.03984717279672623, 0.08178763091564178, -0.0062284572049975395, 0.0025068020913749933, -0.0324832983314991, 0.010073933750391006, 0.014652994461357594, 0.032950546592473984, -0.039548132568597794, 0.017456501722335815, -0.030034901574254036, -0.07453589886426926, -0.08776845037937164, -0.003499710699543357, -0.0632844865322113, 0.08006814867258072, 0.040632154792547226, -0.005611685570329428, 0.052631162106990814, 0.07603109627962112, 0.014587579295039177 ]
717,915
pytorch_optimizer.optimizer.sgdp
__str__
null
def __str__(self) -> str: return 'SGDP'
(self) -> str
[ 0.01621083728969097, -0.053669385612010956, 0.01612488366663456, -0.021041424944996834, -0.005135723855346441, -0.050162483006715775, 0.01940830796957016, -0.022158820182085037, 0.10775134712457657, -0.05115954205393791, -0.06333056092262268, -0.005045472644269466, 0.008655521087348461, 0.009669772349298, 0.019219210371375084, 0.02430765889585018, 0.0046114069409668446, -0.07199467718601227, 0.010795763693749905, 0.010924694128334522, 0.002995480550453067, 0.05294737592339516, 0.00871998630464077, -0.009274385869503021, -0.015385682694613934, 0.06659679859876633, 0.017672047019004822, -0.02714412659406662, -0.051778409630060196, -0.006485193967819214, 0.0063562639988958836, -0.04871846362948418, -0.011930350214242935, 0.006429324392229319, -0.03891976177692413, 0.046449288725852966, -0.016030333936214447, -0.009652581997215748, -0.05786391720175743, 0.009712749160826206, -0.016597626730799675, 0.013460323214530945, -0.012033495120704174, -0.034398604184389114, -0.01323684398084879, 0.0037282344419509172, -0.011397439055144787, 0.041188932955265045, 0.014646481722593307, -0.0026559641119092703, 0.007942106574773788, 0.019150447100400925, -0.07378251105546951, -0.011956136673688889, -0.02984306775033474, 0.024823380634188652, 0.05057505890727043, 0.02341374196112156, -0.0011625215411186218, 0.023310597985982895, -0.00806244183331728, -0.021127378568053246, 0.050609439611434937, -0.02356845885515213, -0.020199080929160118, 0.02233072742819786, -0.03333278000354767, 0.025854822248220444, 0.023534078150987625, 0.021247712895274162, 0.039297956973314285, -0.05831087753176689, -0.06477458029985428, 0.029069485142827034, 0.02291521243751049, 0.00719001330435276, -0.03322963789105415, -0.03326401859521866, -0.0022283452562987804, -0.07316365092992783, 0.029430489987134933, -0.008698497898876667, 0.003771211253479123, -0.016288194805383682, 0.005698719527572393, -0.0620240718126297, -0.0060812123119831085, -0.03510342165827751, -0.03168247267603874, 0.019305163994431496, -0.017551710829138756, -0.010202684439718723, -0.020267844200134277, 0.07116952538490295, -0.019941220059990883, 0.006957938428968191, 0.004231062717735767, -0.06807520240545273, -0.02226196601986885, -0.005896412301808596, 0.020302224904298782, 0.025356292724609375, -0.035859815776348114, 0.020817946642637253, -0.02671435847878456, -0.034467365592718124, -0.0044910721480846405, 0.053016141057014465, -0.006584040820598602, -0.003143750596791506, -0.011208340525627136, 0.033590640872716904, 0.032507628202438354, -0.025889204815030098, 0.019511451944708824, -0.035137806087732315, 0.011182554997503757, 0.024170134216547012, 0.02109299786388874, -0.005045472644269466, -0.026611214503645897, 0.020903900265693665, -0.06590916961431503, 0.050815727561712265, 0.008887595497071743, 0.06587478518486023, -0.008131204172968864, 0.004551239777356386, 0.015437254682183266, -0.020921090617775917, 0.05552598461508751, -0.007942106574773788, -0.06872844696044922, -0.009841679595410824, 0.07797704637050629, -0.03151056542992592, 0.059204794466495514, 0.009790107607841492, 0.041773416101932526, 0.126867413520813, -0.01233433187007904, 0.012944602407515049, 0.0022369406651705503, 0.027608275413513184, 0.02597515843808651, 0.04693062976002693, -0.03151056542992592, 0.07364498823881149, -0.015738092362880707, 0.008745771832764149, 0.004319164901971817, 0.031854379922151566, 0.032662343233823776, -0.014792603440582752, -0.006188654340803623, 0.005522514693439007, 0.01035740040242672, -0.03400321677327156, 0.028192758560180664, -0.02662840485572815, -0.024720236659049988, -0.03895414248108864, -0.015789663419127464, -0.020233461633324623, -0.018222149461507797, -0.006283203139901161, -0.006884878035634756, 0.00963539071381092, -0.01437143050134182, 0.010847335681319237, -0.03161371126770973, -0.08450951427221298, -0.08114013820886612, 0.018565963953733444, 0.009506461210548878, 0.027040982618927956, 0.04868408292531967, 0.10665114223957062, 0.01918482966721058, -0.030994843691587448, 0.03802584484219551, 0.00736621767282486, -0.0613020621240139, 0.02961958758533001, 0.03737259656190872, -0.017276659607887268, 0.00685909204185009, 0.03407198190689087, 0.031699664890766144, 0.0003690629964694381, 0.033092111349105835, 0.02262297086417675, -0.03305773064494133, -0.024324849247932434, 0.00434065330773592, -0.04999057576060295, 0.003655174048617482, -0.06033938005566597, -0.04211723059415817, 0.027126934379339218, 0.019287973642349243, 0.03977929428219795, -0.03377974033355713, 0.034398604184389114, 0.04077635705471039, 0.007439278531819582, 0.007529529742896557, -0.024204514920711517, 0.012308546341955662, -0.017182111740112305, 0.027556702494621277, 0.016743747517466545, 0.001917838235385716, 0.01574668660759926, 0.047824546694755554, -0.06546220928430557, 0.017087562009692192, 0.006579743232578039, -0.03716630861163139, -0.00886180903762579, 0.058551546186208725, -0.06731880456209183, 0.0012312843464314938, -0.016013143584132195, -0.04576165974140167, 0.009781512431800365, 0.008045250549912453, -0.039813678711652756, -0.03071979247033596, -0.04270171746611595, 0.015127821825444698, -0.05896412581205368, 0.019219210371375084, 0.03854156285524368, 0.029138248413801193, 0.030410360544919968, -0.0364786796271801, -0.003966755699366331, -0.047240063548088074, -0.01927078142762184, -0.03510342165827751, -0.001682540401816368, -0.012824267148971558, 0.015875617042183876, 0.017620474100112915, -0.004409416113048792, -0.016107691451907158, -0.010761382058262825, 0.006025342736393213, -0.005281844642013311, 0.07309488207101822, -0.08093384653329849, -0.02196972258388996, -0.028725670650601387, -0.010426163673400879, -0.05755448713898659, -0.05435701459646225, 0.048855990171432495, 0.02793489769101143, -0.017259469255805016, -0.07529529929161072, 0.012832862325012684, -0.08877281099557877, 0.04194532334804535, 0.009282981976866722, 0.04187656193971634, -0.018256530165672302, 0.016984418034553528, 0.04187656193971634, -0.018342483788728714, 0.09420507401227951, 0.04655243456363678, -0.05225974693894386, 0.019528642296791077, -0.009282981976866722, -0.024342041462659836, -0.03530971333384514, 0.047102537006139755, -0.05370376631617546, -0.07453890144824982, 0.05332557111978531, -0.03085731901228428, -0.001195828546769917, 0.050678204745054245, -0.0008692051051184535, -0.03524094820022583, 0.027264460921287537, -0.053738150745630264, 0.02955082431435585, 0.027608275413513184, 0.03816336765885353, 0.042289137840270996, 0.005479537881910801, 0.01983807608485222, 0.043148674070835114, 0.05635113641619682, 0.08416569977998734, 0.011148173362016678, -0.029069485142827034, 0.018497200682759285, 0.01411357056349516, -0.02502966858446598, 0.021866578608751297, 0.025631343945860863, -0.031029226258397102, 0.0029116759542375803, 0.0021799965761601925, -0.02203848585486412, 0.02377474680542946, 0.008939167484641075, -0.07990240305662155, 0.03472522646188736, 0.023534078150987625, 0.07158210128545761, 0.0416015088558197, 0.05167526379227638, -0.030118118971586227, -0.0028128293342888355, 0.020766373723745346, 0.056007321923971176, -0.04868408292531967, 0.015153608284890652, -0.04019187390804291, 0.012592192739248276, -0.006158570758998394, 0.005109937395900488, -0.05157212167978287, 0.02253701724112034, 0.03078855574131012, 0.03159651905298233, -0.06673432141542435, -0.053291190415620804, 0.060958247631788254, 0.003754020668566227, 0.0063304780051112175, 0.014440193772315979, 0.055354077368974686, -0.04297676682472229, -0.037613265216350555, -0.05404758080840111, 0.0992247611284256, -0.00417734170332551, -0.03744135797023773, 0.02759108506143093, 0.021729053929448128, 0.018789442256093025, -0.054116345942020416, -0.054253868758678436, 0.021178951486945152, 0.010821550153195858, -0.031115179881453514, -0.004405118525028229, 0.015892809256911278, 0.0467243418097496, 0.043733157217502594, 0.022863639518618584, -0.009867466054856777, 0.06848777830600739, -0.005849137902259827, -0.0009621423669159412, 0.010168302804231644, -0.013193867169320583, 0.0054494538344442844, 0.02080075442790985, -0.014397216960787773, -0.0032404481898993254, 0.011775634251534939, -0.015514613129198551, 0.06879720836877823, -0.01521377544850111, -0.02968835085630417, -0.018858205527067184, -0.034467365592718124, 0.00452115572988987, -0.04765263944864273, 0.08148395270109177, 0.02102423459291458, -0.0019672615453600883, -0.043079912662506104, -0.03658182546496391, 0.01817057654261589, -0.010976266115903854, 0.02867409959435463, 0.0751577690243721, 0.04679310321807861, -0.00923140998929739, 0.005947984755039215, 0.026817502453923225, 0.029791494831442833, -0.04363001510500908, -0.016004547476768494, -0.024531139060854912, 0.03029002621769905, 0.014345644973218441, -0.02802085131406784, -0.08182776719331741, -0.016477292403578758, -0.024410802870988846, -0.041257698088884354, 0.04115455225110054, 0.01949426159262657, -0.04861531779170036, -0.023585649207234383, 0.00022092743893153965, -0.03912604972720146, -0.034175124019384384, 0.016760939732193947, -0.0015697263879701495, -0.03027283400297165, 0.004641490988433361, 0.018548771739006042, -0.01657184213399887, -0.06821272522211075, -0.06632174551486969, 0.035137806087732315, -0.003216810990124941, -0.06123329699039459, 0.0613020621240139, 0.013700993731617928, -0.008492209017276764, -0.010159707628190517, 0.028656907379627228, 0.04500526934862137, 0.03953862562775612, -0.0003376362146809697, 0.011758443899452686, 0.023602839559316635, 0.04830588772892952, 0.05573227256536484, 0.02802085131406784, -0.035137806087732315, 0.03861032798886299, -0.017018800601363182, 0.0056084683164954185, 0.02554539032280445, -0.03561914339661598, 0.008853213861584663, -0.019459880888462067, -0.03974491357803345, 0.006575445178896189, 0.027092553675174713, -0.0613020621240139, -0.02123052254319191, 0.005054067820310593, 0.029378917068243027, -0.04878722503781319, -0.06690622866153717, -0.042220376431941986, 0.04503965005278587, -0.017551710829138756, -0.00985027477145195, 0.0027870433405041695, 0.012557811103761196, -0.018565963953733444, 0.021694671362638474, -0.02896634116768837, 0.04558975622057915, -0.061095770448446274, -0.03596295788884163, -0.0036229414399713278, -0.05813897028565407, 0.03558476269245148, -0.03238729014992714, 0.046655576676130295, 0.015454445034265518, 0.01737980544567108, 0.00047247583279386163, 0.040673211216926575, -0.022898022085428238, 0.003661620430648327, 0.01729385182261467, 0.0009637540206313133, -0.018411247059702873, -0.043595630675554276, -0.007856152951717377, 0.05552598461508751, -0.0554572194814682, -0.007013808470219374, -0.03706316277384758, 0.0059608775191009045, -0.034553319215774536, -0.04968114197254181, -0.0014891449827700853, 0.07962735742330551, -0.017672047019004822, -0.004938030615448952, -0.007976488210260868, 0.02525314874947071, -0.04930294677615166, -0.0011130982311442494, 0.054185107350349426, 0.004276188090443611, -0.059136033058166504, -0.0284506194293499, 0.011758443899452686, 0.06336494535207748, -0.017328232526779175, -0.030032165348529816, -0.04259857162833214, 0.01961459591984749, -0.014663673005998135, -0.005092747043818235, -0.013064936734735966, -0.013804137706756592, 0.06518716365098953, -0.028433429077267647, 0.00026323270867578685, 0.05112516134977341, -0.02145400270819664, -0.014646481722593307, 0.017121944576501846, -0.04032939672470093, 0.019889647141098976, 0.033521879464387894, 0.015437254682183266, 0.002430336084216833, 0.016399934887886047, 0.01152636855840683, -0.02860533632338047, 0.02116175927221775, -0.00006510308594442904, -0.019941220059990883, -0.0342954583466053, -0.008591055870056152, -0.012162424623966217, -0.0010534679749980569, -0.033453114330768585, 0.0017094009090214968, -0.03967615216970444, 0.07715189456939697, 0.050678204745054245, 0.07323241233825684, 0.014938724227249622, 0.06573726236820221, 0.02100704424083233, 0.08560971915721893, -0.09001053869724274, 0.015084845013916492, 0.017474353313446045, -0.0015890659997239709, 0.003887248458340764, -0.05521655082702637, -0.007563910912722349, -0.014500360935926437, 0.016434315592050552, -0.005054067820310593, 0.001580470590852201, 0.0016212984919548035, 0.016382742673158646, -0.025511009618639946, 0.006910664029419422, -0.016546055674552917, -0.018136195838451385, -0.07508900761604309, 0.03946986421942711, 0.07536406069993973, -0.016795320436358452, 0.0547352097928524, 0.0438019223511219, 0.011139578185975552, -0.0627460777759552, -0.04263295233249664, 0.07605168968439102, 0.03603172302246094, -0.0005619212170131505, 0.028278712183237076, -0.036238010972738266, 0.03125270456075668, -0.005651444662362337, -0.05129706859588623, 0.013116509653627872, -0.07570787519216537, 0.018359674140810966, 0.06305551528930664, -0.0722697302699089, 0.023516887798905373, 0.05298175662755966, 0.04583042487502098, -0.03891976177692413, 0.033659402281045914, -0.037028782069683075, 0.03991682082414627, 0.022141629830002785, -0.0037647648714482784, -0.037750791758298874, 0.04473021999001503, -0.010572284460067749, -0.02977430447936058, -0.012996174395084381, -0.04627738147974014, -0.048133980482816696, 0.0046328953467309475, -0.006657101213932037, -0.008599651046097279, 0.008083930239081383, -0.0635024681687355, -0.003481118008494377, -0.004546941723674536, 0.04844341054558754, 0.009824489243328571, -0.004684467799961567, 0.07309488207101822, 0.03450175002217293, 0.026009539142251015, 0.127004936337471, 0.03895414248108864, -0.005501026287674904, 0.019098876044154167, -0.032593581825494766, -0.006884878035634756, -0.026817502453923225, 0.028038043528795242, -0.005930793937295675, 0.004589918535202742, -0.001067972625605762, -0.017964288592338562, 0.03510342165827751, -0.034622084349393845, -0.03678811341524124, -0.01992402970790863, -0.004985305014997721, 0.09131703525781631, -0.029241392388939857, 0.029808685183525085, -0.024703046306967735, 0.045417848974466324, -0.015119226649403572, -0.02379193902015686, 0.02423889748752117, -0.10300671309232712, 0.005251761060208082, -0.00719001330435276, -0.011689680628478527, -0.08230910450220108, -0.04280485957860947, -0.0029310155659914017, 0.006064021959900856, 0.04180780053138733, -0.034622084349393845, 0.05078134685754776, -0.017405590042471886, 0.03830089420080185, -0.023551268503069878, 0.027694229036569595, -0.04627738147974014, 0.012308546341955662, -0.09571785479784012, -0.04435202479362488, -0.030668221414089203, -0.017018800601363182, -0.03823213279247284, -0.0021499127615243196, -0.028209948912262917, -0.00817847903817892, 0.018565963953733444, 0.0010545423720031977, 0.001144256442785263, -0.017843954265117645, -0.0017577498219907284, -0.04263295233249664, -0.0030298621859401464, -0.033659402281045914, 0.028106804937124252, -0.011999113485217094, 0.0416015088558197, 0.03391726315021515, 0.005879221949726343, -0.0350518524646759, -0.01670077256858349, -0.051537737250328064, -0.023534078150987625, 0.015772473067045212, -0.013064936734735966, -0.03558476269245148, -0.03726945072412491, 0.0064980871975421906, 0.01510203629732132, -0.0015041868900880218, 0.034329842776060104, -0.042220376431941986, 0.027316033840179443, -0.03314368426799774, 0.017568903043866158, -0.0788021981716156, -0.002625880530104041, 0.025081241503357887, -0.06123329699039459, -0.007950701750814915, -0.011113791726529598, -0.04699939116835594, -0.07061942666769028, -0.0503343902528286, -0.0313558503985405, 0.01171546708792448, 0.09001053869724274, -0.0004885921371169388, 0.010580879636108875, -0.037819553166627884, 0.008341790176928043, -0.008247241377830505, 0.0035434344317764044, 0.034983087331056595, 0.004271890502423048, 0.027109744027256966, 0.017121944576501846, -0.007232989650219679, -0.00467157457023859, -0.017130538821220398, 0.04338934272527695, -0.014104974456131458, 0.05501026287674904, 0.015170798636972904, -0.036306772381067276, 0.00421172333881259, 0.021643100306391716, -0.06683746725320816, -0.04799645394086838, 0.02764265611767769, -0.015325515531003475, 0.024548329412937164, -0.008616841398179531, -0.01528253871947527, 0.011930350214242935, -0.014182332903146744, 0.0313730388879776, 0.05865469202399254, -0.00015686519327573478, 0.012746908701956272, -0.018290912732481956, -0.013374369591474533, -0.013425941579043865, 0.03946986421942711, -0.046655576676130295, -0.005462347064167261, 0.019666168838739395, 0.03200909495353699, 0.015815449878573418, 0.037097543478012085, 0.051262687891721725, 0.04569289833307266, 0.031029226258397102, 0.04063883051276207, 0.027178507298231125, -0.0591016486287117, 0.008397660218179226, 0.06704375892877579, 0.01918482966721058, 0.01619364507496357, -0.04851217567920685, 0.011698275804519653, 0.08636610954999924, 0.05043753236532211, 0.01911606639623642, 0.00901652593165636, -0.010993457399308681, -0.05160650238394737, 0.0004547479038592428, 0.00824294425547123, -0.008982144296169281, -0.022812068462371826, -0.007817474193871021, -0.03730383515357971, 0.04043254256248474, -0.008990739472210407, 0.015402873046696186, 0.04583042487502098, -0.028364665806293488, -0.006463705562055111 ]
717,936
pytorch_optimizer.optimizer.sgdp
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: 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: state['momentum'] = torch.zeros_like(p) buf = state['momentum'] buf.mul_(momentum).add_(grad, alpha=1.0 - group['dampening']) d_p = buf.clone() if group['nesterov']: d_p = d_p.mul_(momentum).add_(grad) wd_ratio: float = 1.0 if len(p.shape) > 1: d_p, wd_ratio = projection( p, grad, d_p, group['delta'], group['wd_ratio'], group['eps'], ) 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'], ratio=wd_ratio / (1.0 - momentum), ) p.add_(d_p, alpha=-group['lr']) return loss
(self)
[ 0.007049457635730505, 0.013425732031464577, -0.037812020629644394, 0.0528685599565506, -0.010211520828306675, -0.0038352461997419596, -0.02066955901682377, -0.03191455826163292, 0.00012414772936608642, 0.02852019853889942, -0.05924009531736374, -0.006447385530918837, 0.0273065734654665, 0.07672388851642609, -0.015047059394419193, 0.05719210207462311, -0.011738033965229988, 0.05006205290555954, 0.008604414761066437, 0.0004859242762904614, -0.004982501734048128, -0.07524478435516357, -0.006599088665097952, 0.046421173959970474, -0.0609467551112175, -0.02846330963075161, 0.0408460833132267, 0.002908434486016631, -0.026870427653193474, 0.001662809168919921, -0.003830505535006523, -0.03851364552974701, 0.010268409736454487, 0.02472762018442154, 0.04566266015172005, -0.017995789647102356, -0.018811196088790894, 0.02444317564368248, -0.06788717955350876, -0.03618121147155762, -0.025334432721138, -0.013245584443211555, -0.028065089136362076, 0.0376792773604393, 0.016763202846050262, -0.002853916259482503, -0.012041440233588219, 0.045359253883361816, 0.008670785464346409, 0.0012337735388427973, -0.00926811620593071, -0.020195486024022102, 0.04456281289458275, -0.029582122340798378, 0.020536819472908974, 0.08768444508314133, 0.0524134524166584, -0.05609225481748581, 0.03510032594203949, -0.03172492980957031, 0.06910080462694168, -0.05802647024393082, 0.016317574307322502, 0.008334193378686905, -0.00019762894953601062, -0.03170596435666084, -0.04953109100461006, 0.000028259162718313746, 0.031781818717718124, 0.04486621916294098, 0.01210781093686819, 0.02038511633872986, 0.014316988177597523, 0.002986656501889229, -0.04626947268843651, -0.028709828853607178, -0.037546537816524506, -0.06860776990652084, 0.030606117099523544, -0.03073885850608349, -0.01713297888636589, 0.00294636026956141, -0.04915183410048485, 0.021067779511213303, -0.03109915368258953, -0.04308370500802994, -0.012487068772315979, -0.04460073634982109, -0.03159219026565552, -0.02218659035861492, 0.02273651584982872, 0.026965241879224777, 0.0019508082186803222, 0.029525233432650566, 0.05028960481286049, 0.05685076862573624, -0.045055847615003586, -0.01279995683580637, -0.03921527415513992, -0.03335573896765709, 0.034398697316646576, 0.03474003076553345, 0.02527754381299019, 0.0414908230304718, 0.06079505383968353, -0.03138359636068344, -0.0052906484343111515, -0.03743276000022888, 0.019152527675032616, -0.03773616626858711, -0.017170904204249382, -0.002853916259482503, -0.04456281289458275, -0.020328227430582047, -0.03138359636068344, -0.020005857571959496, 0.006267237942665815, 0.009306042455136776, -0.01611846312880516, 0.0425906702876091, 0.020821262151002884, -0.008149305358529091, -0.04752102494239807, -0.020783336833119392, -0.003418062347918749, 0.041528746485710144, 0.038987718522548676, 0.013074918650090694, 0.02996137924492359, -0.03788787126541138, -0.03159219026565552, 0.004712280351668596, 0.009391375817358494, -0.006987827830016613, 0.014810023829340935, -0.020935039967298508, -0.011339813470840454, 0.009201746433973312, 0.0036598392762243748, -0.0017908087465912104, -0.009026339277625084, 0.017900975421071053, -0.004973019938915968, 0.03109915368258953, 0.04145289584994316, 0.0190008245408535, 0.0281788669526577, 0.04080815613269806, -0.0010121447267010808, 0.02330540120601654, 0.0227175522595644, 0.027173833921551704, 0.04604191705584526, 0.03130774572491646, -0.004299837164580822, 0.02931664139032364, -0.01408943347632885, 0.02017652429640293, -0.029278714209794998, -0.02362777106463909, -0.03272996097803116, -0.026263615116477013, -0.01938956417143345, 0.005603536497801542, 0.016905423253774643, -0.003503395477309823, 0.0100503358989954, 0.0524134524166584, -0.03504343703389168, 0.018915491178631783, 0.008177749812602997, -0.02901323512196541, 0.05924009531736374, 0.026244651526212692, -0.014193729497492313, 0.1240932047367096, 0.011140703223645687, 0.0017730309627950191, -0.03345055133104324, -0.009694782085716724, 0.001135403523221612, -0.012477586977183819, -0.010002928785979748, -0.05704039707779884, 0.006148719694465399, 0.03157322481274605, -0.009230190888047218, 0.0032829518895596266, 0.01859312132000923, -0.003664580173790455, 0.004804724361747503, -0.006385756190866232, 0.046724580228328705, 0.006044423673301935, -0.011738033965229988, 0.02360880933701992, 0.023646734654903412, 0.011842329986393452, 0.07133842259645462, 0.005802646744996309, -0.013748100958764553, -0.022319331765174866, 0.016895942389965057, 0.0068598282523453236, -0.03481588140130043, -0.005560869816690683, -0.04077023267745972, 0.07467589527368546, -0.001394958235323429, -0.008813006803393364, -0.04232518747448921, 0.008097157813608646, 0.053665000945329666, 0.0620466023683548, 0.04422147944569588, -0.0913253203034401, -0.007907528430223465, 0.002460435964167118, 0.058822911232709885, -0.02104881778359413, -0.07520685344934464, -0.059164244681596756, 0.03769824281334877, -0.007167975418269634, 0.04035304859280586, -0.02298303321003914, 0.0019105119863525033, -0.05605432763695717, -0.009680559858679771, -0.00229688105173409, -0.004721761681139469, -0.040732305496931076, -0.009908114559948444, -0.013008547946810722, 0.04524547606706619, -0.012837882153689861, -0.06492896378040314, -0.019418008625507355, -0.016744239255785942, -0.012913733720779419, -0.02444317564368248, -0.05605432763695717, -0.03570713847875595, 0.03620017319917679, 0.004124430473893881, 0.03054923005402088, 0.05924009531736374, 0.008656563237309456, -0.008040268905460835, 0.07255204766988754, -0.012164698913693428, -0.03367810696363449, -0.03367810696363449, 0.03443662449717522, -0.03803957253694534, -0.02527754381299019, 0.04714176431298256, 0.02412080578505993, 0.04027719423174858, -0.04247689247131348, 0.014165285043418407, -0.053058188408613205, -0.05704039707779884, 0.06060542166233063, -0.036124322563409805, 0.00654694065451622, 0.018545715138316154, -0.048507094383239746, 0.05119982734322548, 0.03766031563282013, 0.07308301329612732, 0.05609225481748581, -0.03718624264001846, -0.032047297805547714, -0.0025220655370503664, 0.023210586979985237, 0.001461328356526792, 0.02011963538825512, 0.009215968661010265, -0.03075782023370266, 0.07444833964109421, -0.04399392381310463, -0.10247550159692764, -0.014563505537807941, -0.06803888082504272, 0.054499369114637375, -0.01236381009221077, -0.01382395252585411, 0.06242586299777031, 0.0013262176653370261, 0.023931177332997322, 0.0020740670152008533, 0.09200797975063324, -0.0017599939601495862, 0.07346227020025253, -0.001448291353881359, -0.021807333454489708, 0.006584866438060999, -0.018204381689429283, 0.009841743856668472, 0.09572470933198929, -0.03172492980957031, -0.020005857571959496, -0.0025647319853305817, -0.027477240189909935, 0.005963831674307585, 0.0299234539270401, -0.0018346604192629457, -0.002647694665938616, -0.017483793199062347, 0.01264825277030468, -0.022281406447291374, -0.01526513323187828, 0.03510032594203949, 0.005655684508383274, -0.08245068043470383, -0.010277890600264072, -0.05848157778382301, 0.021466000005602837, 0.07046613097190857, -0.012572401203215122, 0.0014245876809582114, 0.03284373879432678, 0.04979657009243965, -0.03396255150437355, -0.00327347032725811, 0.05430974066257477, 0.035517510026693344, -0.033279888331890106, -0.00991759542375803, -0.04865879565477371, -0.00792649108916521, 0.053665000945329666, 0.03456936404109001, -0.05157908424735069, 0.0030648785177618265, 0.05381670594215393, -0.0002837027423083782, 0.03326092287898064, -0.055637143552303314, 0.07403115183115005, 0.01438335794955492, -0.029259752482175827, 0.011140703223645687, 0.0025102137587964535, -0.011870774440467358, 0.01364380493760109, 0.015483206138014793, 0.07934076339006424, -0.01309388130903244, 0.0016876979498192668, 0.01134929433465004, -0.024955173954367638, 0.050668865442276, 0.02357088215649128, 0.04953109100461006, 0.008168268017470837, -0.010941592045128345, 0.0005727387615479529, -0.08017513155937195, 0.008215676061809063, 0.013141288422048092, -0.023134736344218254, 0.0882154032588005, 0.10338572412729263, 0.01037270575761795, -0.02907012403011322, -0.025789542123675346, 0.05146530643105507, -0.030833672732114792, 0.0005668128724209964, -0.02844434790313244, 0.011823367327451706, 0.021162593737244606, -0.03301440551877022, -0.03443662449717522, -0.03881705179810524, -0.01526513323187828, 0.07391738146543503, 0.04691420868039131, 0.028975307941436768, -0.049606941640377045, -0.020555781200528145, 0.028387458994984627, 0.035517510026693344, -0.027989238500595093, 0.038001649081707, -0.05889876186847687, 0.011463072150945663, -0.06272926926612854, 0.05578884854912758, -0.012240550480782986, 0.014791061170399189, 0.025846431031823158, -0.02876671589910984, 0.030075157061219215, 0.0323127806186676, 0.021200520917773247, -0.04683835804462433, -0.028709828853607178, -0.016895942389965057, -0.02679457515478134, -0.03130774572491646, 0.029752787202596664, -0.025713689625263214, -0.08844295889139175, -0.013027511537075043, 0.06705281138420105, 0.028046127408742905, 0.06015031412243843, -0.001297773327678442, 0.007708418183028698, -0.05760928615927696, 0.0026879908982664347, 0.02760997973382473, -0.041832152754068375, -0.028937382623553276, -0.018934454768896103, 0.02470865659415722, -0.0016651795012876391, 0.054499369114637375, -0.0021985110361129045, 0.04027719423174858, 0.008353156968951225, -0.023741548880934715, -0.06071919947862625, -0.00532857421785593, -0.014250618405640125, -0.04035304859280586, 0.016090018674731255, -0.051920413970947266, -0.04205970838665962, -0.01620379649102688, -0.0244621392339468, -0.016876978799700737, 0.012012995779514313, -0.015141874551773071, 0.03054923005402088, 0.046421173959970474, 0.01382395252585411, -0.01297062262892723, 0.037565503269433975, -0.014942764304578304, -0.039291124790906906, -0.01308439951390028, -0.018365567550063133, 0.05025168135762215, -0.03510032594203949, -0.10057920962572098, 0.026320502161979675, -0.010173594579100609, 0.003503395477309823, 0.055675070732831955, -0.007300715893507004, 0.02328643947839737, 0.021750444546341896, -0.06432215124368668, -0.04122534021735191, -0.018640529364347458, 0.00010074039892060682, 0.013738620094954967, -0.01338780578225851, -0.01883963868021965, 0.00883196946233511, -0.023400217294692993, -0.011595812626183033, 0.0493793860077858, 0.04334918409585953, -0.0062719788402318954, -0.0035745063796639442, -0.006106053479015827, -0.024519028142094612, 0.032047297805547714, -0.034645214676856995, 0.002756731351837516, -0.027420351281762123, -0.05688869580626488, -0.005162648856639862, 0.05605432763695717, -0.04164252430200577, -0.01321713998913765, -0.046155694872140884, 0.03430388495326042, 0.02218659035861492, -0.017692383378744125, 0.03197144716978073, 0.012012995779514313, -0.002799397800117731, 0.04824161157011986, 0.06439800560474396, -0.05089641734957695, -0.058254022151231766, 0.07183145731687546, 0.01983519084751606, -0.030283749103546143, -0.028539162129163742, 0.023191625252366066, 0.022888218984007835, 0.08829125761985779, -0.012743067927658558, 0.004558206535875797, 0.0628809705376625, -0.04513169825077057, -0.025410283356904984, -0.003930060658603907, -0.024898285046219826, -0.04577643796801567, -0.009870188310742378, -0.058822911232709885, 0.02702213078737259, 0.022812366485595703, -0.015350466594099998, -0.025258580222725868, 0.014601431787014008, -0.02328643947839737, -0.05605432763695717, 0.039518680423498154, 0.06750791519880295, 0.0489242784678936, -0.04767272621393204, 0.03769824281334877, 0.0015525872586295009, -0.018014753237366676, 0.00853804498910904, -0.028709828853607178, 0.03401944041252136, -0.02303992211818695, -0.017749272286891937, 0.0063336081802845, -0.010533889755606651, -0.008694488555192947, 0.020859187468886375, 0.058291949331760406, 0.07934076339006424, -0.0029819158371537924, -0.07092124223709106, -0.020897114649415016, -0.07387945055961609, -0.1372155398130417, -0.029240788891911507, -0.010552853345870972, -0.022793402895331383, 0.022622738033533096, 0.021409112960100174, -0.007983379997313023, 0.042742371559143066, 0.02214866504073143, -0.011975070461630821, -0.050744716078042984, -0.01279047504067421, -0.05157908424735069, 0.035801950842142105, -0.041870079934597015, 0.04247689247131348, 0.021769408136606216, 0.003017471171915531, -0.01727520115673542, 0.022034887224435806, 0.0037285799626260996, 0.018204381689429283, -0.03821023926138878, -0.0707695335149765, 0.024936212226748466, -0.01873534359037876, 0.005252722650766373, 0.026642872020602226, 0.03299544379115105, -0.02872879058122635, -0.036939725279808044, 0.03219900280237198, 0.0008130342466756701, 0.013198177330195904, 0.0030530267395079136, -0.021674592047929764, -0.004084134008735418, 0.002377473283559084, 0.021143632009625435, -0.04315955564379692, -0.011131221428513527, -0.04725554212927818, 0.019067194312810898, -0.047596875578165054, -0.00511524174362421, -0.008519082330167294, -0.03401944041252136, 0.04403185099363327, -0.09344916045665741, 0.03022686019539833, 0.011453590355813503, 0.03142152354121208, -0.017853569239377975, 0.006433163303881884, -0.07566196471452713, -0.05605432763695717, 0.008447971194982529, -0.014942764304578304, -0.04884842783212662, 0.00197214144282043, 0.026567021384835243, 0.04570058360695839, -0.05237552523612976, -0.0017220681766048074, 0.045283399522304535, 0.04494206979870796, -0.025448208674788475, 0.01723727397620678, -0.036655280739068985, 0.05931594595313072, 0.025087915360927582, -0.0122310696169734, -0.05613017827272415, -0.03887394070625305, 0.010287372395396233, -0.007092123851180077, -0.03921527415513992, -0.024898285046219826, -0.016355499625205994, -0.003759394632652402, 0.04164252430200577, -0.012600845657289028, -0.03536580502986908, 0.0004139245138503611, -0.028918420895934105, -0.02303992211818695, 0.010856259614229202, -0.02842538431286812, 0.055675070732831955, -0.07592744380235672, -0.021996961906552315, -0.058519504964351654, -0.07281752675771713, 0.029127011075615883, 0.012667216360569, -0.028842568397521973, 0.05377877876162529, 0.016327055171132088, 0.04198385775089264, 0.01640290766954422, -0.022224517539143562, -0.0720590129494667, -0.02444317564368248, 0.06712865829467773, 0.01407995168119669, -0.03108019009232521, -0.027154870331287384, -0.007684714626520872, -0.02127637155354023, 0.03851364552974701, 0.03403840214014053, -0.001515846699476242, -0.01960763707756996, 0.05802647024393082, -0.0493793860077858, 0.03876016288995743, 0.04107363894581795, -0.00392769044265151, 0.04145289584994316, 0.011557886376976967, 0.027780646458268166, -0.052527230232954025, -0.005148427095264196, -0.010249446146190166, -0.0018832528730854392, 0.0001244440209120512, -0.027553090825676918, -0.02269858866930008, -0.012932696379721165, -0.03517617657780647, -0.032919593155384064, -0.04141496866941452, -0.07524478435516357, -0.030397526919841766, -0.047027986496686935, 0.006523237098008394, 0.014866912737488747, -0.023760512471199036, 0.02275547757744789, -0.011216554790735245, -0.030264785513281822, 0.0238173995167017, 0.036143284291028976, 0.0270790196955204, -0.016876978799700737, 0.04224933683872223, 0.026225687935948372, 0.004105467349290848, -0.007860121317207813, 0.015625428408384323, 0.001365328673273325, 0.010296854190528393, -0.04918975755572319, -0.012581882998347282, 0.030625080689787865, 0.029449380934238434, 0.009353449568152428, -0.07979587465524673, -0.03477795422077179, -0.0150755038484931, 0.023381253704428673, -0.034341808408498764, 0.006987827830016613, -0.02011963538825512, -0.011500997468829155, -0.01737949624657631, 0.039291124790906906, 0.01700972020626068, 0.05666114017367363, -0.020271338522434235, 0.03415217995643616, 0.028368495404720306, 0.014601431787014008, 0.008770340122282505, -0.033545367419719696, 0.03246448189020157, 0.011112258769571781, -0.0080781951546669, -0.03913942351937294, -0.02762894332408905, -0.03401944041252136, 0.01894393563270569, -0.008353156968951225, -0.04023927077651024, 0.02412080578505993, 0.018052678555250168, -0.02842538431286812, -0.01727520115673542, 0.0517687126994133, 0.01697179488837719, 0.019436970353126526, 0.01037270575761795, 0.009671078063547611, -0.009765892289578915, 0.007234345655888319, -0.0109226293861866, -0.001270514214411378, 0.013738620094954967, 0.05207211896777153, 0.04714176431298256, -0.045283399522304535, 0.01871638000011444, -0.0031075449660420418, 0.05472692474722862, 0.00841478630900383, -0.04232518747448921, 0.026225687935948372, 0.034398697316646576, -0.016090018674731255, -0.026320502161979675, 0.04437318071722984, -0.08700177818536758, 0.08351260423660278, 0.04054267704486847, 0.02391221560537815, 0.030264785513281822, 0.04463866353034973, -0.04661080241203308, 0.025106877088546753, -0.05924009531736374, -0.051351528614759445, -0.06913872808218002, -0.028046127408742905, -0.03163011372089386, 0.07805129140615463, 0.058254022151231766, 0.01066663023084402, 0.03346951678395271, 0.07752032577991486, 0.03246448189020157 ]
717,951
pytorch_optimizer.optimizer.sgd
SGDW
Decoupled Weight Decay Regularization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param dampening: float. dampening for momentum. :param nesterov: bool. enables Nesterov momentum
class SGDW(Optimizer, BaseOptimizer): r"""Decoupled Weight Decay Regularization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. momentum factor. :param weight_decay: float. weight decay (L2 penalty). :param weight_decouple: bool. the optimizer uses decoupled weight decay as in AdamW. :param dampening: float. dampening for momentum. :param nesterov: bool. enables Nesterov momentum """ def __init__( self, params: PARAMETERS, lr: float = 1e-4, momentum: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, dampening: float = 0.0, nesterov: bool = False, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'dampening': dampening, 'nesterov': nesterov, } super().__init__(params, defaults) def __str__(self) -> str: return 'SGDW' @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'] = p.grad.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() for group in self.param_groups: 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'] = grad.clone() if momentum > 0.0: buf = state['momentum_buffer'] buf.mul_(momentum).add_(grad, alpha=1.0 - group['dampening']) if group['nesterov']: grad.add_(buf, alpha=momentum) else: grad = buf self.apply_weight_decay( p, grad, lr=group['lr'], weight_decay=group['weight_decay'], weight_decouple=group['weight_decouple'], fixed_decay=False, ) p.add_(grad, alpha=-group['lr']) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.0001, momentum: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, dampening: float = 0.0, nesterov: bool = False)
[ 0.018287133425474167, -0.02756180800497532, -0.006356308702379465, -0.004965107422322035, -0.021521130576729774, -0.01654873974621296, -0.07225506007671356, -0.02066650055348873, 0.023094424977898598, 0.022142678499221802, -0.05601709336042404, 0.006424290593713522, 0.029659535735845566, 0.04921890050172806, -0.031096868216991425, 0.05290934816002846, -0.012605788186192513, 0.011819140054285526, -0.006176642142236233, -0.010061322711408138, -0.01626710034906864, -0.07594550400972366, 0.010148728266358376, 0.08872610330581665, -0.04513998702168465, -0.0010877104941755533, 0.01381003949791193, -0.012333860620856285, -0.061999499797821045, -0.02392963133752346, -0.0010956013575196266, -0.07000194489955902, -0.011615194380283356, 0.011935681104660034, 0.04712117463350296, -0.03230111673474312, 0.0016315658576786518, 0.023657703772187233, -0.09797164052724838, -0.03197092190384865, 0.04234301671385765, -0.03911873325705528, 0.05558977648615837, -0.023832514882087708, 0.005365714896470308, 0.010420655831694603, -0.003576334100216627, 0.0484808124601841, -0.013693498447537422, -0.006676794495433569, 0.04785926267504692, -0.04886928200721741, 0.0020673784893006086, -0.013887733221054077, -0.019306862726807594, 0.015606704168021679, 0.06398069113492966, 0.019335998222231865, 0.05438552796840668, -0.055784013122320175, 0.03426288068294525, -0.08181136846542358, 0.02280307561159134, 0.006633092183619738, -0.04972391203045845, -0.02315269596874714, -0.07388662546873093, -0.019646771252155304, 0.033330559730529785, 0.023793667554855347, 0.036263491958379745, -0.02470656856894493, 0.0059289936907589436, 0.02542523480951786, -0.047315407544374466, -0.029970310628414154, -0.05823136121034622, -0.07446932792663574, -0.012644635513424873, -0.05189933255314827, 0.03276728093624115, -0.002435208996757865, -0.027717195451259613, -0.03319459408521652, 0.024415217339992523, -0.04851965978741646, -0.006288326811045408, -0.025502927601337433, 0.0002657060686033219, -0.06778767704963684, 0.01045950222760439, 0.013042815029621124, 0.03053358942270279, 0.011158744804561138, 0.08484142273664474, 0.04941313713788986, -0.035564251244068146, -0.04886928200721741, -0.008740531280636787, 0.005725048016756773, 0.016354504972696304, 0.03898276761174202, 0.01088681723922491, 0.0530647374689579, 0.022628264501690865, -0.028824329376220703, -0.04564499482512474, -0.03383556753396988, -0.001074356958270073, -0.06868115067481995, -0.026648908853530884, -0.008570576086640358, -0.008152972906827927, -0.03595271706581116, -0.013839174062013626, 0.012139626778662205, 0.02464829757809639, 0.040284138172864914, 0.009124143049120903, 0.02571658417582512, 0.03859430178999901, 0.025192152708768845, -0.06619495898485184, 0.014849191531538963, 0.020083798095583916, -0.009993340820074081, 0.041099920868873596, 0.01954965479671955, 0.0655345618724823, -0.017927801236510277, -0.01693720743060112, 0.010634313337504864, -0.02686256542801857, 0.002561461180448532, 0.02616332285106182, -0.0035957572981715202, -0.01285829208791256, 0.03873026371002197, -0.004901981446892023, 0.020880157127976418, 0.03923527151346207, 0.018209440633654594, 0.0022688962053507566, 0.031096868216991425, 0.00974083598703146, 0.016985764726996422, 0.0014191223308444023, 0.03933238983154297, 0.017218846827745438, 0.019743889570236206, -0.0020358155015856028, 0.017131440341472626, 0.027833735570311546, 0.02282249741256237, -0.00920183677226305, 0.005011237692087889, -0.04785926267504692, 0.026338133960962296, -0.03964316472411156, 0.011644329875707626, -0.04086684063076973, -0.02544465661048889, -0.03824467957019806, -0.00312716793268919, -0.003908959683030844, -0.01198423933237791, 0.02095785178244114, 0.034068647772073746, -0.026357557624578476, 0.03267016261816025, 0.0169566310942173, -0.052404340356588364, 0.0020746621303260326, 0.03966258838772774, 0.016830379143357277, 0.11016953736543655, 0.022686533629894257, 0.007822775281965733, -0.009420350193977356, -0.04265379160642624, 0.040983378887176514, -0.004311995580792427, -0.040983378887176514, -0.05411360040307045, -0.014499570243060589, 0.03284497559070587, -0.024861956015229225, 0.005239462945610285, -0.006827326025813818, 0.03158245235681534, 0.03142706677317619, -0.015985460951924324, 0.015558145940303802, -0.008410333655774593, -0.01285829208791256, 0.031038597226142883, 0.018559060990810394, -0.008245234377682209, 0.022142678499221802, 0.03199034556746483, 0.018588196486234665, 0.02361885830760002, 0.024123866111040115, 0.0008412761380895972, 0.011624906212091446, -0.013936291448771954, -0.019675906747579575, 0.024182137101888657, -0.03692388907074928, 0.003870113054290414, -0.03134937211871147, 0.014149948954582214, 0.05492938309907913, 0.059862926602363586, 0.06036793440580368, -0.04704347997903824, 0.018889259546995163, 0.03935181349515915, 0.030378201976418495, -0.036574266850948334, -0.0082549462094903, -0.0650295540690422, 0.013518688268959522, 0.024220982566475868, 0.07050695270299911, -0.035136934369802475, 0.0449846014380455, -0.04020644351840019, -0.00995449349284172, -0.021812481805682182, 0.015548434108495712, -0.05924137681722641, 0.017131440341472626, -0.00866283755749464, 0.06704958528280258, -0.012800022028386593, -0.040711451321840286, 0.001067073200829327, 0.015917478129267693, -0.024570604786276817, -0.023444047197699547, -0.02911568060517311, -0.03573906049132347, 0.02136574313044548, 0.008259802125394344, 0.014985155314207077, 0.08445295691490173, 0.0025687450543045998, -0.018180305138230324, 0.04090568423271179, -0.02356058731675148, -0.02427925355732441, -0.03319459408521652, 0.04513998702168465, -0.08235522359609604, -0.00027981839957647026, 0.009522323496639729, 0.024920225143432617, -0.023735398426651955, -0.0671272799372673, -0.037797942757606506, -0.04117761179804802, -0.10721718519926071, 0.04747079685330391, 0.010537195950746536, 0.03756486251950264, 0.04642193391919136, -0.026726601645350456, 0.007871333509683609, 0.03261189162731171, 0.12112434208393097, 0.041760314255952835, -0.05407475307583809, 0.004161464050412178, -0.032883819192647934, 0.017170287668704987, 0.0019059213809669018, 0.0008042502449825406, 0.011877411045134068, -0.00743916304782033, 0.027134492993354797, -0.025172729045152664, -0.03904103860259056, -0.0008315644226968288, -0.02060822956264019, 0.05850328877568245, -0.017743278294801712, -0.029931463301181793, 0.0412941537797451, 0.02694026008248329, 0.03247592970728874, 0.0028333887457847595, 0.12322206795215607, -0.005307444836944342, 0.07435278594493866, 0.015490164048969746, 0.017471350729465485, 0.017121728509664536, 0.004855850711464882, -0.0042148781940341, 0.07847054302692413, 0.0021681373473256826, -0.00828893668949604, 0.022531146183609962, -0.01949138380587101, -0.03927411884069443, 0.010430367663502693, -0.0033578206785023212, 0.025638891384005547, 0.011294708587229252, -0.0324176587164402, -0.03267016261816025, 0.0004998491494916379, 0.020394572988152504, 0.02058880589902401, -0.07882016897201538, -0.02018091455101967, -0.018627043813467026, 0.01625738851726055, 0.07757706940174103, -0.0030081993900239468, 0.02359943464398384, 0.004923832602798939, 0.011654041707515717, -0.05621132627129555, -0.02460945025086403, 0.005788173992186785, 0.021210355684161186, -0.038769111037254333, 0.004763589706271887, -0.03803102299571037, -0.03836122155189514, 0.04036182910203934, 0.017121728509664536, -0.041099920868873596, 0.0018889259081333876, 0.0653403252363205, 0.018889259546995163, -0.018840700387954712, -0.0627375915646553, 0.07287660986185074, 0.03818640857934952, -0.03270900994539261, 0.04304226115345955, -0.03573906049132347, -0.049141209572553635, 0.021074391901493073, 0.008876495063304901, 0.03490385413169861, 0.017218846827745438, 0.009852521121501923, 0.009983628988265991, -0.00866283755749464, 0.08025749772787094, 0.05718249827623367, 0.007478009909391403, -0.008191820234060287, 0.024764837697148323, 0.03705985099077225, -0.07303199172019958, -0.06347568333148956, 0.02204556204378605, -0.02579427883028984, 0.06285413354635239, 0.05158855766057968, -0.011246150359511375, 0.0011077409144490957, -0.03575848415493965, 0.035894449800252914, -0.05349205061793327, -0.016140848398208618, -0.07524625957012177, -0.001466466928832233, 0.0007210938492789865, -0.04389689117670059, -0.02649352140724659, -0.03525347635149956, -0.02167651802301407, 0.038769111037254333, 0.013499264605343342, 0.014334470964968204, -0.005215183831751347, 0.027017952874302864, 0.04265379160642624, 0.061688728630542755, -0.014868614263832569, 0.012149338610470295, 0.0052977330051362514, 0.04296456649899483, -0.07276006788015366, 0.03247592970728874, -0.01734509877860546, 0.004617914091795683, 0.033349983394145966, -0.08173368126153946, 0.03191265091300011, 0.028183357790112495, 0.05065623298287392, -0.08554066717624664, -0.018675601109862328, -0.016354504972696304, -0.03544770926237106, -0.029232220724225044, 0.03465135022997856, -0.024143289774656296, -0.06409722566604614, 0.032883819192647934, 0.08134520798921585, 0.005254030227661133, 0.08577374368906021, -0.02911568060517311, 0.01158605981618166, -0.038807958364486694, 0.023851938545703888, -0.005555093288421631, -0.03915758058428764, -0.02979549951851368, 0.03816698491573334, 0.030999749898910522, 0.03309747949242592, 0.04723771661520004, -0.026746025308966637, 0.06522378325462341, 0.00479272473603487, 0.015140542760491371, -0.027037376537919044, -0.044401898980140686, -0.014266489073634148, -0.045800384134054184, 0.0036855905782431364, -0.0294264554977417, -0.013110796920955181, -0.03358306363224983, -0.013732345774769783, -0.0008892276673577726, -0.01803462952375412, 0.005006382241845131, 0.030125698074698448, 0.020064374431967735, -0.009468908421695232, 0.002028531627729535, -0.02503676526248455, -0.007244929205626249, -0.019986681640148163, -0.02864951826632023, -0.04020644351840019, 0.042109936475753784, -0.008784233592450619, -0.04739310219883919, -0.017811261117458344, 0.04311995208263397, 0.00011562994041014463, 0.02175421081483364, 0.012091068550944328, -0.012537806294858456, 0.010304114781320095, 0.01729653961956501, -0.02835816703736782, -0.01769471913576126, -0.02649352140724659, 0.006531119346618652, 0.0014846763806417584, -0.022686533629894257, 0.02688198909163475, -0.050228919833898544, 0.03455423191189766, 0.055745165795087814, -0.02985377050936222, -0.007526568602770567, 0.007070118561387062, -0.0004130507877562195, -0.02460945025086403, 0.013712922111153603, -0.05858098343014717, -0.026202170178294182, 0.012566941790282726, -0.06976886093616486, -0.011488942429423332, 0.029912039637565613, -0.01581064984202385, 0.029989734292030334, -0.046926941722631454, 0.027095647528767586, 0.05158855766057968, 0.006467992905527353, -0.012528094463050365, 0.012061933055520058, -0.01490746159106493, 0.020511113107204437, 0.04078914597630501, -0.02132689580321312, -0.026221593841910362, 0.06953578442335129, -0.0001304251200053841, -0.029931463301181793, -0.00792960450053215, -0.015888342633843422, 0.0003608503902796656, 0.08647298812866211, 0.002823677146807313, 0.0044018286280334, -0.0013426427030935884, -0.06856460869312286, -0.018908683210611343, 0.04630539193749428, -0.032165154814720154, -0.0560559406876564, 0.03929354250431061, -0.05182163789868355, 0.008895918726921082, -0.003457365557551384, 0.01727711595594883, -0.011916257441043854, 0.04296456649899483, 0.005681345239281654, -0.04447959363460541, -0.00322428485378623, 0.08709453791379929, 0.047975804656744, -0.031776685267686844, 0.05298704281449318, 0.0302228145301342, -0.043275341391563416, -0.007142956368625164, 0.01842309720814228, 0.019229168072342873, -0.013538111932575703, -0.043236494064331055, 0.07287660986185074, 0.013946003280580044, 0.027794888243079185, 0.012479536235332489, 0.006696218159049749, 0.0701184868812561, 0.011857987381517887, -0.042498406022787094, 0.024182137101888657, -0.03606925904750824, -0.08421987295150757, -0.035544827580451965, 0.005399705842137337, 0.0000902125975699164, 0.0298731941729784, -0.012120203115046024, -0.006667083129286766, 0.0745081752538681, -0.004020644351840019, 0.015606704168021679, -0.06704958528280258, -0.01803462952375412, -0.07000194489955902, 0.016791531816124916, -0.038497183471918106, 0.04964621737599373, 0.04346957430243492, -0.014567552134394646, -0.05861983075737953, 0.04607231169939041, 0.010333250276744366, 0.05088931322097778, -0.06837037950754166, -0.06137795373797417, 0.025308692827820778, -0.015363911166787148, -0.0010573614854365587, 0.032165154814720154, 0.03282555192708969, -0.025464080274105072, -0.05415244773030281, 0.0701184868812561, -0.01086739357560873, -0.01508227176964283, 0.017481062561273575, 0.014625822193920612, -0.04743194952607155, 0.02173478715121746, 0.001587863196618855, -0.020122645422816277, -0.0013062237994745374, -0.054735150188207626, 0.015898054465651512, -0.041022226214408875, -0.004452815279364586, -0.01728682778775692, 0.0040716310031712055, 0.023638280108571053, -0.07858708500862122, 0.011896833777427673, -0.010517772287130356, 0.026066206395626068, 0.01687893643975258, 0.0235411636531353, 0.008036432787775993, -0.0412941537797451, 0.0013863453641533852, 0.019248591735959053, -0.07843170315027237, 0.017752990126609802, 0.0815005972981453, 0.05450206622481346, -0.07198312878608704, -0.019297150894999504, 0.058697521686553955, -0.0007083471864461899, 0.019773023203015327, 0.009682565927505493, -0.009046449325978756, 0.001567225786857307, 0.02686256542801857, -0.07209967076778412, -0.02725103311240673, -0.016461333259940147, -0.007575126830488443, -0.006924442946910858, -0.03649657219648361, -0.006948722060769796, -0.0165098924189806, -0.0014069827739149332, 0.0685257613658905, -0.04024529084563255, 0.01877271942794323, 0.0012576653389260173, -0.008886206895112991, -0.01085768174380064, -0.027425844222307205, -0.02829989790916443, 0.03344709798693657, -0.05900829657912254, -0.011702599935233593, -0.029173951596021652, -0.027503538876771927, -0.009104720316827297, 0.03214573115110397, -0.040633756667375565, 0.017558755353093147, 0.018656177446246147, 0.02468714490532875, -0.0036540275905281305, -0.03154360502958298, -0.03387441486120224, 0.01728682778775692, 0.0560559406876564, 0.019015511497855186, -0.005754183046519756, -0.08344294130802155, -0.01987985335290432, 0.025172729045152664, -0.006307750009000301, 0.021424012258648872, 0.03544770926237106, -0.036302339285612106, 0.037370625883340836, -0.045489609241485596, -0.017772413790225983, 0.028144510462880135, -0.011896833777427673, 0.019229168072342873, -0.007138100452721119, 0.051705099642276764, -0.06207719445228577, 0.026415826752781868, -0.0018075903644785285, 0.03595271706581116, 0.01625738851726055, -0.05380282551050186, -0.0010864966316148639, -0.011042204685509205, 0.0017796693136915565, 0.024551181122660637, -0.04261494427919388, -0.07264352589845657, -0.02021976187825203, -0.06161103397607803, 0.0008801229414530098, -0.009075584821403027, -0.009886511601507664, 0.013237048871815205, -0.017383946105837822, -0.038905076682567596, -0.03455423191189766, 0.0565609484910965, 0.010187574662268162, 0.021462859585881233, -0.0015040996950119734, 0.028163934126496315, -0.03383556753396988, -0.057609811425209045, -0.020103221759200096, 0.014334470964968204, -0.010828547179698944, -0.038788534700870514, -0.024803685024380684, 0.01250867173075676, -0.015247371047735214, 0.057221345603466034, -0.08406448364257812, -0.015732957050204277, -0.00976997148245573, 0.005564804654568434, -0.06032908707857132, 0.001341428724117577, -0.0022154818288981915, -0.019025223329663277, -0.002864951966330409, 0.03414634242653847, 0.037681400775909424, 0.014470434747636318, -0.020336301997303963, 0.03911873325705528, -0.008968756534159184, 0.021909598261117935, 0.019986681640148163, 0.004894697573035955, 0.02532811649143696, 0.038866229355335236, -0.02655179053544998, -0.009619439952075481, -0.021851327270269394, -0.014567552134394646, 0.02466772124171257, -0.005584228318184614, -0.001084675663150847, -0.009570881724357605, 0.019452538341283798, -0.03632176294922829, -0.05617247894406319, 0.003022767137736082, -0.010576042346656322, 0.02793085388839245, -0.023424623534083366, 0.022977884858846664, 0.011246150359511375, -0.0017978786490857601, -0.011459807865321636, 0.037720248103141785, 0.03573906049132347, 0.04642193391919136, 0.035583674907684326, -0.02202613838016987, 0.07163351029157639, -0.009983628988265991, 0.08421987295150757, -0.023813091218471527, -0.027017952874302864, -0.004795152693986893, 0.06048447638750076, 0.0013511404395103455, -0.0231915432959795, 0.042109936475753784, -0.0588529109954834, 0.07555703818798065, -0.012430978007614613, 0.020802464336156845, -0.004943255800753832, 0.05931907147169113, -0.06366991251707077, -0.0005095608066767454, -0.0537639781832695, -0.08849301934242249, -0.0948638990521431, 0.021890174597501755, -0.04280918091535568, 0.08592913299798965, 0.01800549402832985, -0.0078033520840108395, 0.017218846827745438, 0.039973363280296326, 0.027134492993354797 ]
717,953
pytorch_optimizer.optimizer.sgd
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-4, momentum: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, dampening: float = 0.0, nesterov: bool = False, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.validate_non_negative(weight_decay, 'weight_decay') defaults: DEFAULTS = { 'lr': lr, 'momentum': momentum, 'weight_decay': weight_decay, 'weight_decouple': weight_decouple, 'dampening': dampening, 'nesterov': nesterov, } super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.0001, momentum: float = 0.0, weight_decay: float = 0.0, weight_decouple: bool = True, dampening: float = 0.0, nesterov: bool = False)
[ 0.0040193707682192326, 0.004375547170639038, 0.0023741177283227444, -0.014869784004986286, -0.024342667311429977, -0.02156873606145382, -0.07631143182516098, -0.021832918748259544, -0.018596665933728218, 0.046798307448625565, -0.042005252093076706, 0.04676056653261185, 0.0282110758125782, 0.08318021148443222, -0.013228069990873337, 0.0506855845451355, 0.01643601804971695, 0.014605600386857986, -0.023738818243145943, 0.00967102125287056, -0.005245939362794161, -0.04102399945259094, -0.010142778046429157, 0.10831543058156967, -0.010737191885709763, 0.02551262453198433, -0.027248691767454147, 0.00044109291047789156, -0.050874289125204086, -0.004507639445364475, 0.0008998767007142305, -0.022342417389154434, -0.01817208342254162, 0.08861485868692398, 0.04928918182849884, -0.016190703958272934, -0.04343939572572708, 0.013624345883727074, -0.09827644377946854, 0.046118974685668945, 0.05181780084967613, -0.032758813351392746, 0.06227193772792816, -0.018341917544603348, -0.014850914478302002, 0.008609567768871784, 0.04238266125321388, 0.034494880586862564, -0.003113596932962537, -0.03215496614575386, 0.007340540643781424, -0.006321545224636793, 0.014096102677285671, -0.03932567313313484, -0.04377906024456024, 0.029399903491139412, 0.06042265146970749, 0.025890029966831207, 0.027494003996253014, 0.00920398160815239, 0.0020545022562146187, -0.046269938349723816, 0.01949300430715084, -0.009213416837155819, -0.02277643419802189, -0.0030617036391049623, -0.09170958399772644, -0.009034148417413235, 0.03255124017596245, 0.0424203984439373, 0.10597551614046097, -0.01059566531330347, -0.004656242672353983, 0.021285681053996086, -0.001872875727713108, -0.0044604637660086155, -0.09933318197727203, -0.04570382833480835, -0.02855074033141136, -0.00010164891864405945, 0.03189077973365784, 0.029701828956604004, -0.03098500706255436, -0.0180305577814579, 0.021134719252586365, -0.0375329963862896, -0.05676181614398956, -0.06883879750967026, 0.005840353202074766, 0.01120894867926836, -0.04860985279083252, 0.0015379282413050532, -0.005028930958360434, -0.044420648366212845, 0.08650138229131699, 0.029739568009972572, 0.0030310393776744604, -0.04385454207658768, 0.014181018806993961, -0.009142653085291386, -0.0239652618765831, 0.014624470844864845, -0.01769089139997959, 0.003066421253606677, 0.021115848794579506, -0.031249191612005234, -0.06517796218395233, -0.009972945787012577, 0.02292739599943161, -0.05423319712281227, -0.04238266125321388, 0.053629349917173386, -0.04325069114565849, 0.014567859470844269, -0.04143914580345154, 0.03251349925994873, 0.0468737855553627, 0.019776057451963425, 0.01181279867887497, 0.012378906831145287, 0.03389102965593338, 0.03708010911941528, -0.046987008303403854, 0.024172835052013397, 0.027418524026870728, -0.028267687186598778, -0.005076106637716293, 0.006194171030074358, 0.03487228602170944, -0.025531494989991188, 0.023550115525722504, -0.010699450969696045, -0.027607226744294167, -0.016596416011452675, 0.0111334677785635, -0.03677818551659584, 0.005043083801865578, 0.05544089525938034, -0.027852540835738182, 0.020134594291448593, 0.055667340755462646, 0.01966283656656742, 0.05268583446741104, 0.015690641477704048, -0.02447475865483284, 0.0074160220101475716, -0.036683835089206696, 0.008246314711868763, 0.010548489168286324, 0.044722575694322586, 0.01095420029014349, 0.028984757140278816, 0.018587229773402214, 0.02719208039343357, 0.028324296697974205, -0.03868408501148224, 0.0091190654784441, -0.033985383808612823, 0.0038684082683175802, 0.018757063895463943, -0.03474019467830658, 0.006255499552935362, 0.017785243690013885, -0.007199013605713844, -0.013860223814845085, -0.003189078066498041, -0.020417647436261177, -0.009095476940274239, -0.0006339236279018223, -0.011341040953993797, 0.006798020098358393, -0.09472882747650146, -0.0121430279687047, 0.027267562225461006, 0.010218258947134018, 0.07144289463758469, 0.014926395379006863, 0.008817140944302082, -0.016898339614272118, -0.006519683171063662, 0.06430993229150772, -0.010237129405140877, -0.014832044020295143, -0.08446339517831802, 0.027248691767454147, 0.017256874591112137, -0.0462321974337101, 0.05215746536850929, -0.04170332849025726, 0.03492889553308487, 0.07268833369016647, 0.0013763513416051865, 0.0009700505761429667, 0.029833920300006866, -0.010350351221859455, 0.02171969786286354, 0.04298650845885277, -0.013916835188865662, 0.002870642114430666, 0.055856041610240936, 0.07736817002296448, 0.04649638012051582, 0.022304676473140717, -0.014615035615861416, 0.018190953880548477, 0.002000250155106187, -0.03728768229484558, 0.021153589710593224, -0.01703043282032013, -0.03147563338279724, 0.006010185461491346, -0.017124783247709274, 0.06570633500814438, 0.0339287705719471, 0.009529493749141693, -0.04740215465426445, -0.004944014362990856, 0.021455513313412666, 0.005245939362794161, -0.03675931319594383, 0.08506724238395691, -0.03353249654173851, 0.000633333926089108, 0.011171208694577217, 0.047666337341070175, 0.011727881617844105, 0.03630642592906952, -0.06917846202850342, -0.0780474990606308, 0.04755311831831932, -0.01530380081385374, -0.05000625550746918, -0.028324296697974205, -0.0007996283238753676, 0.03491002693772316, -0.0023576063103973866, -0.038759563118219376, 0.028871536254882812, -0.08008548617362976, -0.03115483932197094, 0.024021873250603676, 0.016303926706314087, -0.009237004444003105, -0.023738818243145943, 0.025286180898547173, 0.009251156821846962, 0.05404449626803398, 0.015473633073270321, -0.04264684394001961, -0.008675613440573215, -0.022153714671730995, -0.023701077327132225, -0.014869784004986286, 0.060837797820568085, -0.04294876754283905, 0.03804249316453934, 0.025097478181123734, 0.000532201025635004, -0.00024442916037514806, -0.018841980025172234, -0.015643466264009476, -0.014926395379006863, -0.033098477870225906, 0.0861239805817604, 0.012190204113721848, 0.004844945389777422, -0.001362198730930686, -0.02085166424512863, 0.019266560673713684, -0.01198263093829155, 0.12114723026752472, 0.017124783247709274, -0.005222351290285587, 0.0016570468433201313, -0.013322421349585056, -0.03692914545536041, -0.0027550614904612303, -0.038759563118219376, -0.022172585129737854, 0.04238266125321388, 0.011265560053288937, -0.04053337126970291, 0.0014412179589271545, 0.011661835946142673, -0.0003078215231653303, 0.02068183198571205, -0.00611868966370821, 0.0013598399236798286, 0.0059205517172813416, 0.01883254386484623, 0.002724397461861372, 0.00843973457813263, 0.0858975350856781, 0.019181644544005394, 0.08438791334629059, -0.02739965356886387, 0.03830667957663536, 0.010303175076842308, 0.05317646265029907, -0.003139543579891324, 0.06578180938959122, -0.0369102768599987, 0.02975843846797943, -0.01085984893143177, -0.03815571591258049, -0.029531994834542274, 0.029739568009972572, 0.02683354541659355, 0.044420648366212845, 0.035853542387485504, 0.031739819794893265, 0.010812672786414623, 0.0071518379263579845, 0.039967261254787445, 0.02923007123172283, -0.07902875542640686, -0.0027621379122138023, -0.04445838928222656, 0.044420648366212845, 0.054006755352020264, 0.013945139944553375, 0.025946641340851784, 0.014303675852715969, 0.0026017404161393642, -0.0729525238275528, -0.060158468782901764, 0.0242860559374094, 0.03251349925994873, -0.03496663644909859, 0.00975593738257885, -0.02343689277768135, -0.016983255743980408, 0.007000875659286976, -0.024871034547686577, -0.06004524603486061, -0.007241471670567989, 0.013322421349585056, 0.06570633500814438, -0.0035027966368943453, -0.017153088003396988, 0.08257636427879333, -0.008373688906431198, -0.022153714671730995, 0.03879730403423309, -0.013614910654723644, -0.05457286164164543, 0.014303675852715969, -0.025550365447998047, 0.04430742934346199, -0.016662461683154106, -0.013114848174154758, 0.02051199972629547, -0.004495845176279545, 0.08167058974504471, 0.03458923101425171, -0.01301106158643961, -0.020398776978254318, 0.009487035684287548, 0.02500312775373459, -0.05921495333313942, -0.056233447045087814, -0.002962634665891528, -0.025531494989991188, 0.060498133301734924, 0.019908150658011436, -0.009123782627284527, 0.030852915719151497, -0.02483329549431801, 0.030739692971110344, 0.0056893909350037575, -0.002509747864678502, -0.09223794937133789, -0.018775932490825653, -0.01635110192000866, 0.026135344058275223, -0.025965511798858643, -0.03970307856798172, -0.0014883937546983361, 0.060158468782901764, -0.009727631695568562, -0.0019471774576231837, 0.009869159199297428, 0.056912779808044434, 0.018124908208847046, -0.004219867289066315, -0.01102968119084835, 0.0002693438436836004, 0.04547738656401634, 0.044080983847379684, -0.023984132334589958, -0.01549250353127718, 0.0028800771106034517, 0.024399278685450554, -0.012548739090561867, -0.06385704129934311, 0.05868658423423767, 0.019266560673713684, 0.025531494989991188, -0.06627243757247925, -0.03270220384001732, -0.01205811183899641, -0.05778081342577934, -0.00899169035255909, 0.050043996423482895, -0.010133342817425728, -0.0111334677785635, 0.0018068297067657113, 0.04842115193605423, 0.018190953880548477, 0.04449613019824028, 0.015105662867426872, -0.013162023387849331, -0.03238140791654587, 0.0306453425437212, -0.02021007426083088, -0.03951437771320343, 0.0026512749027460814, -0.021681956946849823, 0.044571612030267715, -0.007491502910852432, 0.0282110758125782, -0.01181279867887497, 0.0710654929280281, 0.02294626645743847, 0.06589503586292267, 0.03194739297032356, -0.015794428065419197, 0.02309722825884819, -0.013312986120581627, -0.04238266125321388, -0.056535374373197556, 0.021115848794579506, -0.032928645610809326, -0.04151462763547897, 0.03189077973365784, 0.0012949733063578606, 0.008151963353157043, 0.0065810116939246655, 0.01327524520456791, -0.013916835188865662, -0.0008462143014185131, -0.06355512142181396, 0.01301106158643961, -0.028796054422855377, -0.05506348982453346, -0.011841103434562683, 0.011926019564270973, 0.012190204113721848, -0.04068433493375778, -0.03511760011315346, 0.029362162575125694, 0.0016381766181439161, 0.03272107243537903, -0.01919107884168625, -0.027946891263127327, -0.019398652017116547, -0.02192727103829384, -0.006986722815781832, 0.04913822188973427, -0.026135344058275223, 0.02500312775373459, -0.01427537016570568, -0.020398776978254318, -0.015001876279711723, -0.05378030985593796, 0.030871786177158356, 0.060347169637680054, -0.02892814576625824, -0.005311985034495592, 0.0021276245824992657, 0.011001376435160637, 0.010123907588422298, 0.02683354541659355, -0.03536291420459747, -0.03832554817199707, 0.03579692915081978, -0.03353249654173851, -0.04827018827199936, 0.031909652054309845, -0.02241789735853672, 0.003163131419569254, -0.04230717942118645, 0.031739819794893265, 0.06868783384561539, 0.009402119554579258, -0.02341802418231964, -0.06593277305364609, -0.005151587538421154, 0.030739692971110344, 0.03130580112338066, -0.06483829766511917, -0.01607748307287693, 0.04189203307032585, 0.022474508732557297, -0.02054974064230919, -0.00863315537571907, 0.008986973203718662, 0.014681081287562847, 0.05781855061650276, 0.025040868669748306, 0.02104036696255207, -0.003696216968819499, -0.039438895881175995, -0.013888529501855373, 0.02655049040913582, -0.01282235886901617, -0.0948043093085289, 0.03289090469479561, -0.03649513050913811, 0.002290380885824561, 0.011652400717139244, 0.024531370028853416, -0.010142778046429157, 0.025625847280025482, -0.04223169758915901, -0.043363913893699646, -0.04721345379948616, 0.09948413819074631, 0.023002877831459045, -0.023361412808299065, 0.06136616691946983, 0.04604349285364151, 0.024172835052013397, -0.04332617297768593, 0.006925394292920828, 0.04351487755775452, -0.01216189842671156, -0.04094851762056351, 0.0769907608628273, 0.037891533225774765, -0.00873694196343422, -0.04291102662682533, -0.0468737855553627, 0.06053587421774864, -0.02036103792488575, 0.01567177101969719, 0.02906023897230625, -0.013718697242438793, -0.03913697227835655, -0.03426843881607056, 0.016737941652536392, 0.00865202583372593, 0.039627596735954285, -0.016917210072278976, -0.0030876502860337496, 0.015039617195725441, -0.03443827107548714, 0.06227193772792816, -0.06378155946731567, -0.0013775307452306151, -0.006831042934209108, -0.038231197744607925, -0.05846014246344566, 0.03162659704685211, 0.026588231325149536, -0.005269526969641447, 0.0071518379263579845, -0.020153464749455452, 0.05128943547606468, 0.05000625550746918, -0.04694926738739014, -0.02856961078941822, -0.014501813799142838, 0.0076613356359303, 0.0036749879363924265, 0.02017233520746231, -0.009251156821846962, -0.05000625550746918, -0.09571008384227753, 0.020813923329114914, 0.003750469069927931, 0.001984918024390936, 0.019417522475123405, 0.020908275619149208, -0.06110198050737381, 0.02466346137225628, -0.0013492254074662924, 0.021115848794579506, -0.016275620087981224, -0.045590609312057495, -0.013209199532866478, -0.027418524026870728, -0.07476406544446945, -0.06974457204341888, 0.0073735639452934265, -0.01325637474656105, -0.05887528881430626, 0.0012725648703053594, -0.008713354356586933, 0.006364003289490938, 0.02432379685342312, 0.005538428667932749, -0.01915333978831768, -0.02806011401116848, -0.0309661366045475, 0.004446310922503471, -0.04672282561659813, -0.022682081907987595, 0.06853687763214111, 0.05136491358280182, -0.08129318803548813, -0.008317077532410622, 0.03026793710887432, -0.014360286295413971, 0.002679580356925726, -0.01889858953654766, -0.01522831991314888, 0.04755311831831932, 0.010237129405140877, -0.052610352635383606, 0.0026347634848207235, -0.03494776785373688, -0.01913446933031082, -0.033475883305072784, 0.01325637474656105, -0.02462572231888771, -0.03658948093652725, 0.026909025385975838, 0.07438666373491287, -0.03574031963944435, 0.008274619467556477, -0.020077982917428017, -0.001945998053997755, 0.029003627598285675, -0.09133217483758926, -0.02587115950882435, 0.005892246495932341, -0.11208949238061905, 0.0017643716419115663, -0.0475153774023056, 0.014435768127441406, -0.03813684359192848, -0.01743614301085472, -0.06276256591081619, 0.007916084490716457, 0.020474258810281754, 0.021455513313412666, -0.0018705169204622507, 0.044722575694322586, -0.004212791100144386, 0.006689515896141529, 0.06434766948223114, 0.008001000620424747, -0.01307710725814104, -0.04162784665822983, -0.024172835052013397, -0.01614352874457836, 0.011057986877858639, 0.0364762619137764, 0.025191830471158028, -0.019011812284588814, 0.03913697227835655, -0.035702578723430634, 0.020983757451176643, -0.016511499881744385, -0.011661835946142673, 0.016568109393119812, 0.0017914976924657822, 0.053629349917173386, -0.043363913893699646, -0.0031183145474642515, 0.003561766352504492, 0.03383442014455795, 0.04192977398633957, 0.017992816865444183, 0.002894229954108596, -0.041137222200632095, -0.005415771622210741, -0.01694551482796669, -0.025739068165421486, -0.03683479502797127, -0.009633280336856842, -0.017766373232007027, 0.02581454999744892, 0.02666371315717697, 0.004078340250998735, -0.05506348982453346, -0.017398402094841003, -0.0008851342718116939, -0.022455638274550438, 0.05932817608118057, 0.02379542961716652, 0.015832168981432915, -0.044231947511434555, 0.01849287934601307, -0.01085984893143177, -0.07842490077018738, 0.02275756374001503, -0.018860850483179092, -0.02943764440715313, -0.05970558151602745, -0.0030923679005354643, 0.0035452547017484903, -0.010180518962442875, 0.04876081645488739, -0.0657440721988678, -0.07751912623643875, -0.04777956008911133, -3.270972115387849e-7, -0.03164546564221382, -0.02051199972629547, 0.007411304395645857, -0.062045495957136154, 0.04034467041492462, -0.000060775586462114006, 0.040835294872522354, 0.006571576464921236, -0.005599757190793753, 0.02088940516114235, -0.052081987261772156, 0.031551115214824677, 0.03013584390282631, 0.0237576887011528, -0.06483829766511917, -0.0025852289982140064, 0.040646594017744064, 0.04691152647137642, -0.017992816865444183, -0.03804249316453934, -0.005222351290285587, -0.001477779122069478, -0.04604349285364151, -0.00021966190251987427, 0.013860223814845085, 0.016483193263411522, -0.06774432212114334, -0.037419773638248444, 0.01198263093829155, 0.037382032722234726, -0.04208073392510414, 0.02517296001315117, 0.0030522686429321766, -0.003825950203463435, -0.0155868548899889, 0.022889655083417892, -0.011605225503444672, 0.048006005585193634, 0.026588231325149536, 0.04215621575713158, 0.0574788860976696, 0.004557173699140549, 0.05370483174920082, -0.054497383534908295, -0.017379531636834145, 0.009444577619433403, 0.06102650240063667, 0.00040689052548259497, -0.047968264669179916, 0.07925519347190857, -0.003486284986138344, -0.0011870588641613722, -0.027267562225461006, 0.016643591225147247, 0.01299219112843275, 0.039099231362342834, -0.039929524064064026, 0.012029806151986122, -0.033457014709711075, -0.07725494354963303, -0.09201151132583618, -0.009298332966864109, -0.06698951125144958, 0.07491502910852432, 0.01825699955224991, 0.0007896034512668848, 0.04600575566291809, 0.07555662095546722, 0.02087053470313549 ]
717,956
pytorch_optimizer.optimizer.sgd
__str__
null
def __str__(self) -> str: return 'SGDW'
(self) -> str
[ 0.013899211771786213, -0.05580507591366768, 0.0167536698281765, -0.010012291371822357, -0.011955751106142998, -0.06656351685523987, 0.012753957882523537, 0.0067153493873775005, 0.11508060991764069, -0.06437712162733078, -0.06691056489944458, 0.0006935506826266646, -0.0015844841254875064, 0.007960379123687744, 0.02016340009868145, 0.01401200145483017, -0.011079458519816399, -0.07343503832817078, 0.009422311559319496, 0.015669148415327072, -0.003921625204384327, 0.036058127880096436, 0.03584990277886391, -0.0016148507129400969, -0.026444941759109497, 0.07253271341323853, -0.0037242425605654716, -0.020614560693502426, -0.02654905617237091, -0.013101004995405674, 0.020736027508974075, -0.058720264583826065, -0.010732412338256836, -1.5251066542987246e-7, -0.02524763159453869, 0.0199204683303833, -0.02790253795683384, -0.0034162388183176517, -0.04646952450275421, 0.004197093192487955, -0.019434602931141853, 0.020701322704553604, -0.0025507917162030935, -0.038522157818078995, -0.02031957171857357, -0.005778323858976364, 0.0014684404013678432, 0.043519627302885056, 0.012276769615709782, -0.003366350894793868, 0.020527798682451248, 0.0108972592279315, -0.07308799028396606, -0.02389414981007576, -0.02254066988825798, 0.004275179002434015, 0.03945918381214142, 0.0052273874171078205, -0.0035377051681280136, 0.02568143978714943, -0.014862265437841415, -0.030470680445432663, 0.04803123325109482, -0.010845202952623367, -0.031182127073407173, 0.015530330128967762, -0.017907598987221718, 0.03520786389708519, 0.043241992592811584, 0.03557226434350014, 0.05111994594335556, -0.05826910585165024, -0.029186608269810677, 0.029429541900753975, 0.006871520541608334, -0.005101583432406187, -0.07260212302207947, -0.02068397030234337, 0.010992697440087795, -0.06663292646408081, 0.039077434688806534, -0.010723736137151718, -0.03231002762913704, -0.00776950316503644, -0.018393464386463165, -0.06795170158147812, -0.009144674986600876, -0.039979755878448486, -0.045185450464487076, 0.01101004984229803, -0.01682307757437229, 0.008641457185149193, -0.031025955453515053, 0.0574708990752697, -0.021794518455863, 0.0024184801150113344, 0.009725977666676044, -0.0602472685277462, 0.003912949003279209, 0.019660182297229767, 0.021846575662493706, 0.016771020367741585, -0.026045838370919228, 0.03524256870150566, -0.05365338549017906, -0.033802326768636703, -0.02543850801885128, 0.030175691470503807, -0.017751427367329597, -0.0038869206327944994, -0.016580145806074142, 0.018827270716428757, 0.03231002762913704, -0.011929722502827644, 0.012623815797269344, -0.055666256695985794, 0.005405249074101448, 0.025698792189359665, 0.030227748677134514, -0.029429541900753975, 0.007890969514846802, 0.0019239389803260565, -0.07055454701185226, 0.020232809707522392, 0.037481021136045456, 0.07794664055109024, -0.039146844297647476, -0.0038261874578893185, 0.04650422930717468, -0.03626635670661926, 0.05368809029459953, 0.0034097316674888134, -0.06212132051587105, -0.01627648063004017, 0.08058419078588486, -0.01492299884557724, 0.0400838702917099, 0.01662352681159973, 0.041020892560482025, 0.14381606876850128, -0.010550213046371937, 0.007400766015052795, 0.02873544953763485, 0.03845275193452835, 0.0041493745520710945, 0.04522015526890755, -0.0185322817414999, 0.07426794618368149, -0.009326874278485775, 0.011305038817226887, 0.025785554200410843, 0.047649480402469635, 0.03291735798120499, 0.006680644582957029, -0.03314293920993805, -0.00394765380769968, 0.00250090379267931, -0.033472634851932526, 0.040777962654829025, -0.02639288455247879, -0.005027835723012686, -0.04469958692789078, -0.019035499542951584, -0.019035499542951584, -0.010116404853761196, 0.025490563362836838, -0.012190007604658604, 0.025577325373888016, 0.015035788528621197, -0.00126238155644387, -0.031893569976091385, -0.04369315132498741, -0.09293904900550842, 0.048447687178850174, 0.015478272922337055, 0.043346107006073, 0.021915985271334648, 0.08197237551212311, 0.021482177078723907, -0.05243872478604317, 0.010827850550413132, -0.001201648497954011, -0.04723302647471428, 0.03394114598631859, 0.059830814599990845, -0.019833706319332123, 0.0005436157807707787, 0.0431031733751297, 0.048655916005373, -0.008506976999342442, 0.007379075977951288, 0.020805437117815018, -0.04799652844667435, -0.01068035513162613, -0.00031207071151584387, -0.03491287678480148, -0.004181910306215286, -0.07628081738948822, -0.042999058961868286, 0.012571758590638638, -0.004251319449394941, 0.04758007451891899, -0.031529173254966736, 0.019816353917121887, 0.04834357649087906, 0.005405249074101448, 0.027416672557592392, -0.0185322817414999, 0.003847877960652113, -0.018271997570991516, 0.025143517181277275, 0.018324054777622223, -0.019347840920090675, 0.022436555474996567, 0.07055454701185226, -0.08509580045938492, 0.009812739677727222, -0.005899790208786726, -0.03862627223134041, 0.0010443930514156818, 0.055388618260622025, -0.03810570389032364, -0.014020677655935287, -0.03258766606450081, -0.05139758437871933, 0.00425782660022378, 0.0062988935969769955, -0.038834501057863235, -0.0202848669141531, -0.03598872199654579, -0.005522377323359251, -0.06184368208050728, 0.009378931485116482, 0.037481021136045456, 0.02241920307278633, 0.041055597364902496, -0.046781864017248154, -0.01988576352596283, -0.04088207706809044, -0.04060443863272667, -0.02734726294875145, -0.0025594679173082113, -0.0011024147970601916, 0.018757862970232964, 0.036335766315460205, -0.022315088659524918, -0.015313426032662392, 0.01618971861898899, -0.008450581692159176, -0.01846287213265896, 0.06267659366130829, -0.05931024253368378, -0.018185235559940338, -0.009144674986600876, -0.02491793781518936, -0.05351456627249718, -0.03336852043867111, 0.04053502902388573, 0.014367724768817425, -0.021499529480934143, -0.0764196366071701, 0.006246836856007576, -0.05306340754032135, 0.03267442807555199, -0.014480514451861382, 0.02873544953763485, -0.02127395011484623, 0.027277853339910507, 0.03281324356794357, -0.00763936061412096, 0.10453040152788162, 0.03144241124391556, -0.058997903019189835, 0.0246923565864563, -0.02333887666463852, -0.017413057386875153, -0.016293833032250404, 0.04473429173231125, -0.061184294521808624, -0.06191309168934822, 0.01972959190607071, -0.020493093878030777, -0.001979249529540539, 0.03904272988438606, 0.017994360998272896, -0.05691562220454216, 0.028388401493430138, -0.04719832167029381, 0.03505169600248337, 0.013717012479901314, 0.042999058961868286, 0.015599739737808704, 0.003440098138526082, 0.010879906825721264, 0.042166147381067276, 0.030574794858694077, 0.06472416967153549, 0.02679198794066906, -0.02198539488017559, 0.01111416332423687, -0.014272286556661129, -0.004845636431127787, 0.00635962700471282, 0.014098763465881348, -0.028232231736183167, -0.0073226806707680225, -0.01043742336332798, -0.029117200523614883, 0.01623309962451458, 0.006810787133872509, -0.07055454701185226, 0.028683392331004143, 0.030887136235833168, 0.07711372524499893, 0.028405753895640373, 0.07239389419555664, -0.030887136235833168, 0.012554406188428402, 0.01948666013777256, 0.0764196366071701, -0.03119947947561741, 0.0013317909324541688, -0.03820981830358505, 0.013925240375101566, 0.007778179366141558, -0.011955751106142998, -0.05549273267388344, 0.040777962654829025, 0.02849251590669155, 0.03970211744308472, -0.05934494733810425, -0.07440676540136337, 0.05754030495882034, -0.010610946454107761, 0.0033446603920310736, -0.002995444927364588, 0.050981126725673676, -0.02734726294875145, -0.0423743762075901, -0.053167521953582764, 0.09342491626739502, 0.012224712409079075, -0.02592437155544758, 0.027833128347992897, 0.023980911821126938, 0.01395126897841692, -0.05087701603770256, -0.036648109555244446, 0.013205118477344513, 0.010741088539361954, -0.00855035800486803, -0.023807387799024582, 0.028995733708143234, 0.017603931948542595, 0.04615718126296997, 0.01868845336139202, -0.0014716939767822623, 0.06635528802871704, -0.014081411063671112, 0.004262164700776339, -0.005717590916901827, -0.047927118837833405, 0.0035377051681280136, 0.01238088309764862, -0.008810642175376415, -0.0006376979290507734, 0.0003302364202681929, -0.023980911821126938, 0.054035138338804245, -0.0368216335773468, -0.028596630319952965, -0.0005490384064614773, -0.034947581589221954, -0.008316101506352425, -0.027399320155382156, 0.07260212302207947, 0.024432072415947914, 0.010255223140120506, -0.05198756232857704, -0.030470680445432663, 0.03446171432733536, -0.0038370327092707157, 0.013526136986911297, 0.06913165748119354, 0.04109030216932297, -0.00583471916615963, 0.010038319043815136, 0.029793940484523773, 0.012033836916089058, -0.02710432931780815, -0.0137950973585248, -0.029620416462421417, 0.01905285194516182, 0.004732846282422543, -0.033125586807727814, -0.07204684615135193, -0.03191092237830162, -0.015695177018642426, -0.042409081012010574, 0.05382690951228142, 0.014280962757766247, -0.03699515387415886, -0.0076306844130158424, 0.01173017080873251, -0.051779333502054214, 0.0038457089103758335, 0.0008855108171701431, 0.0027373291086405516, -0.03095654584467411, 0.007084086537361145, 0.002674426883459091, -0.01972959190607071, -0.06521003693342209, -0.06913165748119354, 0.053167521953582764, -0.0031711373012512922, -0.03397585079073906, 0.049558237195014954, -0.0007304244209080935, 0.001703781308606267, -0.038244523108005524, 0.03465259075164795, 0.04615718126296997, 0.06958281993865967, 0.0007396428263746202, 0.012129274196922779, 0.03144241124391556, 0.05025232955813408, 0.0764196366071701, 0.014862265437841415, -0.04803123325109482, 0.02377268485724926, -0.04164557904005051, 0.002135420450940728, 0.029082495719194412, -0.03897332027554512, 0.015807967633008957, -0.03420143201947212, -0.04119441658258438, 0.0228183064609766, 0.014046706259250641, -0.05972670018672943, -0.017213504761457443, 0.020666617900133133, 0.023321524262428284, -0.04810064285993576, -0.07163039594888687, -0.020649265497922897, 0.06413418799638748, 0.0021798857487738132, 0.010107728652656078, 0.03243149444460869, -0.017048658803105354, -0.02948159910738468, 0.032726481556892395, -0.029898054897785187, 0.03213650360703468, -0.0700339823961258, -0.014549924060702324, -0.01908755674958229, -0.07267153263092041, 0.042999058961868286, -0.03626635670661926, 0.039355069398880005, 0.012788662686944008, 0.01564311981201172, -0.01068035513162613, 0.030470680445432663, -0.029585711658000946, 0.002706962637603283, 0.02774636633694172, -0.008142578415572643, -0.016528088599443436, -0.043484922498464584, 0.015964137390255928, 0.04900296404957771, -0.05691562220454216, -0.012441616505384445, -0.01009905245155096, -0.014593304134905338, -0.04306846857070923, -0.03329911082983017, -0.0032427154947072268, 0.06760465353727341, -0.006121032405644655, 0.0031689682509750128, 0.0014695249265059829, 0.012840719893574715, -0.03737690672278404, 0.01325717568397522, 0.053202226758003235, 0.0216730535030365, -0.06989516317844391, -0.03817511349916458, -0.009968910366296768, 0.05247342959046364, -0.027867833152413368, -0.023790037259459496, -0.06892342865467072, 0.02864868752658367, 0.0008665316854603589, -0.014879617840051651, -0.012545729987323284, -0.007691417820751667, 0.05021762475371361, -0.037446316331624985, 0.015348130837082863, 0.028128117322921753, -0.008342130109667778, -0.037689246237277985, 0.010446099564433098, -0.04303376376628876, 0.032084446400403976, 0.008225001394748688, 0.020336924120783806, -0.0008529751794412732, 0.005960523150861263, 0.019504012539982796, -0.010125081054866314, 0.04067384824156761, -0.006559178698807955, -0.036370471119880676, -0.03956329822540283, -0.014289638958871365, -0.017959656193852425, 0.008867037482559681, -0.01242426410317421, 0.018202587962150574, -0.028561925515532494, 0.0884968563914299, 0.005509363021701574, 0.059518471360206604, 0.004867326933890581, 0.05608271062374115, 0.006468078587204218, 0.08912153542041779, -0.08197237551212311, 0.006880196277052164, 0.01173017080873251, 0.024831175804138184, 0.009222759865224361, -0.05250813439488411, 0.011842961423099041, -0.02627141959965229, 0.004515942186117172, -0.011539295315742493, 0.00025920034386217594, -0.001626780373044312, 0.010333308950066566, -0.011313715018332005, 0.0007629600004293025, -0.02965512126684189, -0.005708914715796709, -0.06101077049970627, 0.02540380321443081, 0.048482391983270645, -0.01710071600973606, 0.03817511349916458, 0.028128117322921753, 0.027971945703029633, -0.054868049919605255, -0.027538137510418892, 0.07982069253921509, 0.030592147260904312, 0.00782155990600586, 0.044074904173612595, -0.01686645857989788, 0.024102378636598587, -0.0034466052893549204, -0.044317834079265594, -0.007426794618368149, -0.048239462077617645, 0.04275612533092499, 0.05719326063990593, -0.08696984499692917, 0.04254790022969246, 0.04275612533092499, 0.03298676759004593, -0.028787504881620407, 0.01917431876063347, -0.028440458700060844, 0.04199262335896492, 0.01706601120531559, -0.00861542858183384, -0.02750343456864357, 0.01658882200717926, -0.020822789520025253, -0.021013664081692696, -0.014124792069196701, -0.048274166882038116, -0.022488612681627274, 0.017361000180244446, -0.02158629149198532, -0.009040560573339462, 0.03890391066670418, -0.06573060154914856, -0.0005373797612264752, -0.014029353857040405, 0.04428312927484512, 0.000785192649345845, 0.018705805763602257, 0.06257247924804688, 0.025698792189359665, 0.04338081181049347, 0.11424770206212997, 0.053202226758003235, 0.015053140930831432, 0.02151688188314438, -0.033472634851932526, -0.012077217921614647, -0.01706601120531559, 0.009934205561876297, 0.002509579760953784, -0.0006881281151436269, -0.004353264346718788, -0.024640299379825592, 0.04605306684970856, -0.040222685784101486, -0.03702985867857933, -0.010107728652656078, 0.012181331403553486, 0.08363819867372513, -0.04272142052650452, 0.0377933606505394, -0.03099125064909458, 0.024310605600476265, 0.008220663294196129, 0.009474368765950203, 0.028596630319952965, -0.10078229755163193, 0.004145036451518536, 0.0018187405075877905, -0.0007624177378602326, -0.08412406593561172, -0.040777962654829025, 0.012111921794712543, 0.0017721060430631042, 0.04525486007332802, -0.031373001635074615, 0.0488988496363163, 0.001444580964744091, 0.04084737226366997, -0.017907598987221718, 0.0546945258975029, -0.07100570946931839, 0.023165352642536163, -0.07635022699832916, -0.07024221122264862, -0.04504663497209549, -0.035138458013534546, -0.042964354157447815, 0.0037177354097366333, -0.032205913215875626, -0.0012439447455108166, 0.011461210437119007, -0.004320728592574596, 0.007717445958405733, -0.029707178473472595, 0.0011105487355962396, -0.030730966478586197, 0.0030496709514409304, -0.036370471119880676, 0.004915045574307442, -0.03458318114280701, 0.055666256695985794, 0.02984599769115448, 0.004724170081317425, -0.02238449826836586, 0.0030930517241358757, -0.05743619427084923, -0.021100426092743874, 0.008146916516125202, -0.016250452026724815, -0.0551803894340992, -0.03675222396850586, 0.003388041164726019, 0.030783023685216904, 0.0114091532304883, 0.06427300721406937, -0.053479861468076706, 0.03293471038341522, -0.02484852820634842, 0.0019196008797734976, -0.0829441100358963, 0.0082553680986166, 0.0395980030298233, -0.07322680950164795, -0.011400477029383183, 0.026896102353930473, -0.05934494733810425, -0.06722290068864822, -0.0650712177157402, -0.04591425135731697, 0.014827560633420944, 0.08808039873838425, 0.005444291513413191, 0.023269467055797577, -0.029377484694123268, -0.0002982430742122233, -0.002105053747072816, 0.008919094689190388, 0.05025232955813408, -0.00023737437732052058, 0.007916998118162155, 0.02790253795683384, -0.02472706139087677, -0.013717012479901314, -0.0016799218719825149, 0.05160581320524216, -0.013109681196510792, 0.07010339200496674, 0.031373001635074615, -0.04338081181049347, 0.009361579082906246, 0.02651435136795044, -0.08683103322982788, -0.04317258298397064, 0.028006650507450104, -0.0022601401433348656, 0.03567637875676155, 0.001379509805701673, -0.009734653867781162, -0.00952642597258091, -0.00421661464497447, 0.036648109555244446, 0.060663726180791855, -0.0108972592279315, -0.004123345948755741, -0.03987564146518707, -0.0038131731562316418, -0.0024098039139062166, 0.030696261674165726, -0.03416672721505165, 0.02127395011484623, 0.03416672721505165, 0.01682307757437229, 0.025473210960626602, 0.026739930734038353, 0.03970211744308472, 0.046851273626089096, 0.03420143201947212, 0.041298530995845795, 0.02096160687506199, -0.040812667459249496, -0.00882799457758665, 0.06951341032981873, 0.04251319542527199, 0.02278360165655613, -0.042652010917663574, 0.015053140930831432, 0.08259706199169159, 0.055909186601638794, 0.01202516071498394, 0.011487238109111786, -0.004754536785185337, -0.03834863752126694, -0.016658231616020203, 0.0115913525223732, -0.008710866793990135, -0.005431277211755514, 0.0009863711893558502, -0.04251319542527199, 0.028544573113322258, 0.0072923144325613976, -0.006363964639604092, 0.051293469965457916, -0.015695177018642426, 0.0033598437439650297 ]
717,992
pytorch_optimizer.optimizer.sm3
SM3
Memory-Efficient Adaptive Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. coefficient used to scale prior updates before adding. This drastically increases memory usage if `momentum > 0.0`. This is ignored if the parameter's gradient is sparse. :param beta: float. coefficient used for exponential moving averages. :param eps: float. term added to the denominator to improve numerical stability.
class SM3(Optimizer, BaseOptimizer): r"""Memory-Efficient Adaptive Optimization. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param momentum: float. coefficient used to scale prior updates before adding. This drastically increases memory usage if `momentum > 0.0`. This is ignored if the parameter's gradient is sparse. :param beta: float. coefficient used for exponential moving averages. :param eps: float. term added to the denominator to improve numerical stability. """ def __init__( self, params: PARAMETERS, lr: float = 1e-1, momentum: float = 0.0, beta: float = 0.0, eps: float = 1e-30, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = {'lr': lr, 'momentum': momentum, 'beta': beta, 'eps': eps} super().__init__(params, defaults) def __str__(self) -> str: return 'SM3' @torch.no_grad() def reset(self): for group in self.param_groups: for p in group['params']: state = self.state[p] state['step'] = 0 state['momentum_buffer'] = torch.zeros_like(p) @staticmethod def make_sparse(grad: torch.Tensor, values: torch.Tensor) -> torch.Tensor: if grad._indices().dim() == 0 or values.dim() == 0: return grad.new().resize_as_(grad) return grad.new(grad._indices(), values, grad.size()) @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: momentum, beta = group['momentum'], group['beta'] for p in group['params']: if p.grad is None: continue grad = p.grad shape = grad.shape rank: int = len(shape) state = self.state[p] if len(state) == 0: state['step'] = 0 state['momentum_buffer'] = torch.zeros_like(p) if grad.is_sparse: state['accumulator_0'] = torch.zeros(shape[0], dtype=grad.dtype, device=grad.device) elif rank == 0: state['accumulator_0'] = torch.zeros_like(p) else: for i in range(rank): state[f'accumulator_{i}'] = torch.zeros( [1] * i + [shape[i]] + [1] * (rank - 1 - i), dtype=grad.dtype, device=grad.device ) state['step'] += 1 if grad.is_sparse: grad = grad.coalesce() acc = state['accumulator_0'] update_values = torch.gather(acc, 0, grad._indices()[0]) if beta > 0.0: update_values.mul_(beta) update_values.addcmul_(grad._values(), grad._values(), value=1.0 - beta) nu_max = reduce_max_except_dim(self.make_sparse(grad, update_values).to_dense(), 0).squeeze_() if beta > 0.0: torch.max(acc, nu_max, out=acc) else: acc.copy_(nu_max) update_values.add_(group['eps']).rsqrt_().mul_(grad._values()) update = self.make_sparse(grad, update_values) else: update = state['accumulator_0'].clone() for i in range(1, rank): update = torch.min(update, state[f'accumulator_{i}']) if beta > 0.0: update.mul_(beta) update.addcmul_(grad, grad, value=1.0 - beta) for i in range(rank): acc = state[f'accumulator_{i}'] nu_max = reduce_max_except_dim(update, i) if beta > 0.0: torch.max(acc, nu_max, out=acc) else: acc.copy_(nu_max) update.add_(group['eps']).rsqrt_().mul_(grad) if momentum > 0.0: m = state['momentum_buffer'] m.mul_(momentum).add_(update, alpha=1.0 - momentum) update = m p.add_(update, alpha=-group['lr']) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.1, momentum: float = 0.0, beta: float = 0.0, eps: float = 1e-30)
[ 0.008863995783030987, -0.02333219163119793, -0.02744126133620739, 0.020463980734348297, 0.02101321332156658, 0.017422862350940704, -0.06086305156350136, -0.04853584244847298, -0.030248448252677917, -0.018551839515566826, -0.03354384005069733, -0.0013730801874771714, -0.0022185416892170906, 0.0726613700389862, -0.025915617123246193, 0.08722618967294693, 0.01450379565358162, 0.01829756423830986, -0.0011982667492702603, 0.013079860247671604, -0.038080088794231415, -0.06647742539644241, -0.01198139600455761, 0.0835646465420723, -0.06281587481498718, -0.0331573449075222, 0.039036162197589874, -0.04475224390625954, -0.0552486777305603, -0.002420689444988966, -0.004233663901686668, -0.037612225860357285, 0.02237612195312977, 0.01145250629633665, 0.03167238458991051, -0.04593207687139511, 0.024654418230056763, 0.038080088794231415, -0.1120433434844017, -0.03441854193806648, 0.0362900011241436, -0.049634307622909546, 0.03928026556968689, -0.024857837706804276, 0.04243326187133789, 0.019518081098794937, 0.0024664588272571564, 0.042962152510881424, 0.004238749388605356, -0.01843995787203312, 0.048169687390327454, -0.05943911522626877, 0.03142828121781349, -0.010699854232370853, -0.05744560807943344, 0.04528113454580307, 0.07705522328615189, -0.01316122803837061, 0.009820066392421722, -0.03671718016266823, 0.03232332319021225, -0.07587539404630661, 0.023250823840498924, -0.013151057064533234, -0.03165204077959061, -0.039361633360385895, -0.0331573449075222, -0.05533004552125931, 0.024532366544008255, 0.04214847460389137, 0.015887046232819557, -0.03216058760881424, 0.03043152578175068, -0.00583813339471817, -0.005965270567685366, -0.031794436275959015, -0.02083013579249382, -0.031611356884241104, -0.018206026405096054, -0.042351894080638885, 0.02479681186378002, 0.010231990367174149, -0.03405238687992096, -0.02351526916027069, -0.020372441038489342, -0.04430472105741501, 0.02257954142987728, -0.018022948876023293, -0.012632337398827076, -0.04934952035546303, 0.01126942876726389, -0.006183946505188942, 0.050529349595308304, 0.047884900122880936, 0.04869857802987099, 0.013313792645931244, -0.02461373433470726, -0.04544387012720108, -0.018989190459251404, -0.03972778841853142, -0.010750709101557732, 0.03502880036830902, 0.006814545951783657, 0.04231121018528938, 0.008446985855698586, -0.021704837679862976, -0.017321152612566948, -0.02711579017341137, 0.03708333522081375, -0.050854820758104324, -0.04009393975138664, 0.02825493924319744, -0.06240903586149216, -0.024837495759129524, -0.03765290975570679, 0.014300376176834106, -0.03708333522081375, 0.03673752397298813, -0.03677820786833763, 0.0425553135573864, 0.03643239289522171, 0.04483361169695854, -0.05850338563323021, 0.008655490353703499, 0.009164039045572281, -0.031794436275959015, 0.0615546777844429, 0.01174746360629797, -0.0020163937006145716, -0.03958539292216301, -0.06025279313325882, -0.014849607832729816, 0.0006579342298209667, 0.017483888193964958, 0.023372875526547432, -0.047071222215890884, -0.022782960906624794, -0.014605504460632801, -0.04082624986767769, 0.022193044424057007, 0.03246571868658066, 0.05089550465345383, -0.03091973252594471, -0.01073036715388298, 0.012347551062703133, -0.009041987359523773, 0.055736884474754333, 0.009921776130795479, -0.024878179654479027, -0.02461373433470726, -0.013374818488955498, 0.009601389989256859, 0.03454059362411499, 0.017107561230659485, 0.0037937697488814592, 0.00843681488186121, -0.006199202965945005, 0.008492755703628063, -0.040643174201250076, 0.011421993374824524, -0.05061071738600731, -0.01356806606054306, -0.052156705409288406, -0.0008931378251872957, -0.02097252942621708, 0.013456186279654503, -0.023718688637018204, 0.0000336515877279453, -0.06249040365219116, 0.026261430233716965, 0.0035140682011842728, -0.04906473308801651, 0.03519153594970703, 0.022335438057780266, -0.01610063575208187, 0.08852807432413101, 0.008192711509764194, -0.007546855602413416, 0.02068774215877056, -0.023128772154450417, 0.029577163979411125, -0.022843986749649048, -0.021806547418236732, -0.061432626098394394, -0.04524045065045357, 0.05553346499800682, -0.01624302938580513, -0.02068774215877056, 0.019497739151120186, 0.03972778841853142, 0.02841767482459545, -0.008533438667654991, 0.014920804649591446, -0.009886177256703377, -0.03517119586467743, 0.020006287842988968, 0.025752881541848183, 0.017300810664892197, 0.06965076178312302, 0.021643811836838722, 0.006143262609839439, -0.01783987134695053, 0.03460162132978439, 0.025793565437197685, -0.015866704285144806, -0.04324693977832794, -0.017616109922528267, 0.037124019116163254, -0.0075570265762507915, 0.05846270173788071, -0.08771439641714096, 0.01733132265508175, 0.034011706709861755, 0.06383297592401505, 0.02681066282093525, -0.03380828723311424, 0.03551700711250305, 0.033686235547065735, 0.06765725463628769, -0.01183900237083435, 0.03844624385237694, -0.06639605760574341, 0.0033691320568323135, 0.024715444073081017, 0.034805040806531906, -0.01671089418232441, 0.028743145987391472, -0.02020970545709133, -0.015500550158321857, 0.020596202462911606, 0.03596452996134758, -0.0457286573946476, 0.004167552571743727, -0.003740372136235237, 0.06924392282962799, 0.027237841859459877, -0.03531358763575554, 0.006951854098588228, -0.014615675434470177, -0.028153229504823685, -0.03694094344973564, -0.03822248429059982, -0.011299941688776016, 0.03895479440689087, -0.015398840419948101, 0.007190871983766556, 0.060334160923957825, 0.034011706709861755, -0.029048273339867592, 0.01608029380440712, -0.03720538690686226, -0.007053563836961985, -0.022355780005455017, 0.03895479440689087, -0.05142439529299736, -0.04206710681319237, 0.05443499982357025, 0.04719327390193939, -0.010221819393336773, -0.06741315126419067, -0.013974905014038086, -0.06338544934988022, -0.021216630935668945, 0.053092435002326965, 0.00038490744191221893, 0.017249954864382744, 0.0315706729888916, 0.012744218111038208, 0.014971659518778324, 0.060008689761161804, 0.1325480043888092, 0.061269890516996384, -0.06814546138048172, -0.0026037669740617275, 0.0062551433220505714, 0.02034192904829979, 0.0022020137403160334, -0.0014964031288400292, 0.015266617760062218, 0.0010469736298546195, 0.023291507735848427, -0.02618006244301796, -0.04625754430890083, -0.030248448252677917, 0.004238749388605356, 0.026078352704644203, -0.03246571868658066, -0.0441826693713665, 0.0362900011241436, 0.024715444073081017, 0.04202642664313316, -0.014788581989705563, 0.04682711884379387, -0.01371045969426632, 0.07595676183700562, 0.015032685361802578, -0.04198574274778366, 0.04670506715774536, -0.0009662416414357722, -0.003941248636692762, 0.04479292780160904, -0.0030258619226515293, -0.010277759283781052, 0.020301245152950287, 0.008101172745227814, -0.01801277883350849, -0.020301245152950287, 0.010394725948572159, 0.031774092465639114, 0.011940712109208107, 0.017544914036989212, -0.008691089227795601, -0.0018193311989307404, 0.03964642062783241, 0.012835756875574589, -0.06367024034261703, -0.02982126735150814, -0.03030947409570217, 0.02931271865963936, 0.0426366813480854, -0.023413559421896935, 0.020158851519227028, 0.01553106214851141, -0.014381743967533112, -0.06322271376848221, -0.03395067900419235, -0.0031936827581375837, 0.005426209419965744, -0.0458100251853466, -0.03602555766701698, -0.028438016772270203, -0.02697339840233326, 0.02459339238703251, 0.034784696996212006, -0.04495566338300705, -0.045199766755104065, 0.030818022787570953, 0.00713493162766099, 0.037469834089279175, -0.03299460932612419, 0.09023679792881012, 0.047884900122880936, -0.048169687390327454, 0.03077733889222145, -0.020301245152950287, -0.060008689761161804, 0.06615195423364639, -0.008701260201632977, -0.01785004325211048, 0.01911124214529991, -0.013547724112868309, 0.028193913400173187, -0.033848971128463745, 0.09324739873409271, 0.05886954069137573, 0.013446015305817127, -0.02085047774016857, -0.06558237969875336, 0.03458127751946449, -0.06395502388477325, -0.019040044397115707, 0.05297038331627846, -0.029577163979411125, 0.05471978709101677, 0.08266960084438324, -0.01687362976372242, -0.027319209650158882, -0.01799243688583374, 0.052604228258132935, -0.06480938196182251, 0.017544914036989212, -0.08136771619319916, 0.025590145960450172, 0.054963890463113785, -0.048861313611269, -0.009677672758698463, -0.07672975212335587, -0.0024092472158372402, 0.016334569081664085, 0.006341596134006977, 0.04320625588297844, -0.03234366700053215, -0.003796312492340803, 0.020606374368071556, 0.04861721023917198, 0.01940619945526123, 0.01892816461622715, -0.03498811647295952, 0.03106212429702282, -0.030980758368968964, 0.031611356884241104, 0.03964642062783241, 0.005314328707754612, -0.012662850320339203, -0.069406658411026, 0.07660770416259766, 0.07559061050415039, 0.04564728960394859, -0.054312948137521744, -0.036513760685920715, -0.006672152783721685, -0.052604228258132935, -0.0006642910884693265, 0.022477831691503525, -0.02967887371778488, -0.10040775686502457, 0.04825105518102646, 0.04719327390193939, -0.008650405332446098, 0.10146553814411163, -0.020738596096634865, -0.0020685198251158, -0.014310547150671482, 0.0090775853022933, -0.008655490353703499, -0.03960573673248291, 0.025305358693003654, -0.04070419818162918, 0.025447752326726913, 0.0472746416926384, 0.0489019975066185, 0.0059093302115798, 0.023942450061440468, 0.024410314857959747, 0.004815951455384493, -0.05630645900964737, -0.057811763137578964, -0.005812705960124731, -0.07123743742704391, 0.0015091168461367488, -0.006819631438702345, -0.030960416421294212, -0.014066443778574467, -0.035883162170648575, -0.04194505885243416, 0.001736692152917385, 0.006936597637832165, 0.022518515586853027, 0.02697339840233326, -0.0013044262304902077, 0.0409686453640461, 0.0024944290053099394, 0.011259257793426514, 0.0114321643486619, -0.006438220385462046, -0.01767713576555252, 0.01779918745160103, -0.02066740021109581, -0.07982172816991806, 0.023372875526547432, -0.004294689744710922, -0.009814980439841747, 0.03094007447361946, -0.009281004779040813, 0.0362289734184742, -0.04023633524775505, 0.01861286535859108, -0.03295392543077469, 0.0031479133758693933, -0.01782970130443573, 0.002654621610417962, 0.030045028775930405, -0.013781656511127949, 0.00579236401244998, -0.006524673663079739, 0.012571311555802822, 0.06737247109413147, -0.014778411015868187, -0.008594464510679245, 0.014066443778574467, -0.010079425759613514, 0.004777810536324978, -0.006789118517190218, -0.06668084114789963, -0.051017556339502335, -0.028926223516464233, -0.04873926192522049, 0.017260126769542694, -0.0029063529800623655, -0.014900462701916695, 0.03673752397298813, -0.06338544934988022, 0.04617617651820183, 0.06908118724822998, 0.009209807962179184, 0.026424165815114975, 0.05439431592822075, 0.01301883440464735, 0.03710367903113365, 0.03374725952744484, -0.05089550465345383, -0.05716082081198692, 0.0724579468369484, 0.03252674266695976, -0.063100665807724, -0.01688380166888237, -0.002616480691358447, 0.020138509571552277, 0.09715305268764496, -0.010170964524149895, 0.032079219818115234, -0.002209641970694065, -0.0552486777305603, -0.027522629126906395, 0.012449260801076889, 0.001090200268663466, -0.05439431592822075, 0.013364647515118122, -0.04365377873182297, 0.02162346988916397, -0.02382039837539196, -0.009540364146232605, -0.00022773424279876053, 0.003971761558204889, 0.005075311288237572, 0.0037632568273693323, -0.0022439691238105297, 0.04166027158498764, 0.024084843695163727, -0.062083564698696136, 0.008167284540832043, 0.02571219764649868, -0.013700288720428944, -0.03533393144607544, 0.01269336324185133, 0.025630829855799675, -0.04119240492582321, -0.048657894134521484, 0.031326569616794586, 0.009565792046487331, -0.015358156524598598, 0.007684163749217987, -0.002119374694302678, 0.06122920662164688, 0.012428918853402138, -0.0552079938352108, 0.06183946505188942, -0.04247394576668739, -0.06509417295455933, -0.03250640258193016, -0.004795609507709742, 0.006702665705233812, 0.0425959974527359, -0.02536638453602791, -0.020697912201285362, 0.0504479818046093, -0.013578237034380436, 0.022030308842658997, -0.026912372559309006, 0.0030284046661108732, -0.06204288452863693, 0.000943992636166513, -0.01553106214851141, 0.02510193921625614, 0.04515908285975456, -0.02270159311592579, -0.026892030611634254, 0.0016604099655523896, 0.015429353341460228, 0.017544914036989212, -0.020779279991984367, -0.020260561257600784, 0.0008232124382629991, -0.008635148406028748, -0.018043290823698044, 0.019640132784843445, 0.001058415975421667, -0.029088957235217094, -0.008609721437096596, 0.06851161271333694, 0.02380005642771721, -0.04495566338300705, -0.013903708197176456, -0.018033118918538094, -0.014686872251331806, -0.011737292632460594, 0.034133754670619965, -0.037144362926483154, 0.011279599741101265, -0.013334134593605995, 0.06550101190805435, -0.016670210286974907, 0.00021978818404022604, -0.015337814576923847, 0.0363306850194931, 0.06228698417544365, -0.11611173301935196, 0.03734778240323067, 0.002237612148746848, 0.005143965128809214, 0.008731773123145103, 0.031957171857357025, -0.024837495759129524, -0.07026102393865585, -0.0015358156524598598, 0.022823644801974297, -0.07123743742704391, 0.0022897382732480764, 0.046298228204250336, 0.03187580406665802, -0.05268559604883194, 0.005975441541522741, 0.028173571452498436, 0.0010425238870084286, -0.009977716021239758, -0.04082624986767769, -0.011930541135370731, 0.006133091636002064, 0.03687991574406624, -0.02522399090230465, -0.017870385199785233, -0.03295392543077469, -0.01752457208931446, 0.00012022398004774004, -0.03323871269822121, -0.027949810028076172, -0.029109299182891846, 0.004007359966635704, 0.09658347815275192, -0.0020519921090453863, -0.015561575070023537, 0.010170964524149895, -0.009586133994162083, -0.016517646610736847, -0.0037861415185034275, -0.003656461602076888, 0.017300810664892197, -0.07192905992269516, -0.019009532406926155, -0.034805040806531906, -0.03687991574406624, -0.002713104709982872, 0.05537072941660881, -0.0032903070095926523, 0.02321013994514942, -0.03254708647727966, 0.03354384005069733, 0.030004344880580902, -0.007633308880031109, -0.024227237328886986, 0.014788581989705563, 0.036818891763687134, 0.012154302559792995, -0.024328947067260742, -0.028661778196692467, -0.01783987134695053, 0.021989624947309494, 0.03862932324409485, 0.06904050707817078, 0.06981349736452103, -0.007480744272470474, 0.027807416394352913, -0.03958539292216301, 0.0106388283893466, 0.03991086408495903, 0.028946565464138985, 0.006748435087502003, 0.030167080461978912, 0.03895479440689087, -0.030167080461978912, 0.004668472800403833, -0.009036901406943798, -0.023718688637018204, 0.014229179359972477, -0.03197751194238663, -0.016771920025348663, -0.03545598313212395, 0.03043152578175068, 0.025630829855799675, 0.028783829882740974, -0.0820186585187912, -0.016283713281154633, -0.04050077870488167, 0.0013234966900199652, 0.016182003542780876, -0.000738030590582639, 0.03578145429491997, -0.04873926192522049, -0.05785244703292847, 0.018836626783013344, 0.060822367668151855, 0.009774296544492245, -0.007185786496847868, 0.05170918256044388, 0.0008651676471345127, -0.013974905014038086, -0.020433466881513596, 0.012276354245841503, 0.011299941688776016, -0.017321152612566948, -0.022966038435697556, -0.017321152612566948, 0.02792946808040142, -0.009281004779040813, 0.03012639656662941, -0.0410296693444252, -0.03545598313212395, 0.01926380582153797, 0.036981627345085144, -0.06981349736452103, 0.00867583230137825, -0.009601389989256859, -0.05170918256044388, -0.0030462038703262806, 0.020097825676202774, 0.06497211754322052, -0.015266617760062218, -0.014513966627418995, 0.011259257793426514, -0.007618052419275045, 0.02475612796843052, 0.028824513778090477, 0.009270833805203438, 0.010140451602637768, 0.04633891209959984, -0.00007298461423488334, 0.018877310678362846, -0.025996984913945198, -0.014229179359972477, 0.06285656243562698, -0.013079860247671604, 0.00803506188094616, 0.015856534242630005, 0.01403593085706234, -0.06135125830769539, -0.02018936350941658, 0.015256446786224842, -0.012683192268013954, 0.029211008921265602, -0.02158278599381447, 0.03388965502381325, 0.02914998307824135, 0.0049303751438856125, 0.003712401958182454, 0.02146073430776596, -0.0064433058723807335, 0.06574511528015137, -0.005426209419965744, -0.023311849683523178, 0.06834887713193893, -0.011625411920249462, 0.046583015471696854, -0.02270159311592579, -0.005121080670505762, -0.008253737352788448, 0.024410314857959747, -0.020535176619887352, -0.031448621302843094, 0.028356648981571198, -0.0457286573946476, 0.07156290858983994, -0.027827758342027664, 0.012632337398827076, 0.05089550465345383, 0.049308836460113525, -0.05537072941660881, 0.03030947409570217, -0.07282410562038422, -0.07900805026292801, -0.10073322802782059, -0.008767371065914631, -0.05455705150961876, 0.06802341341972351, 0.032099563628435135, -0.046623699367046356, 0.00898096151649952, 0.010313358157873154, 0.009931947104632854 ]
717,994
pytorch_optimizer.optimizer.sm3
__init__
null
def __init__( self, params: PARAMETERS, lr: float = 1e-1, momentum: float = 0.0, beta: float = 0.0, eps: float = 1e-30, ): self.validate_learning_rate(lr) self.validate_range(momentum, 'momentum', 0.0, 1.0) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') self.validate_non_negative(eps, 'eps') defaults: DEFAULTS = {'lr': lr, 'momentum': momentum, 'beta': beta, 'eps': eps} super().__init__(params, defaults)
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.1, momentum: float = 0.0, beta: float = 0.0, eps: float = 1e-30)
[ 0.02529982477426529, -0.00524147180840373, -0.030633902177214622, -0.0021218236070126295, -0.05248880013823509, -0.018234023824334145, -0.06382371485233307, -0.03289347514510155, -0.02759644202888012, 0.03630135953426361, -0.015900366008281708, 0.03031904250383377, 0.014816881157457829, 0.06074921414256096, -0.02759644202888012, 0.024855317547917366, 0.020613986998796463, 0.025985104963183403, -0.04282078519463539, -0.00662592425942421, -0.01896560750901699, 0.0010018758475780487, -0.017891384661197662, 0.10579252988100052, 0.0012721681268885732, 0.03815346956253052, 0.005713759921491146, 0.0044612702913582325, -0.051118239760398865, -0.0058850799687206745, 0.013733397237956524, 0.00006554733408847824, 0.006672226823866367, 0.07734411954879761, 0.026077711954712868, -0.01586332358419895, -0.016715293750166893, 0.002824468072503805, -0.11342322826385498, 0.04971063509583473, 0.02326250448822975, -0.02185489982366562, 0.03978332504630089, -0.025892499834299088, 0.011279351077973843, -0.02765200473368168, 0.04259853437542915, 0.0356345996260643, -0.015168782323598862, -0.03304164484143257, -0.007269532419741154, -0.00006044679685146548, 0.035893894731998444, -0.04693247005343437, -0.04233923926949501, 0.06263836473226547, 0.061082594096660614, 0.038672059774398804, 0.03159699961543083, 0.023392152041196823, -0.012038716115057468, -0.04359867423772812, -0.006834286265075207, -0.03080059215426445, -0.001771080307662487, -0.024836797267198563, -0.07815904915332794, -0.036560654640197754, 0.028707707300782204, 0.06697230041027069, 0.09453170001506805, -0.01845627836883068, -0.015900366008281708, 0.01771543361246586, 0.0353197418153286, -0.00993657112121582, -0.08023341000080109, -0.018632227554917336, -0.04448768496513367, -0.002889291848987341, 0.03389361500740051, 0.03907952457666397, -0.012149842455983162, -0.022873559966683388, 0.021836379542946815, -0.054266829043626785, -0.05789696425199509, -0.048821624368429184, 0.02639256976544857, 0.024725669994950294, -0.04856232926249504, -0.02409595251083374, -0.00579710491001606, -0.0283928494900465, 0.04848824441432953, 0.015344732441008091, 0.014409417286515236, -0.0286891870200634, 0.00826967228204012, -0.047858525067567825, -0.01840997487306595, 0.016437478363513947, -0.045302614569664, 0.013279629871249199, 0.024077432230114937, -0.03037460707128048, -0.04148726910352707, -0.039709240198135376, 0.034819670021533966, -0.02137335203588009, -0.023095814511179924, 0.07138032466173172, -0.052451759576797485, 0.031059887260198593, -0.0652313232421875, 0.039338819682598114, 0.01092744991183281, 0.01202019490301609, 0.0010128727881237864, -0.0009700427181087434, 0.018178461119532585, 0.048043739050626755, -0.043932054191827774, 0.05330372974276543, 0.03978332504630089, -0.013224066235125065, 0.008450252935290337, 0.015316951088607311, -0.011270090006291866, -0.04382092505693436, 0.02765200473368168, 0.001253647031262517, -0.0202250424772501, -0.014816881157457829, 0.030726507306098938, -0.0627865344285965, 0.012075758539140224, 0.0286891870200634, -0.023336587473750114, 0.00581099558621645, 0.062230899930000305, 0.03237488493323326, 0.024355249479413033, -0.03394917771220207, -0.010177345015108585, 0.01787286251783371, -0.020262084901332855, -0.01370561495423317, -0.007533458061516285, 0.032819390296936035, 0.0014666396891698241, 0.012501743622124195, 0.026281442493200302, 0.001008242485113442, 0.025466514751315117, -0.05185908451676369, 0.042191069573163986, -0.056859780102968216, 0.022317927330732346, 0.010621851310133934, -0.0172061026096344, 0.015696633607149124, 0.01065889373421669, -0.03907952457666397, -0.01567811332643032, 0.028781792148947716, -0.050821904093027115, -0.015900366008281708, -0.01283512357622385, -0.004570081830024719, -0.016919026151299477, -0.09008663892745972, -0.01095523126423359, 0.01576145738363266, 0.005607263650745153, 0.038857270032167435, 0.03155995532870293, 0.018984129652380943, -0.004558505956083536, 0.024170037358999252, 0.07860355824232101, 0.010797802358865738, -0.03289347514510155, -0.04848824441432953, 0.02070659212768078, 0.024614544585347176, -0.07023201882839203, 0.04515444487333298, -0.062230899930000305, 0.017539482563734055, 0.0628235787153244, 0.020150957629084587, 0.003220356535166502, 0.0368569940328598, -0.027226019650697708, 0.018224764615297318, 0.06189751997590065, 0.010501464828848839, 0.035060446709394455, 0.05171091482043266, 0.07897397875785828, 0.045450784265995026, -0.004711305256932974, -0.000882067484781146, 0.012649912387132645, -0.020428774878382683, -0.028003904968500137, -0.003644026815891266, -0.019965747371315956, -0.035116009414196014, -0.019539762288331985, -0.017530223354697227, 0.02185489982366562, 0.02698524482548237, -0.005347968079149723, -0.047080639749765396, 0.001950503559783101, 0.0073065743781626225, 0.028300242498517036, -0.0009289489826187491, 0.1183868795633316, -0.027263062074780464, 0.010269951075315475, -0.03676438704133034, 0.037783049046993256, 0.024910882115364075, 0.02604066953063011, -0.05997132882475853, -0.0706394836306572, 0.06067512929439545, -0.022003069519996643, -0.0628235787153244, -0.013613009825348854, -0.007255641743540764, 0.012751778587698936, 0.046228669583797455, -0.01611335761845112, 0.02754087746143341, -0.08882720023393631, -0.03109692968428135, 0.02185489982366562, 0.013224066235125065, -0.009621712379157543, -0.012335053645074368, 0.014613148756325245, 0.009047558531165123, 0.027874257415533066, 0.047376979142427444, -0.04382092505693436, -0.02366996742784977, -0.0440802201628685, -0.007964073680341244, 0.005820256192237139, 0.06130484491586685, -0.024596022441983223, 0.026318484917283058, 0.0323193222284317, -0.0010319725843146443, 0.05356302484869957, 0.006348107475787401, -0.003016624366864562, -0.0022595743648707867, 0.0004604230052791536, 0.0971987396478653, 0.01653934456408024, 0.007153775542974472, -0.00650553684681654, 0.008797523565590382, 0.035597559064626694, -0.003889431245625019, 0.14542768895626068, 0.019410114735364914, -0.008348386734724045, -0.013085158541798592, 0.026596302166581154, -0.03665326163172722, -0.008755850605666637, -0.0398574098944664, -0.0048710498958826065, 0.0386350192129612, 0.023651447147130966, -0.03761635720729828, 0.023095814511179924, 0.002771219937130809, 0.0006742838304489851, -0.004634905606508255, -0.02120666205883026, -0.01089966855943203, -0.02717045694589615, 0.010140303522348404, -0.015548464842140675, -0.015937408432364464, 0.06474976986646652, 0.03619023412466049, 0.09030888974666595, -0.0029888427816331387, 0.044006139039993286, -0.00537574989721179, 0.03646804764866829, -0.01803029328584671, 0.056489359587430954, -0.038264594972133636, 0.0377274826169014, -0.013668572530150414, -0.04582120478153229, -0.04778444394469261, 0.03461593762040138, 0.03456037491559982, 0.04463585466146469, 0.02572580985724926, 0.020928844809532166, 0.03600502014160156, 0.00788072869181633, 0.019965747371315956, 0.03146735206246376, -0.048525284975767136, 0.005579481832683086, -0.07045426964759827, 0.03307868912816048, 0.029689325019717216, 0.010964492335915565, 0.029911579564213753, 0.01749318093061447, -0.036875512450933456, -0.0640459656715393, -0.06452751904726028, 0.015965189784765244, 0.039412904530763626, -0.03630135953426361, -0.00881604477763176, -0.022429054602980614, -0.021243702620267868, 0.03283791244029999, -0.020076874643564224, -0.03043016977608204, -0.0465250089764595, 0.006510167382657528, 0.05682273954153061, 0.02035469003021717, -0.01489096600562334, 0.08497481048107147, -0.024447854608297348, -0.018280327320098877, 0.026077711954712868, 0.014668712392449379, -0.03493079915642738, 0.00538964057341218, -0.054266829043626785, 0.03328241780400276, -0.011242308653891087, -0.02698524482548237, 0.03496783971786499, -0.024484897032380104, 0.04493219405412674, 0.0199287049472332, -0.027985384687781334, -0.011723857372999191, -0.02083623968064785, 0.022503137588500977, -0.05067373439669609, -0.026299964636564255, 0.028337284922599792, -0.03882022947072983, 0.03485671430826187, 0.03293051943182945, -0.010445901192724705, 0.01135343499481678, -0.01060333102941513, 0.048154864460229874, -0.00022702818387188017, 0.008579900488257408, -0.05956386402249336, -0.022132717072963715, -0.016363393515348434, -0.00029431187431328, 0.009075339883565903, -0.018585925921797752, -0.006190678104758263, 0.03328241780400276, -0.01440015621483326, 0.006635184865444899, -0.015752196311950684, 0.053711194545030594, -0.0019366126507520676, 0.007982594892382622, -0.022688349708914757, -0.0019366126507520676, 0.012585088610649109, 0.05152570456266403, 0.006361998617649078, -0.00786683801561594, 0.010418119840323925, 0.016437478363513947, -0.004750662483274937, -0.06545357406139374, 0.03694959729909897, 0.05471133440732956, 0.01926194503903389, -0.03037460707128048, -0.023836657404899597, -0.016974588856101036, -0.03491227701306343, -0.010306993499398232, 0.0483030341565609, 0.015724414959549904, -0.01618744246661663, 0.019465677440166473, 0.013492622412741184, 0.010547767393290997, 0.06549061834812164, 0.00866787601262331, -0.040301915258169174, -0.01219614502042532, 0.010853365994989872, -0.011399738490581512, -0.03491227701306343, 0.027874257415533066, -0.05819329991936684, 0.024929402396082878, -0.021891942247748375, 0.013751917518675327, 0.0021993808913975954, 0.07808496803045273, 0.04682134464383125, 0.05693386495113373, 0.055600348860025406, -0.005019218660891056, -0.006079551763832569, -0.029059607535600662, -0.04989584907889366, -0.05708203464746475, 0.01678011752665043, -0.040968675166368484, -0.04667317494750023, 0.01848405972123146, -0.016576385125517845, -0.01615966111421585, 0.0014458034420385957, 0.008204847574234009, -0.012075758539140224, 0.03430107980966568, -0.053044434636831284, 0.03707924485206604, 0.016594907268881798, -0.03098580241203308, -0.03074502944946289, 0.006274023093283176, -0.005273883696645498, -0.044006139039993286, -0.0126869548112154, 0.014011213555932045, 0.00045781847438775003, 0.04196881502866745, -0.03150439262390137, 0.0013682463904842734, -0.03400474414229393, -0.036393966525793076, -0.006473124958574772, 0.044784024357795715, -0.04300599917769432, 0.03748670965433121, 0.011196006089448929, -0.010158823803067207, -0.028892919421195984, -0.050821904093027115, 0.03220819681882858, 0.06667596846818924, -0.011733117513358593, 0.0006412931252270937, 0.02241053245961666, 0.0004604230052791536, 0.02331806719303131, 0.028615102171897888, -0.044228389859199524, -0.07038018852472305, 0.013974171131849289, -0.012631391175091267, -0.003977406769990921, 0.012622131034731865, -0.016205964609980583, 0.00593138299882412, -0.054674290120601654, 0.028411369770765305, 0.09608747810125351, 0.008704917505383492, 0.0013184709241613746, -0.046710219234228134, 0.0019215643405914307, 0.006172156892716885, 0.024966444820165634, -0.08527114987373352, -0.022873559966683388, 0.01829884760081768, 0.05697090923786163, -0.0265777800232172, -0.036264315247535706, 0.026374049484729767, 0.0304857324808836, 0.05271105468273163, 0.021095534786581993, 0.01147382240742445, -0.006255501881241798, -0.01340927742421627, -0.018530361354351044, 0.03467150405049324, -0.03356023505330086, -0.09201283007860184, 0.018104376271367073, -0.02348475717008114, -0.0036764387041330338, -0.02700376696884632, 0.0076723662205040455, -0.004669632762670517, 0.020984407514333725, -0.05000697448849678, -0.00939019862562418, -0.06304582953453064, 0.06445343047380447, -0.011705336160957813, -0.017585786059498787, 0.02192898467183113, 0.03948698937892914, 0.052636969834566116, -0.06793539971113205, 0.014511283487081528, 0.04630275443196297, -0.020928844809532166, -0.05626710504293442, 0.04004262015223503, 0.03811642527580261, -0.004428858403116465, -0.0368569940328598, -0.025522077456116676, 0.03665326163172722, -0.03841276466846466, 0.02759644202888012, 0.03394917771220207, -0.044413600116968155, -0.03037460707128048, -0.014159382320940495, 0.021817857399582863, 0.03513453155755997, 0.06034174934029579, -0.018280327320098877, -0.024355249479413033, -0.012788821011781693, -0.03376396745443344, 0.06667596846818924, -0.05997132882475853, 0.00030212546698749065, 0.03889431431889534, -0.03537530452013016, -0.07230637967586517, -0.0016391174867749214, -0.007802014239132404, -0.004472846165299416, 0.024484897032380104, -0.00881604477763176, 0.059341609477996826, 0.025522077456116676, -0.020502859726548195, -0.020632507279515266, 0.0016912081046029925, 0.026485174894332886, -0.05334077402949333, 0.016289308667182922, -0.024836797267198563, -0.04585824906826019, -0.0730842649936676, 0.026059189811348915, 0.03080059215426445, -0.04922908917069435, -0.00788072869181633, -0.01926194503903389, -0.02909664995968342, 0.03217115253210068, 0.008626203052699566, 0.029392987489700317, -0.05900822952389717, -0.02337362989783287, 0.009015146642923355, -0.015576246194541454, -0.07023201882839203, -0.1038663387298584, 0.018558144569396973, 0.021169619634747505, -0.0713062435388565, 0.003350004320964217, -0.010881147347390652, 0.020317647606134415, 0.021151097491383553, 0.052636969834566116, -0.01489096600562334, -0.052340634167194366, -0.05874893441796303, 0.020428774878382683, -0.027392709627747536, -0.0377645269036293, 0.04004262015223503, 0.03948698937892914, -0.06678709387779236, -0.007658475544303656, 0.02209567464888096, 0.012881426140666008, -0.0006401355494745076, -0.040561214089393616, -0.00857526995241642, 0.04722880944609642, 0.017048673704266548, -0.04170951992273331, 0.002297774190083146, -0.03893135488033295, -0.013844523578882217, -0.02089180238544941, 0.019187862053513527, -0.025040529668331146, -0.03800529986619949, 0.02863362245261669, 0.09245733916759491, -0.014872444793581963, -0.018845221027731895, -0.017641348764300346, 0.008339125663042068, 0.03126361966133118, -0.06637962907552719, 0.000018322143660043366, -0.013835262507200241, -0.11764603853225708, 0.001174353645183146, -0.04233923926949501, 0.010649633593857288, -0.01853962242603302, -0.04189473018050194, -0.05574851483106613, -0.002322083106264472, 0.010464422404766083, 0.01394638977944851, -0.0025026637595146894, 0.034819670021533966, 0.019169339910149574, -0.004076957702636719, 0.03782008960843086, -0.005394270643591881, -0.007903880439698696, -0.015900366008281708, 0.010594069957733154, -0.05115528404712677, 0.02620735950767994, 0.08238185942173004, 0.03243044763803482, -0.0009052188252098858, 0.02863362245261669, -0.022336449474096298, 0.029022566974163055, -0.01675233617424965, 0.01521508488804102, 0.030911719426512718, 0.017993250861763954, 0.055896684527397156, -0.015113218687474728, -0.033245377242565155, -0.023206939920783043, 0.023392152041196823, 0.028115032240748405, 0.010742238722741604, 0.0002940224949270487, -0.06045287474989891, -0.02204011008143425, -0.02561468444764614, 0.012483222410082817, -0.026522217318415642, -0.03368988260626793, -0.016002232208848, 0.03585685417056084, 0.019910184666514397, 0.02578137256205082, -0.06197160482406616, -0.05756358429789543, 0.007246381137520075, 0.013770438730716705, 0.04319120943546295, 0.022688349708914757, -0.022188279777765274, -0.040968675166368484, -0.003032830310985446, 0.007940921932458878, -0.051007114350795746, 0.06063808500766754, 0.010621851310133934, -0.01576145738363266, -0.04485810920596123, -0.01060333102941513, 0.010501464828848839, 0.026725949719548225, 0.013159242458641529, -0.010908928699791431, -0.07675144821405411, -0.06189751997590065, 0.021299267187714577, -0.011223787441849709, -0.019113777205348015, 0.010427379980683327, -0.07749228924512863, 0.09267958998680115, 0.005750801879912615, 0.026170317083597183, 0.0014284399803727865, -0.00015583771164529026, 0.0007014867151156068, -0.05845259502530098, 0.04722880944609642, 0.03859797492623329, 0.0513404943048954, -0.10312549024820328, 0.01234431378543377, 0.04330233484506607, 0.0561559796333313, -0.02754087746143341, -0.03893135488033295, -0.002458676230162382, -0.02639256976544857, -0.0317266471683979, 0.016844941303133965, -0.00882993545383215, 0.01255730725824833, -0.033486150205135345, -0.05122936889529228, -0.0036208753008395433, 0.04493219405412674, -0.0301893949508667, 0.018104376271367073, 0.03456037491559982, -0.028726229444146156, -0.007167666219174862, 0.004283004906028509, -0.053600069135427475, 0.014437198638916016, 0.02548503503203392, 0.047080639749765396, 0.05815625935792923, 0.016363393515348434, 0.029967142269015312, -0.04963655397295952, -0.008542858064174652, 0.002398482756689191, 0.06149005889892578, -0.01077928114682436, -0.03498636186122894, 0.06712047010660172, 0.003449555253610015, -0.009723578579723835, -0.05208133906126022, 0.02078067511320114, 0.055822599679231644, 0.02300320751965046, -0.04263557493686676, 0.017048673704266548, -0.02518869750201702, -0.06167526915669441, -0.059934284538030624, -0.007019497454166412, -0.048228949308395386, 0.07471412420272827, 0.02970784716308117, -0.02222532220184803, 0.03907952457666397, 0.03400474414229393, 0.00620456924661994 ]
717,997
pytorch_optimizer.optimizer.sm3
__str__
null
def __str__(self) -> str: return 'SM3'
(self) -> str
[ 0.01853351853787899, -0.02128177136182785, 0.02301660366356373, -0.0013709049671888351, 0.0027654278092086315, -0.06523661315441132, 0.012418660335242748, 0.004021464381366968, 0.08079858869314194, -0.0526290126144886, -0.04211695119738579, 0.0013902286300435662, -0.030247939750552177, 0.013320430181920528, 0.0285131074488163, 0.011723008938133717, 0.00658292043954134, -0.08904334157705307, 0.019461054354906082, 0.013286077417433262, -0.003604932688176632, 0.06764133274555206, 0.03631126880645752, -0.0014074052451178432, -0.02547285333275795, 0.06300365924835205, -0.01825869455933571, -0.025301087647676468, -0.02081800252199173, -0.032274775207042694, -0.011473949067294598, -0.051941949874162674, 0.006947922520339489, 0.0014288759557530284, -0.03224042430520058, 0.007823928259313107, -0.039574816823005676, -0.009584526531398296, -0.043559782207012177, -0.00444014323875308, 0.004564673639833927, 0.015690797939896584, 0.005466443486511707, -0.03167359530925751, -0.021917304024100304, -0.011216300539672375, 0.011035946197807789, 0.03706703707575798, 0.02310248650610447, -0.014419730752706528, 0.025146499276161194, 0.03610515221953392, -0.04950287565588951, -0.03651738911867142, -0.04754474759101868, -0.0014857733622193336, 0.0341813750565052, -0.017554454505443573, -0.01131077203899622, 0.03210300952196121, -0.00308748846873641, -0.001128286006860435, 0.05767892301082611, -0.0047836750745773315, -0.01696186326444149, 0.0010177118238061666, 0.002081585582345724, 0.04809439554810524, 0.032068658620119095, 0.05565208941698074, 0.03888775408267975, -0.05627044290304184, -0.027705807238817215, 0.0345936119556427, 0.034816909581422806, -0.00805151741951704, -0.058572106063365936, -0.011585596948862076, 0.016446566209197044, -0.017459983006119728, 0.02129894681274891, -0.01016853004693985, -0.036929626017808914, 0.005320442840456963, -0.060392823070287704, -0.07605785131454468, 0.009713350795209408, -0.05025864392518997, -0.0677100419998169, 0.01529573556035757, -0.048850167542696, 0.02756839618086815, -0.03885340318083763, 0.05956834554672241, -0.014239376410841942, -0.014325259253382683, 0.03385502099990845, -0.07172935456037521, -0.0025421325117349625, -0.00427267188206315, 0.017391277477145195, 0.030385352671146393, -0.029286053031682968, 0.0059774466790258884, -0.05822857469320297, -0.03430161252617836, -0.04197953641414642, 0.04397201910614967, -0.008863110095262527, 0.013895845040678978, -0.04809439554810524, 0.02111000567674637, -0.0006516361609101295, -0.0054063256829977036, 0.018842697143554688, -0.06169823929667473, -0.00776810385286808, 0.029234522953629494, 0.03366607800126076, -0.03031664714217186, 0.012203953228890896, 0.028547460213303566, -0.06843145936727524, 0.008128811605274677, 0.022982250899076462, 0.07873740047216415, -0.02719051018357277, -0.023239899426698685, 0.039780937135219574, -0.06193871423602104, 0.0341813750565052, -0.014101964421570301, -0.04208259657025337, -0.011748773977160454, 0.07537078857421875, -0.021797068417072296, 0.003944170195609331, -0.003697256790474057, 0.05225112661719322, 0.14661920070648193, -0.023703666403889656, 0.014892086386680603, 0.006243683397769928, 0.018481990322470665, -0.017477160319685936, 0.0263145063072443, -0.0022415423300117254, 0.06128600239753723, -0.04070847108960152, -0.028152398765087128, 0.02576485648751259, 0.03345995768904686, 0.04658285900950432, -0.0066000972874462605, -0.04524308815598488, 0.02014811709523201, 0.023909786716103554, -0.04558661952614784, 0.055926911532878876, -0.036070797592401505, -0.00104186637327075, -0.027619924396276474, -0.008695638738572598, 0.008622637949883938, -0.004959734622389078, 0.021882951259613037, -0.03059147112071514, -0.0065099201165139675, -0.005646797362715006, -0.003072459017857909, -0.04754474759101868, -0.03352866694331169, -0.06348460167646408, 0.024648377671837807, -0.005715503823012114, 0.02566179633140564, 0.001475038006901741, 0.07440890371799469, 0.033889371901750565, -0.03809763491153717, -0.005152971018105745, -0.010048293508589268, -0.04438425600528717, 0.03912822902202606, 0.03545244038105011, -0.014101964421570301, 0.012246894650161266, 0.03545244038105011, 0.040158823132514954, -0.016841627657413483, 0.022071892395615578, 0.018980110064148903, -0.0429757796227932, 0.0030960768926888704, -0.001369831501506269, -0.04345672205090523, 0.03237783536314964, -0.07866869121789932, -0.028839461505413055, 0.006793333683162928, 0.009180876426398754, 0.043113190680742264, -0.0389908142387867, 0.04599885642528534, 0.034919966012239456, -0.029973115772008896, 0.02878793142735958, -0.013294665142893791, 0.03174230083823204, 0.006338154431432486, 0.015287147834897041, 0.03363172337412834, 0.0043284958228468895, 0.04228871688246727, 0.06042717397212982, -0.07179806381464005, 0.0024841614067554474, -0.0002740199852269143, -0.014325259253382683, 0.020199647173285484, 0.06293495744466782, -0.03108959272503853, -0.023497547954320908, -0.01568220928311348, -0.06585497409105301, 0.017511513084173203, -0.010907121933996677, -0.02794628031551838, -0.02440790645778179, 0.013809962198138237, 0.02415025793015957, -0.056029971688985825, 0.008888875134289265, 0.04665156453847885, 0.011388066224753857, 0.039780937135219574, -0.056201737374067307, -0.030196411535143852, -0.06997735053300858, -0.04273530840873718, -0.014179258607327938, 0.004646262153983116, 0.01259042602032423, 0.04579273611307144, 0.059637051075696945, -0.02346319518983364, -0.010735356248915195, -0.002200748072937131, -0.015132558532059193, -0.015407383441925049, 0.07667621225118637, -0.03256677836179733, -0.020388588309288025, -0.0050928532145917416, -0.014952204190194607, -0.07530208677053452, -0.032824426889419556, 0.03423290327191353, -0.0010880284244194627, -0.024081552401185036, -0.08258494734764099, -0.027980633080005646, -0.016798686236143112, 0.016970451921224594, 0.002597956219688058, 0.02415025793015957, -0.055823855102062225, 0.05644220858812332, 0.055823855102062225, -0.009464289993047714, 0.09021134674549103, 0.020749296993017197, -0.06503049284219742, 0.039471760392189026, -0.0014836263144388795, -0.03875034302473068, -0.038612931966781616, 0.02129894681274891, -0.08450872451066971, -0.06183565407991409, 0.0060590351931750774, -0.00784969236701727, -0.005548032000660896, -0.0017541572451591492, 0.03337407484650612, -0.05077394098043442, 0.03182818368077278, -0.05613303184509277, 0.039403051137924194, 0.019443877041339874, 0.034919966012239456, 0.010056882165372372, -0.034731026738882065, -0.013088546693325043, 0.040433645248413086, 0.003628550563007593, 0.03455926105380058, 0.06612979620695114, -0.004036494065076113, 0.006844863295555115, -0.032463718205690384, -0.02679545059800148, -0.013569490984082222, -0.017408454790711403, -0.011851833201944828, 0.006939334329217672, -0.016042916104197502, -0.02184859663248062, -0.0016897451132535934, 0.01776057295501232, -0.02279330976307392, 0.05331607535481453, 0.0026494860649108887, 0.04895322397351265, 0.025541560724377632, 0.0933031290769577, -0.015338676981627941, 0.018894227221608162, 0.032635483890771866, 0.05444972962141037, -0.030935002490878105, -0.02071494422852993, -0.03452490642666817, 0.012212541885674, 0.016781508922576904, -0.04050235450267792, -0.05949964001774788, 0.010451942682266235, 0.01620609499514103, 0.028461577370762825, -0.05671703442931175, -0.055274203419685364, 0.054312314838171005, -0.01911752298474312, -0.00727427750825882, -0.013329018838703632, 0.03033382259309292, -0.03514326363801956, -0.009326878003776073, -0.029114287346601486, 0.11233477294445038, -0.027345100417733192, -0.02603968046605587, 0.027602748945355415, -0.009275347925722599, 0.033339723944664, -0.021934479475021362, -0.011327948421239853, -0.014505613595247269, 0.02234671823680401, -0.014170670881867409, -0.014857733622193336, 0.03534938022494316, 0.012951133772730827, 0.028272634372115135, 0.01939234882593155, 0.0009001596481539309, 0.027637101709842682, -0.012942546047270298, 0.003068164922297001, 0.03366607800126076, -0.04950287565588951, 0.0058013866655528545, 0.01834457740187645, -0.010967239737510681, -0.011577008292078972, 0.017459983006119728, 0.0040880236774683, 0.08691344410181046, -0.02784322015941143, -0.03352866694331169, 0.008665579371154308, -0.027448158711194992, 0.01968435011804104, -0.03871598839759827, 0.08018022775650024, 0.009155112318694592, 0.010056882165372372, -0.06990864127874374, -0.06314107030630112, 0.026297328993678093, -0.02308531105518341, 0.005586679559201002, 0.04778521880507469, 0.052972543984651566, 0.00888028647750616, 0.043010130524635315, 0.017056334763765335, -0.004457320086658001, -0.008038635365664959, 0.009730527177453041, -0.004113788716495037, 0.016034329310059547, -0.022982250899076462, -0.04273530840873718, -0.028925344347953796, -0.023600608110427856, -0.01815563440322876, -0.04404072463512421, 0.03033382259309292, 0.014127729460597038, -0.036551740020513535, 0.0007761662709526718, 0.009301112964749336, -0.06382813304662704, 0.007141158916056156, -0.0029887233395129442, -0.0012710662558674812, -0.03703268617391586, -0.022449778392910957, -0.011465360410511494, 0.0003188400878570974, -0.05448408052325249, -0.0943337231874466, 0.06880933791399002, -0.014909262768924236, 0.008729991503059864, 0.011422418989241123, -0.009258171543478966, 0.00878581590950489, -0.043113190680742264, 0.029406288638710976, 0.041086357086896896, 0.05578950047492981, 0.018567873165011406, 0.0046333796344697475, 0.01832740008831024, 0.04991511255502701, 0.07495855540037155, 0.03136441856622696, -0.04173906520009041, 0.017511513084173203, -0.036826565861701965, -0.005067088175565004, 0.024974733591079712, -0.01491785142570734, -0.00498979352414608, -0.04314754530787468, -0.04259789362549782, 0.004654850345104933, 0.02669239044189453, -0.035761620849370956, -0.030866296961903572, 0.031312886625528336, 0.03117547556757927, -0.06496179103851318, -0.08107341080904007, -0.01397314015775919, 0.06403425335884094, -0.005917328409850597, -0.04074282571673393, 0.04788827896118164, -0.024373553693294525, -0.04266659915447235, 0.09969281405210495, -0.04074282571673393, 0.030866296961903572, -0.04617062211036682, 0.018361752852797508, -0.03552114591002464, -0.07722586393356323, 0.04630803316831589, -0.0327041894197464, 0.032841604202985764, 0.029698289930820465, 0.014694555662572384, -0.0009516893769614398, 0.013019840233027935, -0.02061188407242298, -0.019443877041339874, 0.0264175646007061, 0.0031433124095201492, -0.013990316540002823, -0.031106768175959587, -0.0026301622856408358, 0.04476214200258255, -0.06853451579809189, -0.03181101009249687, -0.018962934613227844, -0.00808157678693533, -0.04228871688246727, -0.031192651018500328, 0.022673072293400764, 0.07640138268470764, -0.020869532600045204, 0.0024863085709512234, 0.0002308101684320718, -0.012933957390487194, -0.032738544046878815, 0.006720333360135555, 0.03466231748461723, 0.03826940059661865, -0.03905951976776123, -0.016214681789278984, -0.015072440728545189, 0.06506484746932983, -0.030299469828605652, -0.030385352671146393, -0.08066117763519287, 0.032927487045526505, 0.0204401183873415, -0.004745027516037226, 0.012650543823838234, -0.011087476275861263, 0.03517761453986168, -0.01956411451101303, 0.016077270731329918, 0.00439720181748271, -0.0036156680434942245, -0.01353513728827238, 0.008845933713018894, -0.04331931099295616, 0.05348784103989601, 0.021264594048261642, 0.01339772529900074, -0.012487366795539856, -0.019787408411502838, 0.022879192605614662, -0.02129894681274891, 0.07104229182004929, 0.008854522369801998, -0.07186677306890488, -0.03789151459932327, -0.05922481417655945, -0.018464813008904457, 0.0034932850394397974, -0.02519802935421467, 0.0014782586367800832, -0.03279007226228714, 0.09701327234506607, -0.003697256790474057, 0.06726344674825668, 0.0015458912821486592, 0.05558338016271591, 0.010348883457481861, 0.07894352078437805, -0.05548032373189926, 0.02725921757519245, 0.034439023584127426, 0.016171740368008614, -0.004178200848400593, -0.0691872239112854, -0.012556073255836964, -0.033889371901750565, 0.02165965549647808, -0.03296183794736862, -0.023257076740264893, 0.008656991645693779, -0.005148677155375481, 0.02119588851928711, -0.0037552276626229286, -0.03117547556757927, -0.02509496919810772, -0.07564561814069748, 0.05578950047492981, 0.053728312253952026, 0.0033709020353853703, 0.01648091897368431, 0.03826940059661865, 0.031312886625528336, -0.03785715997219086, -0.006338154431432486, 0.06296930462121964, 0.04826616123318672, -0.003136871149763465, 0.030265117064118385, -0.02384107932448387, 0.02165965549647808, -0.005221677478402853, -0.03174230083823204, 0.03679221495985985, -0.05767892301082611, 0.05077394098043442, 0.05568644031882286, -0.08079858869314194, 0.03713574633002281, 0.05359090119600296, 0.01012558862566948, -0.03107241541147232, 0.03455926105380058, -0.006836275104433298, 0.06970252096652985, 0.030746061354875565, -0.0067332154139876366, 0.0009033802198246121, 0.01463443785905838, -0.05390007793903351, -0.022965075448155403, -0.0076779271475970745, -0.04531179368495941, -0.010932886973023415, -0.0051229121163487434, -0.025644619017839432, 0.009258171543478966, 0.05609867721796036, -0.06073635444045067, 0.007338689640164375, -0.02128177136182785, 0.023308606818318367, 0.012521719560027122, 0.03447337821125984, 0.0612172968685627, 0.027138981968164444, 0.05170147866010666, 0.11123546957969666, 0.021556595340371132, 0.011276418343186378, 0.012178188189864159, -0.032068658620119095, 0.04101765155792236, -0.0034202844835817814, -0.007733750622719526, -0.0074460431933403015, -0.009429937228560448, 0.001974232029169798, -0.01587115041911602, 0.018293047323822975, -0.03366607800126076, -0.021075651049613953, -0.008399343118071556, 0.01250454317778349, 0.07193547487258911, -0.05152971297502518, 0.03163924440741539, -0.015312912873923779, 0.035486795008182526, -0.02899404987692833, -0.0029715467244386673, 0.0511518269777298, -0.09605138003826141, 0.013964551500976086, -0.010752532631158829, 0.053728312253952026, -0.0886998102068901, -0.0469607450067997, -0.001248521963134408, 0.013380547985434532, 0.04132682830095291, -0.022484131157398224, 0.0362769179046154, -0.02081800252199173, 0.03572726622223854, -0.03287595510482788, 0.021986009553074837, -0.06777874380350113, 0.010778297670185566, -0.08018022775650024, -0.043662842363119125, -0.019323641434311867, -0.04349107667803764, -0.0406741201877594, -0.0008813727763481438, -0.021934479475021362, 0.03488561511039734, 0.009017699398100376, -0.03258395567536354, 0.006879216525703669, -0.019735880196094513, 0.001229198300279677, -0.036242563277482986, -0.022089069709181786, -0.03478255495429039, -0.0011959187686443329, -0.02279330976307392, 0.07969928532838821, 0.012083717621862888, 0.010941475629806519, -0.021247416734695435, 0.011654303409159184, -0.07227900624275208, -0.022484131157398224, 0.03127853572368622, 0.015184088610112667, -0.05359090119600296, -0.025112146511673927, 0.008897463791072369, 0.043113190680742264, -0.0028212517499923706, 0.047853924334049225, -0.02348037250339985, 0.026640860363841057, -0.028719225898385048, -0.010632297024130821, -0.054793260991573334, 0.0072184535674750805, 0.06279753893613815, -0.06444649398326874, 0.0345936119556427, 0.010374648496508598, -0.05376266688108444, -0.05341913551092148, -0.044418610632419586, -0.05273207277059555, 0.008042928762733936, 0.07942446321249008, 0.032738544046878815, 0.020216822624206543, -0.023875432088971138, -0.01626621186733246, 0.014694555662572384, 0.011534066870808601, 0.024562494829297066, -0.016300564631819725, 0.0011851834133267403, 0.014359612949192524, -0.032068658620119095, -0.008240459486842155, -0.021213063970208168, 0.01985611580312252, -0.01524420641362667, 0.05767892301082611, 0.03382066637277603, -0.022381071001291275, 0.018499165773391724, 0.031965598464012146, -0.07619526982307434, -0.027894750237464905, 0.03991834819316864, 0.007639279589056969, 0.033683255314826965, -0.008738580159842968, -0.023600608110427856, -0.004053670447319746, 0.00009037828567670658, 0.023738021031022072, 0.07969928532838821, -0.0032678425777703524, -0.0000999730036710389, -0.02006223425269127, -0.011499714106321335, -0.01349219586700201, 0.031003709882497787, -0.045861441642045975, 0.018001046031713486, 0.0431818962097168, 0.00350402039475739, 0.03182818368077278, 0.0028663401026278734, 0.01496079284697771, 0.03562420606613159, 0.02992158569395542, 0.04173906520009041, 0.015948446467518806, -0.020457295700907707, -0.03541808947920799, 0.04022752866148949, 0.031192651018500328, 0.03449055179953575, -0.015510442666709423, 0.01825869455933571, 0.07324089854955673, 0.04094894230365753, 0.03651738911867142, 0.007102511823177338, 0.007428866811096668, -0.019272111356258392, 0.002045085420832038, 0.015175499953329563, 0.006634450517594814, 0.001908746431581676, -0.0016725684981793165, -0.023617783561348915, 0.03382066637277603, 0.00149114103987813, -0.014101964421570301, 0.050121232867240906, -0.020680591464042664, -0.0067418040707707405 ]
718,011
pytorch_optimizer.optimizer.sm3
make_sparse
null
@staticmethod def make_sparse(grad: torch.Tensor, values: torch.Tensor) -> torch.Tensor: if grad._indices().dim() == 0 or values.dim() == 0: return grad.new().resize_as_(grad) return grad.new(grad._indices(), values, grad.size())
(grad: torch.Tensor, values: torch.Tensor) -> torch.Tensor
[ -0.01645226590335369, -0.0340501107275486, 0.010662689805030823, -0.04624611511826515, -0.014037740416824818, 0.04124081879854202, -0.04134656488895416, 0.03390911594033241, 0.06404663622379303, -0.05202687904238701, -0.014910141937434673, 0.045787882059812546, 0.012257687747478485, -0.00463959202170372, 0.016381770372390747, 0.007499131839722395, 0.017941517755389214, 0.023123057559132576, 0.019280964508652687, 0.005511994007974863, 0.0019166405545547605, -0.08177666366100311, -0.005247629713267088, 0.04296799749135971, -0.05223837122321129, -0.0010034824954345822, 0.02388090081512928, 0.005626551806926727, 0.026295427232980728, -0.02166024222970009, -0.011720146983861923, 0.0008338487823493779, 0.01761546917259693, 0.03810369595885277, 0.04550589248538017, 0.003892763052135706, -0.019104721024632454, 0.01786220818758011, 0.0010701243299990892, -0.015412434004247189, 0.022752946242690086, -0.03470221161842346, -0.020285548642277718, -0.03177658095955849, 0.03256967291235924, 0.03486082702875137, 0.01017802208662033, 0.01682237721979618, -0.03256967291235924, 0.0029939247760921717, 0.02176598832011223, -0.014540032483637333, 0.008226132951676846, 0.011825893074274063, -0.07317601889371872, 0.050687432289123535, 0.06496310234069824, 0.028392717242240906, -0.00690871849656105, -0.011543904431164265, 0.009614045731723309, -0.02504410408437252, 0.040042366832494736, -0.015262627974152565, -0.01887560449540615, -0.0166108850389719, -0.04850202053785324, -0.048325780779123306, 0.03630601987242699, 0.016963370144367218, -0.02604868821799755, -0.0008520238334313035, 0.008746049366891384, 0.003438937943428755, 0.009869597852230072, -0.0220832247287035, -0.0042650760151445866, 0.011305976659059525, -0.0030357823707163334, -0.08205865323543549, -0.007481507491320372, -0.030119895935058594, -0.00597022520378232, 0.03553055226802826, 0.01313008926808834, -0.005066981073468924, 0.025431837886571884, 0.03396198898553848, -0.004238639492541552, -0.0067853485234081745, 0.0037275354843586683, 0.013605944812297821, 0.0018582601333037019, -0.053225331008434296, 0.038773417472839355, 0.04053584858775139, 0.05283759534358978, -0.024656370282173157, -0.019474830478429794, -0.0003841542638838291, 0.030930614098906517, 0.030595751479268074, -0.055481236428022385, -0.0011037206277251244, -0.019386708736419678, -0.04286225140094757, 0.031547464430332184, -0.035354308784008026, 0.02086714841425419, -0.048889756202697754, 0.01575610786676407, -0.020585160702466965, 0.028745202347636223, -0.007944145239889622, -0.04184004291892052, -0.048325780779123306, 0.02187173254787922, 0.01786220818758011, -0.0590413436293602, -0.007688592653721571, 0.026383548974990845, -0.0054062483832240105, -0.06824121624231339, 0.03544243052601814, 0.04423694685101509, 0.05326057970523834, 0.027687745168805122, 0.02077902853488922, 0.0850195363163948, -0.01739516481757164, -0.040782585740089417, -0.026031063869595528, -0.019369084388017654, 0.04913649708032608, 0.01057456899434328, -0.041875291615724564, -0.005780764389783144, -0.0007655547233298421, -0.000005214997145230882, 0.04353197664022446, 0.001293181674554944, 0.012971471063792706, 0.0013702878495678306, 0.06612630188465118, 0.0366937518119812, 0.03494894877076149, 0.005022920202463865, 0.049206994473934174, 0.0223475880920887, 0.03665850684046745, 0.026542168110609055, 0.04645760729908943, 0.027969734743237495, 0.03679949790239334, -0.014857268892228603, -0.021995102986693382, -0.010257331654429436, -0.04550589248538017, 0.041875291615724564, 0.04413120076060295, -0.02187173254787922, 0.0029608793556690216, -0.04465992748737335, -0.013720503076910973, -0.03672900050878525, 0.004002914763987064, 0.035037070512771606, -0.02994365431368351, -0.08015523105859756, 0.015297875739634037, -0.011438158340752125, -0.06728950887918472, 0.0015123836928978562, 0.029027191922068596, -0.0028242911212146282, 0.013482575304806232, -0.018963726237416267, 0.022206595167517662, 0.00975503958761692, -0.011958074755966663, -0.03346851095557213, 0.009737415239214897, -0.01080368459224701, -0.0414523109793663, 0.038561929017305374, 0.04652810096740723, -0.01665494590997696, -0.011640837416052818, 0.07712385803461075, 0.018487870693206787, -0.007327294908463955, -0.0029410519637167454, 0.006661978550255299, 0.007891272194683552, 0.028762826696038246, 0.001143375295214355, -0.009120565839111805, -0.0011918420204892755, -0.020497038960456848, 0.041205570101737976, -0.025854820385575294, -0.03690524399280548, 0.04885450750589371, -0.02814597636461258, 0.014302104711532593, 0.033556632697582245, -0.01786220818758011, 0.01898135058581829, -0.03743397444486618, 0.03609452769160271, -0.043990205973386765, 0.017641905695199966, -0.007322888821363449, 0.05604521557688713, -0.00218210625462234, -0.05576322600245476, -0.003247273853048682, 0.005247629713267088, 0.026788907125592232, -0.04011286422610283, 0.015359560959041119, -0.04159330204129219, -0.0006449385546147823, -0.013323957100510597, 0.051533397287130356, -0.046633847057819366, 0.0276348739862442, -0.06866420060396194, -0.04060634598135948, -0.01935146003961563, 0.02203035168349743, -0.05202687904238701, -0.016161466017365456, -0.0013328362256288528, 0.05882985144853592, -0.0032384616788476706, 0.014443098567426205, -0.01056575682014227, 0.03293978050351143, 0.01739516481757164, -0.04395495727658272, -0.04797329381108284, 0.00481142895296216, 0.04349672794342041, 0.04896025359630585, 0.045470647513866425, -0.009561172686517239, 0.043990205973386765, -0.03923165053129196, 0.029115311801433563, -0.07726485282182693, -0.0035821350757032633, -0.01133241318166256, -0.012151941657066345, 0.025696201249957085, -0.015297875739634037, 0.006309492513537407, -0.012715918943285942, -0.03507231920957565, -0.10581618547439575, -0.061226751655340195, -0.03126547485589981, -0.01194045040756464, 0.027388133108615875, 0.003963260445743799, -0.003908184356987476, 0.0606275275349617, 0.05565747991204262, -0.012627797201275826, 0.0483962781727314, 0.0724005475640297, 0.058336369693279266, -0.0268417801707983, -0.017756463959813118, 0.04113507270812988, 0.008961946703493595, 0.03849143162369728, 0.021061016246676445, 0.04501241445541382, 0.030401885509490967, -0.006098001264035702, -0.022805819287896156, -0.05576322600245476, 0.006701632868498564, 0.03415585681796074, -0.010054652579128742, 0.0017767478711903095, -0.038456182926893234, 0.0019816302228718996, -0.013456138782203197, 0.031124480068683624, 0.07317601889371872, 0.026788907125592232, -0.00812038779258728, 0.03211143985390663, -0.001927655772306025, -0.010037028230726719, 0.046739593148231506, -0.002564332913607359, 0.027317635715007782, 0.04776180163025856, -0.028392717242240906, -0.051427651196718216, -0.01194045040756464, 0.03641176596283913, -0.06520984321832657, -0.06330642104148865, 0.029538296163082123, 0.02589006908237934, 0.02652454376220703, -0.03894966095685959, 0.010706750676035881, -0.008058702573180199, 0.024127641692757607, 0.01988018862903118, -0.020990518853068352, -0.0014176531694829464, -0.02692990191280842, 0.06679602712392807, 0.08762792497873306, -0.006045128684490919, -0.013852684758603573, -0.06383514404296875, -0.008538964204490185, -0.09925995022058487, 0.01313008926808834, 0.022365212440490723, -0.02788161300122738, -0.06654928624629974, 0.025749074295163155, -0.04018336161971092, -0.02092002145946026, 0.044730424880981445, -0.0022426897194236517, -0.03452596813440323, -0.0021898169070482254, 0.07102585583925247, 0.02287631668150425, -0.03433210030198097, -0.051216162741184235, 0.02546708658337593, -0.0016809158260002732, -0.056115712970495224, 0.009490675292909145, 0.0345788411796093, -0.04374346509575844, 0.0154212461784482, -0.060698024928569794, 0.031177353113889694, -0.0015586473746225238, 0.00590413436293602, -0.03288690745830536, -0.0014231606619432569, 0.05671493709087372, 0.09615807980298996, 0.026912277564406395, -0.03041950985789299, -0.03362713009119034, 0.00803667213767767, -0.029485423117876053, 0.0034852016251534224, 0.03278116136789322, 0.02261195331811905, 0.022118473425507545, 0.03004940040409565, -0.008442030288279057, -0.04117032140493393, -0.023546040058135986, -0.015359560959041119, -0.00034477500594221056, 0.0231406819075346, -0.05445902794599533, -0.0020069649908691645, 0.05276709794998169, -0.027088521048426628, -0.036623258143663406, -0.09517111629247665, -0.010530508123338223, 0.018329253420233727, -0.008318660780787468, -0.040571097284555435, -0.03746922314167023, 0.02081427536904812, 0.017430413514375687, 0.0015564443310722709, 0.01708674058318138, 0.04162855073809624, -0.017536159604787827, -0.001445191097445786, -0.03047238290309906, -0.010653877630829811, -0.034614089876413345, 0.012530864216387272, -0.020285548642277718, 0.00044005626114085317, 0.0425802618265152, 0.04321473836898804, 0.06422287970781326, 0.016055719926953316, -0.011358849704265594, -0.03565392270684242, -0.07137834280729294, -0.005860073491930962, 0.048572517931461334, -0.05491726100444794, -0.051004670560359955, 0.034243978559970856, 0.016011659055948257, 0.04127606749534607, 0.06834696233272552, 0.023281674832105637, -0.01342089008539915, 0.016690194606781006, 0.006014286074787378, 0.03990137204527855, -0.050370197743177414, -0.013791000470519066, 0.012187190353870392, -0.015033512376248837, 0.04374346509575844, 0.05220312252640724, -0.00970216654241085, 0.005736703518778086, 0.01141172181814909, -0.024762114509940147, -0.03417348116636276, -0.05114566534757614, 0.005445902701467276, -0.030331388115882874, 0.012213626876473427, -0.032393429428339005, -0.048220034688711166, 0.05022920295596123, -0.04212203249335289, -0.05509350448846817, -0.022365212440490723, -0.02040891721844673, 0.06288343667984009, -0.02830459550023079, 0.021572120487689972, 0.05082842707633972, -0.0321643128991127, 0.004842271097004414, -0.0028793669771403074, 0.013500199653208256, -0.03343326225876808, 0.02255908027291298, 0.010433574207127094, -0.024233385920524597, -0.01380862481892109, 0.025872444733977318, -0.0000988612009678036, 0.03232293203473091, 0.036975741386413574, 0.015703234821558, -0.028921445831656456, -0.04134656488895416, -0.03528381139039993, 0.03820944204926491, 0.03778645768761635, 0.021113889291882515, 0.004837865009903908, -0.08149467408657074, -0.0032142281997948885, -0.008953134529292583, -0.021360628306865692, 0.02989078126847744, -0.012081445194780827, -0.008666740730404854, -0.03634126856923103, 0.03442022204399109, -0.02809310518205166, -0.0030820462852716446, -0.10574568808078766, -0.010133962146937847, -0.013068404980003834, -0.03630601987242699, 0.03655276075005531, 0.02909768931567669, -0.013041968457400799, -0.02040891721844673, -0.06355316191911697, -0.0058116065338253975, 0.06253094971179962, 0.009649294428527355, 0.01388793345540762, -0.01755378395318985, -0.004873113706707954, 0.034666962921619415, 0.06358841061592102, 0.02514985017478466, -0.06404663622379303, 0.002020183252170682, 0.024233385920524597, -0.016469890251755714, -0.0024145266506820917, -0.025273218750953674, -0.013738127425312996, 0.012187190353870392, 0.03990137204527855, -0.005476745311170816, -0.018752235919237137, -0.07888628542423248, 0.04948898032307625, 0.01407298818230629, -0.03182945027947426, 0.007195112761110067, 0.037927452474832535, -0.028745202347636223, -0.0670427680015564, -0.03672900050878525, 0.036975741386413574, -0.04977096989750862, 0.05019395425915718, 0.023070184513926506, 0.019545327872037888, -0.045259155333042145, 0.011878765188157558, 0.014733899384737015, -0.05460002273321152, -0.0032450708094984293, 0.07423347234725952, -0.011817080900073051, 0.031406469643116, -0.04719782620668411, 0.011156169697642326, 0.014733899384737015, -0.05160389468073845, 0.04173429682850838, 0.03553055226802826, -0.02287631668150425, -0.028375092893838882, 0.014205170795321465, 0.08671146631240845, -0.016364146023988724, -0.006807378493249416, 0.07053237408399582, -0.06404663622379303, 0.005185944959521294, -0.050898924469947815, 0.009904846549034119, 0.005022920202463865, 0.005282878410071135, -0.009006007574498653, -0.04138181358575821, 0.050264451652765274, -0.013931994326412678, 0.017060304060578346, -0.01993306167423725, -0.05530499294400215, -0.09883696585893631, 0.015456494875252247, -0.011358849704265594, -0.03577728942036629, 0.02904481627047062, 0.01988018862903118, -0.0345788411796093, -0.03470221161842346, -0.006243401672691107, 0.05160389468073845, 0.012768791988492012, -0.056221459060907364, 0.06711326539516449, 0.008684364147484303, -0.06848795711994171, 0.015042324550449848, 0.005357781425118446, -0.013632381334900856, 0.029168184846639633, 0.00909412931650877, -0.040465351194143295, -0.07522043585777283, -0.014742711558938026, 0.08530151844024658, -0.011438158340752125, 0.008768079802393913, 0.037398725748062134, -0.04540015012025833, 0.014240419492125511, -0.039830874651670456, 0.00838034600019455, -0.008133606053888798, -0.045682135969400406, -0.004295918624848127, 0.05192113295197487, 0.048572517931461334, -0.07032088190317154, 0.07317601889371872, 0.020373668521642685, -0.02904481627047062, 0.06023979187011719, 0.006190528627485037, -0.00561333354562521, -0.03600640594959259, -0.021906981244683266, 0.005617739632725716, -0.06528034061193466, -0.011984511278569698, 0.03923165053129196, 0.015174506232142448, -0.09312669932842255, 0.020232675597071648, 0.0006063854089006782, 0.04208678379654884, -0.001271151239052415, -0.047515060752630234, 0.0212901309132576, -0.008481685072183609, 0.018364500254392624, -0.09446614980697632, 0.018523119390010834, 0.03902015835046768, -0.02962641604244709, -0.039725128561258316, -0.03433210030198097, -0.01861124113202095, -0.04050059989094734, 0.00869758240878582, -0.0023109838366508484, -0.008182073011994362, -0.01560630090534687, -0.050052959471940994, -0.035812538117170334, 0.0033398012164980173, -0.004793804604560137, 0.015218567103147507, 0.05149814859032631, -0.0295206718146801, -0.05029970034956932, 0.007565222680568695, -0.01755378395318985, -0.0016511748544871807, -0.008283412083983421, 0.01104161236435175, -0.01223125122487545, -0.018417373299598694, 0.011605589650571346, 0.05118091404438019, 0.04081783443689346, 0.06383514404296875, -0.05576322600245476, 0.001763529609888792, 0.02525559440255165, -0.012134317308664322, -0.0563976988196373, -0.09961243718862534, 0.045682135969400406, -0.04779705032706261, -0.04550589248538017, -0.0016126217087730765, -0.0032362586352974176, 0.05350731685757637, 0.003467577276751399, -0.011684898287057877, 0.0691576823592186, 0.05364831164479256, -0.004846677184104919, -0.01650513894855976, 0.027035648003220558, -0.012742355465888977, 0.08847389370203018, -0.003051203675568104, 0.0351075679063797, 0.010786060243844986, 0.04321473836898804, 0.06446962058544159, 0.027282387018203735, 0.0372224822640419, 0.044166449457407, -0.002478414447978139, -0.06513934582471848, 0.043249987065792084, -0.07088486105203629, -0.01750972308218479, 0.04807903990149498, -0.034402597695589066, 0.054282788187265396, 0.001993746729567647, 0.009182250127196312, 0.011438158340752125, 0.03362713009119034, 0.024057144299149513, 0.037715960294008255, 0.05125141143798828, -0.0030886551830917597, -0.06031028926372528, -0.020320795476436615, -0.058336369693279266, 0.012345809489488602, -0.048784010112285614, 0.01829400472342968, -0.06531558930873871, 0.051004670560359955, -0.009896034374833107, -0.02120201103389263, 0.00656504463404417, -0.05202687904238701, 0.025502335280179977, 0.0007451766286976635, -0.010371889919042587, 0.03204094246029854, 0.025925317779183388, -0.04677484184503555, 0.047056831419467926, 0.022206595167517662, -0.0013890137197449803, 0.014020116068422794, -0.001704047666862607, -0.004064599983394146, -0.005538430530577898, 0.02705327235162258, 0.03894966095685959, -0.020585160702466965, 0.030401885509490967, -0.03623552247881889, -0.03253442421555519, -0.002590769436210394, -0.04007761552929878, -0.005860073491930962, 0.046422358602285385, 0.05276709794998169, 0.006093595176935196, 0.008574212901294231, 0.023581288754940033, -0.0787452906370163, -0.017518535256385803, 0.029432550072669983, -0.0074859135784208775, -0.017518535256385803, -0.0829046219587326, 0.045999374240636826, 0.024656370282173157, 0.022946814075112343, 0.02329929918050766, 0.01845262199640274, 0.021113889291882515, 0.053013838827610016, 0.02435675635933876, -0.017368728294968605, 0.019739195704460144, -0.022805819287896156, 0.002863945672288537, 0.025008855387568474, 0.0326930433511734, -0.019809693098068237, 0.022858692333102226, 0.008508121594786644, -0.01470746286213398, -0.03641176596283913, -0.010345453396439552, 0.06073327362537384, 0.04779705032706261, -0.012010947801172733, -0.012442742474377155, 0.06016929820179939, -0.09721553325653076, 0.013086029328405857, -0.05033494904637337, -0.08424406498670578, -0.10412425547838211, -0.008349503390491009, -0.03211143985390663, -0.014249231666326523, 0.05350731685757637, -0.051533397287130356, 0.05872410535812378, 0.06556232273578644, 0.02319355495274067 ]
718,019
pytorch_optimizer.optimizer.sm3
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: momentum, beta = group['momentum'], group['beta'] for p in group['params']: if p.grad is None: continue grad = p.grad shape = grad.shape rank: int = len(shape) state = self.state[p] if len(state) == 0: state['step'] = 0 state['momentum_buffer'] = torch.zeros_like(p) if grad.is_sparse: state['accumulator_0'] = torch.zeros(shape[0], dtype=grad.dtype, device=grad.device) elif rank == 0: state['accumulator_0'] = torch.zeros_like(p) else: for i in range(rank): state[f'accumulator_{i}'] = torch.zeros( [1] * i + [shape[i]] + [1] * (rank - 1 - i), dtype=grad.dtype, device=grad.device ) state['step'] += 1 if grad.is_sparse: grad = grad.coalesce() acc = state['accumulator_0'] update_values = torch.gather(acc, 0, grad._indices()[0]) if beta > 0.0: update_values.mul_(beta) update_values.addcmul_(grad._values(), grad._values(), value=1.0 - beta) nu_max = reduce_max_except_dim(self.make_sparse(grad, update_values).to_dense(), 0).squeeze_() if beta > 0.0: torch.max(acc, nu_max, out=acc) else: acc.copy_(nu_max) update_values.add_(group['eps']).rsqrt_().mul_(grad._values()) update = self.make_sparse(grad, update_values) else: update = state['accumulator_0'].clone() for i in range(1, rank): update = torch.min(update, state[f'accumulator_{i}']) if beta > 0.0: update.mul_(beta) update.addcmul_(grad, grad, value=1.0 - beta) for i in range(rank): acc = state[f'accumulator_{i}'] nu_max = reduce_max_except_dim(update, i) if beta > 0.0: torch.max(acc, nu_max, out=acc) else: acc.copy_(nu_max) update.add_(group['eps']).rsqrt_().mul_(grad) if momentum > 0.0: m = state['momentum_buffer'] m.mul_(momentum).add_(update, alpha=1.0 - momentum) update = m p.add_(update, alpha=-group['lr']) return loss
(self)
[ 0.0017071623587980866, -0.010379164479672909, -0.042013637721538544, 0.05959895998239517, 0.008333914913237095, 0.011325332336127758, -0.02689407952129841, -0.041898950934410095, -0.019238729029893875, -0.006494145840406418, -0.04254884272813797, -0.002955577103421092, 0.021465566009283066, 0.09373743087053299, -0.021006818860769272, 0.062236759811639786, 0.020892132073640823, 0.04243415594100952, 0.007230053655803204, 0.007406862452626228, -0.014268962666392326, -0.06873568147420883, -0.0065706041641533375, 0.07122056931257248, -0.07206160575151443, -0.03543825447559357, 0.05891083925962448, -0.028212979435920715, -0.018971124663949013, 0.004625705070793629, -0.008615854196250439, -0.042701758444309235, 0.02093036100268364, -0.005266040563583374, 0.034176696091890335, -0.0438103973865509, 0.003383263712748885, 0.0385921448469162, -0.085709348320961, -0.046754028648138046, 0.0017214982071891427, -0.031290411949157715, -0.007005458232015371, 0.014268962666392326, 0.03662335127592087, 0.012051681987941265, -0.024428309872746468, 0.0442691445350647, 0.004030766896903515, -0.012099468149244785, 0.012481758370995522, -0.03918469324707985, 0.04392508417367935, -0.019802605733275414, 0.010684996843338013, 0.0736289918422699, 0.07137348502874374, -0.05791688710451126, 0.017365509644150734, -0.025632523000240326, 0.04514840990304947, -0.062351446598768234, 0.007000679615885019, 0.004616147838532925, -0.006322115659713745, -0.04128728434443474, -0.03509419411420822, -0.04446028918027878, 0.023835761472582817, 0.05168556421995163, 0.015406274236738682, 0.01662004366517067, 0.015893694013357162, -0.015415831468999386, -0.022153686732053757, -0.022841809317469597, -0.01908581331372261, -0.04465143382549286, 0.025422263890504837, -0.048550788313150406, 0.013313238508999348, 0.01537760253995657, -0.026244185864925385, 0.01250087283551693, -0.016944989562034607, -0.0326666533946991, 0.001876803464256227, -0.029875939711928368, -0.02419893629848957, -0.02398867718875408, 0.020414268597960472, -0.0006564630893990397, 0.03285779803991318, 0.03880240395665169, 0.034845706075429916, 0.03736881539225578, -0.04809204116463661, -0.014297634363174438, -0.06571559607982635, -0.04748037829995155, 0.015712106600403786, 0.03549559786915779, 0.009514234960079193, 0.043084047734737396, 0.03453987464308739, -0.03633663430809975, 0.0035529048182070255, -0.03440607339143753, 0.04457497596740723, -0.03650866448879242, -0.0023498868104070425, 0.009987317956984043, -0.05474388226866722, -0.014641694724559784, -0.04434560239315033, -0.014785053208470345, -0.019974635913968086, 0.004816850181668997, -0.031500671058893204, 0.04377216845750809, 0.03383263573050499, 0.012472201138734818, -0.04564538970589638, -0.011296659708023071, 0.0030845999717712402, 0.009103273041546345, 0.055087942630052567, 0.023778418079018593, 0.01690676063299179, -0.05879615247249603, -0.03392820805311203, -0.00679042050614953, 0.008668418973684311, -0.01144957635551691, 0.025670751929283142, -0.026932308450341225, -0.016037052497267723, -0.014163833111524582, -0.01884688064455986, 0.014450550079345703, 0.012606002390384674, 0.027429284527897835, -0.022383060306310654, 0.009581135585904121, 0.038420114666223526, 0.02341524325311184, 0.056273043155670166, 0.057075850665569305, -0.0027309819124639034, -0.011172415688633919, 0.008859563618898392, 0.007650572340935469, 0.05157087743282318, 0.02916870266199112, 0.007187046110630035, 0.02381664700806141, -0.009160616435110569, 0.020280467346310616, -0.03880240395665169, -0.018617507070302963, -0.022937381640076637, -0.025116432458162308, -0.02886287122964859, -0.006455916911363602, 0.0011618022108450532, 0.021771397441625595, -0.00782738160341978, 0.03322097286581993, -0.0646451860666275, 0.014479221776127815, 0.0008750849519856274, -0.028212979435920715, 0.052717749029397964, 0.02957010641694069, -0.0091176088899374, 0.12768475711345673, 0.007650572340935469, 0.006876435596495867, -0.02479148656129837, -0.010436508804559708, 0.005586207844316959, -0.01607528142631054, -0.010570310056209564, -0.05573783442378044, -0.016400227323174477, 0.039719898253679276, 0.0056148795410990715, -0.022765351459383965, 0.04897131025791168, 0.008869120851159096, -0.002190997824072838, -0.0060210623778402805, 0.03419581055641174, -0.0028528368566185236, -0.021006818860769272, 0.044383831322193146, 0.019162271171808243, 0.0286526121199131, 0.09656637161970139, -0.011382675729691982, -0.006613611709326506, -0.029034901410341263, 0.03509419411420822, 0.028117407113313675, -0.044804349541664124, -0.012128139846026897, -0.004315095022320747, 0.06705360859632492, 0.00909371580928564, 0.01794850081205368, -0.06032531335949898, -0.00365803437307477, 0.026798507198691368, 0.07580804079771042, 0.02192431315779686, -0.06479810178279877, 0.023644616827368736, 0.013227223418653011, 0.0632307156920433, -0.002599569736048579, -0.02161848172545433, -0.05436159297823906, 0.060440000146627426, -0.011382675729691982, 0.03369883447885513, -0.031959418207407, 0.016944989562034607, -0.04958297312259674, -0.02391221933066845, 0.004004484508186579, 0.01633332669734955, -0.05180025100708008, -0.0020153834484517574, -0.0015578304883092642, 0.023529930040240288, 0.005743902642279863, -0.0539793036878109, -0.014163833111524582, -0.012969177216291428, -0.005055780988186598, -0.046677570790052414, -0.042090095579624176, -0.02123619243502617, 0.036642465740442276, -0.027104338631033897, 0.012443529441952705, 0.07194691896438599, 0.0182352177798748, -0.026454446837306023, 0.04361925274133682, -0.03383263573050499, -0.01561653334647417, -0.03064051829278469, 0.02777334488928318, -0.03868771716952324, -0.04644819721579552, 0.06785641610622406, 0.051723793148994446, 0.034463416785001755, -0.043504565954208374, 0.008429487235844135, -0.06212207302451134, -0.04411622881889343, 0.04591299220919609, -0.03603080287575722, 0.00001935714863066096, 0.03440607339143753, -0.017422853037714958, 0.0364704355597496, 0.0527942068874836, 0.10054218769073486, 0.05982833728194237, -0.05363524332642555, -0.025441378355026245, -0.0016283150762319565, 0.022841809317469597, 0.011363561265170574, 0.015444503165781498, 0.013590398244559765, -0.03471190482378006, 0.058872610330581665, -0.04140197113156319, -0.07817824184894562, -0.01711701974272728, -0.04671579971909523, 0.04247238487005234, -0.02481060102581978, -0.017537539824843407, 0.03681449592113495, 0.0034573322627693415, 0.04820672795176506, -0.014221176505088806, 0.07037953287363052, 0.004152621608227491, 0.07148817181587219, -0.0026019590441137552, -0.04870370402932167, 0.02590012550354004, -0.023071182891726494, 0.002991416724398732, 0.07087650895118713, -0.01759488321840763, -0.02031869627535343, -0.004668712615966797, -0.01726038008928299, -0.01963057555258274, 0.007230053655803204, -0.009203623980283737, 0.015530518256127834, -0.01754709705710411, 0.015779007226228714, 0.006365123204886913, 0.0018588835373520851, 0.026033926755189896, 0.007230053655803204, -0.08563289046287537, -0.028040947392582893, -0.06514216214418411, 0.022402174770832062, 0.05959895998239517, -0.01655314303934574, 0.015052656643092632, 0.03769376128911972, 0.034291382879018784, -0.057075850665569305, 0.004057049285620451, 0.041707806289196014, 0.0311374943703413, -0.03681449592113495, -0.01963057555258274, -0.07122056931257248, -0.011038614436984062, 0.049430057406425476, 0.049238912761211395, -0.04572184756398201, -0.02926427498459816, 0.04553070291876793, -0.017441967502236366, 0.032781340181827545, -0.04683048650622368, 0.07469940185546875, 0.025938354432582855, -0.04770975187420845, 0.019190942868590355, 0.006527596153318882, -0.023931333795189857, 0.051532648503780365, 0.02299472503364086, 0.04759506508708, 0.004912422504276037, -0.007492878008633852, 0.009213181212544441, -0.03507507964968681, 0.04759506508708, 0.030525831505656242, 0.04946828633546829, -0.0030081418808549643, -0.05329118296504021, 0.020758328959345818, -0.05504971370100975, -0.006723519880324602, 0.023931333795189857, -0.028537925332784653, 0.08945578336715698, 0.09687220305204391, -0.005170467775315046, -0.05275597795844078, -0.02299472503364086, 0.04851255938410759, -0.04109613969922066, 0.015110000036656857, -0.03549559786915779, 0.015406274236738682, 0.04010218754410744, -0.055699605494737625, -0.006962450686842203, -0.048550788313150406, -0.019238729029893875, 0.060936976224184036, 0.009772280231118202, 0.04839787259697914, -0.05000349134206772, -0.022191915661096573, 0.0404844768345356, 0.012051681987941265, -0.011506919749081135, 0.019592346623539925, -0.06777995824813843, 0.009012479335069656, -0.05482034012675285, 0.05157087743282318, 0.01982172019779682, 0.008114098571240902, 0.0038157289382070303, -0.060440000146627426, 0.03452076017856598, 0.06992078572511673, 0.021484680473804474, -0.042090095579624176, -0.04036979004740715, -0.00508445268496871, -0.026550019159913063, -0.009882188402116299, 0.029875939711928368, -0.005270819179713726, -0.10199488699436188, 0.020184895023703575, 0.0355147123336792, 0.012911833822727203, 0.0722145214676857, -0.005882482510060072, -0.004401110112667084, -0.03171093016862869, -0.003980591427534819, 0.016467127948999405, -0.04472789168357849, -0.01676340214908123, -0.0364704355597496, 0.0255751796066761, 0.02410336397588253, 0.0466393418610096, 0.018196988850831985, 0.02628241665661335, 0.036451321095228195, -0.032093219459056854, -0.050347551703453064, -0.00785127468407154, -0.019162271171808243, -0.0601341687142849, 0.029742136597633362, -0.03431049734354019, -0.047671522945165634, -0.016304655000567436, -0.01860794983804226, -0.036145489662885666, 0.003978202119469643, 0.0023797533940523863, 0.04247238487005234, 0.02666470594704151, 0.023740189149975777, 0.006981565151363611, 0.033393003046512604, -0.009141501970589161, -0.007860831916332245, 0.0013105368707329035, -0.012797147035598755, 0.04277821630239487, -0.0383627712726593, -0.10918193310499191, 0.03864948824048042, 0.0007173905032686889, 0.00375599623657763, 0.03627929091453552, -0.00864452589303255, 0.028098292648792267, -0.006374680437147617, -0.05287066474556923, -0.03562939912080765, -0.020796557888388634, -0.013714642263948917, 0.005404620431363583, 0.016094395890831947, -0.017126576974987984, 0.011229759082198143, -0.015855465084314346, -0.023682845756411552, 0.06655663251876831, 0.03155801445245743, -0.023950448259711266, 0.012070796452462673, 0.001468231319449842, -0.020184895023703575, 0.013628627173602581, -0.03035380132496357, -0.03272399678826332, -0.03411935269832611, -0.05462919548153877, 0.008615854196250439, 0.007497656624764204, -0.05191493779420853, -0.014460107311606407, -0.04790089651942253, 0.037655532360076904, 0.04147842898964882, -0.006828649435192347, 0.03819074109196663, 0.036049917340278625, 0.012682460248470306, 0.050424009561538696, 0.04465143382549286, -0.049544744193553925, -0.06418643891811371, 0.05741991102695465, 0.027352826669812202, -0.041898950934410095, -0.031003693118691444, 0.029283389449119568, 0.026760278269648552, 0.09702511876821518, -0.023759303614497185, 0.02322409860789776, 0.03994927182793617, -0.03513242304325104, -0.02123619243502617, -0.007693579886108637, -0.027849802747368813, -0.049735888838768005, 0.005113124381750822, -0.04446028918027878, 0.02964656427502632, 0.009007700718939304, -0.015559189952909946, -0.023931333795189857, -0.004128728527575731, -0.010828355327248573, -0.021350879222154617, 0.0402551032602787, 0.05267952010035515, 0.043695710599422455, -0.06919443607330322, 0.020490726456046104, 0.006303001195192337, -0.012309728190302849, 0.0020153834484517574, -0.01754709705710411, 0.055393774062395096, -0.03392820805311203, -0.020567184314131737, -0.00981528777629137, -0.00370582053437829, -0.030296457931399345, 0.0202422384172678, 0.03251373767852783, 0.07431711256504059, -0.007478542160242796, -0.07328493148088455, 0.005882482510060072, -0.06919443607330322, -0.13433659076690674, -0.02412247844040394, -0.001496903016231954, 0.008482052013278008, 0.04079030826687813, -0.005915932822972536, -0.017231708392500877, 0.036145489662885666, 0.024562112987041473, 0.008128434419631958, -0.02945541962981224, -0.016037052497267723, -0.05940781533718109, 0.03960521146655083, -0.03016265667974949, 0.030525831505656242, 0.006102298852056265, -0.0002069740294246003, -0.03316362947225571, 0.010283592157065868, 0.006322115659713745, 0.006909885909408331, -0.03274311125278473, -0.03578231483697891, 0.006035398226231337, -0.024715028703212738, 0.006283886730670929, 0.03721589967608452, 0.021178849041461945, -0.04465143382549286, -0.022344831377267838, 0.0464099682867527, -0.00227342895232141, -0.008711426518857479, -0.036164604127407074, -0.024275394156575203, -0.0010387527290731668, -0.006102298852056265, 0.04247238487005234, -0.028021832928061485, 0.002125291619449854, -0.01964969001710415, 0.04193717986345291, -0.046065907925367355, 0.02114062011241913, -0.020280467346310616, -0.002107371808961034, 0.06648017466068268, -0.11774522066116333, 0.04174603521823883, 0.010723225772380829, 0.021561138331890106, -0.029436305165290833, 0.01801540143787861, -0.07653439790010452, -0.0802808329463005, 0.008649304509162903, 0.011124629527330399, -0.05592897906899452, 0.002609127201139927, 0.03507507964968681, 0.02788803167641163, -0.049927033483982086, -0.005165689159184694, 0.03094634972512722, 0.022402174770832062, -0.04614236578345299, -0.027352826669812202, -0.03727324306964874, 0.04346633702516556, 0.025651637464761734, -0.0068095349706709385, -0.03520888090133667, -0.04824495688080788, -0.0013535444159060717, 0.007722251582890749, -0.0527942068874836, -0.03880240395665169, -0.018378576263785362, -0.006737855728715658, 0.07389659434556961, 0.005839474964886904, -0.02827032282948494, 0.010981271043419838, -0.03203587606549263, -0.02788803167641163, 0.021197963505983353, -0.01690676063299179, 0.04778620973229408, -0.0769549161195755, -0.012003895826637745, -0.04014041647315025, -0.06449227035045624, 0.0195350032299757, 0.03033468686044216, -0.027639543637633324, 0.06544799357652664, -0.012367071583867073, 0.03561028465628624, 0.022383060306310654, -0.03304894268512726, -0.05772574245929718, -0.0004178306844551116, 0.04491903632879257, 0.0030248670373111963, -0.0187035221606493, -0.022478632628917694, 0.006040176842361689, -0.01220459770411253, 0.0442691445350647, 0.06246613338589668, 0.03123306669294834, -0.007483320776373148, 0.0440397709608078, -0.026798507198691368, 0.03557205572724342, 0.04228124022483826, 0.01972614787518978, 0.026645591482520103, 0.025823667645454407, 0.03335477411746979, -0.03371794894337654, -0.01700233295559883, -0.02500174567103386, -0.01565476320683956, -0.011927437968552113, -0.04683048650622368, -0.0041836826130747795, -0.024179821833968163, -0.014813724905252457, -0.015253358520567417, -0.01849326305091381, -0.0767255425453186, -0.024160707369446754, -0.05615835636854172, -0.002202944364398718, 0.017155248671770096, -0.014517450705170631, 0.025938354432582855, -0.036164604127407074, -0.027658658102154732, 0.027639543637633324, 0.04610413685441017, 0.016486242413520813, -0.026339760050177574, 0.06739766895771027, 0.03094634972512722, -0.013915344141423702, 0.012921391054987907, 0.00991086009889841, 0.017575768753886223, 0.005361612886190414, -0.027696887031197548, -0.021962542086839676, 0.02301383949816227, 0.02282269485294819, 0.01437409222126007, -0.06644194573163986, -0.03583965823054314, -0.002953187795355916, 0.027219025418162346, -0.06151041015982628, 0.019687918946146965, -0.019420316442847252, -0.017652226611971855, 0.0027572643011808395, 0.0202422384172678, 0.04740392044186592, 0.027639543637633324, -0.016467127948999405, 0.024734143167734146, 0.018196988850831985, 0.018082302063703537, 0.023243213072419167, -0.03805693984031677, 0.0012842543656006455, 0.023873990401625633, -0.001137909130193293, -0.021847855299711227, -0.027429284527897835, -0.04361925274133682, 0.04067562147974968, -0.005447627976536751, -0.010790126398205757, 0.020204009488224983, 0.017833814024925232, -0.02796448953449726, -0.015291587449610233, 0.05959895998239517, 0.003065485507249832, 0.008654083125293255, 0.0013404032215476036, 0.02140822261571884, 0.014689480885863304, -0.002136043505743146, -0.007913396693766117, 0.00957635696977377, -0.0005632799584418535, 0.061548639088869095, 0.028805527836084366, -0.04553070291876793, 0.03304894268512726, -0.0004067801055498421, 0.02825120836496353, -0.0007185851573012769, -0.025804553180933, 0.037158556282520294, 0.041134368628263474, -0.014450550079345703, -0.04067562147974968, 0.036451321095228195, -0.08173353224992752, 0.08242165297269821, 0.01600838080048561, 0.01711701974272728, 0.031672701239585876, 0.04633351042866707, -0.06078406050801277, 0.022650664672255516, -0.06498924642801285, -0.06544799357652664, -0.07370544970035553, -0.020720100030303, -0.03352680429816246, 0.08494476974010468, 0.04851255938410759, -0.009652814827859402, 0.0322079062461853, 0.041631344705820084, 0.019238729029893875 ]
718,034
pytorch_optimizer.optimizer.shampoo_utils
SQRTNGraft
Graft using SQRTN.
class SQRTNGraft(Graft): r"""Graft using SQRTN.""" def __init__(self, var: torch.Tensor): super().__init__(var) def precondition_gradient(self, grad: torch.Tensor) -> torch.Tensor: r"""Get preconditioned gradient.""" return grad.sign()
(var: torch.Tensor)
[ -0.042760219424963, -0.0666407123208046, 0.0036622497718781233, -0.0025275638327002525, 0.018055321648716927, 0.0037777565885335207, -0.04834078997373581, -0.0237899012863636, 0.061712417751550674, -0.02447841316461563, 0.0191152673214674, 0.04308635741472244, -0.033121053129434586, 0.048703163862228394, -0.07290979474782944, 0.03368273377418518, 0.03525906428694725, 0.02000308595597744, 0.03949884697794914, -0.02763107419013977, -0.014476871117949486, -0.010427333414554596, -0.03679915517568588, 0.06424903869628906, -0.021452585235238075, 0.034951042383909225, 0.03692598640918732, -0.03353778272867203, -0.040585972368717194, -0.02114456705749035, -0.0037279301322996616, -0.021488822996616364, 0.04319506883621216, 0.03252313286066055, -0.012800888158380985, -0.03960755839943886, -0.0028537011239677668, -0.008126253262162209, -0.07385197281837463, -0.02429722622036934, 0.004160515032708645, -0.02224980853497982, 0.025565538555383682, -0.02513068914413452, -0.0038321129977703094, -0.004065391607582569, 0.02333693392574787, 0.021072091534733772, -0.06852506101131439, 0.029098691418766975, 0.047108717262744904, -0.017194680869579315, 0.027576718479394913, -0.0014993255026638508, -0.07776562124490738, 0.01687760278582573, 0.03525906428694725, 0.047724753618240356, 0.003182103158906102, 0.0037754918448626995, 0.03457054868340492, 0.010753470472991467, 0.0017892252653837204, 0.001111471327021718, 0.014621821232140064, 0.0283195860683918, -0.043013881891965866, 0.003234194591641426, 0.023934852331876755, 0.036980342119932175, -0.044137243181467056, 0.02092714235186577, -0.028935622423887253, -0.010092136450111866, 0.024134157225489616, -0.015853894874453545, 0.01371588371694088, 0.011405744589865208, -0.020818429067730904, -0.035385895520448685, 0.034914806485176086, -0.0045523326843976974, 0.008171550929546356, -0.0035852452274411917, 0.00012952066026628017, -0.07827294617891312, 0.02360871434211731, -0.029515422880649567, 0.030892446637153625, -0.0377594493329525, -0.0535227507352829, -0.00551262591034174, -0.007560043130069971, -0.029044335708022118, 0.08349113911390305, 0.026634544134140015, -0.00900954194366932, -0.0475798025727272, -0.03078373521566391, -0.04598535597324371, -0.013099847361445427, 0.12683115899562836, -0.018254628404974937, 0.006291731260716915, 0.043231308460235596, 0.0021629242692142725, -0.035132233053445816, -0.03466114401817322, 0.029750965535640717, -0.03221511468291283, -0.030511952936649323, -0.004769757390022278, -0.002874084748327732, 0.005938415881246328, -0.008275733329355717, -0.05747263506054878, -0.021742485463619232, 0.049464151263237, 0.036074407398700714, 0.02319198288023472, 0.08298381417989731, 0.022068621590733528, -0.03324788436293602, 0.0323781818151474, -0.008742290548980236, 0.06852506101131439, 0.042144183069467545, 0.04199923202395439, 0.001920586102642119, -0.06493755429983139, -0.020039323717355728, 0.022739015519618988, -0.007419622968882322, 0.023500002920627594, -0.004269227385520935, 0.04431843012571335, 0.060117971152067184, 0.008601870387792587, 0.04656515270471573, 0.04083963483572006, 0.00840709451586008, 0.03346530720591545, -0.00005555940879276022, -0.027087511494755745, -0.0022014265414327383, 0.060589056462049484, -0.020329223945736885, 0.027268700301647186, 0.021035853773355484, -0.008909888565540314, 0.016080379486083984, 0.028917504474520683, 0.046637628227472305, -0.010925598442554474, 0.04381110519170761, -0.003141336143016815, 0.010989014059305191, -0.06345181912183762, 0.011224557645618916, 0.02203238382935524, -0.03862914815545082, -0.0019024674547836185, -0.037614498287439346, 0.01642463542521, 0.014558405615389347, -0.014350039884448051, 0.05171087756752968, -0.06029915809631348, -0.05439244955778122, 0.05489977449178696, -0.00718860886991024, -0.03230571001768112, -0.0247320756316185, 0.02966037206351757, 0.017131265252828598, 0.04942791536450386, -0.008665286004543304, 0.07530146837234497, -0.045043181627988815, -0.02851889282464981, 0.014676176942884922, -0.03884657099843025, -0.011396685615181923, -0.04185428470373154, 0.0399336963891983, 0.010699114762246609, -0.027123749256134033, 0.008289322257041931, -0.0019975907634943724, -0.006944005843251944, -0.009331149980425835, -0.00449344702064991, 0.029714729636907578, -0.024605244398117065, 0.0073154401034116745, 0.0015423574950546026, -0.02000308595597744, 0.011967426165938377, 0.048703163862228394, 0.004235254600644112, -0.009711642749607563, -0.006219256669282913, 0.03310293331742287, -0.004015564918518066, -0.03931766003370285, -0.03859290853142738, -0.03212451934814453, -0.0003425573813728988, -0.04247032105922699, -0.019640710204839706, -0.04714495316147804, 0.014757711440324783, 0.010943717323243618, 0.02877255529165268, -0.013851774856448174, -0.05142097547650337, 0.026906324550509453, 0.010372976772487164, 0.0023010796867311, 0.019024673849344254, 0.08095451444387436, -0.05660293623805046, 0.008139843121170998, -0.004423236940056086, 0.022394759580492973, 0.021651890128850937, 0.01506572961807251, -0.01661488227546215, -0.03263184428215027, -0.07537394762039185, 0.007913358509540558, -0.0045523326843976974, 0.016469931229948997, 0.01460370235145092, 0.018571706488728523, 0.014467811211943626, -0.038991522043943405, 0.01777448132634163, 0.05145721510052681, 0.0050596571527421474, -0.03460678830742836, -0.008769468404352665, -0.0322875902056694, 0.07421434670686722, 0.028681961819529533, 0.023989208042621613, 0.046637628227472305, 0.012855243869125843, -0.028627604246139526, 0.029279878363013268, -0.07849036902189255, -0.04739861562848091, -0.04308635741472244, 0.026707017794251442, 0.00628267228603363, 0.017711065709590912, -0.011269854381680489, 0.028247110545635223, 0.014177911914885044, -0.03957132250070572, -0.018100619316101074, -0.07907016575336456, -0.029787203297019005, 0.05421126261353493, -0.02382613904774189, -0.00017977184324990958, 0.00399291655048728, 0.006762818433344364, 0.030711259692907333, -0.00646385969594121, 0.10530610382556915, 0.09914573282003403, -0.0368172749876976, -0.02581920102238655, 0.026580186560750008, -0.009213377721607685, -0.02360871434211731, 0.06805397570133209, 0.022539708763360977, -0.025964150205254555, 0.03797687217593193, -0.05152968689799309, 0.008311971090734005, 0.041926756501197815, 0.014639939181506634, 0.029515422880649567, -0.0413469597697258, -0.07979492098093033, 0.03866538405418396, -0.018988436087965965, 0.019459523260593414, 0.04069468379020691, 0.0741056352853775, 0.007940536364912987, 0.09320278465747833, -0.035603318363428116, -0.01816403493285179, 0.02514880709350109, 0.020093679428100586, 0.028355823829770088, 0.07921511679887772, -0.011867772787809372, -0.014585583470761776, 0.019006555899977684, -0.016297804191708565, -0.0018356546061113477, 0.00018614171131048352, 0.02266653999686241, -0.0012988869566470385, -0.042796459048986435, -0.043231308460235596, 0.0024143217597156763, -0.06519121676683426, 0.00810360535979271, 0.018716655671596527, -0.01471241470426321, 0.012030841782689095, -0.07435929775238037, 0.025801081210374832, 0.03529530018568039, -0.009127314202487469, -0.009992484003305435, 0.052653051912784576, 0.06486508250236511, -0.08653508871793747, -0.08204164355993271, -0.04942791536450386, -0.008484099060297012, -0.07421434670686722, -0.004665574990212917, -0.02382613904774189, 0.013788359239697456, 0.05276176333427429, 0.006953065283596516, -0.06924981623888016, 0.00015853895456530154, 0.08088204264640808, 0.03397263213992119, 0.005634927190840244, -0.048884354531764984, 0.04739861562848091, 0.014150734059512615, 0.008502217009663582, 0.06156747043132782, 0.015337510965764523, -0.011713763698935509, -0.02828334830701351, -0.0468188151717186, 0.08233153820037842, 0.03100115992128849, -0.04518812894821167, -0.03165343403816223, -0.0037460490129888058, 0.035422131419181824, 0.022883964702486992, 0.025438707321882248, 0.0017914901254698634, -0.025891674682497978, 0.00034935190342366695, -0.036545492708683014, 0.02830146811902523, 0.01440439559519291, -0.05026137828826904, 0.04449961706995964, -0.008085486479103565, -0.0036781036760658026, 0.002287490526214242, -0.018100619316101074, 0.008013011887669563, 0.05435620993375778, -0.0010038912296295166, -0.06870625168085098, -0.05482729896903038, 0.04609406739473343, -0.05624055862426758, -0.030022747814655304, -0.08320124447345734, -0.017711065709590912, 0.03772320970892906, -0.02516692504286766, 0.02205050364136696, -0.017484581097960472, -0.014775830321013927, -0.0026679839938879013, -0.010282383300364017, 0.007908828556537628, -0.011197379790246487, 0.028410179540514946, 0.026562068611383438, -0.03145412728190422, -0.0102189676836133, -0.044137243181467056, 0.06544487923383713, 0.002154997317120433, -0.0948697105050087, -0.008330089040100574, -0.003005445469170809, 0.0075736320577561855, -0.010472630150616169, -0.005471858661621809, -0.017176562920212746, 0.007075367029756308, -0.019151505082845688, -0.006414033006876707, 0.007569102570414543, -0.047760989516973495, 0.02384425885975361, 0.06631457805633545, 0.030185816809535027, 0.027957212179899216, -0.018988436087965965, 0.0054492102935910225, -0.016551466658711433, 0.04047725722193718, 0.009303971193730831, -0.07377950102090836, 0.03529530018568039, -0.02498573809862137, -0.035856980830430984, 0.0552259124815464, 0.02766731195151806, 0.01711314730346203, 0.06606091558933258, 0.04022359475493431, -0.016026023775339127, 0.020311104133725166, -0.04388358071446419, -0.00832103006541729, -0.027739787474274635, 0.05957440659403801, -0.04308635741472244, -0.015645530074834824, -0.016922900453209877, -0.00956669356673956, 0.01956823654472828, -0.011940247379243374, -0.020111797377467155, 0.006196608301252127, -0.022739015519618988, 0.0602266825735569, 0.05138473957777023, -0.0020021204836666584, 0.004253373481333256, -0.02851889282464981, -0.003646395867690444, -0.04141943156719208, 0.022412877529859543, -0.00322966487146914, -0.011740941554307938, -0.022829608991742134, 0.007274672854691744, 0.03388203680515289, 0.03478797525167465, 0.044644568115472794, -0.0006868133787065744, -0.008923478424549103, -0.04536931961774826, -0.016968198120594025, -0.04895682632923126, -0.0014857364585623145, -0.014250386506319046, 0.060154207050800323, -0.07537394762039185, 0.013407865539193153, -0.01022802758961916, -0.004996242001652718, 0.043919820338487625, -0.06073400750756264, -0.058052435517311096, -0.03344718739390373, 0.024224750697612762, -0.0007400371832773089, -0.0015265035908669233, -0.05837856978178024, -0.009412683546543121, 0.0022648421581834555, -0.030077103525400162, 0.022521590813994408, -0.015853894874453545, -0.01371588371694088, -0.02741364948451519, -0.05692907050251961, -0.03252313286066055, 0.0839259922504425, -0.024351581931114197, 0.03277679532766342, -0.049572866410017014, 0.02514880709350109, 0.07189515233039856, -0.02494950033724308, -0.026181574910879135, 0.013598112389445305, 0.08030224591493607, 0.025909794494509697, -0.030439479276537895, 0.007233905605971813, -0.03466114401817322, 0.010871242731809616, 0.02000308595597744, 0.01167752593755722, 0.012782769277691841, 0.03531341999769211, -0.0845782682299614, 0.04297764599323273, 0.02362683415412903, -0.05576947331428528, -0.028265230357646942, 0.04558674246072769, -0.000965955201536417, -0.03216075897216797, 0.006042598746716976, 0.010816886089742184, 0.03264996409416199, -0.016343101859092712, 0.019459523260593414, -0.01599884405732155, -0.01440439559519291, 0.04964533820748329, 0.02607286348938942, -0.03255937248468399, -0.006717521697282791, 0.048884354531764984, -0.04022359475493431, -0.021217040717601776, 0.023554358631372452, 0.010300502181053162, 0.017656709998846054, -0.006255493964999914, 0.03620123863220215, 0.0322875902056694, 0.055878184735774994, 0.008343678899109364, 0.039208948612213135, 0.04015112295746803, -0.014313802123069763, 0.06580725312232971, -0.027558598667383194, -0.018771011382341385, -0.01135138887912035, -0.04645644128322601, -0.02380802109837532, -0.009236026555299759, 0.01998496800661087, 0.02967849187552929, -0.020601004362106323, 0.028881266713142395, 0.007958655245602131, 0.01223014760762453, -0.03368273377418518, 0.0036169528029859066, -0.053631462156772614, -0.00988377071917057, -0.015636470168828964, -0.013018312864005566, 0.04598535597324371, 0.050188902765512466, -0.04580416902899742, 0.04297764599323273, 0.03913647308945656, -0.009485159069299698, -0.01777448132634163, -0.051819588989019394, 0.10189978033304214, 0.0315266028046608, -0.07396068423986435, 0.003648660611361265, -0.0006828499026596546, 0.015455283224582672, -0.018988436087965965, 0.011315151117742062, -0.00381625909358263, -0.03569391369819641, 0.05801619589328766, 0.06298073381185532, -0.0030552721582353115, -0.028845028951764107, 0.0068443529307842255, -0.06182113289833069, -0.01426850538700819, -0.016968198120594025, 0.03978874534368515, -0.051167313009500504, -0.012538165785372257, -0.04334001988172531, -0.025003857910633087, 0.043231308460235596, -0.04051349684596062, 0.0597555935382843, -0.00033151626121252775, -0.021488822996616364, 0.02293832041323185, 0.021180802956223488, 0.02248535305261612, -0.04000617191195488, 0.036944106221199036, -0.06667695194482803, -0.027522360906004906, -0.007845412939786911, 0.035168468952178955, -0.006694873329252005, -0.034479957073926926, 0.03221511468291283, 0.017158444970846176, 0.010526985861361027, -0.00729732122272253, -0.04497070610523224, -0.0399336963891983, -0.006504626478999853, 0.013435043394565582, -0.08617271482944489, 0.015663648024201393, -0.010934658348560333, -0.0645751804113388, 0.009793177247047424, -0.04645644128322601, -0.03100115992128849, -0.07370702177286148, 0.040767159312963486, 0.03011334128677845, 0.02967849187552929, -0.02877255529165268, 0.027794143185019493, -0.03768697381019592, -0.003333847736939788, 0.032686203718185425, -0.016705475747585297, 0.03431688994169235, -0.10559599846601486, -0.04917425289750099, -0.042542796581983566, 0.024659601971507072, 0.00449344702064991, 0.016343101859092712, -0.042796459048986435, -0.05642174929380417, -0.00944892130792141, -0.010083077475428581, 0.01822744868695736, -0.03362837806344032, 0.011505397967994213, -0.03150848299264908, 0.0475798025727272, -0.021688127890229225, -0.00021700018260162324, -0.007886180654168129, -0.008171550929546356, -0.05058751255273819, -0.05576947331428528, -0.009947186335921288, -0.03484233096241951, -0.023518120869994164, 0.09407248347997665, 0.05392136052250862, 0.007655166555196047, 0.0008793249726295471, 0.02357247658073902, 0.001015781657770276, 0.019151505082845688, 0.07682344317436218, -0.003284021047875285, 0.025239400565624237, -0.01394236832857132, 0.004842232447117567, 0.05993678420782089, -0.04225289449095726, 0.017674827948212624, 0.022757133468985558, -0.04105705767869949, -0.01864418014883995, -0.04747109115123749, -0.05243562534451485, 0.02221357263624668, -0.03732459992170334, -0.035168468952178955, 0.013398806564509869, -0.021072091534733772, 0.03725212439894676, 0.014060139656066895, 0.009041249752044678, -0.024170394986867905, 0.016361219808459282, 0.02293832041323185, -0.0021934995893388987, 0.03415381908416748, 0.02069159783422947, -0.00449344702064991, -0.04555050656199455, 0.04069468379020691, -0.03208828344941139, -0.03205204755067825, -0.03286739066243172, -0.05374017357826233, -0.004661045037209988, 0.01998496800661087, 0.07450424879789352, -0.0283195860683918, -0.041020821779966354, 0.006645046640187502, -0.03188897669315338, -0.024405939504504204, 0.04489823058247566, -0.007238435558974743, -0.04536931961774826, 0.03906399756669998, -0.01069005485624075, 0.015092908404767513, 0.03804934769868851, -0.008470509201288223, -0.02114456705749035, -0.012909600511193275, 0.03913647308945656, -0.010318621061742306, 0.022304166108369827, -0.0010695717064663768, 0.01707690954208374, 0.014984196051955223, 0.042180418968200684, 0.042832694947719574, -0.044354669749736786, -0.026217812672257423, -0.02333693392574787, -0.014295683242380619, 0.026580186560750008, 0.013652468100190163, 0.027794143185019493, -0.011523516848683357, -0.014259446412324905, -0.01077158935368061, -0.024387819692492485, -0.06606091558933258, 0.018100619316101074, 0.029352353885769844, 0.025456825271248817, -0.051602162420749664, 0.008665286004543304, -0.010164611972868443, 0.03466114401817322, 0.016361219808459282, -0.008710582740604877, 0.0021255542524158955, 0.00539938360452652, 0.030385121703147888, 0.003238724311813712, -0.06312567740678787, 0.059429459273815155, 0.051131077110767365, -0.03413569927215576, -0.03217887878417969, -0.005480918101966381, -0.017692947760224342, 0.10719045251607895, 0.043050117790699005, 0.022575946524739265, -0.01953199878334999, 0.09457980841398239, -0.04044102132320404, 0.03453431278467178, -0.024677719920873642, -0.0795774906873703, -0.07214881479740143, -0.04156438261270523, -0.06073400750756264, 0.030222052708268166, 0.03939013555645943, -0.017611412331461906, 0.021978028118610382, 0.017176562920212746, 0.014504048973321915 ]
718,035
pytorch_optimizer.optimizer.shampoo_utils
__init__
null
def __init__(self, var: torch.Tensor): super().__init__(var)
(self, var: torch.Tensor)
[ -0.03588296100497246, 0.0012609733967110515, 0.02136136032640934, 0.019608458504080772, -0.0034671397879719734, 0.04890944063663483, -0.06740085035562515, 0.063070148229599, 0.01741732843220234, -0.012734327465295792, 0.0029343946371227503, 0.059495601803064346, -0.03320205211639404, 0.028957275673747063, -0.019694384187459946, 0.031706929206848145, 0.01986623741686344, 0.03428472578525543, 0.004399443510919809, 0.029197869822382927, -0.024729685857892036, 0.009168371558189392, -0.028699494898319244, 0.01742592081427574, 0.004717372357845306, 0.04193219915032387, 0.00830051302909851, -0.02173943817615509, -0.003525140229612589, -0.00852392241358757, -0.05516489967703819, 0.01993497833609581, 0.022031588479876518, 0.08077103644609451, 0.02924942597746849, -0.03574547916650772, -0.01722829043865204, 0.04275709390640259, -0.08613285422325134, 0.03254900872707367, 0.016051094979047775, -0.06771019101142883, -0.014624712988734245, 0.012639807537198067, -0.0043135168962180614, -0.004004181362688541, 0.015398052521049976, -0.02601858414709568, -0.01888667419552803, -0.01058616116642952, 0.0021084246691316366, -0.03199907764792442, 0.0379108302295208, -0.0030138767324388027, -0.045747339725494385, 0.08654530346393585, 0.05296517536044121, 0.029782170429825783, -0.04557548835873604, 0.06417001038789749, -0.010405715554952621, -0.006113680079579353, 0.011230611242353916, -0.026757553219795227, -0.0011643058387562633, -0.020227130502462387, -0.048118915408849716, 0.018010223284363747, 0.007402579300105572, 0.04255086928606033, 0.002071905881166458, 0.0191444531083107, 0.03064143843948841, 0.033855095505714417, 0.06056109070777893, 0.0009795635705813766, -0.04801580309867859, -0.005761380773037672, 0.003913958091288805, -0.0386669859290123, 0.007020206190645695, -0.022358110174536705, -0.05207154154777527, 0.06190154701471329, -0.009357410483062267, -0.0837269127368927, -0.030658623203635216, -0.044544365257024765, 0.004356480203568935, 0.01334440615028143, -0.09706272184848785, 0.05124664306640625, -0.002274907659739256, 0.009915933944284916, 0.023526713252067566, -0.010715051554143429, 0.03158663213253021, -0.05812077596783638, -0.008420810103416443, -0.014126338995993137, 0.008927777409553528, 0.05131538584828377, 0.018835118040442467, 0.018113333731889725, -0.001933349296450615, -0.017400143668055534, -0.03239434212446213, -0.004502555821090937, 0.016798656433820724, 0.0072350227274000645, -0.031208554282784462, 0.04299768805503845, -0.04949374124407768, 0.07905250042676926, -0.036432892084121704, -0.05231213569641113, -0.010568976402282715, -0.025623321533203125, 0.0059847901575267315, 0.049768704921007156, 0.0386669859290123, 0.06788203865289688, -0.05372133105993271, 0.01546679437160492, 0.003157803788781166, 0.059117525815963745, 0.01730562373995781, -0.02148165926337242, -0.027204371988773346, -0.05770832672715187, -0.02136136032640934, -0.026156067848205566, -0.05808640271425247, 0.04299768805503845, 0.01565583236515522, -0.010414307937026024, 0.03612355515360832, 0.00487204035744071, -0.0005045504658482969, 0.030847661197185516, 0.0007615247741341591, 0.04306642711162567, 0.05073108524084091, -0.020003721117973328, 0.009245705790817738, 0.044063176959753036, 0.01094705332070589, -0.010526012629270554, -0.006423016078770161, -0.06856945157051086, -0.02230655401945114, 0.019436605274677277, 0.018336743116378784, -0.010336973704397678, -0.017769627273082733, 0.00796110276132822, -0.015715980902314186, -0.07217837125062943, 0.06471993774175644, -0.0005271061672829092, -0.03632977977395058, 0.03536740317940712, -0.020897356793284416, -0.03911380469799042, -0.006246866192668676, 0.014916863292455673, -0.0019365715561434627, -0.024987464770674706, -0.03698282316327095, 0.01233047153800726, -0.02969624474644661, -0.10593035072088242, 0.0011621577432379127, 0.05128101631999016, -0.0012641956564038992, 0.0016025317599996924, -0.0038001053035259247, 0.03048676997423172, -0.029146313667297363, 0.046572234481573105, 0.038013942539691925, -0.027685562148690224, -0.015166050754487514, -0.008601255714893341, 0.017666516825556755, -0.00963237602263689, 0.012399213388562202, 0.022581519559025764, 0.024609388783574104, -0.002730318810790777, 0.003598177805542946, 0.026310734450817108, -0.03684534132480621, -0.037567123770713806, 0.017219698056578636, 0.010130750015377998, 0.025588952004909515, -0.03383790701627731, -0.014573156833648682, 0.015896426513791084, 0.015827685594558716, 0.01302647776901722, 0.01831955835223198, -0.018336743116378784, -0.03629541024565697, -0.0034671397879719734, -0.004644334781914949, 0.07822760939598083, -0.012631215155124664, -0.0394231379032135, -0.005104042124003172, -0.005464933812618256, 0.0536869615316391, 0.038804467767477036, 0.03241152688860893, -0.09981238096952438, -0.05812077596783638, -0.030796105042099953, 0.01783837005496025, 0.025210874155163765, 0.14806877076625824, -0.012631215155124664, -0.05736462026834488, 0.0035015102475881577, -0.008734442293643951, 0.0006412275251932442, 0.0025498729664832354, -0.07087228447198868, -0.040110550820827484, -0.0443037711083889, -0.012519510462880135, -0.010929867625236511, -0.0443037711083889, 0.006332792807370424, 0.021825365722179413, 0.06506364792585373, -0.00015708462160546333, 0.003681956324726343, -0.03932002931833267, -0.025107761844992638, -0.015776129439473152, 0.010216676630079746, 0.0060148644261062145, -0.008077103644609451, 0.038804467767477036, 0.03318486735224724, -0.00409225607290864, 0.060423608869314194, -0.05760521441698074, 0.011007201857864857, -0.014392711222171783, -0.026224808767437935, -0.03320205211639404, 0.019660014659166336, 0.029180685058236122, 0.0012394917430356145, -0.026895036920905113, -0.05011241137981415, 0.0191444531083107, -0.029232241213321686, -0.04488807171583176, -0.03124292381107807, 0.013490481302142143, 0.08647656440734863, -0.02699814923107624, -0.023217376321554184, -0.04303205758333206, 0.013731076382100582, -0.002231944352388382, -0.0031126923859119415, 0.11252951622009277, 0.07534047216176987, 0.010079193860292435, -0.02899164706468582, 0.02376730740070343, -0.059186264872550964, -0.019402233883738518, 0.039560623466968536, -0.029782170429825783, 0.05798329412937164, 0.016128428280353546, -0.0345425084233284, -0.02880260720849037, 0.0036755118053406477, -0.01959127187728882, -0.01640339381992817, 0.01587924174964428, -0.011557132005691528, -0.0450599268078804, -0.03435346856713295, 0.026946593075990677, 0.044956814497709274, 0.044131919741630554, 0.04945937171578407, 0.008970740251243114, -0.025588952004909515, -0.05162472277879715, 0.11032979935407639, 0.005232932046055794, -0.005348932929337025, 0.07176592200994492, -0.041622862219810486, -0.017374364659190178, 0.019694384187459946, -0.014521600678563118, -0.027152815833687782, -0.00134904810693115, 0.02500464953482151, 0.0027689856942743063, 0.0036991415545344353, 0.09871251881122589, 0.07272830605506897, -0.002517650369554758, 0.06929123401641846, 0.04564422741532326, 0.0379108302295208, 0.045712970197200775, -0.07925872504711151, -0.01813052035868168, 0.08627033978700638, -0.008798887021839619, 0.0018001629505306482, 0.021412916481494904, 0.02443753555417061, -0.045369263738393784, -0.031895965337753296, 0.036776598542928696, -0.0165236908942461, -0.04997492954134941, 0.024832796305418015, -0.022031588479876518, 0.02244403585791588, 0.020622391253709793, -0.02684348076581955, -0.08077103644609451, 0.009881562553346157, -0.0015166050288826227, 0.052999548614025116, 0.019917793571949005, -0.014530193991959095, 0.03514399379491806, 0.004528333432972431, -0.022581519559025764, 0.028287047520279884, 0.03952625021338463, -0.03749838471412659, 0.003937588073313236, -0.02966187335550785, 0.06368882209062576, 0.010500234551727772, -0.03461124747991562, 0.0008275808650068939, 0.014891085214912891, 0.03124292381107807, 0.051865316927433014, 0.004923596046864986, -0.03667348623275757, 0.009417559020221233, -0.0262763649225235, -0.05327451229095459, -0.020209943875670433, 0.013645149767398834, -0.002124536084011197, 0.024918723851442337, 0.031036701053380966, -0.007664655800908804, 0.027737118303775787, -0.01169461477547884, 0.003694845363497734, 0.04347887635231018, -0.008038436993956566, -0.05420251935720444, -0.03952625021338463, 0.037154678255319595, -0.004236183129251003, -0.030692992731928825, -0.09142594039440155, 0.0004889762494713068, 0.03158663213253021, -0.0072951712645590305, 0.057467732578516006, -0.003542325459420681, 0.027754303067922592, 0.000951637455727905, -0.04602230340242386, -0.007299467455595732, -0.010397122241556644, 0.013378776609897614, 0.03010869212448597, 0.021052025258541107, -0.0161456149071455, -0.015123087912797928, 0.028407344594597816, -0.03653600439429283, -0.007462728302925825, -0.024506276473402977, 0.01730562373995781, 0.0009135075379163027, -0.00936600286513567, -0.053446367383003235, -0.008859035558998585, -0.030796105042099953, 0.01847422681748867, 0.07754019647836685, -0.007462728302925825, 0.01411774568259716, 0.023440785706043243, 0.026671627536416054, 0.0023651306983083487, -0.03218811750411987, -0.0008807479753158987, 0.01775244250893593, -0.004833373241126537, 0.005353229120373726, 0.021722253412008286, -0.028562013059854507, 0.0431695394217968, -0.04794706031680107, 0.018182076513767242, 0.002158906776458025, -0.006680795922875404, 0.06966931372880936, 0.04227590560913086, 0.03667348623275757, 0.004223294090479612, 0.028183935210108757, -0.01227891631424427, 0.015776129439473152, 0.01248514000326395, -0.01216721162199974, -0.078846275806427, 0.008313401602208614, 0.014942641369998455, -0.027393409982323647, 0.03852950409054756, -0.004476777743548155, -0.027496522292494774, -0.028287047520279884, -0.03932002931833267, 0.06417001038789749, 0.02282211370766163, -0.02342360094189644, 0.0533088818192482, -0.0047345575876533985, -0.03399257734417915, -0.007462728302925825, -0.015277755446732044, 0.03203345090150833, -0.05231213569641113, -0.03808268532156944, 0.024935908615589142, -0.0009698969079181552, 0.06977242976427078, 0.01644635759294033, 0.010878311470150948, -0.038048312067985535, -0.1160353273153305, -0.014745010063052177, 0.030211804434657097, -0.036810968071222305, -0.041279155761003494, 0.05169346183538437, -0.028132379055023193, -0.053446367383003235, -0.021052025258541107, -0.035161178559064865, 0.06746958941221237, -0.04633164033293724, -0.03144914656877518, -0.01974594034254551, 0.03684534132480621, 0.01734858751296997, -0.0123906210064888, -0.0762341096997261, 0.0059418268501758575, 0.001228750916197896, 0.012665585614740849, -0.0036110668443143368, -0.03235996887087822, -0.033855095505714417, -0.053480736911296844, -0.04426940158009529, -0.006710870191454887, 0.05152161046862602, 0.002910764655098319, 0.03588296100497246, -0.047843948006629944, 0.0345425084233284, 0.06362008303403854, 0.03500651195645332, -0.04471622034907341, 0.06726337224245071, -0.03469717502593994, 0.029490020126104355, -0.005645379889756441, 0.009417559020221233, -0.0023543897550553083, 0.026705997064709663, -0.009426151402294636, 0.020639577880501747, -0.01806177757680416, -0.0061910138465464115, -0.06262332946062088, 0.027754303067922592, -0.0037055860739201307, -0.005215746816247702, -0.015595683827996254, 0.028510456904768944, -0.01682443544268608, -0.02564050815999508, 0.030246175825595856, 0.02357826754450798, -0.04138226807117462, -0.011986765079200268, 0.011617280542850494, -0.02560613676905632, -0.07485928386449814, 0.03581422194838524, -0.004820484202355146, -0.02605295553803444, 0.0007051354623399675, 0.04478496313095093, -0.002807652810588479, -0.01967719942331314, -0.012639807537198067, 0.009915933944284916, -0.03425035625696182, -0.024609388783574104, 0.04072922468185425, 0.047362759709358215, -0.010508826933801174, -0.03712030500173569, -0.018611708655953407, 0.08083977550268173, -0.010766606777906418, 0.030658623203635216, -0.004324257839471102, -0.031191367655992508, -0.04337576404213905, -0.008558292873203754, -0.010629124939441681, -0.008459476754069328, 0.03663911670446396, -0.002423131139948964, 0.006736648268997669, -0.002313574543222785, -0.06317326426506042, 0.06248584762215614, -0.011454020626842976, 0.005387600045651197, -0.0585675947368145, -0.030160248279571533, -0.04272272065281868, 0.012141433544456959, -0.01572457328438759, 0.027788672596216202, -0.03504088148474693, -0.04973433539271355, 0.007638877723366022, 0.04646912217140198, 0.030280545353889465, -0.012382027693092823, 0.06698840111494064, 0.06300140917301178, -0.019213195890188217, 0.014323970302939415, 0.007299467455595732, -0.0021342027466744184, -0.000685801962390542, -0.02424849569797516, 0.020811431109905243, -0.027840228751301765, -0.007389690726995468, 0.05492430552840233, -0.04557548835873604, 0.03577984869480133, 0.01094705332070589, 0.008798887021839619, -0.03419880196452141, -0.0290947575122118, -0.004936485085636377, -0.004781817086040974, -0.021790994331240654, 0.006839760113507509, -0.0032115080393850803, 0.027754303067922592, -0.025657692924141884, 0.030538326129317284, 0.011084536090493202, -0.014255228452384472, 0.015166050754487514, 0.03363168612122536, -0.04426940158009529, 0.0038044017273932695, 0.002513353945687413, -0.038838837295770645, -0.029936838895082474, -0.011032979935407639, 0.04557548835873604, -0.020519280806183815, -0.04481933265924454, -0.006715166382491589, -0.023664195090532303, 0.0075013949535787106, -0.01959127187728882, -0.0852392241358757, -0.0202786847949028, 0.06716025620698929, 0.004049292765557766, -0.0137052983045578, 0.02906038798391819, -0.01135950069874525, 0.009512078016996384, -0.023114264011383057, -0.008077103644609451, -0.024454720318317413, -0.057914551347494125, 0.015294941142201424, 0.04839387908577919, -0.005232932046055794, -0.0015251977602019906, -0.0019226084696128964, -0.005095449276268482, 0.01312099676579237, -0.011823505163192749, -0.0073080603033304214, 0.043272651731967926, -0.13081470131874084, -0.01544960867613554, -0.05647098273038864, 0.04760335385799408, -0.011479798704385757, -0.02046772465109825, -0.0029429872520267963, -0.014521600678563118, -0.04966559261083603, 0.004927892237901688, -0.012201582081615925, 0.034748729318380356, -0.00903088878840208, -0.02136136032640934, 0.011857875622808933, 0.019814681261777878, -0.008919185027480125, 0.01402322668582201, -0.0916321650147438, -0.01682443544268608, 0.004721668548882008, 0.008785998448729515, 0.0024596499279141426, -0.00772480433806777, 0.06808826327323914, -0.016051094979047775, 0.05657409504055977, 0.044544365257024765, -0.020295871421694756, 0.04151974990963936, 0.030005579814314842, 0.08365817368030548, 0.008463773876428604, -0.02237529493868351, 0.022512778639793396, -0.008661404252052307, 0.06406690180301666, 0.035642366856336594, -0.0145473787561059, 0.001993497833609581, -0.054718080908060074, -0.02940409444272518, 0.01349907461553812, -0.02034742757678032, 0.008588367141783237, -0.07946494966745377, -0.051006048917770386, 0.06379193067550659, -0.026001399382948875, 0.027135631069540977, -0.0298509132117033, 0.022736188024282455, 0.0023651306983083487, 0.006650721654295921, 0.0030160248279571533, 0.014504415914416313, -0.020003721117973328, -0.0015488276258111, 0.041691601276397705, -0.04746587201952934, 0.06217651069164276, -0.023045523092150688, -0.07382816076278687, -0.03029773198068142, -0.05038737878203392, -0.0060449386946856976, 0.0027582449838519096, 0.01843985542654991, -0.033545758575201035, -0.08235208690166473, -0.04258523881435394, 0.005769973620772362, -0.014066189527511597, 0.024489089846611023, -0.004597074817866087, -0.08104600012302399, 0.041657231748104095, -0.010079193860292435, -0.00497515220195055, -0.016575247049331665, -0.015896426513791084, 0.012837438844144344, 0.006040642503648996, 0.04664097726345062, 0.031002329662442207, -0.011333722621202469, -0.081870898604393, -0.006109383888542652, 0.05561171844601631, 0.0315350741147995, 0.012253138236701488, -0.033511389046907425, -0.007346727419644594, 0.008171622641384602, -0.04725964739918709, 0.0773339718580246, 0.06286392360925674, 0.06578543037176132, -0.03701719269156456, 0.019385049119591713, -0.007333838380873203, -0.019247565418481827, -0.008734442293643951, 0.0690850168466568, 0.03543614223599434, -0.006676499266177416, -0.04945937171578407, -0.0024553535040467978, -0.009907340630888939, 0.03911380469799042, 0.030435213819146156, -0.01733999513089657, 0.01402322668582201, -0.008979333564639091, -0.04341013357043266, 0.016772879287600517, 0.015947982668876648, 0.051487237215042114, -0.020106831565499306, 0.018388299271464348, -0.020828615874052048, 0.03289271518588066, -0.005731306504458189, 0.03210218995809555, 0.0409354493021965, -0.00938318856060505, 0.02864794060587883, 0.07905250042676926, -0.040179293602705, 0.03048676997423172, -0.05131538584828377, -0.044097550213336945, -0.1103985384106636, -0.039216917008161545, -0.03498932346701622, 0.0488063283264637, -0.014427081681787968, -0.020416168496012688, 0.035195548087358475, 0.07671529799699783, 0.0032201006542891264 ]
718,037
pytorch_optimizer.optimizer.shampoo_utils
precondition_gradient
Get preconditioned gradient.
def precondition_gradient(self, grad: torch.Tensor) -> torch.Tensor: r"""Get preconditioned gradient.""" return grad.sign()
(self, grad: torch.Tensor) -> torch.Tensor
[ -0.033849772065877914, -0.021183190867304802, 0.018483208492398262, 0.04163305461406708, 0.017749881371855736, 0.0017864463152363896, -0.017766548320651054, -0.010583261959254742, 0.03513309732079506, -0.03469976782798767, 0.04849967360496521, -0.00924993772059679, 0.011866587214171886, -0.02663315460085869, -0.05249964818358421, 0.006529123056679964, 0.01609155908226967, 0.00810827873647213, 0.008749941363930702, -0.026533154770731926, -0.035599760711193085, -0.07266617566347122, 0.017583215609192848, 0.03238311782479286, -0.022916512563824654, -0.004712468478828669, 0.0033874772489070892, -0.0177165474742651, 0.0074291168712079525, -0.025466496124863625, -0.04216638207435608, 0.006520789582282305, 0.032216452062129974, 0.017883213236927986, 0.031249789521098137, 0.025699827820062637, 0.024916499853134155, -0.02618315815925598, -0.052632980048656464, -0.06746621429920197, -0.028049811720848083, -0.004337470978498459, -0.00910827238112688, 0.003243728308007121, 0.02973313443362713, 0.003468726761639118, -0.007091619074344635, -0.02636648900806904, -0.03416643664240837, 0.04286637902259827, 0.0418330542743206, 0.024499835446476936, 0.009908267296850681, -0.023866506293416023, -0.048266343772411346, -0.009633269160985947, 0.06053292751312256, -0.019099872559309006, -0.04176638647913933, 0.009691601619124413, 0.0426330491900444, -0.025199830532073975, -0.014508236199617386, -0.030316462740302086, 0.018049878999590874, 0.02403317205607891, -0.03193311765789986, -0.0207831934094429, 0.06313291192054749, 0.02688315324485302, -0.04426636919379234, 0.01662488840520382, 0.006574955768883228, -0.014466569758951664, 0.031233124434947968, -0.09306604415178299, 0.06569956243038177, -0.0025353997480124235, -0.029883133247494698, -0.07499949634075165, 0.0004895800375379622, -0.001787487999536097, 0.02958313561975956, 0.016391556710004807, 0.045433029532432556, -0.06586622446775436, -0.01289158035069704, -0.018416542559862137, -0.009274938143789768, -0.00036536212428472936, 0.0017187384655699134, 0.009824934415519238, -0.0068666208535432816, -0.04229971766471863, 0.10413263738155365, 0.041799720376729965, -0.004054139368236065, 0.023583175614476204, 0.01808321289718151, 0.007845780812203884, 0.036666419357061386, 0.1264658123254776, -0.03203311935067177, -0.027483148500323296, 0.06933286786079407, -0.0264664888381958, -0.009783267974853516, -0.05713295191526413, 0.017233217135071754, -0.06999953091144562, 0.016124891117215157, -0.037866413593292236, 0.012808247469365597, -0.03799974545836449, 0.00587496068328619, -0.025483163073658943, -0.027583148330450058, -0.02104985900223255, 0.010149931535124779, 0.036833085119724274, 0.05386630445718765, 0.028599807992577553, -0.03201645240187645, 0.02661648765206337, -0.005016632843762636, 0.026516489684581757, 0.05439963564276695, 0.06073292717337608, 0.015374897047877312, -0.029799800366163254, 0.015091565437614918, 0.00024687335826456547, 0.019616534933447838, 0.003331227693706751, 0.012758247554302216, -0.011274924501776695, 0.04279971122741699, 0.011841587722301483, 0.023949839174747467, 0.008141611702740192, 0.05416630208492279, 0.026566488668322563, -0.0136332418769598, 0.03899974003434181, 0.020616527646780014, 0.05486629903316498, -0.028749806806445122, 0.043166376650333405, 0.03009979799389839, 0.02228318341076374, 0.0386330746114254, 0.01592489331960678, 0.0006265583215281367, -0.06023292988538742, 0.025049831718206406, -0.012058252468705177, 0.001261449884623289, -0.04239971563220024, 0.006141625344753265, -0.04293304681777954, -0.03813307732343674, -0.021099857985973358, -0.013124912045896053, -0.001520823105238378, 0.011383256874978542, -0.004849967546761036, 0.024933166801929474, -0.008374943397939205, -0.047733012586832047, 0.03359977528452873, 0.01861654222011566, -0.056532952934503555, 0.00274998159147799, 0.04649968817830086, -0.03813307732343674, 0.034099772572517395, 0.011449922807514668, 0.05389963835477829, -0.06549955904483795, 0.028666473925113678, 0.059666264802217484, 0.029199805110692978, -0.016441555693745613, -0.032349783927202225, 0.07186618447303772, -0.018266543745994568, -0.05199965089559555, 0.003414560342207551, 0.029416469857096672, -0.005087465979158878, -0.03156645596027374, -0.00979993399232626, 0.06663288921117783, -0.0019333204254508018, -0.0020135282538831234, -0.03823307529091835, 0.023983173072338104, 0.04346637427806854, 0.06626622378826141, -0.02041652984917164, 0.029549801722168922, -0.0205165296792984, 0.034366436302661896, 0.003308311104774475, -0.04636635631322861, -0.00944993644952774, -0.03439977020025253, 0.006466623395681381, -0.014074905775487423, 0.003935390152037144, -0.020383195951581, 0.018466543406248093, -0.02823314443230629, -0.0027208151295781136, -0.019899867475032806, -0.008841607719659805, 0.05699961632490158, 0.0071666184812784195, -0.011816587299108505, 0.013558242470026016, 0.015833226963877678, -0.05049966275691986, 0.06699954718351364, -0.04293304681777954, 0.036933086812496185, -0.03203311935067177, 0.001724988454952836, -0.029416469857096672, -0.007666615303605795, -0.02538316324353218, 0.019383203238248825, -0.022499850019812584, 0.028199810534715652, -0.012116585858166218, 0.06363290548324585, 0.03603309020400047, -0.05093299224972725, 0.012774914503097534, 0.04943300038576126, 0.002772898180410266, -0.023033179342746735, 0.00023007657728157938, 0.008733274415135384, 0.0967993512749672, 0.02106652595102787, 0.015083231963217258, 0.039666399359703064, 0.022266516461968422, 0.008337443694472313, 0.02863314189016819, -0.0721995159983635, -0.04229971766471863, -0.035199765115976334, -0.005137465428560972, 0.0185165423899889, 0.025899825617671013, 0.06939953565597534, 0.015241564251482487, 0.03919973596930504, 0.0010697845136746764, -0.027483148500323296, -0.08413276821374893, 0.01986653357744217, -0.01398323941975832, -0.04239971563220024, 0.006904120557010174, 0.04769967868924141, 0.0420997180044651, 0.007079119328409433, 0.04349970817565918, -0.00023163907462731004, 0.022266516461968422, -0.024066505953669548, -0.04979966580867767, 0.04256638139486313, -0.017599882557988167, 0.03876640647649765, 0.03131645545363426, 0.05243298038840294, 0.030733127146959305, 0.037366416305303574, -0.047733012586832047, -0.042899712920188904, 0.03866640850901604, -0.050032999366521835, 0.023733174428343773, -0.0007494741585105658, -0.07119952142238617, 0.0009312437614426017, -0.016391556710004807, 0.025716494768857956, 0.050299663096666336, 0.0391664057970047, -0.04009973257780075, 0.05919960141181946, -0.009749935008585453, 0.06533289700746536, -0.043266378343105316, 0.020283197984099388, 0.02483316697180271, 0.072466179728508, -0.006149958819150925, -0.06506623327732086, -0.022066518664360046, -0.03446643427014351, -0.014858233742415905, 0.015466563403606415, 0.039366401731967926, -0.015999892726540565, -0.026499822735786438, -0.07946613430976868, -0.021266523748636246, 0.0044624703004956245, 0.011941586621105671, -0.022366516292095184, -0.03933306783437729, 0.01578322798013687, -0.04499970003962517, 0.0499996654689312, 0.034666433930397034, 0.021833186969161034, 0.04239971563220024, 0.03619975596666336, 0.023966506123542786, -0.08339943736791611, -0.041933052241802216, -0.020983193069696426, -0.0062332917004823685, -0.02094985917210579, 0.03616642579436302, -0.028016479685902596, -0.004177055321633816, 0.031033124774694443, 0.000664058024995029, -0.006237457972019911, 0.00037083085044287145, 0.09073272347450256, 0.027483148500323296, -0.04083305969834328, -0.04546636343002319, 0.010241597890853882, -0.03589975833892822, -0.008024945855140686, 0.03231645002961159, -0.013324910774827003, -0.022183185443282127, -0.0012458249693736434, -0.012991579249501228, 0.03278311342000961, 0.04496636614203453, -0.007483283057808876, -0.005766627844423056, -0.03839974105358124, 0.015866560861468315, 0.01567489467561245, 0.013941572979092598, -0.03903307020664215, -0.016783220693469048, 0.04526636376976967, -0.0023145677987486124, 0.03238311782479286, 0.008158278651535511, -0.012824914418160915, 0.029633134603500366, -0.00008502547279931605, -0.00475830165669322, -0.01904987171292305, 0.01794987916946411, -0.05176632106304169, 0.007383283693343401, 0.014874900691211224, -0.0412997230887413, -0.01344157662242651, -0.020833194255828857, -0.06053292751312256, -0.02553316205739975, -0.03426643833518028, -0.012108252383768559, 0.029749801382422447, 0.010449930094182491, -0.02728315070271492, -0.005324964411556721, -0.05846627429127693, 0.018016545102000237, -0.026716487482190132, 0.019266538321971893, -0.016783220693469048, -0.05779961124062538, 0.035166431218385696, -0.03064979426562786, 0.020316530019044876, -0.05303297936916351, 0.02199985273182392, -0.0030791459139436483, -0.019749866798520088, -0.01149158924818039, 0.05809960886836052, 0.017183218151330948, 0.022749846801161766, -0.001002597389742732, -0.04713301733136177, -0.008495775982737541, 0.005995793268084526, -0.02041652984917164, -0.0077207814902067184, -0.05023299530148506, -0.010183265432715416, 0.048433009535074234, 0.03983306512236595, 0.08266611397266388, 0.008866607211530209, -0.0006552039412781596, 0.01473323442041874, 0.02743314951658249, -0.0017864463152363896, -0.01309991255402565, -0.020899860188364983, -0.0213165245950222, -0.016316557303071022, 0.018049878999590874, 0.028316477313637733, -0.05023299530148506, 0.057332947850227356, -0.013133245520293713, -0.047899678349494934, 0.018999872729182243, -0.022666513919830322, 0.020966526120901108, -0.049899663776159286, 0.050032999366521835, -0.0055666291154921055, -0.02471650019288063, 0.018399877473711967, -0.0019854032434523106, -0.012399916537106037, 0.006012459751218557, 0.005549962632358074, 0.061132922768592834, -0.025316497310996056, 0.043699707835912704, 0.06986619532108307, -0.010858260095119476, 0.010449930094182491, 0.011624922044575214, -0.04713301733136177, -0.0075499494560062885, 0.002874980680644512, -0.03926640376448631, -0.01039993017911911, -0.017199885100126266, -0.002999979769811034, 0.006804121192544699, 0.04633302241563797, 0.002754148095846176, -0.01916653849184513, 0.009266604669392109, -0.066432885825634, -0.05309964343905449, -0.0189165398478508, 0.025149831548333168, 0.011508256196975708, 0.0737995058298111, -0.06959953159093857, -0.021233191713690758, 0.0154748959466815, -0.024499835446476936, 0.03846640884876251, -0.0205165296792984, -0.015191564336419106, 0.008495775982737541, 0.012199917808175087, -0.0313497893512249, -0.02393317222595215, -0.04426636919379234, -0.040466394275426865, 0.004320804495364428, -0.053666308522224426, 0.06426623463630676, 0.05903293564915657, 0.02148318849503994, -0.05119965597987175, -0.03973306715488434, -0.033283110707998276, 0.054899632930755615, 0.01838321052491665, -0.022083185613155365, -0.08979939669370651, 0.031966451555490494, 0.05406630411744118, 0.007354117464274168, 0.014741567894816399, -0.025883160531520844, 0.058699607849121094, 0.00871660839766264, -0.024816500023007393, -0.026949819177389145, 0.008187444880604744, -0.036399755626916885, 0.01969986781477928, 0.03779974579811096, -0.0136332418769598, 0.024649834260344505, -0.07719948142766953, 0.05149965360760689, -0.0166082214564085, -0.09106605499982834, -0.028599807992577553, 0.04769967868924141, 0.04743301495909691, -0.014399903826415539, 0.01986653357744217, 0.06493289768695831, -0.023183178156614304, 0.04399970546364784, -0.002795814536511898, -0.005366630852222443, -0.03469976782798767, 0.05609962344169617, 0.04319971054792404, -0.023599842563271523, -0.032883111387491226, 0.05606628954410553, -0.04346637427806854, -0.035466428846120834, -0.00123332510702312, 0.022999845445156097, -0.017849881201982498, -0.08686608076095581, -0.007087452337145805, 0.02334984391927719, -0.013791574165225029, -0.025999825447797775, 0.04346637427806854, 0.029516467824578285, -0.051532987505197525, 0.02888314053416252, -0.0027999812737107277, -0.052066318690776825, -0.10093265771865845, -0.04359970614314079, 0.008037446066737175, -0.006345790810883045, 0.07946613430976868, 0.04496636614203453, 0.018933206796646118, 0.014841566793620586, -0.024933166801929474, 0.027199817821383476, -0.07313284277915955, 0.009299937635660172, -0.05946626886725426, 0.0033728941343724728, -0.05866627395153046, -0.023299843072891235, 0.05596629157662392, 0.09273271262645721, 0.01397490594536066, 0.060032930225133896, -0.0005885377177037299, 0.01903320662677288, -0.03373310714960098, -0.12073252350091934, 0.0823327824473381, -0.018266543745994568, -0.10686594992876053, -0.005762461572885513, -0.0008593692327849567, -0.014508236199617386, -0.0023354010190814734, -0.0051291324198246, -0.01687488704919815, -0.022933179512619972, 0.027516482397913933, 0.05623295530676842, 0.013291577808558941, -0.01074992772191763, 0.04986633360385895, -0.03929973766207695, 0.006891620345413685, -0.0040583061054348946, 0.028533142060041428, -0.04686635360121727, -0.01838321052491665, -0.026149824261665344, -0.029799800366163254, 0.04849967360496521, -0.03859974071383476, 0.05253298208117485, 0.008291611447930336, -0.05093299224972725, 0.0012874914100393653, -0.004133305512368679, 0.00022656098008155823, -0.06426623463630676, -0.015408230014145374, -0.03739975020289421, -0.01289158035069704, -0.019549869000911713, 0.0410330593585968, 0.02418317086994648, -0.030716460198163986, -0.01836654357612133, 0.0489330068230629, 0.0006807246245443821, -0.022316517308354378, -0.005787461064755917, -0.025999825447797775, -0.018066545948386192, 0.004433303605765104, -0.10579928755760193, 0.02701648510992527, -0.036833085119724274, -0.08659941703081131, -0.03106645867228508, -0.0022729013580828905, -0.018533209338784218, -0.05879960581660271, 0.05049966275691986, -0.011399923823773861, 0.08733274787664413, 0.008933273144066334, -0.008241611532866955, 0.013416577130556107, 0.014033239334821701, 0.01565822772681713, 0.004720801487565041, 0.038033079355955124, -0.06676621735095978, -0.03986639901995659, -0.01687488704919815, -0.01384990755468607, 0.030883125960826874, -0.007529116235673428, 0.009124938398599625, -0.04739968106150627, -0.00472496822476387, 0.02821647748351097, -0.014849900268018246, 0.02269984781742096, -0.009299937635660172, -0.020899860188364983, 0.0753994956612587, -0.011933253146708012, -0.015099898912012577, -0.030833126977086067, 0.004520803224295378, -0.0023541508708149195, -0.044233035296201706, 0.01214991882443428, -0.07119952142238617, -0.020833194255828857, 0.0807327926158905, 0.02446650341153145, -0.012624915689229965, 0.014458236284554005, 0.0012062418973073363, -0.010933260433375835, 0.07713281363248825, 0.03118312358856201, -0.020349863916635513, 0.045433029532432556, -0.016499890014529228, 0.004624968860298395, 0.025449829176068306, -0.01716655120253563, 0.037199750542640686, 0.01986653357744217, -0.011824920773506165, -0.008841607719659805, -0.08513276278972626, -0.01019993145018816, 0.04539969563484192, -0.04269971325993538, -0.021716520190238953, 0.07846613973379135, -0.02134985662996769, 0.040066398680210114, 0.00966660212725401, 0.02716648392379284, 0.0037083085626363754, 0.032499782741069794, -0.0027853979263454676, 0.02229985035955906, 0.09559936076402664, 0.02986646629869938, -0.018033212050795555, -0.02268318086862564, -0.026666488498449326, -0.00226248474791646, 0.042499713599681854, -0.04376637190580368, -0.05269964784383774, 0.02554982900619507, 0.02148318849503994, 0.0777994766831398, -0.025033164769411087, -0.06026626378297806, 0.05609962344169617, 0.015516562387347221, 0.010341597720980644, 0.028333144262433052, -0.02836647629737854, -0.039766401052474976, 0.047466348856687546, -0.020699860528111458, 0.016641555353999138, 0.06479956209659576, -0.06076625734567642, -0.017733214423060417, -0.034799765795469284, 0.014799900352954865, 0.014891566708683968, 0.0024354003835469484, -0.05149965360760689, 0.022116517648100853, 0.035199765115976334, 0.0008687441586516798, -0.047199685126543045, -0.0015281147789210081, -0.023866506293416023, -0.012941580265760422, -0.010866593569517136, -0.014841566793620586, 0.03983306512236595, -0.025033164769411087, -0.02026653103530407, 0.0066041224636137486, -0.03956640139222145, -0.05696628615260124, -0.002097902586683631, -0.0074082836508750916, 0.024116504937410355, 0.027799813076853752, 0.003016646485775709, 0.018133211880922318, 0.008133279159665108, 0.04466636851429939, 0.034666433930397034, -0.026149824261665344, 0.012599915266036987, 0.036266423761844635, 0.06606622040271759, -0.023066511377692223, -0.029766466468572617, 0.03009979799389839, 0.033166445791721344, -0.04456636682152748, -0.05013299733400345, 0.010491596534848213, -0.04196638613939285, 0.0642995685338974, 0.01672488823533058, -0.00567079521715641, -0.03439977020025253, 0.037633080035448074, -0.06379957497119904, 0.03443310409784317, 0.007999946363270283, -0.06156625226140022, 0.013408243656158447, -0.0321497842669487, -0.01753321662545204, -0.02149985544383526, 0.046099692583084106, -0.012791580520570278, 0.03334977477788925, -0.013808241114020348, 0.009508269838988781 ]
718,039
pytorch_optimizer.optimizer.srmm
SRMM
Stochastic regularized majorization-minimization with weakly convex and multi-convex surrogates. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta: float. adaptivity weight. :param memory_length: Optional[int]. internal memory length for moving average. None for no refreshing.
class SRMM(Optimizer, BaseOptimizer): """Stochastic regularized majorization-minimization with weakly convex and multi-convex surrogates. :param params: PARAMETERS. iterable of parameters to optimize or dicts defining parameter groups. :param lr: float. learning rate. :param beta: float. adaptivity weight. :param memory_length: Optional[int]. internal memory length for moving average. None for no refreshing. """ def __init__(self, params: PARAMETERS, lr: float = 0.01, beta: float = 0.5, memory_length: Optional[int] = 100): self.validate_learning_rate(lr) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') defaults: DEFAULTS = {'lr': lr, 'beta': beta, 'memory_length': memory_length} super().__init__(params, defaults) self.base_lrs: List[float] = [group['lr'] for group in self.param_groups] def __str__(self) -> str: return 'SRMM' @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['mov_avg_grad'] = torch.zeros_like(p) state['mov_avg_param'] = 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 w_t: float = ( (group['step'] + 1) % (group['memory_length'] if group['memory_length'] is not None else 1) ) ** -group['beta'] 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['mov_avg_grad'] = torch.zeros_like(p) state['mov_avg_param'] = torch.zeros_like(p) mov_avg_grad, mov_avg_param = state['mov_avg_grad'], state['mov_avg_param'] mov_avg_grad.mul_(1.0 - w_t).add_(grad, alpha=w_t) mov_avg_param.mul_(1.0 - w_t).add_(p, alpha=w_t) mov_avg_param.add_(mov_avg_grad, alpha=-group['lr']) p.copy_(mov_avg_param) return loss
(params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.01, beta: float = 0.5, memory_length: Optional[int] = 100)
[ -0.02735259011387825, -0.027859842404723167, -0.03148864582180977, 0.039955854415893555, 0.007774612866342068, 0.010135285556316376, -0.057709675282239914, -0.04296034574508667, 0.006282121408730745, -0.0197047907859087, -0.02914748340845108, 0.002733795903623104, 0.03870723396539688, 0.03825851157307625, -0.0355856828391552, 0.0780387744307518, -0.004479913506656885, 0.0036629450041800737, 0.020816843956708908, -0.008091645315289497, -0.03357618302106857, -0.04635503143072128, -0.01748068630695343, 0.05677320808172226, -0.0319373682141304, -0.009881660342216492, 0.02356771007180214, -0.04456014186143875, -0.03942909091711044, -0.025713777169585228, -0.022904381155967712, -0.03248364105820656, -0.002297266386449337, 0.003650751430541277, 0.027059946209192276, -0.053690679371356964, 0.010096266865730286, 0.026142990216612816, -0.10667900741100311, -0.03240559995174408, -0.007959955371916294, -0.040931336581707, 0.03254216909408569, -0.020016945898532867, 0.01588089019060135, -0.023431142792105675, -0.015412658452987671, 0.07281018048524857, 0.024465156719088554, -0.024035943672060966, 0.03006443753838539, -0.0677376538515091, -0.005101785063743591, -0.004853036254644394, -0.033342067152261734, 0.035293035209178925, 0.06910333782434464, -0.005433449987322092, 0.06726942211389542, -0.061611615121364594, 0.0570073239505291, -0.0852963849902153, 0.014934671111404896, 0.012222823686897755, -0.0017083175480365753, -0.047915808856487274, -0.04912541061639786, -0.03269824758172035, 0.016651524230837822, 0.0470573827624321, 0.0033337189815938473, -0.025850344449281693, 0.04065820202231407, 0.012466694228351116, 0.003238609293475747, -0.015383393503725529, -0.059543587267398834, -0.07292723655700684, -0.010086512193083763, -0.0371074378490448, 0.024835839867591858, 0.011705816723406315, -0.03966320678591728, -0.018778080120682716, -0.06067514792084694, -0.06703530997037888, 0.003345912555232644, -0.04545758664608002, -0.004750610329210758, -0.08576461672782898, 0.0015424852026626468, 0.055836744606494904, 0.02762572653591633, 0.02815248817205429, 0.043935831636190414, 0.02627955749630928, -0.04046310484409332, -0.03929252177476883, -0.03139109909534454, -0.06668413430452347, 0.007481967564672232, 0.04444308206439018, 0.0017875756602734327, 0.04225799813866615, 0.036366067826747894, -0.022553205490112305, -0.009189065545797348, -0.039955854415893555, -0.0008633039542473853, -0.03369324281811714, -0.021967915818095207, -0.004211655352264643, -0.07238096743822098, -0.006345528177917004, -0.0395851694047451, 0.004633552394807339, -0.03236658126115799, 0.01383237261325121, -0.042101919651031494, -0.0015400464180856943, 0.03878527134656906, 0.025830835103988647, -0.04865717515349388, 0.01859273761510849, -0.009471956640481949, -0.01019381545484066, 0.0680888295173645, 0.028971895575523376, 0.011305867694318295, -0.05029598996043205, -0.04729149863123894, 0.002624053740873933, -0.011735080741345882, -0.012339881621301174, 0.025577208027243614, -0.04315544292330742, -0.013929921202361584, 0.0022143502719700336, -0.011042486876249313, -0.013666540384292603, 0.03560519218444824, 0.047876790165901184, -0.03242511302232742, 0.004745732992887497, 0.03381029888987541, 0.011364396661520004, 0.04319446161389351, 0.016553975641727448, 0.016934413462877274, -0.007384418975561857, 0.010145041160285473, 0.015139522962272167, 0.012339881621301174, 0.00535541120916605, -0.013471444137394428, 0.027645235881209373, -0.0057456050999462605, -0.010408421978354454, -0.032873835414648056, -0.004972533322870731, -0.053300485014915466, -0.0216167401522398, -0.04807188734412193, -0.02807444892823696, 0.002665512030944228, 0.0009645104873925447, 0.007486844900995493, 0.0012321590911597013, -0.05610987916588783, 0.05111539736390114, 0.004972533322870731, -0.06590374559164047, 0.027372101321816444, 0.02914748340845108, -0.018778080120682716, 0.10020178556442261, 0.006921064108610153, 0.01461276039481163, -0.0063162632286548615, -0.026103969663381577, 0.057787712663412094, -0.016027214005589485, -0.03201540932059288, -0.06684020906686783, -0.039838794618844986, 0.045847781002521515, -0.021128999069333076, -0.02727455273270607, 0.018065975978970528, 0.026533184573054314, 0.012398410588502884, -0.04116545245051384, 0.013529973104596138, -0.03365422040224075, -0.016349123790860176, 0.008218458853662014, 0.0311764907091856, 0.0031825187616050243, 0.09341241419315338, 0.023079967126250267, -0.014993200078606606, 0.031430117785930634, 0.006911308970302343, 0.02149968221783638, -0.03148864582180977, -0.027528177946805954, -0.028718270361423492, 0.06356257945299149, -0.023879865184426308, 0.04456014186143875, -0.043896812945604324, 0.004514055326581001, 0.03018149733543396, 0.08802773803472519, 0.07238096743822098, -0.04713542014360428, 0.0027825701981782913, 0.06438198685646057, 0.06403081864118576, -0.015793098136782646, 0.009647543542087078, -0.055095374584198, -0.03490284085273743, 0.004211655352264643, 0.05294930934906006, -0.038238998502492905, 0.04264819249510765, -0.0531834252178669, 0.00027176394360139966, -0.0013766527408733964, 0.02918650209903717, -0.07850700616836548, 0.016436917707324028, -0.014300605282187462, 0.041945841163396835, 0.027684256434440613, -0.015120012685656548, 0.006247979588806629, -0.005106662400066853, -0.04124349355697632, -0.025889363139867783, -0.04459916055202484, -0.05271519348025322, 0.01834886707365513, -0.0030508283525705338, 0.010037737898528576, 0.05677320808172226, 0.04889129474759102, -0.018085487186908722, 0.04487229511141777, -0.024933388456702232, -0.010798615403473377, -0.051778726279735565, 0.037673220038414, -0.055368512868881226, -0.03357618302106857, 0.034493137151002884, 0.035936854779720306, 0.009003723971545696, -0.07284919917583466, -0.02635759674012661, -0.034259021282196045, -0.049866776913404465, 0.06707432866096497, -0.005911437328904867, 0.019997436553239822, 0.037887826561927795, 0.0036239256151020527, 0.03546862304210663, 0.039760757237672806, 0.11791659146547318, 0.0604410320520401, -0.0849061906337738, -0.005174946505576372, -0.00128885917365551, 0.03443460911512375, -0.02846464328467846, -0.007896549068391323, 0.020251061767339706, 0.002616737736389041, 0.05224696174263954, -0.01979258470237255, -0.04846207797527313, -0.006399179808795452, -0.006594276521354914, 0.028523173183202744, -0.0047140298411250114, -0.0696496069431305, 0.028093960136175156, 0.014485947787761688, 0.037322044372558594, -0.0028435378335416317, 0.0734344869852066, -0.013247082009911537, 0.09817277640104294, 0.009252472780644894, -0.018602492287755013, 0.04416994750499725, -0.019919397309422493, -0.008364781737327576, 0.06055809184908867, 0.0024118858855217695, -0.017090491950511932, -0.017851369455456734, -0.0038019516505301, -0.03771223872900009, -0.006501605734229088, -0.00997433066368103, 0.022026443853974342, -0.012710565701127052, -0.005218842998147011, 0.017217304557561874, 0.010818125680088997, 0.002987421816214919, -0.010008472949266434, -0.0328933447599411, -0.005735849961638451, -0.03482480347156525, 0.026338087394833565, 0.05236401781439781, -0.025830835103988647, 0.010418176651000977, 0.008594020269811153, -0.026942888274788857, 0.008150174282491207, -0.04307740554213524, -0.00967680849134922, -0.023879865184426308, -0.03542960435152054, -0.007150302641093731, -0.039721738547086716, -0.02153870277106762, 0.014651780016720295, 0.017763575538992882, -0.03472725674510002, -0.030708258971571922, 0.05267617478966713, 0.051544610410928726, 0.014417664147913456, -0.025869853794574738, 0.08123836666345596, 0.03640509024262428, -0.034180983901023865, 0.04280426725745201, -0.033185988664627075, -0.05786575376987457, 0.01631985977292061, 0.012252087704837322, -0.007242973893880844, -0.006140676327049732, -0.025830835103988647, 0.003633680520579219, -0.005609036888927221, 0.08365757018327713, 0.05275421217083931, 0.02670877054333687, -0.015490696765482426, -0.0050286236219108105, 0.05244205892086029, -0.08131640404462814, -0.0007364909397438169, 0.05216892063617706, -0.043779753148555756, 0.06414787471294403, 0.050061874091625214, -0.017246568575501442, -0.03045463189482689, -0.03607342392206192, 0.015051729045808315, -0.07320037484169006, -0.024855349212884903, -0.07757054269313812, 0.0204656682908535, 0.03029855526983738, -0.03677577152848244, 0.006584521848708391, -0.03164472430944443, -0.032230015844106674, 0.02807444892823696, -0.0018570789834484458, 0.03841458633542061, -0.006028495263308287, 0.04811090603470802, 0.01411526370793581, 0.04081428050994873, -0.010993712581694126, 0.007833141833543777, -0.03595636412501335, 0.05837300419807434, -0.053729698061943054, 0.01983160339295864, 0.026416124776005745, 0.000989507301710546, -0.0007950200233608484, -0.06469414383172989, 0.04272622987627983, 0.047837767750024796, 0.04635503143072128, -0.04104839637875557, -0.03236658126115799, -0.018836610019207, -0.026728279888629913, -0.03607342392206192, 0.014603005722165108, -0.007589270826429129, -0.07780466228723526, 0.027137983590364456, 0.051895786076784134, -0.0015973561676219106, 0.08638892322778702, -0.006447953637689352, -0.006643050815910101, -0.007886793464422226, 0.025616228580474854, -0.007389296777546406, -0.03472725674510002, 0.02930356003344059, 0.017509950324892998, 0.01352021750062704, 0.05099834129214287, 0.0485791377723217, 0.017968427389860153, 0.05298832803964615, 0.022084973752498627, 0.006018740590661764, -0.0319373682141304, -0.05220793932676315, -0.02118752710521221, -0.04518445208668709, -0.02348967082798481, -0.014300605282187462, -0.014076244086027145, -0.017822105437517166, 0.0006142505444586277, -0.03978026658296585, -0.008740343153476715, -0.011442435905337334, 0.05029598996043205, 0.020329101011157036, -0.008486717008054256, 0.03759517893195152, 0.0031800800934433937, -0.0005331633728928864, 0.019295087084174156, -0.0033898092806339264, -0.025713777169585228, 0.015285844914615154, 0.003650751430541277, -0.09973355382680893, 0.000005387076271290425, -0.004655500873923302, 0.02329457551240921, -0.013959186151623726, 0.01640765182673931, 0.04682326689362526, -0.0002572840894572437, -0.010584008879959583, -0.03248364105820656, -0.02122654765844345, -0.022982420399785042, 0.0050725205801427364, 0.05653909221291542, -0.035819798707962036, 0.020036455243825912, -0.005457836668938398, 0.0003030099323950708, 0.07437095046043396, -0.00425067450851202, 0.001193749369122088, -0.019919397309422493, -0.0031873963307589293, 0.006677192635834217, 0.021050959825515747, -0.04682326689362526, -0.024913879111409187, 0.005209088325500488, -0.06379669904708862, -0.00013420535833574831, 0.007847774773836136, -0.007901426404714584, 0.04534053057432175, -0.02444564737379551, 0.037887826561927795, 0.06106534227728844, 0.010974203236401081, 0.03365422040224075, 0.0394095815718174, 0.010681557469069958, 0.03353716433048248, 0.0466671884059906, -0.034239511936903, -0.03164472430944443, 0.032990891486406326, 0.05829496681690216, -0.05021795257925987, -0.008428188040852547, -0.006891799159348011, 0.016154026612639427, 0.09708023816347122, -0.001474201213568449, 0.033068932592868805, -0.022709283977746964, -0.07464408874511719, 0.008013607002794743, 0.035527151077985764, 0.012856888584792614, -0.07440996915102005, 0.037848807871341705, -0.04686228558421135, 0.019763320684432983, -0.02249467745423317, -0.030766787007451057, 0.030044928193092346, 0.025967402383685112, 0.017295343801379204, -0.045925818383693695, -0.010535234585404396, 0.0791703388094902, 0.04658915102481842, -0.03790733590722084, -0.0006060198647901416, 0.0006974715506657958, -0.02027057111263275, -0.013412914238870144, 0.004155564587563276, 0.03265922889113426, -0.030005909502506256, -0.034941863268613815, 0.05997280031442642, 0.008915930055081844, -0.007955078035593033, 0.006418689154088497, -0.004735978320240974, 0.05798280984163284, 0.0204656682908535, -0.020446158945560455, 0.04495033621788025, -0.059387508779764175, -0.04842305928468704, -0.05872417986392975, -0.0012443526647984982, -0.013617766089737415, 0.03619048371911049, 0.013061740435659885, -0.01923655904829502, 0.049593642354011536, 0.012281352654099464, 0.02360672876238823, -0.059309471398591995, 0.0013547043781727552, -0.05517341569066048, 0.02241663821041584, -0.0395851694047451, 0.024348098784685135, 0.04998383671045303, -0.009871904738247395, -0.03993634507060051, 0.008077013306319714, 0.0054724691435694695, 0.04268721118569374, -0.019363371655344963, -0.014963935129344463, 0.04807188734412193, -0.021285075694322586, -0.05224696174263954, 0.030766787007451057, 0.009871904738247395, -0.029401108622550964, -0.020836353302001953, 0.06079220771789551, 0.02317751571536064, -0.045925818383693695, -0.017948918044567108, -0.003048389684408903, -0.03646361827850342, 0.041867803782224655, 0.043857790529727936, -0.009252472780644894, -0.01824156381189823, -0.006979593075811863, 0.05216892063617706, -0.03098139353096485, 0.01644667237997055, -0.013471444137394428, 0.007764858193695545, 0.06200180575251579, -0.10488411784172058, 0.04120447486639023, -0.004753048997372389, 0.03240559995174408, 0.0018436660757288337, 0.042101919651031494, -0.007677064742892981, -0.0715225413441658, 0.005969966296106577, 0.01212527509778738, -0.05064716562628746, -0.009106149896979332, 0.02321653626859188, 0.04139957204461098, -0.06059711053967476, -0.01723681390285492, 0.05400283262133598, -0.002841099165380001, -0.0035068674478679895, -0.011198564432561398, -0.018690286204218864, 0.03133256733417511, 0.013383650220930576, -0.028776798397302628, -0.029166992753744125, -0.0166417695581913, 0.02050468884408474, -0.007701451890170574, -0.02345065213739872, -0.0010529138380661607, -0.05505635589361191, 0.005262739956378937, 0.09942139685153961, -0.030649729073047638, 0.0311764907091856, -0.013754334300756454, -0.01204723585397005, -0.022865360602736473, -0.005735849961638451, -0.008662303909659386, 0.039077915251255035, -0.08709127455949783, -0.03777076676487923, -0.03890233114361763, -0.0512714758515358, -0.016095496714115143, 0.05525145307183266, -0.026825828477740288, 0.04900835081934929, -0.017656272277235985, 0.04682326689362526, 0.04440406337380409, -0.034180983901023865, -0.045808762311935425, -0.012222823686897755, 0.026299066841602325, 0.01744166575372219, -0.01172532606869936, -0.03277628496289253, -0.008852523751556873, 0.0036190482787787914, 0.051505591720342636, 0.05306636914610863, 0.053690679371356964, 0.0036678225733339787, 0.025967402383685112, -0.03484431281685829, -0.0020887565333396196, 0.03293236345052719, 0.006340650375932455, 0.028132978826761246, -0.006233347114175558, 0.05037403106689453, -0.026338087394833565, -0.009769478812813759, -0.004053139127790928, -0.009032987989485264, 0.023879865184426308, -0.04807188734412193, -0.023743297904729843, -0.03570273891091347, 0.03371275216341019, 0.020816843956708908, -0.004243358504027128, -0.06207984685897827, -0.01691490411758423, -0.07163959741592407, 0.023021439090371132, 0.015978438779711723, -0.006428444292396307, 0.032347071915864944, -0.07647799700498581, -0.04358465597033501, -0.015744322910904884, 0.0395851694047451, 0.047681692987680435, 0.00016491788846906275, 0.01886587403714657, 0.0304156132042408, -0.024621233344078064, -0.03925350308418274, 0.004087280947715044, 0.023762807250022888, 0.0021667953114956617, -0.02612348087131977, 0.005082275252789259, 0.045691702514886856, -0.005389553029090166, 0.0073258900083601475, -0.04912541061639786, -0.03937056288123131, -0.03675626218318939, 0.024894369766116142, -0.06988372653722763, 0.008594020269811153, -0.015051729045808315, -0.04350661858916283, 0.0012303300900384784, -0.0001932679006131366, 0.05306636914610863, -0.007501477375626564, -0.022709283977746964, 0.0413215309381485, -0.019499938935041428, 0.025791814550757408, 0.00031825187033973634, 0.009345143102109432, 0.034259021282196045, 0.04151662811636925, -0.038434095680713654, 0.02456270530819893, -0.049749720841646194, 0.0007249070913530886, 0.026884358376264572, -0.002018033992499113, -0.005399307701736689, 0.013851882889866829, 0.016788091510534286, -0.04647209122776985, -0.0177928414195776, 0.061650633811950684, -0.021285075694322586, 0.031039923429489136, -0.018943913280963898, 0.03045463189482689, 0.02544064074754715, 0.004677449353039265, -0.002716724993661046, 0.03195687755942345, 0.018622003495693207, 0.04502837359905243, 0.018651267513632774, -0.032112956047058105, 0.06090926378965378, 0.011022977530956268, 0.04498935490846634, 0.006657683290541172, -0.03464921563863754, -0.0204656682908535, 0.0470573827624321, -0.01672956347465515, -0.0007992877508513629, 0.03730253502726555, -0.02895238623023033, 0.07799975574016571, -0.021363114938139915, 0.03960467875003815, 0.034180983901023865, 0.06609884649515152, -0.03365422040224075, -0.003482480300590396, -0.0635235607624054, -0.05833398550748825, -0.09224183112382889, -0.0025899119209498167, -0.0520128458738327, 0.05056912824511528, 0.035897836089134216, -0.013393404893577099, 0.02261173538863659, 0.008145296946167946, 0.020075475797057152 ]
718,041
pytorch_optimizer.optimizer.srmm
__init__
null
def __init__(self, params: PARAMETERS, lr: float = 0.01, beta: float = 0.5, memory_length: Optional[int] = 100): self.validate_learning_rate(lr) self.validate_range(beta, 'beta', 0.0, 1.0, range_type='[]') defaults: DEFAULTS = {'lr': lr, 'beta': beta, 'memory_length': memory_length} super().__init__(params, defaults) self.base_lrs: List[float] = [group['lr'] for group in self.param_groups]
(self, params: Union[Iterable[Dict], Iterable[torch.Tensor], NoneType], lr: float = 0.01, beta: float = 0.5, memory_length: Optional[int] = 100)
[ 0.017273694276809692, 0.008343912661075592, -0.05688601732254028, -0.0017906810389831662, -0.03842168301343918, 0.014079761691391468, -0.05246364697813988, -0.05287942662835121, -0.05526070296764374, 0.015931865200400352, -0.013739579357206821, 0.018275341019034386, 0.011878026649355888, 0.06418103724718094, -0.003415995743125677, 0.029973827302455902, 0.020448727533221245, 0.012785179540514946, -0.02513568103313446, -0.00950620137155056, -0.028424108400940895, 0.04486624523997307, -0.02092120237648487, 0.08391159772872925, -0.004554660990834236, 0.03743893653154373, 0.017273694276809692, -0.02258431538939476, -0.03426390141248703, 0.02725237049162388, 0.0023104038555175066, -0.009647944010794163, 0.003777439473196864, 0.07714575529098511, 0.012974169105291367, -0.02647751197218895, -0.006014609709382057, 0.015383793041110039, -0.0982748419046402, 0.059494078159332275, 0.032071616500616074, -0.0421069897711277, 0.028367411345243454, -0.03651288524270058, 0.0006009294302202761, -0.021922850981354713, 0.036966461688280106, 0.01310646254569292, -0.02194174937903881, -0.03350794315338135, 0.026893289759755135, 0.006728047039359808, 0.027573654428124428, -0.03106996975839138, -0.03615380451083183, 0.05904050171375275, 0.03949892893433571, 0.031051071360707283, 0.05628124624490738, 0.0073375399224460125, -0.009647944010794163, -0.05824674665927887, -0.01723589561879635, -0.057263996452093124, 0.006387865170836449, -0.03182592988014221, -0.09018606692552567, -0.02449311502277851, 0.03641838952898979, 0.05333300307393074, 0.06743166595697403, -0.015383793041110039, -0.015525535680353642, 0.019428180530667305, 0.015525535680353642, 0.024209629744291306, -0.0695483535528183, -0.028688695281744003, -0.02368045784533024, -0.019938454031944275, 0.021223586052656174, 0.059305090457201004, -0.0009437692351639271, -0.024039538577198982, -0.0000644116589683108, -0.060250040143728256, -0.04569780454039574, -0.05737739056348801, 0.0388941615819931, -0.02277330495417118, -0.06346286833286285, -0.010129868984222412, 0.01760442741215229, 0.0024946690537035465, 0.033129964023828506, -0.009780237451195717, 0.008599049411714077, 0.0077485935762524605, 0.003619160270318389, -0.0395367257297039, -0.03777911886572838, -0.03520885482430458, -0.03358353674411774, 0.02929346263408661, 0.007691896520555019, -0.03158024325966835, -0.02876429073512554, -0.0510273240506649, 0.020845606923103333, -0.003172671189531684, -0.045660004019737244, 0.04101084917783737, -0.057263996452093124, 0.05076273903250694, -0.07151384651660919, 0.07612520456314087, -0.022168537601828575, 0.004710577894002199, -0.02354816533625126, -0.01906909979879856, 0.025683753192424774, 0.04286295175552368, -0.03452849015593529, 0.04240937530994415, 0.025551460683345795, 0.011112617328763008, 0.007474557962268591, 0.014212054200470448, -0.011755183339118958, -0.03813819959759712, 0.03394262120127678, -0.008310839533805847, -0.061799757182598114, -0.013474993407726288, 0.04422368109226227, -0.07000192999839783, 0.008849460631608963, 0.026572005823254585, -0.025419166311621666, 0.011065369471907616, 0.053559791296720505, 0.044941842555999756, 0.04346771910786629, -0.05446694418787956, -0.005338970106095076, 0.02449311502277851, 0.022300830110907555, -0.003947530407458544, -0.039650119841098785, 0.010347207076847553, 0.0044908770360052586, 0.0063547915779054165, 0.0213747788220644, -0.011490597389638424, 0.0148357218131423, -0.01876671612262726, 0.028688695281744003, -0.044639457017183304, 0.026647603139281273, -0.02003294974565506, -0.02959584817290306, 0.02776264399290085, -0.03842168301343918, -0.05658363178372383, -0.005579932127147913, 0.0331866592168808, -0.022981194779276848, -0.03541674092411995, -0.0181902963668108, 0.005570482928305864, -0.025929439812898636, -0.11142855882644653, 0.024323023855686188, 0.023189084604382515, -0.0318826287984848, 0.05862472578883171, -0.005693326238542795, 0.016054708510637283, -0.00035760467289946973, 0.018539927899837494, 0.07960262149572372, 0.00445071654394269, -0.02685549110174179, -0.04683174192905426, 0.009227440692484379, 0.0159413143992424, -0.059947654604911804, 0.051783282309770584, -0.053635384887456894, 0.031674738973379135, 0.04841925948858261, 0.01857772469520569, 0.009562898427248001, -0.007332815323024988, -0.02749805711209774, 0.015355444513261318, 0.047625500708818436, 0.022924497723579407, 0.01183077972382307, 0.06520158052444458, 0.06610873341560364, 0.041237637400627136, -0.038251593708992004, -0.01760442741215229, -0.006529607344418764, -0.00326952850446105, -0.04350551962852478, 0.02596723847091198, -0.01773671992123127, -0.021639365702867508, 0.0020623542368412018, -0.012804078869521618, 0.02513568103313446, 0.0325440913438797, 0.014854621142148972, -0.04312753677368164, -0.045395419001579285, 0.018294241279363632, 0.05061154440045357, 0.0025135681498795748, 0.13924789428710938, -0.04607578366994858, -0.005419290624558926, -0.03158024325966835, -0.003019116586074233, 0.04089745506644249, 0.03724994510412216, -0.06338727474212646, -0.0720808207988739, 0.08035858720541, -0.013900221325457096, -0.07930023968219757, 0.005990985780954361, -0.005348419304937124, 0.021677162498235703, 0.041426628828048706, -0.011755183339118958, 0.032562993466854095, -0.09116882085800171, -0.010196015238761902, 0.016479935497045517, 0.03088098019361496, 0.0008002549293451011, -0.009208542294800282, 0.006822542287409306, 0.016829567030072212, 0.001835566246882081, 0.05960747227072716, -0.013484442606568336, -0.022433122619986534, -0.04441266879439354, -0.013153710402548313, -0.0027025581803172827, 0.048570454120635986, -0.032959870994091034, 0.02029753476381302, 0.029576947912573814, -0.03643728792667389, 0.043354324996471405, -0.03679636865854263, 0.013512791134417057, -0.024228530004620552, -0.0113205062225461, 0.08020739257335663, 0.014580585062503815, 0.04588679224252701, 0.021204687654972076, 0.008603774011135101, 0.04936420917510986, -0.006643001455813646, 0.14317889511585236, 0.04652936011552811, -0.015790121629834175, -0.01568617671728134, 0.03243069723248482, -0.022754406556487083, 0.015279848128557205, -0.024833297356963158, 0.004072736483067274, 0.03354573994874954, 0.04509303346276283, -0.016820117831230164, 0.0013182058464735746, -0.021658264100551605, 0.015251499600708485, -0.01301196776330471, -0.007999005727469921, 0.001387895899824798, -0.030389605090022087, 0.01621534861624241, -0.011112617328763008, -0.015364893712103367, 0.013578937388956547, 0.03655068203806877, 0.07344155013561249, 0.005598831456154585, 0.017368188127875328, 0.030332909896969795, 0.019484877586364746, 0.005669702775776386, 0.017113052308559418, -0.03520885482430458, 0.05427795276045799, -0.002324578119441867, -0.03866737335920334, -0.06009884923696518, 0.05306841805577278, -0.008622672408819199, 0.02538136951625347, 0.031542446464300156, 0.04445046931505203, 0.06618432700634003, 0.022792205214500427, -0.013503341935575008, 0.05435355007648468, -0.03210941702127457, 0.007139100693166256, -0.04165341705083847, 0.03719324991106987, 0.032128315418958664, 0.0007872618152759969, -0.008107674308121204, -0.005424015689641237, -0.05034695938229561, -0.03137235343456268, -0.02572154998779297, 0.01298361923545599, 0.009959777817130089, -0.014703428372740746, -0.007120201364159584, -0.05027136206626892, -0.022036245092749596, 0.014760125428438187, -0.029709242284297943, -0.015175904147326946, -0.027082279324531555, -0.009903080761432648, 0.041313234716653824, 0.024190731346607208, -0.011613440699875355, 0.060779210180044174, -0.033073265105485916, -0.03789251297712326, 0.01855882629752159, 0.009742438793182373, -0.048835039138793945, 0.013229305855929852, -0.027101177722215652, 0.0046798670664429665, -0.009251064620912075, -0.025097884237766266, 0.011764632537961006, -0.015799570828676224, 0.04875944182276726, 0.029841534793376923, -0.04543321579694748, -0.010167666710913181, 0.011887476779520512, 0.014495539478957653, -0.0331677608191967, -0.021998446434736252, 0.03209051862359047, -0.04305194318294525, 0.04267396032810211, 0.044374871999025345, -0.020845606923103333, 0.012019769288599491, -0.04199359565973282, 0.03260079026222229, -0.0011262628249824047, 0.009057349525392056, -0.06966174393892288, -0.008173821493983269, 0.007384787779301405, 0.009789686650037766, 0.013304902240633965, -0.03420720621943474, -0.018171396106481552, 0.004282987676560879, -0.014731776900589466, -0.038629572838544846, -0.0013997078640386462, 0.0829288512468338, 0.009742438793182373, -0.013304902240633965, -0.014911318197846413, -0.01723589561879635, 0.008925057016313076, 0.03494426608085632, 0.005556308664381504, 0.012775730341672897, 0.006326443050056696, -0.004216841422021389, -0.0074934568256139755, -0.05711280554533005, 0.0414644256234169, 0.023434771224856377, 0.018596624955534935, -0.005858692806214094, -0.04823027178645134, -0.009624320082366467, -0.056810420006513596, -0.03458518534898758, 0.04728531837463379, -0.0020162879955023527, -0.008050977252423763, 0.021072395145893097, 0.03373473137617111, -0.022281931713223457, 0.03930993750691414, -0.012312703765928745, -0.03354573994874954, -0.0007335177506320179, -0.021903950721025467, 0.001338286092504859, -0.05242585018277168, 0.0657307505607605, -0.02647751197218895, 0.04059506952762604, -0.005726399831473827, 0.03885636106133461, 0.006071306765079498, 0.06724267452955246, 0.020694414153695107, 0.05628124624490738, 0.05658363178372383, -0.0065107084810733795, -0.011953623034060001, -0.02883988805115223, -0.05938068404793739, -0.04203139618039131, 0.030408505350351334, -0.030200615525245667, -0.026647603139281273, 0.002489944454282522, -0.00931248627603054, -0.017906811088323593, 0.036078207194805145, 0.009997575543820858, -0.006732771638780832, 0.05352199450135231, -0.0459245927631855, 0.054013367742300034, 0.03772241994738579, -0.039461128413677216, -0.015053060837090015, -0.004429455380886793, 0.0065107084810733795, -0.05975866690278053, -0.026912188157439232, 0.012652886100113392, -0.0018213919829577208, 0.04191800206899643, -0.0248899944126606, 0.030710889026522636, -0.03018171712756157, -0.034925367683172226, -0.028235118836164474, 0.05537409707903862, -0.0382893905043602, 0.04165341705083847, 0.022697709500789642, -0.004998787771910429, -0.0036923938896507025, -0.07117366790771484, 0.0388941615819931, 0.07884666323661804, -0.0008764415397308767, 0.004885393660515547, 0.024776600301265717, 0.008660471066832542, 0.0452820248901844, 0.036834169179201126, -0.055978864431381226, -0.0523124560713768, 0.026893289759755135, 0.02003294974565506, 0.008636847138404846, -0.010233812965452671, -0.026364117860794067, -0.005816170014441013, -0.04581119865179062, 0.041124243289232254, 0.07960262149572372, -0.017840664833784103, -0.0037018433213233948, -0.0523124560713768, 0.03082428313791752, -0.016064157709479332, 0.05696161091327667, -0.09615815430879593, -0.004932641051709652, 0.001142208813689649, 0.06531497091054916, -0.02725237049162388, -0.02271660789847374, 0.05711280554533005, 0.0363805927336216, 0.05990985780954361, 0.03528444841504097, -0.006567405536770821, -0.024606509134173393, 0.0035482889506965876, -0.021960647776722908, 0.042976345866918564, -0.0344339944422245, -0.08209729194641113, -0.0006732771871611476, -0.03743893653154373, 0.007020981516689062, -0.04222038388252258, -0.0013548226561397314, 0.004018401727080345, 0.00327661563642323, -0.06270691007375717, 0.0020210128277540207, -0.05582767352461815, 0.06285810470581055, -0.017453234642744064, -0.00596263725310564, 0.039650119841098785, 0.05450474098324776, 0.04448826611042023, -0.07230760902166367, 0.017491033300757408, 0.013947468250989914, -0.02749805711209774, -0.0650503858923912, 0.03210941702127457, 0.02827291749417782, -0.0025135681498795748, -0.037930309772491455, -0.024209629744291306, 0.01786901243031025, -0.019503777846693993, 0.05348419398069382, 0.03995250537991524, -0.025116782635450363, -0.006879239343106747, -0.028726493939757347, 0.017405986785888672, 0.023245779797434807, 0.051065120846033096, -0.01645158790051937, -0.038383886218070984, 0.013427745550870895, -0.022565416991710663, 0.07045550644397736, -0.01946597918868065, 0.0027001958806067705, 0.032770879566669464, -0.01959827169775963, -0.06607093662023544, -0.008537626825273037, 0.013531690463423729, -0.019503777846693993, 0.0283863116055727, -0.022300830110907555, 0.05510950833559036, 0.02354816533625126, 0.029009979218244553, 0.0022666999138891697, -0.0014623107854276896, 0.03386702388525009, -0.05469373241066933, 0.002463958226144314, -0.047058530151844025, -0.020070746541023254, -0.06119498983025551, 0.0204109288752079, 0.029463553801178932, -0.06066581979393959, -0.035700228065252304, -0.030143918469548225, -0.0069217621348798275, 0.0261562280356884, 0.01374902855604887, 0.05590326711535454, -0.0625179186463356, -0.01065904088318348, 0.02621292509138584, 0.02596723847091198, -0.057830967009067535, -0.0873890146613121, 0.017339840531349182, 0.02959584817290306, -0.06240452826023102, 0.014089210890233517, 0.010791334323585033, 0.032506294548511505, 0.014401044696569443, 0.07287457585334778, -0.022603213787078857, -0.059683069586753845, -0.05582767352461815, 0.025305772200226784, -0.04448826611042023, -0.04936420917510986, 0.004502689000219107, 0.0446772575378418, -0.017972957342863083, 0.0072572194039821625, 0.02245202288031578, 0.037287745624780655, 0.008050977252423763, -0.03687196597456932, -0.013304902240633965, 0.04441266879439354, -0.009614870883524418, -0.016347642987966537, -0.005447639152407646, -0.03732554242014885, 0.0012426098110154271, -0.030389605090022087, 0.009855832904577255, -0.046415966004133224, -0.06648671627044678, 0.013371048495173454, 0.09487302601337433, -0.03545454144477844, -0.032884273678064346, -0.004174318630248308, 0.022414224222302437, 0.03209051862359047, -0.05325740575790405, -0.020448727533221245, -0.014401044696569443, -0.11127736419439316, -0.0025419166777282953, -0.03711765259504318, 0.007587952073663473, -0.007639924064278603, -0.006024058908224106, -0.05926728993654251, 0.0130781140178442, -0.011906375177204609, 0.03169363737106323, 0.011603991501033306, 0.03464188426733017, 0.01075353566557169, -0.01607360690832138, 0.019106898456811905, -0.0009543999331071973, -0.026817692443728447, -0.0009809766197577119, -0.011216561309993267, -0.03866737335920334, 0.04422368109226227, 0.06932156533002853, 0.018539927899837494, -0.006581579800695181, 0.01071573793888092, -0.023189084604382515, 0.001089055323973298, -0.01192527450621128, 0.0022064591757953167, 0.030767586082220078, 0.04766330122947693, 0.046491559594869614, -0.0065012588165700436, -0.05639464035630226, -0.02080780826508999, 0.032562993466854095, 0.017264245077967644, -0.015449939295649529, 0.0023682820610702038, -0.039914704859256744, -0.012152062729001045, -0.021393677219748497, 0.013210407458245754, -0.041880201548337936, -0.030351808294653893, -0.007554878946393728, 0.026175126433372498, 0.014174256473779678, 0.028745392337441444, -0.0638030543923378, -0.061913151293992996, 0.018596624955534935, 0.020562121644616127, 0.040670666843652725, 0.014580585062503815, -0.020051848143339157, -0.04497963935136795, 0.005064934492111206, 0.02277330495417118, -0.043543316423892975, 0.0503847561776638, 0.025664852932095528, -0.009614870883524418, -0.009605420753359795, -0.0015414503868669271, 0.05223685875535011, 0.007644649129360914, -0.033980417996644974, 0.010158217512071133, -0.08179491013288498, -0.06452121585607529, 0.02916117012500763, 0.003817599732428789, -0.04441266879439354, -0.009076248854398727, -0.08980809152126312, 0.08391159772872925, -0.011953623034060001, 0.018521027639508247, -0.0038955581840127707, 0.003316776128485799, 0.005636629182845354, -0.051783282309770584, 0.04630257189273834, 0.022357527166604996, 0.042069192975759506, -0.09404146671295166, 0.006094930227845907, 0.018984055146574974, 0.05265263840556145, -0.010951975360512733, -0.048835039138793945, 0.007460383698344231, -0.006869789678603411, 0.005745298694819212, 0.049666594713926315, -0.0226599108427763, -0.010432252660393715, -0.012388300150632858, -0.014315999113023281, 0.017368188127875328, 0.036909762769937515, -0.039650119841098785, 0.016735071316361427, 0.03777911886572838, -0.021903950721025467, -0.014457741752266884, -0.004330235533416271, -0.042333777993917465, -0.001043579657562077, -0.013484442606568336, 0.04388349875807762, 0.04055727273225784, 0.02366155944764614, 0.03923434391617775, -0.011849678121507168, 0.014145907945930958, -0.022357527166604996, 0.06595753878355026, -0.015799570828676224, -0.02980373613536358, 0.06769625097513199, -0.03080538474023342, -0.004455441143363714, -0.030389605090022087, 0.0312778577208519, 0.050687141716480255, 0.01952267624437809, -0.03896975517272949, 0.041426628828048706, -0.026194026693701744, -0.057641975581645966, -0.06875459104776382, -0.023056790232658386, -0.051783282309770584, 0.04006589949131012, 0.030521899461746216, 0.00046184452367015183, 0.03088098019361496, 0.020694414153695107, -0.012095365673303604 ]
718,044
pytorch_optimizer.optimizer.srmm
__str__
null
def __str__(self) -> str: return 'SRMM'
(self) -> str
[ 0.033360324800014496, 0.013004728592932224, 0.022001441568136215, -0.007137677166610956, 0.010190590284764767, -0.062149811536073685, -0.002677694894373417, 0.0019954796880483627, 0.06849440932273865, -0.035850413143634796, -0.03820405527949333, 0.019374914467334747, 0.024576805531978607, 0.029522866010665894, 0.022700713947415352, 0.03150128945708275, 0.002223595278337598, -0.07831831276416779, 0.005210419185459614, 0.015281622298061848, -0.009141684509813786, 0.06620898842811584, 0.019511356949806213, 0.006583377253264189, -0.012783008627593517, 0.05423611402511597, -0.005730608478188515, -0.05375856161117554, -0.03588452190160751, -0.025190798565745354, -0.009713039733469486, -0.023553481325507164, -0.0033876250963658094, -0.01587003283202648, -0.039704930037260056, 0.005832940340042114, -0.03042680025100708, -0.003114738967269659, -0.0922355055809021, -0.002760839881375432, -0.002699014265090227, 0.007751671131700277, 0.022939488291740417, -0.002019996754825115, -0.02157505787909031, -0.045776642858982086, 0.0037479200400412083, 0.02058584615588188, 0.03973903879523277, 0.010642558336257935, 0.02271776832640171, 0.03438365086913109, -0.08070606738328934, -0.016628997400403023, -0.041546911001205444, 0.028056103736162186, 0.006532211322337389, 0.00047195437946356833, 0.0020764926448464394, 0.015000208280980587, -0.009090518578886986, 0.0026137372478842735, 0.04604953154921532, 0.006681445986032486, -0.009039352647960186, 0.000721655844245106, 0.0027459163684397936, 0.05259879678487778, 0.03977315127849579, 0.055702876299619675, 0.005751927383244038, -0.05536177009344101, -0.027697939425706863, 0.04448043555021286, 0.05802240967750549, -0.02126806043088436, -0.07176904380321503, -0.03670318052172661, -0.0042126793414354324, -0.028260767459869385, 0.05123436823487282, 0.0246620811522007, -0.02810726873576641, -0.009704512543976307, -0.06620898842811584, -0.08056962490081787, 0.009141684509813786, -0.05256468802690506, -0.06863085925579071, -0.026845170184969902, -0.041069358587265015, 0.016501082107424736, -0.026725783944129944, 0.05621453747153282, -0.03956848382949829, -0.005598429124802351, -0.008259068243205547, -0.042229123413562775, -0.03581630066037178, -0.03179123252630234, 0.008621495217084885, 0.02406514436006546, -0.043764110654592514, 0.019289636984467506, -0.020142406225204468, 0.006655862554907799, -0.03967081755399704, 0.01684219017624855, -0.008088515140116215, 0.0256001278758049, -0.030938463285565376, 0.0543043352663517, -0.008259068243205547, -0.010472004301846027, -0.013465223833918571, -0.040284812450408936, -0.00808425061404705, 0.013789275661110878, 0.022376660257577896, -0.017686430364847183, 0.01869269832968712, 0.02253015898168087, -0.06658420711755753, 0.00524452980607748, 0.0018281236989423633, 0.0708821639418602, 0.0019357858691364527, 0.01607469655573368, 0.023570537567138672, -0.03602096438407898, 0.023178264498710632, -0.002432523760944605, -0.00517204450443387, -0.01290239579975605, 0.05737430229783058, -0.0325416699051857, 0.03687373548746109, -0.008288915269076824, 0.05321279168128967, 0.12307163327932358, -0.002062635263428092, 0.0545089989900589, 0.007235745899379253, 0.012109320610761642, -0.013669888488948345, 0.04280900955200195, -0.007184579502791166, 0.09482792019844055, -0.0029505810234695673, 0.004540995229035616, 0.012527178041636944, 0.020040074363350868, 0.04874427989125252, 0.008937019854784012, -0.0245597492903471, 0.0055600544437766075, 0.037317175418138504, -0.02820960059762001, 0.020449401810765266, -0.03550930321216583, -0.007849739864468575, -0.03390609845519066, -0.022018497809767723, -0.03051207773387432, 0.007141941227018833, 0.005014282185584307, -0.017959317192435265, -0.0013782880268990993, -0.0005196561687625945, 0.00005926079029450193, -0.017208879813551903, -0.06501511484384537, -0.06927896291017532, 0.015648312866687775, -0.0065620578825473785, 0.01993774063885212, 0.005018546245992184, 0.0916215106844902, -0.004732868634164333, -0.00770050473511219, 0.04679996892809868, 0.0076493388041853905, -0.046834077686071396, 0.022956544533371925, 0.0148722929880023, -0.01087280549108982, -0.015912670642137527, 0.010659613646566868, 0.03457126021385193, -0.03081907518208027, 0.05379267409443855, 0.018215147778391838, -0.04117169231176376, -0.016714274883270264, -0.026026511564850807, -0.04864194989204407, 0.01587856002151966, -0.08486758172512054, 0.004253185819834471, -0.0020455799531191587, 0.0007930752472020686, 0.06760752946138382, -0.04785740002989769, 0.06955184787511826, 0.03283160924911499, -0.04437810182571411, 0.008297443389892578, 0.003383361268788576, 0.001059565576724708, 0.009005241096019745, 0.03830638900399208, 0.01743059977889061, 0.018641531467437744, 0.044821541756391525, 0.07613522559404373, -0.04448043555021286, 0.011401522904634476, 0.03293394297361374, -0.019988907501101494, -0.006012022029608488, 0.047720957547426224, -0.029096480458974838, -0.01963074505329132, -0.037010177969932556, -0.06849440932273865, -0.00767492176964879, -0.009883593767881393, -0.05178013816475868, -0.02752738632261753, 0.008348609320819378, 0.021643279120326042, -0.060512494295835495, -0.015238983556628227, 0.014846709556877613, -0.02311004139482975, 0.04785740002989769, -0.02812432497739792, -0.004946060478687286, -0.05635097995400429, -0.037010177969932556, -0.03871571645140648, 0.005393764469772577, -0.006519419606775045, 0.025975346565246582, 0.07340636104345322, -0.034605368971824646, 0.01521340012550354, 0.009551013819873333, -0.037214841693639755, -0.008203638717532158, 0.07333814352750778, -0.036430295556783676, -0.005159252788871527, 0.011128637008368969, 0.016296416521072388, -0.04533320292830467, -0.038374610245227814, 0.03888627141714096, 0.017635265365242958, -0.011051887646317482, -0.052121248096227646, -0.04632241651415825, -0.022666601464152336, 0.005321279168128967, 0.0033620421309024096, 0.02628234401345253, -0.06170637160539627, 0.06491278111934662, 0.03474181145429611, -0.025463685393333435, 0.08636845648288727, 0.01686777174472809, -0.0974203422665596, 0.01448854710906744, -0.001374024199321866, -0.005372445099055767, -0.0204152911901474, 0.017874039709568024, -0.06272969394922256, -0.045094430446624756, 0.007743143476545811, -0.020057128742337227, 0.028755374252796173, 0.03629385307431221, 0.02512257732450962, -0.04502620920538902, 0.03629385307431221, -0.0669594258069992, 0.021882055327296257, 0.0167398564517498, 0.03629385307431221, 0.00794354360550642, -0.02916470356285572, 0.0009833493968471885, 0.06470812112092972, -0.009431625716388226, 0.04652708023786545, 0.0071760518476367, -0.004317143466323614, 0.01876091957092285, -0.01743059977889061, -0.011964350007474422, 0.022069664672017097, 0.00758111709728837, -0.052053023129701614, 0.00793501641601324, 0.008971130475401878, -0.019511356949806213, 0.013507862575352192, 0.023570537567138672, -0.05027926340699196, 0.06573144346475601, 0.02309298701584339, 0.04025069996714592, 0.021694445982575417, 0.09837543964385986, -0.007210162468254566, 0.034127820283174515, 0.02541251853108406, 0.056862641125917435, -0.03520230948925018, -0.02754444070160389, -0.005884106736630201, -0.0019944137893617153, 0.03370143473148346, -0.02251310460269451, -0.08971130847930908, -0.0021670993883162737, 0.0049204775132238865, 0.024013977497816086, -0.06027371808886528, -0.05304223671555519, 0.03694195672869682, -0.016714274883270264, 0.0015232587466016412, -0.024389196187257767, 0.0458107553422451, -0.029863974079489708, -0.028328988701105118, -0.01617703028023243, 0.11775035411119461, -0.028635986149311066, -0.02387753501534462, 0.04004603624343872, 0.007261328864842653, 0.04986993595957756, -0.03554341569542885, -0.012211653403937817, -0.00008920764230424538, 0.004941796883940697, -0.0191702488809824, 0.022359605878591537, 0.01184496283531189, 0.03496353328227997, 0.02126806043088436, 0.03196178376674652, -0.02484969049692154, 0.06354834884405136, -0.018419811502099037, 0.011853490024805069, -0.011546493507921696, 0.0054108197800815105, 0.0008543680305592716, 0.0051208785735070705, -0.02638467587530613, -0.01534984353929758, -0.029505809769034386, 0.02002301812171936, 0.0826844871044159, -0.03677140176296234, -0.04632241651415825, 0.02551485039293766, -0.020756399258971214, 0.004472773987799883, -0.029727529734373093, 0.10192295908927917, 0.01444590836763382, -0.012714787386357784, -0.05539587885141373, -0.05744252726435661, 0.005035601556301117, -0.02571951597929001, 0.019664855673909187, 0.03136484697461128, 0.04792562127113342, 0.013286142610013485, 0.011307718232274055, 0.0037926905788481236, -0.011682936921715736, -0.024815579876303673, -0.02089284174144268, -0.012808592058718204, 0.00739350775256753, -0.011529438197612762, -0.050586260855197906, -0.034315429627895355, -0.03574807941913605, 0.001416662591509521, -0.037590060383081436, 0.028328988701105118, 0.005137933883816004, -0.042297348380088806, -0.04117169231176376, 0.012620982713997364, -0.05297401547431946, -0.017447656020522118, 0.005547262728214264, -0.0054108197800815105, -0.018795030191540718, -0.015477758832275867, 0.0004916746984235942, -0.023911645635962486, -0.03776061534881592, -0.06948362290859222, 0.031245458871126175, -0.020278848707675934, 0.0007403101772069931, -0.0006443736492656171, 0.017771707847714424, 0.013286142610013485, -0.030682630836963654, 0.040080148726701736, 0.04499209672212601, 0.043764110654592514, 0.02735683135688305, 0.012313985265791416, 0.04604953154921532, 0.051268476992845535, 0.02771499566733837, 0.034895312041044235, -0.035099975764751434, 0.0410352498292923, -0.034315429627895355, -0.01597236469388008, 0.019221415743231773, -0.04720929637551308, -0.009167267940938473, -0.038272276520729065, -0.06409412622451782, -0.0101053137332201, 0.047993842512369156, -0.041546911001205444, -0.01840275712311268, -0.004413079936057329, 0.012885340489447117, -0.05921628698706627, -0.0714961588382721, -0.022956544533371925, 0.017942260950803757, -0.02329765073955059, -0.03428131714463234, 0.056862641125917435, -0.040660031139850616, -0.03257577866315842, 0.092440165579319, -0.028806539252400398, 0.032285839319229126, -0.06992706656455994, -0.017268573865294456, -0.042297348380088806, -0.06730053573846817, 0.047993842512369156, -0.04700463265180588, 0.05263290926814079, 0.040387142449617386, 0.03574807941913605, 0.013098533265292645, 0.005496096797287464, -0.01905086077749729, -0.013269087299704552, 0.01501726359128952, 0.00022891520347911865, 0.0007648272439837456, -0.039909593760967255, -0.00007022020145086572, 0.056862641125917435, -0.06498100608587265, -0.01569095067679882, -0.03175712004303932, 0.004558050539344549, -0.02174561098217964, -0.035577524453401566, 0.008817632682621479, 0.07954630255699158, -0.00832302588969469, 0.019784241914749146, 0.009269599802792072, -0.010574337095022202, -0.027663828805088997, -0.014855237677693367, 0.03293394297361374, 0.04076236113905907, -0.06296847015619278, 0.008706772699952126, -0.01992068625986576, 0.055327657610177994, -0.019477246329188347, -0.02484969049692154, -0.05133669823408127, 0.03738539665937424, 0.01695304922759533, -0.0437299981713295, -0.01743059977889061, -0.014701738953590393, 0.02607767842710018, 0.016791023313999176, -0.020176516845822334, -0.0021607037633657455, 0.0007456399616785347, -0.029693419113755226, 0.005832940340042114, -0.04257023334503174, 0.01579328253865242, 0.025463685393333435, -0.0011810851283371449, -0.022666601464152336, -0.016032058745622635, 0.01731974072754383, -0.014462963677942753, 0.05273523926734924, -0.028260767459869385, -0.0565897561609745, -0.0340937077999115, -0.057544857263565063, -0.03174006566405296, 0.008361401036381721, -0.052701130509376526, -0.0017599022248759866, -0.010565808974206448, 0.08650489896535873, 0.006996970158070326, 0.050483930855989456, -0.0057860384695231915, 0.05014282092452049, 0.018215147778391838, 0.08554979413747787, -0.05600987374782562, -0.013345835730433464, 0.04448043555021286, 0.01198993343859911, -0.012313985265791416, -0.05624864995479584, 0.031347792595624924, 0.004899158608168364, 0.02244488149881363, 0.0006059990264475346, 0.005189099814742804, -0.0003014005778823048, 0.0069841789081692696, -0.01655224710702896, -0.003040121868252754, -0.03170595318078995, -0.03704429045319557, -0.062149811536073685, 0.03581630066037178, 0.06518566608428955, 0.0010792858665809035, 0.005948064383119345, 0.04553787037730217, 0.018948528915643692, -0.05218946933746338, -0.014454435557126999, 0.09660167992115021, 0.05051803961396217, -0.018641531467437744, 0.0439346618950367, -0.03100668452680111, 0.004233998712152243, -0.02309298701584339, -0.017942260950803757, 0.0354410819709301, -0.06723231822252274, 0.01934080198407173, 0.03799939155578613, -0.05351978912949562, 0.0487101711332798, 0.07661277800798416, 0.0286018755286932, -0.0547136627137661, 0.049904048442840576, -0.0048479922115802765, 0.058397628366947174, 0.028942983597517014, -0.03156951069831848, -0.011648825369775295, 0.01534984353929758, -0.04427577182650566, -0.017115075141191483, -0.006502364296466112, -0.01859036646783352, -0.02551485039293766, 0.008109834045171738, -0.0069116936065256596, -0.002257706131786108, 0.03984137251973152, -0.0646740049123764, 0.008071459829807281, -0.03081907518208027, 0.015818865969777107, 0.03214939311146736, 0.038749828934669495, 0.038169942796230316, 0.031825341284275055, 0.043764110654592514, 0.08568623661994934, 0.013405529782176018, 0.0050697121769189835, 0.02715216763317585, -0.04734573885798454, 0.04881250113248825, -0.026231177151203156, -0.004468509927392006, 0.010744890198111534, 0.00023944156419020146, 0.04993815720081329, -0.0331556610763073, 0.004321407526731491, -0.0375218391418457, -0.0035731024108827114, -0.009559541009366512, 0.024150419980287552, 0.07695388048887253, -0.04724340885877609, 0.008578857406973839, -0.013269087299704552, 0.06453756242990494, -0.01608322560787201, -0.009508375078439713, 0.040387142449617386, -0.11775035411119461, -0.00493326922878623, -0.009892120957374573, 0.03738539665937424, -0.10765356570482254, -0.039056822657585144, 0.004805353935807943, -0.004097555298358202, 0.04557197913527489, -0.023144153878092766, 0.04724340885877609, -0.0010073335142806172, 0.021694445982575417, -0.022206107154488564, 0.00991770438849926, -0.0826844871044159, 0.04465099051594734, -0.07135971635580063, -0.04226323589682579, -0.01657783053815365, 0.01261245459318161, -0.050006378442049026, -0.006451197899878025, -0.017788762226700783, 0.023826368153095245, 0.03148423507809639, -0.016697218641638756, -0.003052913350984454, -0.036839623004198074, -0.007060927804559469, -0.030887296423316002, -0.04465099051594734, -0.053110457956790924, -0.0053639174439013, -0.03245639055967331, 0.05508888140320778, 0.0017439128132537007, -0.013166754506528378, 0.02311004139482975, 0.007994710467755795, -0.06637954711914062, -0.00028354572714306414, 0.012544233351945877, 0.009858010336756706, -0.04280900955200195, -0.027783216908574104, 0.03151834383606911, 0.020381180569529533, -0.0433206707239151, 0.06753931194543839, -0.03457126021385193, 0.014514129608869553, -0.015238983556628227, -0.002677694894373417, -0.05706730857491493, 0.011904655955731869, 0.05123436823487282, -0.057237859815359116, 0.030955517664551735, -0.0013249899493530393, -0.02368992567062378, -0.04117169231176376, -0.05266701802611351, -0.024815579876303673, 0.005496096797287464, 0.061569929122924805, 0.047891512513160706, 0.0014422456733882427, -0.015921199694275856, 0.005129406228661537, 0.00351554062217474, 0.008450941182672977, 0.0256001278758049, -0.00016762242012191564, 0.00827612355351448, -0.011256552301347256, -0.013695471920073032, -0.0011181934969499707, -0.009269599802792072, 0.023724036291241646, -0.027749106287956238, 0.07033639401197433, 0.05249646306037903, 0.006310491356998682, 0.012348095886409283, 0.03434953838586807, -0.09510080516338348, -0.018505088984966278, 0.04263845458626747, 0.024031031876802444, -0.007035344839096069, -0.005491832736879587, -0.02128511667251587, 0.013311725109815598, 0.015298677608370781, 0.012825647369027138, 0.060410160571336746, -0.0036093450617045164, 0.021319227293133736, -0.010813112370669842, -0.02887476049363613, -0.019511356949806213, 0.03881805017590523, -0.044821541756391525, 0.029863974079489708, 0.05133669823408127, 0.02350231632590294, 0.0040634446777403355, 0.029505809769034386, 0.024303918704390526, 0.05669208988547325, 0.045299094170331955, 0.04475332051515579, 0.038067612797021866, -0.032882776111364365, -0.021131617948412895, 0.07019995152950287, 0.020654067397117615, 0.04014836996793747, -0.01439474243670702, 0.008190847001969814, 0.10703957825899124, -0.0034451871179044247, 0.014173022471368313, 0.011921712197363377, -0.01830042526125908, -0.031910620629787445, 0.009406043216586113, -0.0030998156871646643, 0.010361144319176674, 0.00789664126932621, 0.017669375985860825, -0.045196760445833206, 0.013013255782425404, 0.021728556603193283, -0.017012743279337883, 0.06794863939285278, -0.029301146045327187, -0.026913391426205635 ]
718,080
pytorch_optimizer.optimizer.swats
SWATS
Improving Generalization Performance by Switching from Adam to SGD. :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 ams_bound: bool. whether to use the ams_bound variant of this algorithm from the paper. :param nesterov: bool. enables Nesterov momentum. :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 SWATS(Optimizer, BaseOptimizer): r"""Improving Generalization Performance by Switching from Adam to SGD. :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 ams_bound: bool. whether to use the ams_bound variant of this algorithm from the paper. :param nesterov: bool. enables Nesterov momentum. :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 = False, fixed_decay: bool = False, ams_bound: bool = False, nesterov: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-6, ): 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, 'ams_bound': ams_bound, 'nesterov': nesterov, 'adanorm': adanorm, 'adam_debias': adam_debias, 'phase': 'adam', 'eps': eps, } if adanorm: defaults.update({'r': r}) super().__init__(params, defaults) def __str__(self) -> str: return 'SWATS' @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_avg2'] = torch.zeros((1,), dtype=p.dtype, device=p.device) 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'] bias_correction2: float = 1.0 - beta2 ** 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_avg2'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) 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) 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'], ) if group['phase'] == 'sgd': if 'momentum_buffer' not in state: state['momentum_buffer'] = torch.zeros_like(grad) buf = state['momentum_buffer'] buf.mul_(beta1).add_(grad) update = buf.clone() update.mul_(1.0 - beta1) if group['nesterov']: update.add_(buf, alpha=beta1) p.add_(update, alpha=-group['lr']) continue 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'], ) step_size: float = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=group['lr'] * math.sqrt(bias_correction2), bias_correction1=bias_correction1, ) perturb = exp_avg.clone() perturb.div_(de_nom).mul_(-step_size) p.add_(perturb) perturb_view = perturb.view(-1) pg = perturb_view.dot(grad.view(-1)) if pg != 0: scaling = perturb_view.dot(perturb_view).div_(-pg) exp_avg2 = state['exp_avg2'] exp_avg2.mul_(beta2).add_(scaling, alpha=1.0 - beta2) corrected_exp_avg = exp_avg2 / bias_correction2 if ( group['step'] > 1 and corrected_exp_avg > 0.0 and corrected_exp_avg.allclose(scaling, rtol=group['eps']) ): group['phase'] = 'sgd' group['lr'] = corrected_exp_avg.item() 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 = False, fixed_decay: bool = False, ams_bound: bool = False, nesterov: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-06)
[ 0.004510370083153248, -0.052659302949905396, 0.0002750470011960715, 0.014426766894757748, -0.0018247347325086594, -0.030906861647963524, -0.0745614692568779, -0.07049758732318878, -0.019089533016085625, 0.03075714036822319, -0.045943211764097214, 0.0049301255494356155, 0.025516876950860023, 0.08666754513978958, -0.025773542001843452, 0.05620985105633736, 0.014758294448256493, 0.033815741539001465, 0.01123983133584261, -0.03208324685692787, -0.043633218854665756, -0.07079703360795975, -0.04087405651807785, 0.03035075217485428, -0.040317948907613754, -0.006887204013764858, 0.03725934401154518, -0.020907582715153694, -0.06258372217416763, -0.006593107245862484, 0.02009480819106102, -0.09214308857917786, 0.007282897364348173, -0.024960767477750778, 0.01739981397986412, -0.06065872684121132, -0.000239955959841609, -0.005545054562389851, -0.0919719785451889, -0.02851131372153759, 0.02896047942340374, -0.039847392588853836, 0.047910984605550766, -0.02167758159339428, -0.015581764280796051, 0.022073274478316307, -0.01818050630390644, 0.046584874391555786, -0.013068576343357563, -0.00741657754406333, 0.01202052365988493, -0.06348205357789993, 0.04782542958855629, 0.01950661465525627, 0.0054541523568332195, 0.04513043537735939, 0.0440182164311409, 0.009972542524337769, 0.06010261923074722, -0.10369306057691574, 0.05856262147426605, -0.07071147859096527, 0.022821884602308273, -0.005438110325485468, -0.010362888686358929, -0.004170822445303202, -0.08268922567367554, -0.025730764493346214, 0.005598526913672686, 0.015966763719916344, 0.017549537122249603, -0.03974045068025589, -0.004817834589630365, 0.0018862276338040829, -0.03869239613413811, -0.0037991912104189396, -0.03864961862564087, -0.026094375178217888, -0.015870513394474983, -0.03362324461340904, 0.03710962459445, 0.026564929634332657, -0.0184157844632864, -0.0019437101436778903, 0.03325963392853737, -0.037815455347299576, -0.0036601638421416283, -0.01236274465918541, -0.018800783902406693, -0.053129859268665314, 0.023976881057024002, -0.010576777160167694, 0.061385948210954666, 0.021025221794843674, 0.043226830661296844, 0.050862643867731094, -0.03640379384160042, -0.07019814848899841, -0.000815449224319309, -0.03253241255879402, 0.0015440062852576375, 0.03163408115506172, 0.017977314069867134, 0.052188750356435776, -0.0025506182573735714, -0.03030797466635704, -0.02177383005619049, -0.017153842374682426, 0.03854267671704292, -0.05770706757903099, -0.028233258053660393, 0.0104003194719553, -0.03668184578418732, -0.034756850451231, -0.02765575982630253, -0.024554379284381866, 0.003045235062018037, 0.034029632806777954, -0.036724623292684555, 0.048167649656534195, 0.03368740901350975, 0.022394107654690742, -0.07323536276817322, 0.03407241031527519, 0.032232969999313354, -0.01950661465525627, 0.03856406360864639, 0.0030826653819531202, 0.03597601503133774, -0.057108182460069656, -0.03860684111714363, -0.000006386362656485289, -0.02222299575805664, 0.011956357397139072, 0.025666598230600357, -0.03454296290874481, 0.004478286486119032, 0.03007269836962223, -0.0224582739174366, 0.010582124814391136, 0.024383269250392914, 0.034457407891750336, -0.0009491294040344656, -0.03272491320967674, 0.02761298231780529, -0.020907582715153694, 0.026137152686715126, -0.002989089349284768, -0.00415478041395545, 0.005146687850356102, 0.012063301168382168, 0.009261364117264748, -0.013656768947839737, 0.010881568305194378, 0.016319679096341133, -0.023762991651892662, -0.013956212438642979, 0.013047187589108944, -0.008240047842264175, 0.0003622733347583562, -0.024126602336764336, -0.03595462813973427, -0.028874922543764114, -0.0022217649966478348, -0.007555604912340641, -0.005529012996703386, -0.0046654390171170235, 0.06617704778909683, -0.009400391951203346, 0.03336657956242561, 0.021645497530698776, -0.04744042828679085, -0.013164825737476349, 0.011592746712267399, -0.032917413860559464, 0.10394972562789917, 0.021570637822151184, 0.03338796645402908, -0.0018407762981951237, -0.017913145944476128, 0.030650196596980095, -0.0013354652328416705, -0.03713101148605347, -0.016608428210020065, -0.031142139807343483, 0.02896047942340374, -0.00443283561617136, 0.025003544986248016, -0.021592026576399803, 0.01898258924484253, 0.011646218597888947, -0.031527139246463776, 0.019987864419817924, -0.0424996092915535, -0.026415208354592323, 0.03364463150501251, -0.004029121249914169, -0.018554812297225, 0.0722086951136589, 0.04902320355176926, -0.04134461283683777, -0.0042670718394219875, -0.0021041263826191425, -0.013357325457036495, 0.0032216927502304316, -0.013015104457736015, -0.018169812858104706, -0.0037216567434370518, -0.03591185063123703, 0.007651854772120714, -0.06040206179022789, 0.012095384299755096, 0.039847392588853836, 0.04692709818482399, 0.07002703845500946, -0.042285721749067307, 0.041216280311346054, 0.050648752599954605, 0.051974862813949585, -0.0002098779077641666, -0.017004121094942093, -0.07139591872692108, -0.01357121393084526, 0.0061653307639062405, 0.06694704294204712, 0.0010734520619735122, 0.04602876678109169, 0.0037403719034045935, -0.014255656860768795, -0.010127612389624119, 0.025431321933865547, -0.007710673846304417, 0.014940098859369755, 0.00016150239389389753, 0.07071147859096527, 0.026158541440963745, -0.03298157826066017, -0.01277982722967863, -0.0012559255119413137, -0.033580467104911804, -0.01843717321753502, -0.023527715355157852, -0.029324088245630264, 0.01359260268509388, -0.03208324685692787, 0.011282608844339848, 0.06566371768712997, 0.01708967611193657, -0.04448876902461052, 0.013902740553021431, -0.0003422213194426149, -0.010822748765349388, -0.019421059638261795, 0.04286321997642517, -0.09907306730747223, -0.02175244130194187, 0.04151572287082672, 0.05946095287799835, 0.011357469484210014, -0.06694704294204712, -0.00016927254910115153, -0.021731052547693253, -0.09924417734146118, 0.034264907240867615, -0.004590577911585569, 0.046114321798086166, 0.05809206888079643, -0.03189074993133545, 0.019517309963703156, 0.03387990966439247, 0.10309416800737381, 0.09967195987701416, -0.0841008871793747, -0.011271914467215538, -0.007593035232275724, 0.04384710639715195, 0.004210926126688719, 0.009961848147213459, 0.018779395148158073, 0.002764506498351693, 0.06070150434970856, -0.02630826272070408, -0.049065981060266495, 0.03193352743983269, -0.01720731519162655, 0.02630826272070408, -0.022565217688679695, 0.0026682568714022636, 0.05860539898276329, 0.017121760174632072, 0.03278907760977745, 0.028254646807909012, 0.10531860589981079, -0.011603441089391708, 0.050392087548971176, 0.00875872652977705, 0.013015104457736015, 0.016512177884578705, -0.02354910410940647, 0.014212878420948982, 0.06536427140235901, 0.01900397799909115, 0.047269318252801895, 0.02099313773214817, -0.027356315404176712, -0.021902164444327354, -0.0005036401562392712, 0.014298434369266033, 0.0670325979590416, -0.005095889326184988, -0.02267216145992279, -0.017196621745824814, -0.0069727590307593346, 0.03548407182097435, 0.005956789944320917, -0.08559810370206833, -0.0029329436365514994, -0.03248963505029678, 0.03505629673600197, 0.07255091518163681, -0.047525983303785324, 0.031077973544597626, 0.03122769482433796, -0.023656047880649567, -0.022800495848059654, -0.05924706533551216, 0.04821042716503143, 0.016341067850589752, -0.015688708052039146, -0.02359188161790371, -0.06741759926080704, -0.04688432067632675, 0.035826291888952255, 0.013539130799472332, -0.0476115383207798, -0.014565794728696346, 0.005855192895978689, 0.004103982355445623, 0.0029463116079568863, -0.061642613261938095, 0.045900434255599976, 0.06130039319396019, -0.04361182823777199, 0.07190925627946854, 0.021495776250958443, -0.08003701269626617, 0.030457695946097374, -0.0033580465242266655, -0.010143653489649296, 0.016672594472765923, -0.022971605882048607, 0.001699075335636735, 0.02354910410940647, 0.10506194084882736, 0.06562093645334244, 0.03706684708595276, -0.006384566426277161, -0.008801504038274288, 0.02423354610800743, -0.06356760859489441, -0.012405522167682648, 0.04314127564430237, -0.05685151368379593, 0.051974862813949585, 0.056894294917583466, 0.007389841601252556, -0.0019503941293805838, -0.0659203827381134, 0.06010261923074722, -0.049279868602752686, 0.010582124814391136, -0.07122480869293213, -0.018073562532663345, 0.017036205157637596, -0.04645654186606407, 0.008480671793222427, -0.035548239946365356, -0.00757699366658926, 0.040275171399116516, 0.025966042652726173, 0.02001994661986828, -0.0018233979353681207, -0.0008495376678183675, 0.0625409483909607, 0.0775986835360527, -0.025645209476351738, 0.02052258513867855, -0.025260210037231445, 0.05111930891871452, -0.07558812946081161, 0.03146297112107277, 0.020672306418418884, 0.014426766894757748, -0.003499747719615698, -0.062327057123184204, 0.037879619747400284, 0.01898258924484253, 0.04675598815083504, -0.07563091069459915, -0.012512466870248318, -0.019581476226449013, -0.005892623215913773, 0.0224582739174366, 0.012897465378046036, -0.028126314282417297, -0.0867958813905716, 0.03732351213693619, 0.04023239389061928, -0.014501628465950489, 0.08247533440589905, -0.01957078091800213, 0.019688419997692108, -0.06651926785707474, 0.019945085048675537, -0.023035772144794464, -0.03456435352563858, -0.01789175719022751, 0.016672594472765923, -0.00617602514103055, 0.008694560267031193, 0.03460713103413582, 0.01995578035712242, 0.04198627546429634, 0.03473546355962753, 0.019613558426499367, -0.025709375739097595, -0.0883786529302597, -0.013539130799472332, -0.06925703585147858, -0.02224438451230526, -0.017442593351006508, -0.007432619109749794, -0.02761298231780529, -0.013357325457036495, 0.0055236658081412315, 0.0003408845223020762, 0.003825927386060357, 0.019346198067069054, 0.03321685642004013, -0.01279052160680294, 0.02425493486225605, -0.017774119973182678, 0.01964564248919487, 0.009084906429052353, -0.004753667861223221, -0.03948378562927246, 0.03734489902853966, -0.016790233552455902, -0.0494082011282444, -0.011079414747655392, 0.035163238644599915, -0.00622415030375123, 0.05094819888472557, 0.01472621038556099, 0.0010848147794604301, -0.004082593135535717, 0.0344146303832531, -0.03032936342060566, -0.027463261038064957, 0.010106222704052925, -0.014950793236494064, 0.011496497318148613, -0.02558104321360588, 0.05047764256596565, 0.0007820291793905199, 0.04335516318678856, 0.0742192491889, -0.00316822063177824, 0.009897681884467602, 0.026179930195212364, -0.00953941885381937, -0.01849064603447914, 0.019945085048675537, -0.04196488857269287, -0.03189074993133545, -0.01157135795801878, -0.018255367875099182, 0.010576777160167694, 0.005398006644099951, 0.010191778652369976, 0.05531151965260506, -0.07092536985874176, 0.014202184043824673, 0.049750424921512604, 0.013378714211285114, 0.013881351798772812, 0.0160309299826622, -0.014961487613618374, 0.0208006389439106, 0.026329651474952698, -0.053771521896123886, -0.0673748180270195, 0.06403816491365433, 0.012063301168382168, -0.07066869735717773, -0.03077852912247181, 0.0061867195181548595, 0.002670930465683341, 0.06566371768712997, -0.04808209463953972, 0.01761370338499546, -0.018447868525981903, -0.08063589781522751, -0.036040183156728745, 0.03809351101517677, -0.013528436422348022, -0.06716093420982361, 0.022543828934431076, -0.030821306630969048, 0.023484937846660614, -0.01867244951426983, -0.021763136610388756, 0.01796661876142025, 0.0015640583587810397, 0.015870513394474983, -0.021196331828832626, 0.013945518061518669, 0.04598598927259445, 0.023762991651892662, -0.02361327037215233, 0.028682423755526543, 0.02001994661986828, -0.02312132716178894, -0.0024156011641025543, 0.025024933740496635, 0.03184797242283821, 0.003991690929979086, 0.007133175618946552, 0.05552540719509125, 0.01664051041007042, 0.006919287145137787, 0.007678590714931488, 0.030821306630969048, 0.06566371768712997, 0.012116773054003716, -0.01470482163131237, 0.017036205157637596, -0.045258767902851105, -0.0894908756017685, -0.02203049696981907, -0.025238821282982826, -0.020223140716552734, 0.009501988999545574, -0.054669853299856186, -0.02694992907345295, 0.05193208530545235, -0.020832723006606102, 0.02314271591603756, -0.0476115383207798, -0.04061739146709442, -0.029302699491381645, 0.017977314069867134, 0.009427127428352833, 0.03766573220491409, 0.05462707579135895, 0.009592890739440918, -0.05342930182814598, 0.036895737051963806, -0.007165258750319481, 0.004341932944953442, -0.05248819291591644, -0.07075425982475281, 0.025431321933865547, -0.04023239389061928, -0.016116484999656677, 0.017367731779813766, 0.006448732689023018, 0.005507624242454767, -0.04530154541134834, 0.02399826981127262, -0.017570925876498222, -0.02406243607401848, -0.008491366170346737, 0.005307103972882032, -0.07593035697937012, 0.0035264836624264717, 0.0035238100681453943, -0.013432186096906662, 0.012202329002320766, 0.0023420772049576044, 0.07888200879096985, -0.028382979333400726, -0.02739909291267395, 0.0031361375004053116, 0.029110200703144073, 0.049964312463998795, -0.06929981708526611, 0.04393266141414642, -0.014587183482944965, 0.013079270720481873, -0.015132598578929901, 0.04335516318678856, -0.007641160394996405, -0.03533434867858887, -0.014394683763384819, 0.037152402102947235, -0.022779105231165886, 0.03139880672097206, 0.04538710042834282, 0.027912424877285957, -0.02763437107205391, 0.012587327510118484, 0.058947622776031494, -0.02985880896449089, 0.04936542361974716, -0.014127323403954506, 0.0037002679891884327, 0.022501051425933838, 0.031099362298846245, -0.03845712170004845, -0.016554955393075943, -0.005753595847636461, -0.0034596435725688934, -0.026372428983449936, -0.051547084003686905, -0.017175232991576195, 0.0011409604921936989, 0.02124980464577675, 0.08551254868507385, -0.018800783902406693, -0.0014330517733469605, 0.01974189281463623, -0.029003256931900978, 0.014672738499939442, 0.009395044296979904, -0.04294877499341965, 0.0401468388736248, -0.07751312851905823, -0.011090109124779701, -0.04200766608119011, -0.010411013849079609, 0.014469544403254986, 0.021281888708472252, -0.04744042828679085, 0.02429771237075329, 0.030201030895113945, 0.038970451802015305, 0.022971605882048607, -0.026415208354592323, -0.0063097053207457066, 0.008614351972937584, 0.027762703597545624, -0.0015025654574856162, 0.006609149277210236, -0.004988945089280605, 0.003299227450042963, -0.02044772356748581, 0.00796733982861042, 0.018950505182147026, 0.053600411862134933, -0.014191489666700363, 0.019378282129764557, -0.059161510318517685, -0.034714072942733765, 0.007935256697237492, 0.028254646807909012, 0.007437966298311949, 0.02177383005619049, 0.018715228885412216, -0.03439324349164963, -0.0017659154254943132, -0.015314403921365738, 0.013432186096906662, 0.020383557304739952, -0.04113072529435158, 0.004066551569849253, -0.0404248908162117, 0.008421852253377438, 0.029281310737133026, 0.030906861647963524, -0.09727640450000763, -0.040724337100982666, -0.048381537199020386, -0.0006680667866021395, 0.010186430998146534, 0.00017896437202580273, 0.04057461395859718, -0.045943211764097214, -0.035591017454862595, -0.020255224779248238, 0.04423210397362709, 0.02848992496728897, 0.03430768474936485, -0.030479084700345993, 0.02782686986029148, -0.026864372193813324, -0.02132466621696949, 0.01526093203574419, 0.008641088381409645, -0.01548551395535469, -0.04722654074430466, -0.019656335934996605, 0.0008074283832684159, -0.011485802941024303, 0.05642373859882355, -0.07160980999469757, -0.019848836585879326, -0.01123983133584261, -0.007256161421537399, -0.057578735053539276, -0.016554955393075943, -0.015228847973048687, -0.030864084139466286, -0.011186359450221062, 0.021763136610388756, 0.05283041670918465, -0.0026027534622699022, 0.010068792849779129, 0.026222707703709602, -0.02536715567111969, -0.005109257064759731, 0.014330517500638962, 0.018811477348208427, 0.03929128497838974, 0.027955204248428345, -0.009993932209908962, 0.018137728795409203, -0.013988296501338482, -0.0476115383207798, 0.07079703360795975, -0.016298290342092514, 0.012127467431128025, 0.03439324349164963, -0.010678374208509922, -0.06968481838703156, -0.05163263902068138, -0.0061653307639062405, -0.0317196361720562, 0.06617704778909683, -0.02765575982630253, 0.03191213682293892, 0.02070438861846924, -0.009641015902161598, 0.0007258834666572511, -0.03257519006729126, -0.004681480582803488, 0.031077973544597626, -0.008544838055968285, -0.013432186096906662, 0.04061739146709442, 0.007133175618946552, 0.03484240919351578, -0.03766573220491409, -0.03499212861061096, -0.027891036123037338, 0.043697383254766464, -0.01685439981520176, -0.030008532106876373, 0.01323968730866909, -0.03524879366159439, 0.0740053579211235, -0.0012599359033629298, 0.03366602212190628, 0.04431765899062157, 0.08422922343015671, -0.042799051851034164, 0.022800495848059654, -0.04598598927259445, -0.07362035661935806, -0.0912875384092331, 0.026864372193813324, -0.04598598927259445, 0.0625409483909607, 0.007234772201627493, -0.01113288663327694, 0.0020453070756047964, -0.0015707423444837332, 0.02089688926935196 ]
718,082
pytorch_optimizer.optimizer.swats
__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 = False, fixed_decay: bool = False, ams_bound: bool = False, nesterov: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-6, ): 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, 'ams_bound': ams_bound, 'nesterov': nesterov, 'adanorm': adanorm, 'adam_debias': adam_debias, 'phase': 'adam', '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 = False, fixed_decay: bool = False, ams_bound: bool = False, nesterov: bool = False, r: float = 0.95, adanorm: bool = False, adam_debias: bool = False, eps: float = 1e-06)
[ 0.0005372188752517104, -0.026221003383398056, -0.017417697235941887, -0.004562227986752987, -0.03217173367738724, -0.028166798874735832, -0.09128233790397644, -0.041560668498277664, -0.033531904220581055, 0.03016926720738411, -0.03368303179740906, 0.057920459657907486, 0.0147257000207901, 0.08689957857131958, -0.058524977415800095, 0.05066623166203499, 0.03296516463160515, 0.03833027184009552, -0.02869575284421444, -0.008255460299551487, -0.004921161103993654, -0.01063575316220522, -0.04076723754405975, 0.1030704602599144, 0.02057253010571003, 0.042240750044584274, 0.00030491597135551274, -0.0014900444075465202, -0.04881489276885986, 0.017804967239499092, 0.010427949018776417, -0.02353845164179802, -0.005605967249721289, 0.05387773737311363, 0.029262488707900047, -0.017974989488720894, -0.021177049726247787, 0.01622755266726017, -0.1100979894399643, 0.030414853245019913, 0.06290774047374725, -0.029602529481053352, 0.07552707195281982, -0.04001158848404884, -0.030717112123966217, -0.027543388307094574, 0.05229087546467781, 0.03850029036402702, -0.017464926466345787, -0.02724112942814827, 0.024124078452587128, -0.027562279254198074, 0.045338910073041916, -0.020496966317296028, -0.05686255171895027, 0.05648472532629967, 0.036554496735334396, 0.060829706490039825, 0.0442054383456707, 0.0016388127114623785, 0.015679705888032913, -0.03625223785638809, 0.020364727824926376, -0.008548273704946041, -0.005572907626628876, 0.012949926778674126, -0.09294476360082626, -0.01853227987885475, 0.014829602092504501, 0.038538072258234024, 0.10495957732200623, 0.002244512317702174, -0.008510490879416466, 0.029262488707900047, -0.007669832557439804, 0.014754037372767925, -0.09853656589984894, -0.03974711149930954, -0.03217173367738724, -0.009459774941205978, 0.052706483751535416, 0.04855041578412056, -0.015953628346323967, -0.04953275993466377, 0.0006036332924850285, -0.061472006142139435, -0.040162719786167145, -0.06014962121844292, 0.02495529130101204, -0.011854236014187336, -0.0515730120241642, -0.03158610686659813, 0.018740082159638405, -0.018607843667268753, 0.05247978866100311, 0.02639102376997471, 0.02807234227657318, -0.05674920231103897, 0.019014006480574608, -0.01326163113117218, -0.03158610686659813, 0.012298179790377617, -0.03553437069058418, 0.006087693385779858, 0.010919121094048023, -0.01615198701620102, -0.06290774047374725, -0.026976652443408966, 0.03449535369873047, -0.046850208193063736, -0.04246744513511658, 0.07121986895799637, -0.033475227653980255, 0.04065388813614845, -0.055615730583667755, 0.007641495671123266, 0.016539257019758224, 0.008902483619749546, -0.009039444848895073, 0.03160499781370163, 0.051988616585731506, 0.03553437069058418, -0.0366489514708519, 0.03290849179029465, 0.037159014493227005, -0.005624858662486076, 0.0014050339814275503, 0.001262169098481536, 0.015301882289350033, -0.02508752979338169, 0.03251177817583084, -0.01976020820438862, -0.021498199552297592, -0.022537216544151306, 0.032001715153455734, -0.019590187817811966, 0.017493262887001038, 0.048852674663066864, -0.02809123322367668, 0.012987708672881126, 0.07110652327537537, 0.007070036139339209, 0.049721673130989075, -0.030565982684493065, -0.007471474818885326, -0.004958943463861942, -0.008987494744360447, -0.03404196351766586, 0.003362635849043727, 0.040993932634592056, 0.04258079454302788, -0.000935705378651619, -0.004963666200637817, 0.04700133576989174, 0.013516662642359734, -0.04322309419512749, 0.029867006465792656, -0.04258079454302788, -0.00810432992875576, 0.016529811546206474, -0.029640313237905502, 0.0012279287911951542, 0.017899423837661743, -0.025408681482076645, 0.005927118007093668, 0.00888831540942192, -0.034325335174798965, 0.011136369779706001, -0.008661621250212193, -0.01908957026898861, -0.008250737562775612, -0.09037556499242783, -0.05761819705367088, 0.020383618772029877, -0.024520793929696083, 0.055464599281549454, 0.008548273704946041, 0.008675789460539818, -0.01764439232647419, -0.016558147966861725, 0.062303218990564346, -0.006975580472499132, -0.01000289712101221, -0.08501045405864716, 0.01776718534529209, 0.006035742349922657, -0.024539684876799583, 0.048966024070978165, -0.04352535307407379, 0.02714667282998562, 0.0518374890089035, 0.0034500076435506344, 0.015103524550795555, 0.024634141474962234, -0.02057253010571003, 0.021044811233878136, 0.027052216231822968, -0.014149518683552742, 0.023179518058896065, 0.051913052797317505, 0.06815949827432632, 0.050552885979413986, 0.014102290384471416, -0.01436676736921072, 0.010805773548781872, 0.008340470492839813, -0.026296569034457207, 0.004590564873069525, -0.0013979497598484159, -0.03149165213108063, -0.003901035524904728, -0.033437445759773254, 0.04870154708623886, 0.022952822968363762, 0.0034382008016109467, -0.04360092058777809, 0.005209251772612333, 0.03158610686659813, 0.02786453813314438, 0.008963880129158497, 0.08523715287446976, -0.0183811504393816, -0.006106584332883358, -0.011041914112865925, 0.045301128178834915, 0.01255321130156517, 0.028166798874735832, -0.04246744513511658, -0.0806276947259903, 0.02726002037525177, -0.012666557915508747, -0.03525100275874138, -0.025389790534973145, -0.0077973478473722935, 0.011995919980108738, 0.0009575483272783458, -0.031434979289770126, 0.022990606725215912, -0.09921664744615555, -0.04635903611779213, 0.04054054245352745, 0.038651421666145325, -0.006890569813549519, -0.013667792081832886, 0.014338430017232895, -0.00810432992875576, 0.03015037626028061, 0.018607843667268753, -0.06347447633743286, -0.04511221498250961, -0.040200501680374146, -0.016407018527388573, -0.003100520232692361, 0.04651016741991043, -0.04987280070781708, 0.009658132679760456, 0.04635903611779213, 0.0034641760867089033, 0.03368303179740906, -0.008397144265472889, 0.002668383764103055, -0.0062577142380177975, -0.03322964161634445, 0.06857509911060333, 0.013308859430253506, 0.029092468321323395, 0.003107604570686817, -0.0022669455502182245, 0.03508098050951958, -0.011863681487739086, 0.10820886492729187, 0.045301128178834915, -0.024879727512598038, -0.0058090477250516415, -0.008699403144419193, -0.004734610207378864, -0.000680083641782403, -0.03090602345764637, -0.009728974662721157, 0.05021284520626068, 0.029016902670264244, -0.032039497047662735, 0.002446412108838558, 0.026183221489191055, 0.008940266445279121, 0.009691191837191582, -0.021177049726247787, 0.00387269863858819, -0.004812536295503378, 0.018022216856479645, 0.007244780194014311, 0.009851767681539059, 0.07231555879116058, 0.010956902988255024, 0.09150903671979904, -0.02368958108127117, 0.039482634514570236, -0.012317070737481117, 0.049041587859392166, -0.01613309606909752, 0.04496108740568161, -0.03884033486247063, 0.06815949827432632, -0.010135135613381863, -0.06018740311264992, -0.02656104601919651, 0.032851818948984146, 0.02784564718604088, 0.03485428914427757, 0.03321075066924095, 0.02860129624605179, 0.03024483099579811, 0.06370116770267487, 0.01830558478832245, 0.050401754677295685, -0.06804614514112473, 0.004625985864549875, -0.05795824155211449, 0.032001715153455734, 0.04284527152776718, -0.016388127580285072, 0.02491750940680504, 0.015802498906850815, -0.03543991595506668, -0.053386569023132324, -0.06256769597530365, 0.031132718548178673, 0.02125261351466179, -0.03817914053797722, -0.006890569813549519, -0.022291630506515503, -0.013356087729334831, 0.014876830391585827, -0.021913805976510048, -0.06177426502108574, 0.00954950787127018, 0.007036976516246796, 0.06045188009738922, 0.010229591280221939, -0.02146041765809059, 0.08531271666288376, -0.02140374481678009, -0.020194705575704575, 0.059280626475811005, -0.006087693385779858, -0.034344226121902466, 0.012184832245111465, -0.01846615970134735, 0.034344226121902466, -0.01145752053707838, -0.002878548577427864, 0.01921236328780651, 0.0025337839033454657, 0.09029999375343323, 0.017833305522799492, -0.0014286480145528913, -0.014338430017232895, 0.021479308605194092, 0.022423868998885155, -0.0514974445104599, -0.03094380721449852, -0.003485428635030985, -0.045301128178834915, 0.05062844976782799, 0.011089141480624676, -0.007976814173161983, -0.002996618626639247, -0.030547091737389565, 0.046094559133052826, -0.005851553287357092, 0.020950354635715485, -0.0807788223028183, -0.022461652755737305, -0.014111735858023167, 0.02355734258890152, -0.0055256797932088375, -0.031907256692647934, -0.0035657163243740797, 0.05512455850839615, -0.016577038913965225, -0.005421778187155724, 0.011589759029448032, 0.06328555941581726, 0.021535983309149742, 0.002826597774401307, -0.024067405611276627, 0.01110803335905075, 0.025352006778120995, 0.05614468455314636, -0.017899423837661743, -0.008061825297772884, -0.009917886927723885, 0.02361401543021202, -0.012439863756299019, -0.07843631505966187, 0.04250522702932358, 0.031246066093444824, 0.03891589865088463, -0.0588650181889534, -0.04246744513511658, -0.012997154146432877, -0.039293721318244934, -0.006602478679269552, 0.025937635451555252, -0.011693661101162434, -0.006248268764466047, 0.022442759945988655, 0.04031384736299515, 0.00997456070035696, 0.05988514423370361, -0.001262169098481536, 0.004290666896849871, -0.02803456038236618, -0.002649492584168911, -0.04722803086042404, -0.023935167118906975, 0.009204743430018425, -0.0071030957624316216, 0.02659882791340351, -0.022291630506515503, 0.027637844905257225, 0.007669832557439804, 0.06094305217266083, 0.031094936653971672, 0.074015773832798, 0.055540166795253754, -0.023122845217585564, -0.00021282132365740836, -0.013733911328017712, -0.05754263326525688, -0.045301128178834915, -0.00606880197301507, -0.03610110655426979, -0.03290849179029465, 0.02661771886050701, 0.007660386618226767, -0.014829602092504501, 0.002479471731930971, 0.011041914112865925, -0.012449309229850769, 0.01772940345108509, -0.05739150568842888, -0.000651746813673526, -0.030773784965276718, -0.0663081556558609, -0.028393492102622986, 0.02720334567129612, 0.005516234319657087, -0.03513765707612038, -0.02882799133658409, 0.032814037054777145, 0.02066698670387268, 0.05221531167626381, -0.01245875470340252, -0.03083045966923237, -0.0257865060120821, 0.004356786143034697, -0.017294906079769135, 0.03160499781370163, -0.013469434343278408, 0.0441676564514637, -0.013630010187625885, -0.02068587765097618, 0.011306391097605228, -0.03887811675667763, 0.04137175530195236, 0.0658547654747963, -0.02729780226945877, -0.0010708955815061927, 0.0033130464144051075, -0.0010443298378959298, 0.005034508183598518, 0.039293721318244934, -0.021101484075188637, -0.04103171452879906, 0.014499005861580372, -0.003107604570686817, -0.031359411776065826, -0.0219893716275692, -0.00040468521183356643, 0.0011505929287523031, -0.036497823894023895, 0.007263671141117811, 0.07881414145231247, 0.020043576136231422, -0.0017781354254111648, -0.06018740311264992, 0.011939246207475662, 0.022386087104678154, 0.040842801332473755, -0.07654719054698944, -0.027618952095508575, 0.03538324311375618, 0.0590917132794857, -0.045981213450431824, -0.010579079389572144, 0.025389790534973145, 0.018617291003465652, 0.03084935061633587, -0.0035609935875982046, 0.017899423837661743, -0.03833027184009552, -0.050515104085206985, -0.036497823894023895, 0.029168032109737396, -0.037234582006931305, -0.0952872782945633, -0.0055634621530771255, -0.017899423837661743, 0.015292436815798283, -0.019032897427678108, -0.0012090376112610102, -0.023765144869685173, 0.005842107348144054, -0.024690814316272736, -0.0258620698004961, -0.04700133576989174, 0.05761819705367088, -0.011249717324972153, -0.02503085695207119, 0.056975897401571274, 0.04805924370884895, 0.04038941115140915, -0.029583638533949852, 0.010909675620496273, 0.04949497804045677, 0.011825899593532085, -0.02809123322367668, 0.09407824277877808, 0.02214050106704235, 0.004113561473786831, -0.06732828170061111, -0.04579230025410652, 0.05074179917573929, 0.0041655125096440315, 0.046661294996738434, 0.020723659545183182, -0.012232060544192791, -0.0443565659224987, -0.030754894018173218, 0.02146041765809059, 0.014489560388028622, 0.02571094036102295, -0.040087152272462845, -0.006569419056177139, 0.012288734316825867, -0.028242362663149834, 0.044394351541996, -0.04877711087465286, -0.03166167438030243, 0.02735447697341442, -0.028393492102622986, -0.04552782326936722, 0.030773784965276718, 0.03013148345053196, -0.017087101936340332, -0.007225888781249523, -0.013148284517228603, 0.060678575187921524, 0.023954058066010475, -0.013072718866169453, -0.010701872408390045, -0.0110135767608881, -0.00439929123967886, -0.013875595293939114, 0.01921236328780651, 0.012024257332086563, -0.036422256380319595, -0.06200096011161804, 0.01467847265303135, -0.005502065643668175, 0.00048054521903395653, 0.005086459219455719, 0.010295710526406765, -0.04575451835989952, 0.023292865604162216, -0.008009874261915684, 0.020062467083334923, -0.048852674663066864, -0.025559810921549797, 0.01033349335193634, -0.04031384736299515, -0.09770534932613373, -0.08516158908605576, 0.004829066339880228, -0.0035562708508223295, -0.05497342720627785, 0.012657112441956997, -0.009029999375343323, 0.01979799009859562, 0.0012810603948310018, 0.03993602469563484, -0.02368958108127117, -0.02144152671098709, -0.04329865798354149, 0.012373744510114193, -0.010021788068115711, -0.027127781882882118, 0.032700687646865845, 0.050552885979413986, -0.07730284333229065, -0.02138485200703144, 0.023708472028374672, 0.02421853505074978, 0.007036976516246796, -0.005440669134259224, -0.032700687646865845, 0.04635903611779213, 0.01547190360724926, -0.03970932960510254, 0.007051145192235708, -0.03530767560005188, 0.004217463079839945, -0.028884664177894592, 0.001781677477993071, -0.04987280070781708, -0.04208962246775627, 0.029073575511574745, 0.09951891005039215, -0.0077265058644115925, 0.012949926778674126, -0.01909901574254036, -0.02206493727862835, 0.03982267528772354, -0.08667288720607758, -0.025295333936810493, 0.015566359274089336, -0.11946802586317062, 0.010805773548781872, -0.03906702622771263, 0.03232286497950554, -0.03011259250342846, -0.008751354180276394, -0.056220248341560364, -0.0020851176232099533, 0.029111359268426895, 0.03098158910870552, 0.03619556501507759, 0.03024483099579811, -0.005690977908670902, 0.01506574172526598, 0.03581773862242699, -0.015641923993825912, 0.003402779810130596, -0.011325282044708729, -0.018588952720165253, -0.0367056280374527, 0.0056343041360378265, 0.04911715164780617, 0.037914663553237915, -0.03030150569975376, 0.04998615011572838, -0.054066650569438934, -0.010144581086933613, -0.009393655695021152, -0.0027982608880847692, 0.020950354635715485, 0.03538324311375618, 0.04707690328359604, -0.029583638533949852, -0.01762550137937069, -0.017795521765947342, 0.039369288831949234, 0.005402886774390936, 0.0029281380120664835, 0.000848923868034035, -0.03736681863665581, 0.007466751616448164, -0.03549658879637718, -0.012779905460774899, -0.050477322190999985, -0.014527342282235622, -0.031359411776065826, 0.007698168978095055, 0.014971286058425903, 0.023765144869685173, -0.05663585662841797, -0.04938162863254547, 0.018862875178456306, -0.01911790668964386, 0.03290849179029465, 0.040124934166669846, 0.0015207426622509956, -0.06022518500685692, 0.012770459987223148, -0.006654429715126753, -0.06339891254901886, 0.03827359527349472, -0.013630010187625885, -0.04322309419512749, -0.0660436823964119, -0.010928566567599773, 0.027033325284719467, 0.004290666896849871, 0.043827611953020096, -0.03538324311375618, -0.058600541204214096, -0.061623137444257736, 0.010059570893645287, -0.012014810927212238, -0.010229591280221939, -0.018003325909376144, -0.05323543772101402, 0.0513840988278389, -0.04768142104148865, 0.02510642260313034, 0.010276819579303265, 0.017417697235941887, 0.024483012035489082, -0.056371379643678665, 0.028374601155519485, 0.049041587859392166, 0.02956474758684635, -0.05803380534052849, -0.004463049117475748, 0.03746127337217331, 0.05278204753994942, 0.0014144795713946223, -0.044658828526735306, 0.005790156777948141, -0.03158610686659813, -0.005950732156634331, 0.02499307505786419, 0.008675789460539818, 0.019514622166752815, -0.07941865921020508, -0.040087152272462845, 0.010881338268518448, 0.04322309419512749, -0.03311629593372345, 0.0368000827729702, 0.01917458139359951, -0.02508752979338169, -0.020289162173867226, -0.008571887388825417, -0.024747489020228386, 0.053311001509428024, 0.00211109290830791, 0.05531347170472145, 0.07582932710647583, 0.01212815847247839, 0.043034180998802185, -0.0440920889377594, -0.02809123322367668, 0.009332259185612202, 0.0516107939183712, -0.011892018839716911, -0.006158535368740559, 0.06895292550325394, -0.007225888781249523, 0.01998690329492092, -0.029715877026319504, 0.0219893716275692, 0.04726581275463104, 0.04620790481567383, -0.04620790481567383, 0.028979120776057243, -0.026183221489191055, -0.057013679295778275, -0.09271807223558426, -0.0067063807509839535, -0.07431802898645401, 0.058562759310007095, 0.02285836823284626, 0.01683207042515278, 0.012043148279190063, 0.041749581694602966, 0.0013011322589591146 ]
718,085
pytorch_optimizer.optimizer.swats
__str__
null
def __str__(self) -> str: return 'SWATS'
(self) -> str
[ -0.004848398733884096, -0.05745868384838104, 0.03278686851263046, -0.023347962647676468, -0.00779698183760047, -0.08568943291902542, 0.001214248826727271, 0.02786969766020775, 0.08727117627859116, -0.023640243336558342, -0.07853718847036362, 0.012035032734274864, -0.004796820227056742, 0.0014775152085348964, 0.021422358229756355, 0.00854487344622612, 0.003898490918800235, -0.07668035477399826, 0.012877484783530235, 0.005144976545125246, 0.003780289785936475, 0.021800601854920387, 0.012602398172020912, -0.018069742247462273, -0.022763404995203018, 0.07014704495668411, -0.020322011783719063, -0.01755395531654358, -0.055842552334070206, -0.024895325303077698, 0.02314164862036705, -0.051097311079502106, 0.01316116750240326, -0.028454255312681198, -0.029640566557645798, 0.022694632411003113, -0.04463277757167816, -0.015336070209741592, -0.04958433285355568, -0.008334260433912277, 0.020597098395228386, 0.0094904825091362, 0.00510629266500473, -0.03902789205312729, -0.029881266877055168, 0.006602074950933456, -0.02052832767367363, 0.06925301998853683, 0.02087218500673771, -0.011742752976715565, -0.014003620482981205, 0.028419870883226395, -0.057871315628290176, -0.020253241062164307, -0.009172414429485798, -0.00213621836155653, 0.03177248686552048, 0.027113208547234535, 0.009628025814890862, 0.018826229497790337, -0.010100831277668476, -0.014691336080431938, 0.06467970460653305, -0.00038845217204652727, 0.006443040911108255, 0.010719775222241879, -0.006546197924762964, 0.03748052939772606, 0.04666154086589813, 0.03039705380797386, 0.07049090415239334, -0.062479011714458466, -0.0486903041601181, 0.04091911017894745, 0.00914662517607212, -0.02847144939005375, -0.047280486673116684, -0.01525870244950056, -0.00942171085625887, -0.040884725749492645, 0.03514229506254196, -0.004046779591590166, -0.039337363094091415, 0.016092557460069656, -0.008063471876084805, -0.06244462728500366, -0.004998836666345596, -0.05116608366370201, -0.058559030294418335, 0.03271809592843056, -0.06471408903598785, 0.015250105410814285, -0.014012216590344906, 0.04772750288248062, -0.035073522478342056, 0.011312930844724178, 0.012851695530116558, -0.08163190633058548, -0.009456097148358822, 0.006997511722147465, 0.013548008166253567, 0.03572685271501541, -0.04662715643644333, 0.020356398075819016, -0.04961872100830078, -0.020012540742754936, -0.032081957906484604, 0.040059465914964676, -0.02149112895131111, 0.018000969663262367, -0.009395921602845192, 0.0009316405048593879, 0.015000808984041214, -0.024774974212050438, 0.010049251839518547, -0.0724165141582489, 0.009404518641531467, 0.02537672594189644, 0.02030481956899166, -0.01458817906677723, -0.006602074950933456, 0.012146786786615849, -0.055120449513196945, 0.013272921554744244, 0.0302423182874918, 0.08170068264007568, -0.02312445640563965, -0.011656789109110832, 0.0486559197306633, -0.024190416559576988, 0.025136025622487068, -0.0050848014652729034, -0.05329800024628639, -0.017622726038098335, 0.05395133048295975, -0.02384655736386776, 0.04758995771408081, -0.0007629350875504315, 0.04263840243220329, 0.12158821523189545, -0.020442362874746323, 0.029038814827799797, 0.030328283086419106, 0.02811039797961712, -0.00385765777900815, 0.012413276359438896, -0.05721798539161682, 0.03429984301328659, -0.014201338402926922, 0.006400058511644602, 0.020597098395228386, 0.019978154450654984, 0.008862941525876522, -0.011639595963060856, -0.034471772611141205, 0.002735820831730962, 0.005514624062925577, -0.032683711498975754, 0.04724609851837158, -0.01849956437945366, -0.0025123129598796368, -0.029451444745063782, -0.014373268000781536, -0.016668520867824554, -0.040059465914964676, 0.026545843109488487, -0.014201338402926922, 0.036036327481269836, 0.027216367423534393, 0.007392948493361473, -0.020700255408883095, -0.024121643975377083, -0.0771617516875267, 0.0308440700173378, 0.009739779867231846, 0.0037652458995580673, 0.017253078520298004, 0.07509860396385193, 0.03768684342503548, -0.03748052939772606, -0.006739618256688118, -0.005304011050611734, -0.07011266052722931, 0.0462489128112793, 0.05092538148164749, -0.048346444964408875, 0.011183983646333218, 0.04525172337889671, 0.0379619300365448, 0.004085463937371969, 0.012576608918607235, 0.017966585233807564, -0.03275248035788536, -0.006563391070812941, -0.00747891329228878, -0.03498755767941475, 0.008639434352517128, -0.07042213529348373, -0.0604846365749836, 0.002021240768954158, -0.00717803742736578, 0.036139484494924545, -0.03607071191072464, 0.0344030000269413, 0.080669105052948, -0.0025853828992694616, 0.03404194861650467, -0.03713667392730713, -0.004046779591590166, -0.03576124086976051, 0.04143489897251129, 0.02288375422358513, 0.0008553469670005143, -0.0015387649182230234, 0.0675681084394455, -0.08699609339237213, 0.02159428782761097, -0.0004779089940711856, -0.030104774981737137, -0.0075648776255548, 0.03710228577256203, -0.021267622709274292, -0.02266024798154831, -0.01731325499713421, -0.04556119441986084, 0.0260988287627697, 0.01757114753127098, -0.02835109829902649, -0.019307630136609077, -0.029245128855109215, -0.011845910921692848, -0.038752805441617966, -0.00007004765211604536, 0.04992819204926491, 0.0018944430630654097, 0.01222415454685688, -0.0604846365749836, -0.009920305572450161, -0.04545803740620613, -0.05419203266501427, 0.0041542355902493, -0.009971884079277515, -0.008398733101785183, 0.022694632411003113, 0.015138352289795876, -0.03060336969792843, -0.008802766911685467, 0.0009907410712912679, -0.014038005843758583, -0.007216721307486296, 0.085483118891716, -0.06364812701940536, -0.009370132349431515, -0.012946256436407566, -0.024964096024632454, -0.07214142382144928, -0.05350431799888611, 0.023640243336558342, -0.004569014068692923, -0.03534860908985138, -0.07654280960559845, 0.0261160209774971, -0.05828394368290901, 0.026425493881106377, -0.028454255312681198, 0.008811363019049168, -0.04652399942278862, 0.034110721200704575, 0.02644268609583378, 0.0045518213883042336, 0.09318553656339645, 0.014235724695026875, -0.05395133048295975, 0.021319201216101646, -0.028058819472789764, -0.04250085726380348, 0.0067826006561517715, 0.03617386892437935, -0.05628956854343414, -0.06110357865691185, -0.019015351310372353, -0.022763404995203018, 0.013092395849525928, 0.03820263221859932, 0.029038814827799797, -0.07963752746582031, 0.03775561600923538, -0.0183792132884264, 0.00961083360016346, 0.00397156085819006, 0.06041586399078369, 0.024981290102005005, 0.017725883051753044, 0.0021727532148361206, 0.021302007138729095, 0.034368615597486496, 0.040987882763147354, 0.03534860908985138, 0.01612694375216961, -0.018121320754289627, -0.006662250030785799, -0.00825259368866682, -0.006516110617667437, -0.013367482461035252, -0.017407815903425217, 0.007990402169525623, -0.022453932091593742, -0.008364347741007805, 0.01825886406004429, 0.006163656245917082, -0.04459839314222336, 0.023090070113539696, 0.00991170946508646, 0.07537368685007095, 0.006305497605353594, 0.05329800024628639, -0.026528650894761086, 0.001087451120838523, 0.027027245610952377, 0.10013147443532944, -0.018430793657898903, -0.005609184969216585, -0.02895285002887249, 0.015456420369446278, 0.020201662555336952, -0.028505833819508553, -0.045492421835660934, 0.0032215204555541277, 0.012937660329043865, 0.023691821843385696, -0.06970003247261047, -0.03488440066576004, 0.04961872100830078, -0.020442362874746323, -0.01815570704638958, 0.03534860908985138, 0.018190091475844383, -0.02680373750627041, -0.03950929269194603, -0.03858087584376335, 0.07406702637672424, -0.006933038588613272, -0.021559901535511017, 0.03868403285741806, 0.01685764268040657, 0.0034514754079282284, -0.06433584541082382, -0.01745939441025257, 0.007573474198579788, 0.014837476424872875, -0.007968910969793797, 0.0033332742750644684, 0.04494225233793259, 0.04889661818742752, 0.03950929269194603, 0.01791500672698021, -0.005437255837023258, 0.028505833819508553, -0.02147393673658371, -0.018946580588817596, -0.002838978311046958, -0.01959991082549095, 0.013015028089284897, 0.02706163004040718, -0.046111367642879486, 0.00925837829709053, 0.025462690740823746, -0.02943425066769123, 0.062238313257694244, -0.03313072398304939, -0.029382672160863876, 0.019531138241291046, -0.03166932985186577, 0.01506098359823227, -0.025720583274960518, 0.09407956898212433, 0.041125424206256866, 0.0009450724464841187, -0.04201945662498474, -0.0249297097325325, 0.027216367423534393, 0.008536276407539845, 0.02468900941312313, 0.06894354522228241, 0.06598636507987976, -0.010934687219560146, 0.008974695578217506, 0.005484536290168762, 0.009567851200699806, -0.025445498526096344, -0.010573635809123516, -0.018963772803544998, -0.010367320850491524, 0.009464693255722523, -0.037446144968271255, -0.07110985368490219, -0.017476586624979973, -0.01817289926111698, -0.01911850832402706, 0.04666154086589813, 0.049171704798936844, -0.059865690767765045, 0.019290437921881676, 0.011347316205501556, -0.0677056536078453, 0.009464693255722523, 0.007281194906681776, -0.0037287110462784767, -0.034729667007923126, -0.005591991823166609, 0.0016344004543498158, 0.001176639343611896, -0.06598636507987976, -0.08238839358091354, 0.060931652784347534, -0.0017171412473544478, -0.019548332318663597, 0.04920608922839165, -0.01863710768520832, -0.0046463822945952415, -0.01353081502020359, 0.016909221187233925, 0.07461719959974289, 0.06075972318649292, 0.03337142616510391, 0.02054551988840103, 0.05171625316143036, 0.02004692517220974, 0.07915613055229187, 0.009009081870317459, -0.04415137693285942, -0.0030710825230926275, -0.034334227442741394, -0.014270110055804253, 0.04428892210125923, -0.018533950671553612, 0.02716478891670704, -0.05443273484706879, -0.05604886636137962, 0.018241671845316887, 0.010530653409659863, -0.060450248420238495, -0.02455146610736847, 0.03369809314608574, 0.02680373750627041, -0.056427109986543655, -0.07688666880130768, -0.04226015880703926, 0.06182568147778511, -0.015722909942269325, -0.03527984023094177, 0.01353081502020359, -0.019427981227636337, -0.029606180265545845, 0.041469283401966095, -0.023313578218221664, 0.02953740954399109, -0.05893727391958237, -0.004994538612663746, -0.03923420608043671, -0.04934363439679146, 0.02645987831056118, -0.019737454131245613, 0.02668338641524315, 0.04494225233793259, -0.0032107748556882143, -0.019187280908226967, 0.021508323028683662, -0.0036277028266340494, -0.004861293360590935, 0.045011021196842194, 0.004616294521838427, -0.0038189736660569906, -0.0302595105022192, 0.03610509634017944, 0.05040959268808365, -0.060209549963474274, -0.012310119345784187, -0.021972531452775, -0.019513946026563644, -0.05395133048295975, -0.02941705845296383, -0.02051113359630108, 0.060209549963474274, -0.020390784367918968, -0.021319201216101646, -0.012138189747929573, -0.01781184785068035, -0.010298549197614193, -0.01014381367713213, 0.048587147146463394, 0.03295879811048508, -0.04012823849916458, -0.022282002493739128, -0.016316065564751625, 0.06901231408119202, -0.02752583846449852, -0.004012393765151501, -0.06148182600736618, 0.026545843109488487, 0.011510648764669895, -0.014046602882444859, -0.027938468381762505, -0.02099253609776497, 0.024723395705223083, -0.018551142886281013, -0.006451637018471956, -0.0014399057254195213, 0.005600588396191597, -0.024534273892641068, 0.03297599032521248, -0.035056330263614655, 0.025118833407759666, 0.006322690285742283, 0.03481563180685043, -0.012937660329043865, 0.003081828122958541, 0.020906571298837662, -0.011828717775642872, 0.022161653265357018, -0.0028260836843401194, -0.04879346117377281, -0.005600588396191597, 0.003853359492495656, 0.006670846603810787, 0.0002433870395179838, -0.026270756497979164, 0.015413437969982624, -0.03954367712140083, 0.10721495002508163, 0.011734156869351864, 0.05828394368290901, -0.017347639426589012, 0.04851837456226349, 0.02621917799115181, 0.051785025745630264, -0.08857784420251846, 0.020958149805665016, 0.03579562529921532, 0.040334552526474, -0.002877662191167474, -0.0841764584183693, -0.0024070064537227154, -0.04308541864156723, 0.0013012879062443972, -0.017278868705034256, -0.03741176053881645, 0.017124131321907043, -0.028523027896881104, 0.0035825714003294706, -0.005905762314796448, -0.015336070209741592, -0.0002055089280474931, -0.05639272555708885, 0.023313578218221664, 0.049068547785282135, -0.018465178087353706, 0.025101639330387115, 0.025067253038287163, 0.06220392510294914, -0.048965390771627426, -0.05302291363477707, 0.08005016297101974, 0.04463277757167816, -0.0034514754079282284, 0.05068467929959297, -0.009928901679813862, 0.0207518357783556, -0.0100836381316185, -0.024156030267477036, 0.03333704173564911, -0.06155059486627579, 0.028093205764889717, 0.07764315605163574, -0.09662412106990814, 0.05587693676352501, 0.05329800024628639, 0.03620825707912445, -0.03001881018280983, 0.03337142616510391, -0.016711503267288208, 0.04951556399464607, 0.011553631164133549, -0.000008033988706301898, -0.008428821340203285, -0.0023898135405033827, -0.00011188819189555943, -0.03259774670004845, -0.004440067335963249, -0.03761807456612587, -0.01742500811815262, 0.01922166720032692, -0.015310280956327915, 0.02193814516067505, 0.04927486181259155, -0.061413053423166275, 0.009138028137385845, -0.02525637485086918, 0.05745868384838104, 0.02623637206852436, 0.031634941697120667, 0.0509941540658474, 0.018344828858971596, 0.013548008166253567, 0.12413276731967926, 0.05804324522614479, 0.002639110665768385, 0.013986427336931229, -0.03108477033674717, -0.0020341353956609964, 0.002836829051375389, 0.005170765798538923, 0.0000016705995449228794, 0.0002006734284805134, 0.004848398733884096, -0.003636299166828394, 0.05233519896864891, -0.04528610780835152, -0.020579906180500984, -0.03178967908024788, 0.03840894624590874, 0.07172879576683044, -0.03356054797768593, 0.02847144939005375, -0.032563358545303345, 0.025204796344041824, 0.0002568190102465451, 0.004332611802965403, 0.03871842101216316, -0.08844029903411865, 0.024843746796250343, -0.003303186735138297, 0.019789032638072968, -0.06382005661725998, -0.05350431799888611, 0.03218511492013931, 0.009516272693872452, 0.01092609018087387, 0.001857908209785819, 0.049653105437755585, 0.01162240281701088, 0.027371102944016457, 0.02123323641717434, 0.04913732036948204, -0.05721798539161682, 0.03782438859343529, -0.08940310031175613, -0.06251339614391327, -0.08651468902826309, -0.01084872242063284, -0.03823701664805412, -0.03369809314608574, -0.03417949378490448, 0.01733044721186161, 0.023519892245531082, 0.016453608870506287, 0.016341855749487877, -0.013926251791417599, 0.012482048012316227, -0.030465826392173767, -0.005802604835480452, -0.03844333440065384, 0.009284168481826782, -0.03242581710219383, 0.05412326008081436, 0.02764618955552578, -0.011416087858378887, -0.03868403285741806, 0.005282519850879908, -0.05278221517801285, 0.02303849160671234, 0.03713667392730713, -0.013195553794503212, -0.04449523612856865, 0.0037888861261308193, 0.012172576040029526, -0.00424449797719717, 0.00908644963055849, 0.04920608922839165, -0.0677056536078453, 0.01121836993843317, -0.03290721774101257, 0.023640243336558342, -0.07516737282276154, 0.019256051629781723, 0.04996258020401001, -0.06743057072162628, 0.012172576040029526, -0.009885919280350208, -0.0711786225438118, -0.0724165141582489, -0.044426463544368744, -0.07571754604578018, 0.033165112137794495, 0.09689920395612717, 0.009756973013281822, 0.017829041928052902, -0.04174437001347542, 0.0037652458995580673, 0.008871538564562798, 0.021405166015028954, 0.04593943804502487, 0.009997673332691193, 0.008729697205126286, 0.012353101745247841, -0.02897004224359989, 0.0036255535669624805, -0.027508646249771118, 0.06976880133152008, -0.010066444985568523, 0.05732114240527153, 0.040300168097019196, -0.027714960277080536, 0.005742429755628109, 0.021216044202446938, -0.07454843074083328, -0.03902789205312729, 0.026855316013097763, 0.009155221283435822, 0.03658650070428848, 0.01162240281701088, -0.028763728216290474, -0.013255728408694267, -0.0006087362417019904, 0.048346444964408875, 0.05364185944199562, -0.0030732315499335527, 0.0009386250749230385, -0.031497400254011154, -0.016711503267288208, 0.005011731293052435, 0.003124810289591551, -0.04342927411198616, 0.02895285002887249, 0.0604846365749836, 0.031617749482393265, 0.011183983646333218, 0.01922166720032692, 0.04401383548974991, 0.03768684342503548, 0.028437063097953796, 0.02909039333462715, 0.001976109342649579, -0.02766338177025318, -0.01767430454492569, 0.04968749359250069, 0.04201945662498474, 0.014485021121799946, -0.014304496347904205, 0.021387971937656403, 0.06079410761594772, 0.026047248393297195, 0.005652167368680239, -0.0048355041071772575, 0.0021963934414088726, -0.017296060919761658, -0.01813851296901703, 0.01742500811815262, -0.01911850832402706, -0.013255728408694267, 0.035176679491996765, -0.016668520867824554, 0.025342339649796486, 0.011244159191846848, -0.013247132301330566, 0.04951556399464607, -0.014141163788735867, 0.0172186940908432 ]
718,106
pytorch_optimizer.optimizer.swats
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: float = 1.0 - beta2 ** 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_avg2'] = torch.zeros((1,), dtype=grad.dtype, device=grad.device) 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) 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'], ) if group['phase'] == 'sgd': if 'momentum_buffer' not in state: state['momentum_buffer'] = torch.zeros_like(grad) buf = state['momentum_buffer'] buf.mul_(beta1).add_(grad) update = buf.clone() update.mul_(1.0 - beta1) if group['nesterov']: update.add_(buf, alpha=beta1) p.add_(update, alpha=-group['lr']) continue 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'], ) step_size: float = self.apply_adam_debias( adam_debias=group['adam_debias'], step_size=group['lr'] * math.sqrt(bias_correction2), bias_correction1=bias_correction1, ) perturb = exp_avg.clone() perturb.div_(de_nom).mul_(-step_size) p.add_(perturb) perturb_view = perturb.view(-1) pg = perturb_view.dot(grad.view(-1)) if pg != 0: scaling = perturb_view.dot(perturb_view).div_(-pg) exp_avg2 = state['exp_avg2'] exp_avg2.mul_(beta2).add_(scaling, alpha=1.0 - beta2) corrected_exp_avg = exp_avg2 / bias_correction2 if ( group['step'] > 1 and corrected_exp_avg > 0.0 and corrected_exp_avg.allclose(scaling, rtol=group['eps']) ): group['phase'] = 'sgd' group['lr'] = corrected_exp_avg.item() return loss
(self)
[ 0.008429755456745625, -0.02998991124331951, -0.021766237914562225, 0.05385622754693031, -0.00530907791107893, -0.01393510214984417, -0.03905754163861275, -0.05891996994614601, -0.02645706757903099, 0.02516169287264347, -0.02365042082965374, 0.003280146513134241, 0.018449289724230766, 0.10009721666574478, -0.029283342882990837, 0.047889646142721176, 0.01618238352239132, 0.04902800917625427, 0.027556173503398895, -0.015603389590978622, -0.031147897243499756, -0.07497477531433105, -0.029970284551382065, 0.04361098259687424, -0.061706990003585815, -0.00647687865421176, 0.05063741281628609, -0.004857658874243498, -0.02180549129843712, 0.01028449833393097, -0.0031403047032654285, -0.09405212849378586, 0.017330557107925415, -0.002325788140296936, 0.030029164627194405, -0.05943026766180992, 0.0011168936034664512, 0.017389437183737755, -0.08612285554409027, -0.03782104700803757, -0.019067538902163506, -0.021314818412065506, 0.021138176321983337, 0.0070215254090726376, -0.007217794191092253, 0.010431699454784393, -0.03275730460882187, 0.034131187945604324, 0.0004342452739365399, -0.006310049910098314, 0.007183447014540434, -0.04843920096755028, 0.06559311598539352, -0.00029409691342152655, 0.01572115160524845, 0.07238402217626572, 0.0584096685051918, -0.04274739697575569, 0.03240402042865753, -0.06496505439281464, 0.05346368998289108, -0.06504356116056442, 0.027595428749918938, -0.004048048984259367, 0.0008047031005844474, 0.0013370829401537776, -0.07030357420444489, -0.02663370966911316, 0.012678980827331543, 0.0387435108423233, 0.008684905245900154, 0.000009085109923034906, -0.001169027527794242, -0.006005832925438881, -0.0567610077559948, -0.005017127376049757, -0.04070620238780975, -0.04113799333572388, 0.019518956542015076, -0.03336573764681816, 0.013375735841691494, 0.011020506732165813, -0.01796843111515045, 0.018576866015791893, 0.025357961654663086, -0.02944035641849041, -0.008316900581121445, -0.02123631164431572, 0.00002681449223018717, -0.034405965358018875, 0.04262963682413101, -0.009504328481853008, 0.0314619280397892, 0.029479611665010452, 0.05385622754693031, 0.04313993826508522, -0.04192306846380234, -0.03142267465591431, -0.027732815593481064, -0.025495348498225212, 0.0049557932652533054, 0.04808591678738594, 0.021923253312706947, 0.04635874927043915, 0.026535576209425926, -0.03505365177989006, -0.01280655525624752, -0.026378560811281204, 0.05797787755727768, -0.06414072215557098, -0.03136379271745682, -0.00134444294963032, -0.04506337270140648, -0.014474842697381973, -0.03599574416875839, -0.014101930893957615, -0.0033095867838710546, 0.023002732545137405, -0.03625089302659035, 0.0477718859910965, 0.05428801849484444, -0.00005021727702114731, -0.06033310666680336, 0.011707448400557041, 0.025024304166436195, 0.0023920289240777493, 0.055583395063877106, 0.014366894029080868, 0.03954821452498436, -0.07838986068964005, -0.017291303724050522, -0.005922418553382158, -0.014867380261421204, -0.001722260843962431, 0.02151108719408512, -0.015456187538802624, -0.004141276702284813, 0.02051011472940445, -0.010716290213167667, 0.004062769468873739, -0.008493542671203613, 0.00961227621883154, -0.0016486600507050753, -0.005284544080495834, 0.012364950031042099, 0.018174514174461365, 0.040863215923309326, 0.05028412863612175, 0.0032997734379023314, -0.0023724022321403027, 0.017291303724050522, 0.015318798832595348, 0.01674174889922142, 0.02005869708955288, 0.0154463741928339, 0.007782067637890577, -0.016673056408762932, 0.033954545855522156, -0.015485627576708794, -0.007404249627143145, -0.011589687317609787, -0.025357961654663086, -0.01776234805583954, 0.014700551517307758, 0.022551313042640686, 0.00002756200046860613, -0.007404249627143145, 0.051658011972904205, -0.03324797749519348, 0.024199973791837692, 0.00161921966355294, -0.02319900132715702, 0.03697708994150162, 0.01652585342526436, -0.04027440771460533, 0.14413999021053314, 0.009955747053027153, 0.02404295839369297, -0.031167523935437202, -0.00910197664052248, 0.008876267820596695, -0.0078115081414580345, -0.026594456285238266, -0.03611350432038307, -0.010068601928651333, 0.041766054928302765, 0.007791880983859301, 0.003157478291541338, 0.01061815582215786, 0.0031721985433250666, -0.007556358352303505, -0.025377588346600533, 0.04796815663576126, -0.024258853867650032, -0.015436560846865177, 0.033620886504650116, 0.012021479196846485, 0.002385895699262619, 0.09350257366895676, 0.015181411057710648, -0.02914595417678356, -0.014729992486536503, 0.024514004588127136, -0.0061039673164486885, -0.03173670545220375, -0.006481785327196121, -0.029401103034615517, 0.040980976074934006, -0.009617183357477188, 0.006059806793928146, -0.06877267360687256, 0.004830671939998865, 0.030853495001792908, 0.06971476227045059, 0.05566190183162689, -0.05405249446630478, 0.021197056397795677, 0.025240199640393257, 0.07030357420444489, 0.0009200111380778253, -0.03562283143401146, -0.08604434877634048, 0.010716290213167667, -0.002676619216799736, 0.06826237589120865, -0.012747674249112606, 0.032776929438114166, -0.02180549129843712, -0.012875249609351158, 0.0022497340105473995, 0.01533842645585537, -0.01652585342526436, 0.016722122207283974, -0.021079296246170998, 0.04078470915555954, 0.029577745124697685, -0.043846506625413895, -0.026103783398866653, 0.0034150814171880484, 0.002595658181235194, -0.028910430148243904, -0.03405268117785454, -0.02292422391474247, 0.04219784587621689, -0.0193815678358078, 0.026260798797011375, 0.07505328208208084, 0.00636402377858758, -0.032835811376571655, 0.024690646678209305, -0.02630005218088627, -0.02072601206600666, -0.018046939745545387, 0.04443531110882759, -0.05346368998289108, -0.022708328440785408, 0.0707746222615242, 0.05577966198325157, 0.04730084165930748, -0.05574040859937668, 0.04164829105138779, -0.05157950520515442, -0.0668884888291359, 0.04003888741135597, -0.03837059810757637, 0.02802721969783306, 0.05432727187871933, -0.045141879469156265, 0.04027440771460533, 0.03521066904067993, 0.056486230343580246, 0.09311003983020782, -0.06735953688621521, -0.026339305564761162, 0.010402259416878223, 0.04427829757332802, 0.009116697125136852, 0.012718234211206436, -0.004310559015721083, -0.022786837071180344, 0.07364014536142349, -0.04938129335641861, -0.06005832925438881, 0.014170625247061253, -0.051265474408864975, 0.03787992522120476, -0.021942880004644394, 0.003976901527494192, 0.0696362555027008, -0.0011346804676577449, 0.03984261676669121, 0.014955701306462288, 0.10229542851448059, 0.005863538011908531, 0.06955774873495102, 0.007679026573896408, -0.005412118975073099, 0.01607443578541279, -0.0454951636493206, 0.02168772928416729, 0.0718737244606018, 0.005078461486846209, 0.025259826332330704, 0.00966625101864338, -0.01977410726249218, -0.017742721363902092, 0.010657409206032753, 0.007350275758653879, 0.04054918512701988, -0.024455122649669647, -0.01511271670460701, -0.00592732522636652, -0.010412072762846947, 0.023905569687485695, -0.00530907791107893, -0.0982915386557579, -0.000934731331653893, -0.04274739697575569, 0.02847863920032978, 0.05307115241885185, -0.02673184499144554, 0.025750499218702316, 0.04105948656797409, 0.017045967280864716, -0.019685786217451096, -0.03627052158117294, 0.07791881263256073, 0.03279655799269676, -0.02084377221763134, -0.02186437137424946, -0.08580882847309113, -0.024239227175712585, 0.05652548745274544, 0.0376247763633728, -0.037997689098119736, -0.026653336361050606, 0.024455122649669647, -0.010627969168126583, 0.031717076897621155, -0.05534787103533745, 0.0449456125497818, 0.03523029386997223, -0.03568171337246895, 0.026653336361050606, 0.04105948656797409, -0.04208008572459221, 0.04467083513736725, 0.017988057807087898, 0.021923253312706947, 0.017997872084379196, -0.023846689611673355, -0.009352220222353935, -0.0009488381911069155, 0.06445475667715073, 0.03399379923939705, 0.03939119726419449, -0.013248160481452942, -0.021982133388519287, 0.028949685394763947, -0.0679483413696289, 0.006609360221773386, 0.031717076897621155, -0.06049012020230293, 0.08431718498468399, 0.08753599226474762, 0.001806901884265244, -0.03864537551999092, -0.029087072238326073, 0.04981308430433273, -0.031206779181957245, 0.021216684952378273, -0.05032338574528694, -0.010608342476189137, 0.022276537492871284, -0.03999963030219078, -0.023611165583133698, -0.04027440771460533, -0.010578901506960392, 0.06869416683912277, 0.04286516085267067, 0.0382135845720768, -0.03750701621174812, -0.04247262328863144, 0.03674156591296196, 0.05181502923369408, -0.01796843111515045, 0.029361849650740623, -0.039646346122026443, 0.03795843571424484, -0.0679875984787941, 0.06555385887622833, 0.02319900132715702, 0.008621118031442165, -0.0008911841432563961, -0.06005832925438881, 0.04741860181093216, 0.018890894949436188, 0.03589760884642601, -0.05495533347129822, -0.0190969780087471, -0.02887117676436901, 0.024572884663939476, 0.0069724577479064465, 0.007080405950546265, -0.0190969780087471, -0.08101986348628998, 0.004040689207613468, 0.03888089954853058, 0.01336592249572277, 0.06245281174778938, -0.013993983156979084, 0.00007662926509510726, -0.052443090826272964, 0.0015775124775245786, -0.0045387218706309795, -0.033797528594732285, -0.02639818750321865, -0.021726984530687332, -0.008547517471015453, 0.00021129589003976434, 0.03760514780879021, 0.020804518833756447, 0.024062585085630417, 0.034857381135225296, -0.026751471683382988, -0.046829793602228165, -0.07403268665075302, -0.009337499737739563, -0.054798319935798645, -0.0009353446657769382, -0.022727955132722855, -0.028694534674286842, -0.019185299053788185, -0.014867380261421204, -0.018066566437482834, -0.003908207640051842, -0.007831134833395481, 0.03532842919230461, 0.0460839718580246, 0.012885062955319881, -0.0015075915725901723, 0.002447229577228427, 0.007742813788354397, -0.01210980024188757, -0.002306161215528846, -0.0308927483856678, 0.06135370582342148, -0.032050736248493195, -0.08730047196149826, 0.01002444140613079, 0.02494579553604126, 0.006535759195685387, 0.0679483413696289, 0.006452344823628664, 0.028164608404040337, -0.004052955657243729, -0.029636627063155174, -0.027281397953629494, -0.015760404989123344, 0.024298107251524925, -0.003883673809468746, 0.01578003168106079, -0.03958746790885925, 0.03460223227739334, -0.01401360984891653, 0.015632830560207367, 0.087614506483078, 0.025142064318060875, -0.005696709267795086, 0.0177034679800272, -0.007777160964906216, -0.03956783935427666, 0.02624117210507393, -0.027202889323234558, -0.0331498421728611, -0.027222517877817154, -0.02280646376311779, -0.010941999033093452, 0.02790945954620838, -0.03055909089744091, 0.023022359237074852, -0.06586789339780807, 0.02796833962202072, 0.027340278029441833, -0.0034101747442036867, 0.03607425093650818, 0.011393418535590172, 0.0070215254090726376, 0.04017627239227295, 0.0454951636493206, -0.056093692779541016, -0.07564209401607513, 0.05468055605888367, 0.025181319564580917, -0.06892968714237213, -0.06300236284732819, 0.029754387214779854, 0.00812063179910183, 0.08973421156406403, -0.05797787755727768, 0.019342314451932907, 0.03303208202123642, -0.05734981596469879, -0.023218628019094467, 0.010941999033093452, -0.023100867867469788, -0.053502943366765976, 0.013483683578670025, -0.04368948936462402, 0.019420823082327843, -0.009641717188060284, -0.01656510680913925, 0.006378744263201952, 0.00296366261318326, -0.01646697334945202, -0.03236476704478264, 0.04196232184767723, 0.06414072215557098, 0.04576994106173515, -0.041766054928302765, 0.028635654598474503, 0.00980363879352808, -0.008032310754060745, -0.013689765706658363, 0.003054436994716525, 0.04005851224064827, -0.003442068351432681, 0.005677082110196352, 0.012708420865237713, -0.004016155377030373, -0.02353265881538391, 0.0017333009745925665, 0.05157950520515442, 0.06056862697005272, -0.014622043818235397, -0.0399014987051487, -0.004509281367063522, -0.07042133808135986, -0.14241282641887665, -0.03191334754228592, -0.005441559478640556, -0.01859649270772934, 0.014141185209155083, -0.02926371432840824, -0.035191040486097336, 0.040313661098480225, 0.01568189635872841, 0.009317873045802116, -0.020824145525693893, -0.02337564341723919, -0.024926168844103813, 0.02072601206600666, -0.003500949125736952, 0.030146926641464233, 0.02588788792490959, 0.01572115160524845, -0.042276352643966675, 0.04027440771460533, 0.009484701789915562, -0.01095181331038475, -0.05656474083662033, -0.06100042164325714, 0.009528862312436104, -0.041373513638973236, 0.0016560200601816177, 0.023905569687485695, 0.009739851579070091, -0.01819414086639881, -0.0460839718580246, 0.014406148344278336, -0.028890803456306458, 0.0009788918541744351, 0.0010144656989723444, -0.013375735841691494, -0.04005851224064827, 0.00010863798524951562, 0.014563163742423058, -0.02859640121459961, 0.01568189635872841, -0.014661298133432865, 0.058448921889066696, -0.04628024250268936, -0.01095181331038475, -0.018076378852128983, 0.004820858594030142, 0.05852742865681648, -0.10190288722515106, 0.049970097839832306, -0.0028581679798662663, 0.021825117990374565, -0.03462186083197594, 0.02482803538441658, -0.05640772357583046, -0.06496505439281464, 0.0032924131955951452, 0.023297136649489403, -0.033012453466653824, 0.017124474048614502, 0.008783039636909962, 0.013846781104803085, -0.03833134472370148, 0.009151044301688671, 0.055308617651462555, -0.02005869708955288, -0.007983243092894554, -0.009106883779168129, -0.018390409648418427, 0.03646678850054741, 0.030873121693730354, -0.027222517877817154, -0.04545591026544571, -0.025416841730475426, -0.012639726512134075, -0.019931122660636902, -0.06892968714237213, -0.023336390033364296, -0.015524881891906261, 0.014180438593029976, 0.0634734109044075, 0.007482757326215506, -0.04576994106173515, 0.009244272485375404, -0.04655501991510391, -0.006236448884010315, 0.02343452349305153, -0.03629014641046524, 0.053228165954351425, -0.07615239173173904, -0.027497293427586555, -0.03680044785141945, -0.03627052158117294, 0.04015664756298065, 0.0314423032104969, -0.055190857499837875, 0.06202102079987526, 0.016417905688285828, 0.05028412863612175, 0.026260798797011375, -0.028007593005895615, -0.04321844503283501, -0.0219036266207695, 0.03183484077453613, -0.018380597233772278, -0.018468918278813362, -0.01595667377114296, 0.006599546875804663, -0.027497293427586555, 0.037055596709251404, 0.04576994106173515, 0.014111744239926338, -0.010971440002322197, 0.04639800265431404, -0.036820072680711746, 0.006388557609170675, 0.00495824683457613, 0.008473915979266167, 0.0258486345410347, 0.02932259626686573, 0.01159950066357851, -0.03248252719640732, -0.0035132160410284996, -0.018959589302539825, -0.015093090012669563, -0.0002027091250056401, -0.025200946256518364, 0.003949914593249559, -0.008630931377410889, -0.012659353204071522, -0.004276211839169264, 0.005696709267795086, -0.09797751158475876, -0.04847845435142517, -0.05287488177418709, 0.007713373750448227, 0.013002824038267136, -0.009921400807797909, 0.04105948656797409, -0.037546269595623016, -0.03523029386997223, 0.02156996913254261, 0.037448134273290634, 0.042551130056381226, -0.008115725591778755, 0.020411981269717216, 0.03438633680343628, -0.00980363879352808, 0.003839513286948204, 0.028635654598474503, 0.006045086774975061, -0.008748692460358143, -0.04875323176383972, -0.020765265449881554, 0.00915595144033432, 0.018468918278813362, 0.03185446560382843, -0.07371865212917328, -0.03364051505923271, -0.017674027010798454, -0.011609314009547234, -0.06225654110312462, -0.00012282149691600353, -0.02826274372637272, -0.018400223925709724, -0.01339536253362894, 0.03273767605423927, 0.04702606424689293, 0.00816969946026802, 0.0002879634848795831, 0.007924363017082214, 0.0066633340902626514, -0.0051569691859185696, 0.019872240722179413, -0.019312873482704163, 0.023002732545137405, 0.019175486639142036, -0.007786974310874939, -0.0003186305402778089, -0.021157803013920784, -0.06622117757797241, 0.0584096685051918, -0.018527798354625702, -0.009352220222353935, 0.027948712930083275, -0.005387585144490004, -0.058448921889066696, -0.033562008291482925, 0.011363977566361427, -0.02482803538441658, 0.03994075208902359, -0.008135352283716202, 0.02253168635070324, 0.018439477309584618, -0.007625052705407143, -0.0004035782185383141, -0.03577984869480133, -0.012335509993135929, 0.04078470915555954, 0.013454243540763855, -0.019931122660636902, 0.006442531477659941, 0.01607443578541279, 0.021138176321983337, -0.0034764155279845, -0.03332648426294327, 0.002192080020904541, 0.04694755747914314, -0.02145220711827278, -0.03493589162826538, 0.018959589302539825, -0.05495533347129822, 0.07293357700109482, 0.034857381135225296, 0.04506337270140648, 0.05130472779273987, 0.08251150697469711, -0.04726158827543259, 0.012816368602216244, -0.06614267081022263, -0.07152044028043747, -0.06429774314165115, -0.00015049849753268063, -0.03073573298752308, 0.0730120837688446, 0.02388594299554825, 0.015652457252144814, 0.018360968679189682, 0.03780141845345497, 0.024455122649669647 ]
718,121
pytorch_optimizer.optimizer.fp16
SafeFP16Optimizer
Safe FP16 Optimizer. :param optimizer: OPTIMIZER. :param aggregate_g_norms: bool. aggregate_g_norms. :param min_loss_scale: float. min_loss_scale.
class SafeFP16Optimizer(Optimizer): # pragma: no cover r"""Safe FP16 Optimizer. :param optimizer: OPTIMIZER. :param aggregate_g_norms: bool. aggregate_g_norms. :param min_loss_scale: float. min_loss_scale. """ def __init__( self, optimizer: OPTIMIZER, aggregate_g_norms: bool = False, min_loss_scale: float = 2 ** -5, ): # fmt: skip self.optimizer = optimizer self.aggregate_g_norms = aggregate_g_norms self.min_loss_scale = min_loss_scale self.fp16_params = self.get_parameters(optimizer) self.fp32_params = self.build_fp32_params(self.fp16_params, flatten=False) # we want the optimizer to be tracking the fp32 parameters if len(optimizer.param_groups) != 1: # future implementers: this should hopefully be a matter of just # iterating through the param groups and keeping track of the pointer # through the fp32_params raise NotImplementedError('[-] Need to implement the parameter group transfer.') optimizer.param_groups[0]['params'] = self.fp32_params self.scaler: DynamicLossScaler = DynamicLossScaler(2.0 ** 15) # fmt: skip self.needs_sync: bool = True @classmethod def get_parameters(cls, optimizer: OPTIMIZER): params: List = [] for pg in optimizer.param_groups: params += list(pg['params']) return params @classmethod def build_fp32_params( cls, parameters: PARAMETERS, flatten: bool = True ) -> Union[torch.Tensor, List[torch.Tensor]]: # create FP32 copy of parameters and grads if flatten: total_param_size: int = sum(p.numel() for p in parameters) fp32_params = torch.zeros(total_param_size, dtype=torch.float, device=parameters[0].device) offset: int = 0 for p in parameters: p_num_el = p.numel() fp32_params[offset : offset + p_num_el].copy_(p.view(-1)) offset += p_num_el fp32_params = nn.Parameter(fp32_params) fp32_params.grad = fp32_params.new(total_param_size) return fp32_params fp32_params: List = [] for p in parameters: p32 = nn.Parameter(p.float()) p32.grad = torch.zeros_like(p32) fp32_params.append(p32) return fp32_params def state_dict(self) -> Dict: r"""Return the optimizer state dict.""" state_dict = self.optimizer.state_dict() if self.scaler is not None: state_dict['loss_scaler'] = self.scaler.loss_scale return state_dict def load_state_dict(self, state_dict: Dict): r"""Load an optimizer state dict. In general, we should prefer the configuration of the existing optimizer instance (e.g., learning rate) over that found in the state_dict. This allows us to resume training from a checkpoint using a new set of optimizer args. :param state_dict: Dict. state_dict. """ if 'loss_scaler' in state_dict and self.scaler is not None and isinstance(state_dict['loss_scaler'], float): self.scaler.loss_scale = state_dict['loss_scaler'] self.optimizer.load_state_dict(state_dict) def backward(self, loss, update_main_grads: bool = False): r"""Compute the sum of gradients of the given tensor w.r.t. graph leaves. Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this function additionally dynamically scales the loss to avoid gradient underflow. :param loss: float. loss. :param update_main_grads: bool. update main gradient. """ if self.scaler is not None: loss = loss * self.scaler.loss_scale loss.backward() self.needs_sync = True if update_main_grads: self.update_main_grads() def sync_fp16_grads_to_fp32(self, multiply_grads: float = 1.0): r"""Sync fp16 to fp32 gradients.""" if self.needs_sync: if self.scaler is not None: # correct for dynamic loss scaler multiply_grads /= self.scaler.loss_scale # copy FP16 grads to FP32 for p, p32 in zip(self.fp16_params, self.fp32_params): if not p.requires_grad: continue if p.grad is not None: p32.grad.copy_(p.grad) p32.grad.mul_(multiply_grads) else: p32.grad = torch.zeros_like(p, dtype=torch.float) self.needs_sync = False def multiply_grads(self, c: float): r"""Multiply grads by a constant c.""" if self.needs_sync: self.sync_fp16_grads_to_fp32(c) else: for p32 in self.fp32_params: p32.grad.mul_(c) def update_main_grads(self): self.sync_fp16_grads_to_fp32() def clip_main_grads(self, max_norm: float): r"""Clip gradient norm and updates dynamic loss scaler.""" self.sync_fp16_grads_to_fp32() grad_norm = clip_grad_norm(self.fp32_params, max_norm, sync=self.aggregate_g_norms) # detect overflow and adjust loss scale if self.scaler is not None: overflow: bool = has_overflow(grad_norm) prev_scale: float = self.scaler.loss_scale self.scaler.update_scale(overflow) if overflow: self.zero_grad() if self.scaler.loss_scale <= self.min_loss_scale: # Use FloatingPointError as an uncommon error # that parent functions can safely catch to stop training. self.scaler.loss_scale = prev_scale raise FloatingPointError( f'Minimum loss scale reached ({self.min_loss_scale}). Your loss is probably exploding. ' 'Try lowering the learning rate, using gradient clipping or ' 'increasing the batch size.\n' f'Overflow: setting loss scale to {self.scaler.loss_scale}' ) return grad_norm def step(self, closure: CLOSURE = None): r"""Perform a single optimization step.""" self.sync_fp16_grads_to_fp32() self.optimizer.step(closure) # copy FP32 params back into FP16 model for p, p32 in zip(self.fp16_params, self.fp32_params): if not p.requires_grad: continue p.data.copy_(p32) def zero_grad(self): r"""Clear the gradients of all optimized parameters.""" for p in self.fp16_params: p.grad = None for p32 in self.fp32_params: p32.grad.zero_() self.needs_sync = False def get_lr(self) -> float: r"""Get learning rate.""" return self.optimizer.get_lr() def set_lr(self, lr: float): r"""Set learning rate.""" self.optimizer.set_lr(lr) @property def loss_scale(self) -> float: r"""Convenience function which TorchAgent calls to get current scale value.""" return self.scaler.loss_scale
(optimizer: Type[torch.optim.optimizer.Optimizer], aggregate_g_norms: bool = False, min_loss_scale: float = 0.03125)
[ -0.025607768446207047, -0.05189787596464157, -0.040860045701265335, 0.07838866859674454, -0.009808618575334549, 0.018473315984010696, -0.040699493139982224, -0.032912805676460266, -0.026290107518434525, -0.017219016328454018, -0.016175439581274986, -0.018081974238157272, 0.013034675270318985, 0.016034958884119987, -0.0020633218809962273, 0.08244256675243378, -0.020470159128308296, 0.011800444684922695, 0.0506536103785038, 0.004089014604687691, -0.021493667736649513, -0.04563641548156738, 0.018272627145051956, 0.0583600252866745, -0.025045841932296753, -0.003336435416713357, 0.011920858174562454, -0.013526360504329205, -0.029782075434923172, -0.0068735587410628796, -0.019296135753393173, 0.0073251063004136086, 0.02705272100865841, 0.06245405599474907, 0.017339428886771202, -0.04844604432582855, -0.0035095287021249533, 0.009853772819042206, -0.12402508407831192, 0.0006296581123024225, -0.013506291434168816, -0.05229924991726875, 0.02424309216439724, -0.01308484748005867, -0.016145337373018265, 0.026149624958634377, -0.03223046660423279, 0.043027471750974655, -0.009106210432946682, -0.012482783757150173, 0.02863815426826477, -0.08709852397441864, -0.028377261012792587, 0.025366943329572678, -0.02153380587697029, 0.045355454087257385, 0.044713251292705536, 0.00458069983869791, -0.00015325966523960233, -0.05916277691721916, 0.02089160494506359, -0.060366902500391006, -0.021895043551921844, -0.013215294107794762, 0.027915678918361664, -0.01890479400753975, -0.05382448062300682, -0.010797006078064442, 0.011991098523139954, 0.02996269427239895, -0.03536119684576988, -0.01778094284236431, 0.025005705654621124, 0.014108355157077312, -0.01404814887791872, -0.05189787596464157, -0.00560420798137784, -0.019787821918725967, -0.008559336885809898, -0.04019777476787567, 0.017640462145209312, -0.0007826825603842735, 0.0019780294969677925, -0.036665670573711395, -0.0110579002648592, -0.01683771051466465, 0.0234002023935318, -0.017730770632624626, 0.0018638883484527469, -0.05763754993677139, -0.016346024349331856, 0.005074893590062857, -0.005845033563673496, 0.040860045701265335, 0.05258021503686905, 0.006391907576471567, -0.04222472012042999, -0.05105498805642128, -0.03977632895112038, -0.01826259307563305, -0.024323366582393646, 0.03435776010155678, 0.010104632936418056, 0.04286692291498184, 0.07401367276906967, -0.05314214155077934, -0.036605462431907654, 0.001995589816942811, -0.0070190574042499065, -0.04716164246201515, -0.005067368037998676, -0.03546154126524925, -0.012502852827310562, -0.008132874965667725, -0.023821646347641945, -0.00014526350423693657, -0.061892129480838776, 0.000029691609597648494, 0.02137325517833233, 0.018513454124331474, 0.04531531408429146, 0.012553024105727673, -0.07979348301887512, -0.03712724894285202, 0.00670297397300601, -0.008559336885809898, 0.04696095362305641, 0.023119239136576653, 0.0013609144371002913, -0.021634148433804512, -0.03805041313171387, 0.06329694390296936, -0.014760591089725494, 0.05213870108127594, -0.0006014363607391715, -0.06915702670812607, -0.058239612728357315, 0.02512611821293831, -0.032952941954135895, -0.0015026502078399062, -0.0033088407944887877, 0.04868686944246292, 0.043870363384485245, 0.01907537877559662, 0.02932049334049225, 0.011178312823176384, 0.042184583842754364, 0.006125996354967356, -0.011609791778028011, -0.01266340259462595, 0.020911673083901405, 0.04555613920092583, -0.0006917458958923817, 0.014971313066780567, 0.01357653271406889, -0.0022539752535521984, -0.02400226518511772, -0.02488529309630394, -0.029541250318288803, 0.013275500386953354, -0.07682330906391144, -0.06289556622505188, -0.012954399921000004, -0.06301598250865936, 0.013215294107794762, -0.011077969335019588, 0.03887323662638664, -0.018684038892388344, 0.02123277448117733, 0.11094024032354355, 0.02932049334049225, -0.07513752579689026, 0.011118106544017792, 0.04403091222047806, -0.012011167593300343, 0.09713291376829147, 0.019837992265820503, -0.0599253885447979, 0.0117001011967659, 0.0018626340897753835, 0.03642484173178673, -0.02069091610610485, 0.003695164807140827, -0.08308476954698563, 0.013365809805691242, 0.06514327228069305, -0.02291855216026306, 0.0071495044976472855, 0.011077969335019588, 0.003943515941500664, 0.018924864009022713, -0.028156504034996033, 0.02137325517833233, -0.031066477298736572, -0.0004010621050838381, -0.027112927287817, 0.043268296867609024, -0.024423711001873016, 0.09448383748531342, -0.016105199232697487, 0.029119806364178658, -0.020279506221413612, 0.05538984388113022, -0.002618976403027773, -0.0717659741640091, 0.007997410371899605, -0.010445802472531796, 0.07866963744163513, -0.007716447580605745, 0.037307869642972946, -0.0399569496512413, -0.004911834839731455, 0.009086142294108868, 0.06197240576148033, 0.030484482645988464, -0.030143313109874725, -0.017188914120197296, 0.036505118012428284, -0.014881003648042679, 0.01747991144657135, 0.014208699576556683, -0.01693805307149887, -0.054225854575634, 0.002424560021609068, 0.05366392806172371, 0.008258304558694363, -0.022998826578259468, -0.015884442254900932, 0.035180579870939255, -0.022456970065832138, -0.004390046466141939, -0.025045841932296753, -0.04563641548156738, 0.04334857314825058, 0.09954117238521576, 0.0036901477724313736, 0.0010435767471790314, 0.024403641000390053, 0.027514303103089333, -0.024403641000390053, -0.010485939681529999, -0.04692081734538078, -0.01330560352653265, 0.003920938819646835, 0.0038682580925524235, 0.00539348553866148, 0.03403665870428085, 0.02350054681301117, 0.017499979585409164, 0.018854623660445213, -0.015613513998687267, -0.04427173733711243, -0.04848618432879448, 0.05249993875622749, -0.04916851967573166, -0.04114100709557533, 0.001110054668970406, 0.009131296537816525, 0.014329112134873867, -0.02592886984348297, -0.0077616022899746895, -0.005659397225826979, -0.04479352757334709, 0.04756302013993263, -0.0032511430326849222, -0.03245122358202934, 0.016205543652176857, -0.0266112070530653, -0.00005362128285923973, 0.02705272100865841, 0.1321328729391098, 0.03411693498492241, -0.08420861512422562, 0.04383022338151932, -0.014339146204292774, -0.004274650942534208, -0.012131580151617527, 0.020169127732515335, 0.027032652869820595, 0.010676593519747257, 0.058681126683950424, -0.0557912215590477, -0.04274651035666466, 0.012733643874526024, 0.015553307719528675, 0.05410544201731682, 0.0027193203568458557, -0.037950072437524796, 0.06333708018064499, 0.00283973291516304, 0.014439490623772144, 0.031869228929281235, 0.07923156023025513, -0.015774063766002655, 0.03417713940143585, 0.008925591595470905, 0.0251863244920969, -0.013064778409898281, 0.004959498066455126, -0.048165082931518555, 0.03548160940408707, -0.015081691555678844, 0.008032530546188354, 0.017018329352140427, 0.029159942641854286, -0.06682904809713364, 0.02261751890182495, 0.0034016589634120464, 0.03347473219037056, -0.00018720413208939135, -0.014730487950146198, -0.008644628338515759, -0.002947602653875947, 0.023921990767121315, 0.03202977776527405, -0.03682621940970421, 0.0001879880583146587, 0.009442362934350967, 0.04503435268998146, 0.04555613920092583, -0.03413700312376022, 0.07999417185783386, 0.0532224141061306, 0.04571669176220894, -0.032210398465394974, -0.04756302013993263, 0.015483067370951176, -0.021052153781056404, -0.033253975212574005, -0.021072223782539368, -0.03259170427918434, -0.014078252017498016, 0.017148775979876518, 0.029360631480813026, -0.03522071614861488, 0.017469877377152443, 0.03417713940143585, -0.00010418520832899958, 0.02113243006169796, -0.0006735585629940033, 0.067069873213768, 0.042144447565078735, -0.03128723427653313, 0.021012017503380775, -0.022135868668556213, -0.02843746729195118, 0.04122128337621689, -0.007029091473668814, 0.008248270489275455, -0.01626574993133545, -0.02982221357524395, -0.04092025011777878, -0.020329678431153297, 0.07112377136945724, 0.05121553689241409, -0.015101759694516659, -0.04483366385102272, -0.019968440756201744, 0.0490882471203804, -0.04122128337621689, 0.01690795086324215, -0.00982366967946291, -0.05530956760048866, 0.03417713940143585, 0.01469034980982542, 0.010626421310007572, 0.013446085155010223, -0.030384140089154243, 0.0018250050488859415, -0.009422293864190578, 0.01680760644376278, -0.05691507086157799, 0.06401941925287247, -0.024263160303235054, -0.030524620786309242, 0.019597167149186134, -0.03198964148759842, 0.03891337290406227, -0.002080881968140602, 0.010375561192631721, 0.05233938992023468, 0.01740967109799385, -0.016285818070173264, 0.04106073081493378, 0.05751713365316391, -0.008624560199677944, 0.021112360060214996, -0.01636609435081482, 0.037588831037282944, -0.016546713188290596, 0.01397790852934122, 0.05595177039504051, 0.024082541465759277, -0.012783815152943134, -0.019617237150669098, 0.034739065915346146, 0.03664559870958328, 0.09857786446809769, -0.011549585498869419, -0.04459283873438835, -0.029561318457126617, -0.06028662621974945, -0.02079126052558422, 0.03259170427918434, 0.0011501922272145748, -0.029641594737768173, 0.0629357099533081, 0.07770632952451706, -0.00104608538094908, 0.08220174163579941, -0.007049160543829203, 0.017299292609095573, -0.033354319632053375, 0.06032676622271538, -0.048807282000780106, 0.02478494867682457, -0.020540401339530945, -0.012231923639774323, 0.014088286086916924, 0.03550167754292488, 0.04607792943716049, 0.03674594312906265, 0.006401942111551762, 0.028216710314154625, -0.037608902901411057, -0.045154765248298645, -0.044111188501119614, 0.05189787596464157, -0.04202403500676155, 0.01585434004664421, -0.012031235732138157, -0.0201891977339983, 0.0017497470835223794, -0.03343459591269493, -0.026530932635068893, -0.015292413532733917, 0.012844021432101727, 0.03821096569299698, -0.0036776047199964523, -0.025366943329572678, 0.02512611821293831, -0.03556188568472862, 0.0027343719266355038, -0.02893918752670288, -0.015041553415358067, -0.045395590364933014, -0.02197531796991825, 0.019426582381129265, -0.09681181609630585, -0.002925025299191475, -0.051576774567365646, -0.005110014230012894, 0.00936710461974144, 0.0020244386978447437, 0.014519765041768551, 0.01219178643077612, -0.006186202634125948, -0.03668573871254921, -0.012793850153684616, -0.011930892243981361, -0.0024233057629317045, 0.034979891031980515, -0.03435776010155678, 0.012111511081457138, 0.010696661658585072, 0.0376691073179245, 0.12819939851760864, -0.007786688394844532, -0.05486805737018585, 0.00528310751542449, -0.008659680373966694, -0.012583127245306969, 0.020951811224222183, -0.03297301381826401, -0.01088731549680233, 0.014228767715394497, -0.022978758439421654, 0.02996269427239895, 0.0007218490936793387, -0.02063070982694626, 0.026831964030861855, -0.05840016156435013, 0.00963803380727768, 0.04848618432879448, -0.007239813916385174, -0.03393631428480148, 0.02502577379345894, 0.028477605432271957, -0.02231648750603199, 0.0442316010594368, -0.018242524936795235, -0.0634976327419281, 0.050934575498104095, 0.003168359398841858, -0.029902487993240356, -0.018212420865893364, -0.01372704841196537, 0.008373700082302094, 0.05217883735895157, 0.006607647053897381, 0.01910548284649849, -0.00460829446092248, -0.11238519102334976, -0.006903661880642176, 0.07004005461931229, 0.021634148433804512, -0.07152514904737473, 0.05298158898949623, -0.05081416293978691, 0.020540401339530945, -0.013285535387694836, -0.00606077304109931, 0.0012981995241716504, 0.0028974306769669056, 0.01843317784368992, 0.015583410859107971, 0.011659963987767696, 0.01710863783955574, -0.0009827432222664356, -0.04756302013993263, -0.034678857773542404, 0.021553874015808105, 0.011639894917607307, -0.024624397978186607, 0.025688042864203453, 0.05643342062830925, -0.05563066899776459, -0.027775198221206665, 0.08814209699630737, -0.0029049564618617296, -0.005278090015053749, 0.010139753110706806, 0.03568229824304581, 0.03475913405418396, 0.017700668424367905, -0.04059914872050285, 0.01910548284649849, -0.04146210849285126, -0.06297584623098373, -0.06943799555301666, -0.0361037440598011, -0.0013558972859755158, -0.019356342032551765, -0.0018525996711105108, 0.03827117010951042, -0.029240218922495842, 0.0014763099607080221, 0.010199959389865398, -0.027273477986454964, -0.029139874503016472, -0.07104349881410599, 0.026771757751703262, 0.05643342062830925, 0.010626421310007572, 0.03235087916254997, 0.009693223051726818, 0.01782108098268509, 0.04013756662607193, -0.015001416206359863, -0.02428322844207287, -0.05145636200904846, -0.05258021503686905, 0.02374137192964554, -0.056714385747909546, -0.06867537647485733, -0.015844305977225304, -0.004811490885913372, 0.010425733402371407, -0.028417399153113365, 0.016647055745124817, -0.019627271220088005, 0.03520064800977707, 0.020179161801934242, -0.02073105424642563, -0.05575108155608177, -0.03672587499022484, 0.01930616982281208, -0.06341736018657684, 0.04439214989542961, -0.05081416293978691, 0.02671155147254467, -0.01622561179101467, 0.0014110864140093327, 0.010656524449586868, -0.002992757363244891, 0.04330843687057495, -0.0375286266207695, 0.05237952619791031, -0.00003562993151717819, 0.015964718535542488, -0.020570503547787666, -0.005819947458803654, 0.00965308491140604, -0.06582561135292053, -0.00032110055326484144, 0.025467287749052048, -0.08501137048006058, 0.018112078309059143, 0.11535537242889404, 0.04547586664557457, -0.07746550440788269, -0.019958406686782837, 0.030484482645988464, -0.06875565648078918, 0.017760874703526497, -0.02809629775583744, 0.00694881659001112, 0.009698240086436272, 0.009306898340582848, -0.039575643837451935, -0.007651223801076412, 0.031146753579378128, 0.026831964030861855, -0.056955210864543915, -0.02424309216439724, -0.00946744903922081, -0.056353144347667694, 0.015914546325802803, 0.07754578441381454, -0.004793930798768997, -0.011258588172495365, 0.029039530083537102, -0.014419421553611755, 0.00539348553866148, -0.03574250638484955, 0.007831842638552189, 0.03590305522084236, -0.07915128767490387, -0.05189787596464157, -0.01545296423137188, -0.029701801016926765, -0.06173158064484596, 0.024363504722714424, 0.038592271506786346, 0.0008591948426328599, -0.028216710314154625, 0.031186889857053757, 0.022978758439421654, -0.0057246205396950245, -0.037006836384534836, 0.02843746729195118, 0.022196074947714806, -0.021654218435287476, -0.038632407784461975, -0.014419421553611755, -0.007425450254231691, -0.0004788286460097879, -0.033394455909729004, 0.04748274385929108, 0.03391624614596367, -0.030344001948833466, 0.07923156023025513, -0.047723568975925446, -0.014971313066780567, 0.07557903975248337, 0.0011997369583696127, 0.015001416206359863, 0.004086506087332964, 0.019908234477043152, -0.0012267044512555003, -0.018312765285372734, 0.013054744340479374, 0.05563066899776459, 0.02428322844207287, -0.05844029784202576, 0.016175439581274986, -0.01152951642870903, 0.009171434678137302, 0.007074246648699045, -0.006406959146261215, -0.02586866356432438, -0.004161763936281204, -0.06715015321969986, 0.0221158005297184, 0.03833137825131416, 0.009236657992005348, 0.027975885197520256, -0.010596318170428276, -0.04615820199251175, -0.006953833624720573, 0.05884167551994324, 0.037889864295721054, 0.0040137567557394505, 0.04985085874795914, 0.04370981082320213, -0.001572890905663371, -0.023319927975535393, 0.025989076122641563, -0.010099615901708603, 0.013325672596693039, -0.019868096336722374, -0.025266598910093307, 0.02681189589202404, -0.05446667969226837, 0.021634148433804512, -0.07646206766366959, -0.02424309216439724, -0.008915557526051998, 0.031327370554208755, -0.03455844521522522, -0.04956989735364914, -0.029019461944699287, -0.06522355228662491, -0.049208659678697586, 0.024062471464276314, 0.04186348244547844, -0.019025206565856934, -0.017439773306250572, -0.005082419607788324, -0.013415982015430927, 0.03333425149321556, 0.034578513354063034, 0.01886465772986412, 0.00843892339617014, -0.03128723427653313, 0.03686635568737984, -0.031066477298736572, 0.004196884576231241, 0.010220028460025787, 0.0037202509120106697, 0.010184908285737038, 0.050292372703552246, 0.02867829240858555, 0.02255731262266636, -0.028477605432271957, -0.026671413332223892, 0.0055791218765079975, -0.00563932815566659, -0.005242969840764999, -0.013807323761284351, 0.07160542160272598, 0.02695237658917904, -0.02907966822385788, -0.023079100996255875, -0.004726198501884937, -0.014499696902930737, 0.096169613301754, 0.02093174122273922, -0.03489961475133896, 0.011178312823176384, -0.0027168116066604853, 0.034939754754304886, -0.027915678918361664, 0.000702407443895936, -0.005024721845984459, 0.08316504210233688, -0.0010786971542984247, -0.0657854750752449, -0.01998850889503956, -0.01950685866177082, 0.04828549548983574, 0.003130730241537094, -0.03435776010155678, -0.0018463281448930502, 0.04435201361775398, -0.06161116808652878, 0.00884029921144247, -0.006878575775772333, -0.07272927463054657, -0.09833703935146332, -0.016847744584083557, -0.025306737050414085, 0.031227027997374535, 0.048165082931518555, -0.013847460970282555, 0.016285818070173264, 0.011318794451653957, 0.020650779828429222 ]
718,123
pytorch_optimizer.optimizer.fp16
__init__
null
def __init__( self, optimizer: OPTIMIZER, aggregate_g_norms: bool = False, min_loss_scale: float = 2 ** -5, ): # fmt: skip self.optimizer = optimizer self.aggregate_g_norms = aggregate_g_norms self.min_loss_scale = min_loss_scale self.fp16_params = self.get_parameters(optimizer) self.fp32_params = self.build_fp32_params(self.fp16_params, flatten=False) # we want the optimizer to be tracking the fp32 parameters if len(optimizer.param_groups) != 1: # future implementers: this should hopefully be a matter of just # iterating through the param groups and keeping track of the pointer # through the fp32_params raise NotImplementedError('[-] Need to implement the parameter group transfer.') optimizer.param_groups[0]['params'] = self.fp32_params self.scaler: DynamicLossScaler = DynamicLossScaler(2.0 ** 15) # fmt: skip self.needs_sync: bool = True
(self, optimizer: Type[torch.optim.optimizer.Optimizer], aggregate_g_norms: bool = False, min_loss_scale: float = 0.03125)
[ -0.019381752237677574, -0.05543361231684685, -0.0013208008604124188, 0.06043664366006851, -0.040124326944351196, -0.0022213468328118324, -0.027776841074228287, -0.038483332842588425, -0.054112810641527176, 0.01698029600083828, -0.008280020207166672, 0.03169922158122063, -0.016379931941628456, 0.006083688698709011, -0.0543929785490036, 0.08116921782493591, -0.04056459665298462, 0.0012276193592697382, 0.0106864795088768, 0.014178596436977386, -0.01761067844927311, -0.017510617151856422, -0.006869164761155844, 0.08212979882955551, -0.0007029261905699968, 0.05079079419374466, -0.029037605971097946, -0.017200428992509842, -0.022253492847085, -0.03456095606088638, -0.0010575162013992667, -0.0054833246394991875, 0.050590675324201584, 0.05559370666742325, 0.01559945847839117, -0.03137902542948723, 0.0008986698812805116, 0.020242273807525635, -0.11983265727758408, 0.0013895925367251039, -0.0031018806621432304, -0.06960219889879227, 0.023914499208331108, -0.00679912231862545, 0.030138272792100906, 0.05863555148243904, 0.03354033827781677, -0.0006622765795327723, 0.007494544144719839, -0.022373566403985023, -0.030938759446144104, -0.02555549517273903, -0.00931564811617136, 0.0034696038346737623, -0.060716815292835236, 0.03626198694109917, 0.06940208375453949, 0.07056278735399246, -0.0317392461001873, -0.032359618693590164, -0.061597347259521484, -0.025275325402617455, -0.029617957770824432, -0.02131292223930359, 0.010746516287326813, -0.045787762850522995, -0.10758522897958755, -0.018060950562357903, 0.008870378136634827, 0.05587387830018997, 0.019471805542707443, 0.002579063642770052, 0.013978475704789162, 0.021813226863741875, -0.023694366216659546, -0.01194724440574646, -0.042105529457330704, -0.03680231422185898, -0.021993335336446762, -0.04238570109009743, 0.016710132360458374, 0.04110492393374443, -0.0018723852699622512, -0.009090512059628963, 0.03129897639155388, -0.07684659212827682, -0.013037905097007751, -0.01839115098118782, 0.026516078040003777, -0.030798673629760742, -0.047188613563776016, 0.000872403965331614, 0.005803518928587437, 0.045787762850522995, 0.03119891695678234, 0.04934992268681526, -0.05291208252310753, -0.012337480671703815, -0.009300638921558857, 0.0017022821120917797, -0.03049849160015583, 0.011727110482752323, -0.016810191795229912, 0.054673150181770325, 0.04574773833155632, -0.008500154130160809, 0.02585567720234394, -0.056314144283533096, -0.032419655472040176, -0.018891453742980957, 0.02891753427684307, 0.026115834712982178, -0.02561553195118904, 0.03586174547672272, -0.034160710871219635, -0.011847183108329773, -0.013738329522311687, -0.02145300805568695, 0.01198726799339056, 0.02829715795814991, 0.015749549493193626, 0.00927562452852726, -0.02357429452240467, 0.0184611938893795, 0.017590666189789772, -0.03484112396836281, 0.06259795278310776, -0.007079292554408312, -0.002899257931858301, -0.04590783640742302, 0.04967011511325836, -0.00440016807988286, -0.02609582245349884, 0.019601885229349136, 0.010446334257721901, -0.06511948257684708, -0.026936331763863564, 0.07040268927812576, -0.05651426687836647, -0.00829002633690834, 0.026696186512708664, 0.02207338437438011, 0.011486965231597424, -0.0031669202726334333, 0.003954898100346327, 0.01465888787060976, 0.032259561121463776, -0.01230746228247881, -0.013358099386096, -0.029998188838362694, -0.012327474541962147, -0.006083688698709011, 0.019621897488832474, 0.010756522417068481, -0.0031369018834084272, -0.02483505755662918, -0.004825425799936056, -0.04914980009198189, -0.013838390819728374, 0.0317392461001873, -0.049550045281648636, -0.014518802985548973, -0.0082550048828125, -0.08605217933654785, -0.0437064990401268, -0.03562159836292267, 0.011657067574560642, -0.05015040934085846, -0.02435476705431938, 0.0555136613547802, 0.03263979032635689, -0.10430324077606201, 0.0022213468328118324, 0.04250577092170715, -0.017890848219394684, 0.1275973618030548, 0.041625238955020905, -0.018371138721704483, -0.018281083554029465, 0.029698006808757782, 0.04550759121775627, 0.01367829367518425, 0.013508190400898457, -0.07292421907186508, -0.025995761156082153, 0.02901759371161461, -0.006563980132341385, -0.004935492295771837, -0.008750305511057377, 0.0006660288199782372, 0.032419655472040176, 0.01069648563861847, -0.020612498745322227, -0.03143906220793724, 0.006438903976231813, -0.0446670837700367, 0.030358407646417618, -0.01441874261945486, 0.02475501038134098, 0.04906975105404854, -0.008234993554651737, 0.018281083554029465, 0.046107955276966095, 0.016229839995503426, -0.0004036822647321969, 0.022933905944228172, -0.008875381201505661, 0.07268407195806503, 0.011857189238071442, -0.006393876858055592, 0.0014383720699697733, -0.038163140416145325, -0.01950182393193245, 0.05559370666742325, 0.002656610682606697, -0.002185074845328927, 0.012447547167539597, 0.03640207275748253, 0.011346880346536636, 0.0038223175797611475, 0.06752093881368637, -0.030678601935505867, -0.04598788544535637, -0.020892668515443802, 0.0326998271048069, 0.03396059200167656, 0.006664040498435497, -0.07048273831605911, 0.010766527615487576, 0.004570270888507366, -0.016620077192783356, -0.06435902416706085, -0.055073391646146774, 0.038203164935112, 0.07588601112365723, -0.0035346432123333216, 0.02475501038134098, 0.025415409356355667, -0.0028542305808514357, -0.04622802883386612, 0.0027541699819266796, -0.03364039584994316, -0.04318618401885033, -0.0014884024858474731, -0.04810917004942894, -0.016880234703421593, -0.018981508910655975, 0.03153912350535393, 0.019041545689105988, 0.02679624781012535, -0.04330625757575035, -0.016510009765625, -0.04967011511325836, 0.027556708082556725, -0.04230565205216408, -0.023634329438209534, -0.026295943185687065, -0.0198220182210207, 0.0015684509417042136, -0.018991515040397644, -0.028877509757876396, 0.007119316607713699, -0.03378048166632652, 0.07224380224943161, 0.00004565267954603769, -0.02145300805568695, 0.008400092832744122, -0.06319832056760788, 0.03312008082866669, 0.012007280252873898, 0.12071318924427032, 0.05739479884505272, -0.024775022640824318, 0.040684666484594345, 0.004152517765760422, -0.027956951409578323, -0.054833248257637024, -0.02217344380915165, 0.01887144148349762, 0.00916055403649807, 0.08196970075368881, -0.01895149052143097, -0.000699173950124532, 0.011036692187190056, -0.027336575090885162, 0.035341426730155945, 0.0002143487217836082, -0.03736265376210213, 0.0017498109955340624, -0.04270589351654053, -0.014578839763998985, 0.07032264024019241, 0.0781673938035965, 0.01410855446010828, 0.08373076468706131, -0.010116133838891983, 0.004460204392671585, 0.004597787745296955, 0.01752062328159809, -0.02665616199374199, 0.036422085016965866, -0.04298606514930725, 0.010086115449666977, 0.011967255733907223, 0.01799090765416622, -0.04002426937222481, 0.013408130034804344, -0.004305110312998295, 0.03790298104286194, 0.037222567945718765, 0.02995816431939602, 0.03530140593647957, -0.013458159752190113, 0.012137359008193016, 0.04462705925107002, -0.043826572597026825, 0.024554887786507607, -0.020932691171765327, 0.013147971592843533, 0.04778897762298584, -0.008435114286839962, 0.05963616073131561, 0.005983627866953611, -0.03239964321255684, -0.052631910890340805, -0.027496671304106712, 0.004860447254031897, -0.007124319672584534, -0.02563554421067238, -0.023073989897966385, -0.056794434785842896, 0.004993027541786432, 0.025335362181067467, 0.02413463406264782, -0.03386053070425987, 0.0034595977049320936, 0.03922378271818161, 0.0025215288624167442, -0.03686235100030899, -0.035321418195962906, 0.05339237302541733, 0.04142511636018753, -0.011767135001718998, 0.06031657010316849, -0.023954523727297783, -0.0550333671271801, -0.01917162351310253, -0.09557795524597168, 0.007809735368937254, -0.05307218059897423, -0.0396440364420414, -0.02123287320137024, -0.009475745260715485, 0.05975623056292534, 0.09173562377691269, 0.041545189917087555, -0.03790298104286194, -0.02829715795814991, 0.024034572765231133, -0.0375627763569355, 0.038963623344898224, 0.00852516945451498, -0.028977569192647934, -0.0012720212107524276, 0.03450091928243637, 0.01312796026468277, 0.011046698316931725, -0.07244392484426498, 0.017750762403011322, 0.01249757781624794, 0.018671320751309395, -0.08941421657800674, -0.005963616073131561, -0.013838390819728374, -0.011256825178861618, 0.01838114485144615, -0.045867811888456345, 0.0026140850968658924, -0.014208614826202393, 0.0027016380336135626, 0.05179140344262123, 0.06848151981830597, 0.03618193790316582, 0.021833237260580063, 0.018411163240671158, -0.030918747186660767, -0.0024639940820634365, 0.04016435146331787, 0.03992420807480812, -0.007969832047820091, -0.005523349158465862, 0.025275325402617455, 0.03326016664505005, -0.04930989816784859, 0.012707704678177834, 0.016760163009166718, 0.008199972100555897, 0.07336448132991791, -0.061677396297454834, -0.032419655472040176, -0.02193329855799675, -0.04802912101149559, 0.008330050855875015, 0.021973323076963425, -0.003927381243556738, -0.059396013617515564, 0.045787762850522995, 0.06383870542049408, 0.03183930367231369, 0.0768866166472435, 0.032499704509973526, 0.022113408893346786, -0.009100518189370632, 0.05139115825295448, -0.06551972776651382, -0.01528927031904459, 0.009320651181042194, -0.007864768616855145, 0.01823105476796627, 0.0047829002141952515, 0.0012732719769701362, 0.0645991712808609, 0.0187013391405344, -0.0006109954556450248, 0.019451793283224106, -0.028677387163043022, -0.03594179078936577, 0.0010262472787871957, -0.014098548330366611, -0.036422085016965866, -0.030838698148727417, 0.05367254465818405, -0.007919802330434322, -0.01902153342962265, 0.02091268077492714, 0.015209222212433815, -0.012667681090533733, 0.0535924956202507, 0.014939057640731335, -0.02893754653632641, 0.032359618693590164, -0.06836144626140594, 0.012827778235077858, -0.04550759121775627, -0.059716206043958664, -0.030398432165384293, -0.015069136396050453, 0.05335234850645065, -0.057034581899642944, 0.0023701870813965797, 0.006864162161946297, 0.004807915072888136, 0.02311401441693306, -0.019161617383360863, 0.005013039335608482, -0.0437064990401268, 0.024194668978452682, -0.019842030480504036, -0.028817472979426384, -0.035961803048849106, -0.020732570439577103, -0.005518346093595028, -0.02005215734243393, -0.021493032574653625, -0.012077323161065578, 0.08136933296918869, 0.0899745523929596, 0.011687085963785648, -0.01941177062690258, -0.011046698316931725, 0.0195818729698658, 0.0073494561947882175, 0.011276837438344955, -0.028477266430854797, -0.0009324403363279998, 0.010876595042645931, -0.0018523731268942356, 0.026436029002070427, -0.004652820993214846, -0.004305110312998295, 0.025455433875322342, 0.000020578883777488954, 0.05099091678857803, 0.03758278861641884, 0.005713464226573706, 0.023754402995109558, -0.012987874448299408, -0.01996210403740406, 0.01387841533869505, 0.04967011511325836, -0.019081570208072662, 0.02255367487668991, 0.04670831933617592, 0.02036234550178051, 0.03181929141283035, 0.010706491768360138, 0.01477896049618721, 0.04971013963222504, 0.05651426687836647, 0.011096728034317493, -0.0009361926349811256, -0.02341419644653797, -0.12239421159029007, -0.029177691787481308, 0.058755625039339066, -0.022593699395656586, -0.09773926436901093, 0.031038818880915642, -0.055073391646146774, 0.033920567482709885, -0.009570803493261337, -0.010131143033504486, -0.053192250430583954, 0.05063069984316826, -0.01714039221405983, 0.009540785104036331, -0.06291814893484116, 0.031879328191280365, -0.03616192564368248, -0.0011900966055691242, 0.03828321397304535, 0.043906621634960175, -0.005728473421186209, -0.03922378271818161, -0.010046090930700302, 0.012717710807919502, -0.006128715816885233, 0.0004587156290654093, 0.10638450086116791, -0.010836570523679256, -0.022053372114896774, -0.05143118277192116, -0.02689630724489689, 0.07508552819490433, 0.026235908269882202, 0.02475501038134098, 0.008710280992090702, -0.011186783201992512, -0.04786902293562889, -0.050350528210401535, -0.026516078040003777, 0.0391637459397316, 0.006714071147143841, -0.008034871891140938, 0.014668894000351429, 0.02931777574121952, -0.014198608696460724, 0.05799516290426254, -0.02349424548447132, -0.031098855659365654, -0.009740905836224556, 0.002368936315178871, -0.019932085648179054, 0.034300796687603, 0.03506125882267952, 0.02028229832649231, 0.014468773268163204, 0.04450698569417, -0.005398273002356291, 0.0000025845749860309297, -0.032179512083530426, -0.026195883750915527, -0.013418136164546013, 0.031078843399882317, -0.06692057847976685, -0.011136752553284168, -0.003512129420414567, 0.023794427514076233, -0.0227337833493948, 0.03838327154517174, -0.020492425188422203, -0.009420712478458881, -0.01989206112921238, 0.0023401689250022173, -0.0676410123705864, 0.004017435945570469, 0.002634097123518586, 0.029758043587207794, 0.0031944368965923786, -0.036602191627025604, 0.04134506732225418, -0.02703639306128025, -0.021653128787875175, -0.004630307666957378, -0.031098855659365654, -0.0006069305236451328, -0.025835664942860603, -0.016219833865761757, -0.01560946460813284, -0.02231352962553501, 0.0019461800111457705, 0.022193456068634987, -0.023013953119516373, -0.012407522648572922, -0.029457861557602882, -0.003639706876128912, -0.0540727861225605, -0.027016380801796913, 0.09325654059648514, 0.04074470326304436, -0.08797334134578705, 0.021493032574653625, -0.005768497474491596, -0.025255313143134117, 0.03143906220793724, -0.04770892858505249, -0.027416624128818512, 0.023294124752283096, -0.01402850542217493, -0.02773681841790676, -0.02145300805568695, 0.01572953723371029, 0.018301095813512802, -0.0396440364420414, -0.020812619477510452, -0.022533662617206573, -0.039043672382831573, 0.022453613579273224, 0.06616011261940002, 0.0036722265649586916, 0.011326868087053299, 0.006463919300585985, -0.01229745615273714, 0.018991515040397644, -0.06391875445842743, -0.001485900953412056, 0.046188004314899445, -0.08749304711818695, -0.015399336814880371, -0.028117047622799873, -0.012787753716111183, -0.043506380170583725, 0.025115227326750755, -0.0164299625903368, 0.022113408893346786, -0.030398432165384293, 0.00350962788797915, 0.05651426687836647, 0.028557315468788147, -0.024975143373012543, 0.03686235100030899, 0.03229958564043045, 0.01434869971126318, -0.031959377229213715, 0.02727653831243515, -0.0169102530926466, -0.0020599989220499992, 0.015659494325518608, 0.035421475768089294, 0.016089756041765213, -0.014388724230229855, 0.08072894811630249, -0.05951608717441559, 0.02325410023331642, 0.02467496134340763, 0.02247362583875656, -0.007929808460175991, -0.01001607347279787, 0.07796727120876312, -0.0015947169158607721, -0.030798673629760742, 0.00817995984107256, 0.10134144872426987, 0.0031018806621432304, -0.04174531251192093, 0.016249852254986763, -0.05495331808924675, -0.04410674422979355, 0.008960433304309845, 0.004114995244890451, -0.06239783391356468, -0.0074245017021894455, -0.0385233573615551, 0.014528809115290642, -0.01737053133547306, 0.041305042803287506, 0.0271964892745018, -0.06019650027155876, -0.02239357866346836, 0.007264404557645321, 0.00970588531345129, 0.03201941400766373, 0.011797153390944004, -0.036682240664958954, 0.01057641301304102, -0.01722044125199318, -0.08172955363988876, 0.011386903934180737, 0.023294124752283096, 0.010726504027843475, -0.007434507831931114, 0.01713038608431816, 0.04230565205216408, -0.036682240664958954, 0.03828321397304535, -0.02153305523097515, -0.05739479884505272, -0.060876909643411636, 0.039503950625658035, 0.010996667668223381, -0.00974590890109539, -0.04878958314657211, -0.09613829106092453, 0.0024602417834103107, -0.000868026283569634, 0.026355979964137077, -0.029377812519669533, -0.0005165631882846355, 0.0227337833493948, -0.025515470653772354, 0.03830322250723839, 0.037382666021585464, 0.029037605971097946, -0.01324803289026022, 0.016680113971233368, 0.07184355705976486, -0.026696186512708664, 0.031959377229213715, -0.004590283147990704, -0.02351425774395466, 0.013928445056080818, -0.010646454989910126, 0.015749549493193626, 0.01611977443099022, 0.025415409356355667, -0.04314615949988365, 0.0035721659660339355, -0.019241666421294212, 0.06179746985435486, -0.004960507620126009, 0.05975623056292534, 0.04963009059429169, -0.04422681778669357, -0.021633116528391838, -0.01652001589536667, -0.01823105476796627, 0.06383870542049408, 0.021192850545048714, 0.022373566403985023, 0.06187751889228821, 0.007624622900038958, 0.0036096887197345495, -0.004477715119719505, -0.003221953520551324, -0.007554580457508564, 0.034400857985019684, 0.02207338437438011, -0.04082475230097771, 0.012387511320412159, 0.026996368542313576, 0.004265086259692907, -0.005703458096832037, 0.04174531251192093, 0.030878722667694092, 0.02145300805568695, -0.08341057598590851, -0.0029142668936401606, 0.017550641670823097, -0.025895701721310616, -0.11567013710737228, -0.04118497297167778, -0.05635416880249977, 0.031038818880915642, 0.008735296316444874, 0.009390694089233875, 0.04010431468486786, 0.06531960517168045, 0.0011494469363242388 ]
718,132
pytorch_optimizer.optimizer.fp16
backward
Compute the sum of gradients of the given tensor w.r.t. graph leaves. Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this function additionally dynamically scales the loss to avoid gradient underflow. :param loss: float. loss. :param update_main_grads: bool. update main gradient.
def backward(self, loss, update_main_grads: bool = False): r"""Compute the sum of gradients of the given tensor w.r.t. graph leaves. Compared to :func:`fairseq.optim.FairseqOptimizer.backward`, this function additionally dynamically scales the loss to avoid gradient underflow. :param loss: float. loss. :param update_main_grads: bool. update main gradient. """ if self.scaler is not None: loss = loss * self.scaler.loss_scale loss.backward() self.needs_sync = True if update_main_grads: self.update_main_grads()
(self, loss, update_main_grads: bool = False)
[ -0.04150083661079407, 0.013818666338920593, -0.022274864837527275, 0.08178211003541946, -0.016464030370116234, -0.01762978360056877, -0.03974323719739914, -0.01580044813454151, 0.042146481573581696, -0.03448837623000145, -0.0328025184571743, -0.053409457206726074, 0.01956672966480255, -0.018167825415730476, 0.023835182189941406, 0.05957898497581482, -0.028085699304938316, 0.047813840210437775, 0.05717574059963226, 0.01886727660894394, -0.023548226803541183, -0.05459314584732056, 0.02136019617319107, 0.041285619139671326, -0.07116478681564331, -0.0465942807495594, 0.017827065661549568, -0.017961576581001282, -0.021342262625694275, -0.01465262845158577, 0.009379833936691284, -0.027314508333802223, -0.006931751500815153, 0.017513208091259003, -0.018687929958105087, 0.0017531143967062235, -0.0229205135256052, 0.026668859645724297, 0.009702658280730247, -0.009487442672252655, -0.009532279334962368, 0.018320269882678986, 0.05118555948138237, 0.020337920635938644, 0.05620726943016052, 0.02568245306611061, -0.022866709157824516, -0.02170095592737198, -0.001942549366503954, -0.007734328042715788, 0.005779448430985212, -0.04605624079704285, 0.02668679505586624, 0.028049830347299576, 0.05028882622718811, 0.043975818902254105, 0.05283555015921593, -0.036550864577293396, -0.017136581242084503, -0.04142909497022629, 0.05473662540316582, -0.0865168645977974, -0.0693354457616806, -0.008460682816803455, 0.035582393407821655, -0.009720592759549618, -0.011854819022119045, -0.007236640900373459, 0.029699819162487984, 0.015495558269321918, -0.04627145826816559, 0.03967149928212166, -0.007146967574954033, -0.0398867130279541, -0.016114303842186928, -0.0723126083612442, 0.07249195128679276, -0.04003019258379936, -0.03339436277747154, -0.016024630516767502, 0.01012412365525961, 0.0011612700764089823, 0.025252019986510277, 0.06266374886035919, 0.0034300063271075487, -0.0010626293951645494, -0.026112884283065796, -0.015818381682038307, -0.02270529791712761, -0.02173682488501072, 0.012222480028867722, -0.017423534765839577, -0.014159425161778927, -0.009595050476491451, 0.013953176327049732, -0.010061351582407951, -0.05197468400001526, -0.033645447343587875, -0.04914100468158722, -0.006877947598695755, 0.0409986637532711, 0.035474784672260284, -0.014267032966017723, -0.006169527769088745, 0.08041907846927643, -0.05122142657637596, -0.015979794785380363, -0.04379647225141525, 0.014553987421095371, -0.017289025709033012, 0.04067584127187729, -0.021127045154571533, 0.012652912177145481, -0.014536052942276001, -0.02595147304236889, 0.03436283394694328, -0.01114640012383461, -0.04264865443110466, -0.006622378248721361, 0.0473475381731987, 0.03624597564339638, -0.0162219125777483, -0.02408626675605774, -0.03475739806890488, -0.010680098086595535, -0.02315366454422474, 0.015495558269321918, 0.02550310641527176, 0.05993767827749252, 0.006698600482195616, -0.011227105744183064, 0.02975362353026867, -0.059220291674137115, 0.004174295347183943, 0.04042475298047066, -0.04146496579051018, -0.03048894554376602, 0.03613836690783501, -0.0275835283100605, -0.016876528039574623, 0.038451939821243286, 0.048746444284915924, 0.02557484433054924, 0.039384543895721436, 0.006877947598695755, 0.023207467049360275, -0.06481590867042542, 0.03325088694691658, -0.011227105744183064, 0.0031318424735218287, 0.0316905677318573, 0.0376628153026104, -0.0335557758808136, 0.017055874690413475, -0.008093021810054779, 0.02408626675605774, -0.0398867130279541, 0.03597695380449295, -0.012410794384777546, 0.019692271947860718, 0.00026775908190757036, -0.03258730098605156, 0.0060081155970692635, -0.051615990698337555, 0.01774635910987854, -0.040173668414354324, 0.06908436119556427, 0.03773455321788788, -0.04160844162106514, 0.061982233077287674, 0.03328675404191017, -0.07661692798137665, -0.007380118127912283, 0.02557484433054924, -0.0009651096188463271, -0.008366525173187256, -0.0060036322101950645, 0.008335139602422714, -0.03490087389945984, 0.011585799045860767, 0.055454012006521225, -0.01641022600233555, 0.061946362257003784, -0.07546910643577576, 0.0335557758808136, -0.0005730688571929932, -0.06284309923648834, -0.0020277390722185373, 0.048029057681560516, -0.013433070853352547, -0.019100427627563477, -0.04616384953260422, 0.017925705760717392, -0.020642809569835663, 0.03924106806516647, -0.005259342957288027, 0.02374550886452198, 0.048100795596838, 0.05211816355586052, -0.005586650688201189, -0.005725644528865814, -0.025861799716949463, 0.030542749911546707, -0.016580605879426003, -0.04924861341714859, -0.016786854714155197, -0.025252019986510277, 0.03567206487059593, -0.03574380651116371, -0.01273361872881651, -0.0037259284872561693, 0.039276935160160065, -0.0011478191008791327, 0.037555206567049026, 0.017271090298891068, -0.029699819162487984, -0.0018360621761530638, 0.026668859645724297, 0.05129316821694374, 0.019100427627563477, -0.057211607694625854, -0.03646119311451912, 0.009236357174813747, -0.019781945273280144, 0.006806208752095699, -0.02505473978817463, -0.00786435417830944, -0.004761655814945698, 0.04379647225141525, 0.023207467049360275, 0.007227673660963774, 0.024355286732316017, -0.005474559031426907, 0.019781945273280144, 0.09182552993297577, -0.01987161859869957, -0.07582779973745346, 0.029287321493029594, 0.0719539076089859, 0.029592212289571762, -0.03719651326537132, -0.057426825165748596, -0.0548083633184433, 0.03231828287243843, -0.004463491961359978, 0.07733431458473206, 0.04189539700746536, 0.009209454990923405, -0.017477339133620262, 0.039312805980443954, -0.026794401928782463, -0.05968659371137619, 0.0022810662630945444, 0.022167256101965904, -0.02557484433054924, 0.004400720354169607, 0.0350443534553051, 0.014849909581243992, -0.012141774408519268, 0.00545214070007205, 0.0514366440474987, 0.006407162174582481, -0.008958369493484497, 0.005887056700885296, -0.04293560981750488, -0.025485171005129814, 0.02616668865084648, -0.031331874430179596, -0.03262317180633545, 0.04085518792271614, 0.055382274091243744, 0.018472714349627495, -0.009025624953210354, 0.012348023243248463, -0.013702090829610825, 0.013576547615230083, 0.006949685979634523, 0.044191036373376846, 0.05710400268435478, -0.023763442412018776, 0.023888984695076942, -0.024696046486496925, -0.06366809457540512, 0.03999432176351547, -0.01722625456750393, -0.005178636871278286, 0.012912965379655361, -0.03805737942457199, -0.0023718606680631638, -0.01740560121834278, 0.0395280197262764, -0.003988223150372505, 0.07611475884914398, 0.03210306540131569, 0.0292693879455328, -0.013020573183894157, 0.07489519566297531, -0.01493061613291502, -0.00545214070007205, 0.019333578646183014, 0.03134980797767639, -0.021342262625694275, -0.029520472511649132, -0.01997922733426094, -0.003353784093633294, -0.0425051786005497, 0.048746444284915924, 0.005985697265714407, 0.02934112586081028, -0.016114303842186928, -0.03683781996369362, -0.0022541643120348454, -0.02288464456796646, 0.06456482410430908, -0.052692070603370667, -0.03339436277747154, -0.0025758675765246153, -0.08020386099815369, 0.05868225172162056, 0.02042759396135807, -0.03255143389105797, 0.02069661393761635, 0.0428638719022274, 0.055418141186237335, -0.09455160051584244, -0.00017500318062957376, 0.008232015185058117, 0.012509435415267944, 0.025700386613607407, -0.015827350318431854, 0.03307154029607773, -0.061264846473932266, 0.026041146367788315, -0.014114588499069214, -0.03090144321322441, 0.003972530364990234, 0.04727580025792122, 0.005223473533987999, 0.016356421634554863, 0.0020535201765596867, 0.044980160892009735, 0.06409852206707001, -0.016759952530264854, 0.028282981365919113, -0.014267032966017723, 0.010070319287478924, -0.012392859905958176, 0.0038178437389433384, 0.03863128647208214, 0.005160702392458916, -0.03520576283335686, 0.031744372099637985, -0.11011889576911926, 0.02397865802049637, 0.0003578527830541134, 0.016912396997213364, 0.011917591094970703, -0.011666505597531796, 0.04835188016295433, -0.07525388896465302, -0.0406399704515934, -0.0031834046822041273, -0.045016031712293625, 0.06295070797204971, -0.026417775079607964, -0.022167256101965904, -0.006721018813550472, -0.0018091602250933647, -0.0031363260932266712, -0.0346677228808403, 0.020122703164815903, -0.026077015325427055, 0.06399091333150864, 0.014993387274444103, -0.07389085739850998, 0.028641674667596817, -0.03538511320948601, 0.005591134540736675, 0.11262974888086319, 0.0266509260982275, -0.01859825663268566, -0.015271374955773354, -0.022615622729063034, 0.037339989095926285, 0.11076454818248749, 0.03646119311451912, 0.011514060199260712, -0.08249949663877487, 0.008101988583803177, -0.035851411521434784, 0.028426457196474075, 0.03902585059404373, -0.005357983987778425, 0.008066119626164436, -0.07209739089012146, 0.0038111181929707527, 0.05279967933893204, 0.038308463990688324, -0.025341693311929703, -0.0193873830139637, -0.012626009993255138, -0.005488010123372078, -0.018024347722530365, -0.0030914894305169582, -0.007460824213922024, -0.013513776473701, -0.012930899858474731, 0.016159141436219215, -0.00900320615619421, 0.047885578125715256, -0.008958369493484497, 0.0036295296158641577, -0.06578437983989716, 0.057355087250471115, 0.01465262845158577, -0.027762874960899353, 0.02318953350186348, -0.010303470306098461, 0.03190578520298004, 0.010841510258615017, 0.03217480331659317, 0.007913675159215927, 0.0409986637532711, -0.006281619425863028, -0.02091182954609394, -0.05566922575235367, -0.03664053976535797, -0.037411730736494064, -0.07302999496459961, 0.046845369040966034, -0.013155083172023296, -0.05997354909777641, 0.015863219276070595, -0.02591560408473015, -0.0037528304383158684, 0.04254104569554329, 0.042146481573581696, 0.03273078054189682, -0.003152018878608942, 0.00228779180906713, -0.013208887539803982, -0.056565962731838226, -0.01859825663268566, -0.009128749370574951, -0.02162921614944935, -0.04257691651582718, -0.02736831270158291, -0.05014534667134285, -0.09426464885473251, 0.014607791788876057, -0.08895598351955414, -0.003064587479457259, 0.00998961366713047, 0.04706058278679848, -0.08558426052331924, 0.0023965206928551197, -0.016490932554006577, -0.051687728613615036, 0.023871051147580147, 0.05201055482029915, -0.012527369894087315, -0.011756178922951221, -0.001948153949342668, 0.030184056609869003, -0.00718732038512826, -0.016266748309135437, 0.06384743750095367, -0.024104202166199684, -0.03090144321322441, 0.014132522977888584, -0.0016410226235166192, -0.03794977068901062, 0.013612417504191399, -0.03481120243668556, 0.013567580841481686, -0.0447290763258934, -0.03124220110476017, -0.0285161305218935, -0.030632423236966133, -0.042254090309143066, -0.041321489959955215, -0.028426457196474075, -0.04831600934267044, 0.027171030640602112, 0.01942325197160244, 0.007604301907122135, 0.005272794049233198, -0.00384922930970788, 0.030704161152243614, 0.058287691324949265, -0.011083628050982952, -0.0693354457616806, 0.02975362353026867, 0.0361563041806221, -0.019548794254660606, -0.0017082777339965105, -0.02971775457262993, -0.025843864306807518, 0.051508381962776184, -0.0006837594555690885, 0.04530298709869385, 0.024319417774677277, -0.04637906700372696, 0.008070603013038635, -0.004994806833565235, 0.03522370010614395, -0.05979420244693756, 0.039348673075437546, 0.019225969910621643, -0.013890405185520649, 0.003730412106961012, 0.015531427226960659, 0.014562955126166344, 0.0779082253575325, -0.009236357174813747, -0.03701716661453247, 0.03891824185848236, 0.028211241587996483, 0.104379802942276, -0.060260504484176636, -0.04239756986498833, 0.019817814230918884, -0.03863128647208214, -0.01572870835661888, 0.03594108670949936, 0.04458560049533844, -0.06585612148046494, 0.028229176998138428, 0.0292693879455328, -0.0007616631919518113, -0.0054207551293075085, 0.09670376032590866, 0.038272593170404434, -0.0020580037962645292, -0.01636539027094841, -0.06327352672815323, 0.020624874159693718, -0.06295070797204971, -0.10653196275234222, -0.03723238408565521, 0.005039643496274948, 0.005851187277585268, 0.050611648708581924, -0.010671131312847137, -0.01845477893948555, 0.005555265117436647, 0.017656685784459114, -0.01949498988687992, -0.01859825663268566, -0.0255389753729105, -0.07482346147298813, 0.04637906700372696, 0.00798092968761921, 0.040353015065193176, 0.02035585418343544, 0.04289973899722099, -0.06578437983989716, 0.06087028235197067, 0.0004152997862547636, -0.011379550211131573, -0.06764958798885345, -0.05609966069459915, 0.02128845825791359, 0.02207758277654648, 0.00023749431420583278, -0.004322256427258253, -0.00002735738416959066, -0.030542749911546707, 0.019208036363124847, 0.005528363399207592, -0.03522370010614395, -0.015621100552380085, 0.008267885074019432, -0.052692070603370667, -0.0009365262230858207, 0.003934419248253107, 0.02188030257821083, -0.05495183914899826, 0.021503673866391182, -0.009079428389668465, -0.006254717707633972, -0.023458553478121758, -0.014858877286314964, 0.04820840433239937, 0.021683020517230034, 0.04236169904470444, 0.0011702374322339892, 0.06348874419927597, 0.007326314225792885, -0.004418655298650265, -0.002943528350442648, -0.01834717206656933, 0.042971476912498474, -0.02740418165922165, -0.010599392466247082, -0.03151122108101845, -0.03472152724862099, 0.059148553758859634, 0.047849711030721664, 0.03145741671323776, -0.019208036363124847, 0.00998961366713047, 0.047921448945999146, -0.011128464713692665, -0.03583347797393799, 0.004189988132566214, -0.019064558669924736, 0.028623739257454872, -0.012365957722067833, -0.061264846473932266, -0.03531337156891823, 0.016024630516767502, 0.004241550341248512, -0.03000470995903015, -0.0006366809247992933, -0.04343777894973755, -0.03124220110476017, 0.015423819422721863, 0.016338488087058067, 0.027009619399905205, 0.0208759605884552, 0.04236169904470444, 0.006918300408869982, 0.006156076677143574, -0.03289218991994858, 0.054485540837049484, 0.029359061270952225, -0.02322540245950222, -0.006483384408056736, -0.00002811050035234075, -0.06639416515827179, -0.047849711030721664, 0.02326127141714096, 0.03583347797393799, 0.07876908779144287, -0.0130474753677845, 0.048029057681560516, 0.010671131312847137, 0.02568245306611061, -0.10158199071884155, 0.0014437412610277534, 0.030399272218346596, 0.004039785359054804, -0.02613081969320774, -0.025825930759310722, 0.01263497769832611, 0.004263968672603369, 0.014401542954146862, 0.021414000540971756, 0.018634125590324402, -0.025664517655968666, 0.039276935160160065, 0.0008087417227216065, 0.007568432483822107, 0.02080422081053257, 0.04903339967131615, 0.05861051380634308, 0.01425806526094675, 0.0064161294139921665, 0.002070333808660507, -0.004775106906890869, 0.007528079207986593, 0.01886727660894394, 0.030847638845443726, -0.06259201467037201, 0.005268310196697712, -0.011845852248370647, 0.03210306540131569, 0.03448837623000145, -0.11427973955869675, -0.0016780128935351968, 0.021952040493488312, -0.0604039803147316, -0.00024337912327609956, 0.032372087240219116, -0.03192371875047684, 0.00436260923743248, -0.04279213026165962, 0.06169527769088745, -0.020893894135951996, 0.013388234190642834, 0.0794147327542305, -0.0188314076513052, 0.025736257433891296, 0.005205539055168629, 0.011119497939944267, -0.00434467475861311, 0.07525388896465302, 0.015038223937153816, -0.025252019986510277, -0.014580889604985714, -0.04268452525138855, 0.03791389986872673, -0.03258730098605156, 0.025521039962768555, -0.0053310818038880825, -0.01161270122975111, 0.000046132743591442704, 0.01233905553817749, -0.03165470063686371, -0.04469320550560951, 0.012231447733938694, 0.003712477395310998, 0.01711864583194256, 0.03255143389105797, 0.03418348729610443, -0.007299412041902542, -0.02457050234079361, -0.06693220138549805, 0.009352932684123516, 0.009621952660381794, -0.03956389054656029, -0.02550310641527176, 0.009361899457871914, -0.014679530635476112, -0.019781945273280144, 0.004261726979166269, -0.02397865802049637, -0.043186694383621216, 0.025305824354290962, -0.04480081424117088, 0.012527369894087315, 0.06391917914152145, 0.009604018181562424, -0.009586082771420479, -0.0346677228808403, 0.0030914894305169582, 0.0005016103968955576, -0.05484423413872719, -0.007209738716483116, 0.02526995539665222, -0.023028120398521423, 0.0865168645977974, 0.003569000167772174, 0.0007409261888824403, 0.0342910960316658, 0.08902771770954132, 0.02855200134217739, -0.02166508510708809, 0.0031206333078444004, 0.02557484433054924, 0.0010654317447915673, -0.09239944070577621, 0.012437696568667889, -0.039205197244882584, 0.03884650394320488, -0.08264297991991043, -0.0037281704135239124, -0.03138567879796028, -0.03667640686035156, 0.07005283236503601, 0.0024054881650954485, -0.0026319134049117565, -0.001137730898335576, 0.05036056414246559, 0.03400414064526558, 0.03339436277747154, -0.05236924812197685, -0.05505944788455963, -0.05774965137243271, 0.060081157833337784, 0.004149635322391987, 0.00106991536449641, 0.016275716945528984, -0.03805737942457199, 0.017271090298891068, -0.0615159310400486, 0.005909475032240152 ]
718,133
pytorch_optimizer.optimizer.fp16
clip_main_grads
Clip gradient norm and updates dynamic loss scaler.
def clip_main_grads(self, max_norm: float): r"""Clip gradient norm and updates dynamic loss scaler.""" self.sync_fp16_grads_to_fp32() grad_norm = clip_grad_norm(self.fp32_params, max_norm, sync=self.aggregate_g_norms) # detect overflow and adjust loss scale if self.scaler is not None: overflow: bool = has_overflow(grad_norm) prev_scale: float = self.scaler.loss_scale self.scaler.update_scale(overflow) if overflow: self.zero_grad() if self.scaler.loss_scale <= self.min_loss_scale: # Use FloatingPointError as an uncommon error # that parent functions can safely catch to stop training. self.scaler.loss_scale = prev_scale raise FloatingPointError( f'Minimum loss scale reached ({self.min_loss_scale}). Your loss is probably exploding. ' 'Try lowering the learning rate, using gradient clipping or ' 'increasing the batch size.\n' f'Overflow: setting loss scale to {self.scaler.loss_scale}' ) return grad_norm
(self, max_norm: float)
[ -0.04632372036576271, -0.007420200854539871, -0.01866024173796177, 0.03694690391421318, -0.026449350640177727, 0.013495519757270813, 0.00885847769677639, -0.013205996714532375, 0.03238924592733383, -0.014718988910317421, -0.045016199350357056, -0.014438805170357227, -0.01235610619187355, -0.053234923630952835, 0.0009508737712167203, 0.04979800060391426, -0.023367328569293022, 0.006178053095936775, 0.055102813988924026, -0.008536266162991524, 0.02598237805068493, -0.03732048347592354, -0.006327484268695116, 0.00005227908695815131, -0.0338275246322155, 0.021798299625515938, -0.026972360908985138, 0.03393959626555443, -0.05521488934755325, -0.026916323229670525, 0.01989305019378662, -0.0010477707255631685, 0.07038217037916183, 0.0028065077494829893, -0.007793779484927654, -0.03470543399453163, 0.005491602700203657, 0.004686074331402779, -0.07045688480138779, -0.012626949697732925, 0.0022076149471104145, -0.015232659876346588, -0.006504933815449476, 0.04150456190109253, 0.040832120925188065, 0.003952926490455866, -0.03711501508951187, 0.029064400121569633, -0.014550878666341305, -0.00946087297052145, -0.040383826941251755, -0.04329773783683777, 0.015270017087459564, 0.06048234552145004, 0.0018025158206000924, 0.005337501410394907, -0.0030563382897526026, 0.04826632887125015, 0.01714724861085415, -0.10400422662496567, -0.019005801528692245, -0.06537622213363647, -0.05988461896777153, -0.022508099675178528, 0.05596204474568367, -0.019024480134248734, -0.05177796632051468, 0.023143181577324867, 0.014270694926381111, 0.028149133548140526, -0.0986994132399559, 0.009288093075156212, -0.02265753038227558, -0.02329261414706707, -0.008909844793379307, -0.06320946663618088, 0.052002113312482834, -0.012860436923801899, -0.046547871083021164, -0.02803706005215645, 0.030483998358249664, 0.029755519703030586, 0.0038268438074737787, 0.031025687232613564, -0.007578971795737743, -0.04060797393321991, -0.006593659054487944, 0.02140604332089424, -0.006304135546088219, -0.049274992197752, 0.02418920211493969, 0.04299887269735336, 0.02204112522304058, 0.026187846437096596, -0.006682383827865124, 0.024394670501351357, -0.04438111558556557, -0.00020911634783260524, 0.026617461815476418, -0.028896288946270943, 0.005323492456227541, 0.042886801064014435, 0.007947880774736404, 0.009759736247360706, 0.06709468364715576, 0.009115313179790974, 0.02319921925663948, -0.07273571193218231, -0.03248264268040657, 0.04116833955049515, 0.02650538831949234, -0.034145064651966095, -0.01418664027005434, 0.0120852617546916, -0.03205302730202675, 0.00408601388335228, -0.020995106548070908, -0.02587030455470085, 0.05674656108021736, 0.027551406994462013, 0.030129099264740944, -0.010245387442409992, -0.009124652482569218, -0.06993387639522552, -0.0241705235093832, 0.03793688863515854, -0.02587030455470085, 0.0019391054520383477, 0.03113776072859764, 0.006383521016687155, 0.023311292752623558, 0.009176019579172134, -0.040645331144332886, -0.010955186560750008, 0.048042181879282, -0.07232478260993958, -0.03375281020998955, 0.053496427834033966, 0.007831137627363205, 0.0019881376065313816, 0.03694690391421318, 0.050545159727334976, 0.024786926805973053, 0.046174291521310806, -0.011039242148399353, 0.04890141263604164, 0.026281241327524185, 0.06545093655586243, 0.0023500416427850723, -0.020677564665675163, -0.012748363427817822, 0.050022147595882416, 0.012113279663026333, 0.036461252719163895, 0.012103940360248089, 0.033603377640247345, -0.056186191737651825, -0.04647315293550491, 0.01035746093839407, -0.004109362605959177, -0.019239287823438644, -0.04871462285518646, 0.003084356663748622, -0.06373247504234314, -0.014588236808776855, -0.05353378504514694, 0.07195120304822922, -0.018109213560819626, -0.011254049837589264, 0.128212109208107, 0.019967766478657722, -0.0736696645617485, -0.03517240658402443, -0.020995106548070908, -0.001843375968746841, 0.04105626791715622, 0.026822930201888084, -0.03812367469072342, -0.027812913060188293, 0.04471733421087265, 0.02732726000249386, 0.006341493222862482, 0.0848022997379303, -0.050096865743398666, 0.0027574757114052773, 0.03653596714138985, -0.038329143077135086, -0.016129247844219208, -0.005622354801744223, -0.028709501028060913, -0.03408902883529663, -0.01526067778468132, -0.010161332786083221, -0.047631245106458664, -0.0045273033902049065, -0.012785720638930798, 0.022059805691242218, 0.03210906311869621, 0.05185268074274063, -0.05641033872961998, -0.031455300748348236, -0.012561573646962643, 0.016138587146997452, -0.05237569287419319, -0.0189217459410429, -0.04516562819480896, -0.020472096279263496, 0.03711501508951187, -0.018865710124373436, 0.01816524937748909, -0.03231453150510788, 0.044941481202840805, 0.025123147293925285, -0.011898471973836422, 0.01750214770436287, -0.028335921466350555, 0.04606221616268158, -0.003857197007164359, 0.0052347672171890736, 0.05801672488451004, -0.07258628308773041, -0.06784183531999588, 0.024039769545197487, -0.033248476684093475, -0.03113776072859764, 0.02516050636768341, 0.0007372336112894118, 0.01736205630004406, 0.06870106607675552, -0.020472096279263496, 0.03349130228161812, -0.0390763022005558, -0.04299887269735336, 0.006112676579505205, 0.029139116406440735, 0.021462079137563705, -0.001256157411262393, 0.02964344620704651, 0.06870106607675552, 0.0372270867228508, -0.011991866864264011, -0.05379528924822807, -0.05536431819200516, 0.03167944774031639, 0.019668903201818466, 0.042886801064014435, 0.023049786686897278, -0.022059805691242218, 0.04045854136347771, 0.048602551221847534, -0.029400620609521866, -0.028242526575922966, -0.04740709811449051, 0.034668076783418655, 0.010553590022027493, -0.01981833390891552, -0.07527604699134827, 0.026019735261797905, -0.011169994249939919, -0.026449350640177727, -0.017278000712394714, 0.022115841507911682, -0.024077128618955612, 0.01878165453672409, -0.04060797393321991, -0.017511487007141113, 0.006981246639043093, 0.0042284405790269375, -0.009432855062186718, 0.027271224185824394, 0.1195450872182846, 0.039860814809799194, -0.027196507900953293, 0.0120105454698205, -0.025048432871699333, 0.02945665642619133, 0.002650071866810322, 0.02678557112812996, 0.08734262734651566, -0.0021515781991183758, 0.055140171200037, 0.016073210164904594, -0.04703352227807045, 0.02220923639833927, 0.053234923630952835, 0.020770959556102753, 0.007691045291721821, -0.07471568137407303, -0.034929580986499786, -0.014167960733175278, 0.0333605520427227, -0.004279807675629854, 0.0916014239192009, 0.017558185383677483, 0.023591475561261177, -0.045389775186777115, 0.05794201046228409, -0.07396852225065231, -0.0235541183501482, -0.034406572580337524, 0.03229585289955139, -0.007635008543729782, 0.0275700856000185, 0.04531506076455116, 0.015157943591475487, -0.05454244837164879, -0.0030586731154471636, -0.013981171883642673, 0.03728312626481056, -0.007480907719582319, -0.018856370821595192, -0.044119611382484436, 0.018959103152155876, -0.014438805170357227, -0.03024117276072502, 0.022190557792782784, 0.0597725436091423, -0.046734657138586044, 0.03268811106681824, 0.02874685823917389, -0.06455434858798981, 0.027065755799412727, 0.025720873847603798, 0.0097317174077034, -0.050657231360673904, -0.0435592420399189, 0.009040597826242447, 0.029139116406440735, -0.02088303305208683, -0.01258959248661995, -0.027289902791380882, -0.009834451600909233, 0.0037124354857951403, 0.002031332580372691, 0.037974245846271515, -0.015550200827419758, 0.053234923630952835, -0.019687581807374954, 0.011478196829557419, -0.08144009113311768, -0.008816449902951717, 0.08412985503673553, 0.018510809168219566, 0.0549907423555851, -0.017464790493249893, 0.012729683890938759, 0.021275289356708527, 0.004198087379336357, -0.05917482078075409, -0.060108765959739685, -0.019071176648139954, -0.04397017881274223, -0.09899827837944031, 0.029792876914143562, -0.01115131564438343, 0.0038455226458609104, -0.020845675840973854, -0.01668027602136135, 0.0471082367002964, -0.0325947143137455, 0.03403299301862717, 0.016288017854094505, -0.06701996922492981, 0.03814235329627991, -0.032426606863737106, 0.037077657878398895, -0.0011633464600890875, -0.06511471420526505, -0.006915870122611523, -0.008424192667007446, -0.011001884005963802, -0.01908985711634159, 0.0356767363846302, -0.036816149950027466, -0.0892852395772934, 0.015027191489934921, -0.06246230751276016, -0.0011329932603985071, 0.03817971423268318, 0.0372270867228508, 0.021555474027991295, 0.01632537692785263, -0.008456881158053875, -0.012113279663026333, 0.08652076125144958, -0.03773142024874687, -0.002986292354762554, -0.04008496180176735, 0.014308053068816662, -0.019594186916947365, 0.050545159727334976, 0.001925096265040338, 0.012813739478588104, 0.004415229894220829, -0.021816978231072426, -0.0036680728662759066, 0.035303160548210144, 0.06578715890645981, -0.00817202776670456, -0.0012993523851037025, -0.05790465325117111, 0.06653431057929993, 0.0005863429978489876, -0.016904423013329506, -0.022377345710992813, -0.06063177436590195, 0.04961121082305908, 0.025291258469223976, 0.009918506257236004, 0.08502644300460815, 0.0028882280457764864, 0.038777437061071396, -0.01454153936356306, 0.057867296040058136, 0.01991172879934311, 0.020546812564134598, -0.0026173836085945368, 0.002657076343894005, -0.019743619486689568, 0.013149959966540337, 0.0006222415249794722, 0.0031730816699564457, 0.04072004556655884, -0.005785795394331217, -0.02222791500389576, -0.03633049875497818, -0.07079310715198517, -0.022358667105436325, -0.06339625269174576, -0.023610156029462814, 0.0031917605083435774, -0.014046547934412956, -0.01222535315901041, -0.019706260412931442, -0.012692326679825783, 0.03203434869647026, 0.020210592076182365, 0.08935995399951935, -0.050208937376737595, -0.04568864032626152, 0.03625578433275223, -0.07665828615427017, -0.0002699687611311674, -0.0018819011747837067, 0.001867891987785697, -0.046174291521310806, -0.05274927243590355, 0.02194773219525814, -0.054131511598825455, -0.0011761882342398167, -0.06690789014101028, -0.01944475620985031, 0.018678920343518257, 0.06560036540031433, 0.014382768422365189, 0.007177375257015228, -0.0303532462567091, 0.007013934664428234, 0.005384198855608702, -0.02945665642619133, 0.002467952435836196, 0.015690293163061142, -0.020565491169691086, 0.0100399199873209, -0.0014569557970389724, 0.05017158016562462, 0.07628470659255981, 0.00754161411896348, -0.032968293875455856, 0.0003531483234837651, 0.029475336894392967, -0.010348121635615826, 0.03900158405303955, -0.048042181879282, 0.03532183915376663, -0.029848914593458176, -0.04146720468997955, 0.010534911416471004, 0.02839195914566517, 0.003028319915756583, 0.01896844431757927, -0.035844847559928894, -0.036367855966091156, 0.0060426308773458, -0.02643067203462124, -0.012879115529358387, -0.056970708072185516, 0.012795059941709042, -0.0010331778321415186, 0.05641033872961998, 0.02516050636768341, 0.000952624948695302, 0.017063193023204803, 0.026225203648209572, -0.007448219228535891, -0.03978610038757324, 0.002332530217245221, -0.016484146937727928, 0.09810169041156769, 0.028597427532076836, 0.004566995892673731, -0.024562779814004898, -0.08756677806377411, 0.014027869328856468, 0.015419448725879192, 0.0035770132672041655, -0.11184937506914139, 0.045128270983695984, 0.012421482242643833, 0.025104468688368797, 0.013495519757270813, -0.0021118854638189077, -0.019351361319422722, 0.029251189902424812, 0.01183309592306614, -0.03855329006910324, 0.014261355623602867, -0.007224072236567736, 0.04580071195960045, -0.00286721414886415, -0.06205137446522713, 0.024674853309988976, -0.10646984726190567, -0.038777437061071396, 0.024488063529133797, 0.02605709433555603, -0.03649860993027687, -0.023628834635019302, 0.046547871083021164, 0.003901559393852949, 0.022601492702960968, 0.03509769216179848, 0.06787919253110886, 0.026561424136161804, 0.010721700266003609, -0.017296679317951202, -0.014737668447196484, -0.05820351466536522, -0.08398042619228363, -0.04606221616268158, -0.019519472494721413, 0.023329971358180046, 0.05024629458785057, -0.01222535315901041, -0.005393538158386946, -0.005631694570183754, 0.00020094432693440467, 0.01989305019378662, -0.017520826309919357, -0.021929051727056503, -0.003308503655716777, 0.058054085820913315, 0.011375462636351585, 0.0073408158496022224, -0.00321277417242527, -0.01904315873980522, -0.02357279695570469, 0.029848914593458176, -0.03612503036856651, 0.0009041765006259084, -0.008760413154959679, -0.06257437914609909, 0.04964857175946236, -0.031100401654839516, -0.08009520918130875, 0.0004407057713251561, -0.043148305267095566, 0.06152836233377457, -0.008279431611299515, 0.015727650374174118, -0.036909546703100204, 0.023871660232543945, -0.021835656836628914, -0.0008352979784831405, 0.005617685150355101, 0.026001056656241417, 0.040570612996816635, -0.05659712851047516, 0.024768248200416565, -0.018249304965138435, 0.06713204085826874, -0.03401431441307068, 0.041803423315286636, -0.028690820559859276, 0.014793705195188522, 0.03070814535021782, -0.01258959248661995, 0.029045721516013145, 0.010964525863528252, -0.0017383070662617683, 0.025571441277861595, 0.09070483595132828, 0.007578971795737743, -0.0644049197435379, 0.005650373175740242, 0.034668076783418655, -0.08532530814409256, 0.041728708893060684, 0.06152836233377457, 0.08823922276496887, -0.03982345759868622, 0.010590948164463043, 0.02069624327123165, 0.018408074975013733, 0.0037544630467891693, -0.06492792814970016, 0.020303986966609955, -0.05801672488451004, -0.035471267998218536, -0.028504032641649246, -0.0642554834485054, 0.04684673249721527, -0.024842964485287666, -0.04733238369226456, 0.005188070237636566, -0.04027175158262253, -0.024786926805973053, -0.009297432377934456, 0.06111742556095123, 0.045912787318229675, 0.015316714532673359, 0.018632223829627037, -0.0035606692545115948, -0.010955186560750008, -0.019127214327454567, 0.017427433282136917, 0.022452061995863914, 0.02910175733268261, -0.05424358323216438, 0.039225731045007706, -0.04322301968932152, -0.03829178586602211, 0.012888454832136631, -0.008209384977817535, 0.00268976460210979, 0.039225731045007706, 0.04419432580471039, 0.0028368609491735697, 0.037357840687036514, -0.017941102385520935, 0.04733238369226456, 0.00021918545826338232, 0.015475485473871231, -0.020770959556102753, -0.057344283908605576, 0.019594186916947365, 0.00932078156620264, 0.02418920211493969, -0.01035746093839407, -0.006229419726878405, -0.028784215450286865, 0.014793705195188522, -0.00959162600338459, 0.007415531203150749, -0.007004594895988703, -0.011851774528622627, 0.03543391078710556, 0.011319425888359547, 0.01339278556406498, -0.020640207454562187, -0.016689615324139595, 0.014756347052752972, 0.03371544927358627, -0.013822400942444801, -0.06724411249160767, -0.034593358635902405, -0.009657002054154873, 0.0048238313756883144, 0.03042796067893505, -0.05898803099989891, -0.02473089098930359, -0.04079475998878479, -0.08487701416015625, 0.021536795422434807, 0.0025309936609119177, 0.0033622055780142546, -0.007821797393262386, -0.016717633232474327, 0.037432555109262466, -0.021630190312862396, 0.008148678578436375, 0.028167812153697014, -0.03711501508951187, 0.01679234951734543, 0.023329971358180046, 0.04651051014661789, -0.022993750870227814, 0.06758033484220505, 0.013355428352952003, 0.049760643392801285, 0.0019577844068408012, -0.009675680659711361, -0.006308805197477341, -0.04281208664178848, -0.011627627536654472, -0.022825639694929123, -0.019855692982673645, -0.007574302144348621, -0.0049172258004546165, 0.0571574941277504, -0.007947880774736404, 0.029251189902424812, -0.04845311865210533, -0.008218725211918354, 0.0061313556507229805, -0.010236048139631748, 0.03068946674466133, 0.012963170185685158, -0.05017158016562462, 0.02106982283294201, 0.06205137446522713, 0.018819011747837067, 0.009236725978553295, 0.010058598592877388, -0.027289902791380882, -0.029512694105505943, -0.024880321696400642, 0.019668903201818466, 0.022003768011927605, -0.028354600071907043, 0.029923630878329277, 0.03509769216179848, 0.0019589518196880817, 0.013579575344920158, 0.016147926449775696, 0.018183927983045578, 0.018856370821595192, -0.023796943947672844, 0.0055336300283670425, -0.03380884602665901, 0.03829178586602211, -0.006332153920084238, 0.019668903201818466, 0.06664638966321945, 0.024656174704432487, 0.07195120304822922, 0.05954839661717415, 0.012300068512558937, -0.06156571954488754, -0.030035704374313354, -0.00005304521619109437, -0.008783762343227863, -0.01418664027005434, -0.008447541855275631, -0.07673300802707672, 0.03625578433275223, 0.008251412771642208, -0.0678044781088829, -0.022694887593388557, -0.007200723979622126, 0.035564664751291275, 0.028074417263269424, 0.019650224596261978, 0.017941102385520935, -0.0016087220283225179, -0.014205318875610828, 0.0015013181837275624, -0.02140604332089424, -0.0014055887004360557, -0.041093625128269196, 0.07019538432359695, -0.00850357860326767, -0.002818182110786438, 0.050470441579818726, -0.008839799091219902, 0.016166605055332184, -0.0013262033462524414, -0.010077277198433876 ]