coreml-proto.js 354 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113
  1. var $root = protobuf.get('coreml');
  2. $root.CoreML = {};
  3. $root.CoreML.Specification = {};
  4. $root.CoreML.Specification.Pipeline = class Pipeline {
  5. constructor() {
  6. this.models = [];
  7. this.names = [];
  8. }
  9. static decode(reader, length) {
  10. const message = new $root.CoreML.Specification.Pipeline();
  11. const end = reader.next(length);
  12. while (reader.end(end)) {
  13. const tag = reader.uint32();
  14. switch (tag >>> 3) {
  15. case 1:
  16. message.models.push($root.CoreML.Specification.Model.decode(reader, reader.uint32()));
  17. break;
  18. case 2:
  19. message.names.push(reader.string());
  20. break;
  21. default:
  22. reader.skipType(tag & 7);
  23. break;
  24. }
  25. }
  26. return message;
  27. }
  28. };
  29. $root.CoreML.Specification.PipelineClassifier = class PipelineClassifier {
  30. constructor() {
  31. }
  32. static decode(reader, length) {
  33. const message = new $root.CoreML.Specification.PipelineClassifier();
  34. const end = reader.next(length);
  35. while (reader.end(end)) {
  36. const tag = reader.uint32();
  37. switch (tag >>> 3) {
  38. case 1:
  39. message.pipeline = $root.CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  40. break;
  41. default:
  42. reader.skipType(tag & 7);
  43. break;
  44. }
  45. }
  46. return message;
  47. }
  48. };
  49. $root.CoreML.Specification.PipelineClassifier.prototype.pipeline = null;
  50. $root.CoreML.Specification.PipelineRegressor = class PipelineRegressor {
  51. constructor() {
  52. }
  53. static decode(reader, length) {
  54. const message = new $root.CoreML.Specification.PipelineRegressor();
  55. const end = reader.next(length);
  56. while (reader.end(end)) {
  57. const tag = reader.uint32();
  58. switch (tag >>> 3) {
  59. case 1:
  60. message.pipeline = $root.CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  61. break;
  62. default:
  63. reader.skipType(tag & 7);
  64. break;
  65. }
  66. }
  67. return message;
  68. }
  69. };
  70. $root.CoreML.Specification.PipelineRegressor.prototype.pipeline = null;
  71. $root.CoreML.Specification.FeatureDescription = class FeatureDescription {
  72. constructor() {
  73. }
  74. static decode(reader, length) {
  75. const message = new $root.CoreML.Specification.FeatureDescription();
  76. const end = reader.next(length);
  77. while (reader.end(end)) {
  78. const tag = reader.uint32();
  79. switch (tag >>> 3) {
  80. case 1:
  81. message.name = reader.string();
  82. break;
  83. case 2:
  84. message.shortDescription = reader.string();
  85. break;
  86. case 3:
  87. message.type = $root.CoreML.Specification.FeatureType.decode(reader, reader.uint32());
  88. break;
  89. default:
  90. reader.skipType(tag & 7);
  91. break;
  92. }
  93. }
  94. return message;
  95. }
  96. };
  97. $root.CoreML.Specification.FeatureDescription.prototype.name = "";
  98. $root.CoreML.Specification.FeatureDescription.prototype.shortDescription = "";
  99. $root.CoreML.Specification.FeatureDescription.prototype.type = null;
  100. $root.CoreML.Specification.Metadata = class Metadata {
  101. constructor() {
  102. this.userDefined = {};
  103. }
  104. static decode(reader, length) {
  105. const message = new $root.CoreML.Specification.Metadata();
  106. const end = reader.next(length);
  107. while (reader.end(end)) {
  108. const tag = reader.uint32();
  109. switch (tag >>> 3) {
  110. case 1:
  111. message.shortDescription = reader.string();
  112. break;
  113. case 2:
  114. message.versionString = reader.string();
  115. break;
  116. case 3:
  117. message.author = reader.string();
  118. break;
  119. case 4:
  120. message.license = reader.string();
  121. break;
  122. case 100:
  123. reader.entry(message.userDefined, () => reader.string(), () => reader.string());
  124. break;
  125. default:
  126. reader.skipType(tag & 7);
  127. break;
  128. }
  129. }
  130. return message;
  131. }
  132. };
  133. $root.CoreML.Specification.Metadata.prototype.shortDescription = "";
  134. $root.CoreML.Specification.Metadata.prototype.versionString = "";
  135. $root.CoreML.Specification.Metadata.prototype.author = "";
  136. $root.CoreML.Specification.Metadata.prototype.license = "";
  137. $root.CoreML.Specification.ModelDescription = class ModelDescription {
  138. constructor() {
  139. this.input = [];
  140. this.output = [];
  141. this.trainingInput = [];
  142. }
  143. static decode(reader, length) {
  144. const message = new $root.CoreML.Specification.ModelDescription();
  145. const end = reader.next(length);
  146. while (reader.end(end)) {
  147. const tag = reader.uint32();
  148. switch (tag >>> 3) {
  149. case 1:
  150. message.input.push($root.CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  151. break;
  152. case 10:
  153. message.output.push($root.CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  154. break;
  155. case 11:
  156. message.predictedFeatureName = reader.string();
  157. break;
  158. case 12:
  159. message.predictedProbabilitiesName = reader.string();
  160. break;
  161. case 50:
  162. message.trainingInput.push($root.CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  163. break;
  164. case 100:
  165. message.metadata = $root.CoreML.Specification.Metadata.decode(reader, reader.uint32());
  166. break;
  167. default:
  168. reader.skipType(tag & 7);
  169. break;
  170. }
  171. }
  172. return message;
  173. }
  174. };
  175. $root.CoreML.Specification.ModelDescription.prototype.predictedFeatureName = "";
  176. $root.CoreML.Specification.ModelDescription.prototype.predictedProbabilitiesName = "";
  177. $root.CoreML.Specification.ModelDescription.prototype.metadata = null;
  178. $root.CoreML.Specification.SerializedModel = class SerializedModel {
  179. constructor() {
  180. }
  181. static decode(reader, length) {
  182. const message = new $root.CoreML.Specification.SerializedModel();
  183. const end = reader.next(length);
  184. while (reader.end(end)) {
  185. const tag = reader.uint32();
  186. switch (tag >>> 3) {
  187. case 1:
  188. message.identifier = reader.string();
  189. break;
  190. case 2:
  191. message.model = reader.bytes();
  192. break;
  193. default:
  194. reader.skipType(tag & 7);
  195. break;
  196. }
  197. }
  198. return message;
  199. }
  200. };
  201. $root.CoreML.Specification.SerializedModel.prototype.identifier = "";
  202. $root.CoreML.Specification.SerializedModel.prototype.model = new Uint8Array([]);
  203. $root.CoreML.Specification.Model = class Model {
  204. constructor() {
  205. }
  206. get Type() {
  207. $root.CoreML.Specification.Model.TypeSet = $root.CoreML.Specification.Model.TypeSet || new Set([ "pipelineClassifier", "pipelineRegressor", "pipeline", "glmRegressor", "supportVectorRegressor", "treeEnsembleRegressor", "neuralNetworkRegressor", "bayesianProbitRegressor", "glmClassifier", "supportVectorClassifier", "treeEnsembleClassifier", "neuralNetworkClassifier", "kNearestNeighborsClassifier", "neuralNetwork", "itemSimilarityRecommender", "customModel", "linkedModel", "oneHotEncoder", "imputer", "featureVectorizer", "dictVectorizer", "scaler", "categoricalMapping", "normalizer", "arrayFeatureExtractor", "nonMaximumSuppression", "identity", "textClassifier", "wordTagger", "visionFeaturePrint", "soundAnalysisPreprocessing", "gazetteer", "wordEmbedding", "serializedModel"]);
  208. return Object.keys(this).find((key) => $root.CoreML.Specification.Model.TypeSet.has(key) && this[key] != null);
  209. }
  210. static decode(reader, length) {
  211. const message = new $root.CoreML.Specification.Model();
  212. const end = reader.next(length);
  213. while (reader.end(end)) {
  214. const tag = reader.uint32();
  215. switch (tag >>> 3) {
  216. case 1:
  217. message.specificationVersion = reader.int32();
  218. break;
  219. case 2:
  220. message.description = $root.CoreML.Specification.ModelDescription.decode(reader, reader.uint32());
  221. break;
  222. case 10:
  223. message.isUpdatable = reader.bool();
  224. break;
  225. case 200:
  226. message.pipelineClassifier = $root.CoreML.Specification.PipelineClassifier.decode(reader, reader.uint32());
  227. break;
  228. case 201:
  229. message.pipelineRegressor = $root.CoreML.Specification.PipelineRegressor.decode(reader, reader.uint32());
  230. break;
  231. case 202:
  232. message.pipeline = $root.CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  233. break;
  234. case 300:
  235. message.glmRegressor = $root.CoreML.Specification.GLMRegressor.decode(reader, reader.uint32());
  236. break;
  237. case 301:
  238. message.supportVectorRegressor = $root.CoreML.Specification.SupportVectorRegressor.decode(reader, reader.uint32());
  239. break;
  240. case 302:
  241. message.treeEnsembleRegressor = $root.CoreML.Specification.TreeEnsembleRegressor.decode(reader, reader.uint32());
  242. break;
  243. case 303:
  244. message.neuralNetworkRegressor = $root.CoreML.Specification.NeuralNetworkRegressor.decode(reader, reader.uint32());
  245. break;
  246. case 304:
  247. message.bayesianProbitRegressor = $root.CoreML.Specification.BayesianProbitRegressor.decode(reader, reader.uint32());
  248. break;
  249. case 400:
  250. message.glmClassifier = $root.CoreML.Specification.GLMClassifier.decode(reader, reader.uint32());
  251. break;
  252. case 401:
  253. message.supportVectorClassifier = $root.CoreML.Specification.SupportVectorClassifier.decode(reader, reader.uint32());
  254. break;
  255. case 402:
  256. message.treeEnsembleClassifier = $root.CoreML.Specification.TreeEnsembleClassifier.decode(reader, reader.uint32());
  257. break;
  258. case 403:
  259. message.neuralNetworkClassifier = $root.CoreML.Specification.NeuralNetworkClassifier.decode(reader, reader.uint32());
  260. break;
  261. case 404:
  262. message.kNearestNeighborsClassifier = $root.CoreML.Specification.KNearestNeighborsClassifier.decode(reader, reader.uint32());
  263. break;
  264. case 500:
  265. message.neuralNetwork = $root.CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  266. break;
  267. case 501:
  268. message.itemSimilarityRecommender = $root.CoreML.Specification.ItemSimilarityRecommender.decode(reader, reader.uint32());
  269. break;
  270. case 555:
  271. message.customModel = $root.CoreML.Specification.CustomModel.decode(reader, reader.uint32());
  272. break;
  273. case 556:
  274. message.linkedModel = $root.CoreML.Specification.LinkedModel.decode(reader, reader.uint32());
  275. break;
  276. case 600:
  277. message.oneHotEncoder = $root.CoreML.Specification.OneHotEncoder.decode(reader, reader.uint32());
  278. break;
  279. case 601:
  280. message.imputer = $root.CoreML.Specification.Imputer.decode(reader, reader.uint32());
  281. break;
  282. case 602:
  283. message.featureVectorizer = $root.CoreML.Specification.FeatureVectorizer.decode(reader, reader.uint32());
  284. break;
  285. case 603:
  286. message.dictVectorizer = $root.CoreML.Specification.DictVectorizer.decode(reader, reader.uint32());
  287. break;
  288. case 604:
  289. message.scaler = $root.CoreML.Specification.Scaler.decode(reader, reader.uint32());
  290. break;
  291. case 606:
  292. message.categoricalMapping = $root.CoreML.Specification.CategoricalMapping.decode(reader, reader.uint32());
  293. break;
  294. case 607:
  295. message.normalizer = $root.CoreML.Specification.Normalizer.decode(reader, reader.uint32());
  296. break;
  297. case 609:
  298. message.arrayFeatureExtractor = $root.CoreML.Specification.ArrayFeatureExtractor.decode(reader, reader.uint32());
  299. break;
  300. case 610:
  301. message.nonMaximumSuppression = $root.CoreML.Specification.NonMaximumSuppression.decode(reader, reader.uint32());
  302. break;
  303. case 900:
  304. message.identity = $root.CoreML.Specification.Identity.decode(reader, reader.uint32());
  305. break;
  306. case 2000:
  307. message.textClassifier = $root.CoreML.Specification.CoreMLModels.TextClassifier.decode(reader, reader.uint32());
  308. break;
  309. case 2001:
  310. message.wordTagger = $root.CoreML.Specification.CoreMLModels.WordTagger.decode(reader, reader.uint32());
  311. break;
  312. case 2002:
  313. message.visionFeaturePrint = $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.decode(reader, reader.uint32());
  314. break;
  315. case 2003:
  316. message.soundAnalysisPreprocessing = $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.decode(reader, reader.uint32());
  317. break;
  318. case 2004:
  319. message.gazetteer = $root.CoreML.Specification.CoreMLModels.Gazetteer.decode(reader, reader.uint32());
  320. break;
  321. case 2005:
  322. message.wordEmbedding = $root.CoreML.Specification.CoreMLModels.WordEmbedding.decode(reader, reader.uint32());
  323. break;
  324. case 3000:
  325. message.serializedModel = $root.CoreML.Specification.SerializedModel.decode(reader, reader.uint32());
  326. break;
  327. default:
  328. reader.skipType(tag & 7);
  329. break;
  330. }
  331. }
  332. return message;
  333. }
  334. };
  335. $root.CoreML.Specification.Model.prototype.specificationVersion = 0;
  336. $root.CoreML.Specification.Model.prototype.description = null;
  337. $root.CoreML.Specification.Model.prototype.isUpdatable = false;
  338. $root.CoreML.Specification.CoreMLModels = {};
  339. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint = class VisionFeaturePrint {
  340. constructor() {
  341. }
  342. get VisionFeaturePrintType() {
  343. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet = $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet || new Set([ "scene", "objects"]);
  344. return Object.keys(this).find((key) => $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet.has(key) && this[key] != null);
  345. }
  346. static decode(reader, length) {
  347. const message = new $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint();
  348. const end = reader.next(length);
  349. while (reader.end(end)) {
  350. const tag = reader.uint32();
  351. switch (tag >>> 3) {
  352. case 20:
  353. message.scene = $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.decode(reader, reader.uint32());
  354. break;
  355. case 21:
  356. message.objects = $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.decode(reader, reader.uint32());
  357. break;
  358. default:
  359. reader.skipType(tag & 7);
  360. break;
  361. }
  362. }
  363. return message;
  364. }
  365. };
  366. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene = class Scene {
  367. constructor() {
  368. }
  369. static decode(reader, length) {
  370. const message = new $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene();
  371. const end = reader.next(length);
  372. while (reader.end(end)) {
  373. const tag = reader.uint32();
  374. switch (tag >>> 3) {
  375. case 1:
  376. message.version = reader.int32();
  377. break;
  378. default:
  379. reader.skipType(tag & 7);
  380. break;
  381. }
  382. }
  383. return message;
  384. }
  385. };
  386. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.prototype.version = 0;
  387. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.SceneVersion = {
  388. "SCENE_VERSION_INVALID": 0,
  389. "SCENE_VERSION_1": 1
  390. };
  391. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects = class Objects {
  392. constructor() {
  393. this.output = [];
  394. }
  395. static decode(reader, length) {
  396. const message = new $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects();
  397. const end = reader.next(length);
  398. while (reader.end(end)) {
  399. const tag = reader.uint32();
  400. switch (tag >>> 3) {
  401. case 1:
  402. message.version = reader.int32();
  403. break;
  404. case 100:
  405. message.output.push(reader.string());
  406. break;
  407. default:
  408. reader.skipType(tag & 7);
  409. break;
  410. }
  411. }
  412. return message;
  413. }
  414. };
  415. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.prototype.version = 0;
  416. $root.CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.ObjectsVersion = {
  417. "OBJECTS_VERSION_INVALID": 0,
  418. "OBJECTS_VERSION_1": 1
  419. };
  420. $root.CoreML.Specification.CoreMLModels.TextClassifier = class TextClassifier {
  421. constructor() {
  422. }
  423. get ClassLabels() {
  424. $root.CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet = $root.CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet || new Set([ "stringClassLabels"]);
  425. return Object.keys(this).find((key) => $root.CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet.has(key) && this[key] != null);
  426. }
  427. static decode(reader, length) {
  428. const message = new $root.CoreML.Specification.CoreMLModels.TextClassifier();
  429. const end = reader.next(length);
  430. while (reader.end(end)) {
  431. const tag = reader.uint32();
  432. switch (tag >>> 3) {
  433. case 1:
  434. message.revision = reader.uint32();
  435. break;
  436. case 10:
  437. message.language = reader.string();
  438. break;
  439. case 100:
  440. message.modelParameterData = reader.bytes();
  441. break;
  442. case 200:
  443. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  444. break;
  445. default:
  446. reader.skipType(tag & 7);
  447. break;
  448. }
  449. }
  450. return message;
  451. }
  452. };
  453. $root.CoreML.Specification.CoreMLModels.TextClassifier.prototype.revision = 0;
  454. $root.CoreML.Specification.CoreMLModels.TextClassifier.prototype.language = "";
  455. $root.CoreML.Specification.CoreMLModels.TextClassifier.prototype.modelParameterData = new Uint8Array([]);
  456. $root.CoreML.Specification.CoreMLModels.WordTagger = class WordTagger {
  457. constructor() {
  458. }
  459. get Tags() {
  460. $root.CoreML.Specification.CoreMLModels.WordTagger.TagsSet = $root.CoreML.Specification.CoreMLModels.WordTagger.TagsSet || new Set([ "stringTags"]);
  461. return Object.keys(this).find((key) => $root.CoreML.Specification.CoreMLModels.WordTagger.TagsSet.has(key) && this[key] != null);
  462. }
  463. static decode(reader, length) {
  464. const message = new $root.CoreML.Specification.CoreMLModels.WordTagger();
  465. const end = reader.next(length);
  466. while (reader.end(end)) {
  467. const tag = reader.uint32();
  468. switch (tag >>> 3) {
  469. case 1:
  470. message.revision = reader.uint32();
  471. break;
  472. case 10:
  473. message.language = reader.string();
  474. break;
  475. case 20:
  476. message.tokensOutputFeatureName = reader.string();
  477. break;
  478. case 21:
  479. message.tokenTagsOutputFeatureName = reader.string();
  480. break;
  481. case 22:
  482. message.tokenLocationsOutputFeatureName = reader.string();
  483. break;
  484. case 23:
  485. message.tokenLengthsOutputFeatureName = reader.string();
  486. break;
  487. case 100:
  488. message.modelParameterData = reader.bytes();
  489. break;
  490. case 200:
  491. message.stringTags = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  492. break;
  493. default:
  494. reader.skipType(tag & 7);
  495. break;
  496. }
  497. }
  498. return message;
  499. }
  500. };
  501. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.revision = 0;
  502. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.language = "";
  503. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.tokensOutputFeatureName = "";
  504. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenTagsOutputFeatureName = "";
  505. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenLocationsOutputFeatureName = "";
  506. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenLengthsOutputFeatureName = "";
  507. $root.CoreML.Specification.CoreMLModels.WordTagger.prototype.modelParameterData = new Uint8Array([]);
  508. $root.CoreML.Specification.CoreMLModels.Gazetteer = class Gazetteer {
  509. constructor() {
  510. }
  511. get ClassLabels() {
  512. $root.CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet = $root.CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet || new Set([ "stringClassLabels"]);
  513. return Object.keys(this).find((key) => $root.CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet.has(key) && this[key] != null);
  514. }
  515. static decode(reader, length) {
  516. const message = new $root.CoreML.Specification.CoreMLModels.Gazetteer();
  517. const end = reader.next(length);
  518. while (reader.end(end)) {
  519. const tag = reader.uint32();
  520. switch (tag >>> 3) {
  521. case 1:
  522. message.revision = reader.uint32();
  523. break;
  524. case 10:
  525. message.language = reader.string();
  526. break;
  527. case 100:
  528. message.modelParameterData = reader.bytes();
  529. break;
  530. case 200:
  531. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  532. break;
  533. default:
  534. reader.skipType(tag & 7);
  535. break;
  536. }
  537. }
  538. return message;
  539. }
  540. };
  541. $root.CoreML.Specification.CoreMLModels.Gazetteer.prototype.revision = 0;
  542. $root.CoreML.Specification.CoreMLModels.Gazetteer.prototype.language = "";
  543. $root.CoreML.Specification.CoreMLModels.Gazetteer.prototype.modelParameterData = new Uint8Array([]);
  544. $root.CoreML.Specification.CoreMLModels.WordEmbedding = class WordEmbedding {
  545. constructor() {
  546. }
  547. static decode(reader, length) {
  548. const message = new $root.CoreML.Specification.CoreMLModels.WordEmbedding();
  549. const end = reader.next(length);
  550. while (reader.end(end)) {
  551. const tag = reader.uint32();
  552. switch (tag >>> 3) {
  553. case 1:
  554. message.revision = reader.uint32();
  555. break;
  556. case 10:
  557. message.language = reader.string();
  558. break;
  559. case 100:
  560. message.modelParameterData = reader.bytes();
  561. break;
  562. default:
  563. reader.skipType(tag & 7);
  564. break;
  565. }
  566. }
  567. return message;
  568. }
  569. };
  570. $root.CoreML.Specification.CoreMLModels.WordEmbedding.prototype.revision = 0;
  571. $root.CoreML.Specification.CoreMLModels.WordEmbedding.prototype.language = "";
  572. $root.CoreML.Specification.CoreMLModels.WordEmbedding.prototype.modelParameterData = new Uint8Array([]);
  573. $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing = class SoundAnalysisPreprocessing {
  574. constructor() {
  575. }
  576. get SoundAnalysisPreprocessingType() {
  577. $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet = $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet || new Set([ "vggish"]);
  578. return Object.keys(this).find((key) => $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet.has(key) && this[key] != null);
  579. }
  580. static decode(reader, length) {
  581. const message = new $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing();
  582. const end = reader.next(length);
  583. while (reader.end(end)) {
  584. const tag = reader.uint32();
  585. switch (tag >>> 3) {
  586. case 20:
  587. message.vggish = $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish.decode(reader, reader.uint32());
  588. break;
  589. default:
  590. reader.skipType(tag & 7);
  591. break;
  592. }
  593. }
  594. return message;
  595. }
  596. };
  597. $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish = class Vggish {
  598. constructor() {
  599. }
  600. static decode(reader, length) {
  601. const message = new $root.CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish();
  602. const end = reader.next(length);
  603. while (reader.end(end)) {
  604. const tag = reader.uint32();
  605. switch (tag >>> 3) {
  606. default:
  607. reader.skipType(tag & 7);
  608. break;
  609. }
  610. }
  611. return message;
  612. }
  613. };
  614. $root.CoreML.Specification.StringToInt64Map = class StringToInt64Map {
  615. constructor() {
  616. this.map = {};
  617. }
  618. static decode(reader, length) {
  619. const message = new $root.CoreML.Specification.StringToInt64Map();
  620. const end = reader.next(length);
  621. while (reader.end(end)) {
  622. const tag = reader.uint32();
  623. switch (tag >>> 3) {
  624. case 1:
  625. reader.entry(message.map, () => reader.string(), () => reader.int64());
  626. break;
  627. default:
  628. reader.skipType(tag & 7);
  629. break;
  630. }
  631. }
  632. return message;
  633. }
  634. };
  635. $root.CoreML.Specification.Int64ToStringMap = class Int64ToStringMap {
  636. constructor() {
  637. this.map = {};
  638. }
  639. static decode(reader, length) {
  640. const message = new $root.CoreML.Specification.Int64ToStringMap();
  641. const end = reader.next(length);
  642. while (reader.end(end)) {
  643. const tag = reader.uint32();
  644. switch (tag >>> 3) {
  645. case 1:
  646. reader.entry(message.map, () => reader.int64(), () => reader.string());
  647. break;
  648. default:
  649. reader.skipType(tag & 7);
  650. break;
  651. }
  652. }
  653. return message;
  654. }
  655. };
  656. $root.CoreML.Specification.StringToDoubleMap = class StringToDoubleMap {
  657. constructor() {
  658. this.map = {};
  659. }
  660. static decode(reader, length) {
  661. const message = new $root.CoreML.Specification.StringToDoubleMap();
  662. const end = reader.next(length);
  663. while (reader.end(end)) {
  664. const tag = reader.uint32();
  665. switch (tag >>> 3) {
  666. case 1:
  667. reader.entry(message.map, () => reader.string(), () => reader.double());
  668. break;
  669. default:
  670. reader.skipType(tag & 7);
  671. break;
  672. }
  673. }
  674. return message;
  675. }
  676. };
  677. $root.CoreML.Specification.Int64ToDoubleMap = class Int64ToDoubleMap {
  678. constructor() {
  679. this.map = {};
  680. }
  681. static decode(reader, length) {
  682. const message = new $root.CoreML.Specification.Int64ToDoubleMap();
  683. const end = reader.next(length);
  684. while (reader.end(end)) {
  685. const tag = reader.uint32();
  686. switch (tag >>> 3) {
  687. case 1:
  688. reader.entry(message.map, () => reader.int64(), () => reader.double());
  689. break;
  690. default:
  691. reader.skipType(tag & 7);
  692. break;
  693. }
  694. }
  695. return message;
  696. }
  697. };
  698. $root.CoreML.Specification.StringVector = class StringVector {
  699. constructor() {
  700. this.vector = [];
  701. }
  702. static decode(reader, length) {
  703. const message = new $root.CoreML.Specification.StringVector();
  704. const end = reader.next(length);
  705. while (reader.end(end)) {
  706. const tag = reader.uint32();
  707. switch (tag >>> 3) {
  708. case 1:
  709. message.vector.push(reader.string());
  710. break;
  711. default:
  712. reader.skipType(tag & 7);
  713. break;
  714. }
  715. }
  716. return message;
  717. }
  718. };
  719. $root.CoreML.Specification.Int64Vector = class Int64Vector {
  720. constructor() {
  721. this.vector = [];
  722. }
  723. static decode(reader, length) {
  724. const message = new $root.CoreML.Specification.Int64Vector();
  725. const end = reader.next(length);
  726. while (reader.end(end)) {
  727. const tag = reader.uint32();
  728. switch (tag >>> 3) {
  729. case 1:
  730. message.vector = reader.array(message.vector, () => reader.int64(), tag);
  731. break;
  732. default:
  733. reader.skipType(tag & 7);
  734. break;
  735. }
  736. }
  737. return message;
  738. }
  739. };
  740. $root.CoreML.Specification.FloatVector = class FloatVector {
  741. constructor() {
  742. this.vector = [];
  743. }
  744. static decode(reader, length) {
  745. const message = new $root.CoreML.Specification.FloatVector();
  746. const end = reader.next(length);
  747. while (reader.end(end)) {
  748. const tag = reader.uint32();
  749. switch (tag >>> 3) {
  750. case 1:
  751. message.vector = reader.floats(message.vector, tag);
  752. break;
  753. default:
  754. reader.skipType(tag & 7);
  755. break;
  756. }
  757. }
  758. return message;
  759. }
  760. };
  761. $root.CoreML.Specification.DoubleVector = class DoubleVector {
  762. constructor() {
  763. this.vector = [];
  764. }
  765. static decode(reader, length) {
  766. const message = new $root.CoreML.Specification.DoubleVector();
  767. const end = reader.next(length);
  768. while (reader.end(end)) {
  769. const tag = reader.uint32();
  770. switch (tag >>> 3) {
  771. case 1:
  772. message.vector = reader.doubles(message.vector, tag);
  773. break;
  774. default:
  775. reader.skipType(tag & 7);
  776. break;
  777. }
  778. }
  779. return message;
  780. }
  781. };
  782. $root.CoreML.Specification.Int64Range = class Int64Range {
  783. constructor() {
  784. }
  785. static decode(reader, length) {
  786. const message = new $root.CoreML.Specification.Int64Range();
  787. const end = reader.next(length);
  788. while (reader.end(end)) {
  789. const tag = reader.uint32();
  790. switch (tag >>> 3) {
  791. case 1:
  792. message.minValue = reader.int64();
  793. break;
  794. case 2:
  795. message.maxValue = reader.int64();
  796. break;
  797. default:
  798. reader.skipType(tag & 7);
  799. break;
  800. }
  801. }
  802. return message;
  803. }
  804. };
  805. $root.CoreML.Specification.Int64Range.prototype.minValue = protobuf.Int64.create(0);
  806. $root.CoreML.Specification.Int64Range.prototype.maxValue = protobuf.Int64.create(0);
  807. $root.CoreML.Specification.Int64Set = class Int64Set {
  808. constructor() {
  809. this.values = [];
  810. }
  811. static decode(reader, length) {
  812. const message = new $root.CoreML.Specification.Int64Set();
  813. const end = reader.next(length);
  814. while (reader.end(end)) {
  815. const tag = reader.uint32();
  816. switch (tag >>> 3) {
  817. case 1:
  818. message.values = reader.array(message.values, () => reader.int64(), tag);
  819. break;
  820. default:
  821. reader.skipType(tag & 7);
  822. break;
  823. }
  824. }
  825. return message;
  826. }
  827. };
  828. $root.CoreML.Specification.DoubleRange = class DoubleRange {
  829. constructor() {
  830. }
  831. static decode(reader, length) {
  832. const message = new $root.CoreML.Specification.DoubleRange();
  833. const end = reader.next(length);
  834. while (reader.end(end)) {
  835. const tag = reader.uint32();
  836. switch (tag >>> 3) {
  837. case 1:
  838. message.minValue = reader.double();
  839. break;
  840. case 2:
  841. message.maxValue = reader.double();
  842. break;
  843. default:
  844. reader.skipType(tag & 7);
  845. break;
  846. }
  847. }
  848. return message;
  849. }
  850. };
  851. $root.CoreML.Specification.DoubleRange.prototype.minValue = 0;
  852. $root.CoreML.Specification.DoubleRange.prototype.maxValue = 0;
  853. $root.CoreML.Specification.Int64FeatureType = class Int64FeatureType {
  854. constructor() {
  855. }
  856. static decode(reader, length) {
  857. const message = new $root.CoreML.Specification.Int64FeatureType();
  858. const end = reader.next(length);
  859. while (reader.end(end)) {
  860. const tag = reader.uint32();
  861. switch (tag >>> 3) {
  862. default:
  863. reader.skipType(tag & 7);
  864. break;
  865. }
  866. }
  867. return message;
  868. }
  869. };
  870. $root.CoreML.Specification.DoubleFeatureType = class DoubleFeatureType {
  871. constructor() {
  872. }
  873. static decode(reader, length) {
  874. const message = new $root.CoreML.Specification.DoubleFeatureType();
  875. const end = reader.next(length);
  876. while (reader.end(end)) {
  877. const tag = reader.uint32();
  878. switch (tag >>> 3) {
  879. default:
  880. reader.skipType(tag & 7);
  881. break;
  882. }
  883. }
  884. return message;
  885. }
  886. };
  887. $root.CoreML.Specification.StringFeatureType = class StringFeatureType {
  888. constructor() {
  889. }
  890. static decode(reader, length) {
  891. const message = new $root.CoreML.Specification.StringFeatureType();
  892. const end = reader.next(length);
  893. while (reader.end(end)) {
  894. const tag = reader.uint32();
  895. switch (tag >>> 3) {
  896. default:
  897. reader.skipType(tag & 7);
  898. break;
  899. }
  900. }
  901. return message;
  902. }
  903. };
  904. $root.CoreML.Specification.SizeRange = class SizeRange {
  905. constructor() {
  906. }
  907. static decode(reader, length) {
  908. const message = new $root.CoreML.Specification.SizeRange();
  909. const end = reader.next(length);
  910. while (reader.end(end)) {
  911. const tag = reader.uint32();
  912. switch (tag >>> 3) {
  913. case 1:
  914. message.lowerBound = reader.uint64();
  915. break;
  916. case 2:
  917. message.upperBound = reader.int64();
  918. break;
  919. default:
  920. reader.skipType(tag & 7);
  921. break;
  922. }
  923. }
  924. return message;
  925. }
  926. };
  927. $root.CoreML.Specification.SizeRange.prototype.lowerBound = protobuf.Uint64.create(0);
  928. $root.CoreML.Specification.SizeRange.prototype.upperBound = protobuf.Int64.create(0);
  929. $root.CoreML.Specification.ImageFeatureType = class ImageFeatureType {
  930. constructor() {
  931. }
  932. get SizeFlexibility() {
  933. $root.CoreML.Specification.ImageFeatureType.SizeFlexibilitySet = $root.CoreML.Specification.ImageFeatureType.SizeFlexibilitySet || new Set([ "enumeratedSizes", "imageSizeRange"]);
  934. return Object.keys(this).find((key) => $root.CoreML.Specification.ImageFeatureType.SizeFlexibilitySet.has(key) && this[key] != null);
  935. }
  936. static decode(reader, length) {
  937. const message = new $root.CoreML.Specification.ImageFeatureType();
  938. const end = reader.next(length);
  939. while (reader.end(end)) {
  940. const tag = reader.uint32();
  941. switch (tag >>> 3) {
  942. case 1:
  943. message.width = reader.int64();
  944. break;
  945. case 2:
  946. message.height = reader.int64();
  947. break;
  948. case 21:
  949. message.enumeratedSizes = $root.CoreML.Specification.ImageFeatureType.EnumeratedImageSizes.decode(reader, reader.uint32());
  950. break;
  951. case 31:
  952. message.imageSizeRange = $root.CoreML.Specification.ImageFeatureType.ImageSizeRange.decode(reader, reader.uint32());
  953. break;
  954. case 3:
  955. message.colorSpace = reader.int32();
  956. break;
  957. default:
  958. reader.skipType(tag & 7);
  959. break;
  960. }
  961. }
  962. return message;
  963. }
  964. };
  965. $root.CoreML.Specification.ImageFeatureType.prototype.width = protobuf.Int64.create(0);
  966. $root.CoreML.Specification.ImageFeatureType.prototype.height = protobuf.Int64.create(0);
  967. $root.CoreML.Specification.ImageFeatureType.prototype.colorSpace = 0;
  968. $root.CoreML.Specification.ImageFeatureType.ColorSpace = {
  969. "INVALID_COLOR_SPACE": 0,
  970. "GRAYSCALE": 10,
  971. "RGB": 20,
  972. "BGR": 30
  973. };
  974. $root.CoreML.Specification.ImageFeatureType.ImageSize = class ImageSize {
  975. constructor() {
  976. }
  977. static decode(reader, length) {
  978. const message = new $root.CoreML.Specification.ImageFeatureType.ImageSize();
  979. const end = reader.next(length);
  980. while (reader.end(end)) {
  981. const tag = reader.uint32();
  982. switch (tag >>> 3) {
  983. case 1:
  984. message.width = reader.uint64();
  985. break;
  986. case 2:
  987. message.height = reader.uint64();
  988. break;
  989. default:
  990. reader.skipType(tag & 7);
  991. break;
  992. }
  993. }
  994. return message;
  995. }
  996. };
  997. $root.CoreML.Specification.ImageFeatureType.ImageSize.prototype.width = protobuf.Uint64.create(0);
  998. $root.CoreML.Specification.ImageFeatureType.ImageSize.prototype.height = protobuf.Uint64.create(0);
  999. $root.CoreML.Specification.ImageFeatureType.EnumeratedImageSizes = class EnumeratedImageSizes {
  1000. constructor() {
  1001. this.sizes = [];
  1002. }
  1003. static decode(reader, length) {
  1004. const message = new $root.CoreML.Specification.ImageFeatureType.EnumeratedImageSizes();
  1005. const end = reader.next(length);
  1006. while (reader.end(end)) {
  1007. const tag = reader.uint32();
  1008. switch (tag >>> 3) {
  1009. case 1:
  1010. message.sizes.push($root.CoreML.Specification.ImageFeatureType.ImageSize.decode(reader, reader.uint32()));
  1011. break;
  1012. default:
  1013. reader.skipType(tag & 7);
  1014. break;
  1015. }
  1016. }
  1017. return message;
  1018. }
  1019. };
  1020. $root.CoreML.Specification.ImageFeatureType.ImageSizeRange = class ImageSizeRange {
  1021. constructor() {
  1022. }
  1023. static decode(reader, length) {
  1024. const message = new $root.CoreML.Specification.ImageFeatureType.ImageSizeRange();
  1025. const end = reader.next(length);
  1026. while (reader.end(end)) {
  1027. const tag = reader.uint32();
  1028. switch (tag >>> 3) {
  1029. case 1:
  1030. message.widthRange = $root.CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  1031. break;
  1032. case 2:
  1033. message.heightRange = $root.CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  1034. break;
  1035. default:
  1036. reader.skipType(tag & 7);
  1037. break;
  1038. }
  1039. }
  1040. return message;
  1041. }
  1042. };
  1043. $root.CoreML.Specification.ImageFeatureType.ImageSizeRange.prototype.widthRange = null;
  1044. $root.CoreML.Specification.ImageFeatureType.ImageSizeRange.prototype.heightRange = null;
  1045. $root.CoreML.Specification.ArrayFeatureType = class ArrayFeatureType {
  1046. constructor() {
  1047. this.shape = [];
  1048. }
  1049. get ShapeFlexibility() {
  1050. $root.CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet = $root.CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet || new Set([ "enumeratedShapes", "shapeRange"]);
  1051. return Object.keys(this).find((key) => $root.CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet.has(key) && this[key] != null);
  1052. }
  1053. get defaultOptionalValue() {
  1054. $root.CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet = $root.CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet || new Set([ "intDefaultValue", "floatDefaultValue", "doubleDefaultValue"]);
  1055. return Object.keys(this).find((key) => $root.CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet.has(key) && this[key] != null);
  1056. }
  1057. static decode(reader, length) {
  1058. const message = new $root.CoreML.Specification.ArrayFeatureType();
  1059. const end = reader.next(length);
  1060. while (reader.end(end)) {
  1061. const tag = reader.uint32();
  1062. switch (tag >>> 3) {
  1063. case 1:
  1064. message.shape = reader.array(message.shape, () => reader.int64(), tag);
  1065. break;
  1066. case 2:
  1067. message.dataType = reader.int32();
  1068. break;
  1069. case 21:
  1070. message.enumeratedShapes = $root.CoreML.Specification.ArrayFeatureType.EnumeratedShapes.decode(reader, reader.uint32());
  1071. break;
  1072. case 31:
  1073. message.shapeRange = $root.CoreML.Specification.ArrayFeatureType.ShapeRange.decode(reader, reader.uint32());
  1074. break;
  1075. case 41:
  1076. message.intDefaultValue = reader.int32();
  1077. break;
  1078. case 51:
  1079. message.floatDefaultValue = reader.float();
  1080. break;
  1081. case 61:
  1082. message.doubleDefaultValue = reader.double();
  1083. break;
  1084. default:
  1085. reader.skipType(tag & 7);
  1086. break;
  1087. }
  1088. }
  1089. return message;
  1090. }
  1091. };
  1092. $root.CoreML.Specification.ArrayFeatureType.prototype.dataType = 0;
  1093. $root.CoreML.Specification.ArrayFeatureType.ArrayDataType = {
  1094. "INVALID_ARRAY_DATA_TYPE": 0,
  1095. "FLOAT32": 65568,
  1096. "DOUBLE": 65600,
  1097. "INT32": 131104
  1098. };
  1099. $root.CoreML.Specification.ArrayFeatureType.Shape = class Shape {
  1100. constructor() {
  1101. this.shape = [];
  1102. }
  1103. static decode(reader, length) {
  1104. const message = new $root.CoreML.Specification.ArrayFeatureType.Shape();
  1105. const end = reader.next(length);
  1106. while (reader.end(end)) {
  1107. const tag = reader.uint32();
  1108. switch (tag >>> 3) {
  1109. case 1:
  1110. message.shape = reader.array(message.shape, () => reader.int64(), tag);
  1111. break;
  1112. default:
  1113. reader.skipType(tag & 7);
  1114. break;
  1115. }
  1116. }
  1117. return message;
  1118. }
  1119. };
  1120. $root.CoreML.Specification.ArrayFeatureType.EnumeratedShapes = class EnumeratedShapes {
  1121. constructor() {
  1122. this.shapes = [];
  1123. }
  1124. static decode(reader, length) {
  1125. const message = new $root.CoreML.Specification.ArrayFeatureType.EnumeratedShapes();
  1126. const end = reader.next(length);
  1127. while (reader.end(end)) {
  1128. const tag = reader.uint32();
  1129. switch (tag >>> 3) {
  1130. case 1:
  1131. message.shapes.push($root.CoreML.Specification.ArrayFeatureType.Shape.decode(reader, reader.uint32()));
  1132. break;
  1133. default:
  1134. reader.skipType(tag & 7);
  1135. break;
  1136. }
  1137. }
  1138. return message;
  1139. }
  1140. };
  1141. $root.CoreML.Specification.ArrayFeatureType.ShapeRange = class ShapeRange {
  1142. constructor() {
  1143. this.sizeRanges = [];
  1144. }
  1145. static decode(reader, length) {
  1146. const message = new $root.CoreML.Specification.ArrayFeatureType.ShapeRange();
  1147. const end = reader.next(length);
  1148. while (reader.end(end)) {
  1149. const tag = reader.uint32();
  1150. switch (tag >>> 3) {
  1151. case 1:
  1152. message.sizeRanges.push($root.CoreML.Specification.SizeRange.decode(reader, reader.uint32()));
  1153. break;
  1154. default:
  1155. reader.skipType(tag & 7);
  1156. break;
  1157. }
  1158. }
  1159. return message;
  1160. }
  1161. };
  1162. $root.CoreML.Specification.DictionaryFeatureType = class DictionaryFeatureType {
  1163. constructor() {
  1164. }
  1165. get KeyType() {
  1166. $root.CoreML.Specification.DictionaryFeatureType.KeyTypeSet = $root.CoreML.Specification.DictionaryFeatureType.KeyTypeSet || new Set([ "int64KeyType", "stringKeyType"]);
  1167. return Object.keys(this).find((key) => $root.CoreML.Specification.DictionaryFeatureType.KeyTypeSet.has(key) && this[key] != null);
  1168. }
  1169. static decode(reader, length) {
  1170. const message = new $root.CoreML.Specification.DictionaryFeatureType();
  1171. const end = reader.next(length);
  1172. while (reader.end(end)) {
  1173. const tag = reader.uint32();
  1174. switch (tag >>> 3) {
  1175. case 1:
  1176. message.int64KeyType = $root.CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  1177. break;
  1178. case 2:
  1179. message.stringKeyType = $root.CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  1180. break;
  1181. default:
  1182. reader.skipType(tag & 7);
  1183. break;
  1184. }
  1185. }
  1186. return message;
  1187. }
  1188. };
  1189. $root.CoreML.Specification.SequenceFeatureType = class SequenceFeatureType {
  1190. constructor() {
  1191. }
  1192. get Type() {
  1193. $root.CoreML.Specification.SequenceFeatureType.TypeSet = $root.CoreML.Specification.SequenceFeatureType.TypeSet || new Set([ "int64Type", "stringType"]);
  1194. return Object.keys(this).find((key) => $root.CoreML.Specification.SequenceFeatureType.TypeSet.has(key) && this[key] != null);
  1195. }
  1196. static decode(reader, length) {
  1197. const message = new $root.CoreML.Specification.SequenceFeatureType();
  1198. const end = reader.next(length);
  1199. while (reader.end(end)) {
  1200. const tag = reader.uint32();
  1201. switch (tag >>> 3) {
  1202. case 1:
  1203. message.int64Type = $root.CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  1204. break;
  1205. case 3:
  1206. message.stringType = $root.CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  1207. break;
  1208. case 101:
  1209. message.sizeRange = $root.CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  1210. break;
  1211. default:
  1212. reader.skipType(tag & 7);
  1213. break;
  1214. }
  1215. }
  1216. return message;
  1217. }
  1218. };
  1219. $root.CoreML.Specification.SequenceFeatureType.prototype.sizeRange = null;
  1220. $root.CoreML.Specification.FeatureType = class FeatureType {
  1221. constructor() {
  1222. }
  1223. get Type() {
  1224. $root.CoreML.Specification.FeatureType.TypeSet = $root.CoreML.Specification.FeatureType.TypeSet || new Set([ "int64Type", "doubleType", "stringType", "imageType", "multiArrayType", "dictionaryType", "sequenceType"]);
  1225. return Object.keys(this).find((key) => $root.CoreML.Specification.FeatureType.TypeSet.has(key) && this[key] != null);
  1226. }
  1227. static decode(reader, length) {
  1228. const message = new $root.CoreML.Specification.FeatureType();
  1229. const end = reader.next(length);
  1230. while (reader.end(end)) {
  1231. const tag = reader.uint32();
  1232. switch (tag >>> 3) {
  1233. case 1:
  1234. message.int64Type = $root.CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  1235. break;
  1236. case 2:
  1237. message.doubleType = $root.CoreML.Specification.DoubleFeatureType.decode(reader, reader.uint32());
  1238. break;
  1239. case 3:
  1240. message.stringType = $root.CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  1241. break;
  1242. case 4:
  1243. message.imageType = $root.CoreML.Specification.ImageFeatureType.decode(reader, reader.uint32());
  1244. break;
  1245. case 5:
  1246. message.multiArrayType = $root.CoreML.Specification.ArrayFeatureType.decode(reader, reader.uint32());
  1247. break;
  1248. case 6:
  1249. message.dictionaryType = $root.CoreML.Specification.DictionaryFeatureType.decode(reader, reader.uint32());
  1250. break;
  1251. case 7:
  1252. message.sequenceType = $root.CoreML.Specification.SequenceFeatureType.decode(reader, reader.uint32());
  1253. break;
  1254. case 1000:
  1255. message.isOptional = reader.bool();
  1256. break;
  1257. default:
  1258. reader.skipType(tag & 7);
  1259. break;
  1260. }
  1261. }
  1262. return message;
  1263. }
  1264. };
  1265. $root.CoreML.Specification.FeatureType.prototype.isOptional = false;
  1266. $root.CoreML.Specification.ArrayFeatureExtractor = class ArrayFeatureExtractor {
  1267. constructor() {
  1268. this.extractIndex = [];
  1269. }
  1270. static decode(reader, length) {
  1271. const message = new $root.CoreML.Specification.ArrayFeatureExtractor();
  1272. const end = reader.next(length);
  1273. while (reader.end(end)) {
  1274. const tag = reader.uint32();
  1275. switch (tag >>> 3) {
  1276. case 1:
  1277. message.extractIndex = reader.array(message.extractIndex, () => reader.uint64(), tag);
  1278. break;
  1279. default:
  1280. reader.skipType(tag & 7);
  1281. break;
  1282. }
  1283. }
  1284. return message;
  1285. }
  1286. };
  1287. $root.CoreML.Specification.BayesianProbitRegressor = class BayesianProbitRegressor {
  1288. constructor() {
  1289. this.features = [];
  1290. }
  1291. static decode(reader, length) {
  1292. const message = new $root.CoreML.Specification.BayesianProbitRegressor();
  1293. const end = reader.next(length);
  1294. while (reader.end(end)) {
  1295. const tag = reader.uint32();
  1296. switch (tag >>> 3) {
  1297. case 1:
  1298. message.numberOfFeatures = reader.uint32();
  1299. break;
  1300. case 2:
  1301. message.bias = $root.CoreML.Specification.BayesianProbitRegressor.Gaussian.decode(reader, reader.uint32());
  1302. break;
  1303. case 3:
  1304. message.features.push($root.CoreML.Specification.BayesianProbitRegressor.FeatureWeight.decode(reader, reader.uint32()));
  1305. break;
  1306. case 10:
  1307. message.regressionInputFeatureName = reader.string();
  1308. break;
  1309. case 11:
  1310. message.optimismInputFeatureName = reader.string();
  1311. break;
  1312. case 12:
  1313. message.samplingScaleInputFeatureName = reader.string();
  1314. break;
  1315. case 13:
  1316. message.samplingTruncationInputFeatureName = reader.string();
  1317. break;
  1318. case 20:
  1319. message.meanOutputFeatureName = reader.string();
  1320. break;
  1321. case 21:
  1322. message.varianceOutputFeatureName = reader.string();
  1323. break;
  1324. case 22:
  1325. message.pessimisticProbabilityOutputFeatureName = reader.string();
  1326. break;
  1327. case 23:
  1328. message.sampledProbabilityOutputFeatureName = reader.string();
  1329. break;
  1330. default:
  1331. reader.skipType(tag & 7);
  1332. break;
  1333. }
  1334. }
  1335. return message;
  1336. }
  1337. };
  1338. $root.CoreML.Specification.BayesianProbitRegressor.prototype.numberOfFeatures = 0;
  1339. $root.CoreML.Specification.BayesianProbitRegressor.prototype.bias = null;
  1340. $root.CoreML.Specification.BayesianProbitRegressor.prototype.regressionInputFeatureName = "";
  1341. $root.CoreML.Specification.BayesianProbitRegressor.prototype.optimismInputFeatureName = "";
  1342. $root.CoreML.Specification.BayesianProbitRegressor.prototype.samplingScaleInputFeatureName = "";
  1343. $root.CoreML.Specification.BayesianProbitRegressor.prototype.samplingTruncationInputFeatureName = "";
  1344. $root.CoreML.Specification.BayesianProbitRegressor.prototype.meanOutputFeatureName = "";
  1345. $root.CoreML.Specification.BayesianProbitRegressor.prototype.varianceOutputFeatureName = "";
  1346. $root.CoreML.Specification.BayesianProbitRegressor.prototype.pessimisticProbabilityOutputFeatureName = "";
  1347. $root.CoreML.Specification.BayesianProbitRegressor.prototype.sampledProbabilityOutputFeatureName = "";
  1348. $root.CoreML.Specification.BayesianProbitRegressor.Gaussian = class Gaussian {
  1349. constructor() {
  1350. }
  1351. static decode(reader, length) {
  1352. const message = new $root.CoreML.Specification.BayesianProbitRegressor.Gaussian();
  1353. const end = reader.next(length);
  1354. while (reader.end(end)) {
  1355. const tag = reader.uint32();
  1356. switch (tag >>> 3) {
  1357. case 1:
  1358. message.mean = reader.double();
  1359. break;
  1360. case 2:
  1361. message.precision = reader.double();
  1362. break;
  1363. default:
  1364. reader.skipType(tag & 7);
  1365. break;
  1366. }
  1367. }
  1368. return message;
  1369. }
  1370. };
  1371. $root.CoreML.Specification.BayesianProbitRegressor.Gaussian.prototype.mean = 0;
  1372. $root.CoreML.Specification.BayesianProbitRegressor.Gaussian.prototype.precision = 0;
  1373. $root.CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight = class FeatureValueWeight {
  1374. constructor() {
  1375. }
  1376. static decode(reader, length) {
  1377. const message = new $root.CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight();
  1378. const end = reader.next(length);
  1379. while (reader.end(end)) {
  1380. const tag = reader.uint32();
  1381. switch (tag >>> 3) {
  1382. case 1:
  1383. message.featureValue = reader.uint32();
  1384. break;
  1385. case 2:
  1386. message.featureWeight = $root.CoreML.Specification.BayesianProbitRegressor.Gaussian.decode(reader, reader.uint32());
  1387. break;
  1388. default:
  1389. reader.skipType(tag & 7);
  1390. break;
  1391. }
  1392. }
  1393. return message;
  1394. }
  1395. };
  1396. $root.CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.prototype.featureValue = 0;
  1397. $root.CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.prototype.featureWeight = null;
  1398. $root.CoreML.Specification.BayesianProbitRegressor.FeatureWeight = class FeatureWeight {
  1399. constructor() {
  1400. this.weights = [];
  1401. }
  1402. static decode(reader, length) {
  1403. const message = new $root.CoreML.Specification.BayesianProbitRegressor.FeatureWeight();
  1404. const end = reader.next(length);
  1405. while (reader.end(end)) {
  1406. const tag = reader.uint32();
  1407. switch (tag >>> 3) {
  1408. case 1:
  1409. message.featureId = reader.uint32();
  1410. break;
  1411. case 2:
  1412. message.weights.push($root.CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.decode(reader, reader.uint32()));
  1413. break;
  1414. default:
  1415. reader.skipType(tag & 7);
  1416. break;
  1417. }
  1418. }
  1419. return message;
  1420. }
  1421. };
  1422. $root.CoreML.Specification.BayesianProbitRegressor.FeatureWeight.prototype.featureId = 0;
  1423. $root.CoreML.Specification.CategoricalMapping = class CategoricalMapping {
  1424. constructor() {
  1425. }
  1426. get MappingType() {
  1427. $root.CoreML.Specification.CategoricalMapping.MappingTypeSet = $root.CoreML.Specification.CategoricalMapping.MappingTypeSet || new Set([ "stringToInt64Map", "int64ToStringMap"]);
  1428. return Object.keys(this).find((key) => $root.CoreML.Specification.CategoricalMapping.MappingTypeSet.has(key) && this[key] != null);
  1429. }
  1430. get ValueOnUnknown() {
  1431. $root.CoreML.Specification.CategoricalMapping.ValueOnUnknownSet = $root.CoreML.Specification.CategoricalMapping.ValueOnUnknownSet || new Set([ "strValue", "int64Value"]);
  1432. return Object.keys(this).find((key) => $root.CoreML.Specification.CategoricalMapping.ValueOnUnknownSet.has(key) && this[key] != null);
  1433. }
  1434. static decode(reader, length) {
  1435. const message = new $root.CoreML.Specification.CategoricalMapping();
  1436. const end = reader.next(length);
  1437. while (reader.end(end)) {
  1438. const tag = reader.uint32();
  1439. switch (tag >>> 3) {
  1440. case 1:
  1441. message.stringToInt64Map = $root.CoreML.Specification.StringToInt64Map.decode(reader, reader.uint32());
  1442. break;
  1443. case 2:
  1444. message.int64ToStringMap = $root.CoreML.Specification.Int64ToStringMap.decode(reader, reader.uint32());
  1445. break;
  1446. case 101:
  1447. message.strValue = reader.string();
  1448. break;
  1449. case 102:
  1450. message.int64Value = reader.int64();
  1451. break;
  1452. default:
  1453. reader.skipType(tag & 7);
  1454. break;
  1455. }
  1456. }
  1457. return message;
  1458. }
  1459. };
  1460. $root.CoreML.Specification.CustomModel = class CustomModel {
  1461. constructor() {
  1462. this.parameters = {};
  1463. }
  1464. static decode(reader, length) {
  1465. const message = new $root.CoreML.Specification.CustomModel();
  1466. const end = reader.next(length);
  1467. while (reader.end(end)) {
  1468. const tag = reader.uint32();
  1469. switch (tag >>> 3) {
  1470. case 10:
  1471. message.className = reader.string();
  1472. break;
  1473. case 30:
  1474. reader.entry(message.parameters, () => reader.string(), () => $root.CoreML.Specification.CustomModel.CustomModelParamValue.decode(reader, reader.uint32()));
  1475. break;
  1476. case 40:
  1477. message.description = reader.string();
  1478. break;
  1479. default:
  1480. reader.skipType(tag & 7);
  1481. break;
  1482. }
  1483. }
  1484. return message;
  1485. }
  1486. };
  1487. $root.CoreML.Specification.CustomModel.prototype.className = "";
  1488. $root.CoreML.Specification.CustomModel.prototype.description = "";
  1489. $root.CoreML.Specification.CustomModel.CustomModelParamValue = class CustomModelParamValue {
  1490. constructor() {
  1491. }
  1492. get value() {
  1493. $root.CoreML.Specification.CustomModel.CustomModelParamValue.valueSet = $root.CoreML.Specification.CustomModel.CustomModelParamValue.valueSet || new Set([ "doubleValue", "stringValue", "intValue", "longValue", "boolValue", "bytesValue"]);
  1494. return Object.keys(this).find((key) => $root.CoreML.Specification.CustomModel.CustomModelParamValue.valueSet.has(key) && this[key] != null);
  1495. }
  1496. static decode(reader, length) {
  1497. const message = new $root.CoreML.Specification.CustomModel.CustomModelParamValue();
  1498. const end = reader.next(length);
  1499. while (reader.end(end)) {
  1500. const tag = reader.uint32();
  1501. switch (tag >>> 3) {
  1502. case 10:
  1503. message.doubleValue = reader.double();
  1504. break;
  1505. case 20:
  1506. message.stringValue = reader.string();
  1507. break;
  1508. case 30:
  1509. message.intValue = reader.int32();
  1510. break;
  1511. case 40:
  1512. message.longValue = reader.int64();
  1513. break;
  1514. case 50:
  1515. message.boolValue = reader.bool();
  1516. break;
  1517. case 60:
  1518. message.bytesValue = reader.bytes();
  1519. break;
  1520. default:
  1521. reader.skipType(tag & 7);
  1522. break;
  1523. }
  1524. }
  1525. return message;
  1526. }
  1527. };
  1528. $root.CoreML.Specification.DictVectorizer = class DictVectorizer {
  1529. constructor() {
  1530. }
  1531. get Map() {
  1532. $root.CoreML.Specification.DictVectorizer.MapSet = $root.CoreML.Specification.DictVectorizer.MapSet || new Set([ "stringToIndex", "int64ToIndex"]);
  1533. return Object.keys(this).find((key) => $root.CoreML.Specification.DictVectorizer.MapSet.has(key) && this[key] != null);
  1534. }
  1535. static decode(reader, length) {
  1536. const message = new $root.CoreML.Specification.DictVectorizer();
  1537. const end = reader.next(length);
  1538. while (reader.end(end)) {
  1539. const tag = reader.uint32();
  1540. switch (tag >>> 3) {
  1541. case 1:
  1542. message.stringToIndex = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  1543. break;
  1544. case 2:
  1545. message.int64ToIndex = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  1546. break;
  1547. default:
  1548. reader.skipType(tag & 7);
  1549. break;
  1550. }
  1551. }
  1552. return message;
  1553. }
  1554. };
  1555. $root.CoreML.Specification.FeatureVectorizer = class FeatureVectorizer {
  1556. constructor() {
  1557. this.inputList = [];
  1558. }
  1559. static decode(reader, length) {
  1560. const message = new $root.CoreML.Specification.FeatureVectorizer();
  1561. const end = reader.next(length);
  1562. while (reader.end(end)) {
  1563. const tag = reader.uint32();
  1564. switch (tag >>> 3) {
  1565. case 1:
  1566. message.inputList.push($root.CoreML.Specification.FeatureVectorizer.InputColumn.decode(reader, reader.uint32()));
  1567. break;
  1568. default:
  1569. reader.skipType(tag & 7);
  1570. break;
  1571. }
  1572. }
  1573. return message;
  1574. }
  1575. };
  1576. $root.CoreML.Specification.FeatureVectorizer.InputColumn = class InputColumn {
  1577. constructor() {
  1578. }
  1579. static decode(reader, length) {
  1580. const message = new $root.CoreML.Specification.FeatureVectorizer.InputColumn();
  1581. const end = reader.next(length);
  1582. while (reader.end(end)) {
  1583. const tag = reader.uint32();
  1584. switch (tag >>> 3) {
  1585. case 1:
  1586. message.inputColumn = reader.string();
  1587. break;
  1588. case 2:
  1589. message.inputDimensions = reader.uint64();
  1590. break;
  1591. default:
  1592. reader.skipType(tag & 7);
  1593. break;
  1594. }
  1595. }
  1596. return message;
  1597. }
  1598. };
  1599. $root.CoreML.Specification.FeatureVectorizer.InputColumn.prototype.inputColumn = "";
  1600. $root.CoreML.Specification.FeatureVectorizer.InputColumn.prototype.inputDimensions = protobuf.Uint64.create(0);
  1601. $root.CoreML.Specification.GLMRegressor = class GLMRegressor {
  1602. constructor() {
  1603. this.weights = [];
  1604. this.offset = [];
  1605. }
  1606. static decode(reader, length) {
  1607. const message = new $root.CoreML.Specification.GLMRegressor();
  1608. const end = reader.next(length);
  1609. while (reader.end(end)) {
  1610. const tag = reader.uint32();
  1611. switch (tag >>> 3) {
  1612. case 1:
  1613. message.weights.push($root.CoreML.Specification.GLMRegressor.DoubleArray.decode(reader, reader.uint32()));
  1614. break;
  1615. case 2:
  1616. message.offset = reader.doubles(message.offset, tag);
  1617. break;
  1618. case 3:
  1619. message.postEvaluationTransform = reader.int32();
  1620. break;
  1621. default:
  1622. reader.skipType(tag & 7);
  1623. break;
  1624. }
  1625. }
  1626. return message;
  1627. }
  1628. };
  1629. $root.CoreML.Specification.GLMRegressor.prototype.postEvaluationTransform = 0;
  1630. $root.CoreML.Specification.GLMRegressor.DoubleArray = class DoubleArray {
  1631. constructor() {
  1632. this.value = [];
  1633. }
  1634. static decode(reader, length) {
  1635. const message = new $root.CoreML.Specification.GLMRegressor.DoubleArray();
  1636. const end = reader.next(length);
  1637. while (reader.end(end)) {
  1638. const tag = reader.uint32();
  1639. switch (tag >>> 3) {
  1640. case 1:
  1641. message.value = reader.doubles(message.value, tag);
  1642. break;
  1643. default:
  1644. reader.skipType(tag & 7);
  1645. break;
  1646. }
  1647. }
  1648. return message;
  1649. }
  1650. };
  1651. $root.CoreML.Specification.GLMRegressor.PostEvaluationTransform = {
  1652. "NoTransform": 0,
  1653. "Logit": 1,
  1654. "Probit": 2
  1655. };
  1656. $root.CoreML.Specification.GLMClassifier = class GLMClassifier {
  1657. constructor() {
  1658. this.weights = [];
  1659. this.offset = [];
  1660. }
  1661. get ClassLabels() {
  1662. $root.CoreML.Specification.GLMClassifier.ClassLabelsSet = $root.CoreML.Specification.GLMClassifier.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  1663. return Object.keys(this).find((key) => $root.CoreML.Specification.GLMClassifier.ClassLabelsSet.has(key) && this[key] != null);
  1664. }
  1665. static decode(reader, length) {
  1666. const message = new $root.CoreML.Specification.GLMClassifier();
  1667. const end = reader.next(length);
  1668. while (reader.end(end)) {
  1669. const tag = reader.uint32();
  1670. switch (tag >>> 3) {
  1671. case 1:
  1672. message.weights.push($root.CoreML.Specification.GLMClassifier.DoubleArray.decode(reader, reader.uint32()));
  1673. break;
  1674. case 2:
  1675. message.offset = reader.doubles(message.offset, tag);
  1676. break;
  1677. case 3:
  1678. message.postEvaluationTransform = reader.int32();
  1679. break;
  1680. case 4:
  1681. message.classEncoding = reader.int32();
  1682. break;
  1683. case 100:
  1684. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  1685. break;
  1686. case 101:
  1687. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  1688. break;
  1689. default:
  1690. reader.skipType(tag & 7);
  1691. break;
  1692. }
  1693. }
  1694. return message;
  1695. }
  1696. };
  1697. $root.CoreML.Specification.GLMClassifier.prototype.postEvaluationTransform = 0;
  1698. $root.CoreML.Specification.GLMClassifier.prototype.classEncoding = 0;
  1699. $root.CoreML.Specification.GLMClassifier.DoubleArray = class DoubleArray {
  1700. constructor() {
  1701. this.value = [];
  1702. }
  1703. static decode(reader, length) {
  1704. const message = new $root.CoreML.Specification.GLMClassifier.DoubleArray();
  1705. const end = reader.next(length);
  1706. while (reader.end(end)) {
  1707. const tag = reader.uint32();
  1708. switch (tag >>> 3) {
  1709. case 1:
  1710. message.value = reader.doubles(message.value, tag);
  1711. break;
  1712. default:
  1713. reader.skipType(tag & 7);
  1714. break;
  1715. }
  1716. }
  1717. return message;
  1718. }
  1719. };
  1720. $root.CoreML.Specification.GLMClassifier.PostEvaluationTransform = {
  1721. "Logit": 0,
  1722. "Probit": 1
  1723. };
  1724. $root.CoreML.Specification.GLMClassifier.ClassEncoding = {
  1725. "ReferenceClass": 0,
  1726. "OneVsRest": 1
  1727. };
  1728. $root.CoreML.Specification.KNearestNeighborsClassifier = class KNearestNeighborsClassifier {
  1729. constructor() {
  1730. }
  1731. get ClassLabels() {
  1732. $root.CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet = $root.CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  1733. return Object.keys(this).find((key) => $root.CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet.has(key) && this[key] != null);
  1734. }
  1735. get DefaultClassLabel() {
  1736. $root.CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet = $root.CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet || new Set([ "defaultStringLabel", "defaultInt64Label"]);
  1737. return Object.keys(this).find((key) => $root.CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet.has(key) && this[key] != null);
  1738. }
  1739. get WeightingScheme() {
  1740. $root.CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet = $root.CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet || new Set([ "uniformWeighting", "inverseDistanceWeighting"]);
  1741. return Object.keys(this).find((key) => $root.CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet.has(key) && this[key] != null);
  1742. }
  1743. static decode(reader, length) {
  1744. const message = new $root.CoreML.Specification.KNearestNeighborsClassifier();
  1745. const end = reader.next(length);
  1746. while (reader.end(end)) {
  1747. const tag = reader.uint32();
  1748. switch (tag >>> 3) {
  1749. case 1:
  1750. message.nearestNeighborsIndex = $root.CoreML.Specification.NearestNeighborsIndex.decode(reader, reader.uint32());
  1751. break;
  1752. case 3:
  1753. message.numberOfNeighbors = $root.CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  1754. break;
  1755. case 100:
  1756. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  1757. break;
  1758. case 101:
  1759. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  1760. break;
  1761. case 110:
  1762. message.defaultStringLabel = reader.string();
  1763. break;
  1764. case 111:
  1765. message.defaultInt64Label = reader.int64();
  1766. break;
  1767. case 200:
  1768. message.uniformWeighting = $root.CoreML.Specification.UniformWeighting.decode(reader, reader.uint32());
  1769. break;
  1770. case 210:
  1771. message.inverseDistanceWeighting = $root.CoreML.Specification.InverseDistanceWeighting.decode(reader, reader.uint32());
  1772. break;
  1773. default:
  1774. reader.skipType(tag & 7);
  1775. break;
  1776. }
  1777. }
  1778. return message;
  1779. }
  1780. };
  1781. $root.CoreML.Specification.KNearestNeighborsClassifier.prototype.nearestNeighborsIndex = null;
  1782. $root.CoreML.Specification.KNearestNeighborsClassifier.prototype.numberOfNeighbors = null;
  1783. $root.CoreML.Specification.NearestNeighborsIndex = class NearestNeighborsIndex {
  1784. constructor() {
  1785. this.floatSamples = [];
  1786. }
  1787. get IndexType() {
  1788. $root.CoreML.Specification.NearestNeighborsIndex.IndexTypeSet = $root.CoreML.Specification.NearestNeighborsIndex.IndexTypeSet || new Set([ "linearIndex", "singleKdTreeIndex"]);
  1789. return Object.keys(this).find((key) => $root.CoreML.Specification.NearestNeighborsIndex.IndexTypeSet.has(key) && this[key] != null);
  1790. }
  1791. get DistanceFunction() {
  1792. $root.CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet = $root.CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet || new Set([ "squaredEuclideanDistance"]);
  1793. return Object.keys(this).find((key) => $root.CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet.has(key) && this[key] != null);
  1794. }
  1795. static decode(reader, length) {
  1796. const message = new $root.CoreML.Specification.NearestNeighborsIndex();
  1797. const end = reader.next(length);
  1798. while (reader.end(end)) {
  1799. const tag = reader.uint32();
  1800. switch (tag >>> 3) {
  1801. case 1:
  1802. message.numberOfDimensions = reader.int32();
  1803. break;
  1804. case 2:
  1805. message.floatSamples.push($root.CoreML.Specification.FloatVector.decode(reader, reader.uint32()));
  1806. break;
  1807. case 100:
  1808. message.linearIndex = $root.CoreML.Specification.LinearIndex.decode(reader, reader.uint32());
  1809. break;
  1810. case 110:
  1811. message.singleKdTreeIndex = $root.CoreML.Specification.SingleKdTreeIndex.decode(reader, reader.uint32());
  1812. break;
  1813. case 200:
  1814. message.squaredEuclideanDistance = $root.CoreML.Specification.SquaredEuclideanDistance.decode(reader, reader.uint32());
  1815. break;
  1816. default:
  1817. reader.skipType(tag & 7);
  1818. break;
  1819. }
  1820. }
  1821. return message;
  1822. }
  1823. };
  1824. $root.CoreML.Specification.NearestNeighborsIndex.prototype.numberOfDimensions = 0;
  1825. $root.CoreML.Specification.UniformWeighting = class UniformWeighting {
  1826. constructor() {
  1827. }
  1828. static decode(reader, length) {
  1829. const message = new $root.CoreML.Specification.UniformWeighting();
  1830. const end = reader.next(length);
  1831. while (reader.end(end)) {
  1832. const tag = reader.uint32();
  1833. switch (tag >>> 3) {
  1834. default:
  1835. reader.skipType(tag & 7);
  1836. break;
  1837. }
  1838. }
  1839. return message;
  1840. }
  1841. };
  1842. $root.CoreML.Specification.InverseDistanceWeighting = class InverseDistanceWeighting {
  1843. constructor() {
  1844. }
  1845. static decode(reader, length) {
  1846. const message = new $root.CoreML.Specification.InverseDistanceWeighting();
  1847. const end = reader.next(length);
  1848. while (reader.end(end)) {
  1849. const tag = reader.uint32();
  1850. switch (tag >>> 3) {
  1851. default:
  1852. reader.skipType(tag & 7);
  1853. break;
  1854. }
  1855. }
  1856. return message;
  1857. }
  1858. };
  1859. $root.CoreML.Specification.LinearIndex = class LinearIndex {
  1860. constructor() {
  1861. }
  1862. static decode(reader, length) {
  1863. const message = new $root.CoreML.Specification.LinearIndex();
  1864. const end = reader.next(length);
  1865. while (reader.end(end)) {
  1866. const tag = reader.uint32();
  1867. switch (tag >>> 3) {
  1868. default:
  1869. reader.skipType(tag & 7);
  1870. break;
  1871. }
  1872. }
  1873. return message;
  1874. }
  1875. };
  1876. $root.CoreML.Specification.SingleKdTreeIndex = class SingleKdTreeIndex {
  1877. constructor() {
  1878. }
  1879. static decode(reader, length) {
  1880. const message = new $root.CoreML.Specification.SingleKdTreeIndex();
  1881. const end = reader.next(length);
  1882. while (reader.end(end)) {
  1883. const tag = reader.uint32();
  1884. switch (tag >>> 3) {
  1885. case 1:
  1886. message.leafSize = reader.int32();
  1887. break;
  1888. default:
  1889. reader.skipType(tag & 7);
  1890. break;
  1891. }
  1892. }
  1893. return message;
  1894. }
  1895. };
  1896. $root.CoreML.Specification.SingleKdTreeIndex.prototype.leafSize = 0;
  1897. $root.CoreML.Specification.SquaredEuclideanDistance = class SquaredEuclideanDistance {
  1898. constructor() {
  1899. }
  1900. static decode(reader, length) {
  1901. const message = new $root.CoreML.Specification.SquaredEuclideanDistance();
  1902. const end = reader.next(length);
  1903. while (reader.end(end)) {
  1904. const tag = reader.uint32();
  1905. switch (tag >>> 3) {
  1906. default:
  1907. reader.skipType(tag & 7);
  1908. break;
  1909. }
  1910. }
  1911. return message;
  1912. }
  1913. };
  1914. $root.CoreML.Specification.Int64Parameter = class Int64Parameter {
  1915. constructor() {
  1916. }
  1917. get AllowedValues() {
  1918. $root.CoreML.Specification.Int64Parameter.AllowedValuesSet = $root.CoreML.Specification.Int64Parameter.AllowedValuesSet || new Set([ "range", "set"]);
  1919. return Object.keys(this).find((key) => $root.CoreML.Specification.Int64Parameter.AllowedValuesSet.has(key) && this[key] != null);
  1920. }
  1921. static decode(reader, length) {
  1922. const message = new $root.CoreML.Specification.Int64Parameter();
  1923. const end = reader.next(length);
  1924. while (reader.end(end)) {
  1925. const tag = reader.uint32();
  1926. switch (tag >>> 3) {
  1927. case 1:
  1928. message.defaultValue = reader.int64();
  1929. break;
  1930. case 10:
  1931. message.range = $root.CoreML.Specification.Int64Range.decode(reader, reader.uint32());
  1932. break;
  1933. case 11:
  1934. message.set = $root.CoreML.Specification.Int64Set.decode(reader, reader.uint32());
  1935. break;
  1936. default:
  1937. reader.skipType(tag & 7);
  1938. break;
  1939. }
  1940. }
  1941. return message;
  1942. }
  1943. };
  1944. $root.CoreML.Specification.Int64Parameter.prototype.defaultValue = protobuf.Int64.create(0);
  1945. $root.CoreML.Specification.DoubleParameter = class DoubleParameter {
  1946. constructor() {
  1947. }
  1948. get AllowedValues() {
  1949. $root.CoreML.Specification.DoubleParameter.AllowedValuesSet = $root.CoreML.Specification.DoubleParameter.AllowedValuesSet || new Set([ "range"]);
  1950. return Object.keys(this).find((key) => $root.CoreML.Specification.DoubleParameter.AllowedValuesSet.has(key) && this[key] != null);
  1951. }
  1952. static decode(reader, length) {
  1953. const message = new $root.CoreML.Specification.DoubleParameter();
  1954. const end = reader.next(length);
  1955. while (reader.end(end)) {
  1956. const tag = reader.uint32();
  1957. switch (tag >>> 3) {
  1958. case 1:
  1959. message.defaultValue = reader.double();
  1960. break;
  1961. case 10:
  1962. message.range = $root.CoreML.Specification.DoubleRange.decode(reader, reader.uint32());
  1963. break;
  1964. default:
  1965. reader.skipType(tag & 7);
  1966. break;
  1967. }
  1968. }
  1969. return message;
  1970. }
  1971. };
  1972. $root.CoreML.Specification.DoubleParameter.prototype.defaultValue = 0;
  1973. $root.CoreML.Specification.StringParameter = class StringParameter {
  1974. constructor() {
  1975. }
  1976. static decode(reader, length) {
  1977. const message = new $root.CoreML.Specification.StringParameter();
  1978. const end = reader.next(length);
  1979. while (reader.end(end)) {
  1980. const tag = reader.uint32();
  1981. switch (tag >>> 3) {
  1982. case 1:
  1983. message.defaultValue = reader.string();
  1984. break;
  1985. default:
  1986. reader.skipType(tag & 7);
  1987. break;
  1988. }
  1989. }
  1990. return message;
  1991. }
  1992. };
  1993. $root.CoreML.Specification.StringParameter.prototype.defaultValue = "";
  1994. $root.CoreML.Specification.BoolParameter = class BoolParameter {
  1995. constructor() {
  1996. }
  1997. static decode(reader, length) {
  1998. const message = new $root.CoreML.Specification.BoolParameter();
  1999. const end = reader.next(length);
  2000. while (reader.end(end)) {
  2001. const tag = reader.uint32();
  2002. switch (tag >>> 3) {
  2003. case 1:
  2004. message.defaultValue = reader.bool();
  2005. break;
  2006. default:
  2007. reader.skipType(tag & 7);
  2008. break;
  2009. }
  2010. }
  2011. return message;
  2012. }
  2013. };
  2014. $root.CoreML.Specification.BoolParameter.prototype.defaultValue = false;
  2015. $root.CoreML.Specification.Identity = class Identity {
  2016. constructor() {
  2017. }
  2018. static decode(reader, length) {
  2019. const message = new $root.CoreML.Specification.Identity();
  2020. const end = reader.next(length);
  2021. while (reader.end(end)) {
  2022. const tag = reader.uint32();
  2023. switch (tag >>> 3) {
  2024. default:
  2025. reader.skipType(tag & 7);
  2026. break;
  2027. }
  2028. }
  2029. return message;
  2030. }
  2031. };
  2032. $root.CoreML.Specification.Imputer = class Imputer {
  2033. constructor() {
  2034. }
  2035. get ImputedValue() {
  2036. $root.CoreML.Specification.Imputer.ImputedValueSet = $root.CoreML.Specification.Imputer.ImputedValueSet || new Set([ "imputedDoubleValue", "imputedInt64Value", "imputedStringValue", "imputedDoubleArray", "imputedInt64Array", "imputedStringDictionary", "imputedInt64Dictionary"]);
  2037. return Object.keys(this).find((key) => $root.CoreML.Specification.Imputer.ImputedValueSet.has(key) && this[key] != null);
  2038. }
  2039. get ReplaceValue() {
  2040. $root.CoreML.Specification.Imputer.ReplaceValueSet = $root.CoreML.Specification.Imputer.ReplaceValueSet || new Set([ "replaceDoubleValue", "replaceInt64Value", "replaceStringValue"]);
  2041. return Object.keys(this).find((key) => $root.CoreML.Specification.Imputer.ReplaceValueSet.has(key) && this[key] != null);
  2042. }
  2043. static decode(reader, length) {
  2044. const message = new $root.CoreML.Specification.Imputer();
  2045. const end = reader.next(length);
  2046. while (reader.end(end)) {
  2047. const tag = reader.uint32();
  2048. switch (tag >>> 3) {
  2049. case 1:
  2050. message.imputedDoubleValue = reader.double();
  2051. break;
  2052. case 2:
  2053. message.imputedInt64Value = reader.int64();
  2054. break;
  2055. case 3:
  2056. message.imputedStringValue = reader.string();
  2057. break;
  2058. case 4:
  2059. message.imputedDoubleArray = $root.CoreML.Specification.DoubleVector.decode(reader, reader.uint32());
  2060. break;
  2061. case 5:
  2062. message.imputedInt64Array = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  2063. break;
  2064. case 6:
  2065. message.imputedStringDictionary = $root.CoreML.Specification.StringToDoubleMap.decode(reader, reader.uint32());
  2066. break;
  2067. case 7:
  2068. message.imputedInt64Dictionary = $root.CoreML.Specification.Int64ToDoubleMap.decode(reader, reader.uint32());
  2069. break;
  2070. case 11:
  2071. message.replaceDoubleValue = reader.double();
  2072. break;
  2073. case 12:
  2074. message.replaceInt64Value = reader.int64();
  2075. break;
  2076. case 13:
  2077. message.replaceStringValue = reader.string();
  2078. break;
  2079. default:
  2080. reader.skipType(tag & 7);
  2081. break;
  2082. }
  2083. }
  2084. return message;
  2085. }
  2086. };
  2087. $root.CoreML.Specification.NeuralNetworkMultiArrayShapeMapping = {
  2088. "RANK5_ARRAY_MAPPING": 0,
  2089. "EXACT_ARRAY_MAPPING": 1
  2090. };
  2091. $root.CoreML.Specification.NeuralNetworkImageShapeMapping = {
  2092. "RANK5_IMAGE_MAPPING": 0,
  2093. "RANK4_IMAGE_MAPPING": 1
  2094. };
  2095. $root.CoreML.Specification.NeuralNetwork = class NeuralNetwork {
  2096. constructor() {
  2097. this.layers = [];
  2098. this.preprocessing = [];
  2099. }
  2100. static decode(reader, length) {
  2101. const message = new $root.CoreML.Specification.NeuralNetwork();
  2102. const end = reader.next(length);
  2103. while (reader.end(end)) {
  2104. const tag = reader.uint32();
  2105. switch (tag >>> 3) {
  2106. case 1:
  2107. message.layers.push($root.CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  2108. break;
  2109. case 2:
  2110. message.preprocessing.push($root.CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  2111. break;
  2112. case 5:
  2113. message.arrayInputShapeMapping = reader.int32();
  2114. break;
  2115. case 6:
  2116. message.imageInputShapeMapping = reader.int32();
  2117. break;
  2118. case 10:
  2119. message.updateParams = $root.CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  2120. break;
  2121. default:
  2122. reader.skipType(tag & 7);
  2123. break;
  2124. }
  2125. }
  2126. return message;
  2127. }
  2128. };
  2129. $root.CoreML.Specification.NeuralNetwork.prototype.arrayInputShapeMapping = 0;
  2130. $root.CoreML.Specification.NeuralNetwork.prototype.imageInputShapeMapping = 0;
  2131. $root.CoreML.Specification.NeuralNetwork.prototype.updateParams = null;
  2132. $root.CoreML.Specification.NeuralNetworkImageScaler = class NeuralNetworkImageScaler {
  2133. constructor() {
  2134. }
  2135. static decode(reader, length) {
  2136. const message = new $root.CoreML.Specification.NeuralNetworkImageScaler();
  2137. const end = reader.next(length);
  2138. while (reader.end(end)) {
  2139. const tag = reader.uint32();
  2140. switch (tag >>> 3) {
  2141. case 10:
  2142. message.channelScale = reader.float();
  2143. break;
  2144. case 20:
  2145. message.blueBias = reader.float();
  2146. break;
  2147. case 21:
  2148. message.greenBias = reader.float();
  2149. break;
  2150. case 22:
  2151. message.redBias = reader.float();
  2152. break;
  2153. case 30:
  2154. message.grayBias = reader.float();
  2155. break;
  2156. default:
  2157. reader.skipType(tag & 7);
  2158. break;
  2159. }
  2160. }
  2161. return message;
  2162. }
  2163. };
  2164. $root.CoreML.Specification.NeuralNetworkImageScaler.prototype.channelScale = 0;
  2165. $root.CoreML.Specification.NeuralNetworkImageScaler.prototype.blueBias = 0;
  2166. $root.CoreML.Specification.NeuralNetworkImageScaler.prototype.greenBias = 0;
  2167. $root.CoreML.Specification.NeuralNetworkImageScaler.prototype.redBias = 0;
  2168. $root.CoreML.Specification.NeuralNetworkImageScaler.prototype.grayBias = 0;
  2169. $root.CoreML.Specification.NeuralNetworkMeanImage = class NeuralNetworkMeanImage {
  2170. constructor() {
  2171. this.meanImage = [];
  2172. }
  2173. static decode(reader, length) {
  2174. const message = new $root.CoreML.Specification.NeuralNetworkMeanImage();
  2175. const end = reader.next(length);
  2176. while (reader.end(end)) {
  2177. const tag = reader.uint32();
  2178. switch (tag >>> 3) {
  2179. case 1:
  2180. message.meanImage = reader.floats(message.meanImage, tag);
  2181. break;
  2182. default:
  2183. reader.skipType(tag & 7);
  2184. break;
  2185. }
  2186. }
  2187. return message;
  2188. }
  2189. };
  2190. $root.CoreML.Specification.NeuralNetworkPreprocessing = class NeuralNetworkPreprocessing {
  2191. constructor() {
  2192. }
  2193. get preprocessor() {
  2194. $root.CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet = $root.CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet || new Set([ "scaler", "meanImage"]);
  2195. return Object.keys(this).find((key) => $root.CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet.has(key) && this[key] != null);
  2196. }
  2197. static decode(reader, length) {
  2198. const message = new $root.CoreML.Specification.NeuralNetworkPreprocessing();
  2199. const end = reader.next(length);
  2200. while (reader.end(end)) {
  2201. const tag = reader.uint32();
  2202. switch (tag >>> 3) {
  2203. case 1:
  2204. message.featureName = reader.string();
  2205. break;
  2206. case 10:
  2207. message.scaler = $root.CoreML.Specification.NeuralNetworkImageScaler.decode(reader, reader.uint32());
  2208. break;
  2209. case 11:
  2210. message.meanImage = $root.CoreML.Specification.NeuralNetworkMeanImage.decode(reader, reader.uint32());
  2211. break;
  2212. default:
  2213. reader.skipType(tag & 7);
  2214. break;
  2215. }
  2216. }
  2217. return message;
  2218. }
  2219. };
  2220. $root.CoreML.Specification.NeuralNetworkPreprocessing.prototype.featureName = "";
  2221. $root.CoreML.Specification.ActivationReLU = class ActivationReLU {
  2222. constructor() {
  2223. }
  2224. static decode(reader, length) {
  2225. const message = new $root.CoreML.Specification.ActivationReLU();
  2226. const end = reader.next(length);
  2227. while (reader.end(end)) {
  2228. const tag = reader.uint32();
  2229. switch (tag >>> 3) {
  2230. default:
  2231. reader.skipType(tag & 7);
  2232. break;
  2233. }
  2234. }
  2235. return message;
  2236. }
  2237. };
  2238. $root.CoreML.Specification.ActivationLeakyReLU = class ActivationLeakyReLU {
  2239. constructor() {
  2240. }
  2241. static decode(reader, length) {
  2242. const message = new $root.CoreML.Specification.ActivationLeakyReLU();
  2243. const end = reader.next(length);
  2244. while (reader.end(end)) {
  2245. const tag = reader.uint32();
  2246. switch (tag >>> 3) {
  2247. case 1:
  2248. message.alpha = reader.float();
  2249. break;
  2250. default:
  2251. reader.skipType(tag & 7);
  2252. break;
  2253. }
  2254. }
  2255. return message;
  2256. }
  2257. };
  2258. $root.CoreML.Specification.ActivationLeakyReLU.prototype.alpha = 0;
  2259. $root.CoreML.Specification.ActivationTanh = class ActivationTanh {
  2260. constructor() {
  2261. }
  2262. static decode(reader, length) {
  2263. const message = new $root.CoreML.Specification.ActivationTanh();
  2264. const end = reader.next(length);
  2265. while (reader.end(end)) {
  2266. const tag = reader.uint32();
  2267. switch (tag >>> 3) {
  2268. default:
  2269. reader.skipType(tag & 7);
  2270. break;
  2271. }
  2272. }
  2273. return message;
  2274. }
  2275. };
  2276. $root.CoreML.Specification.ActivationScaledTanh = class ActivationScaledTanh {
  2277. constructor() {
  2278. }
  2279. static decode(reader, length) {
  2280. const message = new $root.CoreML.Specification.ActivationScaledTanh();
  2281. const end = reader.next(length);
  2282. while (reader.end(end)) {
  2283. const tag = reader.uint32();
  2284. switch (tag >>> 3) {
  2285. case 1:
  2286. message.alpha = reader.float();
  2287. break;
  2288. case 2:
  2289. message.beta = reader.float();
  2290. break;
  2291. default:
  2292. reader.skipType(tag & 7);
  2293. break;
  2294. }
  2295. }
  2296. return message;
  2297. }
  2298. };
  2299. $root.CoreML.Specification.ActivationScaledTanh.prototype.alpha = 0;
  2300. $root.CoreML.Specification.ActivationScaledTanh.prototype.beta = 0;
  2301. $root.CoreML.Specification.ActivationSigmoid = class ActivationSigmoid {
  2302. constructor() {
  2303. }
  2304. static decode(reader, length) {
  2305. const message = new $root.CoreML.Specification.ActivationSigmoid();
  2306. const end = reader.next(length);
  2307. while (reader.end(end)) {
  2308. const tag = reader.uint32();
  2309. switch (tag >>> 3) {
  2310. default:
  2311. reader.skipType(tag & 7);
  2312. break;
  2313. }
  2314. }
  2315. return message;
  2316. }
  2317. };
  2318. $root.CoreML.Specification.ActivationLinear = class ActivationLinear {
  2319. constructor() {
  2320. }
  2321. static decode(reader, length) {
  2322. const message = new $root.CoreML.Specification.ActivationLinear();
  2323. const end = reader.next(length);
  2324. while (reader.end(end)) {
  2325. const tag = reader.uint32();
  2326. switch (tag >>> 3) {
  2327. case 1:
  2328. message.alpha = reader.float();
  2329. break;
  2330. case 2:
  2331. message.beta = reader.float();
  2332. break;
  2333. default:
  2334. reader.skipType(tag & 7);
  2335. break;
  2336. }
  2337. }
  2338. return message;
  2339. }
  2340. };
  2341. $root.CoreML.Specification.ActivationLinear.prototype.alpha = 0;
  2342. $root.CoreML.Specification.ActivationLinear.prototype.beta = 0;
  2343. $root.CoreML.Specification.ActivationSigmoidHard = class ActivationSigmoidHard {
  2344. constructor() {
  2345. }
  2346. static decode(reader, length) {
  2347. const message = new $root.CoreML.Specification.ActivationSigmoidHard();
  2348. const end = reader.next(length);
  2349. while (reader.end(end)) {
  2350. const tag = reader.uint32();
  2351. switch (tag >>> 3) {
  2352. case 1:
  2353. message.alpha = reader.float();
  2354. break;
  2355. case 2:
  2356. message.beta = reader.float();
  2357. break;
  2358. default:
  2359. reader.skipType(tag & 7);
  2360. break;
  2361. }
  2362. }
  2363. return message;
  2364. }
  2365. };
  2366. $root.CoreML.Specification.ActivationSigmoidHard.prototype.alpha = 0;
  2367. $root.CoreML.Specification.ActivationSigmoidHard.prototype.beta = 0;
  2368. $root.CoreML.Specification.ActivationPReLU = class ActivationPReLU {
  2369. constructor() {
  2370. }
  2371. static decode(reader, length) {
  2372. const message = new $root.CoreML.Specification.ActivationPReLU();
  2373. const end = reader.next(length);
  2374. while (reader.end(end)) {
  2375. const tag = reader.uint32();
  2376. switch (tag >>> 3) {
  2377. case 1:
  2378. message.alpha = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  2379. break;
  2380. default:
  2381. reader.skipType(tag & 7);
  2382. break;
  2383. }
  2384. }
  2385. return message;
  2386. }
  2387. };
  2388. $root.CoreML.Specification.ActivationPReLU.prototype.alpha = null;
  2389. $root.CoreML.Specification.ActivationELU = class ActivationELU {
  2390. constructor() {
  2391. }
  2392. static decode(reader, length) {
  2393. const message = new $root.CoreML.Specification.ActivationELU();
  2394. const end = reader.next(length);
  2395. while (reader.end(end)) {
  2396. const tag = reader.uint32();
  2397. switch (tag >>> 3) {
  2398. case 1:
  2399. message.alpha = reader.float();
  2400. break;
  2401. default:
  2402. reader.skipType(tag & 7);
  2403. break;
  2404. }
  2405. }
  2406. return message;
  2407. }
  2408. };
  2409. $root.CoreML.Specification.ActivationELU.prototype.alpha = 0;
  2410. $root.CoreML.Specification.ActivationThresholdedReLU = class ActivationThresholdedReLU {
  2411. constructor() {
  2412. }
  2413. static decode(reader, length) {
  2414. const message = new $root.CoreML.Specification.ActivationThresholdedReLU();
  2415. const end = reader.next(length);
  2416. while (reader.end(end)) {
  2417. const tag = reader.uint32();
  2418. switch (tag >>> 3) {
  2419. case 1:
  2420. message.alpha = reader.float();
  2421. break;
  2422. default:
  2423. reader.skipType(tag & 7);
  2424. break;
  2425. }
  2426. }
  2427. return message;
  2428. }
  2429. };
  2430. $root.CoreML.Specification.ActivationThresholdedReLU.prototype.alpha = 0;
  2431. $root.CoreML.Specification.ActivationSoftsign = class ActivationSoftsign {
  2432. constructor() {
  2433. }
  2434. static decode(reader, length) {
  2435. const message = new $root.CoreML.Specification.ActivationSoftsign();
  2436. const end = reader.next(length);
  2437. while (reader.end(end)) {
  2438. const tag = reader.uint32();
  2439. switch (tag >>> 3) {
  2440. default:
  2441. reader.skipType(tag & 7);
  2442. break;
  2443. }
  2444. }
  2445. return message;
  2446. }
  2447. };
  2448. $root.CoreML.Specification.ActivationSoftplus = class ActivationSoftplus {
  2449. constructor() {
  2450. }
  2451. static decode(reader, length) {
  2452. const message = new $root.CoreML.Specification.ActivationSoftplus();
  2453. const end = reader.next(length);
  2454. while (reader.end(end)) {
  2455. const tag = reader.uint32();
  2456. switch (tag >>> 3) {
  2457. default:
  2458. reader.skipType(tag & 7);
  2459. break;
  2460. }
  2461. }
  2462. return message;
  2463. }
  2464. };
  2465. $root.CoreML.Specification.ActivationParametricSoftplus = class ActivationParametricSoftplus {
  2466. constructor() {
  2467. }
  2468. static decode(reader, length) {
  2469. const message = new $root.CoreML.Specification.ActivationParametricSoftplus();
  2470. const end = reader.next(length);
  2471. while (reader.end(end)) {
  2472. const tag = reader.uint32();
  2473. switch (tag >>> 3) {
  2474. case 1:
  2475. message.alpha = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  2476. break;
  2477. case 2:
  2478. message.beta = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  2479. break;
  2480. default:
  2481. reader.skipType(tag & 7);
  2482. break;
  2483. }
  2484. }
  2485. return message;
  2486. }
  2487. };
  2488. $root.CoreML.Specification.ActivationParametricSoftplus.prototype.alpha = null;
  2489. $root.CoreML.Specification.ActivationParametricSoftplus.prototype.beta = null;
  2490. $root.CoreML.Specification.ActivationParams = class ActivationParams {
  2491. constructor() {
  2492. }
  2493. get NonlinearityType() {
  2494. $root.CoreML.Specification.ActivationParams.NonlinearityTypeSet = $root.CoreML.Specification.ActivationParams.NonlinearityTypeSet || new Set([ "linear", "ReLU", "leakyReLU", "thresholdedReLU", "PReLU", "tanh", "scaledTanh", "sigmoid", "sigmoidHard", "ELU", "softsign", "softplus", "parametricSoftplus"]);
  2495. return Object.keys(this).find((key) => $root.CoreML.Specification.ActivationParams.NonlinearityTypeSet.has(key) && this[key] != null);
  2496. }
  2497. static decode(reader, length) {
  2498. const message = new $root.CoreML.Specification.ActivationParams();
  2499. const end = reader.next(length);
  2500. while (reader.end(end)) {
  2501. const tag = reader.uint32();
  2502. switch (tag >>> 3) {
  2503. case 5:
  2504. message.linear = $root.CoreML.Specification.ActivationLinear.decode(reader, reader.uint32());
  2505. break;
  2506. case 10:
  2507. message.ReLU = $root.CoreML.Specification.ActivationReLU.decode(reader, reader.uint32());
  2508. break;
  2509. case 15:
  2510. message.leakyReLU = $root.CoreML.Specification.ActivationLeakyReLU.decode(reader, reader.uint32());
  2511. break;
  2512. case 20:
  2513. message.thresholdedReLU = $root.CoreML.Specification.ActivationThresholdedReLU.decode(reader, reader.uint32());
  2514. break;
  2515. case 25:
  2516. message.PReLU = $root.CoreML.Specification.ActivationPReLU.decode(reader, reader.uint32());
  2517. break;
  2518. case 30:
  2519. message.tanh = $root.CoreML.Specification.ActivationTanh.decode(reader, reader.uint32());
  2520. break;
  2521. case 31:
  2522. message.scaledTanh = $root.CoreML.Specification.ActivationScaledTanh.decode(reader, reader.uint32());
  2523. break;
  2524. case 40:
  2525. message.sigmoid = $root.CoreML.Specification.ActivationSigmoid.decode(reader, reader.uint32());
  2526. break;
  2527. case 41:
  2528. message.sigmoidHard = $root.CoreML.Specification.ActivationSigmoidHard.decode(reader, reader.uint32());
  2529. break;
  2530. case 50:
  2531. message.ELU = $root.CoreML.Specification.ActivationELU.decode(reader, reader.uint32());
  2532. break;
  2533. case 60:
  2534. message.softsign = $root.CoreML.Specification.ActivationSoftsign.decode(reader, reader.uint32());
  2535. break;
  2536. case 70:
  2537. message.softplus = $root.CoreML.Specification.ActivationSoftplus.decode(reader, reader.uint32());
  2538. break;
  2539. case 71:
  2540. message.parametricSoftplus = $root.CoreML.Specification.ActivationParametricSoftplus.decode(reader, reader.uint32());
  2541. break;
  2542. default:
  2543. reader.skipType(tag & 7);
  2544. break;
  2545. }
  2546. }
  2547. return message;
  2548. }
  2549. };
  2550. $root.CoreML.Specification.Tensor = class Tensor {
  2551. constructor() {
  2552. this.dimValue = [];
  2553. }
  2554. static decode(reader, length) {
  2555. const message = new $root.CoreML.Specification.Tensor();
  2556. const end = reader.next(length);
  2557. while (reader.end(end)) {
  2558. const tag = reader.uint32();
  2559. switch (tag >>> 3) {
  2560. case 1:
  2561. message.rank = reader.uint32();
  2562. break;
  2563. case 2:
  2564. message.dimValue = reader.array(message.dimValue, () => reader.int64(), tag);
  2565. break;
  2566. default:
  2567. reader.skipType(tag & 7);
  2568. break;
  2569. }
  2570. }
  2571. return message;
  2572. }
  2573. };
  2574. $root.CoreML.Specification.Tensor.prototype.rank = 0;
  2575. $root.CoreML.Specification.NeuralNetworkLayer = class NeuralNetworkLayer {
  2576. constructor() {
  2577. this.input = [];
  2578. this.output = [];
  2579. this.inputTensor = [];
  2580. this.outputTensor = [];
  2581. }
  2582. get layer() {
  2583. $root.CoreML.Specification.NeuralNetworkLayer.layerSet = $root.CoreML.Specification.NeuralNetworkLayer.layerSet || new Set([ "convolution", "pooling", "activation", "innerProduct", "embedding", "batchnorm", "mvn", "l2normalize", "softmax", "lrn", "crop", "padding", "upsample", "resizeBilinear", "cropResize", "unary", "add", "multiply", "average", "scale", "bias", "max", "min", "dot", "reduce", "loadConstant", "reshape", "flatten", "permute", "concat", "split", "sequenceRepeat", "reorganizeData", "slice", "simpleRecurrent", "gru", "uniDirectionalLSTM", "biDirectionalLSTM", "custom", "copy", "branch", "loop", "loopBreak", "loopContinue", "rangeStatic", "rangeDynamic", "clip", "ceil", "floor", "sign", "round", "exp2", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh", "erf", "gelu", "equal", "notEqual", "lessThan", "lessEqual", "greaterThan", "greaterEqual", "logicalOr", "logicalXor", "logicalNot", "logicalAnd", "modBroadcastable", "minBroadcastable", "maxBroadcastable", "addBroadcastable", "powBroadcastable", "divideBroadcastable", "floorDivBroadcastable", "multiplyBroadcastable", "subtractBroadcastable", "tile", "stack", "gather", "scatter", "gatherND", "scatterND", "softmaxND", "gatherAlongAxis", "scatterAlongAxis", "reverse", "reverseSeq", "splitND", "concatND", "transpose", "sliceStatic", "sliceDynamic", "slidingWindows", "topK", "argMin", "argMax", "embeddingND", "batchedMatmul", "getShape", "loadConstantND", "fillLike", "fillStatic", "fillDynamic", "broadcastToLike", "broadcastToStatic", "broadcastToDynamic", "squeeze", "expandDims", "flattenTo2D", "reshapeLike", "reshapeStatic", "reshapeDynamic", "rankPreservingReshape", "constantPad", "randomNormalLike", "randomNormalStatic", "randomNormalDynamic", "randomUniformLike", "randomUniformStatic", "randomUniformDynamic", "randomBernoulliLike", "randomBernoulliStatic", "randomBernoulliDynamic", "categoricalDistribution", "reduceL1", "reduceL2", "reduceMax", "reduceMin", "reduceSum", "reduceProd", "reduceMean", "reduceLogSum", "reduceSumSquare", "reduceLogSumExp", "whereNonZero", "matrixBandPart", "lowerTriangular", "upperTriangular", "whereBroadcastable", "layerNormalization", "NonMaximumSuppression", "oneHot", "cumSum", "clampedReLU", "argSort", "pooling3d", "globalPooling3d", "sliceBySize", "convolution3d"]);
  2584. return Object.keys(this).find((key) => $root.CoreML.Specification.NeuralNetworkLayer.layerSet.has(key) && this[key] != null);
  2585. }
  2586. static decode(reader, length) {
  2587. const message = new $root.CoreML.Specification.NeuralNetworkLayer();
  2588. const end = reader.next(length);
  2589. while (reader.end(end)) {
  2590. const tag = reader.uint32();
  2591. switch (tag >>> 3) {
  2592. case 1:
  2593. message.name = reader.string();
  2594. break;
  2595. case 2:
  2596. message.input.push(reader.string());
  2597. break;
  2598. case 3:
  2599. message.output.push(reader.string());
  2600. break;
  2601. case 4:
  2602. message.inputTensor.push($root.CoreML.Specification.Tensor.decode(reader, reader.uint32()));
  2603. break;
  2604. case 5:
  2605. message.outputTensor.push($root.CoreML.Specification.Tensor.decode(reader, reader.uint32()));
  2606. break;
  2607. case 10:
  2608. message.isUpdatable = reader.bool();
  2609. break;
  2610. case 100:
  2611. message.convolution = $root.CoreML.Specification.ConvolutionLayerParams.decode(reader, reader.uint32());
  2612. break;
  2613. case 120:
  2614. message.pooling = $root.CoreML.Specification.PoolingLayerParams.decode(reader, reader.uint32());
  2615. break;
  2616. case 130:
  2617. message.activation = $root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32());
  2618. break;
  2619. case 140:
  2620. message.innerProduct = $root.CoreML.Specification.InnerProductLayerParams.decode(reader, reader.uint32());
  2621. break;
  2622. case 150:
  2623. message.embedding = $root.CoreML.Specification.EmbeddingLayerParams.decode(reader, reader.uint32());
  2624. break;
  2625. case 160:
  2626. message.batchnorm = $root.CoreML.Specification.BatchnormLayerParams.decode(reader, reader.uint32());
  2627. break;
  2628. case 165:
  2629. message.mvn = $root.CoreML.Specification.MeanVarianceNormalizeLayerParams.decode(reader, reader.uint32());
  2630. break;
  2631. case 170:
  2632. message.l2normalize = $root.CoreML.Specification.L2NormalizeLayerParams.decode(reader, reader.uint32());
  2633. break;
  2634. case 175:
  2635. message.softmax = $root.CoreML.Specification.SoftmaxLayerParams.decode(reader, reader.uint32());
  2636. break;
  2637. case 180:
  2638. message.lrn = $root.CoreML.Specification.LRNLayerParams.decode(reader, reader.uint32());
  2639. break;
  2640. case 190:
  2641. message.crop = $root.CoreML.Specification.CropLayerParams.decode(reader, reader.uint32());
  2642. break;
  2643. case 200:
  2644. message.padding = $root.CoreML.Specification.PaddingLayerParams.decode(reader, reader.uint32());
  2645. break;
  2646. case 210:
  2647. message.upsample = $root.CoreML.Specification.UpsampleLayerParams.decode(reader, reader.uint32());
  2648. break;
  2649. case 211:
  2650. message.resizeBilinear = $root.CoreML.Specification.ResizeBilinearLayerParams.decode(reader, reader.uint32());
  2651. break;
  2652. case 212:
  2653. message.cropResize = $root.CoreML.Specification.CropResizeLayerParams.decode(reader, reader.uint32());
  2654. break;
  2655. case 220:
  2656. message.unary = $root.CoreML.Specification.UnaryFunctionLayerParams.decode(reader, reader.uint32());
  2657. break;
  2658. case 230:
  2659. message.add = $root.CoreML.Specification.AddLayerParams.decode(reader, reader.uint32());
  2660. break;
  2661. case 231:
  2662. message.multiply = $root.CoreML.Specification.MultiplyLayerParams.decode(reader, reader.uint32());
  2663. break;
  2664. case 240:
  2665. message.average = $root.CoreML.Specification.AverageLayerParams.decode(reader, reader.uint32());
  2666. break;
  2667. case 245:
  2668. message.scale = $root.CoreML.Specification.ScaleLayerParams.decode(reader, reader.uint32());
  2669. break;
  2670. case 250:
  2671. message.bias = $root.CoreML.Specification.BiasLayerParams.decode(reader, reader.uint32());
  2672. break;
  2673. case 260:
  2674. message.max = $root.CoreML.Specification.MaxLayerParams.decode(reader, reader.uint32());
  2675. break;
  2676. case 261:
  2677. message.min = $root.CoreML.Specification.MinLayerParams.decode(reader, reader.uint32());
  2678. break;
  2679. case 270:
  2680. message.dot = $root.CoreML.Specification.DotProductLayerParams.decode(reader, reader.uint32());
  2681. break;
  2682. case 280:
  2683. message.reduce = $root.CoreML.Specification.ReduceLayerParams.decode(reader, reader.uint32());
  2684. break;
  2685. case 290:
  2686. message.loadConstant = $root.CoreML.Specification.LoadConstantLayerParams.decode(reader, reader.uint32());
  2687. break;
  2688. case 300:
  2689. message.reshape = $root.CoreML.Specification.ReshapeLayerParams.decode(reader, reader.uint32());
  2690. break;
  2691. case 301:
  2692. message.flatten = $root.CoreML.Specification.FlattenLayerParams.decode(reader, reader.uint32());
  2693. break;
  2694. case 310:
  2695. message.permute = $root.CoreML.Specification.PermuteLayerParams.decode(reader, reader.uint32());
  2696. break;
  2697. case 320:
  2698. message.concat = $root.CoreML.Specification.ConcatLayerParams.decode(reader, reader.uint32());
  2699. break;
  2700. case 330:
  2701. message.split = $root.CoreML.Specification.SplitLayerParams.decode(reader, reader.uint32());
  2702. break;
  2703. case 340:
  2704. message.sequenceRepeat = $root.CoreML.Specification.SequenceRepeatLayerParams.decode(reader, reader.uint32());
  2705. break;
  2706. case 345:
  2707. message.reorganizeData = $root.CoreML.Specification.ReorganizeDataLayerParams.decode(reader, reader.uint32());
  2708. break;
  2709. case 350:
  2710. message.slice = $root.CoreML.Specification.SliceLayerParams.decode(reader, reader.uint32());
  2711. break;
  2712. case 400:
  2713. message.simpleRecurrent = $root.CoreML.Specification.SimpleRecurrentLayerParams.decode(reader, reader.uint32());
  2714. break;
  2715. case 410:
  2716. message.gru = $root.CoreML.Specification.GRULayerParams.decode(reader, reader.uint32());
  2717. break;
  2718. case 420:
  2719. message.uniDirectionalLSTM = $root.CoreML.Specification.UniDirectionalLSTMLayerParams.decode(reader, reader.uint32());
  2720. break;
  2721. case 430:
  2722. message.biDirectionalLSTM = $root.CoreML.Specification.BiDirectionalLSTMLayerParams.decode(reader, reader.uint32());
  2723. break;
  2724. case 500:
  2725. message.custom = $root.CoreML.Specification.CustomLayerParams.decode(reader, reader.uint32());
  2726. break;
  2727. case 600:
  2728. message.copy = $root.CoreML.Specification.CopyLayerParams.decode(reader, reader.uint32());
  2729. break;
  2730. case 605:
  2731. message.branch = $root.CoreML.Specification.BranchLayerParams.decode(reader, reader.uint32());
  2732. break;
  2733. case 615:
  2734. message.loop = $root.CoreML.Specification.LoopLayerParams.decode(reader, reader.uint32());
  2735. break;
  2736. case 620:
  2737. message.loopBreak = $root.CoreML.Specification.LoopBreakLayerParams.decode(reader, reader.uint32());
  2738. break;
  2739. case 625:
  2740. message.loopContinue = $root.CoreML.Specification.LoopContinueLayerParams.decode(reader, reader.uint32());
  2741. break;
  2742. case 635:
  2743. message.rangeStatic = $root.CoreML.Specification.RangeStaticLayerParams.decode(reader, reader.uint32());
  2744. break;
  2745. case 640:
  2746. message.rangeDynamic = $root.CoreML.Specification.RangeDynamicLayerParams.decode(reader, reader.uint32());
  2747. break;
  2748. case 660:
  2749. message.clip = $root.CoreML.Specification.ClipLayerParams.decode(reader, reader.uint32());
  2750. break;
  2751. case 665:
  2752. message.ceil = $root.CoreML.Specification.CeilLayerParams.decode(reader, reader.uint32());
  2753. break;
  2754. case 670:
  2755. message.floor = $root.CoreML.Specification.FloorLayerParams.decode(reader, reader.uint32());
  2756. break;
  2757. case 680:
  2758. message.sign = $root.CoreML.Specification.SignLayerParams.decode(reader, reader.uint32());
  2759. break;
  2760. case 685:
  2761. message.round = $root.CoreML.Specification.RoundLayerParams.decode(reader, reader.uint32());
  2762. break;
  2763. case 700:
  2764. message.exp2 = $root.CoreML.Specification.Exp2LayerParams.decode(reader, reader.uint32());
  2765. break;
  2766. case 710:
  2767. message.sin = $root.CoreML.Specification.SinLayerParams.decode(reader, reader.uint32());
  2768. break;
  2769. case 715:
  2770. message.cos = $root.CoreML.Specification.CosLayerParams.decode(reader, reader.uint32());
  2771. break;
  2772. case 720:
  2773. message.tan = $root.CoreML.Specification.TanLayerParams.decode(reader, reader.uint32());
  2774. break;
  2775. case 730:
  2776. message.asin = $root.CoreML.Specification.AsinLayerParams.decode(reader, reader.uint32());
  2777. break;
  2778. case 735:
  2779. message.acos = $root.CoreML.Specification.AcosLayerParams.decode(reader, reader.uint32());
  2780. break;
  2781. case 740:
  2782. message.atan = $root.CoreML.Specification.AtanLayerParams.decode(reader, reader.uint32());
  2783. break;
  2784. case 750:
  2785. message.sinh = $root.CoreML.Specification.SinhLayerParams.decode(reader, reader.uint32());
  2786. break;
  2787. case 755:
  2788. message.cosh = $root.CoreML.Specification.CoshLayerParams.decode(reader, reader.uint32());
  2789. break;
  2790. case 760:
  2791. message.tanh = $root.CoreML.Specification.TanhLayerParams.decode(reader, reader.uint32());
  2792. break;
  2793. case 770:
  2794. message.asinh = $root.CoreML.Specification.AsinhLayerParams.decode(reader, reader.uint32());
  2795. break;
  2796. case 775:
  2797. message.acosh = $root.CoreML.Specification.AcoshLayerParams.decode(reader, reader.uint32());
  2798. break;
  2799. case 780:
  2800. message.atanh = $root.CoreML.Specification.AtanhLayerParams.decode(reader, reader.uint32());
  2801. break;
  2802. case 790:
  2803. message.erf = $root.CoreML.Specification.ErfLayerParams.decode(reader, reader.uint32());
  2804. break;
  2805. case 795:
  2806. message.gelu = $root.CoreML.Specification.GeluLayerParams.decode(reader, reader.uint32());
  2807. break;
  2808. case 815:
  2809. message.equal = $root.CoreML.Specification.EqualLayerParams.decode(reader, reader.uint32());
  2810. break;
  2811. case 820:
  2812. message.notEqual = $root.CoreML.Specification.NotEqualLayerParams.decode(reader, reader.uint32());
  2813. break;
  2814. case 825:
  2815. message.lessThan = $root.CoreML.Specification.LessThanLayerParams.decode(reader, reader.uint32());
  2816. break;
  2817. case 827:
  2818. message.lessEqual = $root.CoreML.Specification.LessEqualLayerParams.decode(reader, reader.uint32());
  2819. break;
  2820. case 830:
  2821. message.greaterThan = $root.CoreML.Specification.GreaterThanLayerParams.decode(reader, reader.uint32());
  2822. break;
  2823. case 832:
  2824. message.greaterEqual = $root.CoreML.Specification.GreaterEqualLayerParams.decode(reader, reader.uint32());
  2825. break;
  2826. case 840:
  2827. message.logicalOr = $root.CoreML.Specification.LogicalOrLayerParams.decode(reader, reader.uint32());
  2828. break;
  2829. case 845:
  2830. message.logicalXor = $root.CoreML.Specification.LogicalXorLayerParams.decode(reader, reader.uint32());
  2831. break;
  2832. case 850:
  2833. message.logicalNot = $root.CoreML.Specification.LogicalNotLayerParams.decode(reader, reader.uint32());
  2834. break;
  2835. case 855:
  2836. message.logicalAnd = $root.CoreML.Specification.LogicalAndLayerParams.decode(reader, reader.uint32());
  2837. break;
  2838. case 865:
  2839. message.modBroadcastable = $root.CoreML.Specification.ModBroadcastableLayerParams.decode(reader, reader.uint32());
  2840. break;
  2841. case 870:
  2842. message.minBroadcastable = $root.CoreML.Specification.MinBroadcastableLayerParams.decode(reader, reader.uint32());
  2843. break;
  2844. case 875:
  2845. message.maxBroadcastable = $root.CoreML.Specification.MaxBroadcastableLayerParams.decode(reader, reader.uint32());
  2846. break;
  2847. case 880:
  2848. message.addBroadcastable = $root.CoreML.Specification.AddBroadcastableLayerParams.decode(reader, reader.uint32());
  2849. break;
  2850. case 885:
  2851. message.powBroadcastable = $root.CoreML.Specification.PowBroadcastableLayerParams.decode(reader, reader.uint32());
  2852. break;
  2853. case 890:
  2854. message.divideBroadcastable = $root.CoreML.Specification.DivideBroadcastableLayerParams.decode(reader, reader.uint32());
  2855. break;
  2856. case 895:
  2857. message.floorDivBroadcastable = $root.CoreML.Specification.FloorDivBroadcastableLayerParams.decode(reader, reader.uint32());
  2858. break;
  2859. case 900:
  2860. message.multiplyBroadcastable = $root.CoreML.Specification.MultiplyBroadcastableLayerParams.decode(reader, reader.uint32());
  2861. break;
  2862. case 905:
  2863. message.subtractBroadcastable = $root.CoreML.Specification.SubtractBroadcastableLayerParams.decode(reader, reader.uint32());
  2864. break;
  2865. case 920:
  2866. message.tile = $root.CoreML.Specification.TileLayerParams.decode(reader, reader.uint32());
  2867. break;
  2868. case 925:
  2869. message.stack = $root.CoreML.Specification.StackLayerParams.decode(reader, reader.uint32());
  2870. break;
  2871. case 930:
  2872. message.gather = $root.CoreML.Specification.GatherLayerParams.decode(reader, reader.uint32());
  2873. break;
  2874. case 935:
  2875. message.scatter = $root.CoreML.Specification.ScatterLayerParams.decode(reader, reader.uint32());
  2876. break;
  2877. case 940:
  2878. message.gatherND = $root.CoreML.Specification.GatherNDLayerParams.decode(reader, reader.uint32());
  2879. break;
  2880. case 945:
  2881. message.scatterND = $root.CoreML.Specification.ScatterNDLayerParams.decode(reader, reader.uint32());
  2882. break;
  2883. case 950:
  2884. message.softmaxND = $root.CoreML.Specification.SoftmaxNDLayerParams.decode(reader, reader.uint32());
  2885. break;
  2886. case 952:
  2887. message.gatherAlongAxis = $root.CoreML.Specification.GatherAlongAxisLayerParams.decode(reader, reader.uint32());
  2888. break;
  2889. case 954:
  2890. message.scatterAlongAxis = $root.CoreML.Specification.ScatterAlongAxisLayerParams.decode(reader, reader.uint32());
  2891. break;
  2892. case 960:
  2893. message.reverse = $root.CoreML.Specification.ReverseLayerParams.decode(reader, reader.uint32());
  2894. break;
  2895. case 965:
  2896. message.reverseSeq = $root.CoreML.Specification.ReverseSeqLayerParams.decode(reader, reader.uint32());
  2897. break;
  2898. case 975:
  2899. message.splitND = $root.CoreML.Specification.SplitNDLayerParams.decode(reader, reader.uint32());
  2900. break;
  2901. case 980:
  2902. message.concatND = $root.CoreML.Specification.ConcatNDLayerParams.decode(reader, reader.uint32());
  2903. break;
  2904. case 985:
  2905. message.transpose = $root.CoreML.Specification.TransposeLayerParams.decode(reader, reader.uint32());
  2906. break;
  2907. case 995:
  2908. message.sliceStatic = $root.CoreML.Specification.SliceStaticLayerParams.decode(reader, reader.uint32());
  2909. break;
  2910. case 1000:
  2911. message.sliceDynamic = $root.CoreML.Specification.SliceDynamicLayerParams.decode(reader, reader.uint32());
  2912. break;
  2913. case 1005:
  2914. message.slidingWindows = $root.CoreML.Specification.SlidingWindowsLayerParams.decode(reader, reader.uint32());
  2915. break;
  2916. case 1015:
  2917. message.topK = $root.CoreML.Specification.TopKLayerParams.decode(reader, reader.uint32());
  2918. break;
  2919. case 1020:
  2920. message.argMin = $root.CoreML.Specification.ArgMinLayerParams.decode(reader, reader.uint32());
  2921. break;
  2922. case 1025:
  2923. message.argMax = $root.CoreML.Specification.ArgMaxLayerParams.decode(reader, reader.uint32());
  2924. break;
  2925. case 1040:
  2926. message.embeddingND = $root.CoreML.Specification.EmbeddingNDLayerParams.decode(reader, reader.uint32());
  2927. break;
  2928. case 1045:
  2929. message.batchedMatmul = $root.CoreML.Specification.BatchedMatMulLayerParams.decode(reader, reader.uint32());
  2930. break;
  2931. case 1065:
  2932. message.getShape = $root.CoreML.Specification.GetShapeLayerParams.decode(reader, reader.uint32());
  2933. break;
  2934. case 1070:
  2935. message.loadConstantND = $root.CoreML.Specification.LoadConstantNDLayerParams.decode(reader, reader.uint32());
  2936. break;
  2937. case 1080:
  2938. message.fillLike = $root.CoreML.Specification.FillLikeLayerParams.decode(reader, reader.uint32());
  2939. break;
  2940. case 1085:
  2941. message.fillStatic = $root.CoreML.Specification.FillStaticLayerParams.decode(reader, reader.uint32());
  2942. break;
  2943. case 1090:
  2944. message.fillDynamic = $root.CoreML.Specification.FillDynamicLayerParams.decode(reader, reader.uint32());
  2945. break;
  2946. case 1100:
  2947. message.broadcastToLike = $root.CoreML.Specification.BroadcastToLikeLayerParams.decode(reader, reader.uint32());
  2948. break;
  2949. case 1105:
  2950. message.broadcastToStatic = $root.CoreML.Specification.BroadcastToStaticLayerParams.decode(reader, reader.uint32());
  2951. break;
  2952. case 1110:
  2953. message.broadcastToDynamic = $root.CoreML.Specification.BroadcastToDynamicLayerParams.decode(reader, reader.uint32());
  2954. break;
  2955. case 1120:
  2956. message.squeeze = $root.CoreML.Specification.SqueezeLayerParams.decode(reader, reader.uint32());
  2957. break;
  2958. case 1125:
  2959. message.expandDims = $root.CoreML.Specification.ExpandDimsLayerParams.decode(reader, reader.uint32());
  2960. break;
  2961. case 1130:
  2962. message.flattenTo2D = $root.CoreML.Specification.FlattenTo2DLayerParams.decode(reader, reader.uint32());
  2963. break;
  2964. case 1135:
  2965. message.reshapeLike = $root.CoreML.Specification.ReshapeLikeLayerParams.decode(reader, reader.uint32());
  2966. break;
  2967. case 1140:
  2968. message.reshapeStatic = $root.CoreML.Specification.ReshapeStaticLayerParams.decode(reader, reader.uint32());
  2969. break;
  2970. case 1145:
  2971. message.reshapeDynamic = $root.CoreML.Specification.ReshapeDynamicLayerParams.decode(reader, reader.uint32());
  2972. break;
  2973. case 1150:
  2974. message.rankPreservingReshape = $root.CoreML.Specification.RankPreservingReshapeLayerParams.decode(reader, reader.uint32());
  2975. break;
  2976. case 1155:
  2977. message.constantPad = $root.CoreML.Specification.ConstantPaddingLayerParams.decode(reader, reader.uint32());
  2978. break;
  2979. case 1170:
  2980. message.randomNormalLike = $root.CoreML.Specification.RandomNormalLikeLayerParams.decode(reader, reader.uint32());
  2981. break;
  2982. case 1175:
  2983. message.randomNormalStatic = $root.CoreML.Specification.RandomNormalStaticLayerParams.decode(reader, reader.uint32());
  2984. break;
  2985. case 1180:
  2986. message.randomNormalDynamic = $root.CoreML.Specification.RandomNormalDynamicLayerParams.decode(reader, reader.uint32());
  2987. break;
  2988. case 1190:
  2989. message.randomUniformLike = $root.CoreML.Specification.RandomUniformLikeLayerParams.decode(reader, reader.uint32());
  2990. break;
  2991. case 1195:
  2992. message.randomUniformStatic = $root.CoreML.Specification.RandomUniformStaticLayerParams.decode(reader, reader.uint32());
  2993. break;
  2994. case 1200:
  2995. message.randomUniformDynamic = $root.CoreML.Specification.RandomUniformDynamicLayerParams.decode(reader, reader.uint32());
  2996. break;
  2997. case 1210:
  2998. message.randomBernoulliLike = $root.CoreML.Specification.RandomBernoulliLikeLayerParams.decode(reader, reader.uint32());
  2999. break;
  3000. case 1215:
  3001. message.randomBernoulliStatic = $root.CoreML.Specification.RandomBernoulliStaticLayerParams.decode(reader, reader.uint32());
  3002. break;
  3003. case 1220:
  3004. message.randomBernoulliDynamic = $root.CoreML.Specification.RandomBernoulliDynamicLayerParams.decode(reader, reader.uint32());
  3005. break;
  3006. case 1230:
  3007. message.categoricalDistribution = $root.CoreML.Specification.CategoricalDistributionLayerParams.decode(reader, reader.uint32());
  3008. break;
  3009. case 1250:
  3010. message.reduceL1 = $root.CoreML.Specification.ReduceL1LayerParams.decode(reader, reader.uint32());
  3011. break;
  3012. case 1255:
  3013. message.reduceL2 = $root.CoreML.Specification.ReduceL2LayerParams.decode(reader, reader.uint32());
  3014. break;
  3015. case 1260:
  3016. message.reduceMax = $root.CoreML.Specification.ReduceMaxLayerParams.decode(reader, reader.uint32());
  3017. break;
  3018. case 1265:
  3019. message.reduceMin = $root.CoreML.Specification.ReduceMinLayerParams.decode(reader, reader.uint32());
  3020. break;
  3021. case 1270:
  3022. message.reduceSum = $root.CoreML.Specification.ReduceSumLayerParams.decode(reader, reader.uint32());
  3023. break;
  3024. case 1275:
  3025. message.reduceProd = $root.CoreML.Specification.ReduceProdLayerParams.decode(reader, reader.uint32());
  3026. break;
  3027. case 1280:
  3028. message.reduceMean = $root.CoreML.Specification.ReduceMeanLayerParams.decode(reader, reader.uint32());
  3029. break;
  3030. case 1285:
  3031. message.reduceLogSum = $root.CoreML.Specification.ReduceLogSumLayerParams.decode(reader, reader.uint32());
  3032. break;
  3033. case 1290:
  3034. message.reduceSumSquare = $root.CoreML.Specification.ReduceSumSquareLayerParams.decode(reader, reader.uint32());
  3035. break;
  3036. case 1295:
  3037. message.reduceLogSumExp = $root.CoreML.Specification.ReduceLogSumExpLayerParams.decode(reader, reader.uint32());
  3038. break;
  3039. case 1313:
  3040. message.whereNonZero = $root.CoreML.Specification.WhereNonZeroLayerParams.decode(reader, reader.uint32());
  3041. break;
  3042. case 1315:
  3043. message.matrixBandPart = $root.CoreML.Specification.MatrixBandPartLayerParams.decode(reader, reader.uint32());
  3044. break;
  3045. case 1320:
  3046. message.lowerTriangular = $root.CoreML.Specification.LowerTriangularLayerParams.decode(reader, reader.uint32());
  3047. break;
  3048. case 1325:
  3049. message.upperTriangular = $root.CoreML.Specification.UpperTriangularLayerParams.decode(reader, reader.uint32());
  3050. break;
  3051. case 1330:
  3052. message.whereBroadcastable = $root.CoreML.Specification.WhereBroadcastableLayerParams.decode(reader, reader.uint32());
  3053. break;
  3054. case 1350:
  3055. message.layerNormalization = $root.CoreML.Specification.LayerNormalizationLayerParams.decode(reader, reader.uint32());
  3056. break;
  3057. case 1400:
  3058. message.NonMaximumSuppression = $root.CoreML.Specification.NonMaximumSuppressionLayerParams.decode(reader, reader.uint32());
  3059. break;
  3060. case 1450:
  3061. message.oneHot = $root.CoreML.Specification.OneHotLayerParams.decode(reader, reader.uint32());
  3062. break;
  3063. case 1455:
  3064. message.cumSum = $root.CoreML.Specification.CumSumLayerParams.decode(reader, reader.uint32());
  3065. break;
  3066. case 1460:
  3067. message.clampedReLU = $root.CoreML.Specification.ClampedReLULayerParams.decode(reader, reader.uint32());
  3068. break;
  3069. case 1461:
  3070. message.argSort = $root.CoreML.Specification.ArgSortLayerParams.decode(reader, reader.uint32());
  3071. break;
  3072. case 1465:
  3073. message.pooling3d = $root.CoreML.Specification.Pooling3DLayerParams.decode(reader, reader.uint32());
  3074. break;
  3075. case 1466:
  3076. message.globalPooling3d = $root.CoreML.Specification.GlobalPooling3DLayerParams.decode(reader, reader.uint32());
  3077. break;
  3078. case 1470:
  3079. message.sliceBySize = $root.CoreML.Specification.SliceBySizeLayerParams.decode(reader, reader.uint32());
  3080. break;
  3081. case 1471:
  3082. message.convolution3d = $root.CoreML.Specification.Convolution3DLayerParams.decode(reader, reader.uint32());
  3083. break;
  3084. default:
  3085. reader.skipType(tag & 7);
  3086. break;
  3087. }
  3088. }
  3089. return message;
  3090. }
  3091. };
  3092. $root.CoreML.Specification.NeuralNetworkLayer.prototype.name = "";
  3093. $root.CoreML.Specification.NeuralNetworkLayer.prototype.isUpdatable = false;
  3094. $root.CoreML.Specification.BranchLayerParams = class BranchLayerParams {
  3095. constructor() {
  3096. }
  3097. static decode(reader, length) {
  3098. const message = new $root.CoreML.Specification.BranchLayerParams();
  3099. const end = reader.next(length);
  3100. while (reader.end(end)) {
  3101. const tag = reader.uint32();
  3102. switch (tag >>> 3) {
  3103. case 1:
  3104. message.ifBranch = $root.CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  3105. break;
  3106. case 2:
  3107. message.elseBranch = $root.CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  3108. break;
  3109. default:
  3110. reader.skipType(tag & 7);
  3111. break;
  3112. }
  3113. }
  3114. return message;
  3115. }
  3116. };
  3117. $root.CoreML.Specification.BranchLayerParams.prototype.ifBranch = null;
  3118. $root.CoreML.Specification.BranchLayerParams.prototype.elseBranch = null;
  3119. $root.CoreML.Specification.LoopLayerParams = class LoopLayerParams {
  3120. constructor() {
  3121. }
  3122. static decode(reader, length) {
  3123. const message = new $root.CoreML.Specification.LoopLayerParams();
  3124. const end = reader.next(length);
  3125. while (reader.end(end)) {
  3126. const tag = reader.uint32();
  3127. switch (tag >>> 3) {
  3128. case 1:
  3129. message.maxLoopIterations = reader.uint64();
  3130. break;
  3131. case 2:
  3132. message.conditionVar = reader.string();
  3133. break;
  3134. case 3:
  3135. message.conditionNetwork = $root.CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  3136. break;
  3137. case 4:
  3138. message.bodyNetwork = $root.CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  3139. break;
  3140. default:
  3141. reader.skipType(tag & 7);
  3142. break;
  3143. }
  3144. }
  3145. return message;
  3146. }
  3147. };
  3148. $root.CoreML.Specification.LoopLayerParams.prototype.maxLoopIterations = protobuf.Uint64.create(0);
  3149. $root.CoreML.Specification.LoopLayerParams.prototype.conditionVar = "";
  3150. $root.CoreML.Specification.LoopLayerParams.prototype.conditionNetwork = null;
  3151. $root.CoreML.Specification.LoopLayerParams.prototype.bodyNetwork = null;
  3152. $root.CoreML.Specification.LoopBreakLayerParams = class LoopBreakLayerParams {
  3153. constructor() {
  3154. }
  3155. static decode(reader, length) {
  3156. const message = new $root.CoreML.Specification.LoopBreakLayerParams();
  3157. const end = reader.next(length);
  3158. while (reader.end(end)) {
  3159. const tag = reader.uint32();
  3160. switch (tag >>> 3) {
  3161. default:
  3162. reader.skipType(tag & 7);
  3163. break;
  3164. }
  3165. }
  3166. return message;
  3167. }
  3168. };
  3169. $root.CoreML.Specification.LoopContinueLayerParams = class LoopContinueLayerParams {
  3170. constructor() {
  3171. }
  3172. static decode(reader, length) {
  3173. const message = new $root.CoreML.Specification.LoopContinueLayerParams();
  3174. const end = reader.next(length);
  3175. while (reader.end(end)) {
  3176. const tag = reader.uint32();
  3177. switch (tag >>> 3) {
  3178. default:
  3179. reader.skipType(tag & 7);
  3180. break;
  3181. }
  3182. }
  3183. return message;
  3184. }
  3185. };
  3186. $root.CoreML.Specification.CopyLayerParams = class CopyLayerParams {
  3187. constructor() {
  3188. }
  3189. static decode(reader, length) {
  3190. const message = new $root.CoreML.Specification.CopyLayerParams();
  3191. const end = reader.next(length);
  3192. while (reader.end(end)) {
  3193. const tag = reader.uint32();
  3194. switch (tag >>> 3) {
  3195. default:
  3196. reader.skipType(tag & 7);
  3197. break;
  3198. }
  3199. }
  3200. return message;
  3201. }
  3202. };
  3203. $root.CoreML.Specification.GreaterThanLayerParams = class GreaterThanLayerParams {
  3204. constructor() {
  3205. }
  3206. static decode(reader, length) {
  3207. const message = new $root.CoreML.Specification.GreaterThanLayerParams();
  3208. const end = reader.next(length);
  3209. while (reader.end(end)) {
  3210. const tag = reader.uint32();
  3211. switch (tag >>> 3) {
  3212. case 2:
  3213. message.alpha = reader.float();
  3214. break;
  3215. default:
  3216. reader.skipType(tag & 7);
  3217. break;
  3218. }
  3219. }
  3220. return message;
  3221. }
  3222. };
  3223. $root.CoreML.Specification.GreaterThanLayerParams.prototype.alpha = 0;
  3224. $root.CoreML.Specification.GreaterEqualLayerParams = class GreaterEqualLayerParams {
  3225. constructor() {
  3226. }
  3227. static decode(reader, length) {
  3228. const message = new $root.CoreML.Specification.GreaterEqualLayerParams();
  3229. const end = reader.next(length);
  3230. while (reader.end(end)) {
  3231. const tag = reader.uint32();
  3232. switch (tag >>> 3) {
  3233. case 2:
  3234. message.alpha = reader.float();
  3235. break;
  3236. default:
  3237. reader.skipType(tag & 7);
  3238. break;
  3239. }
  3240. }
  3241. return message;
  3242. }
  3243. };
  3244. $root.CoreML.Specification.GreaterEqualLayerParams.prototype.alpha = 0;
  3245. $root.CoreML.Specification.LessThanLayerParams = class LessThanLayerParams {
  3246. constructor() {
  3247. }
  3248. static decode(reader, length) {
  3249. const message = new $root.CoreML.Specification.LessThanLayerParams();
  3250. const end = reader.next(length);
  3251. while (reader.end(end)) {
  3252. const tag = reader.uint32();
  3253. switch (tag >>> 3) {
  3254. case 2:
  3255. message.alpha = reader.float();
  3256. break;
  3257. default:
  3258. reader.skipType(tag & 7);
  3259. break;
  3260. }
  3261. }
  3262. return message;
  3263. }
  3264. };
  3265. $root.CoreML.Specification.LessThanLayerParams.prototype.alpha = 0;
  3266. $root.CoreML.Specification.LessEqualLayerParams = class LessEqualLayerParams {
  3267. constructor() {
  3268. }
  3269. static decode(reader, length) {
  3270. const message = new $root.CoreML.Specification.LessEqualLayerParams();
  3271. const end = reader.next(length);
  3272. while (reader.end(end)) {
  3273. const tag = reader.uint32();
  3274. switch (tag >>> 3) {
  3275. case 2:
  3276. message.alpha = reader.float();
  3277. break;
  3278. default:
  3279. reader.skipType(tag & 7);
  3280. break;
  3281. }
  3282. }
  3283. return message;
  3284. }
  3285. };
  3286. $root.CoreML.Specification.LessEqualLayerParams.prototype.alpha = 0;
  3287. $root.CoreML.Specification.EqualLayerParams = class EqualLayerParams {
  3288. constructor() {
  3289. }
  3290. static decode(reader, length) {
  3291. const message = new $root.CoreML.Specification.EqualLayerParams();
  3292. const end = reader.next(length);
  3293. while (reader.end(end)) {
  3294. const tag = reader.uint32();
  3295. switch (tag >>> 3) {
  3296. case 1:
  3297. message.alpha = reader.float();
  3298. break;
  3299. default:
  3300. reader.skipType(tag & 7);
  3301. break;
  3302. }
  3303. }
  3304. return message;
  3305. }
  3306. };
  3307. $root.CoreML.Specification.EqualLayerParams.prototype.alpha = 0;
  3308. $root.CoreML.Specification.NotEqualLayerParams = class NotEqualLayerParams {
  3309. constructor() {
  3310. }
  3311. static decode(reader, length) {
  3312. const message = new $root.CoreML.Specification.NotEqualLayerParams();
  3313. const end = reader.next(length);
  3314. while (reader.end(end)) {
  3315. const tag = reader.uint32();
  3316. switch (tag >>> 3) {
  3317. case 1:
  3318. message.alpha = reader.float();
  3319. break;
  3320. default:
  3321. reader.skipType(tag & 7);
  3322. break;
  3323. }
  3324. }
  3325. return message;
  3326. }
  3327. };
  3328. $root.CoreML.Specification.NotEqualLayerParams.prototype.alpha = 0;
  3329. $root.CoreML.Specification.LogicalAndLayerParams = class LogicalAndLayerParams {
  3330. constructor() {
  3331. }
  3332. static decode(reader, length) {
  3333. const message = new $root.CoreML.Specification.LogicalAndLayerParams();
  3334. const end = reader.next(length);
  3335. while (reader.end(end)) {
  3336. const tag = reader.uint32();
  3337. switch (tag >>> 3) {
  3338. default:
  3339. reader.skipType(tag & 7);
  3340. break;
  3341. }
  3342. }
  3343. return message;
  3344. }
  3345. };
  3346. $root.CoreML.Specification.LogicalOrLayerParams = class LogicalOrLayerParams {
  3347. constructor() {
  3348. }
  3349. static decode(reader, length) {
  3350. const message = new $root.CoreML.Specification.LogicalOrLayerParams();
  3351. const end = reader.next(length);
  3352. while (reader.end(end)) {
  3353. const tag = reader.uint32();
  3354. switch (tag >>> 3) {
  3355. default:
  3356. reader.skipType(tag & 7);
  3357. break;
  3358. }
  3359. }
  3360. return message;
  3361. }
  3362. };
  3363. $root.CoreML.Specification.LogicalXorLayerParams = class LogicalXorLayerParams {
  3364. constructor() {
  3365. }
  3366. static decode(reader, length) {
  3367. const message = new $root.CoreML.Specification.LogicalXorLayerParams();
  3368. const end = reader.next(length);
  3369. while (reader.end(end)) {
  3370. const tag = reader.uint32();
  3371. switch (tag >>> 3) {
  3372. default:
  3373. reader.skipType(tag & 7);
  3374. break;
  3375. }
  3376. }
  3377. return message;
  3378. }
  3379. };
  3380. $root.CoreML.Specification.LogicalNotLayerParams = class LogicalNotLayerParams {
  3381. constructor() {
  3382. }
  3383. static decode(reader, length) {
  3384. const message = new $root.CoreML.Specification.LogicalNotLayerParams();
  3385. const end = reader.next(length);
  3386. while (reader.end(end)) {
  3387. const tag = reader.uint32();
  3388. switch (tag >>> 3) {
  3389. default:
  3390. reader.skipType(tag & 7);
  3391. break;
  3392. }
  3393. }
  3394. return message;
  3395. }
  3396. };
  3397. $root.CoreML.Specification.BorderAmounts = class BorderAmounts {
  3398. constructor() {
  3399. this.borderAmounts = [];
  3400. }
  3401. static decode(reader, length) {
  3402. const message = new $root.CoreML.Specification.BorderAmounts();
  3403. const end = reader.next(length);
  3404. while (reader.end(end)) {
  3405. const tag = reader.uint32();
  3406. switch (tag >>> 3) {
  3407. case 10:
  3408. message.borderAmounts.push($root.CoreML.Specification.BorderAmounts.EdgeSizes.decode(reader, reader.uint32()));
  3409. break;
  3410. default:
  3411. reader.skipType(tag & 7);
  3412. break;
  3413. }
  3414. }
  3415. return message;
  3416. }
  3417. };
  3418. $root.CoreML.Specification.BorderAmounts.EdgeSizes = class EdgeSizes {
  3419. constructor() {
  3420. }
  3421. static decode(reader, length) {
  3422. const message = new $root.CoreML.Specification.BorderAmounts.EdgeSizes();
  3423. const end = reader.next(length);
  3424. while (reader.end(end)) {
  3425. const tag = reader.uint32();
  3426. switch (tag >>> 3) {
  3427. case 1:
  3428. message.startEdgeSize = reader.uint64();
  3429. break;
  3430. case 2:
  3431. message.endEdgeSize = reader.uint64();
  3432. break;
  3433. default:
  3434. reader.skipType(tag & 7);
  3435. break;
  3436. }
  3437. }
  3438. return message;
  3439. }
  3440. };
  3441. $root.CoreML.Specification.BorderAmounts.EdgeSizes.prototype.startEdgeSize = protobuf.Uint64.create(0);
  3442. $root.CoreML.Specification.BorderAmounts.EdgeSizes.prototype.endEdgeSize = protobuf.Uint64.create(0);
  3443. $root.CoreML.Specification.ValidPadding = class ValidPadding {
  3444. constructor() {
  3445. }
  3446. static decode(reader, length) {
  3447. const message = new $root.CoreML.Specification.ValidPadding();
  3448. const end = reader.next(length);
  3449. while (reader.end(end)) {
  3450. const tag = reader.uint32();
  3451. switch (tag >>> 3) {
  3452. case 1:
  3453. message.paddingAmounts = $root.CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  3454. break;
  3455. default:
  3456. reader.skipType(tag & 7);
  3457. break;
  3458. }
  3459. }
  3460. return message;
  3461. }
  3462. };
  3463. $root.CoreML.Specification.ValidPadding.prototype.paddingAmounts = null;
  3464. $root.CoreML.Specification.SamePadding = class SamePadding {
  3465. constructor() {
  3466. }
  3467. static decode(reader, length) {
  3468. const message = new $root.CoreML.Specification.SamePadding();
  3469. const end = reader.next(length);
  3470. while (reader.end(end)) {
  3471. const tag = reader.uint32();
  3472. switch (tag >>> 3) {
  3473. case 1:
  3474. message.asymmetryMode = reader.int32();
  3475. break;
  3476. default:
  3477. reader.skipType(tag & 7);
  3478. break;
  3479. }
  3480. }
  3481. return message;
  3482. }
  3483. };
  3484. $root.CoreML.Specification.SamePadding.prototype.asymmetryMode = 0;
  3485. $root.CoreML.Specification.SamePadding.SamePaddingMode = {
  3486. "BOTTOM_RIGHT_HEAVY": 0,
  3487. "TOP_LEFT_HEAVY": 1
  3488. };
  3489. $root.CoreML.Specification.SamplingMode = class SamplingMode {
  3490. constructor() {
  3491. }
  3492. static decode(reader, length) {
  3493. const message = new $root.CoreML.Specification.SamplingMode();
  3494. const end = reader.next(length);
  3495. while (reader.end(end)) {
  3496. const tag = reader.uint32();
  3497. switch (tag >>> 3) {
  3498. case 1:
  3499. message.samplingMethod = reader.int32();
  3500. break;
  3501. default:
  3502. reader.skipType(tag & 7);
  3503. break;
  3504. }
  3505. }
  3506. return message;
  3507. }
  3508. };
  3509. $root.CoreML.Specification.SamplingMode.prototype.samplingMethod = 0;
  3510. $root.CoreML.Specification.SamplingMode.Method = {
  3511. "STRICT_ALIGN_ENDPOINTS_MODE": 0,
  3512. "ALIGN_ENDPOINTS_MODE": 1,
  3513. "UPSAMPLE_MODE": 2,
  3514. "ROI_ALIGN_MODE": 3
  3515. };
  3516. $root.CoreML.Specification.BoxCoordinatesMode = class BoxCoordinatesMode {
  3517. constructor() {
  3518. }
  3519. static decode(reader, length) {
  3520. const message = new $root.CoreML.Specification.BoxCoordinatesMode();
  3521. const end = reader.next(length);
  3522. while (reader.end(end)) {
  3523. const tag = reader.uint32();
  3524. switch (tag >>> 3) {
  3525. case 1:
  3526. message.boxMode = reader.int32();
  3527. break;
  3528. default:
  3529. reader.skipType(tag & 7);
  3530. break;
  3531. }
  3532. }
  3533. return message;
  3534. }
  3535. };
  3536. $root.CoreML.Specification.BoxCoordinatesMode.prototype.boxMode = 0;
  3537. $root.CoreML.Specification.BoxCoordinatesMode.Coordinates = {
  3538. "CORNERS_HEIGHT_FIRST": 0,
  3539. "CORNERS_WIDTH_FIRST": 1,
  3540. "CENTER_SIZE_HEIGHT_FIRST": 2,
  3541. "CENTER_SIZE_WIDTH_FIRST": 3
  3542. };
  3543. $root.CoreML.Specification.WeightParams = class WeightParams {
  3544. constructor() {
  3545. this.floatValue = [];
  3546. }
  3547. static decode(reader, length) {
  3548. const message = new $root.CoreML.Specification.WeightParams();
  3549. const end = reader.next(length);
  3550. while (reader.end(end)) {
  3551. const tag = reader.uint32();
  3552. switch (tag >>> 3) {
  3553. case 1:
  3554. message.floatValue = reader.floats(message.floatValue, tag);
  3555. break;
  3556. case 2:
  3557. message.float16Value = reader.bytes();
  3558. break;
  3559. case 30:
  3560. message.rawValue = reader.bytes();
  3561. break;
  3562. case 31:
  3563. message.int8RawValue = reader.bytes();
  3564. break;
  3565. case 40:
  3566. message.quantization = $root.CoreML.Specification.QuantizationParams.decode(reader, reader.uint32());
  3567. break;
  3568. case 50:
  3569. message.isUpdatable = reader.bool();
  3570. break;
  3571. default:
  3572. reader.skipType(tag & 7);
  3573. break;
  3574. }
  3575. }
  3576. return message;
  3577. }
  3578. };
  3579. $root.CoreML.Specification.WeightParams.prototype.float16Value = new Uint8Array([]);
  3580. $root.CoreML.Specification.WeightParams.prototype.rawValue = new Uint8Array([]);
  3581. $root.CoreML.Specification.WeightParams.prototype.int8RawValue = new Uint8Array([]);
  3582. $root.CoreML.Specification.WeightParams.prototype.quantization = null;
  3583. $root.CoreML.Specification.WeightParams.prototype.isUpdatable = false;
  3584. $root.CoreML.Specification.QuantizationParams = class QuantizationParams {
  3585. constructor() {
  3586. }
  3587. get QuantizationType() {
  3588. $root.CoreML.Specification.QuantizationParams.QuantizationTypeSet = $root.CoreML.Specification.QuantizationParams.QuantizationTypeSet || new Set([ "linearQuantization", "lookupTableQuantization"]);
  3589. return Object.keys(this).find((key) => $root.CoreML.Specification.QuantizationParams.QuantizationTypeSet.has(key) && this[key] != null);
  3590. }
  3591. static decode(reader, length) {
  3592. const message = new $root.CoreML.Specification.QuantizationParams();
  3593. const end = reader.next(length);
  3594. while (reader.end(end)) {
  3595. const tag = reader.uint32();
  3596. switch (tag >>> 3) {
  3597. case 1:
  3598. message.numberOfBits = reader.uint64();
  3599. break;
  3600. case 101:
  3601. message.linearQuantization = $root.CoreML.Specification.LinearQuantizationParams.decode(reader, reader.uint32());
  3602. break;
  3603. case 102:
  3604. message.lookupTableQuantization = $root.CoreML.Specification.LookUpTableQuantizationParams.decode(reader, reader.uint32());
  3605. break;
  3606. default:
  3607. reader.skipType(tag & 7);
  3608. break;
  3609. }
  3610. }
  3611. return message;
  3612. }
  3613. };
  3614. $root.CoreML.Specification.QuantizationParams.prototype.numberOfBits = protobuf.Uint64.create(0);
  3615. $root.CoreML.Specification.LinearQuantizationParams = class LinearQuantizationParams {
  3616. constructor() {
  3617. this.scale = [];
  3618. this.bias = [];
  3619. }
  3620. static decode(reader, length) {
  3621. const message = new $root.CoreML.Specification.LinearQuantizationParams();
  3622. const end = reader.next(length);
  3623. while (reader.end(end)) {
  3624. const tag = reader.uint32();
  3625. switch (tag >>> 3) {
  3626. case 1:
  3627. message.scale = reader.floats(message.scale, tag);
  3628. break;
  3629. case 2:
  3630. message.bias = reader.floats(message.bias, tag);
  3631. break;
  3632. default:
  3633. reader.skipType(tag & 7);
  3634. break;
  3635. }
  3636. }
  3637. return message;
  3638. }
  3639. };
  3640. $root.CoreML.Specification.LookUpTableQuantizationParams = class LookUpTableQuantizationParams {
  3641. constructor() {
  3642. this.floatValue = [];
  3643. }
  3644. static decode(reader, length) {
  3645. const message = new $root.CoreML.Specification.LookUpTableQuantizationParams();
  3646. const end = reader.next(length);
  3647. while (reader.end(end)) {
  3648. const tag = reader.uint32();
  3649. switch (tag >>> 3) {
  3650. case 1:
  3651. message.floatValue = reader.floats(message.floatValue, tag);
  3652. break;
  3653. default:
  3654. reader.skipType(tag & 7);
  3655. break;
  3656. }
  3657. }
  3658. return message;
  3659. }
  3660. };
  3661. $root.CoreML.Specification.ConvolutionLayerParams = class ConvolutionLayerParams {
  3662. constructor() {
  3663. this.kernelSize = [];
  3664. this.stride = [];
  3665. this.dilationFactor = [];
  3666. this.outputShape = [];
  3667. }
  3668. get ConvolutionPaddingType() {
  3669. $root.CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet = $root.CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet || new Set([ "valid", "same"]);
  3670. return Object.keys(this).find((key) => $root.CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet.has(key) && this[key] != null);
  3671. }
  3672. static decode(reader, length) {
  3673. const message = new $root.CoreML.Specification.ConvolutionLayerParams();
  3674. const end = reader.next(length);
  3675. while (reader.end(end)) {
  3676. const tag = reader.uint32();
  3677. switch (tag >>> 3) {
  3678. case 1:
  3679. message.outputChannels = reader.uint64();
  3680. break;
  3681. case 2:
  3682. message.kernelChannels = reader.uint64();
  3683. break;
  3684. case 10:
  3685. message.nGroups = reader.uint64();
  3686. break;
  3687. case 20:
  3688. message.kernelSize = reader.array(message.kernelSize, () => reader.uint64(), tag);
  3689. break;
  3690. case 30:
  3691. message.stride = reader.array(message.stride, () => reader.uint64(), tag);
  3692. break;
  3693. case 40:
  3694. message.dilationFactor = reader.array(message.dilationFactor, () => reader.uint64(), tag);
  3695. break;
  3696. case 50:
  3697. message.valid = $root.CoreML.Specification.ValidPadding.decode(reader, reader.uint32());
  3698. break;
  3699. case 51:
  3700. message.same = $root.CoreML.Specification.SamePadding.decode(reader, reader.uint32());
  3701. break;
  3702. case 60:
  3703. message.isDeconvolution = reader.bool();
  3704. break;
  3705. case 70:
  3706. message.hasBias = reader.bool();
  3707. break;
  3708. case 90:
  3709. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3710. break;
  3711. case 91:
  3712. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3713. break;
  3714. case 100:
  3715. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  3716. break;
  3717. default:
  3718. reader.skipType(tag & 7);
  3719. break;
  3720. }
  3721. }
  3722. return message;
  3723. }
  3724. };
  3725. $root.CoreML.Specification.ConvolutionLayerParams.prototype.outputChannels = protobuf.Uint64.create(0);
  3726. $root.CoreML.Specification.ConvolutionLayerParams.prototype.kernelChannels = protobuf.Uint64.create(0);
  3727. $root.CoreML.Specification.ConvolutionLayerParams.prototype.nGroups = protobuf.Uint64.create(0);
  3728. $root.CoreML.Specification.ConvolutionLayerParams.prototype.isDeconvolution = false;
  3729. $root.CoreML.Specification.ConvolutionLayerParams.prototype.hasBias = false;
  3730. $root.CoreML.Specification.ConvolutionLayerParams.prototype.weights = null;
  3731. $root.CoreML.Specification.ConvolutionLayerParams.prototype.bias = null;
  3732. $root.CoreML.Specification.Convolution3DLayerParams = class Convolution3DLayerParams {
  3733. constructor() {
  3734. this.outputShape = [];
  3735. }
  3736. static decode(reader, length) {
  3737. const message = new $root.CoreML.Specification.Convolution3DLayerParams();
  3738. const end = reader.next(length);
  3739. while (reader.end(end)) {
  3740. const tag = reader.uint32();
  3741. switch (tag >>> 3) {
  3742. case 1:
  3743. message.outputChannels = reader.int32();
  3744. break;
  3745. case 2:
  3746. message.inputChannels = reader.int32();
  3747. break;
  3748. case 10:
  3749. message.nGroups = reader.int32();
  3750. break;
  3751. case 20:
  3752. message.kernelDepth = reader.int32();
  3753. break;
  3754. case 21:
  3755. message.kernelHeight = reader.int32();
  3756. break;
  3757. case 22:
  3758. message.kernelWidth = reader.int32();
  3759. break;
  3760. case 31:
  3761. message.strideDepth = reader.int32();
  3762. break;
  3763. case 32:
  3764. message.strideHeight = reader.int32();
  3765. break;
  3766. case 33:
  3767. message.strideWidth = reader.int32();
  3768. break;
  3769. case 40:
  3770. message.dilationDepth = reader.int32();
  3771. break;
  3772. case 41:
  3773. message.dilationHeight = reader.int32();
  3774. break;
  3775. case 42:
  3776. message.dilationWidth = reader.int32();
  3777. break;
  3778. case 50:
  3779. message.hasBias = reader.bool();
  3780. break;
  3781. case 60:
  3782. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3783. break;
  3784. case 61:
  3785. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3786. break;
  3787. case 70:
  3788. message.paddingType = reader.int32();
  3789. break;
  3790. case 80:
  3791. message.customPaddingFront = reader.int32();
  3792. break;
  3793. case 81:
  3794. message.customPaddingBack = reader.int32();
  3795. break;
  3796. case 82:
  3797. message.customPaddingTop = reader.int32();
  3798. break;
  3799. case 83:
  3800. message.customPaddingBottom = reader.int32();
  3801. break;
  3802. case 84:
  3803. message.customPaddingLeft = reader.int32();
  3804. break;
  3805. case 85:
  3806. message.customPaddingRight = reader.int32();
  3807. break;
  3808. case 86:
  3809. message.isDeconvolution = reader.bool();
  3810. break;
  3811. case 87:
  3812. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  3813. break;
  3814. default:
  3815. reader.skipType(tag & 7);
  3816. break;
  3817. }
  3818. }
  3819. return message;
  3820. }
  3821. };
  3822. $root.CoreML.Specification.Convolution3DLayerParams.prototype.outputChannels = 0;
  3823. $root.CoreML.Specification.Convolution3DLayerParams.prototype.inputChannels = 0;
  3824. $root.CoreML.Specification.Convolution3DLayerParams.prototype.nGroups = 0;
  3825. $root.CoreML.Specification.Convolution3DLayerParams.prototype.kernelDepth = 0;
  3826. $root.CoreML.Specification.Convolution3DLayerParams.prototype.kernelHeight = 0;
  3827. $root.CoreML.Specification.Convolution3DLayerParams.prototype.kernelWidth = 0;
  3828. $root.CoreML.Specification.Convolution3DLayerParams.prototype.strideDepth = 0;
  3829. $root.CoreML.Specification.Convolution3DLayerParams.prototype.strideHeight = 0;
  3830. $root.CoreML.Specification.Convolution3DLayerParams.prototype.strideWidth = 0;
  3831. $root.CoreML.Specification.Convolution3DLayerParams.prototype.dilationDepth = 0;
  3832. $root.CoreML.Specification.Convolution3DLayerParams.prototype.dilationHeight = 0;
  3833. $root.CoreML.Specification.Convolution3DLayerParams.prototype.dilationWidth = 0;
  3834. $root.CoreML.Specification.Convolution3DLayerParams.prototype.hasBias = false;
  3835. $root.CoreML.Specification.Convolution3DLayerParams.prototype.weights = null;
  3836. $root.CoreML.Specification.Convolution3DLayerParams.prototype.bias = null;
  3837. $root.CoreML.Specification.Convolution3DLayerParams.prototype.paddingType = 0;
  3838. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingFront = 0;
  3839. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingBack = 0;
  3840. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingTop = 0;
  3841. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingBottom = 0;
  3842. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingLeft = 0;
  3843. $root.CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingRight = 0;
  3844. $root.CoreML.Specification.Convolution3DLayerParams.prototype.isDeconvolution = false;
  3845. $root.CoreML.Specification.Convolution3DLayerParams.PaddingType = {
  3846. "CUSTOM": 0,
  3847. "VALID": 1,
  3848. "SAME": 2
  3849. };
  3850. $root.CoreML.Specification.InnerProductLayerParams = class InnerProductLayerParams {
  3851. constructor() {
  3852. }
  3853. static decode(reader, length) {
  3854. const message = new $root.CoreML.Specification.InnerProductLayerParams();
  3855. const end = reader.next(length);
  3856. while (reader.end(end)) {
  3857. const tag = reader.uint32();
  3858. switch (tag >>> 3) {
  3859. case 1:
  3860. message.inputChannels = reader.uint64();
  3861. break;
  3862. case 2:
  3863. message.outputChannels = reader.uint64();
  3864. break;
  3865. case 10:
  3866. message.hasBias = reader.bool();
  3867. break;
  3868. case 20:
  3869. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3870. break;
  3871. case 21:
  3872. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3873. break;
  3874. case 22:
  3875. message.int8DynamicQuantize = reader.bool();
  3876. break;
  3877. default:
  3878. reader.skipType(tag & 7);
  3879. break;
  3880. }
  3881. }
  3882. return message;
  3883. }
  3884. };
  3885. $root.CoreML.Specification.InnerProductLayerParams.prototype.inputChannels = protobuf.Uint64.create(0);
  3886. $root.CoreML.Specification.InnerProductLayerParams.prototype.outputChannels = protobuf.Uint64.create(0);
  3887. $root.CoreML.Specification.InnerProductLayerParams.prototype.hasBias = false;
  3888. $root.CoreML.Specification.InnerProductLayerParams.prototype.weights = null;
  3889. $root.CoreML.Specification.InnerProductLayerParams.prototype.bias = null;
  3890. $root.CoreML.Specification.InnerProductLayerParams.prototype.int8DynamicQuantize = false;
  3891. $root.CoreML.Specification.EmbeddingLayerParams = class EmbeddingLayerParams {
  3892. constructor() {
  3893. }
  3894. static decode(reader, length) {
  3895. const message = new $root.CoreML.Specification.EmbeddingLayerParams();
  3896. const end = reader.next(length);
  3897. while (reader.end(end)) {
  3898. const tag = reader.uint32();
  3899. switch (tag >>> 3) {
  3900. case 1:
  3901. message.inputDim = reader.uint64();
  3902. break;
  3903. case 2:
  3904. message.outputChannels = reader.uint64();
  3905. break;
  3906. case 10:
  3907. message.hasBias = reader.bool();
  3908. break;
  3909. case 20:
  3910. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3911. break;
  3912. case 21:
  3913. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3914. break;
  3915. default:
  3916. reader.skipType(tag & 7);
  3917. break;
  3918. }
  3919. }
  3920. return message;
  3921. }
  3922. };
  3923. $root.CoreML.Specification.EmbeddingLayerParams.prototype.inputDim = protobuf.Uint64.create(0);
  3924. $root.CoreML.Specification.EmbeddingLayerParams.prototype.outputChannels = protobuf.Uint64.create(0);
  3925. $root.CoreML.Specification.EmbeddingLayerParams.prototype.hasBias = false;
  3926. $root.CoreML.Specification.EmbeddingLayerParams.prototype.weights = null;
  3927. $root.CoreML.Specification.EmbeddingLayerParams.prototype.bias = null;
  3928. $root.CoreML.Specification.EmbeddingNDLayerParams = class EmbeddingNDLayerParams {
  3929. constructor() {
  3930. }
  3931. static decode(reader, length) {
  3932. const message = new $root.CoreML.Specification.EmbeddingNDLayerParams();
  3933. const end = reader.next(length);
  3934. while (reader.end(end)) {
  3935. const tag = reader.uint32();
  3936. switch (tag >>> 3) {
  3937. case 1:
  3938. message.vocabSize = reader.uint64();
  3939. break;
  3940. case 2:
  3941. message.embeddingSize = reader.uint64();
  3942. break;
  3943. case 3:
  3944. message.hasBias = reader.bool();
  3945. break;
  3946. case 20:
  3947. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3948. break;
  3949. case 21:
  3950. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3951. break;
  3952. default:
  3953. reader.skipType(tag & 7);
  3954. break;
  3955. }
  3956. }
  3957. return message;
  3958. }
  3959. };
  3960. $root.CoreML.Specification.EmbeddingNDLayerParams.prototype.vocabSize = protobuf.Uint64.create(0);
  3961. $root.CoreML.Specification.EmbeddingNDLayerParams.prototype.embeddingSize = protobuf.Uint64.create(0);
  3962. $root.CoreML.Specification.EmbeddingNDLayerParams.prototype.hasBias = false;
  3963. $root.CoreML.Specification.EmbeddingNDLayerParams.prototype.weights = null;
  3964. $root.CoreML.Specification.EmbeddingNDLayerParams.prototype.bias = null;
  3965. $root.CoreML.Specification.BatchnormLayerParams = class BatchnormLayerParams {
  3966. constructor() {
  3967. }
  3968. static decode(reader, length) {
  3969. const message = new $root.CoreML.Specification.BatchnormLayerParams();
  3970. const end = reader.next(length);
  3971. while (reader.end(end)) {
  3972. const tag = reader.uint32();
  3973. switch (tag >>> 3) {
  3974. case 1:
  3975. message.channels = reader.uint64();
  3976. break;
  3977. case 5:
  3978. message.computeMeanVar = reader.bool();
  3979. break;
  3980. case 6:
  3981. message.instanceNormalization = reader.bool();
  3982. break;
  3983. case 10:
  3984. message.epsilon = reader.float();
  3985. break;
  3986. case 15:
  3987. message.gamma = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3988. break;
  3989. case 16:
  3990. message.beta = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3991. break;
  3992. case 17:
  3993. message.mean = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3994. break;
  3995. case 18:
  3996. message.variance = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  3997. break;
  3998. default:
  3999. reader.skipType(tag & 7);
  4000. break;
  4001. }
  4002. }
  4003. return message;
  4004. }
  4005. };
  4006. $root.CoreML.Specification.BatchnormLayerParams.prototype.channels = protobuf.Uint64.create(0);
  4007. $root.CoreML.Specification.BatchnormLayerParams.prototype.computeMeanVar = false;
  4008. $root.CoreML.Specification.BatchnormLayerParams.prototype.instanceNormalization = false;
  4009. $root.CoreML.Specification.BatchnormLayerParams.prototype.epsilon = 0;
  4010. $root.CoreML.Specification.BatchnormLayerParams.prototype.gamma = null;
  4011. $root.CoreML.Specification.BatchnormLayerParams.prototype.beta = null;
  4012. $root.CoreML.Specification.BatchnormLayerParams.prototype.mean = null;
  4013. $root.CoreML.Specification.BatchnormLayerParams.prototype.variance = null;
  4014. $root.CoreML.Specification.PoolingLayerParams = class PoolingLayerParams {
  4015. constructor() {
  4016. this.kernelSize = [];
  4017. this.stride = [];
  4018. }
  4019. get PoolingPaddingType() {
  4020. $root.CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet = $root.CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet || new Set([ "valid", "same", "includeLastPixel"]);
  4021. return Object.keys(this).find((key) => $root.CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet.has(key) && this[key] != null);
  4022. }
  4023. static decode(reader, length) {
  4024. const message = new $root.CoreML.Specification.PoolingLayerParams();
  4025. const end = reader.next(length);
  4026. while (reader.end(end)) {
  4027. const tag = reader.uint32();
  4028. switch (tag >>> 3) {
  4029. case 1:
  4030. message.type = reader.int32();
  4031. break;
  4032. case 10:
  4033. message.kernelSize = reader.array(message.kernelSize, () => reader.uint64(), tag);
  4034. break;
  4035. case 20:
  4036. message.stride = reader.array(message.stride, () => reader.uint64(), tag);
  4037. break;
  4038. case 30:
  4039. message.valid = $root.CoreML.Specification.ValidPadding.decode(reader, reader.uint32());
  4040. break;
  4041. case 31:
  4042. message.same = $root.CoreML.Specification.SamePadding.decode(reader, reader.uint32());
  4043. break;
  4044. case 32:
  4045. message.includeLastPixel = $root.CoreML.Specification.PoolingLayerParams.ValidCompletePadding.decode(reader, reader.uint32());
  4046. break;
  4047. case 50:
  4048. message.avgPoolExcludePadding = reader.bool();
  4049. break;
  4050. case 60:
  4051. message.globalPooling = reader.bool();
  4052. break;
  4053. default:
  4054. reader.skipType(tag & 7);
  4055. break;
  4056. }
  4057. }
  4058. return message;
  4059. }
  4060. };
  4061. $root.CoreML.Specification.PoolingLayerParams.prototype.type = 0;
  4062. $root.CoreML.Specification.PoolingLayerParams.prototype.avgPoolExcludePadding = false;
  4063. $root.CoreML.Specification.PoolingLayerParams.prototype.globalPooling = false;
  4064. $root.CoreML.Specification.PoolingLayerParams.PoolingType = {
  4065. "MAX": 0,
  4066. "AVERAGE": 1,
  4067. "L2": 2
  4068. };
  4069. $root.CoreML.Specification.PoolingLayerParams.ValidCompletePadding = class ValidCompletePadding {
  4070. constructor() {
  4071. this.paddingAmounts = [];
  4072. }
  4073. static decode(reader, length) {
  4074. const message = new $root.CoreML.Specification.PoolingLayerParams.ValidCompletePadding();
  4075. const end = reader.next(length);
  4076. while (reader.end(end)) {
  4077. const tag = reader.uint32();
  4078. switch (tag >>> 3) {
  4079. case 10:
  4080. message.paddingAmounts = reader.array(message.paddingAmounts, () => reader.uint64(), tag);
  4081. break;
  4082. default:
  4083. reader.skipType(tag & 7);
  4084. break;
  4085. }
  4086. }
  4087. return message;
  4088. }
  4089. };
  4090. $root.CoreML.Specification.Pooling3DLayerParams = class Pooling3DLayerParams {
  4091. constructor() {
  4092. }
  4093. static decode(reader, length) {
  4094. const message = new $root.CoreML.Specification.Pooling3DLayerParams();
  4095. const end = reader.next(length);
  4096. while (reader.end(end)) {
  4097. const tag = reader.uint32();
  4098. switch (tag >>> 3) {
  4099. case 1:
  4100. message.type = reader.int32();
  4101. break;
  4102. case 2:
  4103. message.kernelDepth = reader.int32();
  4104. break;
  4105. case 3:
  4106. message.kernelHeight = reader.int32();
  4107. break;
  4108. case 4:
  4109. message.kernelWidth = reader.int32();
  4110. break;
  4111. case 5:
  4112. message.strideDepth = reader.int32();
  4113. break;
  4114. case 6:
  4115. message.strideHeight = reader.int32();
  4116. break;
  4117. case 7:
  4118. message.strideWidth = reader.int32();
  4119. break;
  4120. case 15:
  4121. message.paddingType = reader.int32();
  4122. break;
  4123. case 8:
  4124. message.customPaddingFront = reader.int32();
  4125. break;
  4126. case 9:
  4127. message.customPaddingBack = reader.int32();
  4128. break;
  4129. case 10:
  4130. message.customPaddingTop = reader.int32();
  4131. break;
  4132. case 11:
  4133. message.customPaddingBottom = reader.int32();
  4134. break;
  4135. case 12:
  4136. message.customPaddingLeft = reader.int32();
  4137. break;
  4138. case 13:
  4139. message.customPaddingRight = reader.int32();
  4140. break;
  4141. case 14:
  4142. message.countExcludePadding = reader.bool();
  4143. break;
  4144. default:
  4145. reader.skipType(tag & 7);
  4146. break;
  4147. }
  4148. }
  4149. return message;
  4150. }
  4151. };
  4152. $root.CoreML.Specification.Pooling3DLayerParams.prototype.type = 0;
  4153. $root.CoreML.Specification.Pooling3DLayerParams.prototype.kernelDepth = 0;
  4154. $root.CoreML.Specification.Pooling3DLayerParams.prototype.kernelHeight = 0;
  4155. $root.CoreML.Specification.Pooling3DLayerParams.prototype.kernelWidth = 0;
  4156. $root.CoreML.Specification.Pooling3DLayerParams.prototype.strideDepth = 0;
  4157. $root.CoreML.Specification.Pooling3DLayerParams.prototype.strideHeight = 0;
  4158. $root.CoreML.Specification.Pooling3DLayerParams.prototype.strideWidth = 0;
  4159. $root.CoreML.Specification.Pooling3DLayerParams.prototype.paddingType = 0;
  4160. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingFront = 0;
  4161. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingBack = 0;
  4162. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingTop = 0;
  4163. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingBottom = 0;
  4164. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingLeft = 0;
  4165. $root.CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingRight = 0;
  4166. $root.CoreML.Specification.Pooling3DLayerParams.prototype.countExcludePadding = false;
  4167. $root.CoreML.Specification.Pooling3DLayerParams.PoolingType3D = {
  4168. "MAX": 0,
  4169. "AVERAGE": 1
  4170. };
  4171. $root.CoreML.Specification.Pooling3DLayerParams.Pooling3DPaddingType = {
  4172. "CUSTOM": 0,
  4173. "VALID": 1,
  4174. "SAME": 2
  4175. };
  4176. $root.CoreML.Specification.GlobalPooling3DLayerParams = class GlobalPooling3DLayerParams {
  4177. constructor() {
  4178. }
  4179. static decode(reader, length) {
  4180. const message = new $root.CoreML.Specification.GlobalPooling3DLayerParams();
  4181. const end = reader.next(length);
  4182. while (reader.end(end)) {
  4183. const tag = reader.uint32();
  4184. switch (tag >>> 3) {
  4185. case 1:
  4186. message.type = reader.int32();
  4187. break;
  4188. default:
  4189. reader.skipType(tag & 7);
  4190. break;
  4191. }
  4192. }
  4193. return message;
  4194. }
  4195. };
  4196. $root.CoreML.Specification.GlobalPooling3DLayerParams.prototype.type = 0;
  4197. $root.CoreML.Specification.GlobalPooling3DLayerParams.GlobalPoolingType3D = {
  4198. "MAX": 0,
  4199. "AVERAGE": 1
  4200. };
  4201. $root.CoreML.Specification.PaddingLayerParams = class PaddingLayerParams {
  4202. constructor() {
  4203. }
  4204. get PaddingType() {
  4205. $root.CoreML.Specification.PaddingLayerParams.PaddingTypeSet = $root.CoreML.Specification.PaddingLayerParams.PaddingTypeSet || new Set([ "constant", "reflection", "replication"]);
  4206. return Object.keys(this).find((key) => $root.CoreML.Specification.PaddingLayerParams.PaddingTypeSet.has(key) && this[key] != null);
  4207. }
  4208. static decode(reader, length) {
  4209. const message = new $root.CoreML.Specification.PaddingLayerParams();
  4210. const end = reader.next(length);
  4211. while (reader.end(end)) {
  4212. const tag = reader.uint32();
  4213. switch (tag >>> 3) {
  4214. case 1:
  4215. message.constant = $root.CoreML.Specification.PaddingLayerParams.PaddingConstant.decode(reader, reader.uint32());
  4216. break;
  4217. case 2:
  4218. message.reflection = $root.CoreML.Specification.PaddingLayerParams.PaddingReflection.decode(reader, reader.uint32());
  4219. break;
  4220. case 3:
  4221. message.replication = $root.CoreML.Specification.PaddingLayerParams.PaddingReplication.decode(reader, reader.uint32());
  4222. break;
  4223. case 10:
  4224. message.paddingAmounts = $root.CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  4225. break;
  4226. default:
  4227. reader.skipType(tag & 7);
  4228. break;
  4229. }
  4230. }
  4231. return message;
  4232. }
  4233. };
  4234. $root.CoreML.Specification.PaddingLayerParams.prototype.paddingAmounts = null;
  4235. $root.CoreML.Specification.PaddingLayerParams.PaddingConstant = class PaddingConstant {
  4236. constructor() {
  4237. }
  4238. static decode(reader, length) {
  4239. const message = new $root.CoreML.Specification.PaddingLayerParams.PaddingConstant();
  4240. const end = reader.next(length);
  4241. while (reader.end(end)) {
  4242. const tag = reader.uint32();
  4243. switch (tag >>> 3) {
  4244. case 1:
  4245. message.value = reader.float();
  4246. break;
  4247. default:
  4248. reader.skipType(tag & 7);
  4249. break;
  4250. }
  4251. }
  4252. return message;
  4253. }
  4254. };
  4255. $root.CoreML.Specification.PaddingLayerParams.PaddingConstant.prototype.value = 0;
  4256. $root.CoreML.Specification.PaddingLayerParams.PaddingReflection = class PaddingReflection {
  4257. constructor() {
  4258. }
  4259. static decode(reader, length) {
  4260. const message = new $root.CoreML.Specification.PaddingLayerParams.PaddingReflection();
  4261. const end = reader.next(length);
  4262. while (reader.end(end)) {
  4263. const tag = reader.uint32();
  4264. switch (tag >>> 3) {
  4265. default:
  4266. reader.skipType(tag & 7);
  4267. break;
  4268. }
  4269. }
  4270. return message;
  4271. }
  4272. };
  4273. $root.CoreML.Specification.PaddingLayerParams.PaddingReplication = class PaddingReplication {
  4274. constructor() {
  4275. }
  4276. static decode(reader, length) {
  4277. const message = new $root.CoreML.Specification.PaddingLayerParams.PaddingReplication();
  4278. const end = reader.next(length);
  4279. while (reader.end(end)) {
  4280. const tag = reader.uint32();
  4281. switch (tag >>> 3) {
  4282. default:
  4283. reader.skipType(tag & 7);
  4284. break;
  4285. }
  4286. }
  4287. return message;
  4288. }
  4289. };
  4290. $root.CoreML.Specification.ConcatLayerParams = class ConcatLayerParams {
  4291. constructor() {
  4292. }
  4293. static decode(reader, length) {
  4294. const message = new $root.CoreML.Specification.ConcatLayerParams();
  4295. const end = reader.next(length);
  4296. while (reader.end(end)) {
  4297. const tag = reader.uint32();
  4298. switch (tag >>> 3) {
  4299. case 100:
  4300. message.sequenceConcat = reader.bool();
  4301. break;
  4302. default:
  4303. reader.skipType(tag & 7);
  4304. break;
  4305. }
  4306. }
  4307. return message;
  4308. }
  4309. };
  4310. $root.CoreML.Specification.ConcatLayerParams.prototype.sequenceConcat = false;
  4311. $root.CoreML.Specification.LRNLayerParams = class LRNLayerParams {
  4312. constructor() {
  4313. }
  4314. static decode(reader, length) {
  4315. const message = new $root.CoreML.Specification.LRNLayerParams();
  4316. const end = reader.next(length);
  4317. while (reader.end(end)) {
  4318. const tag = reader.uint32();
  4319. switch (tag >>> 3) {
  4320. case 1:
  4321. message.alpha = reader.float();
  4322. break;
  4323. case 2:
  4324. message.beta = reader.float();
  4325. break;
  4326. case 3:
  4327. message.localSize = reader.uint64();
  4328. break;
  4329. case 4:
  4330. message.k = reader.float();
  4331. break;
  4332. default:
  4333. reader.skipType(tag & 7);
  4334. break;
  4335. }
  4336. }
  4337. return message;
  4338. }
  4339. };
  4340. $root.CoreML.Specification.LRNLayerParams.prototype.alpha = 0;
  4341. $root.CoreML.Specification.LRNLayerParams.prototype.beta = 0;
  4342. $root.CoreML.Specification.LRNLayerParams.prototype.localSize = protobuf.Uint64.create(0);
  4343. $root.CoreML.Specification.LRNLayerParams.prototype.k = 0;
  4344. $root.CoreML.Specification.SoftmaxLayerParams = class SoftmaxLayerParams {
  4345. constructor() {
  4346. }
  4347. static decode(reader, length) {
  4348. const message = new $root.CoreML.Specification.SoftmaxLayerParams();
  4349. const end = reader.next(length);
  4350. while (reader.end(end)) {
  4351. const tag = reader.uint32();
  4352. switch (tag >>> 3) {
  4353. default:
  4354. reader.skipType(tag & 7);
  4355. break;
  4356. }
  4357. }
  4358. return message;
  4359. }
  4360. };
  4361. $root.CoreML.Specification.SplitLayerParams = class SplitLayerParams {
  4362. constructor() {
  4363. }
  4364. static decode(reader, length) {
  4365. const message = new $root.CoreML.Specification.SplitLayerParams();
  4366. const end = reader.next(length);
  4367. while (reader.end(end)) {
  4368. const tag = reader.uint32();
  4369. switch (tag >>> 3) {
  4370. case 1:
  4371. message.nOutputs = reader.uint64();
  4372. break;
  4373. default:
  4374. reader.skipType(tag & 7);
  4375. break;
  4376. }
  4377. }
  4378. return message;
  4379. }
  4380. };
  4381. $root.CoreML.Specification.SplitLayerParams.prototype.nOutputs = protobuf.Uint64.create(0);
  4382. $root.CoreML.Specification.AddLayerParams = class AddLayerParams {
  4383. constructor() {
  4384. }
  4385. static decode(reader, length) {
  4386. const message = new $root.CoreML.Specification.AddLayerParams();
  4387. const end = reader.next(length);
  4388. while (reader.end(end)) {
  4389. const tag = reader.uint32();
  4390. switch (tag >>> 3) {
  4391. case 1:
  4392. message.alpha = reader.float();
  4393. break;
  4394. default:
  4395. reader.skipType(tag & 7);
  4396. break;
  4397. }
  4398. }
  4399. return message;
  4400. }
  4401. };
  4402. $root.CoreML.Specification.AddLayerParams.prototype.alpha = 0;
  4403. $root.CoreML.Specification.MultiplyLayerParams = class MultiplyLayerParams {
  4404. constructor() {
  4405. }
  4406. static decode(reader, length) {
  4407. const message = new $root.CoreML.Specification.MultiplyLayerParams();
  4408. const end = reader.next(length);
  4409. while (reader.end(end)) {
  4410. const tag = reader.uint32();
  4411. switch (tag >>> 3) {
  4412. case 1:
  4413. message.alpha = reader.float();
  4414. break;
  4415. default:
  4416. reader.skipType(tag & 7);
  4417. break;
  4418. }
  4419. }
  4420. return message;
  4421. }
  4422. };
  4423. $root.CoreML.Specification.MultiplyLayerParams.prototype.alpha = 0;
  4424. $root.CoreML.Specification.UnaryFunctionLayerParams = class UnaryFunctionLayerParams {
  4425. constructor() {
  4426. }
  4427. static decode(reader, length) {
  4428. const message = new $root.CoreML.Specification.UnaryFunctionLayerParams();
  4429. const end = reader.next(length);
  4430. while (reader.end(end)) {
  4431. const tag = reader.uint32();
  4432. switch (tag >>> 3) {
  4433. case 1:
  4434. message.type = reader.int32();
  4435. break;
  4436. case 2:
  4437. message.alpha = reader.float();
  4438. break;
  4439. case 3:
  4440. message.epsilon = reader.float();
  4441. break;
  4442. case 4:
  4443. message.shift = reader.float();
  4444. break;
  4445. case 5:
  4446. message.scale = reader.float();
  4447. break;
  4448. default:
  4449. reader.skipType(tag & 7);
  4450. break;
  4451. }
  4452. }
  4453. return message;
  4454. }
  4455. };
  4456. $root.CoreML.Specification.UnaryFunctionLayerParams.prototype.type = 0;
  4457. $root.CoreML.Specification.UnaryFunctionLayerParams.prototype.alpha = 0;
  4458. $root.CoreML.Specification.UnaryFunctionLayerParams.prototype.epsilon = 0;
  4459. $root.CoreML.Specification.UnaryFunctionLayerParams.prototype.shift = 0;
  4460. $root.CoreML.Specification.UnaryFunctionLayerParams.prototype.scale = 0;
  4461. $root.CoreML.Specification.UnaryFunctionLayerParams.Operation = {
  4462. "SQRT": 0,
  4463. "RSQRT": 1,
  4464. "INVERSE": 2,
  4465. "POWER": 3,
  4466. "EXP": 4,
  4467. "LOG": 5,
  4468. "ABS": 6,
  4469. "THRESHOLD": 7
  4470. };
  4471. $root.CoreML.Specification.UpsampleLayerParams = class UpsampleLayerParams {
  4472. constructor() {
  4473. this.scalingFactor = [];
  4474. this.fractionalScalingFactor = [];
  4475. }
  4476. static decode(reader, length) {
  4477. const message = new $root.CoreML.Specification.UpsampleLayerParams();
  4478. const end = reader.next(length);
  4479. while (reader.end(end)) {
  4480. const tag = reader.uint32();
  4481. switch (tag >>> 3) {
  4482. case 1:
  4483. message.scalingFactor = reader.array(message.scalingFactor, () => reader.uint64(), tag);
  4484. break;
  4485. case 7:
  4486. message.fractionalScalingFactor = reader.floats(message.fractionalScalingFactor, tag);
  4487. break;
  4488. case 5:
  4489. message.mode = reader.int32();
  4490. break;
  4491. case 6:
  4492. message.linearUpsampleMode = reader.int32();
  4493. break;
  4494. default:
  4495. reader.skipType(tag & 7);
  4496. break;
  4497. }
  4498. }
  4499. return message;
  4500. }
  4501. };
  4502. $root.CoreML.Specification.UpsampleLayerParams.prototype.mode = 0;
  4503. $root.CoreML.Specification.UpsampleLayerParams.prototype.linearUpsampleMode = 0;
  4504. $root.CoreML.Specification.UpsampleLayerParams.InterpolationMode = {
  4505. "NN": 0,
  4506. "BILINEAR": 1
  4507. };
  4508. $root.CoreML.Specification.UpsampleLayerParams.LinearUpsampleMode = {
  4509. "DEFAULT": 0,
  4510. "ALIGN_CORNERS_TRUE": 1,
  4511. "ALIGN_CORNERS_FALSE": 2
  4512. };
  4513. $root.CoreML.Specification.ResizeBilinearLayerParams = class ResizeBilinearLayerParams {
  4514. constructor() {
  4515. this.targetSize = [];
  4516. }
  4517. static decode(reader, length) {
  4518. const message = new $root.CoreML.Specification.ResizeBilinearLayerParams();
  4519. const end = reader.next(length);
  4520. while (reader.end(end)) {
  4521. const tag = reader.uint32();
  4522. switch (tag >>> 3) {
  4523. case 1:
  4524. message.targetSize = reader.array(message.targetSize, () => reader.uint64(), tag);
  4525. break;
  4526. case 2:
  4527. message.mode = $root.CoreML.Specification.SamplingMode.decode(reader, reader.uint32());
  4528. break;
  4529. default:
  4530. reader.skipType(tag & 7);
  4531. break;
  4532. }
  4533. }
  4534. return message;
  4535. }
  4536. };
  4537. $root.CoreML.Specification.ResizeBilinearLayerParams.prototype.mode = null;
  4538. $root.CoreML.Specification.CropResizeLayerParams = class CropResizeLayerParams {
  4539. constructor() {
  4540. this.targetSize = [];
  4541. }
  4542. static decode(reader, length) {
  4543. const message = new $root.CoreML.Specification.CropResizeLayerParams();
  4544. const end = reader.next(length);
  4545. while (reader.end(end)) {
  4546. const tag = reader.uint32();
  4547. switch (tag >>> 3) {
  4548. case 1:
  4549. message.targetSize = reader.array(message.targetSize, () => reader.uint64(), tag);
  4550. break;
  4551. case 2:
  4552. message.normalizedCoordinates = reader.bool();
  4553. break;
  4554. case 3:
  4555. message.mode = $root.CoreML.Specification.SamplingMode.decode(reader, reader.uint32());
  4556. break;
  4557. case 4:
  4558. message.boxIndicesMode = $root.CoreML.Specification.BoxCoordinatesMode.decode(reader, reader.uint32());
  4559. break;
  4560. case 5:
  4561. message.spatialScale = reader.float();
  4562. break;
  4563. default:
  4564. reader.skipType(tag & 7);
  4565. break;
  4566. }
  4567. }
  4568. return message;
  4569. }
  4570. };
  4571. $root.CoreML.Specification.CropResizeLayerParams.prototype.normalizedCoordinates = false;
  4572. $root.CoreML.Specification.CropResizeLayerParams.prototype.mode = null;
  4573. $root.CoreML.Specification.CropResizeLayerParams.prototype.boxIndicesMode = null;
  4574. $root.CoreML.Specification.CropResizeLayerParams.prototype.spatialScale = 0;
  4575. $root.CoreML.Specification.BiasLayerParams = class BiasLayerParams {
  4576. constructor() {
  4577. this.shape = [];
  4578. }
  4579. static decode(reader, length) {
  4580. const message = new $root.CoreML.Specification.BiasLayerParams();
  4581. const end = reader.next(length);
  4582. while (reader.end(end)) {
  4583. const tag = reader.uint32();
  4584. switch (tag >>> 3) {
  4585. case 1:
  4586. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  4587. break;
  4588. case 2:
  4589. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  4590. break;
  4591. default:
  4592. reader.skipType(tag & 7);
  4593. break;
  4594. }
  4595. }
  4596. return message;
  4597. }
  4598. };
  4599. $root.CoreML.Specification.BiasLayerParams.prototype.bias = null;
  4600. $root.CoreML.Specification.ScaleLayerParams = class ScaleLayerParams {
  4601. constructor() {
  4602. this.shapeScale = [];
  4603. this.shapeBias = [];
  4604. }
  4605. static decode(reader, length) {
  4606. const message = new $root.CoreML.Specification.ScaleLayerParams();
  4607. const end = reader.next(length);
  4608. while (reader.end(end)) {
  4609. const tag = reader.uint32();
  4610. switch (tag >>> 3) {
  4611. case 1:
  4612. message.shapeScale = reader.array(message.shapeScale, () => reader.uint64(), tag);
  4613. break;
  4614. case 2:
  4615. message.scale = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  4616. break;
  4617. case 3:
  4618. message.hasBias = reader.bool();
  4619. break;
  4620. case 4:
  4621. message.shapeBias = reader.array(message.shapeBias, () => reader.uint64(), tag);
  4622. break;
  4623. case 5:
  4624. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  4625. break;
  4626. default:
  4627. reader.skipType(tag & 7);
  4628. break;
  4629. }
  4630. }
  4631. return message;
  4632. }
  4633. };
  4634. $root.CoreML.Specification.ScaleLayerParams.prototype.scale = null;
  4635. $root.CoreML.Specification.ScaleLayerParams.prototype.hasBias = false;
  4636. $root.CoreML.Specification.ScaleLayerParams.prototype.bias = null;
  4637. $root.CoreML.Specification.LoadConstantLayerParams = class LoadConstantLayerParams {
  4638. constructor() {
  4639. this.shape = [];
  4640. }
  4641. static decode(reader, length) {
  4642. const message = new $root.CoreML.Specification.LoadConstantLayerParams();
  4643. const end = reader.next(length);
  4644. while (reader.end(end)) {
  4645. const tag = reader.uint32();
  4646. switch (tag >>> 3) {
  4647. case 1:
  4648. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  4649. break;
  4650. case 2:
  4651. message.data = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  4652. break;
  4653. default:
  4654. reader.skipType(tag & 7);
  4655. break;
  4656. }
  4657. }
  4658. return message;
  4659. }
  4660. };
  4661. $root.CoreML.Specification.LoadConstantLayerParams.prototype.data = null;
  4662. $root.CoreML.Specification.L2NormalizeLayerParams = class L2NormalizeLayerParams {
  4663. constructor() {
  4664. }
  4665. static decode(reader, length) {
  4666. const message = new $root.CoreML.Specification.L2NormalizeLayerParams();
  4667. const end = reader.next(length);
  4668. while (reader.end(end)) {
  4669. const tag = reader.uint32();
  4670. switch (tag >>> 3) {
  4671. case 1:
  4672. message.epsilon = reader.float();
  4673. break;
  4674. default:
  4675. reader.skipType(tag & 7);
  4676. break;
  4677. }
  4678. }
  4679. return message;
  4680. }
  4681. };
  4682. $root.CoreML.Specification.L2NormalizeLayerParams.prototype.epsilon = 0;
  4683. $root.CoreML.Specification.FlattenLayerParams = class FlattenLayerParams {
  4684. constructor() {
  4685. }
  4686. static decode(reader, length) {
  4687. const message = new $root.CoreML.Specification.FlattenLayerParams();
  4688. const end = reader.next(length);
  4689. while (reader.end(end)) {
  4690. const tag = reader.uint32();
  4691. switch (tag >>> 3) {
  4692. case 1:
  4693. message.mode = reader.int32();
  4694. break;
  4695. default:
  4696. reader.skipType(tag & 7);
  4697. break;
  4698. }
  4699. }
  4700. return message;
  4701. }
  4702. };
  4703. $root.CoreML.Specification.FlattenLayerParams.prototype.mode = 0;
  4704. $root.CoreML.Specification.FlattenLayerParams.FlattenOrder = {
  4705. "CHANNEL_FIRST": 0,
  4706. "CHANNEL_LAST": 1
  4707. };
  4708. $root.CoreML.Specification.ReshapeLayerParams = class ReshapeLayerParams {
  4709. constructor() {
  4710. this.targetShape = [];
  4711. }
  4712. static decode(reader, length) {
  4713. const message = new $root.CoreML.Specification.ReshapeLayerParams();
  4714. const end = reader.next(length);
  4715. while (reader.end(end)) {
  4716. const tag = reader.uint32();
  4717. switch (tag >>> 3) {
  4718. case 1:
  4719. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  4720. break;
  4721. case 2:
  4722. message.mode = reader.int32();
  4723. break;
  4724. default:
  4725. reader.skipType(tag & 7);
  4726. break;
  4727. }
  4728. }
  4729. return message;
  4730. }
  4731. };
  4732. $root.CoreML.Specification.ReshapeLayerParams.prototype.mode = 0;
  4733. $root.CoreML.Specification.ReshapeLayerParams.ReshapeOrder = {
  4734. "CHANNEL_FIRST": 0,
  4735. "CHANNEL_LAST": 1
  4736. };
  4737. $root.CoreML.Specification.PermuteLayerParams = class PermuteLayerParams {
  4738. constructor() {
  4739. this.axis = [];
  4740. }
  4741. static decode(reader, length) {
  4742. const message = new $root.CoreML.Specification.PermuteLayerParams();
  4743. const end = reader.next(length);
  4744. while (reader.end(end)) {
  4745. const tag = reader.uint32();
  4746. switch (tag >>> 3) {
  4747. case 1:
  4748. message.axis = reader.array(message.axis, () => reader.uint64(), tag);
  4749. break;
  4750. default:
  4751. reader.skipType(tag & 7);
  4752. break;
  4753. }
  4754. }
  4755. return message;
  4756. }
  4757. };
  4758. $root.CoreML.Specification.ReorganizeDataLayerParams = class ReorganizeDataLayerParams {
  4759. constructor() {
  4760. }
  4761. static decode(reader, length) {
  4762. const message = new $root.CoreML.Specification.ReorganizeDataLayerParams();
  4763. const end = reader.next(length);
  4764. while (reader.end(end)) {
  4765. const tag = reader.uint32();
  4766. switch (tag >>> 3) {
  4767. case 1:
  4768. message.mode = reader.int32();
  4769. break;
  4770. case 2:
  4771. message.blockSize = reader.uint64();
  4772. break;
  4773. default:
  4774. reader.skipType(tag & 7);
  4775. break;
  4776. }
  4777. }
  4778. return message;
  4779. }
  4780. };
  4781. $root.CoreML.Specification.ReorganizeDataLayerParams.prototype.mode = 0;
  4782. $root.CoreML.Specification.ReorganizeDataLayerParams.prototype.blockSize = protobuf.Uint64.create(0);
  4783. $root.CoreML.Specification.ReorganizeDataLayerParams.ReorganizationType = {
  4784. "SPACE_TO_DEPTH": 0,
  4785. "DEPTH_TO_SPACE": 1,
  4786. "PIXEL_SHUFFLE": 2
  4787. };
  4788. $root.CoreML.Specification.SliceLayerParams = class SliceLayerParams {
  4789. constructor() {
  4790. }
  4791. static decode(reader, length) {
  4792. const message = new $root.CoreML.Specification.SliceLayerParams();
  4793. const end = reader.next(length);
  4794. while (reader.end(end)) {
  4795. const tag = reader.uint32();
  4796. switch (tag >>> 3) {
  4797. case 1:
  4798. message.startIndex = reader.int64();
  4799. break;
  4800. case 2:
  4801. message.endIndex = reader.int64();
  4802. break;
  4803. case 3:
  4804. message.stride = reader.uint64();
  4805. break;
  4806. case 4:
  4807. message.axis = reader.int32();
  4808. break;
  4809. default:
  4810. reader.skipType(tag & 7);
  4811. break;
  4812. }
  4813. }
  4814. return message;
  4815. }
  4816. };
  4817. $root.CoreML.Specification.SliceLayerParams.prototype.startIndex = protobuf.Int64.create(0);
  4818. $root.CoreML.Specification.SliceLayerParams.prototype.endIndex = protobuf.Int64.create(0);
  4819. $root.CoreML.Specification.SliceLayerParams.prototype.stride = protobuf.Uint64.create(0);
  4820. $root.CoreML.Specification.SliceLayerParams.prototype.axis = 0;
  4821. $root.CoreML.Specification.SliceLayerParams.SliceAxis = {
  4822. "CHANNEL_AXIS": 0,
  4823. "HEIGHT_AXIS": 1,
  4824. "WIDTH_AXIS": 2
  4825. };
  4826. $root.CoreML.Specification.ReduceLayerParams = class ReduceLayerParams {
  4827. constructor() {
  4828. }
  4829. static decode(reader, length) {
  4830. const message = new $root.CoreML.Specification.ReduceLayerParams();
  4831. const end = reader.next(length);
  4832. while (reader.end(end)) {
  4833. const tag = reader.uint32();
  4834. switch (tag >>> 3) {
  4835. case 1:
  4836. message.mode = reader.int32();
  4837. break;
  4838. case 2:
  4839. message.epsilon = reader.float();
  4840. break;
  4841. case 3:
  4842. message.axis = reader.int32();
  4843. break;
  4844. default:
  4845. reader.skipType(tag & 7);
  4846. break;
  4847. }
  4848. }
  4849. return message;
  4850. }
  4851. };
  4852. $root.CoreML.Specification.ReduceLayerParams.prototype.mode = 0;
  4853. $root.CoreML.Specification.ReduceLayerParams.prototype.epsilon = 0;
  4854. $root.CoreML.Specification.ReduceLayerParams.prototype.axis = 0;
  4855. $root.CoreML.Specification.ReduceLayerParams.ReduceOperation = {
  4856. "SUM": 0,
  4857. "AVG": 1,
  4858. "PROD": 2,
  4859. "LOGSUM": 3,
  4860. "SUMSQUARE": 4,
  4861. "L1": 5,
  4862. "L2": 6,
  4863. "MAX": 7,
  4864. "MIN": 8,
  4865. "ARGMAX": 9
  4866. };
  4867. $root.CoreML.Specification.ReduceLayerParams.ReduceAxis = {
  4868. "CHW": 0,
  4869. "HW": 1,
  4870. "C": 2,
  4871. "H": 3,
  4872. "W": 4
  4873. };
  4874. $root.CoreML.Specification.CropLayerParams = class CropLayerParams {
  4875. constructor() {
  4876. this.offset = [];
  4877. }
  4878. static decode(reader, length) {
  4879. const message = new $root.CoreML.Specification.CropLayerParams();
  4880. const end = reader.next(length);
  4881. while (reader.end(end)) {
  4882. const tag = reader.uint32();
  4883. switch (tag >>> 3) {
  4884. case 1:
  4885. message.cropAmounts = $root.CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  4886. break;
  4887. case 5:
  4888. message.offset = reader.array(message.offset, () => reader.uint64(), tag);
  4889. break;
  4890. default:
  4891. reader.skipType(tag & 7);
  4892. break;
  4893. }
  4894. }
  4895. return message;
  4896. }
  4897. };
  4898. $root.CoreML.Specification.CropLayerParams.prototype.cropAmounts = null;
  4899. $root.CoreML.Specification.AverageLayerParams = class AverageLayerParams {
  4900. constructor() {
  4901. }
  4902. static decode(reader, length) {
  4903. const message = new $root.CoreML.Specification.AverageLayerParams();
  4904. const end = reader.next(length);
  4905. while (reader.end(end)) {
  4906. const tag = reader.uint32();
  4907. switch (tag >>> 3) {
  4908. default:
  4909. reader.skipType(tag & 7);
  4910. break;
  4911. }
  4912. }
  4913. return message;
  4914. }
  4915. };
  4916. $root.CoreML.Specification.MaxLayerParams = class MaxLayerParams {
  4917. constructor() {
  4918. }
  4919. static decode(reader, length) {
  4920. const message = new $root.CoreML.Specification.MaxLayerParams();
  4921. const end = reader.next(length);
  4922. while (reader.end(end)) {
  4923. const tag = reader.uint32();
  4924. switch (tag >>> 3) {
  4925. default:
  4926. reader.skipType(tag & 7);
  4927. break;
  4928. }
  4929. }
  4930. return message;
  4931. }
  4932. };
  4933. $root.CoreML.Specification.MinLayerParams = class MinLayerParams {
  4934. constructor() {
  4935. }
  4936. static decode(reader, length) {
  4937. const message = new $root.CoreML.Specification.MinLayerParams();
  4938. const end = reader.next(length);
  4939. while (reader.end(end)) {
  4940. const tag = reader.uint32();
  4941. switch (tag >>> 3) {
  4942. default:
  4943. reader.skipType(tag & 7);
  4944. break;
  4945. }
  4946. }
  4947. return message;
  4948. }
  4949. };
  4950. $root.CoreML.Specification.DotProductLayerParams = class DotProductLayerParams {
  4951. constructor() {
  4952. }
  4953. static decode(reader, length) {
  4954. const message = new $root.CoreML.Specification.DotProductLayerParams();
  4955. const end = reader.next(length);
  4956. while (reader.end(end)) {
  4957. const tag = reader.uint32();
  4958. switch (tag >>> 3) {
  4959. case 1:
  4960. message.cosineSimilarity = reader.bool();
  4961. break;
  4962. default:
  4963. reader.skipType(tag & 7);
  4964. break;
  4965. }
  4966. }
  4967. return message;
  4968. }
  4969. };
  4970. $root.CoreML.Specification.DotProductLayerParams.prototype.cosineSimilarity = false;
  4971. $root.CoreML.Specification.MeanVarianceNormalizeLayerParams = class MeanVarianceNormalizeLayerParams {
  4972. constructor() {
  4973. }
  4974. static decode(reader, length) {
  4975. const message = new $root.CoreML.Specification.MeanVarianceNormalizeLayerParams();
  4976. const end = reader.next(length);
  4977. while (reader.end(end)) {
  4978. const tag = reader.uint32();
  4979. switch (tag >>> 3) {
  4980. case 1:
  4981. message.acrossChannels = reader.bool();
  4982. break;
  4983. case 2:
  4984. message.normalizeVariance = reader.bool();
  4985. break;
  4986. case 3:
  4987. message.epsilon = reader.float();
  4988. break;
  4989. default:
  4990. reader.skipType(tag & 7);
  4991. break;
  4992. }
  4993. }
  4994. return message;
  4995. }
  4996. };
  4997. $root.CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.acrossChannels = false;
  4998. $root.CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.normalizeVariance = false;
  4999. $root.CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.epsilon = 0;
  5000. $root.CoreML.Specification.SequenceRepeatLayerParams = class SequenceRepeatLayerParams {
  5001. constructor() {
  5002. }
  5003. static decode(reader, length) {
  5004. const message = new $root.CoreML.Specification.SequenceRepeatLayerParams();
  5005. const end = reader.next(length);
  5006. while (reader.end(end)) {
  5007. const tag = reader.uint32();
  5008. switch (tag >>> 3) {
  5009. case 1:
  5010. message.nRepetitions = reader.uint64();
  5011. break;
  5012. default:
  5013. reader.skipType(tag & 7);
  5014. break;
  5015. }
  5016. }
  5017. return message;
  5018. }
  5019. };
  5020. $root.CoreML.Specification.SequenceRepeatLayerParams.prototype.nRepetitions = protobuf.Uint64.create(0);
  5021. $root.CoreML.Specification.SimpleRecurrentLayerParams = class SimpleRecurrentLayerParams {
  5022. constructor() {
  5023. }
  5024. static decode(reader, length) {
  5025. const message = new $root.CoreML.Specification.SimpleRecurrentLayerParams();
  5026. const end = reader.next(length);
  5027. while (reader.end(end)) {
  5028. const tag = reader.uint32();
  5029. switch (tag >>> 3) {
  5030. case 1:
  5031. message.inputVectorSize = reader.uint64();
  5032. break;
  5033. case 2:
  5034. message.outputVectorSize = reader.uint64();
  5035. break;
  5036. case 10:
  5037. message.activation = $root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32());
  5038. break;
  5039. case 15:
  5040. message.sequenceOutput = reader.bool();
  5041. break;
  5042. case 20:
  5043. message.hasBiasVector = reader.bool();
  5044. break;
  5045. case 30:
  5046. message.weightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5047. break;
  5048. case 31:
  5049. message.recursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5050. break;
  5051. case 32:
  5052. message.biasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5053. break;
  5054. case 100:
  5055. message.reverseInput = reader.bool();
  5056. break;
  5057. default:
  5058. reader.skipType(tag & 7);
  5059. break;
  5060. }
  5061. }
  5062. return message;
  5063. }
  5064. };
  5065. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.inputVectorSize = protobuf.Uint64.create(0);
  5066. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.outputVectorSize = protobuf.Uint64.create(0);
  5067. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.activation = null;
  5068. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.sequenceOutput = false;
  5069. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.hasBiasVector = false;
  5070. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.weightMatrix = null;
  5071. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.recursionMatrix = null;
  5072. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.biasVector = null;
  5073. $root.CoreML.Specification.SimpleRecurrentLayerParams.prototype.reverseInput = false;
  5074. $root.CoreML.Specification.GRULayerParams = class GRULayerParams {
  5075. constructor() {
  5076. this.activations = [];
  5077. }
  5078. static decode(reader, length) {
  5079. const message = new $root.CoreML.Specification.GRULayerParams();
  5080. const end = reader.next(length);
  5081. while (reader.end(end)) {
  5082. const tag = reader.uint32();
  5083. switch (tag >>> 3) {
  5084. case 1:
  5085. message.inputVectorSize = reader.uint64();
  5086. break;
  5087. case 2:
  5088. message.outputVectorSize = reader.uint64();
  5089. break;
  5090. case 10:
  5091. message.activations.push($root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  5092. break;
  5093. case 15:
  5094. message.sequenceOutput = reader.bool();
  5095. break;
  5096. case 20:
  5097. message.hasBiasVectors = reader.bool();
  5098. break;
  5099. case 30:
  5100. message.updateGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5101. break;
  5102. case 31:
  5103. message.resetGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5104. break;
  5105. case 32:
  5106. message.outputGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5107. break;
  5108. case 50:
  5109. message.updateGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5110. break;
  5111. case 51:
  5112. message.resetGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5113. break;
  5114. case 52:
  5115. message.outputGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5116. break;
  5117. case 70:
  5118. message.updateGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5119. break;
  5120. case 71:
  5121. message.resetGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5122. break;
  5123. case 72:
  5124. message.outputGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5125. break;
  5126. case 100:
  5127. message.reverseInput = reader.bool();
  5128. break;
  5129. default:
  5130. reader.skipType(tag & 7);
  5131. break;
  5132. }
  5133. }
  5134. return message;
  5135. }
  5136. };
  5137. $root.CoreML.Specification.GRULayerParams.prototype.inputVectorSize = protobuf.Uint64.create(0);
  5138. $root.CoreML.Specification.GRULayerParams.prototype.outputVectorSize = protobuf.Uint64.create(0);
  5139. $root.CoreML.Specification.GRULayerParams.prototype.sequenceOutput = false;
  5140. $root.CoreML.Specification.GRULayerParams.prototype.hasBiasVectors = false;
  5141. $root.CoreML.Specification.GRULayerParams.prototype.updateGateWeightMatrix = null;
  5142. $root.CoreML.Specification.GRULayerParams.prototype.resetGateWeightMatrix = null;
  5143. $root.CoreML.Specification.GRULayerParams.prototype.outputGateWeightMatrix = null;
  5144. $root.CoreML.Specification.GRULayerParams.prototype.updateGateRecursionMatrix = null;
  5145. $root.CoreML.Specification.GRULayerParams.prototype.resetGateRecursionMatrix = null;
  5146. $root.CoreML.Specification.GRULayerParams.prototype.outputGateRecursionMatrix = null;
  5147. $root.CoreML.Specification.GRULayerParams.prototype.updateGateBiasVector = null;
  5148. $root.CoreML.Specification.GRULayerParams.prototype.resetGateBiasVector = null;
  5149. $root.CoreML.Specification.GRULayerParams.prototype.outputGateBiasVector = null;
  5150. $root.CoreML.Specification.GRULayerParams.prototype.reverseInput = false;
  5151. $root.CoreML.Specification.LSTMParams = class LSTMParams {
  5152. constructor() {
  5153. }
  5154. static decode(reader, length) {
  5155. const message = new $root.CoreML.Specification.LSTMParams();
  5156. const end = reader.next(length);
  5157. while (reader.end(end)) {
  5158. const tag = reader.uint32();
  5159. switch (tag >>> 3) {
  5160. case 10:
  5161. message.sequenceOutput = reader.bool();
  5162. break;
  5163. case 20:
  5164. message.hasBiasVectors = reader.bool();
  5165. break;
  5166. case 30:
  5167. message.forgetBias = reader.bool();
  5168. break;
  5169. case 40:
  5170. message.hasPeepholeVectors = reader.bool();
  5171. break;
  5172. case 50:
  5173. message.coupledInputAndForgetGate = reader.bool();
  5174. break;
  5175. case 60:
  5176. message.cellClipThreshold = reader.float();
  5177. break;
  5178. default:
  5179. reader.skipType(tag & 7);
  5180. break;
  5181. }
  5182. }
  5183. return message;
  5184. }
  5185. };
  5186. $root.CoreML.Specification.LSTMParams.prototype.sequenceOutput = false;
  5187. $root.CoreML.Specification.LSTMParams.prototype.hasBiasVectors = false;
  5188. $root.CoreML.Specification.LSTMParams.prototype.forgetBias = false;
  5189. $root.CoreML.Specification.LSTMParams.prototype.hasPeepholeVectors = false;
  5190. $root.CoreML.Specification.LSTMParams.prototype.coupledInputAndForgetGate = false;
  5191. $root.CoreML.Specification.LSTMParams.prototype.cellClipThreshold = 0;
  5192. $root.CoreML.Specification.LSTMWeightParams = class LSTMWeightParams {
  5193. constructor() {
  5194. }
  5195. static decode(reader, length) {
  5196. const message = new $root.CoreML.Specification.LSTMWeightParams();
  5197. const end = reader.next(length);
  5198. while (reader.end(end)) {
  5199. const tag = reader.uint32();
  5200. switch (tag >>> 3) {
  5201. case 1:
  5202. message.inputGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5203. break;
  5204. case 2:
  5205. message.forgetGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5206. break;
  5207. case 3:
  5208. message.blockInputWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5209. break;
  5210. case 4:
  5211. message.outputGateWeightMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5212. break;
  5213. case 20:
  5214. message.inputGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5215. break;
  5216. case 21:
  5217. message.forgetGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5218. break;
  5219. case 22:
  5220. message.blockInputRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5221. break;
  5222. case 23:
  5223. message.outputGateRecursionMatrix = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5224. break;
  5225. case 40:
  5226. message.inputGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5227. break;
  5228. case 41:
  5229. message.forgetGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5230. break;
  5231. case 42:
  5232. message.blockInputBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5233. break;
  5234. case 43:
  5235. message.outputGateBiasVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5236. break;
  5237. case 60:
  5238. message.inputGatePeepholeVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5239. break;
  5240. case 61:
  5241. message.forgetGatePeepholeVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5242. break;
  5243. case 62:
  5244. message.outputGatePeepholeVector = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5245. break;
  5246. default:
  5247. reader.skipType(tag & 7);
  5248. break;
  5249. }
  5250. }
  5251. return message;
  5252. }
  5253. };
  5254. $root.CoreML.Specification.LSTMWeightParams.prototype.inputGateWeightMatrix = null;
  5255. $root.CoreML.Specification.LSTMWeightParams.prototype.forgetGateWeightMatrix = null;
  5256. $root.CoreML.Specification.LSTMWeightParams.prototype.blockInputWeightMatrix = null;
  5257. $root.CoreML.Specification.LSTMWeightParams.prototype.outputGateWeightMatrix = null;
  5258. $root.CoreML.Specification.LSTMWeightParams.prototype.inputGateRecursionMatrix = null;
  5259. $root.CoreML.Specification.LSTMWeightParams.prototype.forgetGateRecursionMatrix = null;
  5260. $root.CoreML.Specification.LSTMWeightParams.prototype.blockInputRecursionMatrix = null;
  5261. $root.CoreML.Specification.LSTMWeightParams.prototype.outputGateRecursionMatrix = null;
  5262. $root.CoreML.Specification.LSTMWeightParams.prototype.inputGateBiasVector = null;
  5263. $root.CoreML.Specification.LSTMWeightParams.prototype.forgetGateBiasVector = null;
  5264. $root.CoreML.Specification.LSTMWeightParams.prototype.blockInputBiasVector = null;
  5265. $root.CoreML.Specification.LSTMWeightParams.prototype.outputGateBiasVector = null;
  5266. $root.CoreML.Specification.LSTMWeightParams.prototype.inputGatePeepholeVector = null;
  5267. $root.CoreML.Specification.LSTMWeightParams.prototype.forgetGatePeepholeVector = null;
  5268. $root.CoreML.Specification.LSTMWeightParams.prototype.outputGatePeepholeVector = null;
  5269. $root.CoreML.Specification.UniDirectionalLSTMLayerParams = class UniDirectionalLSTMLayerParams {
  5270. constructor() {
  5271. this.activations = [];
  5272. }
  5273. static decode(reader, length) {
  5274. const message = new $root.CoreML.Specification.UniDirectionalLSTMLayerParams();
  5275. const end = reader.next(length);
  5276. while (reader.end(end)) {
  5277. const tag = reader.uint32();
  5278. switch (tag >>> 3) {
  5279. case 1:
  5280. message.inputVectorSize = reader.uint64();
  5281. break;
  5282. case 2:
  5283. message.outputVectorSize = reader.uint64();
  5284. break;
  5285. case 10:
  5286. message.activations.push($root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  5287. break;
  5288. case 15:
  5289. message.params = $root.CoreML.Specification.LSTMParams.decode(reader, reader.uint32());
  5290. break;
  5291. case 20:
  5292. message.weightParams = $root.CoreML.Specification.LSTMWeightParams.decode(reader, reader.uint32());
  5293. break;
  5294. case 100:
  5295. message.reverseInput = reader.bool();
  5296. break;
  5297. default:
  5298. reader.skipType(tag & 7);
  5299. break;
  5300. }
  5301. }
  5302. return message;
  5303. }
  5304. };
  5305. $root.CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.inputVectorSize = protobuf.Uint64.create(0);
  5306. $root.CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.outputVectorSize = protobuf.Uint64.create(0);
  5307. $root.CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.params = null;
  5308. $root.CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.weightParams = null;
  5309. $root.CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.reverseInput = false;
  5310. $root.CoreML.Specification.BiDirectionalLSTMLayerParams = class BiDirectionalLSTMLayerParams {
  5311. constructor() {
  5312. this.activationsForwardLSTM = [];
  5313. this.activationsBackwardLSTM = [];
  5314. this.weightParams = [];
  5315. }
  5316. static decode(reader, length) {
  5317. const message = new $root.CoreML.Specification.BiDirectionalLSTMLayerParams();
  5318. const end = reader.next(length);
  5319. while (reader.end(end)) {
  5320. const tag = reader.uint32();
  5321. switch (tag >>> 3) {
  5322. case 1:
  5323. message.inputVectorSize = reader.uint64();
  5324. break;
  5325. case 2:
  5326. message.outputVectorSize = reader.uint64();
  5327. break;
  5328. case 10:
  5329. message.activationsForwardLSTM.push($root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  5330. break;
  5331. case 11:
  5332. message.activationsBackwardLSTM.push($root.CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  5333. break;
  5334. case 15:
  5335. message.params = $root.CoreML.Specification.LSTMParams.decode(reader, reader.uint32());
  5336. break;
  5337. case 20:
  5338. message.weightParams.push($root.CoreML.Specification.LSTMWeightParams.decode(reader, reader.uint32()));
  5339. break;
  5340. default:
  5341. reader.skipType(tag & 7);
  5342. break;
  5343. }
  5344. }
  5345. return message;
  5346. }
  5347. };
  5348. $root.CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.inputVectorSize = protobuf.Uint64.create(0);
  5349. $root.CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.outputVectorSize = protobuf.Uint64.create(0);
  5350. $root.CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.params = null;
  5351. $root.CoreML.Specification.CustomLayerParams = class CustomLayerParams {
  5352. constructor() {
  5353. this.weights = [];
  5354. this.parameters = {};
  5355. }
  5356. static decode(reader, length) {
  5357. const message = new $root.CoreML.Specification.CustomLayerParams();
  5358. const end = reader.next(length);
  5359. while (reader.end(end)) {
  5360. const tag = reader.uint32();
  5361. switch (tag >>> 3) {
  5362. case 10:
  5363. message.className = reader.string();
  5364. break;
  5365. case 20:
  5366. message.weights.push($root.CoreML.Specification.WeightParams.decode(reader, reader.uint32()));
  5367. break;
  5368. case 30:
  5369. reader.entry(message.parameters, () => reader.string(), () => $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue.decode(reader, reader.uint32()));
  5370. break;
  5371. case 40:
  5372. message.description = reader.string();
  5373. break;
  5374. default:
  5375. reader.skipType(tag & 7);
  5376. break;
  5377. }
  5378. }
  5379. return message;
  5380. }
  5381. };
  5382. $root.CoreML.Specification.CustomLayerParams.prototype.className = "";
  5383. $root.CoreML.Specification.CustomLayerParams.prototype.description = "";
  5384. $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue = class CustomLayerParamValue {
  5385. constructor() {
  5386. }
  5387. get value() {
  5388. $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet = $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet || new Set([ "doubleValue", "stringValue", "intValue", "longValue", "boolValue"]);
  5389. return Object.keys(this).find((key) => $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet.has(key) && this[key] != null);
  5390. }
  5391. static decode(reader, length) {
  5392. const message = new $root.CoreML.Specification.CustomLayerParams.CustomLayerParamValue();
  5393. const end = reader.next(length);
  5394. while (reader.end(end)) {
  5395. const tag = reader.uint32();
  5396. switch (tag >>> 3) {
  5397. case 10:
  5398. message.doubleValue = reader.double();
  5399. break;
  5400. case 20:
  5401. message.stringValue = reader.string();
  5402. break;
  5403. case 30:
  5404. message.intValue = reader.int32();
  5405. break;
  5406. case 40:
  5407. message.longValue = reader.int64();
  5408. break;
  5409. case 50:
  5410. message.boolValue = reader.bool();
  5411. break;
  5412. default:
  5413. reader.skipType(tag & 7);
  5414. break;
  5415. }
  5416. }
  5417. return message;
  5418. }
  5419. };
  5420. $root.CoreML.Specification.TransposeLayerParams = class TransposeLayerParams {
  5421. constructor() {
  5422. this.axes = [];
  5423. }
  5424. static decode(reader, length) {
  5425. const message = new $root.CoreML.Specification.TransposeLayerParams();
  5426. const end = reader.next(length);
  5427. while (reader.end(end)) {
  5428. const tag = reader.uint32();
  5429. switch (tag >>> 3) {
  5430. case 1:
  5431. message.axes = reader.array(message.axes, () => reader.uint64(), tag);
  5432. break;
  5433. default:
  5434. reader.skipType(tag & 7);
  5435. break;
  5436. }
  5437. }
  5438. return message;
  5439. }
  5440. };
  5441. $root.CoreML.Specification.BatchedMatMulLayerParams = class BatchedMatMulLayerParams {
  5442. constructor() {
  5443. }
  5444. static decode(reader, length) {
  5445. const message = new $root.CoreML.Specification.BatchedMatMulLayerParams();
  5446. const end = reader.next(length);
  5447. while (reader.end(end)) {
  5448. const tag = reader.uint32();
  5449. switch (tag >>> 3) {
  5450. case 1:
  5451. message.transposeA = reader.bool();
  5452. break;
  5453. case 2:
  5454. message.transposeB = reader.bool();
  5455. break;
  5456. case 5:
  5457. message.weightMatrixFirstDimension = reader.uint64();
  5458. break;
  5459. case 6:
  5460. message.weightMatrixSecondDimension = reader.uint64();
  5461. break;
  5462. case 7:
  5463. message.hasBias = reader.bool();
  5464. break;
  5465. case 8:
  5466. message.weights = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5467. break;
  5468. case 9:
  5469. message.bias = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5470. break;
  5471. case 10:
  5472. message.int8DynamicQuantize = reader.bool();
  5473. break;
  5474. default:
  5475. reader.skipType(tag & 7);
  5476. break;
  5477. }
  5478. }
  5479. return message;
  5480. }
  5481. };
  5482. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.transposeA = false;
  5483. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.transposeB = false;
  5484. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.weightMatrixFirstDimension = protobuf.Uint64.create(0);
  5485. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.weightMatrixSecondDimension = protobuf.Uint64.create(0);
  5486. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.hasBias = false;
  5487. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.weights = null;
  5488. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.bias = null;
  5489. $root.CoreML.Specification.BatchedMatMulLayerParams.prototype.int8DynamicQuantize = false;
  5490. $root.CoreML.Specification.ConcatNDLayerParams = class ConcatNDLayerParams {
  5491. constructor() {
  5492. }
  5493. static decode(reader, length) {
  5494. const message = new $root.CoreML.Specification.ConcatNDLayerParams();
  5495. const end = reader.next(length);
  5496. while (reader.end(end)) {
  5497. const tag = reader.uint32();
  5498. switch (tag >>> 3) {
  5499. case 1:
  5500. message.axis = reader.int64();
  5501. break;
  5502. default:
  5503. reader.skipType(tag & 7);
  5504. break;
  5505. }
  5506. }
  5507. return message;
  5508. }
  5509. };
  5510. $root.CoreML.Specification.ConcatNDLayerParams.prototype.axis = protobuf.Int64.create(0);
  5511. $root.CoreML.Specification.SoftmaxNDLayerParams = class SoftmaxNDLayerParams {
  5512. constructor() {
  5513. }
  5514. static decode(reader, length) {
  5515. const message = new $root.CoreML.Specification.SoftmaxNDLayerParams();
  5516. const end = reader.next(length);
  5517. while (reader.end(end)) {
  5518. const tag = reader.uint32();
  5519. switch (tag >>> 3) {
  5520. case 1:
  5521. message.axis = reader.int64();
  5522. break;
  5523. default:
  5524. reader.skipType(tag & 7);
  5525. break;
  5526. }
  5527. }
  5528. return message;
  5529. }
  5530. };
  5531. $root.CoreML.Specification.SoftmaxNDLayerParams.prototype.axis = protobuf.Int64.create(0);
  5532. $root.CoreML.Specification.ReverseLayerParams = class ReverseLayerParams {
  5533. constructor() {
  5534. this.reverseDim = [];
  5535. }
  5536. static decode(reader, length) {
  5537. const message = new $root.CoreML.Specification.ReverseLayerParams();
  5538. const end = reader.next(length);
  5539. while (reader.end(end)) {
  5540. const tag = reader.uint32();
  5541. switch (tag >>> 3) {
  5542. case 1:
  5543. message.reverseDim = reader.array(message.reverseDim, () => reader.bool(), tag);
  5544. break;
  5545. default:
  5546. reader.skipType(tag & 7);
  5547. break;
  5548. }
  5549. }
  5550. return message;
  5551. }
  5552. };
  5553. $root.CoreML.Specification.ReverseSeqLayerParams = class ReverseSeqLayerParams {
  5554. constructor() {
  5555. }
  5556. static decode(reader, length) {
  5557. const message = new $root.CoreML.Specification.ReverseSeqLayerParams();
  5558. const end = reader.next(length);
  5559. while (reader.end(end)) {
  5560. const tag = reader.uint32();
  5561. switch (tag >>> 3) {
  5562. case 1:
  5563. message.batchAxis = reader.int64();
  5564. break;
  5565. case 2:
  5566. message.sequenceAxis = reader.int64();
  5567. break;
  5568. default:
  5569. reader.skipType(tag & 7);
  5570. break;
  5571. }
  5572. }
  5573. return message;
  5574. }
  5575. };
  5576. $root.CoreML.Specification.ReverseSeqLayerParams.prototype.batchAxis = protobuf.Int64.create(0);
  5577. $root.CoreML.Specification.ReverseSeqLayerParams.prototype.sequenceAxis = protobuf.Int64.create(0);
  5578. $root.CoreML.Specification.LoadConstantNDLayerParams = class LoadConstantNDLayerParams {
  5579. constructor() {
  5580. this.shape = [];
  5581. }
  5582. static decode(reader, length) {
  5583. const message = new $root.CoreML.Specification.LoadConstantNDLayerParams();
  5584. const end = reader.next(length);
  5585. while (reader.end(end)) {
  5586. const tag = reader.uint32();
  5587. switch (tag >>> 3) {
  5588. case 1:
  5589. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  5590. break;
  5591. case 2:
  5592. message.data = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5593. break;
  5594. default:
  5595. reader.skipType(tag & 7);
  5596. break;
  5597. }
  5598. }
  5599. return message;
  5600. }
  5601. };
  5602. $root.CoreML.Specification.LoadConstantNDLayerParams.prototype.data = null;
  5603. $root.CoreML.Specification.FillLikeLayerParams = class FillLikeLayerParams {
  5604. constructor() {
  5605. }
  5606. static decode(reader, length) {
  5607. const message = new $root.CoreML.Specification.FillLikeLayerParams();
  5608. const end = reader.next(length);
  5609. while (reader.end(end)) {
  5610. const tag = reader.uint32();
  5611. switch (tag >>> 3) {
  5612. case 1:
  5613. message.value = reader.float();
  5614. break;
  5615. default:
  5616. reader.skipType(tag & 7);
  5617. break;
  5618. }
  5619. }
  5620. return message;
  5621. }
  5622. };
  5623. $root.CoreML.Specification.FillLikeLayerParams.prototype.value = 0;
  5624. $root.CoreML.Specification.FillStaticLayerParams = class FillStaticLayerParams {
  5625. constructor() {
  5626. this.targetShape = [];
  5627. }
  5628. static decode(reader, length) {
  5629. const message = new $root.CoreML.Specification.FillStaticLayerParams();
  5630. const end = reader.next(length);
  5631. while (reader.end(end)) {
  5632. const tag = reader.uint32();
  5633. switch (tag >>> 3) {
  5634. case 1:
  5635. message.value = reader.float();
  5636. break;
  5637. case 2:
  5638. message.targetShape = reader.array(message.targetShape, () => reader.uint64(), tag);
  5639. break;
  5640. default:
  5641. reader.skipType(tag & 7);
  5642. break;
  5643. }
  5644. }
  5645. return message;
  5646. }
  5647. };
  5648. $root.CoreML.Specification.FillStaticLayerParams.prototype.value = 0;
  5649. $root.CoreML.Specification.FillDynamicLayerParams = class FillDynamicLayerParams {
  5650. constructor() {
  5651. }
  5652. static decode(reader, length) {
  5653. const message = new $root.CoreML.Specification.FillDynamicLayerParams();
  5654. const end = reader.next(length);
  5655. while (reader.end(end)) {
  5656. const tag = reader.uint32();
  5657. switch (tag >>> 3) {
  5658. case 1:
  5659. message.value = reader.float();
  5660. break;
  5661. default:
  5662. reader.skipType(tag & 7);
  5663. break;
  5664. }
  5665. }
  5666. return message;
  5667. }
  5668. };
  5669. $root.CoreML.Specification.FillDynamicLayerParams.prototype.value = 0;
  5670. $root.CoreML.Specification.WhereBroadcastableLayerParams = class WhereBroadcastableLayerParams {
  5671. constructor() {
  5672. }
  5673. static decode(reader, length) {
  5674. const message = new $root.CoreML.Specification.WhereBroadcastableLayerParams();
  5675. const end = reader.next(length);
  5676. while (reader.end(end)) {
  5677. const tag = reader.uint32();
  5678. switch (tag >>> 3) {
  5679. default:
  5680. reader.skipType(tag & 7);
  5681. break;
  5682. }
  5683. }
  5684. return message;
  5685. }
  5686. };
  5687. $root.CoreML.Specification.SinLayerParams = class SinLayerParams {
  5688. constructor() {
  5689. }
  5690. static decode(reader, length) {
  5691. const message = new $root.CoreML.Specification.SinLayerParams();
  5692. const end = reader.next(length);
  5693. while (reader.end(end)) {
  5694. const tag = reader.uint32();
  5695. switch (tag >>> 3) {
  5696. default:
  5697. reader.skipType(tag & 7);
  5698. break;
  5699. }
  5700. }
  5701. return message;
  5702. }
  5703. };
  5704. $root.CoreML.Specification.CosLayerParams = class CosLayerParams {
  5705. constructor() {
  5706. }
  5707. static decode(reader, length) {
  5708. const message = new $root.CoreML.Specification.CosLayerParams();
  5709. const end = reader.next(length);
  5710. while (reader.end(end)) {
  5711. const tag = reader.uint32();
  5712. switch (tag >>> 3) {
  5713. default:
  5714. reader.skipType(tag & 7);
  5715. break;
  5716. }
  5717. }
  5718. return message;
  5719. }
  5720. };
  5721. $root.CoreML.Specification.TanLayerParams = class TanLayerParams {
  5722. constructor() {
  5723. }
  5724. static decode(reader, length) {
  5725. const message = new $root.CoreML.Specification.TanLayerParams();
  5726. const end = reader.next(length);
  5727. while (reader.end(end)) {
  5728. const tag = reader.uint32();
  5729. switch (tag >>> 3) {
  5730. default:
  5731. reader.skipType(tag & 7);
  5732. break;
  5733. }
  5734. }
  5735. return message;
  5736. }
  5737. };
  5738. $root.CoreML.Specification.AsinLayerParams = class AsinLayerParams {
  5739. constructor() {
  5740. }
  5741. static decode(reader, length) {
  5742. const message = new $root.CoreML.Specification.AsinLayerParams();
  5743. const end = reader.next(length);
  5744. while (reader.end(end)) {
  5745. const tag = reader.uint32();
  5746. switch (tag >>> 3) {
  5747. default:
  5748. reader.skipType(tag & 7);
  5749. break;
  5750. }
  5751. }
  5752. return message;
  5753. }
  5754. };
  5755. $root.CoreML.Specification.AcosLayerParams = class AcosLayerParams {
  5756. constructor() {
  5757. }
  5758. static decode(reader, length) {
  5759. const message = new $root.CoreML.Specification.AcosLayerParams();
  5760. const end = reader.next(length);
  5761. while (reader.end(end)) {
  5762. const tag = reader.uint32();
  5763. switch (tag >>> 3) {
  5764. default:
  5765. reader.skipType(tag & 7);
  5766. break;
  5767. }
  5768. }
  5769. return message;
  5770. }
  5771. };
  5772. $root.CoreML.Specification.AtanLayerParams = class AtanLayerParams {
  5773. constructor() {
  5774. }
  5775. static decode(reader, length) {
  5776. const message = new $root.CoreML.Specification.AtanLayerParams();
  5777. const end = reader.next(length);
  5778. while (reader.end(end)) {
  5779. const tag = reader.uint32();
  5780. switch (tag >>> 3) {
  5781. default:
  5782. reader.skipType(tag & 7);
  5783. break;
  5784. }
  5785. }
  5786. return message;
  5787. }
  5788. };
  5789. $root.CoreML.Specification.SinhLayerParams = class SinhLayerParams {
  5790. constructor() {
  5791. }
  5792. static decode(reader, length) {
  5793. const message = new $root.CoreML.Specification.SinhLayerParams();
  5794. const end = reader.next(length);
  5795. while (reader.end(end)) {
  5796. const tag = reader.uint32();
  5797. switch (tag >>> 3) {
  5798. default:
  5799. reader.skipType(tag & 7);
  5800. break;
  5801. }
  5802. }
  5803. return message;
  5804. }
  5805. };
  5806. $root.CoreML.Specification.CoshLayerParams = class CoshLayerParams {
  5807. constructor() {
  5808. }
  5809. static decode(reader, length) {
  5810. const message = new $root.CoreML.Specification.CoshLayerParams();
  5811. const end = reader.next(length);
  5812. while (reader.end(end)) {
  5813. const tag = reader.uint32();
  5814. switch (tag >>> 3) {
  5815. default:
  5816. reader.skipType(tag & 7);
  5817. break;
  5818. }
  5819. }
  5820. return message;
  5821. }
  5822. };
  5823. $root.CoreML.Specification.TanhLayerParams = class TanhLayerParams {
  5824. constructor() {
  5825. }
  5826. static decode(reader, length) {
  5827. const message = new $root.CoreML.Specification.TanhLayerParams();
  5828. const end = reader.next(length);
  5829. while (reader.end(end)) {
  5830. const tag = reader.uint32();
  5831. switch (tag >>> 3) {
  5832. default:
  5833. reader.skipType(tag & 7);
  5834. break;
  5835. }
  5836. }
  5837. return message;
  5838. }
  5839. };
  5840. $root.CoreML.Specification.AsinhLayerParams = class AsinhLayerParams {
  5841. constructor() {
  5842. }
  5843. static decode(reader, length) {
  5844. const message = new $root.CoreML.Specification.AsinhLayerParams();
  5845. const end = reader.next(length);
  5846. while (reader.end(end)) {
  5847. const tag = reader.uint32();
  5848. switch (tag >>> 3) {
  5849. default:
  5850. reader.skipType(tag & 7);
  5851. break;
  5852. }
  5853. }
  5854. return message;
  5855. }
  5856. };
  5857. $root.CoreML.Specification.AcoshLayerParams = class AcoshLayerParams {
  5858. constructor() {
  5859. }
  5860. static decode(reader, length) {
  5861. const message = new $root.CoreML.Specification.AcoshLayerParams();
  5862. const end = reader.next(length);
  5863. while (reader.end(end)) {
  5864. const tag = reader.uint32();
  5865. switch (tag >>> 3) {
  5866. default:
  5867. reader.skipType(tag & 7);
  5868. break;
  5869. }
  5870. }
  5871. return message;
  5872. }
  5873. };
  5874. $root.CoreML.Specification.AtanhLayerParams = class AtanhLayerParams {
  5875. constructor() {
  5876. }
  5877. static decode(reader, length) {
  5878. const message = new $root.CoreML.Specification.AtanhLayerParams();
  5879. const end = reader.next(length);
  5880. while (reader.end(end)) {
  5881. const tag = reader.uint32();
  5882. switch (tag >>> 3) {
  5883. default:
  5884. reader.skipType(tag & 7);
  5885. break;
  5886. }
  5887. }
  5888. return message;
  5889. }
  5890. };
  5891. $root.CoreML.Specification.PowBroadcastableLayerParams = class PowBroadcastableLayerParams {
  5892. constructor() {
  5893. }
  5894. static decode(reader, length) {
  5895. const message = new $root.CoreML.Specification.PowBroadcastableLayerParams();
  5896. const end = reader.next(length);
  5897. while (reader.end(end)) {
  5898. const tag = reader.uint32();
  5899. switch (tag >>> 3) {
  5900. default:
  5901. reader.skipType(tag & 7);
  5902. break;
  5903. }
  5904. }
  5905. return message;
  5906. }
  5907. };
  5908. $root.CoreML.Specification.Exp2LayerParams = class Exp2LayerParams {
  5909. constructor() {
  5910. }
  5911. static decode(reader, length) {
  5912. const message = new $root.CoreML.Specification.Exp2LayerParams();
  5913. const end = reader.next(length);
  5914. while (reader.end(end)) {
  5915. const tag = reader.uint32();
  5916. switch (tag >>> 3) {
  5917. default:
  5918. reader.skipType(tag & 7);
  5919. break;
  5920. }
  5921. }
  5922. return message;
  5923. }
  5924. };
  5925. $root.CoreML.Specification.WhereNonZeroLayerParams = class WhereNonZeroLayerParams {
  5926. constructor() {
  5927. }
  5928. static decode(reader, length) {
  5929. const message = new $root.CoreML.Specification.WhereNonZeroLayerParams();
  5930. const end = reader.next(length);
  5931. while (reader.end(end)) {
  5932. const tag = reader.uint32();
  5933. switch (tag >>> 3) {
  5934. default:
  5935. reader.skipType(tag & 7);
  5936. break;
  5937. }
  5938. }
  5939. return message;
  5940. }
  5941. };
  5942. $root.CoreML.Specification.MatrixBandPartLayerParams = class MatrixBandPartLayerParams {
  5943. constructor() {
  5944. }
  5945. static decode(reader, length) {
  5946. const message = new $root.CoreML.Specification.MatrixBandPartLayerParams();
  5947. const end = reader.next(length);
  5948. while (reader.end(end)) {
  5949. const tag = reader.uint32();
  5950. switch (tag >>> 3) {
  5951. case 1:
  5952. message.numLower = reader.int64();
  5953. break;
  5954. case 2:
  5955. message.numUpper = reader.int64();
  5956. break;
  5957. default:
  5958. reader.skipType(tag & 7);
  5959. break;
  5960. }
  5961. }
  5962. return message;
  5963. }
  5964. };
  5965. $root.CoreML.Specification.MatrixBandPartLayerParams.prototype.numLower = protobuf.Int64.create(0);
  5966. $root.CoreML.Specification.MatrixBandPartLayerParams.prototype.numUpper = protobuf.Int64.create(0);
  5967. $root.CoreML.Specification.UpperTriangularLayerParams = class UpperTriangularLayerParams {
  5968. constructor() {
  5969. }
  5970. static decode(reader, length) {
  5971. const message = new $root.CoreML.Specification.UpperTriangularLayerParams();
  5972. const end = reader.next(length);
  5973. while (reader.end(end)) {
  5974. const tag = reader.uint32();
  5975. switch (tag >>> 3) {
  5976. case 1:
  5977. message.k = reader.int64();
  5978. break;
  5979. default:
  5980. reader.skipType(tag & 7);
  5981. break;
  5982. }
  5983. }
  5984. return message;
  5985. }
  5986. };
  5987. $root.CoreML.Specification.UpperTriangularLayerParams.prototype.k = protobuf.Int64.create(0);
  5988. $root.CoreML.Specification.LowerTriangularLayerParams = class LowerTriangularLayerParams {
  5989. constructor() {
  5990. }
  5991. static decode(reader, length) {
  5992. const message = new $root.CoreML.Specification.LowerTriangularLayerParams();
  5993. const end = reader.next(length);
  5994. while (reader.end(end)) {
  5995. const tag = reader.uint32();
  5996. switch (tag >>> 3) {
  5997. case 1:
  5998. message.k = reader.int64();
  5999. break;
  6000. default:
  6001. reader.skipType(tag & 7);
  6002. break;
  6003. }
  6004. }
  6005. return message;
  6006. }
  6007. };
  6008. $root.CoreML.Specification.LowerTriangularLayerParams.prototype.k = protobuf.Int64.create(0);
  6009. $root.CoreML.Specification.BroadcastToLikeLayerParams = class BroadcastToLikeLayerParams {
  6010. constructor() {
  6011. }
  6012. static decode(reader, length) {
  6013. const message = new $root.CoreML.Specification.BroadcastToLikeLayerParams();
  6014. const end = reader.next(length);
  6015. while (reader.end(end)) {
  6016. const tag = reader.uint32();
  6017. switch (tag >>> 3) {
  6018. default:
  6019. reader.skipType(tag & 7);
  6020. break;
  6021. }
  6022. }
  6023. return message;
  6024. }
  6025. };
  6026. $root.CoreML.Specification.BroadcastToStaticLayerParams = class BroadcastToStaticLayerParams {
  6027. constructor() {
  6028. this.targetShape = [];
  6029. }
  6030. static decode(reader, length) {
  6031. const message = new $root.CoreML.Specification.BroadcastToStaticLayerParams();
  6032. const end = reader.next(length);
  6033. while (reader.end(end)) {
  6034. const tag = reader.uint32();
  6035. switch (tag >>> 3) {
  6036. case 1:
  6037. message.targetShape = reader.array(message.targetShape, () => reader.uint64(), tag);
  6038. break;
  6039. default:
  6040. reader.skipType(tag & 7);
  6041. break;
  6042. }
  6043. }
  6044. return message;
  6045. }
  6046. };
  6047. $root.CoreML.Specification.BroadcastToDynamicLayerParams = class BroadcastToDynamicLayerParams {
  6048. constructor() {
  6049. }
  6050. static decode(reader, length) {
  6051. const message = new $root.CoreML.Specification.BroadcastToDynamicLayerParams();
  6052. const end = reader.next(length);
  6053. while (reader.end(end)) {
  6054. const tag = reader.uint32();
  6055. switch (tag >>> 3) {
  6056. default:
  6057. reader.skipType(tag & 7);
  6058. break;
  6059. }
  6060. }
  6061. return message;
  6062. }
  6063. };
  6064. $root.CoreML.Specification.AddBroadcastableLayerParams = class AddBroadcastableLayerParams {
  6065. constructor() {
  6066. }
  6067. static decode(reader, length) {
  6068. const message = new $root.CoreML.Specification.AddBroadcastableLayerParams();
  6069. const end = reader.next(length);
  6070. while (reader.end(end)) {
  6071. const tag = reader.uint32();
  6072. switch (tag >>> 3) {
  6073. default:
  6074. reader.skipType(tag & 7);
  6075. break;
  6076. }
  6077. }
  6078. return message;
  6079. }
  6080. };
  6081. $root.CoreML.Specification.MaxBroadcastableLayerParams = class MaxBroadcastableLayerParams {
  6082. constructor() {
  6083. }
  6084. static decode(reader, length) {
  6085. const message = new $root.CoreML.Specification.MaxBroadcastableLayerParams();
  6086. const end = reader.next(length);
  6087. while (reader.end(end)) {
  6088. const tag = reader.uint32();
  6089. switch (tag >>> 3) {
  6090. default:
  6091. reader.skipType(tag & 7);
  6092. break;
  6093. }
  6094. }
  6095. return message;
  6096. }
  6097. };
  6098. $root.CoreML.Specification.MinBroadcastableLayerParams = class MinBroadcastableLayerParams {
  6099. constructor() {
  6100. }
  6101. static decode(reader, length) {
  6102. const message = new $root.CoreML.Specification.MinBroadcastableLayerParams();
  6103. const end = reader.next(length);
  6104. while (reader.end(end)) {
  6105. const tag = reader.uint32();
  6106. switch (tag >>> 3) {
  6107. default:
  6108. reader.skipType(tag & 7);
  6109. break;
  6110. }
  6111. }
  6112. return message;
  6113. }
  6114. };
  6115. $root.CoreML.Specification.ModBroadcastableLayerParams = class ModBroadcastableLayerParams {
  6116. constructor() {
  6117. }
  6118. static decode(reader, length) {
  6119. const message = new $root.CoreML.Specification.ModBroadcastableLayerParams();
  6120. const end = reader.next(length);
  6121. while (reader.end(end)) {
  6122. const tag = reader.uint32();
  6123. switch (tag >>> 3) {
  6124. default:
  6125. reader.skipType(tag & 7);
  6126. break;
  6127. }
  6128. }
  6129. return message;
  6130. }
  6131. };
  6132. $root.CoreML.Specification.FloorDivBroadcastableLayerParams = class FloorDivBroadcastableLayerParams {
  6133. constructor() {
  6134. }
  6135. static decode(reader, length) {
  6136. const message = new $root.CoreML.Specification.FloorDivBroadcastableLayerParams();
  6137. const end = reader.next(length);
  6138. while (reader.end(end)) {
  6139. const tag = reader.uint32();
  6140. switch (tag >>> 3) {
  6141. default:
  6142. reader.skipType(tag & 7);
  6143. break;
  6144. }
  6145. }
  6146. return message;
  6147. }
  6148. };
  6149. $root.CoreML.Specification.SubtractBroadcastableLayerParams = class SubtractBroadcastableLayerParams {
  6150. constructor() {
  6151. }
  6152. static decode(reader, length) {
  6153. const message = new $root.CoreML.Specification.SubtractBroadcastableLayerParams();
  6154. const end = reader.next(length);
  6155. while (reader.end(end)) {
  6156. const tag = reader.uint32();
  6157. switch (tag >>> 3) {
  6158. default:
  6159. reader.skipType(tag & 7);
  6160. break;
  6161. }
  6162. }
  6163. return message;
  6164. }
  6165. };
  6166. $root.CoreML.Specification.MultiplyBroadcastableLayerParams = class MultiplyBroadcastableLayerParams {
  6167. constructor() {
  6168. }
  6169. static decode(reader, length) {
  6170. const message = new $root.CoreML.Specification.MultiplyBroadcastableLayerParams();
  6171. const end = reader.next(length);
  6172. while (reader.end(end)) {
  6173. const tag = reader.uint32();
  6174. switch (tag >>> 3) {
  6175. default:
  6176. reader.skipType(tag & 7);
  6177. break;
  6178. }
  6179. }
  6180. return message;
  6181. }
  6182. };
  6183. $root.CoreML.Specification.DivideBroadcastableLayerParams = class DivideBroadcastableLayerParams {
  6184. constructor() {
  6185. }
  6186. static decode(reader, length) {
  6187. const message = new $root.CoreML.Specification.DivideBroadcastableLayerParams();
  6188. const end = reader.next(length);
  6189. while (reader.end(end)) {
  6190. const tag = reader.uint32();
  6191. switch (tag >>> 3) {
  6192. default:
  6193. reader.skipType(tag & 7);
  6194. break;
  6195. }
  6196. }
  6197. return message;
  6198. }
  6199. };
  6200. $root.CoreML.Specification.GatherLayerParams = class GatherLayerParams {
  6201. constructor() {
  6202. }
  6203. static decode(reader, length) {
  6204. const message = new $root.CoreML.Specification.GatherLayerParams();
  6205. const end = reader.next(length);
  6206. while (reader.end(end)) {
  6207. const tag = reader.uint32();
  6208. switch (tag >>> 3) {
  6209. case 1:
  6210. message.axis = reader.int64();
  6211. break;
  6212. default:
  6213. reader.skipType(tag & 7);
  6214. break;
  6215. }
  6216. }
  6217. return message;
  6218. }
  6219. };
  6220. $root.CoreML.Specification.GatherLayerParams.prototype.axis = protobuf.Int64.create(0);
  6221. $root.CoreML.Specification.ScatterMode = {
  6222. "SCATTER_UPDATE": 0,
  6223. "SCATTER_ADD": 1,
  6224. "SCATTER_SUB": 2,
  6225. "SCATTER_MUL": 3,
  6226. "SCATTER_DIV": 4,
  6227. "SCATTER_MAX": 5,
  6228. "SCATTER_MIN": 6
  6229. };
  6230. $root.CoreML.Specification.ScatterLayerParams = class ScatterLayerParams {
  6231. constructor() {
  6232. }
  6233. static decode(reader, length) {
  6234. const message = new $root.CoreML.Specification.ScatterLayerParams();
  6235. const end = reader.next(length);
  6236. while (reader.end(end)) {
  6237. const tag = reader.uint32();
  6238. switch (tag >>> 3) {
  6239. case 1:
  6240. message.axis = reader.int64();
  6241. break;
  6242. case 2:
  6243. message.mode = reader.int32();
  6244. break;
  6245. default:
  6246. reader.skipType(tag & 7);
  6247. break;
  6248. }
  6249. }
  6250. return message;
  6251. }
  6252. };
  6253. $root.CoreML.Specification.ScatterLayerParams.prototype.axis = protobuf.Int64.create(0);
  6254. $root.CoreML.Specification.ScatterLayerParams.prototype.mode = 0;
  6255. $root.CoreML.Specification.GatherNDLayerParams = class GatherNDLayerParams {
  6256. constructor() {
  6257. }
  6258. static decode(reader, length) {
  6259. const message = new $root.CoreML.Specification.GatherNDLayerParams();
  6260. const end = reader.next(length);
  6261. while (reader.end(end)) {
  6262. const tag = reader.uint32();
  6263. switch (tag >>> 3) {
  6264. default:
  6265. reader.skipType(tag & 7);
  6266. break;
  6267. }
  6268. }
  6269. return message;
  6270. }
  6271. };
  6272. $root.CoreML.Specification.ScatterNDLayerParams = class ScatterNDLayerParams {
  6273. constructor() {
  6274. }
  6275. static decode(reader, length) {
  6276. const message = new $root.CoreML.Specification.ScatterNDLayerParams();
  6277. const end = reader.next(length);
  6278. while (reader.end(end)) {
  6279. const tag = reader.uint32();
  6280. switch (tag >>> 3) {
  6281. case 1:
  6282. message.mode = reader.int32();
  6283. break;
  6284. default:
  6285. reader.skipType(tag & 7);
  6286. break;
  6287. }
  6288. }
  6289. return message;
  6290. }
  6291. };
  6292. $root.CoreML.Specification.ScatterNDLayerParams.prototype.mode = 0;
  6293. $root.CoreML.Specification.GatherAlongAxisLayerParams = class GatherAlongAxisLayerParams {
  6294. constructor() {
  6295. }
  6296. static decode(reader, length) {
  6297. const message = new $root.CoreML.Specification.GatherAlongAxisLayerParams();
  6298. const end = reader.next(length);
  6299. while (reader.end(end)) {
  6300. const tag = reader.uint32();
  6301. switch (tag >>> 3) {
  6302. case 1:
  6303. message.axis = reader.int64();
  6304. break;
  6305. default:
  6306. reader.skipType(tag & 7);
  6307. break;
  6308. }
  6309. }
  6310. return message;
  6311. }
  6312. };
  6313. $root.CoreML.Specification.GatherAlongAxisLayerParams.prototype.axis = protobuf.Int64.create(0);
  6314. $root.CoreML.Specification.ScatterAlongAxisLayerParams = class ScatterAlongAxisLayerParams {
  6315. constructor() {
  6316. }
  6317. static decode(reader, length) {
  6318. const message = new $root.CoreML.Specification.ScatterAlongAxisLayerParams();
  6319. const end = reader.next(length);
  6320. while (reader.end(end)) {
  6321. const tag = reader.uint32();
  6322. switch (tag >>> 3) {
  6323. case 1:
  6324. message.axis = reader.int64();
  6325. break;
  6326. case 2:
  6327. message.mode = reader.int32();
  6328. break;
  6329. default:
  6330. reader.skipType(tag & 7);
  6331. break;
  6332. }
  6333. }
  6334. return message;
  6335. }
  6336. };
  6337. $root.CoreML.Specification.ScatterAlongAxisLayerParams.prototype.axis = protobuf.Int64.create(0);
  6338. $root.CoreML.Specification.ScatterAlongAxisLayerParams.prototype.mode = 0;
  6339. $root.CoreML.Specification.StackLayerParams = class StackLayerParams {
  6340. constructor() {
  6341. }
  6342. static decode(reader, length) {
  6343. const message = new $root.CoreML.Specification.StackLayerParams();
  6344. const end = reader.next(length);
  6345. while (reader.end(end)) {
  6346. const tag = reader.uint32();
  6347. switch (tag >>> 3) {
  6348. case 1:
  6349. message.axis = reader.int64();
  6350. break;
  6351. default:
  6352. reader.skipType(tag & 7);
  6353. break;
  6354. }
  6355. }
  6356. return message;
  6357. }
  6358. };
  6359. $root.CoreML.Specification.StackLayerParams.prototype.axis = protobuf.Int64.create(0);
  6360. $root.CoreML.Specification.RankPreservingReshapeLayerParams = class RankPreservingReshapeLayerParams {
  6361. constructor() {
  6362. this.targetShape = [];
  6363. }
  6364. static decode(reader, length) {
  6365. const message = new $root.CoreML.Specification.RankPreservingReshapeLayerParams();
  6366. const end = reader.next(length);
  6367. while (reader.end(end)) {
  6368. const tag = reader.uint32();
  6369. switch (tag >>> 3) {
  6370. case 1:
  6371. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  6372. break;
  6373. default:
  6374. reader.skipType(tag & 7);
  6375. break;
  6376. }
  6377. }
  6378. return message;
  6379. }
  6380. };
  6381. $root.CoreML.Specification.ConstantPaddingLayerParams = class ConstantPaddingLayerParams {
  6382. constructor() {
  6383. this.padAmounts = [];
  6384. }
  6385. static decode(reader, length) {
  6386. const message = new $root.CoreML.Specification.ConstantPaddingLayerParams();
  6387. const end = reader.next(length);
  6388. while (reader.end(end)) {
  6389. const tag = reader.uint32();
  6390. switch (tag >>> 3) {
  6391. case 1:
  6392. message.value = reader.float();
  6393. break;
  6394. case 2:
  6395. message.padAmounts = reader.array(message.padAmounts, () => reader.uint64(), tag);
  6396. break;
  6397. case 3:
  6398. message.padToGivenOutputSizeMode = reader.bool();
  6399. break;
  6400. default:
  6401. reader.skipType(tag & 7);
  6402. break;
  6403. }
  6404. }
  6405. return message;
  6406. }
  6407. };
  6408. $root.CoreML.Specification.ConstantPaddingLayerParams.prototype.value = 0;
  6409. $root.CoreML.Specification.ConstantPaddingLayerParams.prototype.padToGivenOutputSizeMode = false;
  6410. $root.CoreML.Specification.RandomNormalLikeLayerParams = class RandomNormalLikeLayerParams {
  6411. constructor() {
  6412. }
  6413. static decode(reader, length) {
  6414. const message = new $root.CoreML.Specification.RandomNormalLikeLayerParams();
  6415. const end = reader.next(length);
  6416. while (reader.end(end)) {
  6417. const tag = reader.uint32();
  6418. switch (tag >>> 3) {
  6419. case 1:
  6420. message.seed = reader.int64();
  6421. break;
  6422. case 2:
  6423. message.mean = reader.float();
  6424. break;
  6425. case 3:
  6426. message.stdDev = reader.float();
  6427. break;
  6428. default:
  6429. reader.skipType(tag & 7);
  6430. break;
  6431. }
  6432. }
  6433. return message;
  6434. }
  6435. };
  6436. $root.CoreML.Specification.RandomNormalLikeLayerParams.prototype.seed = protobuf.Int64.create(0);
  6437. $root.CoreML.Specification.RandomNormalLikeLayerParams.prototype.mean = 0;
  6438. $root.CoreML.Specification.RandomNormalLikeLayerParams.prototype.stdDev = 0;
  6439. $root.CoreML.Specification.RandomNormalStaticLayerParams = class RandomNormalStaticLayerParams {
  6440. constructor() {
  6441. this.outputShape = [];
  6442. }
  6443. static decode(reader, length) {
  6444. const message = new $root.CoreML.Specification.RandomNormalStaticLayerParams();
  6445. const end = reader.next(length);
  6446. while (reader.end(end)) {
  6447. const tag = reader.uint32();
  6448. switch (tag >>> 3) {
  6449. case 1:
  6450. message.seed = reader.int64();
  6451. break;
  6452. case 2:
  6453. message.mean = reader.float();
  6454. break;
  6455. case 3:
  6456. message.stdDev = reader.float();
  6457. break;
  6458. case 4:
  6459. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  6460. break;
  6461. default:
  6462. reader.skipType(tag & 7);
  6463. break;
  6464. }
  6465. }
  6466. return message;
  6467. }
  6468. };
  6469. $root.CoreML.Specification.RandomNormalStaticLayerParams.prototype.seed = protobuf.Int64.create(0);
  6470. $root.CoreML.Specification.RandomNormalStaticLayerParams.prototype.mean = 0;
  6471. $root.CoreML.Specification.RandomNormalStaticLayerParams.prototype.stdDev = 0;
  6472. $root.CoreML.Specification.RandomNormalDynamicLayerParams = class RandomNormalDynamicLayerParams {
  6473. constructor() {
  6474. }
  6475. static decode(reader, length) {
  6476. const message = new $root.CoreML.Specification.RandomNormalDynamicLayerParams();
  6477. const end = reader.next(length);
  6478. while (reader.end(end)) {
  6479. const tag = reader.uint32();
  6480. switch (tag >>> 3) {
  6481. case 1:
  6482. message.seed = reader.int64();
  6483. break;
  6484. case 2:
  6485. message.mean = reader.float();
  6486. break;
  6487. case 3:
  6488. message.stdDev = reader.float();
  6489. break;
  6490. default:
  6491. reader.skipType(tag & 7);
  6492. break;
  6493. }
  6494. }
  6495. return message;
  6496. }
  6497. };
  6498. $root.CoreML.Specification.RandomNormalDynamicLayerParams.prototype.seed = protobuf.Int64.create(0);
  6499. $root.CoreML.Specification.RandomNormalDynamicLayerParams.prototype.mean = 0;
  6500. $root.CoreML.Specification.RandomNormalDynamicLayerParams.prototype.stdDev = 0;
  6501. $root.CoreML.Specification.RandomUniformLikeLayerParams = class RandomUniformLikeLayerParams {
  6502. constructor() {
  6503. }
  6504. static decode(reader, length) {
  6505. const message = new $root.CoreML.Specification.RandomUniformLikeLayerParams();
  6506. const end = reader.next(length);
  6507. while (reader.end(end)) {
  6508. const tag = reader.uint32();
  6509. switch (tag >>> 3) {
  6510. case 1:
  6511. message.seed = reader.int64();
  6512. break;
  6513. case 2:
  6514. message.minVal = reader.float();
  6515. break;
  6516. case 3:
  6517. message.maxVal = reader.float();
  6518. break;
  6519. default:
  6520. reader.skipType(tag & 7);
  6521. break;
  6522. }
  6523. }
  6524. return message;
  6525. }
  6526. };
  6527. $root.CoreML.Specification.RandomUniformLikeLayerParams.prototype.seed = protobuf.Int64.create(0);
  6528. $root.CoreML.Specification.RandomUniformLikeLayerParams.prototype.minVal = 0;
  6529. $root.CoreML.Specification.RandomUniformLikeLayerParams.prototype.maxVal = 0;
  6530. $root.CoreML.Specification.RandomUniformStaticLayerParams = class RandomUniformStaticLayerParams {
  6531. constructor() {
  6532. this.outputShape = [];
  6533. }
  6534. static decode(reader, length) {
  6535. const message = new $root.CoreML.Specification.RandomUniformStaticLayerParams();
  6536. const end = reader.next(length);
  6537. while (reader.end(end)) {
  6538. const tag = reader.uint32();
  6539. switch (tag >>> 3) {
  6540. case 1:
  6541. message.seed = reader.int64();
  6542. break;
  6543. case 2:
  6544. message.minVal = reader.float();
  6545. break;
  6546. case 3:
  6547. message.maxVal = reader.float();
  6548. break;
  6549. case 4:
  6550. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  6551. break;
  6552. default:
  6553. reader.skipType(tag & 7);
  6554. break;
  6555. }
  6556. }
  6557. return message;
  6558. }
  6559. };
  6560. $root.CoreML.Specification.RandomUniformStaticLayerParams.prototype.seed = protobuf.Int64.create(0);
  6561. $root.CoreML.Specification.RandomUniformStaticLayerParams.prototype.minVal = 0;
  6562. $root.CoreML.Specification.RandomUniformStaticLayerParams.prototype.maxVal = 0;
  6563. $root.CoreML.Specification.RandomUniformDynamicLayerParams = class RandomUniformDynamicLayerParams {
  6564. constructor() {
  6565. }
  6566. static decode(reader, length) {
  6567. const message = new $root.CoreML.Specification.RandomUniformDynamicLayerParams();
  6568. const end = reader.next(length);
  6569. while (reader.end(end)) {
  6570. const tag = reader.uint32();
  6571. switch (tag >>> 3) {
  6572. case 1:
  6573. message.seed = reader.int64();
  6574. break;
  6575. case 2:
  6576. message.minVal = reader.float();
  6577. break;
  6578. case 3:
  6579. message.maxVal = reader.float();
  6580. break;
  6581. default:
  6582. reader.skipType(tag & 7);
  6583. break;
  6584. }
  6585. }
  6586. return message;
  6587. }
  6588. };
  6589. $root.CoreML.Specification.RandomUniformDynamicLayerParams.prototype.seed = protobuf.Int64.create(0);
  6590. $root.CoreML.Specification.RandomUniformDynamicLayerParams.prototype.minVal = 0;
  6591. $root.CoreML.Specification.RandomUniformDynamicLayerParams.prototype.maxVal = 0;
  6592. $root.CoreML.Specification.RandomBernoulliLikeLayerParams = class RandomBernoulliLikeLayerParams {
  6593. constructor() {
  6594. }
  6595. static decode(reader, length) {
  6596. const message = new $root.CoreML.Specification.RandomBernoulliLikeLayerParams();
  6597. const end = reader.next(length);
  6598. while (reader.end(end)) {
  6599. const tag = reader.uint32();
  6600. switch (tag >>> 3) {
  6601. case 1:
  6602. message.seed = reader.int64();
  6603. break;
  6604. case 2:
  6605. message.prob = reader.float();
  6606. break;
  6607. default:
  6608. reader.skipType(tag & 7);
  6609. break;
  6610. }
  6611. }
  6612. return message;
  6613. }
  6614. };
  6615. $root.CoreML.Specification.RandomBernoulliLikeLayerParams.prototype.seed = protobuf.Int64.create(0);
  6616. $root.CoreML.Specification.RandomBernoulliLikeLayerParams.prototype.prob = 0;
  6617. $root.CoreML.Specification.RandomBernoulliStaticLayerParams = class RandomBernoulliStaticLayerParams {
  6618. constructor() {
  6619. this.outputShape = [];
  6620. }
  6621. static decode(reader, length) {
  6622. const message = new $root.CoreML.Specification.RandomBernoulliStaticLayerParams();
  6623. const end = reader.next(length);
  6624. while (reader.end(end)) {
  6625. const tag = reader.uint32();
  6626. switch (tag >>> 3) {
  6627. case 1:
  6628. message.seed = reader.int64();
  6629. break;
  6630. case 2:
  6631. message.prob = reader.float();
  6632. break;
  6633. case 3:
  6634. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  6635. break;
  6636. default:
  6637. reader.skipType(tag & 7);
  6638. break;
  6639. }
  6640. }
  6641. return message;
  6642. }
  6643. };
  6644. $root.CoreML.Specification.RandomBernoulliStaticLayerParams.prototype.seed = protobuf.Int64.create(0);
  6645. $root.CoreML.Specification.RandomBernoulliStaticLayerParams.prototype.prob = 0;
  6646. $root.CoreML.Specification.RandomBernoulliDynamicLayerParams = class RandomBernoulliDynamicLayerParams {
  6647. constructor() {
  6648. }
  6649. static decode(reader, length) {
  6650. const message = new $root.CoreML.Specification.RandomBernoulliDynamicLayerParams();
  6651. const end = reader.next(length);
  6652. while (reader.end(end)) {
  6653. const tag = reader.uint32();
  6654. switch (tag >>> 3) {
  6655. case 1:
  6656. message.seed = reader.int64();
  6657. break;
  6658. case 2:
  6659. message.prob = reader.float();
  6660. break;
  6661. default:
  6662. reader.skipType(tag & 7);
  6663. break;
  6664. }
  6665. }
  6666. return message;
  6667. }
  6668. };
  6669. $root.CoreML.Specification.RandomBernoulliDynamicLayerParams.prototype.seed = protobuf.Int64.create(0);
  6670. $root.CoreML.Specification.RandomBernoulliDynamicLayerParams.prototype.prob = 0;
  6671. $root.CoreML.Specification.CategoricalDistributionLayerParams = class CategoricalDistributionLayerParams {
  6672. constructor() {
  6673. }
  6674. static decode(reader, length) {
  6675. const message = new $root.CoreML.Specification.CategoricalDistributionLayerParams();
  6676. const end = reader.next(length);
  6677. while (reader.end(end)) {
  6678. const tag = reader.uint32();
  6679. switch (tag >>> 3) {
  6680. case 1:
  6681. message.seed = reader.int64();
  6682. break;
  6683. case 2:
  6684. message.numSamples = reader.int64();
  6685. break;
  6686. case 3:
  6687. message.isLogits = reader.bool();
  6688. break;
  6689. case 4:
  6690. message.eps = reader.float();
  6691. break;
  6692. case 5:
  6693. message.temperature = reader.float();
  6694. break;
  6695. default:
  6696. reader.skipType(tag & 7);
  6697. break;
  6698. }
  6699. }
  6700. return message;
  6701. }
  6702. };
  6703. $root.CoreML.Specification.CategoricalDistributionLayerParams.prototype.seed = protobuf.Int64.create(0);
  6704. $root.CoreML.Specification.CategoricalDistributionLayerParams.prototype.numSamples = protobuf.Int64.create(0);
  6705. $root.CoreML.Specification.CategoricalDistributionLayerParams.prototype.isLogits = false;
  6706. $root.CoreML.Specification.CategoricalDistributionLayerParams.prototype.eps = 0;
  6707. $root.CoreML.Specification.CategoricalDistributionLayerParams.prototype.temperature = 0;
  6708. $root.CoreML.Specification.ReduceL1LayerParams = class ReduceL1LayerParams {
  6709. constructor() {
  6710. this.axes = [];
  6711. }
  6712. static decode(reader, length) {
  6713. const message = new $root.CoreML.Specification.ReduceL1LayerParams();
  6714. const end = reader.next(length);
  6715. while (reader.end(end)) {
  6716. const tag = reader.uint32();
  6717. switch (tag >>> 3) {
  6718. case 1:
  6719. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6720. break;
  6721. case 2:
  6722. message.keepDims = reader.bool();
  6723. break;
  6724. case 3:
  6725. message.reduceAll = reader.bool();
  6726. break;
  6727. default:
  6728. reader.skipType(tag & 7);
  6729. break;
  6730. }
  6731. }
  6732. return message;
  6733. }
  6734. };
  6735. $root.CoreML.Specification.ReduceL1LayerParams.prototype.keepDims = false;
  6736. $root.CoreML.Specification.ReduceL1LayerParams.prototype.reduceAll = false;
  6737. $root.CoreML.Specification.ReduceL2LayerParams = class ReduceL2LayerParams {
  6738. constructor() {
  6739. this.axes = [];
  6740. }
  6741. static decode(reader, length) {
  6742. const message = new $root.CoreML.Specification.ReduceL2LayerParams();
  6743. const end = reader.next(length);
  6744. while (reader.end(end)) {
  6745. const tag = reader.uint32();
  6746. switch (tag >>> 3) {
  6747. case 1:
  6748. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6749. break;
  6750. case 2:
  6751. message.keepDims = reader.bool();
  6752. break;
  6753. case 3:
  6754. message.reduceAll = reader.bool();
  6755. break;
  6756. default:
  6757. reader.skipType(tag & 7);
  6758. break;
  6759. }
  6760. }
  6761. return message;
  6762. }
  6763. };
  6764. $root.CoreML.Specification.ReduceL2LayerParams.prototype.keepDims = false;
  6765. $root.CoreML.Specification.ReduceL2LayerParams.prototype.reduceAll = false;
  6766. $root.CoreML.Specification.ReduceMaxLayerParams = class ReduceMaxLayerParams {
  6767. constructor() {
  6768. this.axes = [];
  6769. }
  6770. static decode(reader, length) {
  6771. const message = new $root.CoreML.Specification.ReduceMaxLayerParams();
  6772. const end = reader.next(length);
  6773. while (reader.end(end)) {
  6774. const tag = reader.uint32();
  6775. switch (tag >>> 3) {
  6776. case 1:
  6777. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6778. break;
  6779. case 2:
  6780. message.keepDims = reader.bool();
  6781. break;
  6782. case 3:
  6783. message.reduceAll = reader.bool();
  6784. break;
  6785. default:
  6786. reader.skipType(tag & 7);
  6787. break;
  6788. }
  6789. }
  6790. return message;
  6791. }
  6792. };
  6793. $root.CoreML.Specification.ReduceMaxLayerParams.prototype.keepDims = false;
  6794. $root.CoreML.Specification.ReduceMaxLayerParams.prototype.reduceAll = false;
  6795. $root.CoreML.Specification.ReduceMinLayerParams = class ReduceMinLayerParams {
  6796. constructor() {
  6797. this.axes = [];
  6798. }
  6799. static decode(reader, length) {
  6800. const message = new $root.CoreML.Specification.ReduceMinLayerParams();
  6801. const end = reader.next(length);
  6802. while (reader.end(end)) {
  6803. const tag = reader.uint32();
  6804. switch (tag >>> 3) {
  6805. case 1:
  6806. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6807. break;
  6808. case 2:
  6809. message.keepDims = reader.bool();
  6810. break;
  6811. case 3:
  6812. message.reduceAll = reader.bool();
  6813. break;
  6814. default:
  6815. reader.skipType(tag & 7);
  6816. break;
  6817. }
  6818. }
  6819. return message;
  6820. }
  6821. };
  6822. $root.CoreML.Specification.ReduceMinLayerParams.prototype.keepDims = false;
  6823. $root.CoreML.Specification.ReduceMinLayerParams.prototype.reduceAll = false;
  6824. $root.CoreML.Specification.ReduceSumLayerParams = class ReduceSumLayerParams {
  6825. constructor() {
  6826. this.axes = [];
  6827. }
  6828. static decode(reader, length) {
  6829. const message = new $root.CoreML.Specification.ReduceSumLayerParams();
  6830. const end = reader.next(length);
  6831. while (reader.end(end)) {
  6832. const tag = reader.uint32();
  6833. switch (tag >>> 3) {
  6834. case 1:
  6835. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6836. break;
  6837. case 2:
  6838. message.keepDims = reader.bool();
  6839. break;
  6840. case 3:
  6841. message.reduceAll = reader.bool();
  6842. break;
  6843. default:
  6844. reader.skipType(tag & 7);
  6845. break;
  6846. }
  6847. }
  6848. return message;
  6849. }
  6850. };
  6851. $root.CoreML.Specification.ReduceSumLayerParams.prototype.keepDims = false;
  6852. $root.CoreML.Specification.ReduceSumLayerParams.prototype.reduceAll = false;
  6853. $root.CoreML.Specification.ReduceProdLayerParams = class ReduceProdLayerParams {
  6854. constructor() {
  6855. this.axes = [];
  6856. }
  6857. static decode(reader, length) {
  6858. const message = new $root.CoreML.Specification.ReduceProdLayerParams();
  6859. const end = reader.next(length);
  6860. while (reader.end(end)) {
  6861. const tag = reader.uint32();
  6862. switch (tag >>> 3) {
  6863. case 1:
  6864. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6865. break;
  6866. case 2:
  6867. message.keepDims = reader.bool();
  6868. break;
  6869. case 3:
  6870. message.reduceAll = reader.bool();
  6871. break;
  6872. default:
  6873. reader.skipType(tag & 7);
  6874. break;
  6875. }
  6876. }
  6877. return message;
  6878. }
  6879. };
  6880. $root.CoreML.Specification.ReduceProdLayerParams.prototype.keepDims = false;
  6881. $root.CoreML.Specification.ReduceProdLayerParams.prototype.reduceAll = false;
  6882. $root.CoreML.Specification.ReduceMeanLayerParams = class ReduceMeanLayerParams {
  6883. constructor() {
  6884. this.axes = [];
  6885. }
  6886. static decode(reader, length) {
  6887. const message = new $root.CoreML.Specification.ReduceMeanLayerParams();
  6888. const end = reader.next(length);
  6889. while (reader.end(end)) {
  6890. const tag = reader.uint32();
  6891. switch (tag >>> 3) {
  6892. case 1:
  6893. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6894. break;
  6895. case 2:
  6896. message.keepDims = reader.bool();
  6897. break;
  6898. case 3:
  6899. message.reduceAll = reader.bool();
  6900. break;
  6901. default:
  6902. reader.skipType(tag & 7);
  6903. break;
  6904. }
  6905. }
  6906. return message;
  6907. }
  6908. };
  6909. $root.CoreML.Specification.ReduceMeanLayerParams.prototype.keepDims = false;
  6910. $root.CoreML.Specification.ReduceMeanLayerParams.prototype.reduceAll = false;
  6911. $root.CoreML.Specification.ReduceLogSumLayerParams = class ReduceLogSumLayerParams {
  6912. constructor() {
  6913. this.axes = [];
  6914. }
  6915. static decode(reader, length) {
  6916. const message = new $root.CoreML.Specification.ReduceLogSumLayerParams();
  6917. const end = reader.next(length);
  6918. while (reader.end(end)) {
  6919. const tag = reader.uint32();
  6920. switch (tag >>> 3) {
  6921. case 1:
  6922. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6923. break;
  6924. case 2:
  6925. message.keepDims = reader.bool();
  6926. break;
  6927. case 3:
  6928. message.reduceAll = reader.bool();
  6929. break;
  6930. default:
  6931. reader.skipType(tag & 7);
  6932. break;
  6933. }
  6934. }
  6935. return message;
  6936. }
  6937. };
  6938. $root.CoreML.Specification.ReduceLogSumLayerParams.prototype.keepDims = false;
  6939. $root.CoreML.Specification.ReduceLogSumLayerParams.prototype.reduceAll = false;
  6940. $root.CoreML.Specification.ReduceSumSquareLayerParams = class ReduceSumSquareLayerParams {
  6941. constructor() {
  6942. this.axes = [];
  6943. }
  6944. static decode(reader, length) {
  6945. const message = new $root.CoreML.Specification.ReduceSumSquareLayerParams();
  6946. const end = reader.next(length);
  6947. while (reader.end(end)) {
  6948. const tag = reader.uint32();
  6949. switch (tag >>> 3) {
  6950. case 1:
  6951. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6952. break;
  6953. case 2:
  6954. message.keepDims = reader.bool();
  6955. break;
  6956. case 3:
  6957. message.reduceAll = reader.bool();
  6958. break;
  6959. default:
  6960. reader.skipType(tag & 7);
  6961. break;
  6962. }
  6963. }
  6964. return message;
  6965. }
  6966. };
  6967. $root.CoreML.Specification.ReduceSumSquareLayerParams.prototype.keepDims = false;
  6968. $root.CoreML.Specification.ReduceSumSquareLayerParams.prototype.reduceAll = false;
  6969. $root.CoreML.Specification.ReduceLogSumExpLayerParams = class ReduceLogSumExpLayerParams {
  6970. constructor() {
  6971. this.axes = [];
  6972. }
  6973. static decode(reader, length) {
  6974. const message = new $root.CoreML.Specification.ReduceLogSumExpLayerParams();
  6975. const end = reader.next(length);
  6976. while (reader.end(end)) {
  6977. const tag = reader.uint32();
  6978. switch (tag >>> 3) {
  6979. case 1:
  6980. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  6981. break;
  6982. case 2:
  6983. message.keepDims = reader.bool();
  6984. break;
  6985. case 3:
  6986. message.reduceAll = reader.bool();
  6987. break;
  6988. default:
  6989. reader.skipType(tag & 7);
  6990. break;
  6991. }
  6992. }
  6993. return message;
  6994. }
  6995. };
  6996. $root.CoreML.Specification.ReduceLogSumExpLayerParams.prototype.keepDims = false;
  6997. $root.CoreML.Specification.ReduceLogSumExpLayerParams.prototype.reduceAll = false;
  6998. $root.CoreML.Specification.ExpandDimsLayerParams = class ExpandDimsLayerParams {
  6999. constructor() {
  7000. this.axes = [];
  7001. }
  7002. static decode(reader, length) {
  7003. const message = new $root.CoreML.Specification.ExpandDimsLayerParams();
  7004. const end = reader.next(length);
  7005. while (reader.end(end)) {
  7006. const tag = reader.uint32();
  7007. switch (tag >>> 3) {
  7008. case 1:
  7009. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  7010. break;
  7011. default:
  7012. reader.skipType(tag & 7);
  7013. break;
  7014. }
  7015. }
  7016. return message;
  7017. }
  7018. };
  7019. $root.CoreML.Specification.FlattenTo2DLayerParams = class FlattenTo2DLayerParams {
  7020. constructor() {
  7021. }
  7022. static decode(reader, length) {
  7023. const message = new $root.CoreML.Specification.FlattenTo2DLayerParams();
  7024. const end = reader.next(length);
  7025. while (reader.end(end)) {
  7026. const tag = reader.uint32();
  7027. switch (tag >>> 3) {
  7028. case 1:
  7029. message.axis = reader.int64();
  7030. break;
  7031. default:
  7032. reader.skipType(tag & 7);
  7033. break;
  7034. }
  7035. }
  7036. return message;
  7037. }
  7038. };
  7039. $root.CoreML.Specification.FlattenTo2DLayerParams.prototype.axis = protobuf.Int64.create(0);
  7040. $root.CoreML.Specification.ReshapeStaticLayerParams = class ReshapeStaticLayerParams {
  7041. constructor() {
  7042. this.targetShape = [];
  7043. }
  7044. static decode(reader, length) {
  7045. const message = new $root.CoreML.Specification.ReshapeStaticLayerParams();
  7046. const end = reader.next(length);
  7047. while (reader.end(end)) {
  7048. const tag = reader.uint32();
  7049. switch (tag >>> 3) {
  7050. case 1:
  7051. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  7052. break;
  7053. default:
  7054. reader.skipType(tag & 7);
  7055. break;
  7056. }
  7057. }
  7058. return message;
  7059. }
  7060. };
  7061. $root.CoreML.Specification.ReshapeLikeLayerParams = class ReshapeLikeLayerParams {
  7062. constructor() {
  7063. }
  7064. static decode(reader, length) {
  7065. const message = new $root.CoreML.Specification.ReshapeLikeLayerParams();
  7066. const end = reader.next(length);
  7067. while (reader.end(end)) {
  7068. const tag = reader.uint32();
  7069. switch (tag >>> 3) {
  7070. default:
  7071. reader.skipType(tag & 7);
  7072. break;
  7073. }
  7074. }
  7075. return message;
  7076. }
  7077. };
  7078. $root.CoreML.Specification.ReshapeDynamicLayerParams = class ReshapeDynamicLayerParams {
  7079. constructor() {
  7080. }
  7081. static decode(reader, length) {
  7082. const message = new $root.CoreML.Specification.ReshapeDynamicLayerParams();
  7083. const end = reader.next(length);
  7084. while (reader.end(end)) {
  7085. const tag = reader.uint32();
  7086. switch (tag >>> 3) {
  7087. default:
  7088. reader.skipType(tag & 7);
  7089. break;
  7090. }
  7091. }
  7092. return message;
  7093. }
  7094. };
  7095. $root.CoreML.Specification.SqueezeLayerParams = class SqueezeLayerParams {
  7096. constructor() {
  7097. this.axes = [];
  7098. }
  7099. static decode(reader, length) {
  7100. const message = new $root.CoreML.Specification.SqueezeLayerParams();
  7101. const end = reader.next(length);
  7102. while (reader.end(end)) {
  7103. const tag = reader.uint32();
  7104. switch (tag >>> 3) {
  7105. case 1:
  7106. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  7107. break;
  7108. case 2:
  7109. message.squeezeAll = reader.bool();
  7110. break;
  7111. default:
  7112. reader.skipType(tag & 7);
  7113. break;
  7114. }
  7115. }
  7116. return message;
  7117. }
  7118. };
  7119. $root.CoreML.Specification.SqueezeLayerParams.prototype.squeezeAll = false;
  7120. $root.CoreML.Specification.TopKLayerParams = class TopKLayerParams {
  7121. constructor() {
  7122. }
  7123. static decode(reader, length) {
  7124. const message = new $root.CoreML.Specification.TopKLayerParams();
  7125. const end = reader.next(length);
  7126. while (reader.end(end)) {
  7127. const tag = reader.uint32();
  7128. switch (tag >>> 3) {
  7129. case 1:
  7130. message.axis = reader.int64();
  7131. break;
  7132. case 2:
  7133. message.K = reader.uint64();
  7134. break;
  7135. case 3:
  7136. message.useBottomK = reader.bool();
  7137. break;
  7138. default:
  7139. reader.skipType(tag & 7);
  7140. break;
  7141. }
  7142. }
  7143. return message;
  7144. }
  7145. };
  7146. $root.CoreML.Specification.TopKLayerParams.prototype.axis = protobuf.Int64.create(0);
  7147. $root.CoreML.Specification.TopKLayerParams.prototype.K = protobuf.Uint64.create(0);
  7148. $root.CoreML.Specification.TopKLayerParams.prototype.useBottomK = false;
  7149. $root.CoreML.Specification.ArgMaxLayerParams = class ArgMaxLayerParams {
  7150. constructor() {
  7151. }
  7152. static decode(reader, length) {
  7153. const message = new $root.CoreML.Specification.ArgMaxLayerParams();
  7154. const end = reader.next(length);
  7155. while (reader.end(end)) {
  7156. const tag = reader.uint32();
  7157. switch (tag >>> 3) {
  7158. case 1:
  7159. message.axis = reader.int64();
  7160. break;
  7161. case 2:
  7162. message.removeDim = reader.bool();
  7163. break;
  7164. default:
  7165. reader.skipType(tag & 7);
  7166. break;
  7167. }
  7168. }
  7169. return message;
  7170. }
  7171. };
  7172. $root.CoreML.Specification.ArgMaxLayerParams.prototype.axis = protobuf.Int64.create(0);
  7173. $root.CoreML.Specification.ArgMaxLayerParams.prototype.removeDim = false;
  7174. $root.CoreML.Specification.ArgMinLayerParams = class ArgMinLayerParams {
  7175. constructor() {
  7176. }
  7177. static decode(reader, length) {
  7178. const message = new $root.CoreML.Specification.ArgMinLayerParams();
  7179. const end = reader.next(length);
  7180. while (reader.end(end)) {
  7181. const tag = reader.uint32();
  7182. switch (tag >>> 3) {
  7183. case 1:
  7184. message.axis = reader.int64();
  7185. break;
  7186. case 2:
  7187. message.removeDim = reader.bool();
  7188. break;
  7189. default:
  7190. reader.skipType(tag & 7);
  7191. break;
  7192. }
  7193. }
  7194. return message;
  7195. }
  7196. };
  7197. $root.CoreML.Specification.ArgMinLayerParams.prototype.axis = protobuf.Int64.create(0);
  7198. $root.CoreML.Specification.ArgMinLayerParams.prototype.removeDim = false;
  7199. $root.CoreML.Specification.SplitNDLayerParams = class SplitNDLayerParams {
  7200. constructor() {
  7201. this.splitSizes = [];
  7202. }
  7203. static decode(reader, length) {
  7204. const message = new $root.CoreML.Specification.SplitNDLayerParams();
  7205. const end = reader.next(length);
  7206. while (reader.end(end)) {
  7207. const tag = reader.uint32();
  7208. switch (tag >>> 3) {
  7209. case 1:
  7210. message.axis = reader.int64();
  7211. break;
  7212. case 2:
  7213. message.numSplits = reader.uint64();
  7214. break;
  7215. case 3:
  7216. message.splitSizes = reader.array(message.splitSizes, () => reader.uint64(), tag);
  7217. break;
  7218. default:
  7219. reader.skipType(tag & 7);
  7220. break;
  7221. }
  7222. }
  7223. return message;
  7224. }
  7225. };
  7226. $root.CoreML.Specification.SplitNDLayerParams.prototype.axis = protobuf.Int64.create(0);
  7227. $root.CoreML.Specification.SplitNDLayerParams.prototype.numSplits = protobuf.Uint64.create(0);
  7228. $root.CoreML.Specification.CeilLayerParams = class CeilLayerParams {
  7229. constructor() {
  7230. }
  7231. static decode(reader, length) {
  7232. const message = new $root.CoreML.Specification.CeilLayerParams();
  7233. const end = reader.next(length);
  7234. while (reader.end(end)) {
  7235. const tag = reader.uint32();
  7236. switch (tag >>> 3) {
  7237. default:
  7238. reader.skipType(tag & 7);
  7239. break;
  7240. }
  7241. }
  7242. return message;
  7243. }
  7244. };
  7245. $root.CoreML.Specification.RoundLayerParams = class RoundLayerParams {
  7246. constructor() {
  7247. }
  7248. static decode(reader, length) {
  7249. const message = new $root.CoreML.Specification.RoundLayerParams();
  7250. const end = reader.next(length);
  7251. while (reader.end(end)) {
  7252. const tag = reader.uint32();
  7253. switch (tag >>> 3) {
  7254. default:
  7255. reader.skipType(tag & 7);
  7256. break;
  7257. }
  7258. }
  7259. return message;
  7260. }
  7261. };
  7262. $root.CoreML.Specification.FloorLayerParams = class FloorLayerParams {
  7263. constructor() {
  7264. }
  7265. static decode(reader, length) {
  7266. const message = new $root.CoreML.Specification.FloorLayerParams();
  7267. const end = reader.next(length);
  7268. while (reader.end(end)) {
  7269. const tag = reader.uint32();
  7270. switch (tag >>> 3) {
  7271. default:
  7272. reader.skipType(tag & 7);
  7273. break;
  7274. }
  7275. }
  7276. return message;
  7277. }
  7278. };
  7279. $root.CoreML.Specification.SignLayerParams = class SignLayerParams {
  7280. constructor() {
  7281. }
  7282. static decode(reader, length) {
  7283. const message = new $root.CoreML.Specification.SignLayerParams();
  7284. const end = reader.next(length);
  7285. while (reader.end(end)) {
  7286. const tag = reader.uint32();
  7287. switch (tag >>> 3) {
  7288. default:
  7289. reader.skipType(tag & 7);
  7290. break;
  7291. }
  7292. }
  7293. return message;
  7294. }
  7295. };
  7296. $root.CoreML.Specification.ClipLayerParams = class ClipLayerParams {
  7297. constructor() {
  7298. }
  7299. static decode(reader, length) {
  7300. const message = new $root.CoreML.Specification.ClipLayerParams();
  7301. const end = reader.next(length);
  7302. while (reader.end(end)) {
  7303. const tag = reader.uint32();
  7304. switch (tag >>> 3) {
  7305. case 1:
  7306. message.minVal = reader.float();
  7307. break;
  7308. case 2:
  7309. message.maxVal = reader.float();
  7310. break;
  7311. default:
  7312. reader.skipType(tag & 7);
  7313. break;
  7314. }
  7315. }
  7316. return message;
  7317. }
  7318. };
  7319. $root.CoreML.Specification.ClipLayerParams.prototype.minVal = 0;
  7320. $root.CoreML.Specification.ClipLayerParams.prototype.maxVal = 0;
  7321. $root.CoreML.Specification.SliceStaticLayerParams = class SliceStaticLayerParams {
  7322. constructor() {
  7323. this.beginIds = [];
  7324. this.beginMasks = [];
  7325. this.endIds = [];
  7326. this.endMasks = [];
  7327. this.strides = [];
  7328. this.squeezeMasks = [];
  7329. }
  7330. static decode(reader, length) {
  7331. const message = new $root.CoreML.Specification.SliceStaticLayerParams();
  7332. const end = reader.next(length);
  7333. while (reader.end(end)) {
  7334. const tag = reader.uint32();
  7335. switch (tag >>> 3) {
  7336. case 1:
  7337. message.beginIds = reader.array(message.beginIds, () => reader.int64(), tag);
  7338. break;
  7339. case 2:
  7340. message.beginMasks = reader.array(message.beginMasks, () => reader.bool(), tag);
  7341. break;
  7342. case 3:
  7343. message.endIds = reader.array(message.endIds, () => reader.int64(), tag);
  7344. break;
  7345. case 4:
  7346. message.endMasks = reader.array(message.endMasks, () => reader.bool(), tag);
  7347. break;
  7348. case 5:
  7349. message.strides = reader.array(message.strides, () => reader.int64(), tag);
  7350. break;
  7351. case 6:
  7352. message.squeezeMasks = reader.array(message.squeezeMasks, () => reader.bool(), tag);
  7353. break;
  7354. default:
  7355. reader.skipType(tag & 7);
  7356. break;
  7357. }
  7358. }
  7359. return message;
  7360. }
  7361. };
  7362. $root.CoreML.Specification.SliceDynamicLayerParams = class SliceDynamicLayerParams {
  7363. constructor() {
  7364. this.beginMasks = [];
  7365. this.endIds = [];
  7366. this.endMasks = [];
  7367. this.strides = [];
  7368. this.squeezeMasks = [];
  7369. }
  7370. static decode(reader, length) {
  7371. const message = new $root.CoreML.Specification.SliceDynamicLayerParams();
  7372. const end = reader.next(length);
  7373. while (reader.end(end)) {
  7374. const tag = reader.uint32();
  7375. switch (tag >>> 3) {
  7376. case 2:
  7377. message.beginMasks = reader.array(message.beginMasks, () => reader.bool(), tag);
  7378. break;
  7379. case 3:
  7380. message.endIds = reader.array(message.endIds, () => reader.int64(), tag);
  7381. break;
  7382. case 4:
  7383. message.endMasks = reader.array(message.endMasks, () => reader.bool(), tag);
  7384. break;
  7385. case 5:
  7386. message.strides = reader.array(message.strides, () => reader.int64(), tag);
  7387. break;
  7388. case 6:
  7389. message.squeezeMasks = reader.array(message.squeezeMasks, () => reader.bool(), tag);
  7390. break;
  7391. default:
  7392. reader.skipType(tag & 7);
  7393. break;
  7394. }
  7395. }
  7396. return message;
  7397. }
  7398. };
  7399. $root.CoreML.Specification.TileLayerParams = class TileLayerParams {
  7400. constructor() {
  7401. this.reps = [];
  7402. }
  7403. static decode(reader, length) {
  7404. const message = new $root.CoreML.Specification.TileLayerParams();
  7405. const end = reader.next(length);
  7406. while (reader.end(end)) {
  7407. const tag = reader.uint32();
  7408. switch (tag >>> 3) {
  7409. case 1:
  7410. message.reps = reader.array(message.reps, () => reader.uint64(), tag);
  7411. break;
  7412. default:
  7413. reader.skipType(tag & 7);
  7414. break;
  7415. }
  7416. }
  7417. return message;
  7418. }
  7419. };
  7420. $root.CoreML.Specification.GetShapeLayerParams = class GetShapeLayerParams {
  7421. constructor() {
  7422. }
  7423. static decode(reader, length) {
  7424. const message = new $root.CoreML.Specification.GetShapeLayerParams();
  7425. const end = reader.next(length);
  7426. while (reader.end(end)) {
  7427. const tag = reader.uint32();
  7428. switch (tag >>> 3) {
  7429. default:
  7430. reader.skipType(tag & 7);
  7431. break;
  7432. }
  7433. }
  7434. return message;
  7435. }
  7436. };
  7437. $root.CoreML.Specification.ErfLayerParams = class ErfLayerParams {
  7438. constructor() {
  7439. }
  7440. static decode(reader, length) {
  7441. const message = new $root.CoreML.Specification.ErfLayerParams();
  7442. const end = reader.next(length);
  7443. while (reader.end(end)) {
  7444. const tag = reader.uint32();
  7445. switch (tag >>> 3) {
  7446. default:
  7447. reader.skipType(tag & 7);
  7448. break;
  7449. }
  7450. }
  7451. return message;
  7452. }
  7453. };
  7454. $root.CoreML.Specification.GeluLayerParams = class GeluLayerParams {
  7455. constructor() {
  7456. }
  7457. static decode(reader, length) {
  7458. const message = new $root.CoreML.Specification.GeluLayerParams();
  7459. const end = reader.next(length);
  7460. while (reader.end(end)) {
  7461. const tag = reader.uint32();
  7462. switch (tag >>> 3) {
  7463. case 1:
  7464. message.mode = reader.int32();
  7465. break;
  7466. default:
  7467. reader.skipType(tag & 7);
  7468. break;
  7469. }
  7470. }
  7471. return message;
  7472. }
  7473. };
  7474. $root.CoreML.Specification.GeluLayerParams.prototype.mode = 0;
  7475. $root.CoreML.Specification.GeluLayerParams.GeluMode = {
  7476. "EXACT": 0,
  7477. "TANH_APPROXIMATION": 1,
  7478. "SIGMOID_APPROXIMATION": 2
  7479. };
  7480. $root.CoreML.Specification.RangeStaticLayerParams = class RangeStaticLayerParams {
  7481. constructor() {
  7482. }
  7483. static decode(reader, length) {
  7484. const message = new $root.CoreML.Specification.RangeStaticLayerParams();
  7485. const end = reader.next(length);
  7486. while (reader.end(end)) {
  7487. const tag = reader.uint32();
  7488. switch (tag >>> 3) {
  7489. case 1:
  7490. message.endValue = reader.float();
  7491. break;
  7492. case 2:
  7493. message.startValue = reader.float();
  7494. break;
  7495. case 3:
  7496. message.stepSizeValue = reader.float();
  7497. break;
  7498. default:
  7499. reader.skipType(tag & 7);
  7500. break;
  7501. }
  7502. }
  7503. return message;
  7504. }
  7505. };
  7506. $root.CoreML.Specification.RangeStaticLayerParams.prototype.endValue = 0;
  7507. $root.CoreML.Specification.RangeStaticLayerParams.prototype.startValue = 0;
  7508. $root.CoreML.Specification.RangeStaticLayerParams.prototype.stepSizeValue = 0;
  7509. $root.CoreML.Specification.RangeDynamicLayerParams = class RangeDynamicLayerParams {
  7510. constructor() {
  7511. }
  7512. static decode(reader, length) {
  7513. const message = new $root.CoreML.Specification.RangeDynamicLayerParams();
  7514. const end = reader.next(length);
  7515. while (reader.end(end)) {
  7516. const tag = reader.uint32();
  7517. switch (tag >>> 3) {
  7518. case 2:
  7519. message.startValue = reader.float();
  7520. break;
  7521. case 3:
  7522. message.stepSizeValue = reader.float();
  7523. break;
  7524. default:
  7525. reader.skipType(tag & 7);
  7526. break;
  7527. }
  7528. }
  7529. return message;
  7530. }
  7531. };
  7532. $root.CoreML.Specification.RangeDynamicLayerParams.prototype.startValue = 0;
  7533. $root.CoreML.Specification.RangeDynamicLayerParams.prototype.stepSizeValue = 0;
  7534. $root.CoreML.Specification.SlidingWindowsLayerParams = class SlidingWindowsLayerParams {
  7535. constructor() {
  7536. }
  7537. static decode(reader, length) {
  7538. const message = new $root.CoreML.Specification.SlidingWindowsLayerParams();
  7539. const end = reader.next(length);
  7540. while (reader.end(end)) {
  7541. const tag = reader.uint32();
  7542. switch (tag >>> 3) {
  7543. case 1:
  7544. message.axis = reader.int64();
  7545. break;
  7546. case 2:
  7547. message.windowSize = reader.uint64();
  7548. break;
  7549. case 3:
  7550. message.step = reader.uint64();
  7551. break;
  7552. default:
  7553. reader.skipType(tag & 7);
  7554. break;
  7555. }
  7556. }
  7557. return message;
  7558. }
  7559. };
  7560. $root.CoreML.Specification.SlidingWindowsLayerParams.prototype.axis = protobuf.Int64.create(0);
  7561. $root.CoreML.Specification.SlidingWindowsLayerParams.prototype.windowSize = protobuf.Uint64.create(0);
  7562. $root.CoreML.Specification.SlidingWindowsLayerParams.prototype.step = protobuf.Uint64.create(0);
  7563. $root.CoreML.Specification.LayerNormalizationLayerParams = class LayerNormalizationLayerParams {
  7564. constructor() {
  7565. this.normalizedShape = [];
  7566. }
  7567. static decode(reader, length) {
  7568. const message = new $root.CoreML.Specification.LayerNormalizationLayerParams();
  7569. const end = reader.next(length);
  7570. while (reader.end(end)) {
  7571. const tag = reader.uint32();
  7572. switch (tag >>> 3) {
  7573. case 1:
  7574. message.normalizedShape = reader.array(message.normalizedShape, () => reader.int64(), tag);
  7575. break;
  7576. case 2:
  7577. message.eps = reader.float();
  7578. break;
  7579. case 3:
  7580. message.gamma = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  7581. break;
  7582. case 4:
  7583. message.beta = $root.CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  7584. break;
  7585. default:
  7586. reader.skipType(tag & 7);
  7587. break;
  7588. }
  7589. }
  7590. return message;
  7591. }
  7592. };
  7593. $root.CoreML.Specification.LayerNormalizationLayerParams.prototype.eps = 0;
  7594. $root.CoreML.Specification.LayerNormalizationLayerParams.prototype.gamma = null;
  7595. $root.CoreML.Specification.LayerNormalizationLayerParams.prototype.beta = null;
  7596. $root.CoreML.Specification.NonMaximumSuppressionLayerParams = class NonMaximumSuppressionLayerParams {
  7597. constructor() {
  7598. }
  7599. static decode(reader, length) {
  7600. const message = new $root.CoreML.Specification.NonMaximumSuppressionLayerParams();
  7601. const end = reader.next(length);
  7602. while (reader.end(end)) {
  7603. const tag = reader.uint32();
  7604. switch (tag >>> 3) {
  7605. case 1:
  7606. message.iouThreshold = reader.float();
  7607. break;
  7608. case 2:
  7609. message.scoreThreshold = reader.float();
  7610. break;
  7611. case 3:
  7612. message.maxBoxes = reader.uint64();
  7613. break;
  7614. case 4:
  7615. message.perClassSuppression = reader.bool();
  7616. break;
  7617. default:
  7618. reader.skipType(tag & 7);
  7619. break;
  7620. }
  7621. }
  7622. return message;
  7623. }
  7624. };
  7625. $root.CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.iouThreshold = 0;
  7626. $root.CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.scoreThreshold = 0;
  7627. $root.CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.maxBoxes = protobuf.Uint64.create(0);
  7628. $root.CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.perClassSuppression = false;
  7629. $root.CoreML.Specification.ClampedReLULayerParams = class ClampedReLULayerParams {
  7630. constructor() {
  7631. }
  7632. static decode(reader, length) {
  7633. const message = new $root.CoreML.Specification.ClampedReLULayerParams();
  7634. const end = reader.next(length);
  7635. while (reader.end(end)) {
  7636. const tag = reader.uint32();
  7637. switch (tag >>> 3) {
  7638. case 1:
  7639. message.alpha = reader.float();
  7640. break;
  7641. case 2:
  7642. message.beta = reader.float();
  7643. break;
  7644. default:
  7645. reader.skipType(tag & 7);
  7646. break;
  7647. }
  7648. }
  7649. return message;
  7650. }
  7651. };
  7652. $root.CoreML.Specification.ClampedReLULayerParams.prototype.alpha = 0;
  7653. $root.CoreML.Specification.ClampedReLULayerParams.prototype.beta = 0;
  7654. $root.CoreML.Specification.ArgSortLayerParams = class ArgSortLayerParams {
  7655. constructor() {
  7656. }
  7657. static decode(reader, length) {
  7658. const message = new $root.CoreML.Specification.ArgSortLayerParams();
  7659. const end = reader.next(length);
  7660. while (reader.end(end)) {
  7661. const tag = reader.uint32();
  7662. switch (tag >>> 3) {
  7663. case 1:
  7664. message.axis = reader.int64();
  7665. break;
  7666. case 2:
  7667. message.descending = reader.bool();
  7668. break;
  7669. default:
  7670. reader.skipType(tag & 7);
  7671. break;
  7672. }
  7673. }
  7674. return message;
  7675. }
  7676. };
  7677. $root.CoreML.Specification.ArgSortLayerParams.prototype.axis = protobuf.Int64.create(0);
  7678. $root.CoreML.Specification.ArgSortLayerParams.prototype.descending = false;
  7679. $root.CoreML.Specification.SliceBySizeLayerParams = class SliceBySizeLayerParams {
  7680. constructor() {
  7681. }
  7682. static decode(reader, length) {
  7683. const message = new $root.CoreML.Specification.SliceBySizeLayerParams();
  7684. const end = reader.next(length);
  7685. while (reader.end(end)) {
  7686. const tag = reader.uint32();
  7687. switch (tag >>> 3) {
  7688. case 2:
  7689. message.size = reader.int64();
  7690. break;
  7691. case 3:
  7692. message.axis = reader.int64();
  7693. break;
  7694. default:
  7695. reader.skipType(tag & 7);
  7696. break;
  7697. }
  7698. }
  7699. return message;
  7700. }
  7701. };
  7702. $root.CoreML.Specification.SliceBySizeLayerParams.prototype.size = protobuf.Int64.create(0);
  7703. $root.CoreML.Specification.SliceBySizeLayerParams.prototype.axis = protobuf.Int64.create(0);
  7704. $root.CoreML.Specification.NeuralNetworkClassifier = class NeuralNetworkClassifier {
  7705. constructor() {
  7706. this.layers = [];
  7707. this.preprocessing = [];
  7708. }
  7709. get ClassLabels() {
  7710. $root.CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet = $root.CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  7711. return Object.keys(this).find((key) => $root.CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet.has(key) && this[key] != null);
  7712. }
  7713. static decode(reader, length) {
  7714. const message = new $root.CoreML.Specification.NeuralNetworkClassifier();
  7715. const end = reader.next(length);
  7716. while (reader.end(end)) {
  7717. const tag = reader.uint32();
  7718. switch (tag >>> 3) {
  7719. case 1:
  7720. message.layers.push($root.CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  7721. break;
  7722. case 2:
  7723. message.preprocessing.push($root.CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  7724. break;
  7725. case 5:
  7726. message.arrayInputShapeMapping = reader.int32();
  7727. break;
  7728. case 6:
  7729. message.imageInputShapeMapping = reader.int32();
  7730. break;
  7731. case 10:
  7732. message.updateParams = $root.CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  7733. break;
  7734. case 100:
  7735. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  7736. break;
  7737. case 101:
  7738. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  7739. break;
  7740. case 200:
  7741. message.labelProbabilityLayerName = reader.string();
  7742. break;
  7743. default:
  7744. reader.skipType(tag & 7);
  7745. break;
  7746. }
  7747. }
  7748. return message;
  7749. }
  7750. };
  7751. $root.CoreML.Specification.NeuralNetworkClassifier.prototype.arrayInputShapeMapping = 0;
  7752. $root.CoreML.Specification.NeuralNetworkClassifier.prototype.imageInputShapeMapping = 0;
  7753. $root.CoreML.Specification.NeuralNetworkClassifier.prototype.updateParams = null;
  7754. $root.CoreML.Specification.NeuralNetworkClassifier.prototype.labelProbabilityLayerName = "";
  7755. $root.CoreML.Specification.OneHotLayerParams = class OneHotLayerParams {
  7756. constructor() {
  7757. }
  7758. static decode(reader, length) {
  7759. const message = new $root.CoreML.Specification.OneHotLayerParams();
  7760. const end = reader.next(length);
  7761. while (reader.end(end)) {
  7762. const tag = reader.uint32();
  7763. switch (tag >>> 3) {
  7764. case 1:
  7765. message.oneHotVectorSize = reader.uint64();
  7766. break;
  7767. case 2:
  7768. message.axis = reader.int64();
  7769. break;
  7770. case 3:
  7771. message.onValue = reader.float();
  7772. break;
  7773. case 4:
  7774. message.offValue = reader.float();
  7775. break;
  7776. default:
  7777. reader.skipType(tag & 7);
  7778. break;
  7779. }
  7780. }
  7781. return message;
  7782. }
  7783. };
  7784. $root.CoreML.Specification.OneHotLayerParams.prototype.oneHotVectorSize = protobuf.Uint64.create(0);
  7785. $root.CoreML.Specification.OneHotLayerParams.prototype.axis = protobuf.Int64.create(0);
  7786. $root.CoreML.Specification.OneHotLayerParams.prototype.onValue = 0;
  7787. $root.CoreML.Specification.OneHotLayerParams.prototype.offValue = 0;
  7788. $root.CoreML.Specification.CumSumLayerParams = class CumSumLayerParams {
  7789. constructor() {
  7790. }
  7791. static decode(reader, length) {
  7792. const message = new $root.CoreML.Specification.CumSumLayerParams();
  7793. const end = reader.next(length);
  7794. while (reader.end(end)) {
  7795. const tag = reader.uint32();
  7796. switch (tag >>> 3) {
  7797. case 1:
  7798. message.axis = reader.int64();
  7799. break;
  7800. case 2:
  7801. message.excludeFinalSum = reader.bool();
  7802. break;
  7803. case 3:
  7804. message.reverse = reader.bool();
  7805. break;
  7806. default:
  7807. reader.skipType(tag & 7);
  7808. break;
  7809. }
  7810. }
  7811. return message;
  7812. }
  7813. };
  7814. $root.CoreML.Specification.CumSumLayerParams.prototype.axis = protobuf.Int64.create(0);
  7815. $root.CoreML.Specification.CumSumLayerParams.prototype.excludeFinalSum = false;
  7816. $root.CoreML.Specification.CumSumLayerParams.prototype.reverse = false;
  7817. $root.CoreML.Specification.NeuralNetworkRegressor = class NeuralNetworkRegressor {
  7818. constructor() {
  7819. this.layers = [];
  7820. this.preprocessing = [];
  7821. }
  7822. static decode(reader, length) {
  7823. const message = new $root.CoreML.Specification.NeuralNetworkRegressor();
  7824. const end = reader.next(length);
  7825. while (reader.end(end)) {
  7826. const tag = reader.uint32();
  7827. switch (tag >>> 3) {
  7828. case 1:
  7829. message.layers.push($root.CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  7830. break;
  7831. case 2:
  7832. message.preprocessing.push($root.CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  7833. break;
  7834. case 5:
  7835. message.arrayInputShapeMapping = reader.int32();
  7836. break;
  7837. case 6:
  7838. message.imageInputShapeMapping = reader.int32();
  7839. break;
  7840. case 10:
  7841. message.updateParams = $root.CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  7842. break;
  7843. default:
  7844. reader.skipType(tag & 7);
  7845. break;
  7846. }
  7847. }
  7848. return message;
  7849. }
  7850. };
  7851. $root.CoreML.Specification.NeuralNetworkRegressor.prototype.arrayInputShapeMapping = 0;
  7852. $root.CoreML.Specification.NeuralNetworkRegressor.prototype.imageInputShapeMapping = 0;
  7853. $root.CoreML.Specification.NeuralNetworkRegressor.prototype.updateParams = null;
  7854. $root.CoreML.Specification.NetworkUpdateParameters = class NetworkUpdateParameters {
  7855. constructor() {
  7856. this.lossLayers = [];
  7857. }
  7858. static decode(reader, length) {
  7859. const message = new $root.CoreML.Specification.NetworkUpdateParameters();
  7860. const end = reader.next(length);
  7861. while (reader.end(end)) {
  7862. const tag = reader.uint32();
  7863. switch (tag >>> 3) {
  7864. case 1:
  7865. message.lossLayers.push($root.CoreML.Specification.LossLayer.decode(reader, reader.uint32()));
  7866. break;
  7867. case 2:
  7868. message.optimizer = $root.CoreML.Specification.Optimizer.decode(reader, reader.uint32());
  7869. break;
  7870. case 3:
  7871. message.epochs = $root.CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  7872. break;
  7873. case 10:
  7874. message.shuffle = $root.CoreML.Specification.BoolParameter.decode(reader, reader.uint32());
  7875. break;
  7876. case 20:
  7877. message.seed = $root.CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  7878. break;
  7879. default:
  7880. reader.skipType(tag & 7);
  7881. break;
  7882. }
  7883. }
  7884. return message;
  7885. }
  7886. };
  7887. $root.CoreML.Specification.NetworkUpdateParameters.prototype.optimizer = null;
  7888. $root.CoreML.Specification.NetworkUpdateParameters.prototype.epochs = null;
  7889. $root.CoreML.Specification.NetworkUpdateParameters.prototype.shuffle = null;
  7890. $root.CoreML.Specification.NetworkUpdateParameters.prototype.seed = null;
  7891. $root.CoreML.Specification.LossLayer = class LossLayer {
  7892. constructor() {
  7893. }
  7894. get LossLayerType() {
  7895. $root.CoreML.Specification.LossLayer.LossLayerTypeSet = $root.CoreML.Specification.LossLayer.LossLayerTypeSet || new Set([ "categoricalCrossEntropyLossLayer", "meanSquaredErrorLossLayer"]);
  7896. return Object.keys(this).find((key) => $root.CoreML.Specification.LossLayer.LossLayerTypeSet.has(key) && this[key] != null);
  7897. }
  7898. static decode(reader, length) {
  7899. const message = new $root.CoreML.Specification.LossLayer();
  7900. const end = reader.next(length);
  7901. while (reader.end(end)) {
  7902. const tag = reader.uint32();
  7903. switch (tag >>> 3) {
  7904. case 1:
  7905. message.name = reader.string();
  7906. break;
  7907. case 10:
  7908. message.categoricalCrossEntropyLossLayer = $root.CoreML.Specification.CategoricalCrossEntropyLossLayer.decode(reader, reader.uint32());
  7909. break;
  7910. case 11:
  7911. message.meanSquaredErrorLossLayer = $root.CoreML.Specification.MeanSquaredErrorLossLayer.decode(reader, reader.uint32());
  7912. break;
  7913. default:
  7914. reader.skipType(tag & 7);
  7915. break;
  7916. }
  7917. }
  7918. return message;
  7919. }
  7920. };
  7921. $root.CoreML.Specification.LossLayer.prototype.name = "";
  7922. $root.CoreML.Specification.CategoricalCrossEntropyLossLayer = class CategoricalCrossEntropyLossLayer {
  7923. constructor() {
  7924. }
  7925. static decode(reader, length) {
  7926. const message = new $root.CoreML.Specification.CategoricalCrossEntropyLossLayer();
  7927. const end = reader.next(length);
  7928. while (reader.end(end)) {
  7929. const tag = reader.uint32();
  7930. switch (tag >>> 3) {
  7931. case 1:
  7932. message.input = reader.string();
  7933. break;
  7934. case 2:
  7935. message.target = reader.string();
  7936. break;
  7937. default:
  7938. reader.skipType(tag & 7);
  7939. break;
  7940. }
  7941. }
  7942. return message;
  7943. }
  7944. };
  7945. $root.CoreML.Specification.CategoricalCrossEntropyLossLayer.prototype.input = "";
  7946. $root.CoreML.Specification.CategoricalCrossEntropyLossLayer.prototype.target = "";
  7947. $root.CoreML.Specification.MeanSquaredErrorLossLayer = class MeanSquaredErrorLossLayer {
  7948. constructor() {
  7949. }
  7950. static decode(reader, length) {
  7951. const message = new $root.CoreML.Specification.MeanSquaredErrorLossLayer();
  7952. const end = reader.next(length);
  7953. while (reader.end(end)) {
  7954. const tag = reader.uint32();
  7955. switch (tag >>> 3) {
  7956. case 1:
  7957. message.input = reader.string();
  7958. break;
  7959. case 2:
  7960. message.target = reader.string();
  7961. break;
  7962. default:
  7963. reader.skipType(tag & 7);
  7964. break;
  7965. }
  7966. }
  7967. return message;
  7968. }
  7969. };
  7970. $root.CoreML.Specification.MeanSquaredErrorLossLayer.prototype.input = "";
  7971. $root.CoreML.Specification.MeanSquaredErrorLossLayer.prototype.target = "";
  7972. $root.CoreML.Specification.Optimizer = class Optimizer {
  7973. constructor() {
  7974. }
  7975. get OptimizerType() {
  7976. $root.CoreML.Specification.Optimizer.OptimizerTypeSet = $root.CoreML.Specification.Optimizer.OptimizerTypeSet || new Set([ "sgdOptimizer", "adamOptimizer"]);
  7977. return Object.keys(this).find((key) => $root.CoreML.Specification.Optimizer.OptimizerTypeSet.has(key) && this[key] != null);
  7978. }
  7979. static decode(reader, length) {
  7980. const message = new $root.CoreML.Specification.Optimizer();
  7981. const end = reader.next(length);
  7982. while (reader.end(end)) {
  7983. const tag = reader.uint32();
  7984. switch (tag >>> 3) {
  7985. case 10:
  7986. message.sgdOptimizer = $root.CoreML.Specification.SGDOptimizer.decode(reader, reader.uint32());
  7987. break;
  7988. case 11:
  7989. message.adamOptimizer = $root.CoreML.Specification.AdamOptimizer.decode(reader, reader.uint32());
  7990. break;
  7991. default:
  7992. reader.skipType(tag & 7);
  7993. break;
  7994. }
  7995. }
  7996. return message;
  7997. }
  7998. };
  7999. $root.CoreML.Specification.SGDOptimizer = class SGDOptimizer {
  8000. constructor() {
  8001. }
  8002. static decode(reader, length) {
  8003. const message = new $root.CoreML.Specification.SGDOptimizer();
  8004. const end = reader.next(length);
  8005. while (reader.end(end)) {
  8006. const tag = reader.uint32();
  8007. switch (tag >>> 3) {
  8008. case 1:
  8009. message.learningRate = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8010. break;
  8011. case 2:
  8012. message.miniBatchSize = $root.CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  8013. break;
  8014. case 3:
  8015. message.momentum = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8016. break;
  8017. default:
  8018. reader.skipType(tag & 7);
  8019. break;
  8020. }
  8021. }
  8022. return message;
  8023. }
  8024. };
  8025. $root.CoreML.Specification.SGDOptimizer.prototype.learningRate = null;
  8026. $root.CoreML.Specification.SGDOptimizer.prototype.miniBatchSize = null;
  8027. $root.CoreML.Specification.SGDOptimizer.prototype.momentum = null;
  8028. $root.CoreML.Specification.AdamOptimizer = class AdamOptimizer {
  8029. constructor() {
  8030. }
  8031. static decode(reader, length) {
  8032. const message = new $root.CoreML.Specification.AdamOptimizer();
  8033. const end = reader.next(length);
  8034. while (reader.end(end)) {
  8035. const tag = reader.uint32();
  8036. switch (tag >>> 3) {
  8037. case 1:
  8038. message.learningRate = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8039. break;
  8040. case 2:
  8041. message.miniBatchSize = $root.CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  8042. break;
  8043. case 3:
  8044. message.beta1 = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8045. break;
  8046. case 4:
  8047. message.beta2 = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8048. break;
  8049. case 5:
  8050. message.eps = $root.CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  8051. break;
  8052. default:
  8053. reader.skipType(tag & 7);
  8054. break;
  8055. }
  8056. }
  8057. return message;
  8058. }
  8059. };
  8060. $root.CoreML.Specification.AdamOptimizer.prototype.learningRate = null;
  8061. $root.CoreML.Specification.AdamOptimizer.prototype.miniBatchSize = null;
  8062. $root.CoreML.Specification.AdamOptimizer.prototype.beta1 = null;
  8063. $root.CoreML.Specification.AdamOptimizer.prototype.beta2 = null;
  8064. $root.CoreML.Specification.AdamOptimizer.prototype.eps = null;
  8065. $root.CoreML.Specification.Normalizer = class Normalizer {
  8066. constructor() {
  8067. }
  8068. static decode(reader, length) {
  8069. const message = new $root.CoreML.Specification.Normalizer();
  8070. const end = reader.next(length);
  8071. while (reader.end(end)) {
  8072. const tag = reader.uint32();
  8073. switch (tag >>> 3) {
  8074. case 1:
  8075. message.normType = reader.int32();
  8076. break;
  8077. default:
  8078. reader.skipType(tag & 7);
  8079. break;
  8080. }
  8081. }
  8082. return message;
  8083. }
  8084. };
  8085. $root.CoreML.Specification.Normalizer.prototype.normType = 0;
  8086. $root.CoreML.Specification.Normalizer.NormType = {
  8087. "LMax": 0,
  8088. "L1": 1,
  8089. "L2": 2
  8090. };
  8091. $root.CoreML.Specification.OneHotEncoder = class OneHotEncoder {
  8092. constructor() {
  8093. }
  8094. get CategoryType() {
  8095. $root.CoreML.Specification.OneHotEncoder.CategoryTypeSet = $root.CoreML.Specification.OneHotEncoder.CategoryTypeSet || new Set([ "stringCategories", "int64Categories"]);
  8096. return Object.keys(this).find((key) => $root.CoreML.Specification.OneHotEncoder.CategoryTypeSet.has(key) && this[key] != null);
  8097. }
  8098. static decode(reader, length) {
  8099. const message = new $root.CoreML.Specification.OneHotEncoder();
  8100. const end = reader.next(length);
  8101. while (reader.end(end)) {
  8102. const tag = reader.uint32();
  8103. switch (tag >>> 3) {
  8104. case 1:
  8105. message.stringCategories = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  8106. break;
  8107. case 2:
  8108. message.int64Categories = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  8109. break;
  8110. case 10:
  8111. message.outputSparse = reader.bool();
  8112. break;
  8113. case 11:
  8114. message.handleUnknown = reader.int32();
  8115. break;
  8116. default:
  8117. reader.skipType(tag & 7);
  8118. break;
  8119. }
  8120. }
  8121. return message;
  8122. }
  8123. };
  8124. $root.CoreML.Specification.OneHotEncoder.prototype.outputSparse = false;
  8125. $root.CoreML.Specification.OneHotEncoder.prototype.handleUnknown = 0;
  8126. $root.CoreML.Specification.OneHotEncoder.HandleUnknown = {
  8127. "ErrorOnUnknown": 0,
  8128. "IgnoreUnknown": 1
  8129. };
  8130. $root.CoreML.Specification.Scaler = class Scaler {
  8131. constructor() {
  8132. this.shiftValue = [];
  8133. this.scaleValue = [];
  8134. }
  8135. static decode(reader, length) {
  8136. const message = new $root.CoreML.Specification.Scaler();
  8137. const end = reader.next(length);
  8138. while (reader.end(end)) {
  8139. const tag = reader.uint32();
  8140. switch (tag >>> 3) {
  8141. case 1:
  8142. message.shiftValue = reader.doubles(message.shiftValue, tag);
  8143. break;
  8144. case 2:
  8145. message.scaleValue = reader.doubles(message.scaleValue, tag);
  8146. break;
  8147. default:
  8148. reader.skipType(tag & 7);
  8149. break;
  8150. }
  8151. }
  8152. return message;
  8153. }
  8154. };
  8155. $root.CoreML.Specification.NonMaximumSuppression = class NonMaximumSuppression {
  8156. constructor() {
  8157. }
  8158. get SuppressionMethod() {
  8159. $root.CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet = $root.CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet || new Set([ "pickTop"]);
  8160. return Object.keys(this).find((key) => $root.CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet.has(key) && this[key] != null);
  8161. }
  8162. get ClassLabels() {
  8163. $root.CoreML.Specification.NonMaximumSuppression.ClassLabelsSet = $root.CoreML.Specification.NonMaximumSuppression.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  8164. return Object.keys(this).find((key) => $root.CoreML.Specification.NonMaximumSuppression.ClassLabelsSet.has(key) && this[key] != null);
  8165. }
  8166. static decode(reader, length) {
  8167. const message = new $root.CoreML.Specification.NonMaximumSuppression();
  8168. const end = reader.next(length);
  8169. while (reader.end(end)) {
  8170. const tag = reader.uint32();
  8171. switch (tag >>> 3) {
  8172. case 1:
  8173. message.pickTop = $root.CoreML.Specification.NonMaximumSuppression.PickTop.decode(reader, reader.uint32());
  8174. break;
  8175. case 100:
  8176. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  8177. break;
  8178. case 101:
  8179. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  8180. break;
  8181. case 110:
  8182. message.iouThreshold = reader.double();
  8183. break;
  8184. case 111:
  8185. message.confidenceThreshold = reader.double();
  8186. break;
  8187. case 200:
  8188. message.confidenceInputFeatureName = reader.string();
  8189. break;
  8190. case 201:
  8191. message.coordinatesInputFeatureName = reader.string();
  8192. break;
  8193. case 202:
  8194. message.iouThresholdInputFeatureName = reader.string();
  8195. break;
  8196. case 203:
  8197. message.confidenceThresholdInputFeatureName = reader.string();
  8198. break;
  8199. case 210:
  8200. message.confidenceOutputFeatureName = reader.string();
  8201. break;
  8202. case 211:
  8203. message.coordinatesOutputFeatureName = reader.string();
  8204. break;
  8205. default:
  8206. reader.skipType(tag & 7);
  8207. break;
  8208. }
  8209. }
  8210. return message;
  8211. }
  8212. };
  8213. $root.CoreML.Specification.NonMaximumSuppression.prototype.iouThreshold = 0;
  8214. $root.CoreML.Specification.NonMaximumSuppression.prototype.confidenceThreshold = 0;
  8215. $root.CoreML.Specification.NonMaximumSuppression.prototype.confidenceInputFeatureName = "";
  8216. $root.CoreML.Specification.NonMaximumSuppression.prototype.coordinatesInputFeatureName = "";
  8217. $root.CoreML.Specification.NonMaximumSuppression.prototype.iouThresholdInputFeatureName = "";
  8218. $root.CoreML.Specification.NonMaximumSuppression.prototype.confidenceThresholdInputFeatureName = "";
  8219. $root.CoreML.Specification.NonMaximumSuppression.prototype.confidenceOutputFeatureName = "";
  8220. $root.CoreML.Specification.NonMaximumSuppression.prototype.coordinatesOutputFeatureName = "";
  8221. $root.CoreML.Specification.NonMaximumSuppression.PickTop = class PickTop {
  8222. constructor() {
  8223. }
  8224. static decode(reader, length) {
  8225. const message = new $root.CoreML.Specification.NonMaximumSuppression.PickTop();
  8226. const end = reader.next(length);
  8227. while (reader.end(end)) {
  8228. const tag = reader.uint32();
  8229. switch (tag >>> 3) {
  8230. case 1:
  8231. message.perClass = reader.bool();
  8232. break;
  8233. default:
  8234. reader.skipType(tag & 7);
  8235. break;
  8236. }
  8237. }
  8238. return message;
  8239. }
  8240. };
  8241. $root.CoreML.Specification.NonMaximumSuppression.PickTop.prototype.perClass = false;
  8242. $root.CoreML.Specification.LinearKernel = class LinearKernel {
  8243. constructor() {
  8244. }
  8245. static decode(reader, length) {
  8246. const message = new $root.CoreML.Specification.LinearKernel();
  8247. const end = reader.next(length);
  8248. while (reader.end(end)) {
  8249. const tag = reader.uint32();
  8250. switch (tag >>> 3) {
  8251. default:
  8252. reader.skipType(tag & 7);
  8253. break;
  8254. }
  8255. }
  8256. return message;
  8257. }
  8258. };
  8259. $root.CoreML.Specification.RBFKernel = class RBFKernel {
  8260. constructor() {
  8261. }
  8262. static decode(reader, length) {
  8263. const message = new $root.CoreML.Specification.RBFKernel();
  8264. const end = reader.next(length);
  8265. while (reader.end(end)) {
  8266. const tag = reader.uint32();
  8267. switch (tag >>> 3) {
  8268. case 1:
  8269. message.gamma = reader.double();
  8270. break;
  8271. default:
  8272. reader.skipType(tag & 7);
  8273. break;
  8274. }
  8275. }
  8276. return message;
  8277. }
  8278. };
  8279. $root.CoreML.Specification.RBFKernel.prototype.gamma = 0;
  8280. $root.CoreML.Specification.PolyKernel = class PolyKernel {
  8281. constructor() {
  8282. }
  8283. static decode(reader, length) {
  8284. const message = new $root.CoreML.Specification.PolyKernel();
  8285. const end = reader.next(length);
  8286. while (reader.end(end)) {
  8287. const tag = reader.uint32();
  8288. switch (tag >>> 3) {
  8289. case 1:
  8290. message.degree = reader.int32();
  8291. break;
  8292. case 2:
  8293. message.c = reader.double();
  8294. break;
  8295. case 3:
  8296. message.gamma = reader.double();
  8297. break;
  8298. default:
  8299. reader.skipType(tag & 7);
  8300. break;
  8301. }
  8302. }
  8303. return message;
  8304. }
  8305. };
  8306. $root.CoreML.Specification.PolyKernel.prototype.degree = 0;
  8307. $root.CoreML.Specification.PolyKernel.prototype.c = 0;
  8308. $root.CoreML.Specification.PolyKernel.prototype.gamma = 0;
  8309. $root.CoreML.Specification.SigmoidKernel = class SigmoidKernel {
  8310. constructor() {
  8311. }
  8312. static decode(reader, length) {
  8313. const message = new $root.CoreML.Specification.SigmoidKernel();
  8314. const end = reader.next(length);
  8315. while (reader.end(end)) {
  8316. const tag = reader.uint32();
  8317. switch (tag >>> 3) {
  8318. case 1:
  8319. message.gamma = reader.double();
  8320. break;
  8321. case 2:
  8322. message.c = reader.double();
  8323. break;
  8324. default:
  8325. reader.skipType(tag & 7);
  8326. break;
  8327. }
  8328. }
  8329. return message;
  8330. }
  8331. };
  8332. $root.CoreML.Specification.SigmoidKernel.prototype.gamma = 0;
  8333. $root.CoreML.Specification.SigmoidKernel.prototype.c = 0;
  8334. $root.CoreML.Specification.Kernel = class Kernel {
  8335. constructor() {
  8336. }
  8337. get kernel() {
  8338. $root.CoreML.Specification.Kernel.kernelSet = $root.CoreML.Specification.Kernel.kernelSet || new Set([ "linearKernel", "rbfKernel", "polyKernel", "sigmoidKernel"]);
  8339. return Object.keys(this).find((key) => $root.CoreML.Specification.Kernel.kernelSet.has(key) && this[key] != null);
  8340. }
  8341. static decode(reader, length) {
  8342. const message = new $root.CoreML.Specification.Kernel();
  8343. const end = reader.next(length);
  8344. while (reader.end(end)) {
  8345. const tag = reader.uint32();
  8346. switch (tag >>> 3) {
  8347. case 1:
  8348. message.linearKernel = $root.CoreML.Specification.LinearKernel.decode(reader, reader.uint32());
  8349. break;
  8350. case 2:
  8351. message.rbfKernel = $root.CoreML.Specification.RBFKernel.decode(reader, reader.uint32());
  8352. break;
  8353. case 3:
  8354. message.polyKernel = $root.CoreML.Specification.PolyKernel.decode(reader, reader.uint32());
  8355. break;
  8356. case 4:
  8357. message.sigmoidKernel = $root.CoreML.Specification.SigmoidKernel.decode(reader, reader.uint32());
  8358. break;
  8359. default:
  8360. reader.skipType(tag & 7);
  8361. break;
  8362. }
  8363. }
  8364. return message;
  8365. }
  8366. };
  8367. $root.CoreML.Specification.SparseNode = class SparseNode {
  8368. constructor() {
  8369. }
  8370. static decode(reader, length) {
  8371. const message = new $root.CoreML.Specification.SparseNode();
  8372. const end = reader.next(length);
  8373. while (reader.end(end)) {
  8374. const tag = reader.uint32();
  8375. switch (tag >>> 3) {
  8376. case 1:
  8377. message.index = reader.int32();
  8378. break;
  8379. case 2:
  8380. message.value = reader.double();
  8381. break;
  8382. default:
  8383. reader.skipType(tag & 7);
  8384. break;
  8385. }
  8386. }
  8387. return message;
  8388. }
  8389. };
  8390. $root.CoreML.Specification.SparseNode.prototype.index = 0;
  8391. $root.CoreML.Specification.SparseNode.prototype.value = 0;
  8392. $root.CoreML.Specification.SparseVector = class SparseVector {
  8393. constructor() {
  8394. this.nodes = [];
  8395. }
  8396. static decode(reader, length) {
  8397. const message = new $root.CoreML.Specification.SparseVector();
  8398. const end = reader.next(length);
  8399. while (reader.end(end)) {
  8400. const tag = reader.uint32();
  8401. switch (tag >>> 3) {
  8402. case 1:
  8403. message.nodes.push($root.CoreML.Specification.SparseNode.decode(reader, reader.uint32()));
  8404. break;
  8405. default:
  8406. reader.skipType(tag & 7);
  8407. break;
  8408. }
  8409. }
  8410. return message;
  8411. }
  8412. };
  8413. $root.CoreML.Specification.SparseSupportVectors = class SparseSupportVectors {
  8414. constructor() {
  8415. this.vectors = [];
  8416. }
  8417. static decode(reader, length) {
  8418. const message = new $root.CoreML.Specification.SparseSupportVectors();
  8419. const end = reader.next(length);
  8420. while (reader.end(end)) {
  8421. const tag = reader.uint32();
  8422. switch (tag >>> 3) {
  8423. case 1:
  8424. message.vectors.push($root.CoreML.Specification.SparseVector.decode(reader, reader.uint32()));
  8425. break;
  8426. default:
  8427. reader.skipType(tag & 7);
  8428. break;
  8429. }
  8430. }
  8431. return message;
  8432. }
  8433. };
  8434. $root.CoreML.Specification.DenseVector = class DenseVector {
  8435. constructor() {
  8436. this.values = [];
  8437. }
  8438. static decode(reader, length) {
  8439. const message = new $root.CoreML.Specification.DenseVector();
  8440. const end = reader.next(length);
  8441. while (reader.end(end)) {
  8442. const tag = reader.uint32();
  8443. switch (tag >>> 3) {
  8444. case 1:
  8445. message.values = reader.doubles(message.values, tag);
  8446. break;
  8447. default:
  8448. reader.skipType(tag & 7);
  8449. break;
  8450. }
  8451. }
  8452. return message;
  8453. }
  8454. };
  8455. $root.CoreML.Specification.DenseSupportVectors = class DenseSupportVectors {
  8456. constructor() {
  8457. this.vectors = [];
  8458. }
  8459. static decode(reader, length) {
  8460. const message = new $root.CoreML.Specification.DenseSupportVectors();
  8461. const end = reader.next(length);
  8462. while (reader.end(end)) {
  8463. const tag = reader.uint32();
  8464. switch (tag >>> 3) {
  8465. case 1:
  8466. message.vectors.push($root.CoreML.Specification.DenseVector.decode(reader, reader.uint32()));
  8467. break;
  8468. default:
  8469. reader.skipType(tag & 7);
  8470. break;
  8471. }
  8472. }
  8473. return message;
  8474. }
  8475. };
  8476. $root.CoreML.Specification.Coefficients = class Coefficients {
  8477. constructor() {
  8478. this.alpha = [];
  8479. }
  8480. static decode(reader, length) {
  8481. const message = new $root.CoreML.Specification.Coefficients();
  8482. const end = reader.next(length);
  8483. while (reader.end(end)) {
  8484. const tag = reader.uint32();
  8485. switch (tag >>> 3) {
  8486. case 1:
  8487. message.alpha = reader.doubles(message.alpha, tag);
  8488. break;
  8489. default:
  8490. reader.skipType(tag & 7);
  8491. break;
  8492. }
  8493. }
  8494. return message;
  8495. }
  8496. };
  8497. $root.CoreML.Specification.SupportVectorRegressor = class SupportVectorRegressor {
  8498. constructor() {
  8499. }
  8500. get supportVectors() {
  8501. $root.CoreML.Specification.SupportVectorRegressor.supportVectorsSet = $root.CoreML.Specification.SupportVectorRegressor.supportVectorsSet || new Set([ "sparseSupportVectors", "denseSupportVectors"]);
  8502. return Object.keys(this).find((key) => $root.CoreML.Specification.SupportVectorRegressor.supportVectorsSet.has(key) && this[key] != null);
  8503. }
  8504. static decode(reader, length) {
  8505. const message = new $root.CoreML.Specification.SupportVectorRegressor();
  8506. const end = reader.next(length);
  8507. while (reader.end(end)) {
  8508. const tag = reader.uint32();
  8509. switch (tag >>> 3) {
  8510. case 1:
  8511. message.kernel = $root.CoreML.Specification.Kernel.decode(reader, reader.uint32());
  8512. break;
  8513. case 2:
  8514. message.sparseSupportVectors = $root.CoreML.Specification.SparseSupportVectors.decode(reader, reader.uint32());
  8515. break;
  8516. case 3:
  8517. message.denseSupportVectors = $root.CoreML.Specification.DenseSupportVectors.decode(reader, reader.uint32());
  8518. break;
  8519. case 4:
  8520. message.coefficients = $root.CoreML.Specification.Coefficients.decode(reader, reader.uint32());
  8521. break;
  8522. case 5:
  8523. message.rho = reader.double();
  8524. break;
  8525. default:
  8526. reader.skipType(tag & 7);
  8527. break;
  8528. }
  8529. }
  8530. return message;
  8531. }
  8532. };
  8533. $root.CoreML.Specification.SupportVectorRegressor.prototype.kernel = null;
  8534. $root.CoreML.Specification.SupportVectorRegressor.prototype.coefficients = null;
  8535. $root.CoreML.Specification.SupportVectorRegressor.prototype.rho = 0;
  8536. $root.CoreML.Specification.SupportVectorClassifier = class SupportVectorClassifier {
  8537. constructor() {
  8538. this.numberOfSupportVectorsPerClass = [];
  8539. this.coefficients = [];
  8540. this.rho = [];
  8541. this.probA = [];
  8542. this.probB = [];
  8543. }
  8544. get supportVectors() {
  8545. $root.CoreML.Specification.SupportVectorClassifier.supportVectorsSet = $root.CoreML.Specification.SupportVectorClassifier.supportVectorsSet || new Set([ "sparseSupportVectors", "denseSupportVectors"]);
  8546. return Object.keys(this).find((key) => $root.CoreML.Specification.SupportVectorClassifier.supportVectorsSet.has(key) && this[key] != null);
  8547. }
  8548. get ClassLabels() {
  8549. $root.CoreML.Specification.SupportVectorClassifier.ClassLabelsSet = $root.CoreML.Specification.SupportVectorClassifier.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  8550. return Object.keys(this).find((key) => $root.CoreML.Specification.SupportVectorClassifier.ClassLabelsSet.has(key) && this[key] != null);
  8551. }
  8552. static decode(reader, length) {
  8553. const message = new $root.CoreML.Specification.SupportVectorClassifier();
  8554. const end = reader.next(length);
  8555. while (reader.end(end)) {
  8556. const tag = reader.uint32();
  8557. switch (tag >>> 3) {
  8558. case 1:
  8559. message.kernel = $root.CoreML.Specification.Kernel.decode(reader, reader.uint32());
  8560. break;
  8561. case 2:
  8562. message.numberOfSupportVectorsPerClass = reader.array(message.numberOfSupportVectorsPerClass, () => reader.int32(), tag);
  8563. break;
  8564. case 3:
  8565. message.sparseSupportVectors = $root.CoreML.Specification.SparseSupportVectors.decode(reader, reader.uint32());
  8566. break;
  8567. case 4:
  8568. message.denseSupportVectors = $root.CoreML.Specification.DenseSupportVectors.decode(reader, reader.uint32());
  8569. break;
  8570. case 5:
  8571. message.coefficients.push($root.CoreML.Specification.Coefficients.decode(reader, reader.uint32()));
  8572. break;
  8573. case 6:
  8574. message.rho = reader.doubles(message.rho, tag);
  8575. break;
  8576. case 7:
  8577. message.probA = reader.doubles(message.probA, tag);
  8578. break;
  8579. case 8:
  8580. message.probB = reader.doubles(message.probB, tag);
  8581. break;
  8582. case 100:
  8583. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  8584. break;
  8585. case 101:
  8586. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  8587. break;
  8588. default:
  8589. reader.skipType(tag & 7);
  8590. break;
  8591. }
  8592. }
  8593. return message;
  8594. }
  8595. };
  8596. $root.CoreML.Specification.SupportVectorClassifier.prototype.kernel = null;
  8597. $root.CoreML.Specification.TreeEnsemblePostEvaluationTransform = {
  8598. "NoTransform": 0,
  8599. "Classification_SoftMax": 1,
  8600. "Regression_Logistic": 2,
  8601. "Classification_SoftMaxWithZeroClassReference": 3
  8602. };
  8603. $root.CoreML.Specification.TreeEnsembleParameters = class TreeEnsembleParameters {
  8604. constructor() {
  8605. this.nodes = [];
  8606. this.basePredictionValue = [];
  8607. }
  8608. static decode(reader, length) {
  8609. const message = new $root.CoreML.Specification.TreeEnsembleParameters();
  8610. const end = reader.next(length);
  8611. while (reader.end(end)) {
  8612. const tag = reader.uint32();
  8613. switch (tag >>> 3) {
  8614. case 1:
  8615. message.nodes.push($root.CoreML.Specification.TreeEnsembleParameters.TreeNode.decode(reader, reader.uint32()));
  8616. break;
  8617. case 2:
  8618. message.numPredictionDimensions = reader.uint64();
  8619. break;
  8620. case 3:
  8621. message.basePredictionValue = reader.doubles(message.basePredictionValue, tag);
  8622. break;
  8623. default:
  8624. reader.skipType(tag & 7);
  8625. break;
  8626. }
  8627. }
  8628. return message;
  8629. }
  8630. };
  8631. $root.CoreML.Specification.TreeEnsembleParameters.prototype.numPredictionDimensions = protobuf.Uint64.create(0);
  8632. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode = class TreeNode {
  8633. constructor() {
  8634. this.evaluationInfo = [];
  8635. }
  8636. static decode(reader, length) {
  8637. const message = new $root.CoreML.Specification.TreeEnsembleParameters.TreeNode();
  8638. const end = reader.next(length);
  8639. while (reader.end(end)) {
  8640. const tag = reader.uint32();
  8641. switch (tag >>> 3) {
  8642. case 1:
  8643. message.treeId = reader.uint64();
  8644. break;
  8645. case 2:
  8646. message.nodeId = reader.uint64();
  8647. break;
  8648. case 3:
  8649. message.nodeBehavior = reader.int32();
  8650. break;
  8651. case 10:
  8652. message.branchFeatureIndex = reader.uint64();
  8653. break;
  8654. case 11:
  8655. message.branchFeatureValue = reader.double();
  8656. break;
  8657. case 12:
  8658. message.trueChildNodeId = reader.uint64();
  8659. break;
  8660. case 13:
  8661. message.falseChildNodeId = reader.uint64();
  8662. break;
  8663. case 14:
  8664. message.missingValueTracksTrueChild = reader.bool();
  8665. break;
  8666. case 20:
  8667. message.evaluationInfo.push($root.CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.decode(reader, reader.uint32()));
  8668. break;
  8669. case 30:
  8670. message.relativeHitRate = reader.double();
  8671. break;
  8672. default:
  8673. reader.skipType(tag & 7);
  8674. break;
  8675. }
  8676. }
  8677. return message;
  8678. }
  8679. };
  8680. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.treeId = protobuf.Uint64.create(0);
  8681. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.nodeId = protobuf.Uint64.create(0);
  8682. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.nodeBehavior = 0;
  8683. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.branchFeatureIndex = protobuf.Uint64.create(0);
  8684. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.branchFeatureValue = 0;
  8685. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.trueChildNodeId = protobuf.Uint64.create(0);
  8686. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.falseChildNodeId = protobuf.Uint64.create(0);
  8687. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.missingValueTracksTrueChild = false;
  8688. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.relativeHitRate = 0;
  8689. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.TreeNodeBehavior = {
  8690. "BranchOnValueLessThanEqual": 0,
  8691. "BranchOnValueLessThan": 1,
  8692. "BranchOnValueGreaterThanEqual": 2,
  8693. "BranchOnValueGreaterThan": 3,
  8694. "BranchOnValueEqual": 4,
  8695. "BranchOnValueNotEqual": 5,
  8696. "LeafNode": 6
  8697. };
  8698. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo = class EvaluationInfo {
  8699. constructor() {
  8700. }
  8701. static decode(reader, length) {
  8702. const message = new $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo();
  8703. const end = reader.next(length);
  8704. while (reader.end(end)) {
  8705. const tag = reader.uint32();
  8706. switch (tag >>> 3) {
  8707. case 1:
  8708. message.evaluationIndex = reader.uint64();
  8709. break;
  8710. case 2:
  8711. message.evaluationValue = reader.double();
  8712. break;
  8713. default:
  8714. reader.skipType(tag & 7);
  8715. break;
  8716. }
  8717. }
  8718. return message;
  8719. }
  8720. };
  8721. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.prototype.evaluationIndex = protobuf.Uint64.create(0);
  8722. $root.CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.prototype.evaluationValue = 0;
  8723. $root.CoreML.Specification.TreeEnsembleClassifier = class TreeEnsembleClassifier {
  8724. constructor() {
  8725. }
  8726. get ClassLabels() {
  8727. $root.CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet = $root.CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet || new Set([ "stringClassLabels", "int64ClassLabels"]);
  8728. return Object.keys(this).find((key) => $root.CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet.has(key) && this[key] != null);
  8729. }
  8730. static decode(reader, length) {
  8731. const message = new $root.CoreML.Specification.TreeEnsembleClassifier();
  8732. const end = reader.next(length);
  8733. while (reader.end(end)) {
  8734. const tag = reader.uint32();
  8735. switch (tag >>> 3) {
  8736. case 1:
  8737. message.treeEnsemble = $root.CoreML.Specification.TreeEnsembleParameters.decode(reader, reader.uint32());
  8738. break;
  8739. case 2:
  8740. message.postEvaluationTransform = reader.int32();
  8741. break;
  8742. case 100:
  8743. message.stringClassLabels = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  8744. break;
  8745. case 101:
  8746. message.int64ClassLabels = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  8747. break;
  8748. default:
  8749. reader.skipType(tag & 7);
  8750. break;
  8751. }
  8752. }
  8753. return message;
  8754. }
  8755. };
  8756. $root.CoreML.Specification.TreeEnsembleClassifier.prototype.treeEnsemble = null;
  8757. $root.CoreML.Specification.TreeEnsembleClassifier.prototype.postEvaluationTransform = 0;
  8758. $root.CoreML.Specification.TreeEnsembleRegressor = class TreeEnsembleRegressor {
  8759. constructor() {
  8760. }
  8761. static decode(reader, length) {
  8762. const message = new $root.CoreML.Specification.TreeEnsembleRegressor();
  8763. const end = reader.next(length);
  8764. while (reader.end(end)) {
  8765. const tag = reader.uint32();
  8766. switch (tag >>> 3) {
  8767. case 1:
  8768. message.treeEnsemble = $root.CoreML.Specification.TreeEnsembleParameters.decode(reader, reader.uint32());
  8769. break;
  8770. case 2:
  8771. message.postEvaluationTransform = reader.int32();
  8772. break;
  8773. default:
  8774. reader.skipType(tag & 7);
  8775. break;
  8776. }
  8777. }
  8778. return message;
  8779. }
  8780. };
  8781. $root.CoreML.Specification.TreeEnsembleRegressor.prototype.treeEnsemble = null;
  8782. $root.CoreML.Specification.TreeEnsembleRegressor.prototype.postEvaluationTransform = 0;
  8783. $root.CoreML.Specification.ItemSimilarityRecommender = class ItemSimilarityRecommender {
  8784. constructor() {
  8785. this.itemItemSimilarities = [];
  8786. }
  8787. static decode(reader, length) {
  8788. const message = new $root.CoreML.Specification.ItemSimilarityRecommender();
  8789. const end = reader.next(length);
  8790. while (reader.end(end)) {
  8791. const tag = reader.uint32();
  8792. switch (tag >>> 3) {
  8793. case 1:
  8794. message.itemItemSimilarities.push($root.CoreML.Specification.ItemSimilarityRecommender.SimilarItems.decode(reader, reader.uint32()));
  8795. break;
  8796. case 2:
  8797. message.itemStringIds = $root.CoreML.Specification.StringVector.decode(reader, reader.uint32());
  8798. break;
  8799. case 3:
  8800. message.itemInt64Ids = $root.CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  8801. break;
  8802. case 10:
  8803. message.itemInputFeatureName = reader.string();
  8804. break;
  8805. case 11:
  8806. message.numRecommendationsInputFeatureName = reader.string();
  8807. break;
  8808. case 12:
  8809. message.itemRestrictionInputFeatureName = reader.string();
  8810. break;
  8811. case 13:
  8812. message.itemExclusionInputFeatureName = reader.string();
  8813. break;
  8814. case 20:
  8815. message.recommendedItemListOutputFeatureName = reader.string();
  8816. break;
  8817. case 21:
  8818. message.recommendedItemScoreOutputFeatureName = reader.string();
  8819. break;
  8820. default:
  8821. reader.skipType(tag & 7);
  8822. break;
  8823. }
  8824. }
  8825. return message;
  8826. }
  8827. };
  8828. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.itemStringIds = null;
  8829. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.itemInt64Ids = null;
  8830. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.itemInputFeatureName = "";
  8831. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.numRecommendationsInputFeatureName = "";
  8832. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.itemRestrictionInputFeatureName = "";
  8833. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.itemExclusionInputFeatureName = "";
  8834. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.recommendedItemListOutputFeatureName = "";
  8835. $root.CoreML.Specification.ItemSimilarityRecommender.prototype.recommendedItemScoreOutputFeatureName = "";
  8836. $root.CoreML.Specification.ItemSimilarityRecommender.ConnectedItem = class ConnectedItem {
  8837. constructor() {
  8838. }
  8839. static decode(reader, length) {
  8840. const message = new $root.CoreML.Specification.ItemSimilarityRecommender.ConnectedItem();
  8841. const end = reader.next(length);
  8842. while (reader.end(end)) {
  8843. const tag = reader.uint32();
  8844. switch (tag >>> 3) {
  8845. case 1:
  8846. message.itemId = reader.uint64();
  8847. break;
  8848. case 2:
  8849. message.similarityScore = reader.double();
  8850. break;
  8851. default:
  8852. reader.skipType(tag & 7);
  8853. break;
  8854. }
  8855. }
  8856. return message;
  8857. }
  8858. };
  8859. $root.CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.prototype.itemId = protobuf.Uint64.create(0);
  8860. $root.CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.prototype.similarityScore = 0;
  8861. $root.CoreML.Specification.ItemSimilarityRecommender.SimilarItems = class SimilarItems {
  8862. constructor() {
  8863. this.similarItemList = [];
  8864. }
  8865. static decode(reader, length) {
  8866. const message = new $root.CoreML.Specification.ItemSimilarityRecommender.SimilarItems();
  8867. const end = reader.next(length);
  8868. while (reader.end(end)) {
  8869. const tag = reader.uint32();
  8870. switch (tag >>> 3) {
  8871. case 1:
  8872. message.itemId = reader.uint64();
  8873. break;
  8874. case 2:
  8875. message.similarItemList.push($root.CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.decode(reader, reader.uint32()));
  8876. break;
  8877. case 3:
  8878. message.itemScoreAdjustment = reader.double();
  8879. break;
  8880. default:
  8881. reader.skipType(tag & 7);
  8882. break;
  8883. }
  8884. }
  8885. return message;
  8886. }
  8887. };
  8888. $root.CoreML.Specification.ItemSimilarityRecommender.SimilarItems.prototype.itemId = protobuf.Uint64.create(0);
  8889. $root.CoreML.Specification.ItemSimilarityRecommender.SimilarItems.prototype.itemScoreAdjustment = 0;
  8890. $root.CoreML.Specification.LinkedModel = class LinkedModel {
  8891. constructor() {
  8892. }
  8893. get LinkType() {
  8894. $root.CoreML.Specification.LinkedModel.LinkTypeSet = $root.CoreML.Specification.LinkedModel.LinkTypeSet || new Set([ "linkedModelFile"]);
  8895. return Object.keys(this).find((key) => $root.CoreML.Specification.LinkedModel.LinkTypeSet.has(key) && this[key] != null);
  8896. }
  8897. static decode(reader, length) {
  8898. const message = new $root.CoreML.Specification.LinkedModel();
  8899. const end = reader.next(length);
  8900. while (reader.end(end)) {
  8901. const tag = reader.uint32();
  8902. switch (tag >>> 3) {
  8903. case 1:
  8904. message.linkedModelFile = $root.CoreML.Specification.LinkedModelFile.decode(reader, reader.uint32());
  8905. break;
  8906. default:
  8907. reader.skipType(tag & 7);
  8908. break;
  8909. }
  8910. }
  8911. return message;
  8912. }
  8913. };
  8914. $root.CoreML.Specification.LinkedModelFile = class LinkedModelFile {
  8915. constructor() {
  8916. }
  8917. static decode(reader, length) {
  8918. const message = new $root.CoreML.Specification.LinkedModelFile();
  8919. const end = reader.next(length);
  8920. while (reader.end(end)) {
  8921. const tag = reader.uint32();
  8922. switch (tag >>> 3) {
  8923. case 1:
  8924. message.linkedModelFileName = $root.CoreML.Specification.StringParameter.decode(reader, reader.uint32());
  8925. break;
  8926. case 2:
  8927. message.linkedModelSearchPath = $root.CoreML.Specification.StringParameter.decode(reader, reader.uint32());
  8928. break;
  8929. default:
  8930. reader.skipType(tag & 7);
  8931. break;
  8932. }
  8933. }
  8934. return message;
  8935. }
  8936. };
  8937. $root.CoreML.Specification.LinkedModelFile.prototype.linkedModelFileName = null;
  8938. $root.CoreML.Specification.LinkedModelFile.prototype.linkedModelSearchPath = null;