mslite-schema.js 162 KB

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