mslite-schema.js 162 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421
  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, 0);
  1493. return $;
  1494. }
  1495. static decodeText(reader, json) {
  1496. const $ = new $root.mindspore.schema.Flatten();
  1497. $.axis = reader.value(json.axis, 0);
  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. };
  3576. $root.mindspore.schema.ExternalData = class ExternalData {
  3577. static decode(reader, position) {
  3578. const $ = new $root.mindspore.schema.ExternalData();
  3579. $.checkSum = reader.string_(position, 4, null);
  3580. $.location = reader.string_(position, 6, null);
  3581. $.offset = reader.int64_(position, 8, 0);
  3582. $.length = reader.int64_(position, 10, -1);
  3583. return $;
  3584. }
  3585. static decodeText(reader, json) {
  3586. const $ = new $root.mindspore.schema.ExternalData();
  3587. $.checkSum = reader.value(json.checkSum, null);
  3588. $.location = reader.value(json.location, null);
  3589. $.offset = reader.value(json.offset, 0);
  3590. $.length = reader.value(json.length, -1);
  3591. return $;
  3592. }
  3593. };
  3594. $root.mindspore.schema.Tensor = class Tensor {
  3595. static decode(reader, position) {
  3596. const $ = new $root.mindspore.schema.Tensor();
  3597. $.nodeType = reader.int32_(position, 4, 0);
  3598. $.dataType = reader.int32_(position, 6, 0);
  3599. $.dims = reader.typedArray(position, 8, Int32Array);
  3600. $.format = reader.int32_(position, 10, 0);
  3601. $.refCount = reader.int32_(position, 12, 0);
  3602. $.offset = reader.int32_(position, 14, 0);
  3603. $.data = reader.typedArray(position, 16, Uint8Array);
  3604. $.quantParams = reader.tableArray(position, 18, $root.mindspore.schema.QuantParam.decode);
  3605. $.quantClusters = reader.typedArray(position, 20, Float32Array);
  3606. $.name = reader.string_(position, 22, null);
  3607. $.enableHuffmanCode = reader.bool_(position, 24, false);
  3608. $.weightQuantCompressType = reader.int32_(position, 26, 0);
  3609. $.externalData = reader.tableArray(position, 28, $root.mindspore.schema.ExternalData.decode);
  3610. return $;
  3611. }
  3612. static decodeText(reader, json) {
  3613. const $ = new $root.mindspore.schema.Tensor();
  3614. $.nodeType = reader.value(json.nodeType, 0);
  3615. $.dataType = reader.value(json.dataType, 0);
  3616. $.dims = reader.typedArray(json.dims, Int32Array);
  3617. $.format = $root.mindspore.schema.Format[json.format];
  3618. $.refCount = reader.value(json.refCount, 0);
  3619. $.offset = reader.value(json.offset, 0);
  3620. $.data = reader.typedArray(json.data, Uint8Array);
  3621. $.quantParams = reader.objectArray(json.quantParams, $root.mindspore.schema.QuantParam.decodeText);
  3622. $.quantClusters = reader.typedArray(json.quantClusters, Float32Array);
  3623. $.name = reader.value(json.name, null);
  3624. $.enableHuffmanCode = reader.value(json.enableHuffmanCode, false);
  3625. $.weightQuantCompressType = $root.mindspore.schema.WeightQuantCompressType[json.weightQuantCompressType];
  3626. $.externalData = reader.objectArray(json.externalData, $root.mindspore.schema.ExternalData.decodeText);
  3627. return $;
  3628. }
  3629. };
  3630. $root.mindspore.schema.QuantType = {
  3631. QUANT_NONE: 0,
  3632. AwareTraining: 1,
  3633. WeightQuant: 2,
  3634. PostTraining: 3,
  3635. QUANT_WEIGHT: 4,
  3636. QUANT_ALL: 5,
  3637. QUANT_DYNAMIC: 6
  3638. };
  3639. $root.mindspore.schema.Primitive = class Primitive {
  3640. static decode(reader, position) {
  3641. const $ = new $root.mindspore.schema.Primitive();
  3642. $.value = reader.union(position, 4, $root.mindspore.schema.PrimitiveType.decode);
  3643. return $;
  3644. }
  3645. static decodeText(reader, json) {
  3646. const $ = new $root.mindspore.schema.Primitive();
  3647. $.value = $root.mindspore.schema.PrimitiveType.decodeText(reader, json.value, json.value_type);
  3648. return $;
  3649. }
  3650. };
  3651. $root.mindspore.schema.CNode = class CNode {
  3652. static decode(reader, position) {
  3653. const $ = new $root.mindspore.schema.CNode();
  3654. $.name = reader.string_(position, 4, null);
  3655. $.nodeType = reader.int32_(position, 6, 0);
  3656. $.primitive = reader.table(position, 8, $root.mindspore.schema.Primitive.decode);
  3657. $.inputIndex = reader.typedArray(position, 10, Uint32Array);
  3658. $.outputIndex = reader.typedArray(position, 12, Uint32Array);
  3659. $.quantType = reader.int32_(position, 14, 0);
  3660. $.deviceType = reader.int32_(position, 16, -1);
  3661. return $;
  3662. }
  3663. static decodeText(reader, json) {
  3664. const $ = new $root.mindspore.schema.CNode();
  3665. $.name = reader.value(json.name, null);
  3666. $.nodeType = reader.value(json.nodeType, 0);
  3667. $.primitive = reader.object(json.primitive, $root.mindspore.schema.Primitive.decodeText);
  3668. $.inputIndex = reader.typedArray(json.inputIndex, Uint32Array);
  3669. $.outputIndex = reader.typedArray(json.outputIndex, Uint32Array);
  3670. $.quantType = $root.mindspore.schema.QuantType[json.quantType];
  3671. $.deviceType = reader.value(json.deviceType, -1);
  3672. return $;
  3673. }
  3674. };
  3675. $root.mindspore.schema.SubGraph = class SubGraph {
  3676. static decode(reader, position) {
  3677. const $ = new $root.mindspore.schema.SubGraph();
  3678. $.name = reader.string_(position, 4, null);
  3679. $.inputIndices = reader.typedArray(position, 6, Uint32Array);
  3680. $.outputIndices = reader.typedArray(position, 8, Uint32Array);
  3681. $.nodeIndices = reader.typedArray(position, 10, Uint32Array);
  3682. $.tensorIndices = reader.typedArray(position, 12, Uint32Array);
  3683. return $;
  3684. }
  3685. static decodeText(reader, json) {
  3686. const $ = new $root.mindspore.schema.SubGraph();
  3687. $.name = reader.value(json.name, null);
  3688. $.inputIndices = reader.typedArray(json.inputIndices, Uint32Array);
  3689. $.outputIndices = reader.typedArray(json.outputIndices, Uint32Array);
  3690. $.nodeIndices = reader.typedArray(json.nodeIndices, Uint32Array);
  3691. $.tensorIndices = reader.typedArray(json.tensorIndices, Uint32Array);
  3692. return $;
  3693. }
  3694. };
  3695. $root.mindspore.schema.MetaGraph = class MetaGraph {
  3696. static identifier(reader) {
  3697. return reader.identifier === 'MSL2';
  3698. }
  3699. static create(reader) {
  3700. return $root.mindspore.schema.MetaGraph.decode(reader, reader.root);
  3701. }
  3702. static createText(reader) {
  3703. return $root.mindspore.schema.MetaGraph.decodeText(reader, reader.root);
  3704. }
  3705. static decode(reader, position) {
  3706. const $ = new $root.mindspore.schema.MetaGraph();
  3707. $.name = reader.string_(position, 4, null);
  3708. $.version = reader.string_(position, 6, null);
  3709. $.fmkType = reader.int32_(position, 8, 0);
  3710. $.inputIndex = reader.typedArray(position, 10, Uint32Array);
  3711. $.outputIndex = reader.typedArray(position, 12, Uint32Array);
  3712. $.mempoolSize = reader.uint32_(position, 14, 0);
  3713. $.nodes = reader.tableArray(position, 16, $root.mindspore.schema.CNode.decode);
  3714. $.allTensors = reader.tableArray(position, 18, $root.mindspore.schema.Tensor.decode);
  3715. $.subGraph = reader.tableArray(position, 20, $root.mindspore.schema.SubGraph.decode);
  3716. $.obfuscate = reader.bool_(position, 22, false);
  3717. $.obfMetaData = reader.typedArray(position, 24, Uint8Array);
  3718. return $;
  3719. }
  3720. static decodeText(reader, json) {
  3721. const $ = new $root.mindspore.schema.MetaGraph();
  3722. $.name = reader.value(json.name, null);
  3723. $.version = reader.value(json.version, null);
  3724. $.fmkType = reader.value(json.fmkType, 0);
  3725. $.inputIndex = reader.typedArray(json.inputIndex, Uint32Array);
  3726. $.outputIndex = reader.typedArray(json.outputIndex, Uint32Array);
  3727. $.mempoolSize = reader.value(json.mempoolSize, 0);
  3728. $.nodes = reader.objectArray(json.nodes, $root.mindspore.schema.CNode.decodeText);
  3729. $.allTensors = reader.objectArray(json.allTensors, $root.mindspore.schema.Tensor.decodeText);
  3730. $.subGraph = reader.objectArray(json.subGraph, $root.mindspore.schema.SubGraph.decodeText);
  3731. $.obfuscate = reader.value(json.obfuscate, false);
  3732. $.obfMetaData = reader.typedArray(json.obfMetaData, Uint8Array);
  3733. return $;
  3734. }
  3735. };