mslite-schema.js 153 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202
  1. var $root = flatbuffers.get('mslite');
  2. $root.mindspore = $root.mindspore || {};
  3. $root.mindspore.schema = $root.mindspore.schema || {};
  4. $root.mindspore.schema.ResizeMethod = {
  5. UNKNOWN: -1,
  6. LINEAR: 0,
  7. NEAREST: 1,
  8. CUBIC: 2
  9. };
  10. $root.mindspore.schema.CoordinateTransformMode = {
  11. ASYMMETRIC: 0,
  12. ALIGN_CORNERS: 1,
  13. HALF_PIXEL: 2
  14. };
  15. $root.mindspore.schema.NearestMode = {
  16. NORMAL: 0,
  17. ROUND_HALF_DOWN: 1,
  18. ROUND_HALF_UP: 2,
  19. FLOOR: 3,
  20. CEIL: 4
  21. };
  22. $root.mindspore.schema.Format = {
  23. NCHW: 0,
  24. NHWC: 1,
  25. NHWC4: 2,
  26. HWKC: 3,
  27. HWCK: 4,
  28. KCHW: 5,
  29. CKHW: 6,
  30. KHWC: 7,
  31. CHWK: 8,
  32. HW: 9,
  33. HW4: 10,
  34. NC: 11,
  35. NC4: 12,
  36. NC4HW4: 13,
  37. NUM_OF_FORMAT: 14,
  38. NCDHW: 15,
  39. NWC: 16,
  40. NCW: 17
  41. };
  42. $root.mindspore.schema.ActivationType = {
  43. NO_ACTIVATION: 0,
  44. RELU: 1,
  45. SIGMOID: 2,
  46. RELU6: 3,
  47. ELU: 4,
  48. LEAKY_RELU: 5,
  49. ABS: 6,
  50. RELU1: 7,
  51. SOFTSIGN: 8,
  52. SOFTPLUS: 9,
  53. TANH: 10,
  54. SELU: 11,
  55. HSWISH: 12,
  56. HSIGMOID: 13,
  57. THRESHOLDRELU: 14,
  58. LINEAR: 15,
  59. HARD_TANH: 16,
  60. SIGN: 17,
  61. SWISH: 18,
  62. GELU: 19,
  63. UNKNOWN: 20
  64. };
  65. $root.mindspore.schema.ReduceMode = {
  66. ReduceMean: 0,
  67. ReduceMax: 1,
  68. ReduceMin: 2,
  69. ReduceProd: 3,
  70. ReduceSum: 4,
  71. ReduceSumSquare: 5,
  72. ReduceASum: 6,
  73. ReduceAll: 7
  74. };
  75. $root.mindspore.schema.PoolMode = {
  76. MAX_POOLING: 0,
  77. MEAN_POOLING: 1
  78. };
  79. $root.mindspore.schema.EltwiseMode = {
  80. PROD: 0,
  81. SUM: 1,
  82. MAXIMUM: 2,
  83. UNKNOWN: 3
  84. };
  85. $root.mindspore.schema.PadMode = {
  86. PAD: 0,
  87. SAME: 1,
  88. VALID: 2
  89. };
  90. $root.mindspore.schema.RoundMode = {
  91. FLOOR: 0,
  92. CEIL: 1
  93. };
  94. $root.mindspore.schema.PaddingMode = {
  95. CONSTANT: 0,
  96. REFLECT: 1,
  97. SYMMETRIC: 2,
  98. MODE_RESERVED: 3
  99. };
  100. $root.mindspore.schema.LshProjectionType = {
  101. UNKNOWN: 0,
  102. SPARSE: 1,
  103. DENSE: 2
  104. };
  105. $root.mindspore.schema.Reduction = {
  106. REDUCTION_SUM: 0,
  107. MEAN: 1,
  108. NONE: 2
  109. };
  110. $root.mindspore.schema.Vec = class Vec {
  111. static decode(reader, position) {
  112. const $ = new $root.mindspore.schema.Vec();
  113. $.data = reader.int64s_(position, 4);
  114. return $;
  115. }
  116. static decodeText(reader, json) {
  117. const $ = new $root.mindspore.schema.Vec();
  118. $.data = reader.array(json.data);
  119. return $;
  120. }
  121. };
  122. $root.mindspore.schema.Vec2D = class Vec2D {
  123. static decode(reader, position) {
  124. const $ = new $root.mindspore.schema.Vec2D();
  125. $.data = reader.tableArray(position, 4, $root.mindspore.schema.Vec.decode);
  126. return $;
  127. }
  128. static decodeText(reader, json) {
  129. const $ = new $root.mindspore.schema.Vec2D();
  130. $.data = reader.objectArray(json.data, $root.mindspore.schema.Vec.decodeText);
  131. return $;
  132. }
  133. };
  134. $root.mindspore.schema.Attribute = class Attribute {
  135. static decode(reader, position) {
  136. const $ = new $root.mindspore.schema.Attribute();
  137. $.name = reader.string_(position, 4, null);
  138. $.data = reader.typedArray(position, 6, Uint8Array);
  139. return $;
  140. }
  141. static decodeText(reader, json) {
  142. const $ = new $root.mindspore.schema.Attribute();
  143. $.name = reader.value(json.name, null);
  144. $.data = reader.typedArray(json.data, Uint8Array);
  145. return $;
  146. }
  147. };
  148. $root.mindspore.schema.PrimitiveType = class {
  149. static decode(reader, position, type) {
  150. switch (type) {
  151. case 1: return $root.mindspore.schema.Abs.decode(reader, position);
  152. case 2: return $root.mindspore.schema.Activation.decode(reader, position);
  153. case 3: return $root.mindspore.schema.ActivationGrad.decode(reader, position);
  154. case 4: return $root.mindspore.schema.Adam.decode(reader, position);
  155. case 5: return $root.mindspore.schema.AddFusion.decode(reader, position);
  156. case 6: return $root.mindspore.schema.AdderFusion.decode(reader, position);
  157. case 7: return $root.mindspore.schema.AddGrad.decode(reader, position);
  158. case 8: return $root.mindspore.schema.AddN.decode(reader, position);
  159. case 9: return $root.mindspore.schema.All.decode(reader, position);
  160. case 10: return $root.mindspore.schema.ApplyMomentum.decode(reader, position);
  161. case 11: return $root.mindspore.schema.ArgMaxFusion.decode(reader, position);
  162. case 12: return $root.mindspore.schema.ArgMinFusion.decode(reader, position);
  163. case 13: return $root.mindspore.schema.Assert.decode(reader, position);
  164. case 14: return $root.mindspore.schema.Assign.decode(reader, position);
  165. case 15: return $root.mindspore.schema.AssignAdd.decode(reader, position);
  166. case 16: return $root.mindspore.schema.AudioSpectrogram.decode(reader, position);
  167. case 17: return $root.mindspore.schema.AvgPoolFusion.decode(reader, position);
  168. case 18: return $root.mindspore.schema.AvgPoolGrad.decode(reader, position);
  169. case 19: return $root.mindspore.schema.BatchNorm.decode(reader, position);
  170. case 20: return $root.mindspore.schema.BatchNormGrad.decode(reader, position);
  171. case 21: return $root.mindspore.schema.BatchToSpace.decode(reader, position);
  172. case 22: return $root.mindspore.schema.BatchToSpaceND.decode(reader, position);
  173. case 23: return $root.mindspore.schema.BiasAdd.decode(reader, position);
  174. case 24: return $root.mindspore.schema.BinaryCrossEntropy.decode(reader, position);
  175. case 25: return $root.mindspore.schema.BinaryCrossEntropyGrad.decode(reader, position);
  176. case 26: return $root.mindspore.schema.BiasAddGrad.decode(reader, position);
  177. case 27: return $root.mindspore.schema.BroadcastTo.decode(reader, position);
  178. case 28: return $root.mindspore.schema.Cast.decode(reader, position);
  179. case 29: return $root.mindspore.schema.Ceil.decode(reader, position);
  180. case 30: return $root.mindspore.schema.Clip.decode(reader, position);
  181. case 31: return $root.mindspore.schema.Concat.decode(reader, position);
  182. case 32: return $root.mindspore.schema.ControlDepend.decode(reader, position);
  183. case 33: return $root.mindspore.schema.Conv2DBackpropFilterFusion.decode(reader, position);
  184. case 34: return $root.mindspore.schema.Conv2DBackpropInputFusion.decode(reader, position);
  185. case 35: return $root.mindspore.schema.Conv2DFusion.decode(reader, position);
  186. case 36: return $root.mindspore.schema.Conv2dTransposeFusion.decode(reader, position);
  187. case 37: return $root.mindspore.schema.Cos.decode(reader, position);
  188. case 38: return $root.mindspore.schema.ConstantOfShape.decode(reader, position);
  189. case 39: return $root.mindspore.schema.Crop.decode(reader, position);
  190. case 40: return $root.mindspore.schema.CustomExtractFeatures.decode(reader, position);
  191. case 41: return $root.mindspore.schema.CustomNormalize.decode(reader, position);
  192. case 42: return $root.mindspore.schema.CustomPredict.decode(reader, position);
  193. case 43: return $root.mindspore.schema.DeConv2DGradFilter.decode(reader, position);
  194. case 44: return $root.mindspore.schema.Depend.decode(reader, position);
  195. case 45: return $root.mindspore.schema.DepthToSpace.decode(reader, position);
  196. case 46: return $root.mindspore.schema.DetectionPostProcess.decode(reader, position);
  197. case 47: return $root.mindspore.schema.DivFusion.decode(reader, position);
  198. case 48: return $root.mindspore.schema.DivGrad.decode(reader, position);
  199. case 49: return $root.mindspore.schema.Dropout.decode(reader, position);
  200. case 50: return $root.mindspore.schema.DropoutGrad.decode(reader, position);
  201. case 51: return $root.mindspore.schema.Elu.decode(reader, position);
  202. case 52: return $root.mindspore.schema.Eltwise.decode(reader, position);
  203. case 53: return $root.mindspore.schema.Equal.decode(reader, position);
  204. case 54: return $root.mindspore.schema.EmbeddingLookupFusion.decode(reader, position);
  205. case 55: return $root.mindspore.schema.ExpFusion.decode(reader, position);
  206. case 56: return $root.mindspore.schema.ExpandDims.decode(reader, position);
  207. case 57: return $root.mindspore.schema.FakeQuantWithMinMaxVars.decode(reader, position);
  208. case 58: return $root.mindspore.schema.FakeQuantWithMinMaxVarsPerChannel.decode(reader, position);
  209. case 59: return $root.mindspore.schema.FftReal.decode(reader, position);
  210. case 60: return $root.mindspore.schema.FftImag.decode(reader, position);
  211. case 61: return $root.mindspore.schema.Flatten.decode(reader, position);
  212. case 62: return $root.mindspore.schema.FlattenGrad.decode(reader, position);
  213. case 63: return $root.mindspore.schema.Floor.decode(reader, position);
  214. case 64: return $root.mindspore.schema.FloorDiv.decode(reader, position);
  215. case 65: return $root.mindspore.schema.FloorMod.decode(reader, position);
  216. case 66: return $root.mindspore.schema.Fill.decode(reader, position);
  217. case 67: return $root.mindspore.schema.FullConnection.decode(reader, position);
  218. case 68: return $root.mindspore.schema.FusedBatchNorm.decode(reader, position);
  219. case 69: return $root.mindspore.schema.Gather.decode(reader, position);
  220. case 70: return $root.mindspore.schema.GatherNd.decode(reader, position);
  221. case 71: return $root.mindspore.schema.Greater.decode(reader, position);
  222. case 72: return $root.mindspore.schema.GreaterEqual.decode(reader, position);
  223. case 73: return $root.mindspore.schema.HashtableLookup.decode(reader, position);
  224. case 74: return $root.mindspore.schema.InstanceNorm.decode(reader, position);
  225. case 75: return $root.mindspore.schema.LayerNormFusion.decode(reader, position);
  226. case 76: return $root.mindspore.schema.LeakyRelu.decode(reader, position);
  227. case 77: return $root.mindspore.schema.Less.decode(reader, position);
  228. case 78: return $root.mindspore.schema.LessEqual.decode(reader, position);
  229. case 79: return $root.mindspore.schema.Log.decode(reader, position);
  230. case 80: return $root.mindspore.schema.LogGrad.decode(reader, position);
  231. case 81: return $root.mindspore.schema.LogicalAnd.decode(reader, position);
  232. case 82: return $root.mindspore.schema.LogicalNot.decode(reader, position);
  233. case 83: return $root.mindspore.schema.LogicalOr.decode(reader, position);
  234. case 84: return $root.mindspore.schema.LpNormalization.decode(reader, position);
  235. case 85: return $root.mindspore.schema.LRN.decode(reader, position);
  236. case 86: return $root.mindspore.schema.LshProjection.decode(reader, position);
  237. case 87: return $root.mindspore.schema.LSTM.decode(reader, position);
  238. case 88: return $root.mindspore.schema.L2NormalizeFusion.decode(reader, position);
  239. case 89: return $root.mindspore.schema.MatMul.decode(reader, position);
  240. case 90: return $root.mindspore.schema.Maximum.decode(reader, position);
  241. case 91: return $root.mindspore.schema.MaximumGrad.decode(reader, position);
  242. case 92: return $root.mindspore.schema.MaxPoolFusion.decode(reader, position);
  243. case 93: return $root.mindspore.schema.MaxPoolGrad.decode(reader, position);
  244. case 94: return $root.mindspore.schema.Merge.decode(reader, position);
  245. case 95: return $root.mindspore.schema.Mfcc.decode(reader, position);
  246. case 96: return $root.mindspore.schema.Minimum.decode(reader, position);
  247. case 97: return $root.mindspore.schema.MinimumGrad.decode(reader, position);
  248. case 98: return $root.mindspore.schema.Mod.decode(reader, position);
  249. case 99: return $root.mindspore.schema.MulFusion.decode(reader, position);
  250. case 100: return $root.mindspore.schema.MulGrad.decode(reader, position);
  251. case 101: return $root.mindspore.schema.Neg.decode(reader, position);
  252. case 102: return $root.mindspore.schema.NegGrad.decode(reader, position);
  253. case 103: return $root.mindspore.schema.NotEqual.decode(reader, position);
  254. case 104: return $root.mindspore.schema.NonMaxSuppression.decode(reader, position);
  255. case 105: return $root.mindspore.schema.OneHot.decode(reader, position);
  256. case 106: return $root.mindspore.schema.OnesLike.decode(reader, position);
  257. case 107: return $root.mindspore.schema.PadFusion.decode(reader, position);
  258. case 108: return $root.mindspore.schema.PartialFusion.decode(reader, position);
  259. case 109: return $root.mindspore.schema.PowerGrad.decode(reader, position);
  260. case 110: return $root.mindspore.schema.PowFusion.decode(reader, position);
  261. case 111: return $root.mindspore.schema.PriorBox.decode(reader, position);
  262. case 112: return $root.mindspore.schema.PReLUFusion.decode(reader, position);
  263. case 113: return $root.mindspore.schema.QuantDTypeCast.decode(reader, position);
  264. case 114: return $root.mindspore.schema.Rank.decode(reader, position);
  265. case 115: return $root.mindspore.schema.Range.decode(reader, position);
  266. case 116: return $root.mindspore.schema.Reciprocal.decode(reader, position);
  267. case 117: return $root.mindspore.schema.RealDiv.decode(reader, position);
  268. case 118: return $root.mindspore.schema.ReduceFusion.decode(reader, position);
  269. case 119: return $root.mindspore.schema.Reshape.decode(reader, position);
  270. case 120: return $root.mindspore.schema.Resize.decode(reader, position);
  271. case 121: return $root.mindspore.schema.ReverseSequence.decode(reader, position);
  272. case 122: return $root.mindspore.schema.ReverseV2.decode(reader, position);
  273. case 123: return $root.mindspore.schema.Rfft.decode(reader, position);
  274. case 124: return $root.mindspore.schema.ROIPooling.decode(reader, position);
  275. case 125: return $root.mindspore.schema.Round.decode(reader, position);
  276. case 126: return $root.mindspore.schema.Rsqrt.decode(reader, position);
  277. case 127: return $root.mindspore.schema.ScaleFusion.decode(reader, position);
  278. case 128: return $root.mindspore.schema.ScatterNd.decode(reader, position);
  279. case 129: return $root.mindspore.schema.SGD.decode(reader, position);
  280. case 130: return $root.mindspore.schema.Shape.decode(reader, position);
  281. case 131: return $root.mindspore.schema.SigmoidCrossEntropyWithLogits.decode(reader, position);
  282. case 132: return $root.mindspore.schema.SigmoidCrossEntropyWithLogitsGrad.decode(reader, position);
  283. case 133: return $root.mindspore.schema.Sin.decode(reader, position);
  284. case 134: return $root.mindspore.schema.SkipGram.decode(reader, position);
  285. case 135: return $root.mindspore.schema.SliceFusion.decode(reader, position);
  286. case 136: return $root.mindspore.schema.SmoothL1Loss.decode(reader, position);
  287. case 137: return $root.mindspore.schema.SmoothL1LossGrad.decode(reader, position);
  288. case 138: return $root.mindspore.schema.Softmax.decode(reader, position);
  289. case 139: return $root.mindspore.schema.SoftmaxCrossEntropyWithLogits.decode(reader, position);
  290. case 140: return $root.mindspore.schema.SpaceToBatch.decode(reader, position);
  291. case 141: return $root.mindspore.schema.SpaceToBatchND.decode(reader, position);
  292. case 142: return $root.mindspore.schema.SpaceToDepth.decode(reader, position);
  293. case 143: return $root.mindspore.schema.SparseSoftmaxCrossEntropyWithLogits.decode(reader, position);
  294. case 144: return $root.mindspore.schema.SparseToDense.decode(reader, position);
  295. case 145: return $root.mindspore.schema.Split.decode(reader, position);
  296. case 146: return $root.mindspore.schema.Sqrt.decode(reader, position);
  297. case 147: return $root.mindspore.schema.Squeeze.decode(reader, position);
  298. case 148: return $root.mindspore.schema.Square.decode(reader, position);
  299. case 149: return $root.mindspore.schema.SquaredDifference.decode(reader, position);
  300. case 150: return $root.mindspore.schema.Stack.decode(reader, position);
  301. case 151: return $root.mindspore.schema.StridedSlice.decode(reader, position);
  302. case 152: return $root.mindspore.schema.SubFusion.decode(reader, position);
  303. case 153: return $root.mindspore.schema.SubGrad.decode(reader, position);
  304. case 154: return $root.mindspore.schema.Switch.decode(reader, position);
  305. case 155: return $root.mindspore.schema.TensorListFromTensor.decode(reader, position);
  306. case 156: return $root.mindspore.schema.TensorListGetItem.decode(reader, position);
  307. case 157: return $root.mindspore.schema.TensorListReserve.decode(reader, position);
  308. case 158: return $root.mindspore.schema.TensorListSetItem.decode(reader, position);
  309. case 159: return $root.mindspore.schema.TensorListStack.decode(reader, position);
  310. case 160: return $root.mindspore.schema.TileFusion.decode(reader, position);
  311. case 161: return $root.mindspore.schema.TopKFusion.decode(reader, position);
  312. case 162: return $root.mindspore.schema.Transpose.decode(reader, position);
  313. case 163: return $root.mindspore.schema.Unique.decode(reader, position);
  314. case 164: return $root.mindspore.schema.UnsortedSegmentSum.decode(reader, position);
  315. case 165: return $root.mindspore.schema.Unsqueeze.decode(reader, position);
  316. case 166: return $root.mindspore.schema.Unstack.decode(reader, position);
  317. case 167: return $root.mindspore.schema.While.decode(reader, position);
  318. case 168: return $root.mindspore.schema.Where.decode(reader, position);
  319. case 169: return $root.mindspore.schema.ZerosLike.decode(reader, position);
  320. case 170: return $root.mindspore.schema.Select.decode(reader, position);
  321. case 171: return $root.mindspore.schema.If.decode(reader, position);
  322. case 172: return $root.mindspore.schema.GRU.decode(reader, position);
  323. case 173: return $root.mindspore.schema.NonZero.decode(reader, position);
  324. case 174: return $root.mindspore.schema.InvertPermutation.decode(reader, position);
  325. case 175: return $root.mindspore.schema.Size.decode(reader, position);
  326. case 176: return $root.mindspore.schema.RandomStandardNormal.decode(reader, position);
  327. case 177: return $root.mindspore.schema.CropAndResize.decode(reader, position);
  328. case 178: return $root.mindspore.schema.Erf.decode(reader, position);
  329. case 179: return $root.mindspore.schema.StridedSliceGrad.decode(reader, position);
  330. case 180: return $root.mindspore.schema.IsFinite.decode(reader, position);
  331. case 181: return $root.mindspore.schema.LinSpace.decode(reader, position);
  332. case 182: return $root.mindspore.schema.UniformReal.decode(reader, position);
  333. case 183: return $root.mindspore.schema.AbsGrad.decode(reader, position);
  334. case 184: return $root.mindspore.schema.RsqrtGrad.decode(reader, position);
  335. case 185: return $root.mindspore.schema.SqrtGrad.decode(reader, position);
  336. case 186: return $root.mindspore.schema.LayerNormGrad.decode(reader, position);
  337. case 187: return $root.mindspore.schema.ResizeGrad.decode(reader, position);
  338. case 188: return $root.mindspore.schema.Splice.decode(reader, position);
  339. case 189: return $root.mindspore.schema.LogSoftmax.decode(reader, position);
  340. case 190: return $root.mindspore.schema.Call.decode(reader, position);
  341. case 191: return $root.mindspore.schema.Custom.decode(reader, position);
  342. case 192: return $root.mindspore.schema.CumSum.decode(reader, position);
  343. case 193: return $root.mindspore.schema.SplitWithOverlap.decode(reader, position);
  344. case 194: return $root.mindspore.schema.GenOP.decode(reader, position);
  345. case 195: return $root.mindspore.schema.RaggedRange.decode(reader, position);
  346. case 196: return $root.mindspore.schema.GLU.decode(reader, position);
  347. case 197: return $root.mindspore.schema.TensorArray.decode(reader, position);
  348. case 198: return $root.mindspore.schema.TensorArrayRead.decode(reader, position);
  349. case 199: return $root.mindspore.schema.TensorArrayWrite.decode(reader, position);
  350. case 200: return $root.mindspore.schema.Affine.decode(reader, position);
  351. case 201: return $root.mindspore.schema.Attention.decode(reader, position);
  352. case 202: return $root.mindspore.schema.LSTMGrad.decode(reader, position);
  353. case 203: return $root.mindspore.schema.ScatterNdUpdate.decode(reader, position);
  354. }
  355. return undefined;
  356. }
  357. static decodeText(reader, json, type) {
  358. switch (type) {
  359. case 'Abs': return $root.mindspore.schema.Abs.decodeText(reader, json);
  360. case 'Activation': return $root.mindspore.schema.Activation.decodeText(reader, json);
  361. case 'ActivationGrad': return $root.mindspore.schema.ActivationGrad.decodeText(reader, json);
  362. case 'Adam': return $root.mindspore.schema.Adam.decodeText(reader, json);
  363. case 'AddFusion': return $root.mindspore.schema.AddFusion.decodeText(reader, json);
  364. case 'AdderFusion': return $root.mindspore.schema.AdderFusion.decodeText(reader, json);
  365. case 'AddGrad': return $root.mindspore.schema.AddGrad.decodeText(reader, json);
  366. case 'AddN': return $root.mindspore.schema.AddN.decodeText(reader, json);
  367. case 'All': return $root.mindspore.schema.All.decodeText(reader, json);
  368. case 'ApplyMomentum': return $root.mindspore.schema.ApplyMomentum.decodeText(reader, json);
  369. case 'ArgMaxFusion': return $root.mindspore.schema.ArgMaxFusion.decodeText(reader, json);
  370. case 'ArgMinFusion': return $root.mindspore.schema.ArgMinFusion.decodeText(reader, json);
  371. case 'Assert': return $root.mindspore.schema.Assert.decodeText(reader, json);
  372. case 'Assign': return $root.mindspore.schema.Assign.decodeText(reader, json);
  373. case 'AssignAdd': return $root.mindspore.schema.AssignAdd.decodeText(reader, json);
  374. case 'AudioSpectrogram': return $root.mindspore.schema.AudioSpectrogram.decodeText(reader, json);
  375. case 'AvgPoolFusion': return $root.mindspore.schema.AvgPoolFusion.decodeText(reader, json);
  376. case 'AvgPoolGrad': return $root.mindspore.schema.AvgPoolGrad.decodeText(reader, json);
  377. case 'BatchNorm': return $root.mindspore.schema.BatchNorm.decodeText(reader, json);
  378. case 'BatchNormGrad': return $root.mindspore.schema.BatchNormGrad.decodeText(reader, json);
  379. case 'BatchToSpace': return $root.mindspore.schema.BatchToSpace.decodeText(reader, json);
  380. case 'BatchToSpaceND': return $root.mindspore.schema.BatchToSpaceND.decodeText(reader, json);
  381. case 'BiasAdd': return $root.mindspore.schema.BiasAdd.decodeText(reader, json);
  382. case 'BinaryCrossEntropy': return $root.mindspore.schema.BinaryCrossEntropy.decodeText(reader, json);
  383. case 'BinaryCrossEntropyGrad': return $root.mindspore.schema.BinaryCrossEntropyGrad.decodeText(reader, json);
  384. case 'BiasAddGrad': return $root.mindspore.schema.BiasAddGrad.decodeText(reader, json);
  385. case 'BroadcastTo': return $root.mindspore.schema.BroadcastTo.decodeText(reader, json);
  386. case 'Cast': return $root.mindspore.schema.Cast.decodeText(reader, json);
  387. case 'Ceil': return $root.mindspore.schema.Ceil.decodeText(reader, json);
  388. case 'Clip': return $root.mindspore.schema.Clip.decodeText(reader, json);
  389. case 'Concat': return $root.mindspore.schema.Concat.decodeText(reader, json);
  390. case 'ControlDepend': return $root.mindspore.schema.ControlDepend.decodeText(reader, json);
  391. case 'Conv2DBackpropFilterFusion': return $root.mindspore.schema.Conv2DBackpropFilterFusion.decodeText(reader, json);
  392. case 'Conv2DBackpropInputFusion': return $root.mindspore.schema.Conv2DBackpropInputFusion.decodeText(reader, json);
  393. case 'Conv2DFusion': return $root.mindspore.schema.Conv2DFusion.decodeText(reader, json);
  394. case 'Conv2dTransposeFusion': return $root.mindspore.schema.Conv2dTransposeFusion.decodeText(reader, json);
  395. case 'Cos': return $root.mindspore.schema.Cos.decodeText(reader, json);
  396. case 'ConstantOfShape': return $root.mindspore.schema.ConstantOfShape.decodeText(reader, json);
  397. case 'Crop': return $root.mindspore.schema.Crop.decodeText(reader, json);
  398. case 'CustomExtractFeatures': return $root.mindspore.schema.CustomExtractFeatures.decodeText(reader, json);
  399. case 'CustomNormalize': return $root.mindspore.schema.CustomNormalize.decodeText(reader, json);
  400. case 'CustomPredict': return $root.mindspore.schema.CustomPredict.decodeText(reader, json);
  401. case 'DeConv2DGradFilter': return $root.mindspore.schema.DeConv2DGradFilter.decodeText(reader, json);
  402. case 'Depend': return $root.mindspore.schema.Depend.decodeText(reader, json);
  403. case 'DepthToSpace': return $root.mindspore.schema.DepthToSpace.decodeText(reader, json);
  404. case 'DetectionPostProcess': return $root.mindspore.schema.DetectionPostProcess.decodeText(reader, json);
  405. case 'DivFusion': return $root.mindspore.schema.DivFusion.decodeText(reader, json);
  406. case 'DivGrad': return $root.mindspore.schema.DivGrad.decodeText(reader, json);
  407. case 'Dropout': return $root.mindspore.schema.Dropout.decodeText(reader, json);
  408. case 'DropoutGrad': return $root.mindspore.schema.DropoutGrad.decodeText(reader, json);
  409. case 'Elu': return $root.mindspore.schema.Elu.decodeText(reader, json);
  410. case 'Eltwise': return $root.mindspore.schema.Eltwise.decodeText(reader, json);
  411. case 'Equal': return $root.mindspore.schema.Equal.decodeText(reader, json);
  412. case 'EmbeddingLookupFusion': return $root.mindspore.schema.EmbeddingLookupFusion.decodeText(reader, json);
  413. case 'ExpFusion': return $root.mindspore.schema.ExpFusion.decodeText(reader, json);
  414. case 'ExpandDims': return $root.mindspore.schema.ExpandDims.decodeText(reader, json);
  415. case 'FakeQuantWithMinMaxVars': return $root.mindspore.schema.FakeQuantWithMinMaxVars.decodeText(reader, json);
  416. case 'FakeQuantWithMinMaxVarsPerChannel': return $root.mindspore.schema.FakeQuantWithMinMaxVarsPerChannel.decodeText(reader, json);
  417. case 'FftReal': return $root.mindspore.schema.FftReal.decodeText(reader, json);
  418. case 'FftImag': return $root.mindspore.schema.FftImag.decodeText(reader, json);
  419. case 'Flatten': return $root.mindspore.schema.Flatten.decodeText(reader, json);
  420. case 'FlattenGrad': return $root.mindspore.schema.FlattenGrad.decodeText(reader, json);
  421. case 'Floor': return $root.mindspore.schema.Floor.decodeText(reader, json);
  422. case 'FloorDiv': return $root.mindspore.schema.FloorDiv.decodeText(reader, json);
  423. case 'FloorMod': return $root.mindspore.schema.FloorMod.decodeText(reader, json);
  424. case 'Fill': return $root.mindspore.schema.Fill.decodeText(reader, json);
  425. case 'FullConnection': return $root.mindspore.schema.FullConnection.decodeText(reader, json);
  426. case 'FusedBatchNorm': return $root.mindspore.schema.FusedBatchNorm.decodeText(reader, json);
  427. case 'Gather': return $root.mindspore.schema.Gather.decodeText(reader, json);
  428. case 'GatherNd': return $root.mindspore.schema.GatherNd.decodeText(reader, json);
  429. case 'Greater': return $root.mindspore.schema.Greater.decodeText(reader, json);
  430. case 'GreaterEqual': return $root.mindspore.schema.GreaterEqual.decodeText(reader, json);
  431. case 'HashtableLookup': return $root.mindspore.schema.HashtableLookup.decodeText(reader, json);
  432. case 'InstanceNorm': return $root.mindspore.schema.InstanceNorm.decodeText(reader, json);
  433. case 'LayerNormFusion': return $root.mindspore.schema.LayerNormFusion.decodeText(reader, json);
  434. case 'LeakyRelu': return $root.mindspore.schema.LeakyRelu.decodeText(reader, json);
  435. case 'Less': return $root.mindspore.schema.Less.decodeText(reader, json);
  436. case 'LessEqual': return $root.mindspore.schema.LessEqual.decodeText(reader, json);
  437. case 'Log': return $root.mindspore.schema.Log.decodeText(reader, json);
  438. case 'LogGrad': return $root.mindspore.schema.LogGrad.decodeText(reader, json);
  439. case 'LogicalAnd': return $root.mindspore.schema.LogicalAnd.decodeText(reader, json);
  440. case 'LogicalNot': return $root.mindspore.schema.LogicalNot.decodeText(reader, json);
  441. case 'LogicalOr': return $root.mindspore.schema.LogicalOr.decodeText(reader, json);
  442. case 'LpNormalization': return $root.mindspore.schema.LpNormalization.decodeText(reader, json);
  443. case 'LRN': return $root.mindspore.schema.LRN.decodeText(reader, json);
  444. case 'LshProjection': return $root.mindspore.schema.LshProjection.decodeText(reader, json);
  445. case 'LSTM': return $root.mindspore.schema.LSTM.decodeText(reader, json);
  446. case 'L2NormalizeFusion': return $root.mindspore.schema.L2NormalizeFusion.decodeText(reader, json);
  447. case 'MatMul': return $root.mindspore.schema.MatMul.decodeText(reader, json);
  448. case 'Maximum': return $root.mindspore.schema.Maximum.decodeText(reader, json);
  449. case 'MaximumGrad': return $root.mindspore.schema.MaximumGrad.decodeText(reader, json);
  450. case 'MaxPoolFusion': return $root.mindspore.schema.MaxPoolFusion.decodeText(reader, json);
  451. case 'MaxPoolGrad': return $root.mindspore.schema.MaxPoolGrad.decodeText(reader, json);
  452. case 'Merge': return $root.mindspore.schema.Merge.decodeText(reader, json);
  453. case 'Mfcc': return $root.mindspore.schema.Mfcc.decodeText(reader, json);
  454. case 'Minimum': return $root.mindspore.schema.Minimum.decodeText(reader, json);
  455. case 'MinimumGrad': return $root.mindspore.schema.MinimumGrad.decodeText(reader, json);
  456. case 'Mod': return $root.mindspore.schema.Mod.decodeText(reader, json);
  457. case 'MulFusion': return $root.mindspore.schema.MulFusion.decodeText(reader, json);
  458. case 'MulGrad': return $root.mindspore.schema.MulGrad.decodeText(reader, json);
  459. case 'Neg': return $root.mindspore.schema.Neg.decodeText(reader, json);
  460. case 'NegGrad': return $root.mindspore.schema.NegGrad.decodeText(reader, json);
  461. case 'NotEqual': return $root.mindspore.schema.NotEqual.decodeText(reader, json);
  462. case 'NonMaxSuppression': return $root.mindspore.schema.NonMaxSuppression.decodeText(reader, json);
  463. case 'OneHot': return $root.mindspore.schema.OneHot.decodeText(reader, json);
  464. case 'OnesLike': return $root.mindspore.schema.OnesLike.decodeText(reader, json);
  465. case 'PadFusion': return $root.mindspore.schema.PadFusion.decodeText(reader, json);
  466. case 'PartialFusion': return $root.mindspore.schema.PartialFusion.decodeText(reader, json);
  467. case 'PowerGrad': return $root.mindspore.schema.PowerGrad.decodeText(reader, json);
  468. case 'PowFusion': return $root.mindspore.schema.PowFusion.decodeText(reader, json);
  469. case 'PriorBox': return $root.mindspore.schema.PriorBox.decodeText(reader, json);
  470. case 'PReLUFusion': return $root.mindspore.schema.PReLUFusion.decodeText(reader, json);
  471. case 'QuantDTypeCast': return $root.mindspore.schema.QuantDTypeCast.decodeText(reader, json);
  472. case 'Rank': return $root.mindspore.schema.Rank.decodeText(reader, json);
  473. case 'Range': return $root.mindspore.schema.Range.decodeText(reader, json);
  474. case 'Reciprocal': return $root.mindspore.schema.Reciprocal.decodeText(reader, json);
  475. case 'RealDiv': return $root.mindspore.schema.RealDiv.decodeText(reader, json);
  476. case 'ReduceFusion': return $root.mindspore.schema.ReduceFusion.decodeText(reader, json);
  477. case 'Reshape': return $root.mindspore.schema.Reshape.decodeText(reader, json);
  478. case 'Resize': return $root.mindspore.schema.Resize.decodeText(reader, json);
  479. case 'ReverseSequence': return $root.mindspore.schema.ReverseSequence.decodeText(reader, json);
  480. case 'ReverseV2': return $root.mindspore.schema.ReverseV2.decodeText(reader, json);
  481. case 'Rfft': return $root.mindspore.schema.Rfft.decodeText(reader, json);
  482. case 'ROIPooling': return $root.mindspore.schema.ROIPooling.decodeText(reader, json);
  483. case 'Round': return $root.mindspore.schema.Round.decodeText(reader, json);
  484. case 'Rsqrt': return $root.mindspore.schema.Rsqrt.decodeText(reader, json);
  485. case 'ScaleFusion': return $root.mindspore.schema.ScaleFusion.decodeText(reader, json);
  486. case 'ScatterNd': return $root.mindspore.schema.ScatterNd.decodeText(reader, json);
  487. case 'SGD': return $root.mindspore.schema.SGD.decodeText(reader, json);
  488. case 'Shape': return $root.mindspore.schema.Shape.decodeText(reader, json);
  489. case 'SigmoidCrossEntropyWithLogits': return $root.mindspore.schema.SigmoidCrossEntropyWithLogits.decodeText(reader, json);
  490. case 'SigmoidCrossEntropyWithLogitsGrad': return $root.mindspore.schema.SigmoidCrossEntropyWithLogitsGrad.decodeText(reader, json);
  491. case 'Sin': return $root.mindspore.schema.Sin.decodeText(reader, json);
  492. case 'SkipGram': return $root.mindspore.schema.SkipGram.decodeText(reader, json);
  493. case 'SliceFusion': return $root.mindspore.schema.SliceFusion.decodeText(reader, json);
  494. case 'SmoothL1Loss': return $root.mindspore.schema.SmoothL1Loss.decodeText(reader, json);
  495. case 'SmoothL1LossGrad': return $root.mindspore.schema.SmoothL1LossGrad.decodeText(reader, json);
  496. case 'Softmax': return $root.mindspore.schema.Softmax.decodeText(reader, json);
  497. case 'SoftmaxCrossEntropyWithLogits': return $root.mindspore.schema.SoftmaxCrossEntropyWithLogits.decodeText(reader, json);
  498. case 'SpaceToBatch': return $root.mindspore.schema.SpaceToBatch.decodeText(reader, json);
  499. case 'SpaceToBatchND': return $root.mindspore.schema.SpaceToBatchND.decodeText(reader, json);
  500. case 'SpaceToDepth': return $root.mindspore.schema.SpaceToDepth.decodeText(reader, json);
  501. case 'SparseSoftmaxCrossEntropyWithLogits': return $root.mindspore.schema.SparseSoftmaxCrossEntropyWithLogits.decodeText(reader, json);
  502. case 'SparseToDense': return $root.mindspore.schema.SparseToDense.decodeText(reader, json);
  503. case 'Split': return $root.mindspore.schema.Split.decodeText(reader, json);
  504. case 'Sqrt': return $root.mindspore.schema.Sqrt.decodeText(reader, json);
  505. case 'Squeeze': return $root.mindspore.schema.Squeeze.decodeText(reader, json);
  506. case 'Square': return $root.mindspore.schema.Square.decodeText(reader, json);
  507. case 'SquaredDifference': return $root.mindspore.schema.SquaredDifference.decodeText(reader, json);
  508. case 'Stack': return $root.mindspore.schema.Stack.decodeText(reader, json);
  509. case 'StridedSlice': return $root.mindspore.schema.StridedSlice.decodeText(reader, json);
  510. case 'SubFusion': return $root.mindspore.schema.SubFusion.decodeText(reader, json);
  511. case 'SubGrad': return $root.mindspore.schema.SubGrad.decodeText(reader, json);
  512. case 'Switch': return $root.mindspore.schema.Switch.decodeText(reader, json);
  513. case 'TensorListFromTensor': return $root.mindspore.schema.TensorListFromTensor.decodeText(reader, json);
  514. case 'TensorListGetItem': return $root.mindspore.schema.TensorListGetItem.decodeText(reader, json);
  515. case 'TensorListReserve': return $root.mindspore.schema.TensorListReserve.decodeText(reader, json);
  516. case 'TensorListSetItem': return $root.mindspore.schema.TensorListSetItem.decodeText(reader, json);
  517. case 'TensorListStack': return $root.mindspore.schema.TensorListStack.decodeText(reader, json);
  518. case 'TileFusion': return $root.mindspore.schema.TileFusion.decodeText(reader, json);
  519. case 'TopKFusion': return $root.mindspore.schema.TopKFusion.decodeText(reader, json);
  520. case 'Transpose': return $root.mindspore.schema.Transpose.decodeText(reader, json);
  521. case 'Unique': return $root.mindspore.schema.Unique.decodeText(reader, json);
  522. case 'UnsortedSegmentSum': return $root.mindspore.schema.UnsortedSegmentSum.decodeText(reader, json);
  523. case 'Unsqueeze': return $root.mindspore.schema.Unsqueeze.decodeText(reader, json);
  524. case 'Unstack': return $root.mindspore.schema.Unstack.decodeText(reader, json);
  525. case 'While': return $root.mindspore.schema.While.decodeText(reader, json);
  526. case 'Where': return $root.mindspore.schema.Where.decodeText(reader, json);
  527. case 'ZerosLike': return $root.mindspore.schema.ZerosLike.decodeText(reader, json);
  528. case 'Select': return $root.mindspore.schema.Select.decodeText(reader, json);
  529. case 'If': return $root.mindspore.schema.If.decodeText(reader, json);
  530. case 'GRU': return $root.mindspore.schema.GRU.decodeText(reader, json);
  531. case 'NonZero': return $root.mindspore.schema.NonZero.decodeText(reader, json);
  532. case 'InvertPermutation': return $root.mindspore.schema.InvertPermutation.decodeText(reader, json);
  533. case 'Size': return $root.mindspore.schema.Size.decodeText(reader, json);
  534. case 'RandomStandardNormal': return $root.mindspore.schema.RandomStandardNormal.decodeText(reader, json);
  535. case 'CropAndResize': return $root.mindspore.schema.CropAndResize.decodeText(reader, json);
  536. case 'Erf': return $root.mindspore.schema.Erf.decodeText(reader, json);
  537. case 'StridedSliceGrad': return $root.mindspore.schema.StridedSliceGrad.decodeText(reader, json);
  538. case 'IsFinite': return $root.mindspore.schema.IsFinite.decodeText(reader, json);
  539. case 'LinSpace': return $root.mindspore.schema.LinSpace.decodeText(reader, json);
  540. case 'UniformReal': return $root.mindspore.schema.UniformReal.decodeText(reader, json);
  541. case 'AbsGrad': return $root.mindspore.schema.AbsGrad.decodeText(reader, json);
  542. case 'RsqrtGrad': return $root.mindspore.schema.RsqrtGrad.decodeText(reader, json);
  543. case 'SqrtGrad': return $root.mindspore.schema.SqrtGrad.decodeText(reader, json);
  544. case 'LayerNormGrad': return $root.mindspore.schema.LayerNormGrad.decodeText(reader, json);
  545. case 'ResizeGrad': return $root.mindspore.schema.ResizeGrad.decodeText(reader, json);
  546. case 'Splice': return $root.mindspore.schema.Splice.decodeText(reader, json);
  547. case 'LogSoftmax': return $root.mindspore.schema.LogSoftmax.decodeText(reader, json);
  548. case 'Call': return $root.mindspore.schema.Call.decodeText(reader, json);
  549. case 'Custom': return $root.mindspore.schema.Custom.decodeText(reader, json);
  550. case 'CumSum': return $root.mindspore.schema.CumSum.decodeText(reader, json);
  551. case 'SplitWithOverlap': return $root.mindspore.schema.SplitWithOverlap.decodeText(reader, json);
  552. case 'GenOP': return $root.mindspore.schema.GenOP.decodeText(reader, json);
  553. case 'RaggedRange': return $root.mindspore.schema.RaggedRange.decodeText(reader, json);
  554. case 'GLU': return $root.mindspore.schema.GLU.decodeText(reader, json);
  555. case 'TensorArray': return $root.mindspore.schema.TensorArray.decodeText(reader, json);
  556. case 'TensorArrayRead': return $root.mindspore.schema.TensorArrayRead.decodeText(reader, json);
  557. case 'TensorArrayWrite': return $root.mindspore.schema.TensorArrayWrite.decodeText(reader, json);
  558. case 'Affine': return $root.mindspore.schema.Affine.decodeText(reader, json);
  559. case 'Attention': return $root.mindspore.schema.Attention.decodeText(reader, json);
  560. case 'LSTMGrad': return $root.mindspore.schema.LSTMGrad.decodeText(reader, json);
  561. case 'ScatterNdUpdate': return $root.mindspore.schema.ScatterNdUpdate.decodeText(reader, json);
  562. }
  563. return undefined;
  564. }
  565. };
  566. $root.mindspore.schema.Abs = class Abs {
  567. static decode(/* reader, position */) {
  568. const $ = new $root.mindspore.schema.Abs();
  569. return $;
  570. }
  571. static decodeText(/* reader, json */) {
  572. const $ = new $root.mindspore.schema.Abs();
  573. return $;
  574. }
  575. };
  576. $root.mindspore.schema.Activation = class Activation {
  577. static decode(reader, position) {
  578. const $ = new $root.mindspore.schema.Activation();
  579. $.activation_type = reader.int8_(position, 4, 0);
  580. $.alpha = reader.float32_(position, 6, 0);
  581. $.min_val = reader.float32_(position, 8, 0);
  582. $.max_val = reader.float32_(position, 10, 0);
  583. $.approximate = reader.bool_(position, 12, false);
  584. return $;
  585. }
  586. static decodeText(reader, json) {
  587. const $ = new $root.mindspore.schema.Activation();
  588. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  589. $.alpha = reader.value(json.alpha, 0);
  590. $.min_val = reader.value(json.min_val, 0);
  591. $.max_val = reader.value(json.max_val, 0);
  592. $.approximate = reader.value(json.approximate, false);
  593. return $;
  594. }
  595. };
  596. $root.mindspore.schema.ActivationGrad = class ActivationGrad {
  597. static decode(reader, position) {
  598. const $ = new $root.mindspore.schema.ActivationGrad();
  599. $.activation_type = reader.int8_(position, 4, 0);
  600. $.alpha = reader.float32_(position, 6, 0);
  601. return $;
  602. }
  603. static decodeText(reader, json) {
  604. const $ = new $root.mindspore.schema.ActivationGrad();
  605. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  606. $.alpha = reader.value(json.alpha, 0);
  607. return $;
  608. }
  609. };
  610. $root.mindspore.schema.Adam = class Adam {
  611. static decode(reader, position) {
  612. const $ = new $root.mindspore.schema.Adam();
  613. $.use_locking = reader.bool_(position, 4, false);
  614. $.use_nesterov = reader.bool_(position, 6, false);
  615. return $;
  616. }
  617. static decodeText(reader, json) {
  618. const $ = new $root.mindspore.schema.Adam();
  619. $.use_locking = reader.value(json.use_locking, false);
  620. $.use_nesterov = reader.value(json.use_nesterov, false);
  621. return $;
  622. }
  623. };
  624. $root.mindspore.schema.AddFusion = class AddFusion {
  625. static decode(reader, position) {
  626. const $ = new $root.mindspore.schema.AddFusion();
  627. $.activation_type = reader.int8_(position, 4, 0);
  628. return $;
  629. }
  630. static decodeText(reader, json) {
  631. const $ = new $root.mindspore.schema.AddFusion();
  632. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  633. return $;
  634. }
  635. };
  636. $root.mindspore.schema.AdderFusion = class AdderFusion {
  637. static decode(reader, position) {
  638. const $ = new $root.mindspore.schema.AdderFusion();
  639. $.format = reader.int32_(position, 4, 0);
  640. $.kernel_size = reader.int64s_(position, 6);
  641. $.stride = reader.int64s_(position, 8);
  642. $.dilation = reader.int64s_(position, 10);
  643. $.pad_mode = reader.int8_(position, 12, 0);
  644. $.pad_list = reader.int64s_(position, 14);
  645. $.group = reader.int64_(position, 16, 0);
  646. $.in_channel = reader.int64_(position, 18, 0);
  647. $.out_channel = reader.int64_(position, 20, 0);
  648. $.activation_type = reader.int8_(position, 22, 0);
  649. return $;
  650. }
  651. static decodeText(reader, json) {
  652. const $ = new $root.mindspore.schema.AdderFusion();
  653. $.format = $root.mindspore.schema.Format[json.format];
  654. $.kernel_size = reader.array(json.kernel_size);
  655. $.stride = reader.array(json.stride);
  656. $.dilation = reader.array(json.dilation);
  657. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  658. $.pad_list = reader.array(json.pad_list);
  659. $.group = reader.value(json.group, 0);
  660. $.in_channel = reader.value(json.in_channel, 0);
  661. $.out_channel = reader.value(json.out_channel, 0);
  662. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  663. return $;
  664. }
  665. };
  666. $root.mindspore.schema.AddGrad = class AddGrad {
  667. static decode(/* reader, position */) {
  668. const $ = new $root.mindspore.schema.AddGrad();
  669. return $;
  670. }
  671. static decodeText(/* reader, json */) {
  672. const $ = new $root.mindspore.schema.AddGrad();
  673. return $;
  674. }
  675. };
  676. $root.mindspore.schema.AddN = class AddN {
  677. static decode(/* reader, position */) {
  678. const $ = new $root.mindspore.schema.AddN();
  679. return $;
  680. }
  681. static decodeText(/* reader, json */) {
  682. const $ = new $root.mindspore.schema.AddN();
  683. return $;
  684. }
  685. };
  686. $root.mindspore.schema.All = class All {
  687. static decode(reader, position) {
  688. const $ = new $root.mindspore.schema.All();
  689. $.keep_dims = reader.int64_(position, 4, 0);
  690. return $;
  691. }
  692. static decodeText(reader, json) {
  693. const $ = new $root.mindspore.schema.All();
  694. $.keep_dims = reader.value(json.keep_dims, 0);
  695. return $;
  696. }
  697. };
  698. $root.mindspore.schema.ApplyMomentum = class ApplyMomentum {
  699. static decode(reader, position) {
  700. const $ = new $root.mindspore.schema.ApplyMomentum();
  701. $.use_nesterov = reader.bool_(position, 4, false);
  702. $.use_locking = reader.bool_(position, 6, false);
  703. $.gradient_scale = reader.float32_(position, 8, 0);
  704. return $;
  705. }
  706. static decodeText(reader, json) {
  707. const $ = new $root.mindspore.schema.ApplyMomentum();
  708. $.use_nesterov = reader.value(json.use_nesterov, false);
  709. $.use_locking = reader.value(json.use_locking, false);
  710. $.gradient_scale = reader.value(json.gradient_scale, 0);
  711. return $;
  712. }
  713. };
  714. $root.mindspore.schema.ArgMaxFusion = class ArgMaxFusion {
  715. static decode(reader, position) {
  716. const $ = new $root.mindspore.schema.ArgMaxFusion();
  717. $.axis = reader.int64_(position, 4, 0);
  718. $.top_k = reader.int64_(position, 6, 1);
  719. $.keep_dims = reader.bool_(position, 8, false);
  720. $.out_max_value = reader.bool_(position, 10, false);
  721. return $;
  722. }
  723. static decodeText(reader, json) {
  724. const $ = new $root.mindspore.schema.ArgMaxFusion();
  725. $.axis = reader.value(json.axis, 0);
  726. $.top_k = reader.value(json.top_k, 1);
  727. $.keep_dims = reader.value(json.keep_dims, false);
  728. $.out_max_value = reader.value(json.out_max_value, false);
  729. return $;
  730. }
  731. };
  732. $root.mindspore.schema.ArgMinFusion = class ArgMinFusion {
  733. static decode(reader, position) {
  734. const $ = new $root.mindspore.schema.ArgMinFusion();
  735. $.axis = reader.int64_(position, 4, 0);
  736. $.top_k = reader.int64_(position, 6, 0);
  737. $.keep_dims = reader.bool_(position, 8, false);
  738. $.out_max_value = reader.bool_(position, 10, false);
  739. return $;
  740. }
  741. static decodeText(reader, json) {
  742. const $ = new $root.mindspore.schema.ArgMinFusion();
  743. $.axis = reader.value(json.axis, 0);
  744. $.top_k = reader.value(json.top_k, 0);
  745. $.keep_dims = reader.value(json.keep_dims, false);
  746. $.out_max_value = reader.value(json.out_max_value, false);
  747. return $;
  748. }
  749. };
  750. $root.mindspore.schema.Assert = class Assert {
  751. static decode(reader, position) {
  752. const $ = new $root.mindspore.schema.Assert();
  753. $.summarize = reader.int64_(position, 4, 0);
  754. return $;
  755. }
  756. static decodeText(reader, json) {
  757. const $ = new $root.mindspore.schema.Assert();
  758. $.summarize = reader.value(json.summarize, 0);
  759. return $;
  760. }
  761. };
  762. $root.mindspore.schema.Assign = class Assign {
  763. static decode(/* reader, position */) {
  764. const $ = new $root.mindspore.schema.Assign();
  765. return $;
  766. }
  767. static decodeText(/* reader, json */) {
  768. const $ = new $root.mindspore.schema.Assign();
  769. return $;
  770. }
  771. };
  772. $root.mindspore.schema.AssignAdd = class AssignAdd {
  773. static decode(/* reader, position */) {
  774. const $ = new $root.mindspore.schema.AssignAdd();
  775. return $;
  776. }
  777. static decodeText(/* reader, json */) {
  778. const $ = new $root.mindspore.schema.AssignAdd();
  779. return $;
  780. }
  781. };
  782. $root.mindspore.schema.AudioSpectrogram = class AudioSpectrogram {
  783. static decode(reader, position) {
  784. const $ = new $root.mindspore.schema.AudioSpectrogram();
  785. $.window_size = reader.int64_(position, 4, 0);
  786. $.stride = reader.int64_(position, 6, 0);
  787. $.mag_square = reader.bool_(position, 8, false);
  788. return $;
  789. }
  790. static decodeText(reader, json) {
  791. const $ = new $root.mindspore.schema.AudioSpectrogram();
  792. $.window_size = reader.value(json.window_size, 0);
  793. $.stride = reader.value(json.stride, 0);
  794. $.mag_square = reader.value(json.mag_square, false);
  795. return $;
  796. }
  797. };
  798. $root.mindspore.schema.AvgPoolFusion = class AvgPoolFusion {
  799. static decode(reader, position) {
  800. const $ = new $root.mindspore.schema.AvgPoolFusion();
  801. $.kernel_size = reader.int64s_(position, 4);
  802. $.strides = reader.int64s_(position, 6);
  803. $.pad = reader.int64s_(position, 8);
  804. $.pad_mode = reader.int8_(position, 10, 0);
  805. $.round_mode = reader.int8_(position, 12, 0);
  806. $.format = reader.int32_(position, 14, 0);
  807. $.global = reader.bool_(position, 16, false);
  808. $.activation_type = reader.int8_(position, 18, 0);
  809. return $;
  810. }
  811. static decodeText(reader, json) {
  812. const $ = new $root.mindspore.schema.AvgPoolFusion();
  813. $.kernel_size = reader.array(json.kernel_size);
  814. $.strides = reader.array(json.strides);
  815. $.pad = reader.array(json.pad);
  816. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  817. $.round_mode = $root.mindspore.schema.RoundMode[json.round_mode];
  818. $.format = $root.mindspore.schema.Format[json.format];
  819. $.global = reader.value(json.global, false);
  820. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  821. return $;
  822. }
  823. };
  824. $root.mindspore.schema.AvgPoolGrad = class AvgPoolGrad {
  825. static decode(reader, position) {
  826. const $ = new $root.mindspore.schema.AvgPoolGrad();
  827. $.kernel_size = reader.int64s_(position, 4);
  828. $.strides = reader.int64s_(position, 6);
  829. $.pad_mode = reader.int8_(position, 8, 0);
  830. $.format = reader.int32_(position, 10, 0);
  831. return $;
  832. }
  833. static decodeText(reader, json) {
  834. const $ = new $root.mindspore.schema.AvgPoolGrad();
  835. $.kernel_size = reader.array(json.kernel_size);
  836. $.strides = reader.array(json.strides);
  837. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  838. $.format = $root.mindspore.schema.Format[json.format];
  839. return $;
  840. }
  841. };
  842. $root.mindspore.schema.BatchNorm = class BatchNorm {
  843. static decode(reader, position) {
  844. const $ = new $root.mindspore.schema.BatchNorm();
  845. $.epsilon = reader.float32_(position, 4, 0);
  846. $.format = reader.int32_(position, 6, 0);
  847. $.is_training = reader.bool_(position, 8, false);
  848. return $;
  849. }
  850. static decodeText(reader, json) {
  851. const $ = new $root.mindspore.schema.BatchNorm();
  852. $.epsilon = reader.value(json.epsilon, 0);
  853. $.format = $root.mindspore.schema.Format[json.format];
  854. $.is_training = reader.value(json.is_training, false);
  855. return $;
  856. }
  857. };
  858. $root.mindspore.schema.BatchNormGrad = class BatchNormGrad {
  859. static decode(reader, position) {
  860. const $ = new $root.mindspore.schema.BatchNormGrad();
  861. $.epsilon = reader.float32_(position, 4, 0);
  862. return $;
  863. }
  864. static decodeText(reader, json) {
  865. const $ = new $root.mindspore.schema.BatchNormGrad();
  866. $.epsilon = reader.value(json.epsilon, 0);
  867. return $;
  868. }
  869. };
  870. $root.mindspore.schema.BatchToSpace = class BatchToSpace {
  871. static decode(reader, position) {
  872. const $ = new $root.mindspore.schema.BatchToSpace();
  873. $.block_size = reader.int64s_(position, 4);
  874. $.crops = reader.table(position, 6, $root.mindspore.schema.Vec2D.decode);
  875. return $;
  876. }
  877. static decodeText(reader, json) {
  878. const $ = new $root.mindspore.schema.BatchToSpace();
  879. $.block_size = reader.array(json.block_size);
  880. $.crops = reader.object(json.crops, $root.mindspore.schema.Vec2D.decodeText);
  881. return $;
  882. }
  883. };
  884. $root.mindspore.schema.BatchToSpaceND = class BatchToSpaceND {
  885. static decode(reader, position) {
  886. const $ = new $root.mindspore.schema.BatchToSpaceND();
  887. $.block_shape = reader.int64s_(position, 4);
  888. $.crops = reader.table(position, 6, $root.mindspore.schema.Vec2D.decode);
  889. return $;
  890. }
  891. static decodeText(reader, json) {
  892. const $ = new $root.mindspore.schema.BatchToSpaceND();
  893. $.block_shape = reader.array(json.block_shape);
  894. $.crops = reader.object(json.crops, $root.mindspore.schema.Vec2D.decodeText);
  895. return $;
  896. }
  897. };
  898. $root.mindspore.schema.BiasAdd = class BiasAdd {
  899. static decode(reader, position) {
  900. const $ = new $root.mindspore.schema.BiasAdd();
  901. $.format = reader.int32_(position, 4, 0);
  902. return $;
  903. }
  904. static decodeText(reader, json) {
  905. const $ = new $root.mindspore.schema.BiasAdd();
  906. $.format = $root.mindspore.schema.Format[json.format];
  907. return $;
  908. }
  909. };
  910. $root.mindspore.schema.BinaryCrossEntropy = class BinaryCrossEntropy {
  911. static decode(reader, position) {
  912. const $ = new $root.mindspore.schema.BinaryCrossEntropy();
  913. $.reduction = reader.int8_(position, 4, 0);
  914. return $;
  915. }
  916. static decodeText(reader, json) {
  917. const $ = new $root.mindspore.schema.BinaryCrossEntropy();
  918. $.reduction = $root.mindspore.schema.Reduction[json.reduction];
  919. return $;
  920. }
  921. };
  922. $root.mindspore.schema.BinaryCrossEntropyGrad = class BinaryCrossEntropyGrad {
  923. static decode(reader, position) {
  924. const $ = new $root.mindspore.schema.BinaryCrossEntropyGrad();
  925. $.reduction = reader.int8_(position, 4, 1);
  926. return $;
  927. }
  928. static decodeText(reader, json) {
  929. const $ = new $root.mindspore.schema.BinaryCrossEntropyGrad();
  930. $.reduction = $root.mindspore.schema.Reduction[json.reduction];
  931. return $;
  932. }
  933. };
  934. $root.mindspore.schema.BiasAddGrad = class BiasAddGrad {
  935. static decode(/* reader, position */) {
  936. const $ = new $root.mindspore.schema.BiasAddGrad();
  937. return $;
  938. }
  939. static decodeText(/* reader, json */) {
  940. const $ = new $root.mindspore.schema.BiasAddGrad();
  941. return $;
  942. }
  943. };
  944. $root.mindspore.schema.BroadcastTo = class BroadcastTo {
  945. static decode(reader, position) {
  946. const $ = new $root.mindspore.schema.BroadcastTo();
  947. $.shape = reader.int64s_(position, 4);
  948. return $;
  949. }
  950. static decodeText(reader, json) {
  951. const $ = new $root.mindspore.schema.BroadcastTo();
  952. $.shape = reader.array(json.shape);
  953. return $;
  954. }
  955. };
  956. $root.mindspore.schema.Cast = class Cast {
  957. static decode(/* reader, position */) {
  958. const $ = new $root.mindspore.schema.Cast();
  959. return $;
  960. }
  961. static decodeText(/* reader, json */) {
  962. const $ = new $root.mindspore.schema.Cast();
  963. return $;
  964. }
  965. };
  966. $root.mindspore.schema.Ceil = class Ceil {
  967. static decode(/* reader, position */) {
  968. const $ = new $root.mindspore.schema.Ceil();
  969. return $;
  970. }
  971. static decodeText(/* reader, json */) {
  972. const $ = new $root.mindspore.schema.Ceil();
  973. return $;
  974. }
  975. };
  976. $root.mindspore.schema.Clip = class Clip {
  977. static decode(reader, position) {
  978. const $ = new $root.mindspore.schema.Clip();
  979. $.max = reader.float32_(position, 4, 0);
  980. $.min = reader.float32_(position, 6, 0);
  981. return $;
  982. }
  983. static decodeText(reader, json) {
  984. const $ = new $root.mindspore.schema.Clip();
  985. $.max = reader.value(json.max, 0);
  986. $.min = reader.value(json.min, 0);
  987. return $;
  988. }
  989. };
  990. $root.mindspore.schema.Concat = class Concat {
  991. static decode(reader, position) {
  992. const $ = new $root.mindspore.schema.Concat();
  993. $.axis = reader.int64_(position, 4, 0);
  994. return $;
  995. }
  996. static decodeText(reader, json) {
  997. const $ = new $root.mindspore.schema.Concat();
  998. $.axis = reader.value(json.axis, 0);
  999. return $;
  1000. }
  1001. };
  1002. $root.mindspore.schema.ControlDepend = class ControlDepend {
  1003. static decode(reader, position) {
  1004. const $ = new $root.mindspore.schema.ControlDepend();
  1005. $.depend_mode = reader.int64_(position, 4, 0);
  1006. return $;
  1007. }
  1008. static decodeText(reader, json) {
  1009. const $ = new $root.mindspore.schema.ControlDepend();
  1010. $.depend_mode = reader.value(json.depend_mode, 0);
  1011. return $;
  1012. }
  1013. };
  1014. $root.mindspore.schema.Conv2DBackpropFilterFusion = class Conv2DBackpropFilterFusion {
  1015. static decode(reader, position) {
  1016. const $ = new $root.mindspore.schema.Conv2DBackpropFilterFusion();
  1017. $.format = reader.int32_(position, 4, 0);
  1018. $.kernel_size = reader.int64s_(position, 6);
  1019. $.stride = reader.int64s_(position, 8);
  1020. $.dilation = reader.int64s_(position, 10);
  1021. $.pad_mode = reader.int8_(position, 12, 0);
  1022. $.pad_list = reader.int64s_(position, 14);
  1023. $.mode = reader.int64_(position, 16, 0);
  1024. $.group = reader.int64_(position, 18, 0);
  1025. $.in_channel = reader.int64_(position, 20, 0);
  1026. $.out_channel = reader.int64_(position, 22, 0);
  1027. $.activation_type = reader.int8_(position, 24, 0);
  1028. return $;
  1029. }
  1030. static decodeText(reader, json) {
  1031. const $ = new $root.mindspore.schema.Conv2DBackpropFilterFusion();
  1032. $.format = $root.mindspore.schema.Format[json.format];
  1033. $.kernel_size = reader.array(json.kernel_size);
  1034. $.stride = reader.array(json.stride);
  1035. $.dilation = reader.array(json.dilation);
  1036. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1037. $.pad_list = reader.array(json.pad_list);
  1038. $.mode = reader.value(json.mode, 0);
  1039. $.group = reader.value(json.group, 0);
  1040. $.in_channel = reader.value(json.in_channel, 0);
  1041. $.out_channel = reader.value(json.out_channel, 0);
  1042. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1043. return $;
  1044. }
  1045. };
  1046. $root.mindspore.schema.Conv2DBackpropInputFusion = class Conv2DBackpropInputFusion {
  1047. static decode(reader, position) {
  1048. const $ = new $root.mindspore.schema.Conv2DBackpropInputFusion();
  1049. $.format = reader.int32_(position, 4, 0);
  1050. $.kernel_size = reader.int64s_(position, 6);
  1051. $.stride = reader.int64s_(position, 8);
  1052. $.dilation = reader.int64s_(position, 10);
  1053. $.pad_mode = reader.int8_(position, 12, 0);
  1054. $.pad = reader.int64s_(position, 14);
  1055. $.pad_list = reader.int64s_(position, 16);
  1056. $.mode = reader.int64_(position, 18, 0);
  1057. $.group = reader.int64_(position, 20, 0);
  1058. $.in_channel = reader.int64_(position, 22, 0);
  1059. $.out_channel = reader.int64_(position, 24, 0);
  1060. $.activation_type = reader.int8_(position, 26, 0);
  1061. return $;
  1062. }
  1063. static decodeText(reader, json) {
  1064. const $ = new $root.mindspore.schema.Conv2DBackpropInputFusion();
  1065. $.format = $root.mindspore.schema.Format[json.format];
  1066. $.kernel_size = reader.array(json.kernel_size);
  1067. $.stride = reader.array(json.stride);
  1068. $.dilation = reader.array(json.dilation);
  1069. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1070. $.pad = reader.array(json.pad);
  1071. $.pad_list = reader.array(json.pad_list);
  1072. $.mode = reader.value(json.mode, 0);
  1073. $.group = reader.value(json.group, 0);
  1074. $.in_channel = reader.value(json.in_channel, 0);
  1075. $.out_channel = reader.value(json.out_channel, 0);
  1076. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1077. return $;
  1078. }
  1079. };
  1080. $root.mindspore.schema.Conv2DFusion = class Conv2DFusion {
  1081. static decode(reader, position) {
  1082. const $ = new $root.mindspore.schema.Conv2DFusion();
  1083. $.format = reader.int32_(position, 4, 0);
  1084. $.kernel_size = reader.int64s_(position, 6);
  1085. $.stride = reader.int64s_(position, 8);
  1086. $.dilation = reader.int64s_(position, 10);
  1087. $.pad_mode = reader.int8_(position, 12, 0);
  1088. $.pad_list = reader.int64s_(position, 14);
  1089. $.mode = reader.int64_(position, 16, 0);
  1090. $.group = reader.int64_(position, 18, 0);
  1091. $.in_channel = reader.int64_(position, 20, 0);
  1092. $.out_channel = reader.int64_(position, 22, 0);
  1093. $.activation_type = reader.int8_(position, 24, 0);
  1094. return $;
  1095. }
  1096. static decodeText(reader, json) {
  1097. const $ = new $root.mindspore.schema.Conv2DFusion();
  1098. $.format = $root.mindspore.schema.Format[json.format];
  1099. $.kernel_size = reader.array(json.kernel_size);
  1100. $.stride = reader.array(json.stride);
  1101. $.dilation = reader.array(json.dilation);
  1102. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1103. $.pad_list = reader.array(json.pad_list);
  1104. $.mode = reader.value(json.mode, 0);
  1105. $.group = reader.value(json.group, 0);
  1106. $.in_channel = reader.value(json.in_channel, 0);
  1107. $.out_channel = reader.value(json.out_channel, 0);
  1108. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1109. return $;
  1110. }
  1111. };
  1112. $root.mindspore.schema.Conv2dTransposeFusion = class Conv2dTransposeFusion {
  1113. static decode(reader, position) {
  1114. const $ = new $root.mindspore.schema.Conv2dTransposeFusion();
  1115. $.format = reader.int32_(position, 4, 0);
  1116. $.kernel_size = reader.int64s_(position, 6);
  1117. $.stride = reader.int64s_(position, 8);
  1118. $.dilation = reader.int64s_(position, 10);
  1119. $.pad_mode = reader.int8_(position, 12, 0);
  1120. $.pad = reader.int64s_(position, 14);
  1121. $.pad_list = reader.int64s_(position, 16);
  1122. $.mode = reader.int64_(position, 18, 0);
  1123. $.group = reader.int64_(position, 20, 0);
  1124. $.in_channel = reader.int64_(position, 22, 0);
  1125. $.out_channel = reader.int64_(position, 24, 0);
  1126. $.activation_type = reader.int8_(position, 26, 0);
  1127. $.output_paddings = reader.int64s_(position, 28);
  1128. return $;
  1129. }
  1130. static decodeText(reader, json) {
  1131. const $ = new $root.mindspore.schema.Conv2dTransposeFusion();
  1132. $.format = $root.mindspore.schema.Format[json.format];
  1133. $.kernel_size = reader.array(json.kernel_size);
  1134. $.stride = reader.array(json.stride);
  1135. $.dilation = reader.array(json.dilation);
  1136. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1137. $.pad = reader.array(json.pad);
  1138. $.pad_list = reader.array(json.pad_list);
  1139. $.mode = reader.value(json.mode, 0);
  1140. $.group = reader.value(json.group, 0);
  1141. $.in_channel = reader.value(json.in_channel, 0);
  1142. $.out_channel = reader.value(json.out_channel, 0);
  1143. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1144. $.output_paddings = reader.array(json.output_paddings);
  1145. return $;
  1146. }
  1147. };
  1148. $root.mindspore.schema.Cos = class Cos {
  1149. static decode(/* reader, position */) {
  1150. const $ = new $root.mindspore.schema.Cos();
  1151. return $;
  1152. }
  1153. static decodeText(/* reader, json */) {
  1154. const $ = new $root.mindspore.schema.Cos();
  1155. return $;
  1156. }
  1157. };
  1158. $root.mindspore.schema.ConstantOfShape = class ConstantOfShape {
  1159. static decode(reader, position) {
  1160. const $ = new $root.mindspore.schema.ConstantOfShape();
  1161. $.data_type = reader.int64_(position, 4, 0);
  1162. $.value = reader.typedArray(position, 6, Float32Array);
  1163. return $;
  1164. }
  1165. static decodeText(reader, json) {
  1166. const $ = new $root.mindspore.schema.ConstantOfShape();
  1167. $.data_type = reader.value(json.data_type, 0);
  1168. $.value = reader.typedArray(json.value, Float32Array);
  1169. return $;
  1170. }
  1171. };
  1172. $root.mindspore.schema.Crop = class Crop {
  1173. static decode(reader, position) {
  1174. const $ = new $root.mindspore.schema.Crop();
  1175. $.axis = reader.int64_(position, 4, 0);
  1176. $.offsets = reader.int64s_(position, 6);
  1177. return $;
  1178. }
  1179. static decodeText(reader, json) {
  1180. const $ = new $root.mindspore.schema.Crop();
  1181. $.axis = reader.value(json.axis, 0);
  1182. $.offsets = reader.array(json.offsets);
  1183. return $;
  1184. }
  1185. };
  1186. $root.mindspore.schema.CustomExtractFeatures = class CustomExtractFeatures {
  1187. static decode(/* reader, position */) {
  1188. const $ = new $root.mindspore.schema.CustomExtractFeatures();
  1189. return $;
  1190. }
  1191. static decodeText(/* reader, json */) {
  1192. const $ = new $root.mindspore.schema.CustomExtractFeatures();
  1193. return $;
  1194. }
  1195. };
  1196. $root.mindspore.schema.CustomNormalize = class CustomNormalize {
  1197. static decode(/* reader, position */) {
  1198. const $ = new $root.mindspore.schema.CustomNormalize();
  1199. return $;
  1200. }
  1201. static decodeText(/* reader, json */) {
  1202. const $ = new $root.mindspore.schema.CustomNormalize();
  1203. return $;
  1204. }
  1205. };
  1206. $root.mindspore.schema.CustomPredict = class CustomPredict {
  1207. static decode(reader, position) {
  1208. const $ = new $root.mindspore.schema.CustomPredict();
  1209. $.output_num = reader.int64_(position, 4, 0);
  1210. $.weight_threshold = reader.float32_(position, 6, 0);
  1211. return $;
  1212. }
  1213. static decodeText(reader, json) {
  1214. const $ = new $root.mindspore.schema.CustomPredict();
  1215. $.output_num = reader.value(json.output_num, 0);
  1216. $.weight_threshold = reader.value(json.weight_threshold, 0);
  1217. return $;
  1218. }
  1219. };
  1220. $root.mindspore.schema.DeConv2DGradFilter = class DeConv2DGradFilter {
  1221. static decode(reader, position) {
  1222. const $ = new $root.mindspore.schema.DeConv2DGradFilter();
  1223. $.in_channel = reader.int64_(position, 4, 0);
  1224. $.out_channel = reader.int64_(position, 6, 0);
  1225. $.kernel_size = reader.int64s_(position, 8);
  1226. $.pad_mode = reader.int8_(position, 10, 0);
  1227. $.pad_list = reader.int64s_(position, 12);
  1228. $.stride = reader.int64s_(position, 14);
  1229. $.dilation = reader.int64s_(position, 16);
  1230. $.group = reader.int64_(position, 18, 0);
  1231. $.format = reader.int32_(position, 20, 0);
  1232. $.activation_type = reader.int8_(position, 22, 0);
  1233. return $;
  1234. }
  1235. static decodeText(reader, json) {
  1236. const $ = new $root.mindspore.schema.DeConv2DGradFilter();
  1237. $.in_channel = reader.value(json.in_channel, 0);
  1238. $.out_channel = reader.value(json.out_channel, 0);
  1239. $.kernel_size = reader.array(json.kernel_size);
  1240. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1241. $.pad_list = reader.array(json.pad_list);
  1242. $.stride = reader.array(json.stride);
  1243. $.dilation = reader.array(json.dilation);
  1244. $.group = reader.value(json.group, 0);
  1245. $.format = $root.mindspore.schema.Format[json.format];
  1246. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1247. return $;
  1248. }
  1249. };
  1250. $root.mindspore.schema.Depend = class Depend {
  1251. static decode(/* reader, position */) {
  1252. const $ = new $root.mindspore.schema.Depend();
  1253. return $;
  1254. }
  1255. static decodeText(/* reader, json */) {
  1256. const $ = new $root.mindspore.schema.Depend();
  1257. return $;
  1258. }
  1259. };
  1260. $root.mindspore.schema.DepthToSpace = class DepthToSpace {
  1261. static decode(reader, position) {
  1262. const $ = new $root.mindspore.schema.DepthToSpace();
  1263. $.block_size = reader.int64_(position, 4, 0);
  1264. $.format = reader.int32_(position, 6, 0);
  1265. return $;
  1266. }
  1267. static decodeText(reader, json) {
  1268. const $ = new $root.mindspore.schema.DepthToSpace();
  1269. $.block_size = reader.value(json.block_size, 0);
  1270. $.format = $root.mindspore.schema.Format[json.format];
  1271. return $;
  1272. }
  1273. };
  1274. $root.mindspore.schema.DetectionPostProcess = class DetectionPostProcess {
  1275. static decode(reader, position) {
  1276. const $ = new $root.mindspore.schema.DetectionPostProcess();
  1277. $.format = reader.int32_(position, 4, 0);
  1278. $.input_size = reader.int64_(position, 6, 0);
  1279. $.scale = reader.typedArray(position, 8, Float32Array);
  1280. $.nms_iou_threshold = reader.float32_(position, 10, 0);
  1281. $.nms_score_threshold = reader.float32_(position, 12, 0);
  1282. $.max_detections = reader.int64_(position, 14, 0);
  1283. $.detections_per_class = reader.int64_(position, 16, 0);
  1284. $.max_classes_per_detection = reader.int64_(position, 18, 0);
  1285. $.num_classes = reader.int64_(position, 20, 0);
  1286. $.use_regular_nms = reader.bool_(position, 22, false);
  1287. $.out_quantized = reader.bool_(position, 24, false);
  1288. return $;
  1289. }
  1290. static decodeText(reader, json) {
  1291. const $ = new $root.mindspore.schema.DetectionPostProcess();
  1292. $.format = $root.mindspore.schema.Format[json.format];
  1293. $.input_size = reader.value(json.input_size, 0);
  1294. $.scale = reader.typedArray(json.scale, Float32Array);
  1295. $.nms_iou_threshold = reader.value(json.nms_iou_threshold, 0);
  1296. $.nms_score_threshold = reader.value(json.nms_score_threshold, 0);
  1297. $.max_detections = reader.value(json.max_detections, 0);
  1298. $.detections_per_class = reader.value(json.detections_per_class, 0);
  1299. $.max_classes_per_detection = reader.value(json.max_classes_per_detection, 0);
  1300. $.num_classes = reader.value(json.num_classes, 0);
  1301. $.use_regular_nms = reader.value(json.use_regular_nms, false);
  1302. $.out_quantized = reader.value(json.out_quantized, false);
  1303. return $;
  1304. }
  1305. };
  1306. $root.mindspore.schema.DivFusion = class DivFusion {
  1307. static decode(reader, position) {
  1308. const $ = new $root.mindspore.schema.DivFusion();
  1309. $.activation_type = reader.int8_(position, 4, 0);
  1310. return $;
  1311. }
  1312. static decodeText(reader, json) {
  1313. const $ = new $root.mindspore.schema.DivFusion();
  1314. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1315. return $;
  1316. }
  1317. };
  1318. $root.mindspore.schema.DivGrad = class DivGrad {
  1319. static decode(/* reader, position */) {
  1320. const $ = new $root.mindspore.schema.DivGrad();
  1321. return $;
  1322. }
  1323. static decodeText(/* reader, json */) {
  1324. const $ = new $root.mindspore.schema.DivGrad();
  1325. return $;
  1326. }
  1327. };
  1328. $root.mindspore.schema.Dropout = class Dropout {
  1329. static decode(reader, position) {
  1330. const $ = new $root.mindspore.schema.Dropout();
  1331. $.keep_prob = reader.float32_(position, 4, 0.5);
  1332. return $;
  1333. }
  1334. static decodeText(reader, json) {
  1335. const $ = new $root.mindspore.schema.Dropout();
  1336. $.keep_prob = reader.value(json.keep_prob, 0.5);
  1337. return $;
  1338. }
  1339. };
  1340. $root.mindspore.schema.DropoutGrad = class DropoutGrad {
  1341. static decode(reader, position) {
  1342. const $ = new $root.mindspore.schema.DropoutGrad();
  1343. $.keep_prob = reader.float32_(position, 4, 0);
  1344. return $;
  1345. }
  1346. static decodeText(reader, json) {
  1347. const $ = new $root.mindspore.schema.DropoutGrad();
  1348. $.keep_prob = reader.value(json.keep_prob, 0);
  1349. return $;
  1350. }
  1351. };
  1352. $root.mindspore.schema.Elu = class Elu {
  1353. static decode(reader, position) {
  1354. const $ = new $root.mindspore.schema.Elu();
  1355. $.alpha = reader.float32_(position, 4, 0);
  1356. return $;
  1357. }
  1358. static decodeText(reader, json) {
  1359. const $ = new $root.mindspore.schema.Elu();
  1360. $.alpha = reader.value(json.alpha, 0);
  1361. return $;
  1362. }
  1363. };
  1364. $root.mindspore.schema.Eltwise = class Eltwise {
  1365. static decode(reader, position) {
  1366. const $ = new $root.mindspore.schema.Eltwise();
  1367. $.mode = reader.int8_(position, 4, 0);
  1368. return $;
  1369. }
  1370. static decodeText(reader, json) {
  1371. const $ = new $root.mindspore.schema.Eltwise();
  1372. $.mode = $root.mindspore.schema.EltwiseMode[json.mode];
  1373. return $;
  1374. }
  1375. };
  1376. $root.mindspore.schema.Equal = class Equal {
  1377. static decode(/* reader, position */) {
  1378. const $ = new $root.mindspore.schema.Equal();
  1379. return $;
  1380. }
  1381. static decodeText(/* reader, json */) {
  1382. const $ = new $root.mindspore.schema.Equal();
  1383. return $;
  1384. }
  1385. };
  1386. $root.mindspore.schema.EmbeddingLookupFusion = class EmbeddingLookupFusion {
  1387. static decode(reader, position) {
  1388. const $ = new $root.mindspore.schema.EmbeddingLookupFusion();
  1389. $.max_norm = reader.float32_(position, 4, 0);
  1390. return $;
  1391. }
  1392. static decodeText(reader, json) {
  1393. const $ = new $root.mindspore.schema.EmbeddingLookupFusion();
  1394. $.max_norm = reader.value(json.max_norm, 0);
  1395. return $;
  1396. }
  1397. };
  1398. $root.mindspore.schema.ExpFusion = class ExpFusion {
  1399. static decode(reader, position) {
  1400. const $ = new $root.mindspore.schema.ExpFusion();
  1401. $.base = reader.float32_(position, 4, -1);
  1402. $.scale = reader.float32_(position, 6, 1);
  1403. $.shift = reader.float32_(position, 8, 0);
  1404. return $;
  1405. }
  1406. static decodeText(reader, json) {
  1407. const $ = new $root.mindspore.schema.ExpFusion();
  1408. $.base = reader.value(json.base, -1);
  1409. $.scale = reader.value(json.scale, 1);
  1410. $.shift = reader.value(json.shift, 0);
  1411. return $;
  1412. }
  1413. };
  1414. $root.mindspore.schema.ExpandDims = class ExpandDims {
  1415. static decode(/* reader, position */) {
  1416. const $ = new $root.mindspore.schema.ExpandDims();
  1417. return $;
  1418. }
  1419. static decodeText(/* reader, json */) {
  1420. const $ = new $root.mindspore.schema.ExpandDims();
  1421. return $;
  1422. }
  1423. };
  1424. $root.mindspore.schema.FakeQuantWithMinMaxVars = class FakeQuantWithMinMaxVars {
  1425. static decode(reader, position) {
  1426. const $ = new $root.mindspore.schema.FakeQuantWithMinMaxVars();
  1427. $.num_bits = reader.int64_(position, 4, 0);
  1428. $.narrow_range = reader.bool_(position, 6, false);
  1429. return $;
  1430. }
  1431. static decodeText(reader, json) {
  1432. const $ = new $root.mindspore.schema.FakeQuantWithMinMaxVars();
  1433. $.num_bits = reader.value(json.num_bits, 0);
  1434. $.narrow_range = reader.value(json.narrow_range, false);
  1435. return $;
  1436. }
  1437. };
  1438. $root.mindspore.schema.FakeQuantWithMinMaxVarsPerChannel = class FakeQuantWithMinMaxVarsPerChannel {
  1439. static decode(reader, position) {
  1440. const $ = new $root.mindspore.schema.FakeQuantWithMinMaxVarsPerChannel();
  1441. $.num_bits = reader.int64_(position, 4, 0);
  1442. $.narrow_range = reader.bool_(position, 6, false);
  1443. return $;
  1444. }
  1445. static decodeText(reader, json) {
  1446. const $ = new $root.mindspore.schema.FakeQuantWithMinMaxVarsPerChannel();
  1447. $.num_bits = reader.value(json.num_bits, 0);
  1448. $.narrow_range = reader.value(json.narrow_range, false);
  1449. return $;
  1450. }
  1451. };
  1452. $root.mindspore.schema.FftReal = class FftReal {
  1453. static decode(/* reader, position */) {
  1454. const $ = new $root.mindspore.schema.FftReal();
  1455. return $;
  1456. }
  1457. static decodeText(/* reader, json */) {
  1458. const $ = new $root.mindspore.schema.FftReal();
  1459. return $;
  1460. }
  1461. };
  1462. $root.mindspore.schema.FftImag = class FftImag {
  1463. static decode(/* reader, position */) {
  1464. const $ = new $root.mindspore.schema.FftImag();
  1465. return $;
  1466. }
  1467. static decodeText(/* reader, json */) {
  1468. const $ = new $root.mindspore.schema.FftImag();
  1469. return $;
  1470. }
  1471. };
  1472. $root.mindspore.schema.Flatten = class Flatten {
  1473. static decode(/* reader, position */) {
  1474. const $ = new $root.mindspore.schema.Flatten();
  1475. return $;
  1476. }
  1477. static decodeText(/* reader, json */) {
  1478. const $ = new $root.mindspore.schema.Flatten();
  1479. return $;
  1480. }
  1481. };
  1482. $root.mindspore.schema.FlattenGrad = class FlattenGrad {
  1483. static decode(/* reader, position */) {
  1484. const $ = new $root.mindspore.schema.FlattenGrad();
  1485. return $;
  1486. }
  1487. static decodeText(/* reader, json */) {
  1488. const $ = new $root.mindspore.schema.FlattenGrad();
  1489. return $;
  1490. }
  1491. };
  1492. $root.mindspore.schema.Floor = class Floor {
  1493. static decode(/* reader, position */) {
  1494. const $ = new $root.mindspore.schema.Floor();
  1495. return $;
  1496. }
  1497. static decodeText(/* reader, json */) {
  1498. const $ = new $root.mindspore.schema.Floor();
  1499. return $;
  1500. }
  1501. };
  1502. $root.mindspore.schema.FloorDiv = class FloorDiv {
  1503. static decode(/* reader, position */) {
  1504. const $ = new $root.mindspore.schema.FloorDiv();
  1505. return $;
  1506. }
  1507. static decodeText(/* reader, json */) {
  1508. const $ = new $root.mindspore.schema.FloorDiv();
  1509. return $;
  1510. }
  1511. };
  1512. $root.mindspore.schema.FloorMod = class FloorMod {
  1513. static decode(/* reader, position */) {
  1514. const $ = new $root.mindspore.schema.FloorMod();
  1515. return $;
  1516. }
  1517. static decodeText(/* reader, json */) {
  1518. const $ = new $root.mindspore.schema.FloorMod();
  1519. return $;
  1520. }
  1521. };
  1522. $root.mindspore.schema.Fill = class Fill {
  1523. static decode(/* reader, position */) {
  1524. const $ = new $root.mindspore.schema.Fill();
  1525. return $;
  1526. }
  1527. static decodeText(/* reader, json */) {
  1528. const $ = new $root.mindspore.schema.Fill();
  1529. return $;
  1530. }
  1531. };
  1532. $root.mindspore.schema.FullConnection = class FullConnection {
  1533. static decode(reader, position) {
  1534. const $ = new $root.mindspore.schema.FullConnection();
  1535. $.has_bias = reader.bool_(position, 4, false);
  1536. $.use_axis = reader.bool_(position, 6, false);
  1537. $.axis = reader.int64_(position, 8, 0);
  1538. $.activation_type = reader.int8_(position, 10, 0);
  1539. return $;
  1540. }
  1541. static decodeText(reader, json) {
  1542. const $ = new $root.mindspore.schema.FullConnection();
  1543. $.has_bias = reader.value(json.has_bias, false);
  1544. $.use_axis = reader.value(json.use_axis, false);
  1545. $.axis = reader.value(json.axis, 0);
  1546. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1547. return $;
  1548. }
  1549. };
  1550. $root.mindspore.schema.FusedBatchNorm = class FusedBatchNorm {
  1551. static decode(reader, position) {
  1552. const $ = new $root.mindspore.schema.FusedBatchNorm();
  1553. $.epsilon = reader.float32_(position, 4, 0.0001);
  1554. $.momentum = reader.float32_(position, 6, 0.9);
  1555. $.mode = reader.int64_(position, 8, 0);
  1556. return $;
  1557. }
  1558. static decodeText(reader, json) {
  1559. const $ = new $root.mindspore.schema.FusedBatchNorm();
  1560. $.epsilon = reader.value(json.epsilon, 0.0001);
  1561. $.momentum = reader.value(json.momentum, 0.9);
  1562. $.mode = reader.value(json.mode, 0);
  1563. return $;
  1564. }
  1565. };
  1566. $root.mindspore.schema.Gather = class Gather {
  1567. static decode(/* reader, position */) {
  1568. const $ = new $root.mindspore.schema.Gather();
  1569. return $;
  1570. }
  1571. static decodeText(/* reader, json */) {
  1572. const $ = new $root.mindspore.schema.Gather();
  1573. return $;
  1574. }
  1575. };
  1576. $root.mindspore.schema.GatherNd = class GatherNd {
  1577. static decode(/* reader, position */) {
  1578. const $ = new $root.mindspore.schema.GatherNd();
  1579. return $;
  1580. }
  1581. static decodeText(/* reader, json */) {
  1582. const $ = new $root.mindspore.schema.GatherNd();
  1583. return $;
  1584. }
  1585. };
  1586. $root.mindspore.schema.Greater = class Greater {
  1587. static decode(/* reader, position */) {
  1588. const $ = new $root.mindspore.schema.Greater();
  1589. return $;
  1590. }
  1591. static decodeText(/* reader, json */) {
  1592. const $ = new $root.mindspore.schema.Greater();
  1593. return $;
  1594. }
  1595. };
  1596. $root.mindspore.schema.GreaterEqual = class GreaterEqual {
  1597. static decode(/* reader, position */) {
  1598. const $ = new $root.mindspore.schema.GreaterEqual();
  1599. return $;
  1600. }
  1601. static decodeText(/* reader, json */) {
  1602. const $ = new $root.mindspore.schema.GreaterEqual();
  1603. return $;
  1604. }
  1605. };
  1606. $root.mindspore.schema.HashtableLookup = class HashtableLookup {
  1607. static decode(/* reader, position */) {
  1608. const $ = new $root.mindspore.schema.HashtableLookup();
  1609. return $;
  1610. }
  1611. static decodeText(/* reader, json */) {
  1612. const $ = new $root.mindspore.schema.HashtableLookup();
  1613. return $;
  1614. }
  1615. };
  1616. $root.mindspore.schema.InstanceNorm = class InstanceNorm {
  1617. static decode(reader, position) {
  1618. const $ = new $root.mindspore.schema.InstanceNorm();
  1619. $.epsilon = reader.float32_(position, 4, 0);
  1620. return $;
  1621. }
  1622. static decodeText(reader, json) {
  1623. const $ = new $root.mindspore.schema.InstanceNorm();
  1624. $.epsilon = reader.value(json.epsilon, 0);
  1625. return $;
  1626. }
  1627. };
  1628. $root.mindspore.schema.LayerNormFusion = class LayerNormFusion {
  1629. static decode(reader, position) {
  1630. const $ = new $root.mindspore.schema.LayerNormFusion();
  1631. $.begin_norm_axis = reader.int64_(position, 4, 0);
  1632. $.epsilon = reader.float32_(position, 6, 0.00001);
  1633. $.elementwise_affine = reader.bool_(position, 8, false);
  1634. $.begin_params_axis = reader.int64_(position, 10, 0);
  1635. return $;
  1636. }
  1637. static decodeText(reader, json) {
  1638. const $ = new $root.mindspore.schema.LayerNormFusion();
  1639. $.begin_norm_axis = reader.value(json.begin_norm_axis, 0);
  1640. $.epsilon = reader.value(json.epsilon, 0.00001);
  1641. $.elementwise_affine = reader.value(json.elementwise_affine, false);
  1642. $.begin_params_axis = reader.value(json.begin_params_axis, 0);
  1643. return $;
  1644. }
  1645. };
  1646. $root.mindspore.schema.LeakyRelu = class LeakyRelu {
  1647. static decode(reader, position) {
  1648. const $ = new $root.mindspore.schema.LeakyRelu();
  1649. $.negative_slope = reader.float32_(position, 4, 0);
  1650. return $;
  1651. }
  1652. static decodeText(reader, json) {
  1653. const $ = new $root.mindspore.schema.LeakyRelu();
  1654. $.negative_slope = reader.value(json.negative_slope, 0);
  1655. return $;
  1656. }
  1657. };
  1658. $root.mindspore.schema.Less = class Less {
  1659. static decode(/* reader, position */) {
  1660. const $ = new $root.mindspore.schema.Less();
  1661. return $;
  1662. }
  1663. static decodeText(/* reader, json */) {
  1664. const $ = new $root.mindspore.schema.Less();
  1665. return $;
  1666. }
  1667. };
  1668. $root.mindspore.schema.LessEqual = class LessEqual {
  1669. static decode(/* reader, position */) {
  1670. const $ = new $root.mindspore.schema.LessEqual();
  1671. return $;
  1672. }
  1673. static decodeText(/* reader, json */) {
  1674. const $ = new $root.mindspore.schema.LessEqual();
  1675. return $;
  1676. }
  1677. };
  1678. $root.mindspore.schema.Log = class Log {
  1679. static decode(/* reader, position */) {
  1680. const $ = new $root.mindspore.schema.Log();
  1681. return $;
  1682. }
  1683. static decodeText(/* reader, json */) {
  1684. const $ = new $root.mindspore.schema.Log();
  1685. return $;
  1686. }
  1687. };
  1688. $root.mindspore.schema.LogGrad = class LogGrad {
  1689. static decode(/* reader, position */) {
  1690. const $ = new $root.mindspore.schema.LogGrad();
  1691. return $;
  1692. }
  1693. static decodeText(/* reader, json */) {
  1694. const $ = new $root.mindspore.schema.LogGrad();
  1695. return $;
  1696. }
  1697. };
  1698. $root.mindspore.schema.LogicalAnd = class LogicalAnd {
  1699. static decode(/* reader, position */) {
  1700. const $ = new $root.mindspore.schema.LogicalAnd();
  1701. return $;
  1702. }
  1703. static decodeText(/* reader, json */) {
  1704. const $ = new $root.mindspore.schema.LogicalAnd();
  1705. return $;
  1706. }
  1707. };
  1708. $root.mindspore.schema.LogicalNot = class LogicalNot {
  1709. static decode(/* reader, position */) {
  1710. const $ = new $root.mindspore.schema.LogicalNot();
  1711. return $;
  1712. }
  1713. static decodeText(/* reader, json */) {
  1714. const $ = new $root.mindspore.schema.LogicalNot();
  1715. return $;
  1716. }
  1717. };
  1718. $root.mindspore.schema.LogicalOr = class LogicalOr {
  1719. static decode(/* reader, position */) {
  1720. const $ = new $root.mindspore.schema.LogicalOr();
  1721. return $;
  1722. }
  1723. static decodeText(/* reader, json */) {
  1724. const $ = new $root.mindspore.schema.LogicalOr();
  1725. return $;
  1726. }
  1727. };
  1728. $root.mindspore.schema.LpNormalization = class LpNormalization {
  1729. static decode(reader, position) {
  1730. const $ = new $root.mindspore.schema.LpNormalization();
  1731. $.axis = reader.int64_(position, 4, 0);
  1732. $.p = reader.int64_(position, 6, 0);
  1733. return $;
  1734. }
  1735. static decodeText(reader, json) {
  1736. const $ = new $root.mindspore.schema.LpNormalization();
  1737. $.axis = reader.value(json.axis, 0);
  1738. $.p = reader.value(json.p, 0);
  1739. return $;
  1740. }
  1741. };
  1742. $root.mindspore.schema.LRN = class LRN {
  1743. static decode(reader, position) {
  1744. const $ = new $root.mindspore.schema.LRN();
  1745. $.depth_radius = reader.int64_(position, 4, 0);
  1746. $.bias = reader.float32_(position, 6, 0);
  1747. $.alpha = reader.float32_(position, 8, 0);
  1748. $.beta = reader.float32_(position, 10, 0);
  1749. $.norm_region = reader.string_(position, 12, null);
  1750. return $;
  1751. }
  1752. static decodeText(reader, json) {
  1753. const $ = new $root.mindspore.schema.LRN();
  1754. $.depth_radius = reader.value(json.depth_radius, 0);
  1755. $.bias = reader.value(json.bias, 0);
  1756. $.alpha = reader.value(json.alpha, 0);
  1757. $.beta = reader.value(json.beta, 0);
  1758. $.norm_region = reader.value(json.norm_region, null);
  1759. return $;
  1760. }
  1761. };
  1762. $root.mindspore.schema.LshProjection = class LshProjection {
  1763. static decode(reader, position) {
  1764. const $ = new $root.mindspore.schema.LshProjection();
  1765. $.type = reader.int8_(position, 4, 0);
  1766. return $;
  1767. }
  1768. static decodeText(reader, json) {
  1769. const $ = new $root.mindspore.schema.LshProjection();
  1770. $.type = $root.mindspore.schema.LshProjectionType[json.type];
  1771. return $;
  1772. }
  1773. };
  1774. $root.mindspore.schema.LSTM = class LSTM {
  1775. static decode(reader, position) {
  1776. const $ = new $root.mindspore.schema.LSTM();
  1777. $.bidirectional = reader.bool_(position, 4, false);
  1778. $.has_bias = reader.bool_(position, 6, false);
  1779. $.input_size = reader.int64_(position, 8, 0);
  1780. $.hidden_size = reader.int64_(position, 10, 0);
  1781. $.num_layers = reader.int64_(position, 12, 0);
  1782. $.num_directions = reader.int64_(position, 14, 0);
  1783. $.dropout = reader.float32_(position, 16, 0);
  1784. $.zoneout_cell = reader.float32_(position, 18, 0);
  1785. $.zoneout_hidden = reader.float32_(position, 20, 0);
  1786. return $;
  1787. }
  1788. static decodeText(reader, json) {
  1789. const $ = new $root.mindspore.schema.LSTM();
  1790. $.bidirectional = reader.value(json.bidirectional, false);
  1791. $.has_bias = reader.value(json.has_bias, false);
  1792. $.input_size = reader.value(json.input_size, 0);
  1793. $.hidden_size = reader.value(json.hidden_size, 0);
  1794. $.num_layers = reader.value(json.num_layers, 0);
  1795. $.num_directions = reader.value(json.num_directions, 0);
  1796. $.dropout = reader.value(json.dropout, 0);
  1797. $.zoneout_cell = reader.value(json.zoneout_cell, 0);
  1798. $.zoneout_hidden = reader.value(json.zoneout_hidden, 0);
  1799. return $;
  1800. }
  1801. };
  1802. $root.mindspore.schema.LSTMGrad = class LSTMGrad {
  1803. static decode(reader, position) {
  1804. const $ = new $root.mindspore.schema.LSTMGrad();
  1805. $.bidirectional = reader.bool_(position, 4, false);
  1806. $.has_bias = reader.bool_(position, 6, false);
  1807. $.input_size = reader.int64_(position, 8, 0);
  1808. $.hidden_size = reader.int64_(position, 10, 0);
  1809. $.num_layers = reader.int64_(position, 12, 0);
  1810. $.num_directions = reader.int64_(position, 14, 0);
  1811. $.dropout = reader.float32_(position, 16, 0);
  1812. $.zoneout_cell = reader.float32_(position, 18, 0);
  1813. $.zoneout_hidden = reader.float32_(position, 20, 0);
  1814. return $;
  1815. }
  1816. static decodeText(reader, json) {
  1817. const $ = new $root.mindspore.schema.LSTMGrad();
  1818. $.bidirectional = reader.value(json.bidirectional, false);
  1819. $.has_bias = reader.value(json.has_bias, false);
  1820. $.input_size = reader.value(json.input_size, 0);
  1821. $.hidden_size = reader.value(json.hidden_size, 0);
  1822. $.num_layers = reader.value(json.num_layers, 0);
  1823. $.num_directions = reader.value(json.num_directions, 0);
  1824. $.dropout = reader.value(json.dropout, 0);
  1825. $.zoneout_cell = reader.value(json.zoneout_cell, 0);
  1826. $.zoneout_hidden = reader.value(json.zoneout_hidden, 0);
  1827. return $;
  1828. }
  1829. };
  1830. $root.mindspore.schema.L2NormalizeFusion = class L2NormalizeFusion {
  1831. static decode(reader, position) {
  1832. const $ = new $root.mindspore.schema.L2NormalizeFusion();
  1833. $.axis = reader.int64s_(position, 4);
  1834. $.epsilon = reader.float32_(position, 6, 0);
  1835. $.activation_type = reader.int8_(position, 8, 0);
  1836. return $;
  1837. }
  1838. static decodeText(reader, json) {
  1839. const $ = new $root.mindspore.schema.L2NormalizeFusion();
  1840. $.axis = reader.array(json.axis);
  1841. $.epsilon = reader.value(json.epsilon, 0);
  1842. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1843. return $;
  1844. }
  1845. };
  1846. $root.mindspore.schema.MatMul = class MatMul {
  1847. static decode(reader, position) {
  1848. const $ = new $root.mindspore.schema.MatMul();
  1849. $.transpose_a = reader.bool_(position, 4, false);
  1850. $.transpose_b = reader.bool_(position, 6, false);
  1851. return $;
  1852. }
  1853. static decodeText(reader, json) {
  1854. const $ = new $root.mindspore.schema.MatMul();
  1855. $.transpose_a = reader.value(json.transpose_a, false);
  1856. $.transpose_b = reader.value(json.transpose_b, false);
  1857. return $;
  1858. }
  1859. };
  1860. $root.mindspore.schema.Maximum = class Maximum {
  1861. static decode(/* reader, position */) {
  1862. const $ = new $root.mindspore.schema.Maximum();
  1863. return $;
  1864. }
  1865. static decodeText(/* reader, json */) {
  1866. const $ = new $root.mindspore.schema.Maximum();
  1867. return $;
  1868. }
  1869. };
  1870. $root.mindspore.schema.MaximumGrad = class MaximumGrad {
  1871. static decode(reader, position) {
  1872. const $ = new $root.mindspore.schema.MaximumGrad();
  1873. $.grad_x = reader.bool_(position, 4, false);
  1874. $.grad_y = reader.bool_(position, 6, false);
  1875. return $;
  1876. }
  1877. static decodeText(reader, json) {
  1878. const $ = new $root.mindspore.schema.MaximumGrad();
  1879. $.grad_x = reader.value(json.grad_x, false);
  1880. $.grad_y = reader.value(json.grad_y, false);
  1881. return $;
  1882. }
  1883. };
  1884. $root.mindspore.schema.MaxPoolFusion = class MaxPoolFusion {
  1885. static decode(reader, position) {
  1886. const $ = new $root.mindspore.schema.MaxPoolFusion();
  1887. $.kernel_size = reader.int64s_(position, 4);
  1888. $.strides = reader.int64s_(position, 6);
  1889. $.pad = reader.int64s_(position, 8);
  1890. $.pad_mode = reader.int8_(position, 10, 0);
  1891. $.round_mode = reader.int8_(position, 12, 0);
  1892. $.format = reader.int32_(position, 14, 0);
  1893. $.global = reader.bool_(position, 16, false);
  1894. $.activation_type = reader.int8_(position, 18, 0);
  1895. return $;
  1896. }
  1897. static decodeText(reader, json) {
  1898. const $ = new $root.mindspore.schema.MaxPoolFusion();
  1899. $.kernel_size = reader.array(json.kernel_size);
  1900. $.strides = reader.array(json.strides);
  1901. $.pad = reader.array(json.pad);
  1902. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1903. $.round_mode = $root.mindspore.schema.RoundMode[json.round_mode];
  1904. $.format = $root.mindspore.schema.Format[json.format];
  1905. $.global = reader.value(json.global, false);
  1906. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1907. return $;
  1908. }
  1909. };
  1910. $root.mindspore.schema.MaxPoolGrad = class MaxPoolGrad {
  1911. static decode(reader, position) {
  1912. const $ = new $root.mindspore.schema.MaxPoolGrad();
  1913. $.kernel_size = reader.int64s_(position, 4);
  1914. $.strides = reader.int64s_(position, 6);
  1915. $.pad_mode = reader.int8_(position, 8, 0);
  1916. $.format = reader.int32_(position, 10, 0);
  1917. return $;
  1918. }
  1919. static decodeText(reader, json) {
  1920. const $ = new $root.mindspore.schema.MaxPoolGrad();
  1921. $.kernel_size = reader.array(json.kernel_size);
  1922. $.strides = reader.array(json.strides);
  1923. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  1924. $.format = $root.mindspore.schema.Format[json.format];
  1925. return $;
  1926. }
  1927. };
  1928. $root.mindspore.schema.Merge = class Merge {
  1929. static decode(/* reader, position */) {
  1930. const $ = new $root.mindspore.schema.Merge();
  1931. return $;
  1932. }
  1933. static decodeText(/* reader, json */) {
  1934. const $ = new $root.mindspore.schema.Merge();
  1935. return $;
  1936. }
  1937. };
  1938. $root.mindspore.schema.Mfcc = class Mfcc {
  1939. static decode(reader, position) {
  1940. const $ = new $root.mindspore.schema.Mfcc();
  1941. $.freq_upper_limit = reader.float32_(position, 4, 0);
  1942. $.freq_lower_limit = reader.float32_(position, 6, 0);
  1943. $.filter_bank_channel_num = reader.int64_(position, 8, 0);
  1944. $.dct_coeff_num = reader.int64_(position, 10, 0);
  1945. return $;
  1946. }
  1947. static decodeText(reader, json) {
  1948. const $ = new $root.mindspore.schema.Mfcc();
  1949. $.freq_upper_limit = reader.value(json.freq_upper_limit, 0);
  1950. $.freq_lower_limit = reader.value(json.freq_lower_limit, 0);
  1951. $.filter_bank_channel_num = reader.value(json.filter_bank_channel_num, 0);
  1952. $.dct_coeff_num = reader.value(json.dct_coeff_num, 0);
  1953. return $;
  1954. }
  1955. };
  1956. $root.mindspore.schema.Minimum = class Minimum {
  1957. static decode(/* reader, position */) {
  1958. const $ = new $root.mindspore.schema.Minimum();
  1959. return $;
  1960. }
  1961. static decodeText(/* reader, json */) {
  1962. const $ = new $root.mindspore.schema.Minimum();
  1963. return $;
  1964. }
  1965. };
  1966. $root.mindspore.schema.MinimumGrad = class MinimumGrad {
  1967. static decode(reader, position) {
  1968. const $ = new $root.mindspore.schema.MinimumGrad();
  1969. $.grad_x = reader.bool_(position, 4, false);
  1970. $.grad_y = reader.bool_(position, 6, false);
  1971. return $;
  1972. }
  1973. static decodeText(reader, json) {
  1974. const $ = new $root.mindspore.schema.MinimumGrad();
  1975. $.grad_x = reader.value(json.grad_x, false);
  1976. $.grad_y = reader.value(json.grad_y, false);
  1977. return $;
  1978. }
  1979. };
  1980. $root.mindspore.schema.Mod = class Mod {
  1981. static decode(/* reader, position */) {
  1982. const $ = new $root.mindspore.schema.Mod();
  1983. return $;
  1984. }
  1985. static decodeText(/* reader, json */) {
  1986. const $ = new $root.mindspore.schema.Mod();
  1987. return $;
  1988. }
  1989. };
  1990. $root.mindspore.schema.MulFusion = class MulFusion {
  1991. static decode(reader, position) {
  1992. const $ = new $root.mindspore.schema.MulFusion();
  1993. $.activation_type = reader.int8_(position, 4, 0);
  1994. return $;
  1995. }
  1996. static decodeText(reader, json) {
  1997. const $ = new $root.mindspore.schema.MulFusion();
  1998. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  1999. return $;
  2000. }
  2001. };
  2002. $root.mindspore.schema.MulGrad = class MulGrad {
  2003. static decode(/* reader, position */) {
  2004. const $ = new $root.mindspore.schema.MulGrad();
  2005. return $;
  2006. }
  2007. static decodeText(/* reader, json */) {
  2008. const $ = new $root.mindspore.schema.MulGrad();
  2009. return $;
  2010. }
  2011. };
  2012. $root.mindspore.schema.Neg = class Neg {
  2013. static decode(/* reader, position */) {
  2014. const $ = new $root.mindspore.schema.Neg();
  2015. return $;
  2016. }
  2017. static decodeText(/* reader, json */) {
  2018. const $ = new $root.mindspore.schema.Neg();
  2019. return $;
  2020. }
  2021. };
  2022. $root.mindspore.schema.NegGrad = class NegGrad {
  2023. static decode(/* reader, position */) {
  2024. const $ = new $root.mindspore.schema.NegGrad();
  2025. return $;
  2026. }
  2027. static decodeText(/* reader, json */) {
  2028. const $ = new $root.mindspore.schema.NegGrad();
  2029. return $;
  2030. }
  2031. };
  2032. $root.mindspore.schema.NotEqual = class NotEqual {
  2033. static decode(/* reader, position */) {
  2034. const $ = new $root.mindspore.schema.NotEqual();
  2035. return $;
  2036. }
  2037. static decodeText(/* reader, json */) {
  2038. const $ = new $root.mindspore.schema.NotEqual();
  2039. return $;
  2040. }
  2041. };
  2042. $root.mindspore.schema.NonMaxSuppression = class NonMaxSuppression {
  2043. static decode(reader, position) {
  2044. const $ = new $root.mindspore.schema.NonMaxSuppression();
  2045. $.center_point_box = reader.int64_(position, 4, 0);
  2046. return $;
  2047. }
  2048. static decodeText(reader, json) {
  2049. const $ = new $root.mindspore.schema.NonMaxSuppression();
  2050. $.center_point_box = reader.value(json.center_point_box, 0);
  2051. return $;
  2052. }
  2053. };
  2054. $root.mindspore.schema.OneHot = class OneHot {
  2055. static decode(reader, position) {
  2056. const $ = new $root.mindspore.schema.OneHot();
  2057. $.axis = reader.int64_(position, 4, 0);
  2058. return $;
  2059. }
  2060. static decodeText(reader, json) {
  2061. const $ = new $root.mindspore.schema.OneHot();
  2062. $.axis = reader.value(json.axis, 0);
  2063. return $;
  2064. }
  2065. };
  2066. $root.mindspore.schema.OnesLike = class OnesLike {
  2067. static decode(/* reader, position */) {
  2068. const $ = new $root.mindspore.schema.OnesLike();
  2069. return $;
  2070. }
  2071. static decodeText(/* reader, json */) {
  2072. const $ = new $root.mindspore.schema.OnesLike();
  2073. return $;
  2074. }
  2075. };
  2076. $root.mindspore.schema.PadFusion = class PadFusion {
  2077. static decode(reader, position) {
  2078. const $ = new $root.mindspore.schema.PadFusion();
  2079. $.paddings = reader.table(position, 4, $root.mindspore.schema.Vec2D.decode);
  2080. $.padding_mode = reader.int8_(position, 6, 0);
  2081. $.constant_value = reader.float32_(position, 8, 0);
  2082. return $;
  2083. }
  2084. static decodeText(reader, json) {
  2085. const $ = new $root.mindspore.schema.PadFusion();
  2086. $.paddings = reader.object(json.paddings, $root.mindspore.schema.Vec2D.decodeText);
  2087. $.padding_mode = $root.mindspore.schema.PaddingMode[json.padding_mode];
  2088. $.constant_value = reader.value(json.constant_value, 0);
  2089. return $;
  2090. }
  2091. };
  2092. $root.mindspore.schema.PartialFusion = class PartialFusion {
  2093. static decode(reader, position) {
  2094. const $ = new $root.mindspore.schema.PartialFusion();
  2095. $.sub_graph_index = reader.int64_(position, 4, 0);
  2096. return $;
  2097. }
  2098. static decodeText(reader, json) {
  2099. const $ = new $root.mindspore.schema.PartialFusion();
  2100. $.sub_graph_index = reader.value(json.sub_graph_index, 0);
  2101. return $;
  2102. }
  2103. };
  2104. $root.mindspore.schema.PowerGrad = class PowerGrad {
  2105. static decode(reader, position) {
  2106. const $ = new $root.mindspore.schema.PowerGrad();
  2107. $.power = reader.float32_(position, 4, 0);
  2108. $.scale = reader.float32_(position, 6, 0);
  2109. $.shift = reader.float32_(position, 8, 0);
  2110. return $;
  2111. }
  2112. static decodeText(reader, json) {
  2113. const $ = new $root.mindspore.schema.PowerGrad();
  2114. $.power = reader.value(json.power, 0);
  2115. $.scale = reader.value(json.scale, 0);
  2116. $.shift = reader.value(json.shift, 0);
  2117. return $;
  2118. }
  2119. };
  2120. $root.mindspore.schema.PowFusion = class PowFusion {
  2121. static decode(reader, position) {
  2122. const $ = new $root.mindspore.schema.PowFusion();
  2123. $.scale = reader.float32_(position, 4, 1);
  2124. $.shift = reader.float32_(position, 6, 0);
  2125. return $;
  2126. }
  2127. static decodeText(reader, json) {
  2128. const $ = new $root.mindspore.schema.PowFusion();
  2129. $.scale = reader.value(json.scale, 1);
  2130. $.shift = reader.value(json.shift, 0);
  2131. return $;
  2132. }
  2133. };
  2134. $root.mindspore.schema.PriorBox = class PriorBox {
  2135. static decode(reader, position) {
  2136. const $ = new $root.mindspore.schema.PriorBox();
  2137. $.min_sizes = reader.int64s_(position, 4);
  2138. $.max_sizes = reader.int64s_(position, 6);
  2139. $.aspect_ratios = reader.typedArray(position, 8, Float32Array);
  2140. $.variances = reader.typedArray(position, 10, Float32Array);
  2141. $.image_size_w = reader.int64_(position, 12, 0);
  2142. $.image_size_h = reader.int64_(position, 14, 0);
  2143. $.step_w = reader.float32_(position, 16, 0);
  2144. $.step_h = reader.float32_(position, 18, 0);
  2145. $.clip = reader.bool_(position, 20, false);
  2146. $.flip = reader.bool_(position, 22, false);
  2147. $.offset = reader.float32_(position, 24, 0);
  2148. return $;
  2149. }
  2150. static decodeText(reader, json) {
  2151. const $ = new $root.mindspore.schema.PriorBox();
  2152. $.min_sizes = reader.array(json.min_sizes);
  2153. $.max_sizes = reader.array(json.max_sizes);
  2154. $.aspect_ratios = reader.typedArray(json.aspect_ratios, Float32Array);
  2155. $.variances = reader.typedArray(json.variances, Float32Array);
  2156. $.image_size_w = reader.value(json.image_size_w, 0);
  2157. $.image_size_h = reader.value(json.image_size_h, 0);
  2158. $.step_w = reader.value(json.step_w, 0);
  2159. $.step_h = reader.value(json.step_h, 0);
  2160. $.clip = reader.value(json.clip, false);
  2161. $.flip = reader.value(json.flip, false);
  2162. $.offset = reader.value(json.offset, 0);
  2163. return $;
  2164. }
  2165. };
  2166. $root.mindspore.schema.PReLUFusion = class PReLUFusion {
  2167. static decode(reader, position) {
  2168. const $ = new $root.mindspore.schema.PReLUFusion();
  2169. $.channel_shared = reader.bool_(position, 4, false);
  2170. return $;
  2171. }
  2172. static decodeText(reader, json) {
  2173. const $ = new $root.mindspore.schema.PReLUFusion();
  2174. $.channel_shared = reader.value(json.channel_shared, false);
  2175. return $;
  2176. }
  2177. };
  2178. $root.mindspore.schema.Rank = class Rank {
  2179. static decode(/* reader, position */) {
  2180. const $ = new $root.mindspore.schema.Rank();
  2181. return $;
  2182. }
  2183. static decodeText(/* reader, json */) {
  2184. const $ = new $root.mindspore.schema.Rank();
  2185. return $;
  2186. }
  2187. };
  2188. $root.mindspore.schema.Range = class Range {
  2189. static decode(reader, position) {
  2190. const $ = new $root.mindspore.schema.Range();
  2191. $.d_type = reader.int64_(position, 4, 0);
  2192. $.start = reader.int64_(position, 6, 0);
  2193. $.limit = reader.int64_(position, 8, 0);
  2194. $.delta = reader.int64_(position, 10, 1);
  2195. return $;
  2196. }
  2197. static decodeText(reader, json) {
  2198. const $ = new $root.mindspore.schema.Range();
  2199. $.d_type = reader.value(json.d_type, 0);
  2200. $.start = reader.value(json.start, 0);
  2201. $.limit = reader.value(json.limit, 0);
  2202. $.delta = reader.value(json.delta, 1);
  2203. return $;
  2204. }
  2205. };
  2206. $root.mindspore.schema.Reciprocal = class Reciprocal {
  2207. static decode(/* reader, position */) {
  2208. const $ = new $root.mindspore.schema.Reciprocal();
  2209. return $;
  2210. }
  2211. static decodeText(/* reader, json */) {
  2212. const $ = new $root.mindspore.schema.Reciprocal();
  2213. return $;
  2214. }
  2215. };
  2216. $root.mindspore.schema.RealDiv = class RealDiv {
  2217. static decode(/* reader, position */) {
  2218. const $ = new $root.mindspore.schema.RealDiv();
  2219. return $;
  2220. }
  2221. static decodeText(/* reader, json */) {
  2222. const $ = new $root.mindspore.schema.RealDiv();
  2223. return $;
  2224. }
  2225. };
  2226. $root.mindspore.schema.ReduceFusion = class ReduceFusion {
  2227. static decode(reader, position) {
  2228. const $ = new $root.mindspore.schema.ReduceFusion();
  2229. $.keep_dims = reader.bool_(position, 4, false);
  2230. $.mode = reader.int8_(position, 6, 0);
  2231. $.reduce_to_end = reader.bool_(position, 8, false);
  2232. $.coeff = reader.float32_(position, 10, 0);
  2233. return $;
  2234. }
  2235. static decodeText(reader, json) {
  2236. const $ = new $root.mindspore.schema.ReduceFusion();
  2237. $.keep_dims = reader.value(json.keep_dims, false);
  2238. $.mode = $root.mindspore.schema.ReduceMode[json.mode];
  2239. $.reduce_to_end = reader.value(json.reduce_to_end, false);
  2240. $.coeff = reader.value(json.coeff, 0);
  2241. return $;
  2242. }
  2243. };
  2244. $root.mindspore.schema.Reshape = class Reshape {
  2245. static decode(/* reader, position */) {
  2246. const $ = new $root.mindspore.schema.Reshape();
  2247. return $;
  2248. }
  2249. static decodeText(/* reader, json */) {
  2250. const $ = new $root.mindspore.schema.Reshape();
  2251. return $;
  2252. }
  2253. };
  2254. $root.mindspore.schema.Resize = class Resize {
  2255. static decode(reader, position) {
  2256. const $ = new $root.mindspore.schema.Resize();
  2257. $.format = reader.int32_(position, 4, 0);
  2258. $.method = reader.int8_(position, 6, 0);
  2259. $.new_height = reader.int64_(position, 8, 0);
  2260. $.new_width = reader.int64_(position, 10, 0);
  2261. $.preserve_aspect_ratio = reader.bool_(position, 12, false);
  2262. $.coordinate_transform_mode = reader.int8_(position, 14, 0);
  2263. $.cubic_coeff = reader.float32_(position, 16, 0);
  2264. $.exclude_outside = reader.int64_(position, 18, 0);
  2265. $.extrapolation_value = reader.float32_(position, 20, 0);
  2266. $.nearest_mode = reader.int8_(position, 22, 0);
  2267. return $;
  2268. }
  2269. static decodeText(reader, json) {
  2270. const $ = new $root.mindspore.schema.Resize();
  2271. $.format = $root.mindspore.schema.Format[json.format];
  2272. $.method = $root.mindspore.schema.ResizeMethod[json.method];
  2273. $.new_height = reader.value(json.new_height, 0);
  2274. $.new_width = reader.value(json.new_width, 0);
  2275. $.preserve_aspect_ratio = reader.value(json.preserve_aspect_ratio, false);
  2276. $.coordinate_transform_mode = $root.mindspore.schema.CoordinateTransformMode[json.coordinate_transform_mode];
  2277. $.cubic_coeff = reader.value(json.cubic_coeff, 0);
  2278. $.exclude_outside = reader.value(json.exclude_outside, 0);
  2279. $.extrapolation_value = reader.value(json.extrapolation_value, 0);
  2280. $.nearest_mode = $root.mindspore.schema.NearestMode[json.nearest_mode];
  2281. return $;
  2282. }
  2283. };
  2284. $root.mindspore.schema.ReverseSequence = class ReverseSequence {
  2285. static decode(reader, position) {
  2286. const $ = new $root.mindspore.schema.ReverseSequence();
  2287. $.seq_dim = reader.int64_(position, 4, 0);
  2288. $.batch_dim = reader.int64_(position, 6, 0);
  2289. return $;
  2290. }
  2291. static decodeText(reader, json) {
  2292. const $ = new $root.mindspore.schema.ReverseSequence();
  2293. $.seq_dim = reader.value(json.seq_dim, 0);
  2294. $.batch_dim = reader.value(json.batch_dim, 0);
  2295. return $;
  2296. }
  2297. };
  2298. $root.mindspore.schema.ReverseV2 = class ReverseV2 {
  2299. static decode(reader, position) {
  2300. const $ = new $root.mindspore.schema.ReverseV2();
  2301. $.axis = reader.int64s_(position, 4);
  2302. return $;
  2303. }
  2304. static decodeText(reader, json) {
  2305. const $ = new $root.mindspore.schema.ReverseV2();
  2306. $.axis = reader.array(json.axis);
  2307. return $;
  2308. }
  2309. };
  2310. $root.mindspore.schema.Rfft = class Rfft {
  2311. static decode(reader, position) {
  2312. const $ = new $root.mindspore.schema.Rfft();
  2313. $.fft_length = reader.int64_(position, 4, 0);
  2314. return $;
  2315. }
  2316. static decodeText(reader, json) {
  2317. const $ = new $root.mindspore.schema.Rfft();
  2318. $.fft_length = reader.value(json.fft_length, 0);
  2319. return $;
  2320. }
  2321. };
  2322. $root.mindspore.schema.ROIPooling = class ROIPooling {
  2323. static decode(reader, position) {
  2324. const $ = new $root.mindspore.schema.ROIPooling();
  2325. $.pooled_h = reader.int64_(position, 4, 0);
  2326. $.pooled_w = reader.int64_(position, 6, 0);
  2327. $.scale = reader.float32_(position, 8, 0);
  2328. return $;
  2329. }
  2330. static decodeText(reader, json) {
  2331. const $ = new $root.mindspore.schema.ROIPooling();
  2332. $.pooled_h = reader.value(json.pooled_h, 0);
  2333. $.pooled_w = reader.value(json.pooled_w, 0);
  2334. $.scale = reader.value(json.scale, 0);
  2335. return $;
  2336. }
  2337. };
  2338. $root.mindspore.schema.Round = class Round {
  2339. static decode(/* reader, position */) {
  2340. const $ = new $root.mindspore.schema.Round();
  2341. return $;
  2342. }
  2343. static decodeText(/* reader, json */) {
  2344. const $ = new $root.mindspore.schema.Round();
  2345. return $;
  2346. }
  2347. };
  2348. $root.mindspore.schema.Rsqrt = class Rsqrt {
  2349. static decode(/* reader, position */) {
  2350. const $ = new $root.mindspore.schema.Rsqrt();
  2351. return $;
  2352. }
  2353. static decodeText(/* reader, json */) {
  2354. const $ = new $root.mindspore.schema.Rsqrt();
  2355. return $;
  2356. }
  2357. };
  2358. $root.mindspore.schema.QuantDTypeCast = class QuantDTypeCast {
  2359. static decode(reader, position) {
  2360. const $ = new $root.mindspore.schema.QuantDTypeCast();
  2361. $.src_t = reader.int64_(position, 4, 0);
  2362. $.dst_t = reader.int64_(position, 6, 0);
  2363. return $;
  2364. }
  2365. static decodeText(reader, json) {
  2366. const $ = new $root.mindspore.schema.QuantDTypeCast();
  2367. $.src_t = reader.value(json.src_t, 0);
  2368. $.dst_t = reader.value(json.dst_t, 0);
  2369. return $;
  2370. }
  2371. };
  2372. $root.mindspore.schema.ScaleFusion = class ScaleFusion {
  2373. static decode(reader, position) {
  2374. const $ = new $root.mindspore.schema.ScaleFusion();
  2375. $.axis = reader.int64_(position, 4, 0);
  2376. $.activation_type = reader.int8_(position, 6, 0);
  2377. return $;
  2378. }
  2379. static decodeText(reader, json) {
  2380. const $ = new $root.mindspore.schema.ScaleFusion();
  2381. $.axis = reader.value(json.axis, 0);
  2382. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  2383. return $;
  2384. }
  2385. };
  2386. $root.mindspore.schema.ScatterNd = class ScatterNd {
  2387. static decode(/* reader, position */) {
  2388. const $ = new $root.mindspore.schema.ScatterNd();
  2389. return $;
  2390. }
  2391. static decodeText(/* reader, json */) {
  2392. const $ = new $root.mindspore.schema.ScatterNd();
  2393. return $;
  2394. }
  2395. };
  2396. $root.mindspore.schema.SGD = class SGD {
  2397. static decode(reader, position) {
  2398. const $ = new $root.mindspore.schema.SGD();
  2399. $.nesterov = reader.bool_(position, 4, false);
  2400. $.dampening = reader.float32_(position, 6, 0);
  2401. $.weight_decay = reader.float32_(position, 8, 0);
  2402. return $;
  2403. }
  2404. static decodeText(reader, json) {
  2405. const $ = new $root.mindspore.schema.SGD();
  2406. $.nesterov = reader.value(json.nesterov, false);
  2407. $.dampening = reader.value(json.dampening, 0);
  2408. $.weight_decay = reader.value(json.weight_decay, 0);
  2409. return $;
  2410. }
  2411. };
  2412. $root.mindspore.schema.Shape = class Shape {
  2413. static decode(/* reader, position */) {
  2414. const $ = new $root.mindspore.schema.Shape();
  2415. return $;
  2416. }
  2417. static decodeText(/* reader, json */) {
  2418. const $ = new $root.mindspore.schema.Shape();
  2419. return $;
  2420. }
  2421. };
  2422. $root.mindspore.schema.SigmoidCrossEntropyWithLogits = class SigmoidCrossEntropyWithLogits {
  2423. static decode(/* reader, position */) {
  2424. const $ = new $root.mindspore.schema.SigmoidCrossEntropyWithLogits();
  2425. return $;
  2426. }
  2427. static decodeText(/* reader, json */) {
  2428. const $ = new $root.mindspore.schema.SigmoidCrossEntropyWithLogits();
  2429. return $;
  2430. }
  2431. };
  2432. $root.mindspore.schema.SigmoidCrossEntropyWithLogitsGrad = class SigmoidCrossEntropyWithLogitsGrad {
  2433. static decode(/* reader, position */) {
  2434. const $ = new $root.mindspore.schema.SigmoidCrossEntropyWithLogitsGrad();
  2435. return $;
  2436. }
  2437. static decodeText(/* reader, json */) {
  2438. const $ = new $root.mindspore.schema.SigmoidCrossEntropyWithLogitsGrad();
  2439. return $;
  2440. }
  2441. };
  2442. $root.mindspore.schema.Sin = class Sin {
  2443. static decode(/* reader, position */) {
  2444. const $ = new $root.mindspore.schema.Sin();
  2445. return $;
  2446. }
  2447. static decodeText(/* reader, json */) {
  2448. const $ = new $root.mindspore.schema.Sin();
  2449. return $;
  2450. }
  2451. };
  2452. $root.mindspore.schema.SkipGram = class SkipGram {
  2453. static decode(reader, position) {
  2454. const $ = new $root.mindspore.schema.SkipGram();
  2455. $.include_all_grams = reader.bool_(position, 4, false);
  2456. $.max_skip_size = reader.int64_(position, 6, 0);
  2457. $.ngram_size = reader.int64_(position, 8, 0);
  2458. return $;
  2459. }
  2460. static decodeText(reader, json) {
  2461. const $ = new $root.mindspore.schema.SkipGram();
  2462. $.include_all_grams = reader.value(json.include_all_grams, false);
  2463. $.max_skip_size = reader.value(json.max_skip_size, 0);
  2464. $.ngram_size = reader.value(json.ngram_size, 0);
  2465. return $;
  2466. }
  2467. };
  2468. $root.mindspore.schema.SliceFusion = class SliceFusion {
  2469. static decode(reader, position) {
  2470. const $ = new $root.mindspore.schema.SliceFusion();
  2471. $.axes = reader.int64s_(position, 4);
  2472. return $;
  2473. }
  2474. static decodeText(reader, json) {
  2475. const $ = new $root.mindspore.schema.SliceFusion();
  2476. $.axes = reader.array(json.axes);
  2477. return $;
  2478. }
  2479. };
  2480. $root.mindspore.schema.SmoothL1Loss = class SmoothL1Loss {
  2481. static decode(reader, position) {
  2482. const $ = new $root.mindspore.schema.SmoothL1Loss();
  2483. $.beta = reader.float32_(position, 4, 0);
  2484. return $;
  2485. }
  2486. static decodeText(reader, json) {
  2487. const $ = new $root.mindspore.schema.SmoothL1Loss();
  2488. $.beta = reader.value(json.beta, 0);
  2489. return $;
  2490. }
  2491. };
  2492. $root.mindspore.schema.SmoothL1LossGrad = class SmoothL1LossGrad {
  2493. static decode(reader, position) {
  2494. const $ = new $root.mindspore.schema.SmoothL1LossGrad();
  2495. $.beta = reader.float32_(position, 4, 0);
  2496. return $;
  2497. }
  2498. static decodeText(reader, json) {
  2499. const $ = new $root.mindspore.schema.SmoothL1LossGrad();
  2500. $.beta = reader.value(json.beta, 0);
  2501. return $;
  2502. }
  2503. };
  2504. $root.mindspore.schema.Softmax = class Softmax {
  2505. static decode(reader, position) {
  2506. const $ = new $root.mindspore.schema.Softmax();
  2507. $.axis = reader.int64s_(position, 4);
  2508. return $;
  2509. }
  2510. static decodeText(reader, json) {
  2511. const $ = new $root.mindspore.schema.Softmax();
  2512. $.axis = reader.array(json.axis);
  2513. return $;
  2514. }
  2515. };
  2516. $root.mindspore.schema.SoftmaxCrossEntropyWithLogits = class SoftmaxCrossEntropyWithLogits {
  2517. static decode(/* reader, position */) {
  2518. const $ = new $root.mindspore.schema.SoftmaxCrossEntropyWithLogits();
  2519. return $;
  2520. }
  2521. static decodeText(/* reader, json */) {
  2522. const $ = new $root.mindspore.schema.SoftmaxCrossEntropyWithLogits();
  2523. return $;
  2524. }
  2525. };
  2526. $root.mindspore.schema.SpaceToBatch = class SpaceToBatch {
  2527. static decode(reader, position) {
  2528. const $ = new $root.mindspore.schema.SpaceToBatch();
  2529. $.block_size = reader.int64s_(position, 4);
  2530. $.paddings = reader.table(position, 6, $root.mindspore.schema.Vec2D.decode);
  2531. return $;
  2532. }
  2533. static decodeText(reader, json) {
  2534. const $ = new $root.mindspore.schema.SpaceToBatch();
  2535. $.block_size = reader.array(json.block_size);
  2536. $.paddings = reader.object(json.paddings, $root.mindspore.schema.Vec2D.decodeText);
  2537. return $;
  2538. }
  2539. };
  2540. $root.mindspore.schema.SpaceToBatchND = class SpaceToBatchND {
  2541. static decode(reader, position) {
  2542. const $ = new $root.mindspore.schema.SpaceToBatchND();
  2543. $.block_shape = reader.int64s_(position, 4);
  2544. $.paddings = reader.table(position, 6, $root.mindspore.schema.Vec2D.decode);
  2545. return $;
  2546. }
  2547. static decodeText(reader, json) {
  2548. const $ = new $root.mindspore.schema.SpaceToBatchND();
  2549. $.block_shape = reader.array(json.block_shape);
  2550. $.paddings = reader.object(json.paddings, $root.mindspore.schema.Vec2D.decodeText);
  2551. return $;
  2552. }
  2553. };
  2554. $root.mindspore.schema.SpaceToDepth = class SpaceToDepth {
  2555. static decode(reader, position) {
  2556. const $ = new $root.mindspore.schema.SpaceToDepth();
  2557. $.block_size = reader.int64_(position, 4, 0);
  2558. $.format = reader.int32_(position, 6, 0);
  2559. return $;
  2560. }
  2561. static decodeText(reader, json) {
  2562. const $ = new $root.mindspore.schema.SpaceToDepth();
  2563. $.block_size = reader.value(json.block_size, 0);
  2564. $.format = $root.mindspore.schema.Format[json.format];
  2565. return $;
  2566. }
  2567. };
  2568. $root.mindspore.schema.SparseSoftmaxCrossEntropyWithLogits = class SparseSoftmaxCrossEntropyWithLogits {
  2569. static decode(reader, position) {
  2570. const $ = new $root.mindspore.schema.SparseSoftmaxCrossEntropyWithLogits();
  2571. $.is_grad = reader.bool_(position, 4, false);
  2572. return $;
  2573. }
  2574. static decodeText(reader, json) {
  2575. const $ = new $root.mindspore.schema.SparseSoftmaxCrossEntropyWithLogits();
  2576. $.is_grad = reader.value(json.is_grad, false);
  2577. return $;
  2578. }
  2579. };
  2580. $root.mindspore.schema.SparseToDense = class SparseToDense {
  2581. static decode(/* reader, position */) {
  2582. const $ = new $root.mindspore.schema.SparseToDense();
  2583. return $;
  2584. }
  2585. static decodeText(/* reader, json */) {
  2586. const $ = new $root.mindspore.schema.SparseToDense();
  2587. return $;
  2588. }
  2589. };
  2590. $root.mindspore.schema.Split = class Split {
  2591. static decode(reader, position) {
  2592. const $ = new $root.mindspore.schema.Split();
  2593. $.output_num = reader.int64_(position, 4, 0);
  2594. $.size_splits = reader.int64s_(position, 6);
  2595. $.axis = reader.int64_(position, 8, 0);
  2596. return $;
  2597. }
  2598. static decodeText(reader, json) {
  2599. const $ = new $root.mindspore.schema.Split();
  2600. $.output_num = reader.value(json.output_num, 0);
  2601. $.size_splits = reader.array(json.size_splits);
  2602. $.axis = reader.value(json.axis, 0);
  2603. return $;
  2604. }
  2605. };
  2606. $root.mindspore.schema.Sqrt = class Sqrt {
  2607. static decode(/* reader, position */) {
  2608. const $ = new $root.mindspore.schema.Sqrt();
  2609. return $;
  2610. }
  2611. static decodeText(/* reader, json */) {
  2612. const $ = new $root.mindspore.schema.Sqrt();
  2613. return $;
  2614. }
  2615. };
  2616. $root.mindspore.schema.Squeeze = class Squeeze {
  2617. static decode(reader, position) {
  2618. const $ = new $root.mindspore.schema.Squeeze();
  2619. $.axis = reader.int64s_(position, 4);
  2620. return $;
  2621. }
  2622. static decodeText(reader, json) {
  2623. const $ = new $root.mindspore.schema.Squeeze();
  2624. $.axis = reader.array(json.axis);
  2625. return $;
  2626. }
  2627. };
  2628. $root.mindspore.schema.Square = class Square {
  2629. static decode(/* reader, position */) {
  2630. const $ = new $root.mindspore.schema.Square();
  2631. return $;
  2632. }
  2633. static decodeText(/* reader, json */) {
  2634. const $ = new $root.mindspore.schema.Square();
  2635. return $;
  2636. }
  2637. };
  2638. $root.mindspore.schema.SquaredDifference = class SquaredDifference {
  2639. static decode(/* reader, position */) {
  2640. const $ = new $root.mindspore.schema.SquaredDifference();
  2641. return $;
  2642. }
  2643. static decodeText(/* reader, json */) {
  2644. const $ = new $root.mindspore.schema.SquaredDifference();
  2645. return $;
  2646. }
  2647. };
  2648. $root.mindspore.schema.Stack = class Stack {
  2649. static decode(reader, position) {
  2650. const $ = new $root.mindspore.schema.Stack();
  2651. $.axis = reader.int64_(position, 4, 0);
  2652. return $;
  2653. }
  2654. static decodeText(reader, json) {
  2655. const $ = new $root.mindspore.schema.Stack();
  2656. $.axis = reader.value(json.axis, 0);
  2657. return $;
  2658. }
  2659. };
  2660. $root.mindspore.schema.StridedSlice = class StridedSlice {
  2661. static decode(reader, position) {
  2662. const $ = new $root.mindspore.schema.StridedSlice();
  2663. $.begin_mask = reader.int64_(position, 4, 0);
  2664. $.end_mask = reader.int64_(position, 6, 0);
  2665. $.ellipsis_mask = reader.int64_(position, 8, 0);
  2666. $.new_axis_mask = reader.int64_(position, 10, 0);
  2667. $.shrink_axis_mask = reader.int64_(position, 12, 0);
  2668. return $;
  2669. }
  2670. static decodeText(reader, json) {
  2671. const $ = new $root.mindspore.schema.StridedSlice();
  2672. $.begin_mask = reader.value(json.begin_mask, 0);
  2673. $.end_mask = reader.value(json.end_mask, 0);
  2674. $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
  2675. $.new_axis_mask = reader.value(json.new_axis_mask, 0);
  2676. $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
  2677. return $;
  2678. }
  2679. };
  2680. $root.mindspore.schema.SubFusion = class SubFusion {
  2681. static decode(reader, position) {
  2682. const $ = new $root.mindspore.schema.SubFusion();
  2683. $.activation_type = reader.int8_(position, 4, 0);
  2684. return $;
  2685. }
  2686. static decodeText(reader, json) {
  2687. const $ = new $root.mindspore.schema.SubFusion();
  2688. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  2689. return $;
  2690. }
  2691. };
  2692. $root.mindspore.schema.SubGrad = class SubGrad {
  2693. static decode(/* reader, position */) {
  2694. const $ = new $root.mindspore.schema.SubGrad();
  2695. return $;
  2696. }
  2697. static decodeText(/* reader, json */) {
  2698. const $ = new $root.mindspore.schema.SubGrad();
  2699. return $;
  2700. }
  2701. };
  2702. $root.mindspore.schema.Switch = class Switch {
  2703. static decode(/* reader, position */) {
  2704. const $ = new $root.mindspore.schema.Switch();
  2705. return $;
  2706. }
  2707. static decodeText(/* reader, json */) {
  2708. const $ = new $root.mindspore.schema.Switch();
  2709. return $;
  2710. }
  2711. };
  2712. $root.mindspore.schema.TensorListFromTensor = class TensorListFromTensor {
  2713. static decode(reader, position) {
  2714. const $ = new $root.mindspore.schema.TensorListFromTensor();
  2715. $.element_dtype = reader.int64_(position, 4, 0);
  2716. $.shape_type = reader.int64_(position, 6, 0);
  2717. return $;
  2718. }
  2719. static decodeText(reader, json) {
  2720. const $ = new $root.mindspore.schema.TensorListFromTensor();
  2721. $.element_dtype = reader.value(json.element_dtype, 0);
  2722. $.shape_type = reader.value(json.shape_type, 0);
  2723. return $;
  2724. }
  2725. };
  2726. $root.mindspore.schema.TensorListGetItem = class TensorListGetItem {
  2727. static decode(reader, position) {
  2728. const $ = new $root.mindspore.schema.TensorListGetItem();
  2729. $.element_dtype = reader.int64_(position, 4, 0);
  2730. return $;
  2731. }
  2732. static decodeText(reader, json) {
  2733. const $ = new $root.mindspore.schema.TensorListGetItem();
  2734. $.element_dtype = reader.value(json.element_dtype, 0);
  2735. return $;
  2736. }
  2737. };
  2738. $root.mindspore.schema.TensorListReserve = class TensorListReserve {
  2739. static decode(reader, position) {
  2740. const $ = new $root.mindspore.schema.TensorListReserve();
  2741. $.element_dtype = reader.int64_(position, 4, 0);
  2742. $.shape_type = reader.int64_(position, 6, 0);
  2743. return $;
  2744. }
  2745. static decodeText(reader, json) {
  2746. const $ = new $root.mindspore.schema.TensorListReserve();
  2747. $.element_dtype = reader.value(json.element_dtype, 0);
  2748. $.shape_type = reader.value(json.shape_type, 0);
  2749. return $;
  2750. }
  2751. };
  2752. $root.mindspore.schema.TensorListSetItem = class TensorListSetItem {
  2753. static decode(reader, position) {
  2754. const $ = new $root.mindspore.schema.TensorListSetItem();
  2755. $.element_dtype = reader.int64_(position, 4, 0);
  2756. return $;
  2757. }
  2758. static decodeText(reader, json) {
  2759. const $ = new $root.mindspore.schema.TensorListSetItem();
  2760. $.element_dtype = reader.value(json.element_dtype, 0);
  2761. return $;
  2762. }
  2763. };
  2764. $root.mindspore.schema.TensorListStack = class TensorListStack {
  2765. static decode(reader, position) {
  2766. const $ = new $root.mindspore.schema.TensorListStack();
  2767. $.num_elements = reader.int64_(position, 4, 0);
  2768. $.element_dtype = reader.int64_(position, 6, 0);
  2769. return $;
  2770. }
  2771. static decodeText(reader, json) {
  2772. const $ = new $root.mindspore.schema.TensorListStack();
  2773. $.num_elements = reader.value(json.num_elements, 0);
  2774. $.element_dtype = reader.value(json.element_dtype, 0);
  2775. return $;
  2776. }
  2777. };
  2778. $root.mindspore.schema.TileFusion = class TileFusion {
  2779. static decode(reader, position) {
  2780. const $ = new $root.mindspore.schema.TileFusion();
  2781. $.dims = reader.int64s_(position, 4);
  2782. return $;
  2783. }
  2784. static decodeText(reader, json) {
  2785. const $ = new $root.mindspore.schema.TileFusion();
  2786. $.dims = reader.array(json.dims);
  2787. return $;
  2788. }
  2789. };
  2790. $root.mindspore.schema.TopKFusion = class TopKFusion {
  2791. static decode(reader, position) {
  2792. const $ = new $root.mindspore.schema.TopKFusion();
  2793. $.sorted = reader.bool_(position, 4, true);
  2794. $.axis = reader.int64_(position, 6, 0);
  2795. $.largest = reader.int64_(position, 8, 0);
  2796. return $;
  2797. }
  2798. static decodeText(reader, json) {
  2799. const $ = new $root.mindspore.schema.TopKFusion();
  2800. $.sorted = reader.value(json.sorted, true);
  2801. $.axis = reader.value(json.axis, 0);
  2802. $.largest = reader.value(json.largest, 0);
  2803. return $;
  2804. }
  2805. };
  2806. $root.mindspore.schema.Transpose = class Transpose {
  2807. static decode(/* reader, position */) {
  2808. const $ = new $root.mindspore.schema.Transpose();
  2809. return $;
  2810. }
  2811. static decodeText(/* reader, json */) {
  2812. const $ = new $root.mindspore.schema.Transpose();
  2813. return $;
  2814. }
  2815. };
  2816. $root.mindspore.schema.Unique = class Unique {
  2817. static decode(/* reader, position */) {
  2818. const $ = new $root.mindspore.schema.Unique();
  2819. return $;
  2820. }
  2821. static decodeText(/* reader, json */) {
  2822. const $ = new $root.mindspore.schema.Unique();
  2823. return $;
  2824. }
  2825. };
  2826. $root.mindspore.schema.UnsortedSegmentSum = class UnsortedSegmentSum {
  2827. static decode(/* reader, position */) {
  2828. const $ = new $root.mindspore.schema.UnsortedSegmentSum();
  2829. return $;
  2830. }
  2831. static decodeText(/* reader, json */) {
  2832. const $ = new $root.mindspore.schema.UnsortedSegmentSum();
  2833. return $;
  2834. }
  2835. };
  2836. $root.mindspore.schema.Unsqueeze = class Unsqueeze {
  2837. static decode(reader, position) {
  2838. const $ = new $root.mindspore.schema.Unsqueeze();
  2839. $.axis = reader.int64s_(position, 4);
  2840. return $;
  2841. }
  2842. static decodeText(reader, json) {
  2843. const $ = new $root.mindspore.schema.Unsqueeze();
  2844. $.axis = reader.array(json.axis);
  2845. return $;
  2846. }
  2847. };
  2848. $root.mindspore.schema.Unstack = class Unstack {
  2849. static decode(reader, position) {
  2850. const $ = new $root.mindspore.schema.Unstack();
  2851. $.axis = reader.int64_(position, 4, 0);
  2852. return $;
  2853. }
  2854. static decodeText(reader, json) {
  2855. const $ = new $root.mindspore.schema.Unstack();
  2856. $.axis = reader.value(json.axis, 0);
  2857. return $;
  2858. }
  2859. };
  2860. $root.mindspore.schema.While = class While {
  2861. static decode(reader, position) {
  2862. const $ = new $root.mindspore.schema.While();
  2863. $.cond_subgraph_index = reader.int64_(position, 4, 0);
  2864. $.body_subgraph_index = reader.int64_(position, 6, 0);
  2865. return $;
  2866. }
  2867. static decodeText(reader, json) {
  2868. const $ = new $root.mindspore.schema.While();
  2869. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  2870. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  2871. return $;
  2872. }
  2873. };
  2874. $root.mindspore.schema.Where = class Where {
  2875. static decode(/* reader, position */) {
  2876. const $ = new $root.mindspore.schema.Where();
  2877. return $;
  2878. }
  2879. static decodeText(/* reader, json */) {
  2880. const $ = new $root.mindspore.schema.Where();
  2881. return $;
  2882. }
  2883. };
  2884. $root.mindspore.schema.ZerosLike = class ZerosLike {
  2885. static decode(/* reader, position */) {
  2886. const $ = new $root.mindspore.schema.ZerosLike();
  2887. return $;
  2888. }
  2889. static decodeText(/* reader, json */) {
  2890. const $ = new $root.mindspore.schema.ZerosLike();
  2891. return $;
  2892. }
  2893. };
  2894. $root.mindspore.schema.Select = class Select {
  2895. static decode(/* reader, position */) {
  2896. const $ = new $root.mindspore.schema.Select();
  2897. return $;
  2898. }
  2899. static decodeText(/* reader, json */) {
  2900. const $ = new $root.mindspore.schema.Select();
  2901. return $;
  2902. }
  2903. };
  2904. $root.mindspore.schema.If = class If {
  2905. static decode(/* reader, position */) {
  2906. const $ = new $root.mindspore.schema.If();
  2907. return $;
  2908. }
  2909. static decodeText(/* reader, json */) {
  2910. const $ = new $root.mindspore.schema.If();
  2911. return $;
  2912. }
  2913. };
  2914. $root.mindspore.schema.GRU = class GRU {
  2915. static decode(reader, position) {
  2916. const $ = new $root.mindspore.schema.GRU();
  2917. $.bidirectional = reader.bool_(position, 4, false);
  2918. return $;
  2919. }
  2920. static decodeText(reader, json) {
  2921. const $ = new $root.mindspore.schema.GRU();
  2922. $.bidirectional = reader.value(json.bidirectional, false);
  2923. return $;
  2924. }
  2925. };
  2926. $root.mindspore.schema.NonZero = class NonZero {
  2927. static decode(/* reader, position */) {
  2928. const $ = new $root.mindspore.schema.NonZero();
  2929. return $;
  2930. }
  2931. static decodeText(/* reader, json */) {
  2932. const $ = new $root.mindspore.schema.NonZero();
  2933. return $;
  2934. }
  2935. };
  2936. $root.mindspore.schema.InvertPermutation = class InvertPermutation {
  2937. static decode(/* reader, position */) {
  2938. const $ = new $root.mindspore.schema.InvertPermutation();
  2939. return $;
  2940. }
  2941. static decodeText(/* reader, json */) {
  2942. const $ = new $root.mindspore.schema.InvertPermutation();
  2943. return $;
  2944. }
  2945. };
  2946. $root.mindspore.schema.Size = class Size {
  2947. static decode(/* reader, position */) {
  2948. const $ = new $root.mindspore.schema.Size();
  2949. return $;
  2950. }
  2951. static decodeText(/* reader, json */) {
  2952. const $ = new $root.mindspore.schema.Size();
  2953. return $;
  2954. }
  2955. };
  2956. $root.mindspore.schema.RandomStandardNormal = class RandomStandardNormal {
  2957. static decode(reader, position) {
  2958. const $ = new $root.mindspore.schema.RandomStandardNormal();
  2959. $.seed = reader.int64_(position, 4, 0);
  2960. $.seed2 = reader.int64_(position, 6, 0);
  2961. return $;
  2962. }
  2963. static decodeText(reader, json) {
  2964. const $ = new $root.mindspore.schema.RandomStandardNormal();
  2965. $.seed = reader.value(json.seed, 0);
  2966. $.seed2 = reader.value(json.seed2, 0);
  2967. return $;
  2968. }
  2969. };
  2970. $root.mindspore.schema.CropAndResize = class CropAndResize {
  2971. static decode(reader, position) {
  2972. const $ = new $root.mindspore.schema.CropAndResize();
  2973. $.method = reader.int8_(position, 4, 0);
  2974. $.extrapolation_value = reader.float32_(position, 6, 0);
  2975. return $;
  2976. }
  2977. static decodeText(reader, json) {
  2978. const $ = new $root.mindspore.schema.CropAndResize();
  2979. $.method = $root.mindspore.schema.ResizeMethod[json.method];
  2980. $.extrapolation_value = reader.value(json.extrapolation_value, 0);
  2981. return $;
  2982. }
  2983. };
  2984. $root.mindspore.schema.Erf = class Erf {
  2985. static decode(/* reader, position */) {
  2986. const $ = new $root.mindspore.schema.Erf();
  2987. return $;
  2988. }
  2989. static decodeText(/* reader, json */) {
  2990. const $ = new $root.mindspore.schema.Erf();
  2991. return $;
  2992. }
  2993. };
  2994. $root.mindspore.schema.StridedSliceGrad = class StridedSliceGrad {
  2995. static decode(reader, position) {
  2996. const $ = new $root.mindspore.schema.StridedSliceGrad();
  2997. $.begin_mask = reader.int64_(position, 4, 0);
  2998. $.end_mask = reader.int64_(position, 6, 0);
  2999. $.ellipsis_mask = reader.int64_(position, 8, 0);
  3000. $.new_axis_mask = reader.int64_(position, 10, 0);
  3001. $.shrink_axis_mask = reader.int64_(position, 12, 0);
  3002. return $;
  3003. }
  3004. static decodeText(reader, json) {
  3005. const $ = new $root.mindspore.schema.StridedSliceGrad();
  3006. $.begin_mask = reader.value(json.begin_mask, 0);
  3007. $.end_mask = reader.value(json.end_mask, 0);
  3008. $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
  3009. $.new_axis_mask = reader.value(json.new_axis_mask, 0);
  3010. $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
  3011. return $;
  3012. }
  3013. };
  3014. $root.mindspore.schema.IsFinite = class IsFinite {
  3015. static decode(/* reader, position */) {
  3016. const $ = new $root.mindspore.schema.IsFinite();
  3017. return $;
  3018. }
  3019. static decodeText(/* reader, json */) {
  3020. const $ = new $root.mindspore.schema.IsFinite();
  3021. return $;
  3022. }
  3023. };
  3024. $root.mindspore.schema.LinSpace = class LinSpace {
  3025. static decode(/* reader, position */) {
  3026. const $ = new $root.mindspore.schema.LinSpace();
  3027. return $;
  3028. }
  3029. static decodeText(/* reader, json */) {
  3030. const $ = new $root.mindspore.schema.LinSpace();
  3031. return $;
  3032. }
  3033. };
  3034. $root.mindspore.schema.UniformReal = class UniformReal {
  3035. static decode(reader, position) {
  3036. const $ = new $root.mindspore.schema.UniformReal();
  3037. $.seed = reader.int64_(position, 4, 0);
  3038. $.seed2 = reader.int64_(position, 6, 0);
  3039. return $;
  3040. }
  3041. static decodeText(reader, json) {
  3042. const $ = new $root.mindspore.schema.UniformReal();
  3043. $.seed = reader.value(json.seed, 0);
  3044. $.seed2 = reader.value(json.seed2, 0);
  3045. return $;
  3046. }
  3047. };
  3048. $root.mindspore.schema.AbsGrad = class AbsGrad {
  3049. static decode(/* reader, position */) {
  3050. const $ = new $root.mindspore.schema.AbsGrad();
  3051. return $;
  3052. }
  3053. static decodeText(/* reader, json */) {
  3054. const $ = new $root.mindspore.schema.AbsGrad();
  3055. return $;
  3056. }
  3057. };
  3058. $root.mindspore.schema.RsqrtGrad = class RsqrtGrad {
  3059. static decode(/* reader, position */) {
  3060. const $ = new $root.mindspore.schema.RsqrtGrad();
  3061. return $;
  3062. }
  3063. static decodeText(/* reader, json */) {
  3064. const $ = new $root.mindspore.schema.RsqrtGrad();
  3065. return $;
  3066. }
  3067. };
  3068. $root.mindspore.schema.SqrtGrad = class SqrtGrad {
  3069. static decode(/* reader, position */) {
  3070. const $ = new $root.mindspore.schema.SqrtGrad();
  3071. return $;
  3072. }
  3073. static decodeText(/* reader, json */) {
  3074. const $ = new $root.mindspore.schema.SqrtGrad();
  3075. return $;
  3076. }
  3077. };
  3078. $root.mindspore.schema.LayerNormGrad = class LayerNormGrad {
  3079. static decode(reader, position) {
  3080. const $ = new $root.mindspore.schema.LayerNormGrad();
  3081. $.begin_norm_axis = reader.int64_(position, 4, 0);
  3082. $.begin_params_axis = reader.int64_(position, 6, 0);
  3083. return $;
  3084. }
  3085. static decodeText(reader, json) {
  3086. const $ = new $root.mindspore.schema.LayerNormGrad();
  3087. $.begin_norm_axis = reader.value(json.begin_norm_axis, 0);
  3088. $.begin_params_axis = reader.value(json.begin_params_axis, 0);
  3089. return $;
  3090. }
  3091. };
  3092. $root.mindspore.schema.ResizeGrad = class ResizeGrad {
  3093. static decode(reader, position) {
  3094. const $ = new $root.mindspore.schema.ResizeGrad();
  3095. $.method = reader.int8_(position, 4, 0);
  3096. $.align_corners = reader.bool_(position, 6, false);
  3097. return $;
  3098. }
  3099. static decodeText(reader, json) {
  3100. const $ = new $root.mindspore.schema.ResizeGrad();
  3101. $.method = $root.mindspore.schema.ResizeMethod[json.method];
  3102. $.align_corners = reader.value(json.align_corners, false);
  3103. return $;
  3104. }
  3105. };
  3106. $root.mindspore.schema.Splice = class Splice {
  3107. static decode(reader, position) {
  3108. const $ = new $root.mindspore.schema.Splice();
  3109. $.context = reader.int64s_(position, 4);
  3110. $.forward_indexes = reader.int64s_(position, 6);
  3111. $.output_dim = reader.int64_(position, 8, 0);
  3112. return $;
  3113. }
  3114. static decodeText(reader, json) {
  3115. const $ = new $root.mindspore.schema.Splice();
  3116. $.context = reader.array(json.context);
  3117. $.forward_indexes = reader.array(json.forward_indexes);
  3118. $.output_dim = reader.value(json.output_dim, 0);
  3119. return $;
  3120. }
  3121. };
  3122. $root.mindspore.schema.LogSoftmax = class LogSoftmax {
  3123. static decode(reader, position) {
  3124. const $ = new $root.mindspore.schema.LogSoftmax();
  3125. $.axis = reader.int64_(position, 4, 0);
  3126. return $;
  3127. }
  3128. static decodeText(reader, json) {
  3129. const $ = new $root.mindspore.schema.LogSoftmax();
  3130. $.axis = reader.value(json.axis, 0);
  3131. return $;
  3132. }
  3133. };
  3134. $root.mindspore.schema.Call = class Call {
  3135. static decode(/* reader, position */) {
  3136. const $ = new $root.mindspore.schema.Call();
  3137. return $;
  3138. }
  3139. static decodeText(/* reader, json */) {
  3140. const $ = new $root.mindspore.schema.Call();
  3141. return $;
  3142. }
  3143. };
  3144. $root.mindspore.schema.CumSum = class CumSum {
  3145. static decode(reader, position) {
  3146. const $ = new $root.mindspore.schema.CumSum();
  3147. $.exclusive = reader.bool_(position, 4, false);
  3148. $.reverse = reader.bool_(position, 6, false);
  3149. return $;
  3150. }
  3151. static decodeText(reader, json) {
  3152. const $ = new $root.mindspore.schema.CumSum();
  3153. $.exclusive = reader.value(json.exclusive, false);
  3154. $.reverse = reader.value(json.reverse, false);
  3155. return $;
  3156. }
  3157. };
  3158. $root.mindspore.schema.Custom = class Custom {
  3159. static decode(reader, position) {
  3160. const $ = new $root.mindspore.schema.Custom();
  3161. $.type = reader.string_(position, 4, null);
  3162. $.attr = reader.tableArray(position, 6, $root.mindspore.schema.Attribute.decode);
  3163. return $;
  3164. }
  3165. static decodeText(reader, json) {
  3166. const $ = new $root.mindspore.schema.Custom();
  3167. $.type = reader.value(json.type, null);
  3168. $.attr = reader.objectArray(json.attr, $root.mindspore.schema.Attribute.decodeText);
  3169. return $;
  3170. }
  3171. };
  3172. $root.mindspore.schema.SplitWithOverlap = class SplitWithOverlap {
  3173. static decode(reader, position) {
  3174. const $ = new $root.mindspore.schema.SplitWithOverlap();
  3175. $.split_dim = reader.int64_(position, 4, 0);
  3176. $.number_split = reader.int64_(position, 6, 0);
  3177. $.ratio = reader.int64s_(position, 8);
  3178. $.extend_top = reader.int64s_(position, 10);
  3179. $.extend_bottom = reader.int64s_(position, 12);
  3180. return $;
  3181. }
  3182. static decodeText(reader, json) {
  3183. const $ = new $root.mindspore.schema.SplitWithOverlap();
  3184. $.split_dim = reader.value(json.split_dim, 0);
  3185. $.number_split = reader.value(json.number_split, 0);
  3186. $.ratio = reader.array(json.ratio);
  3187. $.extend_top = reader.array(json.extend_top);
  3188. $.extend_bottom = reader.array(json.extend_bottom);
  3189. return $;
  3190. }
  3191. };
  3192. $root.mindspore.schema.GenOP = class GenOP {
  3193. static decode(reader, position) {
  3194. const $ = new $root.mindspore.schema.GenOP();
  3195. $.activation_type = reader.int8_(position, 4, 0);
  3196. $.alpha = reader.float32_(position, 6, 0);
  3197. $.min_val = reader.float32_(position, 8, 0);
  3198. $.max_val = reader.float32_(position, 10, 0);
  3199. $.is_training = reader.bool_(position, 12, false);
  3200. $.format = reader.int32_(position, 14, 0);
  3201. $.kernel_size = reader.int64s_(position, 16);
  3202. $.stride = reader.int64s_(position, 18);
  3203. $.dilation = reader.int64s_(position, 20);
  3204. $.pad_mode = reader.int8_(position, 22, 0);
  3205. $.pad_list = reader.int64s_(position, 24);
  3206. $.mode = reader.int64_(position, 26, 0);
  3207. $.group = reader.int64_(position, 28, 0);
  3208. $.in_channel = reader.int64_(position, 30, 0);
  3209. $.out_channel = reader.int64_(position, 32, 0);
  3210. $.eltwise_mode = reader.int8_(position, 34, 0);
  3211. $.has_bias = reader.bool_(position, 36, false);
  3212. $.use_axis = reader.bool_(position, 38, false);
  3213. $.axis = reader.int64_(position, 40, 0);
  3214. $.epsilon = reader.float32_(position, 42, 0.0001);
  3215. $.momentum = reader.float32_(position, 44, 0.9);
  3216. $.transpose_a = reader.bool_(position, 46, false);
  3217. $.transpose_b = reader.bool_(position, 48, false);
  3218. $.pad = reader.int64s_(position, 50);
  3219. $.round_mode = reader.int8_(position, 52, 0);
  3220. $.global = reader.bool_(position, 54, false);
  3221. $.channel_shared = reader.bool_(position, 56, false);
  3222. $.axes = reader.int64s_(position, 58);
  3223. $.keep_dims = reader.bool_(position, 60, false);
  3224. $.reduce_mode = reader.int8_(position, 62, 0);
  3225. $.reduce_to_end = reader.bool_(position, 64, false);
  3226. $.coeff = reader.float32_(position, 66, 0);
  3227. return $;
  3228. }
  3229. static decodeText(reader, json) {
  3230. const $ = new $root.mindspore.schema.GenOP();
  3231. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  3232. $.alpha = reader.value(json.alpha, 0);
  3233. $.min_val = reader.value(json.min_val, 0);
  3234. $.max_val = reader.value(json.max_val, 0);
  3235. $.is_training = reader.value(json.is_training, false);
  3236. $.format = $root.mindspore.schema.Format[json.format];
  3237. $.kernel_size = reader.array(json.kernel_size);
  3238. $.stride = reader.array(json.stride);
  3239. $.dilation = reader.array(json.dilation);
  3240. $.pad_mode = $root.mindspore.schema.PadMode[json.pad_mode];
  3241. $.pad_list = reader.array(json.pad_list);
  3242. $.mode = reader.value(json.mode, 0);
  3243. $.group = reader.value(json.group, 0);
  3244. $.in_channel = reader.value(json.in_channel, 0);
  3245. $.out_channel = reader.value(json.out_channel, 0);
  3246. $.eltwise_mode = $root.mindspore.schema.EltwiseMode[json.eltwise_mode];
  3247. $.has_bias = reader.value(json.has_bias, false);
  3248. $.use_axis = reader.value(json.use_axis, false);
  3249. $.axis = reader.value(json.axis, 0);
  3250. $.epsilon = reader.value(json.epsilon, 0.0001);
  3251. $.momentum = reader.value(json.momentum, 0.9);
  3252. $.transpose_a = reader.value(json.transpose_a, false);
  3253. $.transpose_b = reader.value(json.transpose_b, false);
  3254. $.pad = reader.array(json.pad);
  3255. $.round_mode = $root.mindspore.schema.RoundMode[json.round_mode];
  3256. $.global = reader.value(json.global, false);
  3257. $.channel_shared = reader.value(json.channel_shared, false);
  3258. $.axes = reader.array(json.axes);
  3259. $.keep_dims = reader.value(json.keep_dims, false);
  3260. $.reduce_mode = $root.mindspore.schema.ReduceMode[json.reduce_mode];
  3261. $.reduce_to_end = reader.value(json.reduce_to_end, false);
  3262. $.coeff = reader.value(json.coeff, 0);
  3263. return $;
  3264. }
  3265. };
  3266. $root.mindspore.schema.RaggedRange = class RaggedRange {
  3267. static decode(/* reader, position */) {
  3268. const $ = new $root.mindspore.schema.RaggedRange();
  3269. return $;
  3270. }
  3271. static decodeText(/* reader, json */) {
  3272. const $ = new $root.mindspore.schema.RaggedRange();
  3273. return $;
  3274. }
  3275. };
  3276. $root.mindspore.schema.GLU = class GLU {
  3277. static decode(reader, position) {
  3278. const $ = new $root.mindspore.schema.GLU();
  3279. $.axis = reader.int64_(position, 4, -1);
  3280. return $;
  3281. }
  3282. static decodeText(reader, json) {
  3283. const $ = new $root.mindspore.schema.GLU();
  3284. $.axis = reader.value(json.axis, -1);
  3285. return $;
  3286. }
  3287. };
  3288. $root.mindspore.schema.TensorArray = class TensorArray {
  3289. static decode(reader, position) {
  3290. const $ = new $root.mindspore.schema.TensorArray();
  3291. $.dynamic_size = reader.bool_(position, 4, false);
  3292. $.identical_element_shapes = reader.bool_(position, 6, false);
  3293. $.element_shape = reader.typedArray(position, 8, Int32Array);
  3294. $.data_type = reader.int32_(position, 10, 0);
  3295. return $;
  3296. }
  3297. static decodeText(reader, json) {
  3298. const $ = new $root.mindspore.schema.TensorArray();
  3299. $.dynamic_size = reader.value(json.dynamic_size, false);
  3300. $.identical_element_shapes = reader.value(json.identical_element_shapes, false);
  3301. $.element_shape = reader.typedArray(json.element_shape, Int32Array);
  3302. $.data_type = reader.value(json.data_type, 0);
  3303. return $;
  3304. }
  3305. };
  3306. $root.mindspore.schema.TensorArrayRead = class TensorArrayRead {
  3307. static decode(/* reader, position */) {
  3308. const $ = new $root.mindspore.schema.TensorArrayRead();
  3309. return $;
  3310. }
  3311. static decodeText(/* reader, json */) {
  3312. const $ = new $root.mindspore.schema.TensorArrayRead();
  3313. return $;
  3314. }
  3315. };
  3316. $root.mindspore.schema.TensorArrayWrite = class TensorArrayWrite {
  3317. static decode(/* reader, position */) {
  3318. const $ = new $root.mindspore.schema.TensorArrayWrite();
  3319. return $;
  3320. }
  3321. static decodeText(/* reader, json */) {
  3322. const $ = new $root.mindspore.schema.TensorArrayWrite();
  3323. return $;
  3324. }
  3325. };
  3326. $root.mindspore.schema.Affine = class Affine {
  3327. static decode(reader, position) {
  3328. const $ = new $root.mindspore.schema.Affine();
  3329. $.context = reader.int64s_(position, 4);
  3330. $.output_dim = reader.int64_(position, 6, 0);
  3331. $.activation_type = reader.int8_(position, 8, 0);
  3332. $.transpose_a = reader.bool_(position, 10, false);
  3333. $.transpose_b = reader.bool_(position, 12, false);
  3334. return $;
  3335. }
  3336. static decodeText(reader, json) {
  3337. const $ = new $root.mindspore.schema.Affine();
  3338. $.context = reader.array(json.context);
  3339. $.output_dim = reader.value(json.output_dim, 0);
  3340. $.activation_type = $root.mindspore.schema.ActivationType[json.activation_type];
  3341. $.transpose_a = reader.value(json.transpose_a, false);
  3342. $.transpose_b = reader.value(json.transpose_b, false);
  3343. return $;
  3344. }
  3345. };
  3346. $root.mindspore.schema.Attention = class Attention {
  3347. static decode(/* reader, position */) {
  3348. const $ = new $root.mindspore.schema.Attention();
  3349. return $;
  3350. }
  3351. static decodeText(/* reader, json */) {
  3352. const $ = new $root.mindspore.schema.Attention();
  3353. return $;
  3354. }
  3355. };
  3356. $root.mindspore.schema.ScatterNdUpdate = class ScatterNdUpdate {
  3357. static decode(/* reader, position */) {
  3358. const $ = new $root.mindspore.schema.ScatterNdUpdate();
  3359. return $;
  3360. }
  3361. static decodeText(/* reader, json */) {
  3362. const $ = new $root.mindspore.schema.ScatterNdUpdate();
  3363. return $;
  3364. }
  3365. };
  3366. $root.mindspore.schema.QuantParam = class QuantParam {
  3367. static decode(reader, position) {
  3368. const $ = new $root.mindspore.schema.QuantParam();
  3369. $.scale = reader.float64_(position, 4, 0);
  3370. $.zeroPoint = reader.int32_(position, 6, 0);
  3371. $.min = reader.float64_(position, 8, 0);
  3372. $.max = reader.float64_(position, 10, 0);
  3373. $.narrowRange = reader.bool_(position, 12, true);
  3374. $.numBits = reader.int32_(position, 14, 8);
  3375. $.inited = reader.bool_(position, 16, false);
  3376. $.varCorr = reader.float32_(position, 18, 1);
  3377. $.meanCorr = reader.float32_(position, 20, 0);
  3378. $.dstDtype = reader.int32_(position, 22, 32);
  3379. $.roundType = reader.int32_(position, 24, 1);
  3380. $.multiplier = reader.int32_(position, 26, 1);
  3381. return $;
  3382. }
  3383. static decodeText(reader, json) {
  3384. const $ = new $root.mindspore.schema.QuantParam();
  3385. $.scale = reader.value(json.scale, 0);
  3386. $.zeroPoint = reader.value(json.zeroPoint, 0);
  3387. $.min = reader.value(json.min, 0);
  3388. $.max = reader.value(json.max, 0);
  3389. $.narrowRange = reader.value(json.narrowRange, true);
  3390. $.numBits = reader.value(json.numBits, 8);
  3391. $.inited = reader.value(json.inited, false);
  3392. $.varCorr = reader.value(json.varCorr, 1);
  3393. $.meanCorr = reader.value(json.meanCorr, 0);
  3394. $.dstDtype = reader.value(json.dstDtype, 32);
  3395. $.roundType = reader.value(json.roundType, 1);
  3396. $.multiplier = reader.value(json.multiplier, 1);
  3397. return $;
  3398. }
  3399. };
  3400. $root.mindspore.schema.WeightQunatCompressType = {
  3401. NONE: 0,
  3402. INDEXING: 1,
  3403. SPARSE: 2
  3404. };
  3405. $root.mindspore.schema.Tensor = class Tensor {
  3406. static decode(reader, position) {
  3407. const $ = new $root.mindspore.schema.Tensor();
  3408. $.nodeType = reader.int32_(position, 4, 0);
  3409. $.dataType = reader.int32_(position, 6, 0);
  3410. $.dims = reader.typedArray(position, 8, Int32Array);
  3411. $.format = reader.int32_(position, 10, 0);
  3412. $.refCount = reader.int32_(position, 12, 0);
  3413. $.offset = reader.int32_(position, 14, 0);
  3414. $.data = reader.typedArray(position, 16, Uint8Array);
  3415. $.quantParams = reader.tableArray(position, 18, $root.mindspore.schema.QuantParam.decode);
  3416. $.quantClusters = reader.typedArray(position, 20, Float32Array);
  3417. $.name = reader.string_(position, 22, null);
  3418. $.enableHuffmanCode = reader.bool_(position, 24, false);
  3419. $.weightQunatCompressType = reader.int32_(position, 26, 0);
  3420. return $;
  3421. }
  3422. static decodeText(reader, json) {
  3423. const $ = new $root.mindspore.schema.Tensor();
  3424. $.nodeType = reader.value(json.nodeType, 0);
  3425. $.dataType = reader.value(json.dataType, 0);
  3426. $.dims = reader.typedArray(json.dims, Int32Array);
  3427. $.format = $root.mindspore.schema.Format[json.format];
  3428. $.refCount = reader.value(json.refCount, 0);
  3429. $.offset = reader.value(json.offset, 0);
  3430. $.data = reader.typedArray(json.data, Uint8Array);
  3431. $.quantParams = reader.objectArray(json.quantParams, $root.mindspore.schema.QuantParam.decodeText);
  3432. $.quantClusters = reader.typedArray(json.quantClusters, Float32Array);
  3433. $.name = reader.value(json.name, null);
  3434. $.enableHuffmanCode = reader.value(json.enableHuffmanCode, false);
  3435. $.weightQunatCompressType = $root.mindspore.schema.WeightQunatCompressType[json.weightQunatCompressType];
  3436. return $;
  3437. }
  3438. };
  3439. $root.mindspore.schema.QuantType = {
  3440. QUANT_NONE: 0,
  3441. AwareTraining: 1,
  3442. WeightQuant: 2,
  3443. PostTraining: 3,
  3444. QUANT_WEIGHT: 4,
  3445. QUANT_ALL: 5
  3446. };
  3447. $root.mindspore.schema.Primitive = class Primitive {
  3448. static decode(reader, position) {
  3449. const $ = new $root.mindspore.schema.Primitive();
  3450. $.value = reader.union(position, 4, $root.mindspore.schema.PrimitiveType.decode);
  3451. return $;
  3452. }
  3453. static decodeText(reader, json) {
  3454. const $ = new $root.mindspore.schema.Primitive();
  3455. $.value = $root.mindspore.schema.PrimitiveType.decodeText(reader, json.value, json.value_type);
  3456. return $;
  3457. }
  3458. };
  3459. $root.mindspore.schema.CNode = class CNode {
  3460. static decode(reader, position) {
  3461. const $ = new $root.mindspore.schema.CNode();
  3462. $.name = reader.string_(position, 4, null);
  3463. $.nodeType = reader.int32_(position, 6, 0);
  3464. $.primitive = reader.table(position, 8, $root.mindspore.schema.Primitive.decode);
  3465. $.inputIndex = reader.typedArray(position, 10, Uint32Array);
  3466. $.outputIndex = reader.typedArray(position, 12, Uint32Array);
  3467. $.quantType = reader.int32_(position, 14, 0);
  3468. $.deviceType = reader.int32_(position, 16, -1);
  3469. return $;
  3470. }
  3471. static decodeText(reader, json) {
  3472. const $ = new $root.mindspore.schema.CNode();
  3473. $.name = reader.value(json.name, null);
  3474. $.nodeType = reader.value(json.nodeType, 0);
  3475. $.primitive = reader.object(json.primitive, $root.mindspore.schema.Primitive.decodeText);
  3476. $.inputIndex = reader.typedArray(json.inputIndex, Uint32Array);
  3477. $.outputIndex = reader.typedArray(json.outputIndex, Uint32Array);
  3478. $.quantType = $root.mindspore.schema.QuantType[json.quantType];
  3479. $.deviceType = reader.value(json.deviceType, -1);
  3480. return $;
  3481. }
  3482. };
  3483. $root.mindspore.schema.SubGraph = class SubGraph {
  3484. static decode(reader, position) {
  3485. const $ = new $root.mindspore.schema.SubGraph();
  3486. $.name = reader.string_(position, 4, null);
  3487. $.inputIndices = reader.typedArray(position, 6, Uint32Array);
  3488. $.outputIndices = reader.typedArray(position, 8, Uint32Array);
  3489. $.nodeIndices = reader.typedArray(position, 10, Uint32Array);
  3490. $.tensorIndices = reader.typedArray(position, 12, Uint32Array);
  3491. return $;
  3492. }
  3493. static decodeText(reader, json) {
  3494. const $ = new $root.mindspore.schema.SubGraph();
  3495. $.name = reader.value(json.name, null);
  3496. $.inputIndices = reader.typedArray(json.inputIndices, Uint32Array);
  3497. $.outputIndices = reader.typedArray(json.outputIndices, Uint32Array);
  3498. $.nodeIndices = reader.typedArray(json.nodeIndices, Uint32Array);
  3499. $.tensorIndices = reader.typedArray(json.tensorIndices, Uint32Array);
  3500. return $;
  3501. }
  3502. };
  3503. $root.mindspore.schema.MetaGraph = class MetaGraph {
  3504. static identifier(reader) {
  3505. return reader.identifier === 'MSL2';
  3506. }
  3507. static create(reader) {
  3508. return $root.mindspore.schema.MetaGraph.decode(reader, reader.root);
  3509. }
  3510. static createText(reader) {
  3511. return $root.mindspore.schema.MetaGraph.decodeText(reader, reader.root);
  3512. }
  3513. static decode(reader, position) {
  3514. const $ = new $root.mindspore.schema.MetaGraph();
  3515. $.name = reader.string_(position, 4, null);
  3516. $.version = reader.string_(position, 6, null);
  3517. $.fmkType = reader.int32_(position, 8, 0);
  3518. $.inputIndex = reader.typedArray(position, 10, Uint32Array);
  3519. $.outputIndex = reader.typedArray(position, 12, Uint32Array);
  3520. $.mempoolSize = reader.uint32_(position, 14, 0);
  3521. $.nodes = reader.tableArray(position, 16, $root.mindspore.schema.CNode.decode);
  3522. $.allTensors = reader.tableArray(position, 18, $root.mindspore.schema.Tensor.decode);
  3523. $.subGraph = reader.tableArray(position, 20, $root.mindspore.schema.SubGraph.decode);
  3524. $.obfuscate = reader.bool_(position, 22, false);
  3525. $.obfMetaData = reader.typedArray(position, 24, Uint8Array);
  3526. return $;
  3527. }
  3528. static decodeText(reader, json) {
  3529. const $ = new $root.mindspore.schema.MetaGraph();
  3530. $.name = reader.value(json.name, null);
  3531. $.version = reader.value(json.version, null);
  3532. $.fmkType = reader.value(json.fmkType, 0);
  3533. $.inputIndex = reader.typedArray(json.inputIndex, Uint32Array);
  3534. $.outputIndex = reader.typedArray(json.outputIndex, Uint32Array);
  3535. $.mempoolSize = reader.value(json.mempoolSize, 0);
  3536. $.nodes = reader.objectArray(json.nodes, $root.mindspore.schema.CNode.decodeText);
  3537. $.allTensors = reader.objectArray(json.allTensors, $root.mindspore.schema.Tensor.decodeText);
  3538. $.subGraph = reader.objectArray(json.subGraph, $root.mindspore.schema.SubGraph.decodeText);
  3539. $.obfuscate = reader.value(json.obfuscate, false);
  3540. $.obfMetaData = reader.typedArray(json.obfMetaData, Uint8Array);
  3541. return $;
  3542. }
  3543. };