coreml-proto.js 665 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441
  1. export const CoreML = {};
  2. CoreML.Specification = {};
  3. CoreML.Specification.Pipeline = class Pipeline {
  4. constructor() {
  5. this.models = [];
  6. this.names = [];
  7. }
  8. static decode(reader, length) {
  9. const message = new CoreML.Specification.Pipeline();
  10. const end = length === undefined ? reader.length : reader.position + length;
  11. while (reader.position < end) {
  12. const tag = reader.uint32();
  13. switch (tag >>> 3) {
  14. case 1:
  15. message.models.push(CoreML.Specification.Model.decode(reader, reader.uint32()));
  16. break;
  17. case 2:
  18. message.names.push(reader.string());
  19. break;
  20. default:
  21. reader.skipType(tag & 7);
  22. break;
  23. }
  24. }
  25. return message;
  26. }
  27. static decodeText(reader) {
  28. const message = new CoreML.Specification.Pipeline();
  29. reader.start();
  30. while (!reader.end()) {
  31. const tag = reader.tag();
  32. switch (tag) {
  33. case "models":
  34. message.models.push(CoreML.Specification.Model.decodeText(reader));
  35. break;
  36. case "names":
  37. reader.array(message.names, () => reader.string());
  38. break;
  39. default:
  40. reader.field(tag, message);
  41. break;
  42. }
  43. }
  44. return message;
  45. }
  46. };
  47. CoreML.Specification.PipelineClassifier = class PipelineClassifier {
  48. static decode(reader, length) {
  49. const message = new CoreML.Specification.PipelineClassifier();
  50. const end = length === undefined ? reader.length : reader.position + length;
  51. while (reader.position < end) {
  52. const tag = reader.uint32();
  53. switch (tag >>> 3) {
  54. case 1:
  55. message.pipeline = CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  56. break;
  57. default:
  58. reader.skipType(tag & 7);
  59. break;
  60. }
  61. }
  62. return message;
  63. }
  64. static decodeText(reader) {
  65. const message = new CoreML.Specification.PipelineClassifier();
  66. reader.start();
  67. while (!reader.end()) {
  68. const tag = reader.tag();
  69. switch (tag) {
  70. case "pipeline":
  71. message.pipeline = CoreML.Specification.Pipeline.decodeText(reader);
  72. break;
  73. default:
  74. reader.field(tag, message);
  75. break;
  76. }
  77. }
  78. return message;
  79. }
  80. };
  81. CoreML.Specification.PipelineClassifier.prototype.pipeline = null;
  82. CoreML.Specification.PipelineRegressor = class PipelineRegressor {
  83. static decode(reader, length) {
  84. const message = new CoreML.Specification.PipelineRegressor();
  85. const end = length === undefined ? reader.length : reader.position + length;
  86. while (reader.position < end) {
  87. const tag = reader.uint32();
  88. switch (tag >>> 3) {
  89. case 1:
  90. message.pipeline = CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  91. break;
  92. default:
  93. reader.skipType(tag & 7);
  94. break;
  95. }
  96. }
  97. return message;
  98. }
  99. static decodeText(reader) {
  100. const message = new CoreML.Specification.PipelineRegressor();
  101. reader.start();
  102. while (!reader.end()) {
  103. const tag = reader.tag();
  104. switch (tag) {
  105. case "pipeline":
  106. message.pipeline = CoreML.Specification.Pipeline.decodeText(reader);
  107. break;
  108. default:
  109. reader.field(tag, message);
  110. break;
  111. }
  112. }
  113. return message;
  114. }
  115. };
  116. CoreML.Specification.PipelineRegressor.prototype.pipeline = null;
  117. CoreML.Specification.FeatureDescription = class FeatureDescription {
  118. static decode(reader, length) {
  119. const message = new CoreML.Specification.FeatureDescription();
  120. const end = length === undefined ? reader.length : reader.position + length;
  121. while (reader.position < end) {
  122. const tag = reader.uint32();
  123. switch (tag >>> 3) {
  124. case 1:
  125. message.name = reader.string();
  126. break;
  127. case 2:
  128. message.shortDescription = reader.string();
  129. break;
  130. case 3:
  131. message.type = CoreML.Specification.FeatureType.decode(reader, reader.uint32());
  132. break;
  133. default:
  134. reader.skipType(tag & 7);
  135. break;
  136. }
  137. }
  138. return message;
  139. }
  140. static decodeText(reader) {
  141. const message = new CoreML.Specification.FeatureDescription();
  142. reader.start();
  143. while (!reader.end()) {
  144. const tag = reader.tag();
  145. switch (tag) {
  146. case "name":
  147. message.name = reader.string();
  148. break;
  149. case "shortDescription":
  150. message.shortDescription = reader.string();
  151. break;
  152. case "type":
  153. message.type = CoreML.Specification.FeatureType.decodeText(reader);
  154. break;
  155. default:
  156. reader.field(tag, message);
  157. break;
  158. }
  159. }
  160. return message;
  161. }
  162. };
  163. CoreML.Specification.FeatureDescription.prototype.name = "";
  164. CoreML.Specification.FeatureDescription.prototype.shortDescription = "";
  165. CoreML.Specification.FeatureDescription.prototype.type = null;
  166. CoreML.Specification.Metadata = class Metadata {
  167. constructor() {
  168. this.userDefined = {};
  169. }
  170. static decode(reader, length) {
  171. const message = new CoreML.Specification.Metadata();
  172. const end = length === undefined ? reader.length : reader.position + length;
  173. while (reader.position < end) {
  174. const tag = reader.uint32();
  175. switch (tag >>> 3) {
  176. case 1:
  177. message.shortDescription = reader.string();
  178. break;
  179. case 2:
  180. message.versionString = reader.string();
  181. break;
  182. case 3:
  183. message.author = reader.string();
  184. break;
  185. case 4:
  186. message.license = reader.string();
  187. break;
  188. case 100:
  189. reader.entry(message.userDefined, () => reader.string(), () => reader.string());
  190. break;
  191. default:
  192. reader.skipType(tag & 7);
  193. break;
  194. }
  195. }
  196. return message;
  197. }
  198. static decodeText(reader) {
  199. const message = new CoreML.Specification.Metadata();
  200. reader.start();
  201. while (!reader.end()) {
  202. const tag = reader.tag();
  203. switch (tag) {
  204. case "shortDescription":
  205. message.shortDescription = reader.string();
  206. break;
  207. case "versionString":
  208. message.versionString = reader.string();
  209. break;
  210. case "author":
  211. message.author = reader.string();
  212. break;
  213. case "license":
  214. message.license = reader.string();
  215. break;
  216. case "userDefined":
  217. reader.entry(message.userDefined, () => reader.string(), () => reader.string());
  218. break;
  219. default:
  220. reader.field(tag, message);
  221. break;
  222. }
  223. }
  224. return message;
  225. }
  226. };
  227. CoreML.Specification.Metadata.prototype.shortDescription = "";
  228. CoreML.Specification.Metadata.prototype.versionString = "";
  229. CoreML.Specification.Metadata.prototype.author = "";
  230. CoreML.Specification.Metadata.prototype.license = "";
  231. CoreML.Specification.FunctionDescription = class FunctionDescription {
  232. constructor() {
  233. this.input = [];
  234. this.output = [];
  235. this.state = [];
  236. }
  237. static decode(reader, length) {
  238. const message = new CoreML.Specification.FunctionDescription();
  239. const end = length === undefined ? reader.length : reader.position + length;
  240. while (reader.position < end) {
  241. const tag = reader.uint32();
  242. switch (tag >>> 3) {
  243. case 1:
  244. message.name = reader.string();
  245. break;
  246. case 2:
  247. message.input.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  248. break;
  249. case 3:
  250. message.output.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  251. break;
  252. case 6:
  253. message.state.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  254. break;
  255. case 4:
  256. message.predictedFeatureName = reader.string();
  257. break;
  258. case 5:
  259. message.predictedProbabilitiesName = reader.string();
  260. break;
  261. default:
  262. reader.skipType(tag & 7);
  263. break;
  264. }
  265. }
  266. return message;
  267. }
  268. static decodeText(reader) {
  269. const message = new CoreML.Specification.FunctionDescription();
  270. reader.start();
  271. while (!reader.end()) {
  272. const tag = reader.tag();
  273. switch (tag) {
  274. case "name":
  275. message.name = reader.string();
  276. break;
  277. case "input":
  278. message.input.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  279. break;
  280. case "output":
  281. message.output.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  282. break;
  283. case "state":
  284. message.state.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  285. break;
  286. case "predictedFeatureName":
  287. message.predictedFeatureName = reader.string();
  288. break;
  289. case "predictedProbabilitiesName":
  290. message.predictedProbabilitiesName = reader.string();
  291. break;
  292. default:
  293. reader.field(tag, message);
  294. break;
  295. }
  296. }
  297. return message;
  298. }
  299. };
  300. CoreML.Specification.FunctionDescription.prototype.name = "";
  301. CoreML.Specification.FunctionDescription.prototype.predictedFeatureName = "";
  302. CoreML.Specification.FunctionDescription.prototype.predictedProbabilitiesName = "";
  303. CoreML.Specification.ModelDescription = class ModelDescription {
  304. constructor() {
  305. this.functions = [];
  306. this.input = [];
  307. this.output = [];
  308. this.state = [];
  309. this.trainingInput = [];
  310. }
  311. static decode(reader, length) {
  312. const message = new CoreML.Specification.ModelDescription();
  313. const end = length === undefined ? reader.length : reader.position + length;
  314. while (reader.position < end) {
  315. const tag = reader.uint32();
  316. switch (tag >>> 3) {
  317. case 20:
  318. message.functions.push(CoreML.Specification.FunctionDescription.decode(reader, reader.uint32()));
  319. break;
  320. case 21:
  321. message.defaultFunctionName = reader.string();
  322. break;
  323. case 100:
  324. message.metadata = CoreML.Specification.Metadata.decode(reader, reader.uint32());
  325. break;
  326. case 1:
  327. message.input.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  328. break;
  329. case 10:
  330. message.output.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  331. break;
  332. case 13:
  333. message.state.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  334. break;
  335. case 11:
  336. message.predictedFeatureName = reader.string();
  337. break;
  338. case 12:
  339. message.predictedProbabilitiesName = reader.string();
  340. break;
  341. case 50:
  342. message.trainingInput.push(CoreML.Specification.FeatureDescription.decode(reader, reader.uint32()));
  343. break;
  344. default:
  345. reader.skipType(tag & 7);
  346. break;
  347. }
  348. }
  349. return message;
  350. }
  351. static decodeText(reader) {
  352. const message = new CoreML.Specification.ModelDescription();
  353. reader.start();
  354. while (!reader.end()) {
  355. const tag = reader.tag();
  356. switch (tag) {
  357. case "functions":
  358. message.functions.push(CoreML.Specification.FunctionDescription.decodeText(reader));
  359. break;
  360. case "defaultFunctionName":
  361. message.defaultFunctionName = reader.string();
  362. break;
  363. case "metadata":
  364. message.metadata = CoreML.Specification.Metadata.decodeText(reader);
  365. break;
  366. case "input":
  367. message.input.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  368. break;
  369. case "output":
  370. message.output.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  371. break;
  372. case "state":
  373. message.state.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  374. break;
  375. case "predictedFeatureName":
  376. message.predictedFeatureName = reader.string();
  377. break;
  378. case "predictedProbabilitiesName":
  379. message.predictedProbabilitiesName = reader.string();
  380. break;
  381. case "trainingInput":
  382. message.trainingInput.push(CoreML.Specification.FeatureDescription.decodeText(reader));
  383. break;
  384. default:
  385. reader.field(tag, message);
  386. break;
  387. }
  388. }
  389. return message;
  390. }
  391. };
  392. CoreML.Specification.ModelDescription.prototype.defaultFunctionName = "";
  393. CoreML.Specification.ModelDescription.prototype.metadata = null;
  394. CoreML.Specification.ModelDescription.prototype.predictedFeatureName = "";
  395. CoreML.Specification.ModelDescription.prototype.predictedProbabilitiesName = "";
  396. CoreML.Specification.SerializedModel = class SerializedModel {
  397. static decode(reader, length) {
  398. const message = new CoreML.Specification.SerializedModel();
  399. const end = length === undefined ? reader.length : reader.position + length;
  400. while (reader.position < end) {
  401. const tag = reader.uint32();
  402. switch (tag >>> 3) {
  403. case 1:
  404. message.identifier = reader.string();
  405. break;
  406. case 2:
  407. message.model = reader.bytes();
  408. break;
  409. default:
  410. reader.skipType(tag & 7);
  411. break;
  412. }
  413. }
  414. return message;
  415. }
  416. static decodeText(reader) {
  417. const message = new CoreML.Specification.SerializedModel();
  418. reader.start();
  419. while (!reader.end()) {
  420. const tag = reader.tag();
  421. switch (tag) {
  422. case "identifier":
  423. message.identifier = reader.string();
  424. break;
  425. case "model":
  426. message.model = reader.bytes();
  427. break;
  428. default:
  429. reader.field(tag, message);
  430. break;
  431. }
  432. }
  433. return message;
  434. }
  435. };
  436. CoreML.Specification.SerializedModel.prototype.identifier = "";
  437. CoreML.Specification.SerializedModel.prototype.model = new Uint8Array([]);
  438. CoreML.Specification.Model = class Model {
  439. get Type() {
  440. CoreML.Specification.Model.TypeSet = CoreML.Specification.Model.TypeSet || new Set(["pipelineClassifier", "pipelineRegressor", "pipeline", "glmRegressor", "supportVectorRegressor", "treeEnsembleRegressor", "neuralNetworkRegressor", "bayesianProbitRegressor", "glmClassifier", "supportVectorClassifier", "treeEnsembleClassifier", "neuralNetworkClassifier", "kNearestNeighborsClassifier", "neuralNetwork", "itemSimilarityRecommender", "mlProgram", "customModel", "linkedModel", "classConfidenceThresholding", "oneHotEncoder", "imputer", "featureVectorizer", "dictVectorizer", "scaler", "categoricalMapping", "normalizer", "arrayFeatureExtractor", "nonMaximumSuppression", "identity", "textClassifier", "wordTagger", "visionFeaturePrint", "soundAnalysisPreprocessing", "gazetteer", "wordEmbedding", "audioFeaturePrint", "serializedModel"]);
  441. return Object.keys(this).find((key) => CoreML.Specification.Model.TypeSet.has(key) && this[key] !== null);
  442. }
  443. static decode(reader, length) {
  444. const message = new CoreML.Specification.Model();
  445. const end = length === undefined ? reader.length : reader.position + length;
  446. while (reader.position < end) {
  447. const tag = reader.uint32();
  448. switch (tag >>> 3) {
  449. case 1:
  450. message.specificationVersion = reader.int32();
  451. break;
  452. case 2:
  453. message.description = CoreML.Specification.ModelDescription.decode(reader, reader.uint32());
  454. break;
  455. case 10:
  456. message.isUpdatable = reader.bool();
  457. break;
  458. case 200:
  459. message.pipelineClassifier = CoreML.Specification.PipelineClassifier.decode(reader, reader.uint32());
  460. break;
  461. case 201:
  462. message.pipelineRegressor = CoreML.Specification.PipelineRegressor.decode(reader, reader.uint32());
  463. break;
  464. case 202:
  465. message.pipeline = CoreML.Specification.Pipeline.decode(reader, reader.uint32());
  466. break;
  467. case 300:
  468. message.glmRegressor = CoreML.Specification.GLMRegressor.decode(reader, reader.uint32());
  469. break;
  470. case 301:
  471. message.supportVectorRegressor = CoreML.Specification.SupportVectorRegressor.decode(reader, reader.uint32());
  472. break;
  473. case 302:
  474. message.treeEnsembleRegressor = CoreML.Specification.TreeEnsembleRegressor.decode(reader, reader.uint32());
  475. break;
  476. case 303:
  477. message.neuralNetworkRegressor = CoreML.Specification.NeuralNetworkRegressor.decode(reader, reader.uint32());
  478. break;
  479. case 304:
  480. message.bayesianProbitRegressor = CoreML.Specification.BayesianProbitRegressor.decode(reader, reader.uint32());
  481. break;
  482. case 400:
  483. message.glmClassifier = CoreML.Specification.GLMClassifier.decode(reader, reader.uint32());
  484. break;
  485. case 401:
  486. message.supportVectorClassifier = CoreML.Specification.SupportVectorClassifier.decode(reader, reader.uint32());
  487. break;
  488. case 402:
  489. message.treeEnsembleClassifier = CoreML.Specification.TreeEnsembleClassifier.decode(reader, reader.uint32());
  490. break;
  491. case 403:
  492. message.neuralNetworkClassifier = CoreML.Specification.NeuralNetworkClassifier.decode(reader, reader.uint32());
  493. break;
  494. case 404:
  495. message.kNearestNeighborsClassifier = CoreML.Specification.KNearestNeighborsClassifier.decode(reader, reader.uint32());
  496. break;
  497. case 500:
  498. message.neuralNetwork = CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  499. break;
  500. case 501:
  501. message.itemSimilarityRecommender = CoreML.Specification.ItemSimilarityRecommender.decode(reader, reader.uint32());
  502. break;
  503. case 502:
  504. message.mlProgram = CoreML.Specification.MILSpec.Program.decode(reader, reader.uint32());
  505. break;
  506. case 555:
  507. message.customModel = CoreML.Specification.CustomModel.decode(reader, reader.uint32());
  508. break;
  509. case 556:
  510. message.linkedModel = CoreML.Specification.LinkedModel.decode(reader, reader.uint32());
  511. break;
  512. case 560:
  513. message.classConfidenceThresholding = CoreML.Specification.ClassConfidenceThresholding.decode(reader, reader.uint32());
  514. break;
  515. case 600:
  516. message.oneHotEncoder = CoreML.Specification.OneHotEncoder.decode(reader, reader.uint32());
  517. break;
  518. case 601:
  519. message.imputer = CoreML.Specification.Imputer.decode(reader, reader.uint32());
  520. break;
  521. case 602:
  522. message.featureVectorizer = CoreML.Specification.FeatureVectorizer.decode(reader, reader.uint32());
  523. break;
  524. case 603:
  525. message.dictVectorizer = CoreML.Specification.DictVectorizer.decode(reader, reader.uint32());
  526. break;
  527. case 604:
  528. message.scaler = CoreML.Specification.Scaler.decode(reader, reader.uint32());
  529. break;
  530. case 606:
  531. message.categoricalMapping = CoreML.Specification.CategoricalMapping.decode(reader, reader.uint32());
  532. break;
  533. case 607:
  534. message.normalizer = CoreML.Specification.Normalizer.decode(reader, reader.uint32());
  535. break;
  536. case 609:
  537. message.arrayFeatureExtractor = CoreML.Specification.ArrayFeatureExtractor.decode(reader, reader.uint32());
  538. break;
  539. case 610:
  540. message.nonMaximumSuppression = CoreML.Specification.NonMaximumSuppression.decode(reader, reader.uint32());
  541. break;
  542. case 900:
  543. message.identity = CoreML.Specification.Identity.decode(reader, reader.uint32());
  544. break;
  545. case 2000:
  546. message.textClassifier = CoreML.Specification.CoreMLModels.TextClassifier.decode(reader, reader.uint32());
  547. break;
  548. case 2001:
  549. message.wordTagger = CoreML.Specification.CoreMLModels.WordTagger.decode(reader, reader.uint32());
  550. break;
  551. case 2002:
  552. message.visionFeaturePrint = CoreML.Specification.CoreMLModels.VisionFeaturePrint.decode(reader, reader.uint32());
  553. break;
  554. case 2003:
  555. message.soundAnalysisPreprocessing = CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.decode(reader, reader.uint32());
  556. break;
  557. case 2004:
  558. message.gazetteer = CoreML.Specification.CoreMLModels.Gazetteer.decode(reader, reader.uint32());
  559. break;
  560. case 2005:
  561. message.wordEmbedding = CoreML.Specification.CoreMLModels.WordEmbedding.decode(reader, reader.uint32());
  562. break;
  563. case 2006:
  564. message.audioFeaturePrint = CoreML.Specification.CoreMLModels.AudioFeaturePrint.decode(reader, reader.uint32());
  565. break;
  566. case 3000:
  567. message.serializedModel = CoreML.Specification.SerializedModel.decode(reader, reader.uint32());
  568. break;
  569. default:
  570. reader.skipType(tag & 7);
  571. break;
  572. }
  573. }
  574. return message;
  575. }
  576. static decodeText(reader) {
  577. const message = new CoreML.Specification.Model();
  578. reader.start();
  579. while (!reader.end()) {
  580. const tag = reader.tag();
  581. switch (tag) {
  582. case "specificationVersion":
  583. message.specificationVersion = reader.int32();
  584. break;
  585. case "description":
  586. message.description = CoreML.Specification.ModelDescription.decodeText(reader);
  587. break;
  588. case "isUpdatable":
  589. message.isUpdatable = reader.bool();
  590. break;
  591. case "pipelineClassifier":
  592. message.pipelineClassifier = CoreML.Specification.PipelineClassifier.decodeText(reader);
  593. break;
  594. case "pipelineRegressor":
  595. message.pipelineRegressor = CoreML.Specification.PipelineRegressor.decodeText(reader);
  596. break;
  597. case "pipeline":
  598. message.pipeline = CoreML.Specification.Pipeline.decodeText(reader);
  599. break;
  600. case "glmRegressor":
  601. message.glmRegressor = CoreML.Specification.GLMRegressor.decodeText(reader);
  602. break;
  603. case "supportVectorRegressor":
  604. message.supportVectorRegressor = CoreML.Specification.SupportVectorRegressor.decodeText(reader);
  605. break;
  606. case "treeEnsembleRegressor":
  607. message.treeEnsembleRegressor = CoreML.Specification.TreeEnsembleRegressor.decodeText(reader);
  608. break;
  609. case "neuralNetworkRegressor":
  610. message.neuralNetworkRegressor = CoreML.Specification.NeuralNetworkRegressor.decodeText(reader);
  611. break;
  612. case "bayesianProbitRegressor":
  613. message.bayesianProbitRegressor = CoreML.Specification.BayesianProbitRegressor.decodeText(reader);
  614. break;
  615. case "glmClassifier":
  616. message.glmClassifier = CoreML.Specification.GLMClassifier.decodeText(reader);
  617. break;
  618. case "supportVectorClassifier":
  619. message.supportVectorClassifier = CoreML.Specification.SupportVectorClassifier.decodeText(reader);
  620. break;
  621. case "treeEnsembleClassifier":
  622. message.treeEnsembleClassifier = CoreML.Specification.TreeEnsembleClassifier.decodeText(reader);
  623. break;
  624. case "neuralNetworkClassifier":
  625. message.neuralNetworkClassifier = CoreML.Specification.NeuralNetworkClassifier.decodeText(reader);
  626. break;
  627. case "kNearestNeighborsClassifier":
  628. message.kNearestNeighborsClassifier = CoreML.Specification.KNearestNeighborsClassifier.decodeText(reader);
  629. break;
  630. case "neuralNetwork":
  631. message.neuralNetwork = CoreML.Specification.NeuralNetwork.decodeText(reader);
  632. break;
  633. case "itemSimilarityRecommender":
  634. message.itemSimilarityRecommender = CoreML.Specification.ItemSimilarityRecommender.decodeText(reader);
  635. break;
  636. case "mlProgram":
  637. message.mlProgram = CoreML.Specification.MILSpec.Program.decodeText(reader);
  638. break;
  639. case "customModel":
  640. message.customModel = CoreML.Specification.CustomModel.decodeText(reader);
  641. break;
  642. case "linkedModel":
  643. message.linkedModel = CoreML.Specification.LinkedModel.decodeText(reader);
  644. break;
  645. case "classConfidenceThresholding":
  646. message.classConfidenceThresholding = CoreML.Specification.ClassConfidenceThresholding.decodeText(reader);
  647. break;
  648. case "oneHotEncoder":
  649. message.oneHotEncoder = CoreML.Specification.OneHotEncoder.decodeText(reader);
  650. break;
  651. case "imputer":
  652. message.imputer = CoreML.Specification.Imputer.decodeText(reader);
  653. break;
  654. case "featureVectorizer":
  655. message.featureVectorizer = CoreML.Specification.FeatureVectorizer.decodeText(reader);
  656. break;
  657. case "dictVectorizer":
  658. message.dictVectorizer = CoreML.Specification.DictVectorizer.decodeText(reader);
  659. break;
  660. case "scaler":
  661. message.scaler = CoreML.Specification.Scaler.decodeText(reader);
  662. break;
  663. case "categoricalMapping":
  664. message.categoricalMapping = CoreML.Specification.CategoricalMapping.decodeText(reader);
  665. break;
  666. case "normalizer":
  667. message.normalizer = CoreML.Specification.Normalizer.decodeText(reader);
  668. break;
  669. case "arrayFeatureExtractor":
  670. message.arrayFeatureExtractor = CoreML.Specification.ArrayFeatureExtractor.decodeText(reader);
  671. break;
  672. case "nonMaximumSuppression":
  673. message.nonMaximumSuppression = CoreML.Specification.NonMaximumSuppression.decodeText(reader);
  674. break;
  675. case "identity":
  676. message.identity = CoreML.Specification.Identity.decodeText(reader);
  677. break;
  678. case "textClassifier":
  679. message.textClassifier = CoreML.Specification.CoreMLModels.TextClassifier.decodeText(reader);
  680. break;
  681. case "wordTagger":
  682. message.wordTagger = CoreML.Specification.CoreMLModels.WordTagger.decodeText(reader);
  683. break;
  684. case "visionFeaturePrint":
  685. message.visionFeaturePrint = CoreML.Specification.CoreMLModels.VisionFeaturePrint.decodeText(reader);
  686. break;
  687. case "soundAnalysisPreprocessing":
  688. message.soundAnalysisPreprocessing = CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.decodeText(reader);
  689. break;
  690. case "gazetteer":
  691. message.gazetteer = CoreML.Specification.CoreMLModels.Gazetteer.decodeText(reader);
  692. break;
  693. case "wordEmbedding":
  694. message.wordEmbedding = CoreML.Specification.CoreMLModels.WordEmbedding.decodeText(reader);
  695. break;
  696. case "audioFeaturePrint":
  697. message.audioFeaturePrint = CoreML.Specification.CoreMLModels.AudioFeaturePrint.decodeText(reader);
  698. break;
  699. case "serializedModel":
  700. message.serializedModel = CoreML.Specification.SerializedModel.decodeText(reader);
  701. break;
  702. default:
  703. reader.field(tag, message);
  704. break;
  705. }
  706. }
  707. return message;
  708. }
  709. };
  710. CoreML.Specification.Model.prototype.specificationVersion = 0;
  711. CoreML.Specification.Model.prototype.description = null;
  712. CoreML.Specification.Model.prototype.isUpdatable = false;
  713. CoreML.Specification.CoreMLModels = {};
  714. CoreML.Specification.CoreMLModels.VisionFeaturePrint = class VisionFeaturePrint {
  715. get VisionFeaturePrintType() {
  716. CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet = CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet || new Set(["scene", "objects"]);
  717. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.VisionFeaturePrint.VisionFeaturePrintTypeSet.has(key) && this[key] !== null);
  718. }
  719. static decode(reader, length) {
  720. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint();
  721. const end = length === undefined ? reader.length : reader.position + length;
  722. while (reader.position < end) {
  723. const tag = reader.uint32();
  724. switch (tag >>> 3) {
  725. case 20:
  726. message.scene = CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.decode(reader, reader.uint32());
  727. break;
  728. case 21:
  729. message.objects = CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.decode(reader, reader.uint32());
  730. break;
  731. default:
  732. reader.skipType(tag & 7);
  733. break;
  734. }
  735. }
  736. return message;
  737. }
  738. static decodeText(reader) {
  739. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint();
  740. reader.start();
  741. while (!reader.end()) {
  742. const tag = reader.tag();
  743. switch (tag) {
  744. case "scene":
  745. message.scene = CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.decodeText(reader);
  746. break;
  747. case "objects":
  748. message.objects = CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.decodeText(reader);
  749. break;
  750. default:
  751. reader.field(tag, message);
  752. break;
  753. }
  754. }
  755. return message;
  756. }
  757. };
  758. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene = class Scene {
  759. static decode(reader, length) {
  760. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene();
  761. const end = length === undefined ? reader.length : reader.position + length;
  762. while (reader.position < end) {
  763. const tag = reader.uint32();
  764. switch (tag >>> 3) {
  765. case 1:
  766. message.version = reader.int32();
  767. break;
  768. default:
  769. reader.skipType(tag & 7);
  770. break;
  771. }
  772. }
  773. return message;
  774. }
  775. static decodeText(reader) {
  776. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene();
  777. reader.start();
  778. while (!reader.end()) {
  779. const tag = reader.tag();
  780. switch (tag) {
  781. case "version":
  782. message.version = reader.enum(CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.SceneVersion);
  783. break;
  784. default:
  785. reader.field(tag, message);
  786. break;
  787. }
  788. }
  789. return message;
  790. }
  791. };
  792. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.prototype.version = 0;
  793. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Scene.SceneVersion = {
  794. "SCENE_VERSION_INVALID": 0,
  795. "SCENE_VERSION_1": 1,
  796. "SCENE_VERSION_2": 2
  797. };
  798. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects = class Objects {
  799. constructor() {
  800. this.output = [];
  801. }
  802. static decode(reader, length) {
  803. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects();
  804. const end = length === undefined ? reader.length : reader.position + length;
  805. while (reader.position < end) {
  806. const tag = reader.uint32();
  807. switch (tag >>> 3) {
  808. case 1:
  809. message.version = reader.int32();
  810. break;
  811. case 100:
  812. message.output.push(reader.string());
  813. break;
  814. default:
  815. reader.skipType(tag & 7);
  816. break;
  817. }
  818. }
  819. return message;
  820. }
  821. static decodeText(reader) {
  822. const message = new CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects();
  823. reader.start();
  824. while (!reader.end()) {
  825. const tag = reader.tag();
  826. switch (tag) {
  827. case "version":
  828. message.version = reader.enum(CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.ObjectsVersion);
  829. break;
  830. case "output":
  831. reader.array(message.output, () => reader.string());
  832. break;
  833. default:
  834. reader.field(tag, message);
  835. break;
  836. }
  837. }
  838. return message;
  839. }
  840. };
  841. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.prototype.version = 0;
  842. CoreML.Specification.CoreMLModels.VisionFeaturePrint.Objects.ObjectsVersion = {
  843. "OBJECTS_VERSION_INVALID": 0,
  844. "OBJECTS_VERSION_1": 1
  845. };
  846. CoreML.Specification.CoreMLModels.AudioFeaturePrint = class AudioFeaturePrint {
  847. get AudioFeaturePrintType() {
  848. CoreML.Specification.CoreMLModels.AudioFeaturePrint.AudioFeaturePrintTypeSet = CoreML.Specification.CoreMLModels.AudioFeaturePrint.AudioFeaturePrintTypeSet || new Set(["sound"]);
  849. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.AudioFeaturePrint.AudioFeaturePrintTypeSet.has(key) && this[key] !== null);
  850. }
  851. static decode(reader, length) {
  852. const message = new CoreML.Specification.CoreMLModels.AudioFeaturePrint();
  853. const end = length === undefined ? reader.length : reader.position + length;
  854. while (reader.position < end) {
  855. const tag = reader.uint32();
  856. switch (tag >>> 3) {
  857. case 20:
  858. message.sound = CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound.decode(reader, reader.uint32());
  859. break;
  860. default:
  861. reader.skipType(tag & 7);
  862. break;
  863. }
  864. }
  865. return message;
  866. }
  867. static decodeText(reader) {
  868. const message = new CoreML.Specification.CoreMLModels.AudioFeaturePrint();
  869. reader.start();
  870. while (!reader.end()) {
  871. const tag = reader.tag();
  872. switch (tag) {
  873. case "sound":
  874. message.sound = CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound.decodeText(reader);
  875. break;
  876. default:
  877. reader.field(tag, message);
  878. break;
  879. }
  880. }
  881. return message;
  882. }
  883. };
  884. CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound = class Sound {
  885. static decode(reader, length) {
  886. const message = new CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound();
  887. const end = length === undefined ? reader.length : reader.position + length;
  888. while (reader.position < end) {
  889. const tag = reader.uint32();
  890. switch (tag >>> 3) {
  891. case 1:
  892. message.version = reader.int32();
  893. break;
  894. default:
  895. reader.skipType(tag & 7);
  896. break;
  897. }
  898. }
  899. return message;
  900. }
  901. static decodeText(reader) {
  902. const message = new CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound();
  903. reader.start();
  904. while (!reader.end()) {
  905. const tag = reader.tag();
  906. switch (tag) {
  907. case "version":
  908. message.version = reader.enum(CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound.SoundVersion);
  909. break;
  910. default:
  911. reader.field(tag, message);
  912. break;
  913. }
  914. }
  915. return message;
  916. }
  917. };
  918. CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound.prototype.version = 0;
  919. CoreML.Specification.CoreMLModels.AudioFeaturePrint.Sound.SoundVersion = {
  920. "SOUND_VERSION_INVALID": 0,
  921. "SOUND_VERSION_1": 1
  922. };
  923. CoreML.Specification.CoreMLModels.TextClassifier = class TextClassifier {
  924. get ClassLabels() {
  925. CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet = CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet || new Set(["stringClassLabels"]);
  926. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.TextClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  927. }
  928. static decode(reader, length) {
  929. const message = new CoreML.Specification.CoreMLModels.TextClassifier();
  930. const end = length === undefined ? reader.length : reader.position + length;
  931. while (reader.position < end) {
  932. const tag = reader.uint32();
  933. switch (tag >>> 3) {
  934. case 1:
  935. message.revision = reader.uint32();
  936. break;
  937. case 10:
  938. message.language = reader.string();
  939. break;
  940. case 100:
  941. message.modelParameterData = reader.bytes();
  942. break;
  943. case 200:
  944. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  945. break;
  946. default:
  947. reader.skipType(tag & 7);
  948. break;
  949. }
  950. }
  951. return message;
  952. }
  953. static decodeText(reader) {
  954. const message = new CoreML.Specification.CoreMLModels.TextClassifier();
  955. reader.start();
  956. while (!reader.end()) {
  957. const tag = reader.tag();
  958. switch (tag) {
  959. case "revision":
  960. message.revision = reader.uint32();
  961. break;
  962. case "language":
  963. message.language = reader.string();
  964. break;
  965. case "modelParameterData":
  966. message.modelParameterData = reader.bytes();
  967. break;
  968. case "stringClassLabels":
  969. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  970. break;
  971. default:
  972. reader.field(tag, message);
  973. break;
  974. }
  975. }
  976. return message;
  977. }
  978. };
  979. CoreML.Specification.CoreMLModels.TextClassifier.prototype.revision = 0;
  980. CoreML.Specification.CoreMLModels.TextClassifier.prototype.language = "";
  981. CoreML.Specification.CoreMLModels.TextClassifier.prototype.modelParameterData = new Uint8Array([]);
  982. CoreML.Specification.CoreMLModels.WordTagger = class WordTagger {
  983. get Tags() {
  984. CoreML.Specification.CoreMLModels.WordTagger.TagsSet = CoreML.Specification.CoreMLModels.WordTagger.TagsSet || new Set(["stringTags"]);
  985. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.WordTagger.TagsSet.has(key) && this[key] !== null);
  986. }
  987. static decode(reader, length) {
  988. const message = new CoreML.Specification.CoreMLModels.WordTagger();
  989. const end = length === undefined ? reader.length : reader.position + length;
  990. while (reader.position < end) {
  991. const tag = reader.uint32();
  992. switch (tag >>> 3) {
  993. case 1:
  994. message.revision = reader.uint32();
  995. break;
  996. case 10:
  997. message.language = reader.string();
  998. break;
  999. case 20:
  1000. message.tokensOutputFeatureName = reader.string();
  1001. break;
  1002. case 21:
  1003. message.tokenTagsOutputFeatureName = reader.string();
  1004. break;
  1005. case 22:
  1006. message.tokenLocationsOutputFeatureName = reader.string();
  1007. break;
  1008. case 23:
  1009. message.tokenLengthsOutputFeatureName = reader.string();
  1010. break;
  1011. case 100:
  1012. message.modelParameterData = reader.bytes();
  1013. break;
  1014. case 200:
  1015. message.stringTags = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  1016. break;
  1017. default:
  1018. reader.skipType(tag & 7);
  1019. break;
  1020. }
  1021. }
  1022. return message;
  1023. }
  1024. static decodeText(reader) {
  1025. const message = new CoreML.Specification.CoreMLModels.WordTagger();
  1026. reader.start();
  1027. while (!reader.end()) {
  1028. const tag = reader.tag();
  1029. switch (tag) {
  1030. case "revision":
  1031. message.revision = reader.uint32();
  1032. break;
  1033. case "language":
  1034. message.language = reader.string();
  1035. break;
  1036. case "tokensOutputFeatureName":
  1037. message.tokensOutputFeatureName = reader.string();
  1038. break;
  1039. case "tokenTagsOutputFeatureName":
  1040. message.tokenTagsOutputFeatureName = reader.string();
  1041. break;
  1042. case "tokenLocationsOutputFeatureName":
  1043. message.tokenLocationsOutputFeatureName = reader.string();
  1044. break;
  1045. case "tokenLengthsOutputFeatureName":
  1046. message.tokenLengthsOutputFeatureName = reader.string();
  1047. break;
  1048. case "modelParameterData":
  1049. message.modelParameterData = reader.bytes();
  1050. break;
  1051. case "stringTags":
  1052. message.stringTags = CoreML.Specification.StringVector.decodeText(reader);
  1053. break;
  1054. default:
  1055. reader.field(tag, message);
  1056. break;
  1057. }
  1058. }
  1059. return message;
  1060. }
  1061. };
  1062. CoreML.Specification.CoreMLModels.WordTagger.prototype.revision = 0;
  1063. CoreML.Specification.CoreMLModels.WordTagger.prototype.language = "";
  1064. CoreML.Specification.CoreMLModels.WordTagger.prototype.tokensOutputFeatureName = "";
  1065. CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenTagsOutputFeatureName = "";
  1066. CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenLocationsOutputFeatureName = "";
  1067. CoreML.Specification.CoreMLModels.WordTagger.prototype.tokenLengthsOutputFeatureName = "";
  1068. CoreML.Specification.CoreMLModels.WordTagger.prototype.modelParameterData = new Uint8Array([]);
  1069. CoreML.Specification.CoreMLModels.Gazetteer = class Gazetteer {
  1070. get ClassLabels() {
  1071. CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet = CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet || new Set(["stringClassLabels"]);
  1072. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.Gazetteer.ClassLabelsSet.has(key) && this[key] !== null);
  1073. }
  1074. static decode(reader, length) {
  1075. const message = new CoreML.Specification.CoreMLModels.Gazetteer();
  1076. const end = length === undefined ? reader.length : reader.position + length;
  1077. while (reader.position < end) {
  1078. const tag = reader.uint32();
  1079. switch (tag >>> 3) {
  1080. case 1:
  1081. message.revision = reader.uint32();
  1082. break;
  1083. case 10:
  1084. message.language = reader.string();
  1085. break;
  1086. case 100:
  1087. message.modelParameterData = reader.bytes();
  1088. break;
  1089. case 200:
  1090. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  1091. break;
  1092. default:
  1093. reader.skipType(tag & 7);
  1094. break;
  1095. }
  1096. }
  1097. return message;
  1098. }
  1099. static decodeText(reader) {
  1100. const message = new CoreML.Specification.CoreMLModels.Gazetteer();
  1101. reader.start();
  1102. while (!reader.end()) {
  1103. const tag = reader.tag();
  1104. switch (tag) {
  1105. case "revision":
  1106. message.revision = reader.uint32();
  1107. break;
  1108. case "language":
  1109. message.language = reader.string();
  1110. break;
  1111. case "modelParameterData":
  1112. message.modelParameterData = reader.bytes();
  1113. break;
  1114. case "stringClassLabels":
  1115. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  1116. break;
  1117. default:
  1118. reader.field(tag, message);
  1119. break;
  1120. }
  1121. }
  1122. return message;
  1123. }
  1124. };
  1125. CoreML.Specification.CoreMLModels.Gazetteer.prototype.revision = 0;
  1126. CoreML.Specification.CoreMLModels.Gazetteer.prototype.language = "";
  1127. CoreML.Specification.CoreMLModels.Gazetteer.prototype.modelParameterData = new Uint8Array([]);
  1128. CoreML.Specification.CoreMLModels.WordEmbedding = class WordEmbedding {
  1129. static decode(reader, length) {
  1130. const message = new CoreML.Specification.CoreMLModels.WordEmbedding();
  1131. const end = length === undefined ? reader.length : reader.position + length;
  1132. while (reader.position < end) {
  1133. const tag = reader.uint32();
  1134. switch (tag >>> 3) {
  1135. case 1:
  1136. message.revision = reader.uint32();
  1137. break;
  1138. case 10:
  1139. message.language = reader.string();
  1140. break;
  1141. case 100:
  1142. message.modelParameterData = reader.bytes();
  1143. break;
  1144. default:
  1145. reader.skipType(tag & 7);
  1146. break;
  1147. }
  1148. }
  1149. return message;
  1150. }
  1151. static decodeText(reader) {
  1152. const message = new CoreML.Specification.CoreMLModels.WordEmbedding();
  1153. reader.start();
  1154. while (!reader.end()) {
  1155. const tag = reader.tag();
  1156. switch (tag) {
  1157. case "revision":
  1158. message.revision = reader.uint32();
  1159. break;
  1160. case "language":
  1161. message.language = reader.string();
  1162. break;
  1163. case "modelParameterData":
  1164. message.modelParameterData = reader.bytes();
  1165. break;
  1166. default:
  1167. reader.field(tag, message);
  1168. break;
  1169. }
  1170. }
  1171. return message;
  1172. }
  1173. };
  1174. CoreML.Specification.CoreMLModels.WordEmbedding.prototype.revision = 0;
  1175. CoreML.Specification.CoreMLModels.WordEmbedding.prototype.language = "";
  1176. CoreML.Specification.CoreMLModels.WordEmbedding.prototype.modelParameterData = new Uint8Array([]);
  1177. CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing = class SoundAnalysisPreprocessing {
  1178. get SoundAnalysisPreprocessingType() {
  1179. CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet = CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet || new Set(["vggish"]);
  1180. return Object.keys(this).find((key) => CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.SoundAnalysisPreprocessingTypeSet.has(key) && this[key] !== null);
  1181. }
  1182. static decode(reader, length) {
  1183. const message = new CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing();
  1184. const end = length === undefined ? reader.length : reader.position + length;
  1185. while (reader.position < end) {
  1186. const tag = reader.uint32();
  1187. switch (tag >>> 3) {
  1188. case 20:
  1189. message.vggish = CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish.decode(reader, reader.uint32());
  1190. break;
  1191. default:
  1192. reader.skipType(tag & 7);
  1193. break;
  1194. }
  1195. }
  1196. return message;
  1197. }
  1198. static decodeText(reader) {
  1199. const message = new CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing();
  1200. reader.start();
  1201. while (!reader.end()) {
  1202. const tag = reader.tag();
  1203. switch (tag) {
  1204. case "vggish":
  1205. message.vggish = CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish.decodeText(reader);
  1206. break;
  1207. default:
  1208. reader.field(tag, message);
  1209. break;
  1210. }
  1211. }
  1212. return message;
  1213. }
  1214. };
  1215. CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish = class Vggish {
  1216. static decode(reader, length) {
  1217. const message = new CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish();
  1218. const end = length === undefined ? reader.length : reader.position + length;
  1219. while (reader.position < end) {
  1220. const tag = reader.uint32();
  1221. switch (tag >>> 3) {
  1222. default:
  1223. reader.skipType(tag & 7);
  1224. break;
  1225. }
  1226. }
  1227. return message;
  1228. }
  1229. static decodeText(reader) {
  1230. const message = new CoreML.Specification.CoreMLModels.SoundAnalysisPreprocessing.Vggish();
  1231. reader.start();
  1232. while (!reader.end()) {
  1233. const tag = reader.tag();
  1234. switch (tag) {
  1235. default:
  1236. reader.field(tag, message);
  1237. break;
  1238. }
  1239. }
  1240. return message;
  1241. }
  1242. };
  1243. CoreML.Specification.StringToInt64Map = class StringToInt64Map {
  1244. constructor() {
  1245. this.map = {};
  1246. }
  1247. static decode(reader, length) {
  1248. const message = new CoreML.Specification.StringToInt64Map();
  1249. const end = length === undefined ? reader.length : reader.position + length;
  1250. while (reader.position < end) {
  1251. const tag = reader.uint32();
  1252. switch (tag >>> 3) {
  1253. case 1:
  1254. reader.entry(message.map, () => reader.string(), () => reader.int64());
  1255. break;
  1256. default:
  1257. reader.skipType(tag & 7);
  1258. break;
  1259. }
  1260. }
  1261. return message;
  1262. }
  1263. static decodeText(reader) {
  1264. const message = new CoreML.Specification.StringToInt64Map();
  1265. reader.start();
  1266. while (!reader.end()) {
  1267. const tag = reader.tag();
  1268. switch (tag) {
  1269. case "map":
  1270. reader.entry(message.map, () => reader.string(), () => reader.int64());
  1271. break;
  1272. default:
  1273. reader.field(tag, message);
  1274. break;
  1275. }
  1276. }
  1277. return message;
  1278. }
  1279. };
  1280. CoreML.Specification.Int64ToStringMap = class Int64ToStringMap {
  1281. constructor() {
  1282. this.map = {};
  1283. }
  1284. static decode(reader, length) {
  1285. const message = new CoreML.Specification.Int64ToStringMap();
  1286. const end = length === undefined ? reader.length : reader.position + length;
  1287. while (reader.position < end) {
  1288. const tag = reader.uint32();
  1289. switch (tag >>> 3) {
  1290. case 1:
  1291. reader.entry(message.map, () => reader.int64(), () => reader.string());
  1292. break;
  1293. default:
  1294. reader.skipType(tag & 7);
  1295. break;
  1296. }
  1297. }
  1298. return message;
  1299. }
  1300. static decodeText(reader) {
  1301. const message = new CoreML.Specification.Int64ToStringMap();
  1302. reader.start();
  1303. while (!reader.end()) {
  1304. const tag = reader.tag();
  1305. switch (tag) {
  1306. case "map":
  1307. reader.entry(message.map, () => reader.int64(), () => reader.string());
  1308. break;
  1309. default:
  1310. reader.field(tag, message);
  1311. break;
  1312. }
  1313. }
  1314. return message;
  1315. }
  1316. };
  1317. CoreML.Specification.StringToDoubleMap = class StringToDoubleMap {
  1318. constructor() {
  1319. this.map = {};
  1320. }
  1321. static decode(reader, length) {
  1322. const message = new CoreML.Specification.StringToDoubleMap();
  1323. const end = length === undefined ? reader.length : reader.position + length;
  1324. while (reader.position < end) {
  1325. const tag = reader.uint32();
  1326. switch (tag >>> 3) {
  1327. case 1:
  1328. reader.entry(message.map, () => reader.string(), () => reader.double());
  1329. break;
  1330. default:
  1331. reader.skipType(tag & 7);
  1332. break;
  1333. }
  1334. }
  1335. return message;
  1336. }
  1337. static decodeText(reader) {
  1338. const message = new CoreML.Specification.StringToDoubleMap();
  1339. reader.start();
  1340. while (!reader.end()) {
  1341. const tag = reader.tag();
  1342. switch (tag) {
  1343. case "map":
  1344. reader.entry(message.map, () => reader.string(), () => reader.double());
  1345. break;
  1346. default:
  1347. reader.field(tag, message);
  1348. break;
  1349. }
  1350. }
  1351. return message;
  1352. }
  1353. };
  1354. CoreML.Specification.Int64ToDoubleMap = class Int64ToDoubleMap {
  1355. constructor() {
  1356. this.map = {};
  1357. }
  1358. static decode(reader, length) {
  1359. const message = new CoreML.Specification.Int64ToDoubleMap();
  1360. const end = length === undefined ? reader.length : reader.position + length;
  1361. while (reader.position < end) {
  1362. const tag = reader.uint32();
  1363. switch (tag >>> 3) {
  1364. case 1:
  1365. reader.entry(message.map, () => reader.int64(), () => reader.double());
  1366. break;
  1367. default:
  1368. reader.skipType(tag & 7);
  1369. break;
  1370. }
  1371. }
  1372. return message;
  1373. }
  1374. static decodeText(reader) {
  1375. const message = new CoreML.Specification.Int64ToDoubleMap();
  1376. reader.start();
  1377. while (!reader.end()) {
  1378. const tag = reader.tag();
  1379. switch (tag) {
  1380. case "map":
  1381. reader.entry(message.map, () => reader.int64(), () => reader.double());
  1382. break;
  1383. default:
  1384. reader.field(tag, message);
  1385. break;
  1386. }
  1387. }
  1388. return message;
  1389. }
  1390. };
  1391. CoreML.Specification.StringVector = class StringVector {
  1392. constructor() {
  1393. this.vector = [];
  1394. }
  1395. static decode(reader, length) {
  1396. const message = new CoreML.Specification.StringVector();
  1397. const end = length === undefined ? reader.length : reader.position + length;
  1398. while (reader.position < end) {
  1399. const tag = reader.uint32();
  1400. switch (tag >>> 3) {
  1401. case 1:
  1402. message.vector.push(reader.string());
  1403. break;
  1404. default:
  1405. reader.skipType(tag & 7);
  1406. break;
  1407. }
  1408. }
  1409. return message;
  1410. }
  1411. static decodeText(reader) {
  1412. const message = new CoreML.Specification.StringVector();
  1413. reader.start();
  1414. while (!reader.end()) {
  1415. const tag = reader.tag();
  1416. switch (tag) {
  1417. case "vector":
  1418. reader.array(message.vector, () => reader.string());
  1419. break;
  1420. default:
  1421. reader.field(tag, message);
  1422. break;
  1423. }
  1424. }
  1425. return message;
  1426. }
  1427. };
  1428. CoreML.Specification.Int64Vector = class Int64Vector {
  1429. constructor() {
  1430. this.vector = [];
  1431. }
  1432. static decode(reader, length) {
  1433. const message = new CoreML.Specification.Int64Vector();
  1434. const end = length === undefined ? reader.length : reader.position + length;
  1435. while (reader.position < end) {
  1436. const tag = reader.uint32();
  1437. switch (tag >>> 3) {
  1438. case 1:
  1439. message.vector = reader.array(message.vector, () => reader.int64(), tag);
  1440. break;
  1441. default:
  1442. reader.skipType(tag & 7);
  1443. break;
  1444. }
  1445. }
  1446. return message;
  1447. }
  1448. static decodeText(reader) {
  1449. const message = new CoreML.Specification.Int64Vector();
  1450. reader.start();
  1451. while (!reader.end()) {
  1452. const tag = reader.tag();
  1453. switch (tag) {
  1454. case "vector":
  1455. reader.array(message.vector, () => reader.int64());
  1456. break;
  1457. default:
  1458. reader.field(tag, message);
  1459. break;
  1460. }
  1461. }
  1462. return message;
  1463. }
  1464. };
  1465. CoreML.Specification.FloatVector = class FloatVector {
  1466. constructor() {
  1467. this.vector = [];
  1468. }
  1469. static decode(reader, length) {
  1470. const message = new CoreML.Specification.FloatVector();
  1471. const end = length === undefined ? reader.length : reader.position + length;
  1472. while (reader.position < end) {
  1473. const tag = reader.uint32();
  1474. switch (tag >>> 3) {
  1475. case 1:
  1476. message.vector = reader.floats(message.vector, tag);
  1477. break;
  1478. default:
  1479. reader.skipType(tag & 7);
  1480. break;
  1481. }
  1482. }
  1483. return message;
  1484. }
  1485. static decodeText(reader) {
  1486. const message = new CoreML.Specification.FloatVector();
  1487. reader.start();
  1488. while (!reader.end()) {
  1489. const tag = reader.tag();
  1490. switch (tag) {
  1491. case "vector":
  1492. reader.array(message.vector, () => reader.float());
  1493. break;
  1494. default:
  1495. reader.field(tag, message);
  1496. break;
  1497. }
  1498. }
  1499. return message;
  1500. }
  1501. };
  1502. CoreML.Specification.DoubleVector = class DoubleVector {
  1503. constructor() {
  1504. this.vector = [];
  1505. }
  1506. static decode(reader, length) {
  1507. const message = new CoreML.Specification.DoubleVector();
  1508. const end = length === undefined ? reader.length : reader.position + length;
  1509. while (reader.position < end) {
  1510. const tag = reader.uint32();
  1511. switch (tag >>> 3) {
  1512. case 1:
  1513. message.vector = reader.doubles(message.vector, tag);
  1514. break;
  1515. default:
  1516. reader.skipType(tag & 7);
  1517. break;
  1518. }
  1519. }
  1520. return message;
  1521. }
  1522. static decodeText(reader) {
  1523. const message = new CoreML.Specification.DoubleVector();
  1524. reader.start();
  1525. while (!reader.end()) {
  1526. const tag = reader.tag();
  1527. switch (tag) {
  1528. case "vector":
  1529. reader.array(message.vector, () => reader.double());
  1530. break;
  1531. default:
  1532. reader.field(tag, message);
  1533. break;
  1534. }
  1535. }
  1536. return message;
  1537. }
  1538. };
  1539. CoreML.Specification.Int64Range = class Int64Range {
  1540. static decode(reader, length) {
  1541. const message = new CoreML.Specification.Int64Range();
  1542. const end = length === undefined ? reader.length : reader.position + length;
  1543. while (reader.position < end) {
  1544. const tag = reader.uint32();
  1545. switch (tag >>> 3) {
  1546. case 1:
  1547. message.minValue = reader.int64();
  1548. break;
  1549. case 2:
  1550. message.maxValue = reader.int64();
  1551. break;
  1552. default:
  1553. reader.skipType(tag & 7);
  1554. break;
  1555. }
  1556. }
  1557. return message;
  1558. }
  1559. static decodeText(reader) {
  1560. const message = new CoreML.Specification.Int64Range();
  1561. reader.start();
  1562. while (!reader.end()) {
  1563. const tag = reader.tag();
  1564. switch (tag) {
  1565. case "minValue":
  1566. message.minValue = reader.int64();
  1567. break;
  1568. case "maxValue":
  1569. message.maxValue = reader.int64();
  1570. break;
  1571. default:
  1572. reader.field(tag, message);
  1573. break;
  1574. }
  1575. }
  1576. return message;
  1577. }
  1578. };
  1579. CoreML.Specification.Int64Range.prototype.minValue = 0n;
  1580. CoreML.Specification.Int64Range.prototype.maxValue = 0n;
  1581. CoreML.Specification.Int64Set = class Int64Set {
  1582. constructor() {
  1583. this.values = [];
  1584. }
  1585. static decode(reader, length) {
  1586. const message = new CoreML.Specification.Int64Set();
  1587. const end = length === undefined ? reader.length : reader.position + length;
  1588. while (reader.position < end) {
  1589. const tag = reader.uint32();
  1590. switch (tag >>> 3) {
  1591. case 1:
  1592. message.values = reader.array(message.values, () => reader.int64(), tag);
  1593. break;
  1594. default:
  1595. reader.skipType(tag & 7);
  1596. break;
  1597. }
  1598. }
  1599. return message;
  1600. }
  1601. static decodeText(reader) {
  1602. const message = new CoreML.Specification.Int64Set();
  1603. reader.start();
  1604. while (!reader.end()) {
  1605. const tag = reader.tag();
  1606. switch (tag) {
  1607. case "values":
  1608. reader.array(message.values, () => reader.int64());
  1609. break;
  1610. default:
  1611. reader.field(tag, message);
  1612. break;
  1613. }
  1614. }
  1615. return message;
  1616. }
  1617. };
  1618. CoreML.Specification.DoubleRange = class DoubleRange {
  1619. static decode(reader, length) {
  1620. const message = new CoreML.Specification.DoubleRange();
  1621. const end = length === undefined ? reader.length : reader.position + length;
  1622. while (reader.position < end) {
  1623. const tag = reader.uint32();
  1624. switch (tag >>> 3) {
  1625. case 1:
  1626. message.minValue = reader.double();
  1627. break;
  1628. case 2:
  1629. message.maxValue = reader.double();
  1630. break;
  1631. default:
  1632. reader.skipType(tag & 7);
  1633. break;
  1634. }
  1635. }
  1636. return message;
  1637. }
  1638. static decodeText(reader) {
  1639. const message = new CoreML.Specification.DoubleRange();
  1640. reader.start();
  1641. while (!reader.end()) {
  1642. const tag = reader.tag();
  1643. switch (tag) {
  1644. case "minValue":
  1645. message.minValue = reader.double();
  1646. break;
  1647. case "maxValue":
  1648. message.maxValue = reader.double();
  1649. break;
  1650. default:
  1651. reader.field(tag, message);
  1652. break;
  1653. }
  1654. }
  1655. return message;
  1656. }
  1657. };
  1658. CoreML.Specification.DoubleRange.prototype.minValue = 0;
  1659. CoreML.Specification.DoubleRange.prototype.maxValue = 0;
  1660. CoreML.Specification.PrecisionRecallCurve = class PrecisionRecallCurve {
  1661. static decode(reader, length) {
  1662. const message = new CoreML.Specification.PrecisionRecallCurve();
  1663. const end = length === undefined ? reader.length : reader.position + length;
  1664. while (reader.position < end) {
  1665. const tag = reader.uint32();
  1666. switch (tag >>> 3) {
  1667. case 1:
  1668. message.precisionValues = CoreML.Specification.FloatVector.decode(reader, reader.uint32());
  1669. break;
  1670. case 2:
  1671. message.precisionConfidenceThresholds = CoreML.Specification.FloatVector.decode(reader, reader.uint32());
  1672. break;
  1673. case 3:
  1674. message.recallValues = CoreML.Specification.FloatVector.decode(reader, reader.uint32());
  1675. break;
  1676. case 4:
  1677. message.recallConfidenceThresholds = CoreML.Specification.FloatVector.decode(reader, reader.uint32());
  1678. break;
  1679. default:
  1680. reader.skipType(tag & 7);
  1681. break;
  1682. }
  1683. }
  1684. return message;
  1685. }
  1686. static decodeText(reader) {
  1687. const message = new CoreML.Specification.PrecisionRecallCurve();
  1688. reader.start();
  1689. while (!reader.end()) {
  1690. const tag = reader.tag();
  1691. switch (tag) {
  1692. case "precisionValues":
  1693. message.precisionValues = CoreML.Specification.FloatVector.decodeText(reader);
  1694. break;
  1695. case "precisionConfidenceThresholds":
  1696. message.precisionConfidenceThresholds = CoreML.Specification.FloatVector.decodeText(reader);
  1697. break;
  1698. case "recallValues":
  1699. message.recallValues = CoreML.Specification.FloatVector.decodeText(reader);
  1700. break;
  1701. case "recallConfidenceThresholds":
  1702. message.recallConfidenceThresholds = CoreML.Specification.FloatVector.decodeText(reader);
  1703. break;
  1704. default:
  1705. reader.field(tag, message);
  1706. break;
  1707. }
  1708. }
  1709. return message;
  1710. }
  1711. };
  1712. CoreML.Specification.PrecisionRecallCurve.prototype.precisionValues = null;
  1713. CoreML.Specification.PrecisionRecallCurve.prototype.precisionConfidenceThresholds = null;
  1714. CoreML.Specification.PrecisionRecallCurve.prototype.recallValues = null;
  1715. CoreML.Specification.PrecisionRecallCurve.prototype.recallConfidenceThresholds = null;
  1716. CoreML.Specification.Int64FeatureType = class Int64FeatureType {
  1717. static decode(reader, length) {
  1718. const message = new CoreML.Specification.Int64FeatureType();
  1719. const end = length === undefined ? reader.length : reader.position + length;
  1720. while (reader.position < end) {
  1721. const tag = reader.uint32();
  1722. switch (tag >>> 3) {
  1723. default:
  1724. reader.skipType(tag & 7);
  1725. break;
  1726. }
  1727. }
  1728. return message;
  1729. }
  1730. static decodeText(reader) {
  1731. const message = new CoreML.Specification.Int64FeatureType();
  1732. reader.start();
  1733. while (!reader.end()) {
  1734. const tag = reader.tag();
  1735. switch (tag) {
  1736. default:
  1737. reader.field(tag, message);
  1738. break;
  1739. }
  1740. }
  1741. return message;
  1742. }
  1743. };
  1744. CoreML.Specification.DoubleFeatureType = class DoubleFeatureType {
  1745. static decode(reader, length) {
  1746. const message = new CoreML.Specification.DoubleFeatureType();
  1747. const end = length === undefined ? reader.length : reader.position + length;
  1748. while (reader.position < end) {
  1749. const tag = reader.uint32();
  1750. switch (tag >>> 3) {
  1751. default:
  1752. reader.skipType(tag & 7);
  1753. break;
  1754. }
  1755. }
  1756. return message;
  1757. }
  1758. static decodeText(reader) {
  1759. const message = new CoreML.Specification.DoubleFeatureType();
  1760. reader.start();
  1761. while (!reader.end()) {
  1762. const tag = reader.tag();
  1763. switch (tag) {
  1764. default:
  1765. reader.field(tag, message);
  1766. break;
  1767. }
  1768. }
  1769. return message;
  1770. }
  1771. };
  1772. CoreML.Specification.StringFeatureType = class StringFeatureType {
  1773. static decode(reader, length) {
  1774. const message = new CoreML.Specification.StringFeatureType();
  1775. const end = length === undefined ? reader.length : reader.position + length;
  1776. while (reader.position < end) {
  1777. const tag = reader.uint32();
  1778. switch (tag >>> 3) {
  1779. default:
  1780. reader.skipType(tag & 7);
  1781. break;
  1782. }
  1783. }
  1784. return message;
  1785. }
  1786. static decodeText(reader) {
  1787. const message = new CoreML.Specification.StringFeatureType();
  1788. reader.start();
  1789. while (!reader.end()) {
  1790. const tag = reader.tag();
  1791. switch (tag) {
  1792. default:
  1793. reader.field(tag, message);
  1794. break;
  1795. }
  1796. }
  1797. return message;
  1798. }
  1799. };
  1800. CoreML.Specification.SizeRange = class SizeRange {
  1801. static decode(reader, length) {
  1802. const message = new CoreML.Specification.SizeRange();
  1803. const end = length === undefined ? reader.length : reader.position + length;
  1804. while (reader.position < end) {
  1805. const tag = reader.uint32();
  1806. switch (tag >>> 3) {
  1807. case 1:
  1808. message.lowerBound = reader.uint64();
  1809. break;
  1810. case 2:
  1811. message.upperBound = reader.int64();
  1812. break;
  1813. default:
  1814. reader.skipType(tag & 7);
  1815. break;
  1816. }
  1817. }
  1818. return message;
  1819. }
  1820. static decodeText(reader) {
  1821. const message = new CoreML.Specification.SizeRange();
  1822. reader.start();
  1823. while (!reader.end()) {
  1824. const tag = reader.tag();
  1825. switch (tag) {
  1826. case "lowerBound":
  1827. message.lowerBound = reader.uint64();
  1828. break;
  1829. case "upperBound":
  1830. message.upperBound = reader.int64();
  1831. break;
  1832. default:
  1833. reader.field(tag, message);
  1834. break;
  1835. }
  1836. }
  1837. return message;
  1838. }
  1839. };
  1840. CoreML.Specification.SizeRange.prototype.lowerBound = 0n;
  1841. CoreML.Specification.SizeRange.prototype.upperBound = 0n;
  1842. CoreML.Specification.ImageFeatureType = class ImageFeatureType {
  1843. get SizeFlexibility() {
  1844. CoreML.Specification.ImageFeatureType.SizeFlexibilitySet = CoreML.Specification.ImageFeatureType.SizeFlexibilitySet || new Set(["enumeratedSizes", "imageSizeRange"]);
  1845. return Object.keys(this).find((key) => CoreML.Specification.ImageFeatureType.SizeFlexibilitySet.has(key) && this[key] !== null);
  1846. }
  1847. static decode(reader, length) {
  1848. const message = new CoreML.Specification.ImageFeatureType();
  1849. const end = length === undefined ? reader.length : reader.position + length;
  1850. while (reader.position < end) {
  1851. const tag = reader.uint32();
  1852. switch (tag >>> 3) {
  1853. case 1:
  1854. message.width = reader.int64();
  1855. break;
  1856. case 2:
  1857. message.height = reader.int64();
  1858. break;
  1859. case 21:
  1860. message.enumeratedSizes = CoreML.Specification.ImageFeatureType.EnumeratedImageSizes.decode(reader, reader.uint32());
  1861. break;
  1862. case 31:
  1863. message.imageSizeRange = CoreML.Specification.ImageFeatureType.ImageSizeRange.decode(reader, reader.uint32());
  1864. break;
  1865. case 3:
  1866. message.colorSpace = reader.int32();
  1867. break;
  1868. default:
  1869. reader.skipType(tag & 7);
  1870. break;
  1871. }
  1872. }
  1873. return message;
  1874. }
  1875. static decodeText(reader) {
  1876. const message = new CoreML.Specification.ImageFeatureType();
  1877. reader.start();
  1878. while (!reader.end()) {
  1879. const tag = reader.tag();
  1880. switch (tag) {
  1881. case "width":
  1882. message.width = reader.int64();
  1883. break;
  1884. case "height":
  1885. message.height = reader.int64();
  1886. break;
  1887. case "enumeratedSizes":
  1888. message.enumeratedSizes = CoreML.Specification.ImageFeatureType.EnumeratedImageSizes.decodeText(reader);
  1889. break;
  1890. case "imageSizeRange":
  1891. message.imageSizeRange = CoreML.Specification.ImageFeatureType.ImageSizeRange.decodeText(reader);
  1892. break;
  1893. case "colorSpace":
  1894. message.colorSpace = reader.enum(CoreML.Specification.ImageFeatureType.ColorSpace);
  1895. break;
  1896. default:
  1897. reader.field(tag, message);
  1898. break;
  1899. }
  1900. }
  1901. return message;
  1902. }
  1903. };
  1904. CoreML.Specification.ImageFeatureType.prototype.width = 0n;
  1905. CoreML.Specification.ImageFeatureType.prototype.height = 0n;
  1906. CoreML.Specification.ImageFeatureType.prototype.colorSpace = 0;
  1907. CoreML.Specification.ImageFeatureType.ColorSpace = {
  1908. "INVALID_COLOR_SPACE": 0,
  1909. "GRAYSCALE": 10,
  1910. "RGB": 20,
  1911. "BGR": 30,
  1912. "GRAYSCALE_FLOAT16": 40
  1913. };
  1914. CoreML.Specification.ImageFeatureType.ImageSize = class ImageSize {
  1915. static decode(reader, length) {
  1916. const message = new CoreML.Specification.ImageFeatureType.ImageSize();
  1917. const end = length === undefined ? reader.length : reader.position + length;
  1918. while (reader.position < end) {
  1919. const tag = reader.uint32();
  1920. switch (tag >>> 3) {
  1921. case 1:
  1922. message.width = reader.uint64();
  1923. break;
  1924. case 2:
  1925. message.height = reader.uint64();
  1926. break;
  1927. default:
  1928. reader.skipType(tag & 7);
  1929. break;
  1930. }
  1931. }
  1932. return message;
  1933. }
  1934. static decodeText(reader) {
  1935. const message = new CoreML.Specification.ImageFeatureType.ImageSize();
  1936. reader.start();
  1937. while (!reader.end()) {
  1938. const tag = reader.tag();
  1939. switch (tag) {
  1940. case "width":
  1941. message.width = reader.uint64();
  1942. break;
  1943. case "height":
  1944. message.height = reader.uint64();
  1945. break;
  1946. default:
  1947. reader.field(tag, message);
  1948. break;
  1949. }
  1950. }
  1951. return message;
  1952. }
  1953. };
  1954. CoreML.Specification.ImageFeatureType.ImageSize.prototype.width = 0n;
  1955. CoreML.Specification.ImageFeatureType.ImageSize.prototype.height = 0n;
  1956. CoreML.Specification.ImageFeatureType.EnumeratedImageSizes = class EnumeratedImageSizes {
  1957. constructor() {
  1958. this.sizes = [];
  1959. }
  1960. static decode(reader, length) {
  1961. const message = new CoreML.Specification.ImageFeatureType.EnumeratedImageSizes();
  1962. const end = length === undefined ? reader.length : reader.position + length;
  1963. while (reader.position < end) {
  1964. const tag = reader.uint32();
  1965. switch (tag >>> 3) {
  1966. case 1:
  1967. message.sizes.push(CoreML.Specification.ImageFeatureType.ImageSize.decode(reader, reader.uint32()));
  1968. break;
  1969. default:
  1970. reader.skipType(tag & 7);
  1971. break;
  1972. }
  1973. }
  1974. return message;
  1975. }
  1976. static decodeText(reader) {
  1977. const message = new CoreML.Specification.ImageFeatureType.EnumeratedImageSizes();
  1978. reader.start();
  1979. while (!reader.end()) {
  1980. const tag = reader.tag();
  1981. switch (tag) {
  1982. case "sizes":
  1983. message.sizes.push(CoreML.Specification.ImageFeatureType.ImageSize.decodeText(reader));
  1984. break;
  1985. default:
  1986. reader.field(tag, message);
  1987. break;
  1988. }
  1989. }
  1990. return message;
  1991. }
  1992. };
  1993. CoreML.Specification.ImageFeatureType.ImageSizeRange = class ImageSizeRange {
  1994. static decode(reader, length) {
  1995. const message = new CoreML.Specification.ImageFeatureType.ImageSizeRange();
  1996. const end = length === undefined ? reader.length : reader.position + length;
  1997. while (reader.position < end) {
  1998. const tag = reader.uint32();
  1999. switch (tag >>> 3) {
  2000. case 1:
  2001. message.widthRange = CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  2002. break;
  2003. case 2:
  2004. message.heightRange = CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  2005. break;
  2006. default:
  2007. reader.skipType(tag & 7);
  2008. break;
  2009. }
  2010. }
  2011. return message;
  2012. }
  2013. static decodeText(reader) {
  2014. const message = new CoreML.Specification.ImageFeatureType.ImageSizeRange();
  2015. reader.start();
  2016. while (!reader.end()) {
  2017. const tag = reader.tag();
  2018. switch (tag) {
  2019. case "widthRange":
  2020. message.widthRange = CoreML.Specification.SizeRange.decodeText(reader);
  2021. break;
  2022. case "heightRange":
  2023. message.heightRange = CoreML.Specification.SizeRange.decodeText(reader);
  2024. break;
  2025. default:
  2026. reader.field(tag, message);
  2027. break;
  2028. }
  2029. }
  2030. return message;
  2031. }
  2032. };
  2033. CoreML.Specification.ImageFeatureType.ImageSizeRange.prototype.widthRange = null;
  2034. CoreML.Specification.ImageFeatureType.ImageSizeRange.prototype.heightRange = null;
  2035. CoreML.Specification.ArrayFeatureType = class ArrayFeatureType {
  2036. constructor() {
  2037. this.shape = [];
  2038. }
  2039. get ShapeFlexibility() {
  2040. CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet = CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet || new Set(["enumeratedShapes", "shapeRange"]);
  2041. return Object.keys(this).find((key) => CoreML.Specification.ArrayFeatureType.ShapeFlexibilitySet.has(key) && this[key] !== null);
  2042. }
  2043. get defaultOptionalValue() {
  2044. CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet = CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet || new Set(["intDefaultValue", "floatDefaultValue", "doubleDefaultValue"]);
  2045. return Object.keys(this).find((key) => CoreML.Specification.ArrayFeatureType.defaultOptionalValueSet.has(key) && this[key] !== null);
  2046. }
  2047. static decode(reader, length) {
  2048. const message = new CoreML.Specification.ArrayFeatureType();
  2049. const end = length === undefined ? reader.length : reader.position + length;
  2050. while (reader.position < end) {
  2051. const tag = reader.uint32();
  2052. switch (tag >>> 3) {
  2053. case 1:
  2054. message.shape = reader.array(message.shape, () => reader.int64(), tag);
  2055. break;
  2056. case 2:
  2057. message.dataType = reader.int32();
  2058. break;
  2059. case 21:
  2060. message.enumeratedShapes = CoreML.Specification.ArrayFeatureType.EnumeratedShapes.decode(reader, reader.uint32());
  2061. break;
  2062. case 31:
  2063. message.shapeRange = CoreML.Specification.ArrayFeatureType.ShapeRange.decode(reader, reader.uint32());
  2064. break;
  2065. case 41:
  2066. message.intDefaultValue = reader.int32();
  2067. break;
  2068. case 51:
  2069. message.floatDefaultValue = reader.float();
  2070. break;
  2071. case 61:
  2072. message.doubleDefaultValue = reader.double();
  2073. break;
  2074. default:
  2075. reader.skipType(tag & 7);
  2076. break;
  2077. }
  2078. }
  2079. return message;
  2080. }
  2081. static decodeText(reader) {
  2082. const message = new CoreML.Specification.ArrayFeatureType();
  2083. reader.start();
  2084. while (!reader.end()) {
  2085. const tag = reader.tag();
  2086. switch (tag) {
  2087. case "shape":
  2088. reader.array(message.shape, () => reader.int64());
  2089. break;
  2090. case "dataType":
  2091. message.dataType = reader.enum(CoreML.Specification.ArrayFeatureType.ArrayDataType);
  2092. break;
  2093. case "enumeratedShapes":
  2094. message.enumeratedShapes = CoreML.Specification.ArrayFeatureType.EnumeratedShapes.decodeText(reader);
  2095. break;
  2096. case "shapeRange":
  2097. message.shapeRange = CoreML.Specification.ArrayFeatureType.ShapeRange.decodeText(reader);
  2098. break;
  2099. case "intDefaultValue":
  2100. message.intDefaultValue = reader.int32();
  2101. break;
  2102. case "floatDefaultValue":
  2103. message.floatDefaultValue = reader.float();
  2104. break;
  2105. case "doubleDefaultValue":
  2106. message.doubleDefaultValue = reader.double();
  2107. break;
  2108. default:
  2109. reader.field(tag, message);
  2110. break;
  2111. }
  2112. }
  2113. return message;
  2114. }
  2115. };
  2116. CoreML.Specification.ArrayFeatureType.prototype.dataType = 0;
  2117. CoreML.Specification.ArrayFeatureType.ArrayDataType = {
  2118. "INVALID_ARRAY_DATA_TYPE": 0,
  2119. "FLOAT32": 65568,
  2120. "DOUBLE": 65600,
  2121. "INT32": 131104,
  2122. "INT8": 131080,
  2123. "FLOAT16": 65552
  2124. };
  2125. CoreML.Specification.ArrayFeatureType.Shape = class Shape {
  2126. constructor() {
  2127. this.shape = [];
  2128. }
  2129. static decode(reader, length) {
  2130. const message = new CoreML.Specification.ArrayFeatureType.Shape();
  2131. const end = length === undefined ? reader.length : reader.position + length;
  2132. while (reader.position < end) {
  2133. const tag = reader.uint32();
  2134. switch (tag >>> 3) {
  2135. case 1:
  2136. message.shape = reader.array(message.shape, () => reader.int64(), tag);
  2137. break;
  2138. default:
  2139. reader.skipType(tag & 7);
  2140. break;
  2141. }
  2142. }
  2143. return message;
  2144. }
  2145. static decodeText(reader) {
  2146. const message = new CoreML.Specification.ArrayFeatureType.Shape();
  2147. reader.start();
  2148. while (!reader.end()) {
  2149. const tag = reader.tag();
  2150. switch (tag) {
  2151. case "shape":
  2152. reader.array(message.shape, () => reader.int64());
  2153. break;
  2154. default:
  2155. reader.field(tag, message);
  2156. break;
  2157. }
  2158. }
  2159. return message;
  2160. }
  2161. };
  2162. CoreML.Specification.ArrayFeatureType.EnumeratedShapes = class EnumeratedShapes {
  2163. constructor() {
  2164. this.shapes = [];
  2165. }
  2166. static decode(reader, length) {
  2167. const message = new CoreML.Specification.ArrayFeatureType.EnumeratedShapes();
  2168. const end = length === undefined ? reader.length : reader.position + length;
  2169. while (reader.position < end) {
  2170. const tag = reader.uint32();
  2171. switch (tag >>> 3) {
  2172. case 1:
  2173. message.shapes.push(CoreML.Specification.ArrayFeatureType.Shape.decode(reader, reader.uint32()));
  2174. break;
  2175. default:
  2176. reader.skipType(tag & 7);
  2177. break;
  2178. }
  2179. }
  2180. return message;
  2181. }
  2182. static decodeText(reader) {
  2183. const message = new CoreML.Specification.ArrayFeatureType.EnumeratedShapes();
  2184. reader.start();
  2185. while (!reader.end()) {
  2186. const tag = reader.tag();
  2187. switch (tag) {
  2188. case "shapes":
  2189. message.shapes.push(CoreML.Specification.ArrayFeatureType.Shape.decodeText(reader));
  2190. break;
  2191. default:
  2192. reader.field(tag, message);
  2193. break;
  2194. }
  2195. }
  2196. return message;
  2197. }
  2198. };
  2199. CoreML.Specification.ArrayFeatureType.ShapeRange = class ShapeRange {
  2200. constructor() {
  2201. this.sizeRanges = [];
  2202. }
  2203. static decode(reader, length) {
  2204. const message = new CoreML.Specification.ArrayFeatureType.ShapeRange();
  2205. const end = length === undefined ? reader.length : reader.position + length;
  2206. while (reader.position < end) {
  2207. const tag = reader.uint32();
  2208. switch (tag >>> 3) {
  2209. case 1:
  2210. message.sizeRanges.push(CoreML.Specification.SizeRange.decode(reader, reader.uint32()));
  2211. break;
  2212. default:
  2213. reader.skipType(tag & 7);
  2214. break;
  2215. }
  2216. }
  2217. return message;
  2218. }
  2219. static decodeText(reader) {
  2220. const message = new CoreML.Specification.ArrayFeatureType.ShapeRange();
  2221. reader.start();
  2222. while (!reader.end()) {
  2223. const tag = reader.tag();
  2224. switch (tag) {
  2225. case "sizeRanges":
  2226. message.sizeRanges.push(CoreML.Specification.SizeRange.decodeText(reader));
  2227. break;
  2228. default:
  2229. reader.field(tag, message);
  2230. break;
  2231. }
  2232. }
  2233. return message;
  2234. }
  2235. };
  2236. CoreML.Specification.DictionaryFeatureType = class DictionaryFeatureType {
  2237. get KeyType() {
  2238. CoreML.Specification.DictionaryFeatureType.KeyTypeSet = CoreML.Specification.DictionaryFeatureType.KeyTypeSet || new Set(["int64KeyType", "stringKeyType"]);
  2239. return Object.keys(this).find((key) => CoreML.Specification.DictionaryFeatureType.KeyTypeSet.has(key) && this[key] !== null);
  2240. }
  2241. static decode(reader, length) {
  2242. const message = new CoreML.Specification.DictionaryFeatureType();
  2243. const end = length === undefined ? reader.length : reader.position + length;
  2244. while (reader.position < end) {
  2245. const tag = reader.uint32();
  2246. switch (tag >>> 3) {
  2247. case 1:
  2248. message.int64KeyType = CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  2249. break;
  2250. case 2:
  2251. message.stringKeyType = CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  2252. break;
  2253. default:
  2254. reader.skipType(tag & 7);
  2255. break;
  2256. }
  2257. }
  2258. return message;
  2259. }
  2260. static decodeText(reader) {
  2261. const message = new CoreML.Specification.DictionaryFeatureType();
  2262. reader.start();
  2263. while (!reader.end()) {
  2264. const tag = reader.tag();
  2265. switch (tag) {
  2266. case "int64KeyType":
  2267. message.int64KeyType = CoreML.Specification.Int64FeatureType.decodeText(reader);
  2268. break;
  2269. case "stringKeyType":
  2270. message.stringKeyType = CoreML.Specification.StringFeatureType.decodeText(reader);
  2271. break;
  2272. default:
  2273. reader.field(tag, message);
  2274. break;
  2275. }
  2276. }
  2277. return message;
  2278. }
  2279. };
  2280. CoreML.Specification.SequenceFeatureType = class SequenceFeatureType {
  2281. get Type() {
  2282. CoreML.Specification.SequenceFeatureType.TypeSet = CoreML.Specification.SequenceFeatureType.TypeSet || new Set(["int64Type", "stringType"]);
  2283. return Object.keys(this).find((key) => CoreML.Specification.SequenceFeatureType.TypeSet.has(key) && this[key] !== null);
  2284. }
  2285. static decode(reader, length) {
  2286. const message = new CoreML.Specification.SequenceFeatureType();
  2287. const end = length === undefined ? reader.length : reader.position + length;
  2288. while (reader.position < end) {
  2289. const tag = reader.uint32();
  2290. switch (tag >>> 3) {
  2291. case 1:
  2292. message.int64Type = CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  2293. break;
  2294. case 3:
  2295. message.stringType = CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  2296. break;
  2297. case 101:
  2298. message.sizeRange = CoreML.Specification.SizeRange.decode(reader, reader.uint32());
  2299. break;
  2300. default:
  2301. reader.skipType(tag & 7);
  2302. break;
  2303. }
  2304. }
  2305. return message;
  2306. }
  2307. static decodeText(reader) {
  2308. const message = new CoreML.Specification.SequenceFeatureType();
  2309. reader.start();
  2310. while (!reader.end()) {
  2311. const tag = reader.tag();
  2312. switch (tag) {
  2313. case "int64Type":
  2314. message.int64Type = CoreML.Specification.Int64FeatureType.decodeText(reader);
  2315. break;
  2316. case "stringType":
  2317. message.stringType = CoreML.Specification.StringFeatureType.decodeText(reader);
  2318. break;
  2319. case "sizeRange":
  2320. message.sizeRange = CoreML.Specification.SizeRange.decodeText(reader);
  2321. break;
  2322. default:
  2323. reader.field(tag, message);
  2324. break;
  2325. }
  2326. }
  2327. return message;
  2328. }
  2329. };
  2330. CoreML.Specification.SequenceFeatureType.prototype.sizeRange = null;
  2331. CoreML.Specification.StateFeatureType = class StateFeatureType {
  2332. get Type() {
  2333. CoreML.Specification.StateFeatureType.TypeSet = CoreML.Specification.StateFeatureType.TypeSet || new Set(["arrayType"]);
  2334. return Object.keys(this).find((key) => CoreML.Specification.StateFeatureType.TypeSet.has(key) && this[key] !== null);
  2335. }
  2336. static decode(reader, length) {
  2337. const message = new CoreML.Specification.StateFeatureType();
  2338. const end = length === undefined ? reader.length : reader.position + length;
  2339. while (reader.position < end) {
  2340. const tag = reader.uint32();
  2341. switch (tag >>> 3) {
  2342. case 1:
  2343. message.arrayType = CoreML.Specification.ArrayFeatureType.decode(reader, reader.uint32());
  2344. break;
  2345. default:
  2346. reader.skipType(tag & 7);
  2347. break;
  2348. }
  2349. }
  2350. return message;
  2351. }
  2352. static decodeText(reader) {
  2353. const message = new CoreML.Specification.StateFeatureType();
  2354. reader.start();
  2355. while (!reader.end()) {
  2356. const tag = reader.tag();
  2357. switch (tag) {
  2358. case "arrayType":
  2359. message.arrayType = CoreML.Specification.ArrayFeatureType.decodeText(reader);
  2360. break;
  2361. default:
  2362. reader.field(tag, message);
  2363. break;
  2364. }
  2365. }
  2366. return message;
  2367. }
  2368. };
  2369. CoreML.Specification.FeatureType = class FeatureType {
  2370. get Type() {
  2371. CoreML.Specification.FeatureType.TypeSet = CoreML.Specification.FeatureType.TypeSet || new Set(["int64Type", "doubleType", "stringType", "imageType", "multiArrayType", "dictionaryType", "sequenceType", "stateType"]);
  2372. return Object.keys(this).find((key) => CoreML.Specification.FeatureType.TypeSet.has(key) && this[key] !== null);
  2373. }
  2374. static decode(reader, length) {
  2375. const message = new CoreML.Specification.FeatureType();
  2376. const end = length === undefined ? reader.length : reader.position + length;
  2377. while (reader.position < end) {
  2378. const tag = reader.uint32();
  2379. switch (tag >>> 3) {
  2380. case 1:
  2381. message.int64Type = CoreML.Specification.Int64FeatureType.decode(reader, reader.uint32());
  2382. break;
  2383. case 2:
  2384. message.doubleType = CoreML.Specification.DoubleFeatureType.decode(reader, reader.uint32());
  2385. break;
  2386. case 3:
  2387. message.stringType = CoreML.Specification.StringFeatureType.decode(reader, reader.uint32());
  2388. break;
  2389. case 4:
  2390. message.imageType = CoreML.Specification.ImageFeatureType.decode(reader, reader.uint32());
  2391. break;
  2392. case 5:
  2393. message.multiArrayType = CoreML.Specification.ArrayFeatureType.decode(reader, reader.uint32());
  2394. break;
  2395. case 6:
  2396. message.dictionaryType = CoreML.Specification.DictionaryFeatureType.decode(reader, reader.uint32());
  2397. break;
  2398. case 7:
  2399. message.sequenceType = CoreML.Specification.SequenceFeatureType.decode(reader, reader.uint32());
  2400. break;
  2401. case 8:
  2402. message.stateType = CoreML.Specification.StateFeatureType.decode(reader, reader.uint32());
  2403. break;
  2404. case 1000:
  2405. message.isOptional = reader.bool();
  2406. break;
  2407. default:
  2408. reader.skipType(tag & 7);
  2409. break;
  2410. }
  2411. }
  2412. return message;
  2413. }
  2414. static decodeText(reader) {
  2415. const message = new CoreML.Specification.FeatureType();
  2416. reader.start();
  2417. while (!reader.end()) {
  2418. const tag = reader.tag();
  2419. switch (tag) {
  2420. case "int64Type":
  2421. message.int64Type = CoreML.Specification.Int64FeatureType.decodeText(reader);
  2422. break;
  2423. case "doubleType":
  2424. message.doubleType = CoreML.Specification.DoubleFeatureType.decodeText(reader);
  2425. break;
  2426. case "stringType":
  2427. message.stringType = CoreML.Specification.StringFeatureType.decodeText(reader);
  2428. break;
  2429. case "imageType":
  2430. message.imageType = CoreML.Specification.ImageFeatureType.decodeText(reader);
  2431. break;
  2432. case "multiArrayType":
  2433. message.multiArrayType = CoreML.Specification.ArrayFeatureType.decodeText(reader);
  2434. break;
  2435. case "dictionaryType":
  2436. message.dictionaryType = CoreML.Specification.DictionaryFeatureType.decodeText(reader);
  2437. break;
  2438. case "sequenceType":
  2439. message.sequenceType = CoreML.Specification.SequenceFeatureType.decodeText(reader);
  2440. break;
  2441. case "stateType":
  2442. message.stateType = CoreML.Specification.StateFeatureType.decodeText(reader);
  2443. break;
  2444. case "isOptional":
  2445. message.isOptional = reader.bool();
  2446. break;
  2447. default:
  2448. reader.field(tag, message);
  2449. break;
  2450. }
  2451. }
  2452. return message;
  2453. }
  2454. };
  2455. CoreML.Specification.FeatureType.prototype.isOptional = false;
  2456. CoreML.Specification.ArrayFeatureExtractor = class ArrayFeatureExtractor {
  2457. constructor() {
  2458. this.extractIndex = [];
  2459. }
  2460. static decode(reader, length) {
  2461. const message = new CoreML.Specification.ArrayFeatureExtractor();
  2462. const end = length === undefined ? reader.length : reader.position + length;
  2463. while (reader.position < end) {
  2464. const tag = reader.uint32();
  2465. switch (tag >>> 3) {
  2466. case 1:
  2467. message.extractIndex = reader.array(message.extractIndex, () => reader.uint64(), tag);
  2468. break;
  2469. default:
  2470. reader.skipType(tag & 7);
  2471. break;
  2472. }
  2473. }
  2474. return message;
  2475. }
  2476. static decodeText(reader) {
  2477. const message = new CoreML.Specification.ArrayFeatureExtractor();
  2478. reader.start();
  2479. while (!reader.end()) {
  2480. const tag = reader.tag();
  2481. switch (tag) {
  2482. case "extractIndex":
  2483. reader.array(message.extractIndex, () => reader.uint64());
  2484. break;
  2485. default:
  2486. reader.field(tag, message);
  2487. break;
  2488. }
  2489. }
  2490. return message;
  2491. }
  2492. };
  2493. CoreML.Specification.BayesianProbitRegressor = class BayesianProbitRegressor {
  2494. constructor() {
  2495. this.features = [];
  2496. }
  2497. static decode(reader, length) {
  2498. const message = new CoreML.Specification.BayesianProbitRegressor();
  2499. const end = length === undefined ? reader.length : reader.position + length;
  2500. while (reader.position < end) {
  2501. const tag = reader.uint32();
  2502. switch (tag >>> 3) {
  2503. case 1:
  2504. message.numberOfFeatures = reader.uint32();
  2505. break;
  2506. case 2:
  2507. message.bias = CoreML.Specification.BayesianProbitRegressor.Gaussian.decode(reader, reader.uint32());
  2508. break;
  2509. case 3:
  2510. message.features.push(CoreML.Specification.BayesianProbitRegressor.FeatureWeight.decode(reader, reader.uint32()));
  2511. break;
  2512. case 10:
  2513. message.regressionInputFeatureName = reader.string();
  2514. break;
  2515. case 11:
  2516. message.optimismInputFeatureName = reader.string();
  2517. break;
  2518. case 12:
  2519. message.samplingScaleInputFeatureName = reader.string();
  2520. break;
  2521. case 13:
  2522. message.samplingTruncationInputFeatureName = reader.string();
  2523. break;
  2524. case 20:
  2525. message.meanOutputFeatureName = reader.string();
  2526. break;
  2527. case 21:
  2528. message.varianceOutputFeatureName = reader.string();
  2529. break;
  2530. case 22:
  2531. message.pessimisticProbabilityOutputFeatureName = reader.string();
  2532. break;
  2533. case 23:
  2534. message.sampledProbabilityOutputFeatureName = reader.string();
  2535. break;
  2536. default:
  2537. reader.skipType(tag & 7);
  2538. break;
  2539. }
  2540. }
  2541. return message;
  2542. }
  2543. static decodeText(reader) {
  2544. const message = new CoreML.Specification.BayesianProbitRegressor();
  2545. reader.start();
  2546. while (!reader.end()) {
  2547. const tag = reader.tag();
  2548. switch (tag) {
  2549. case "numberOfFeatures":
  2550. message.numberOfFeatures = reader.uint32();
  2551. break;
  2552. case "bias":
  2553. message.bias = CoreML.Specification.BayesianProbitRegressor.Gaussian.decodeText(reader);
  2554. break;
  2555. case "features":
  2556. message.features.push(CoreML.Specification.BayesianProbitRegressor.FeatureWeight.decodeText(reader));
  2557. break;
  2558. case "regressionInputFeatureName":
  2559. message.regressionInputFeatureName = reader.string();
  2560. break;
  2561. case "optimismInputFeatureName":
  2562. message.optimismInputFeatureName = reader.string();
  2563. break;
  2564. case "samplingScaleInputFeatureName":
  2565. message.samplingScaleInputFeatureName = reader.string();
  2566. break;
  2567. case "samplingTruncationInputFeatureName":
  2568. message.samplingTruncationInputFeatureName = reader.string();
  2569. break;
  2570. case "meanOutputFeatureName":
  2571. message.meanOutputFeatureName = reader.string();
  2572. break;
  2573. case "varianceOutputFeatureName":
  2574. message.varianceOutputFeatureName = reader.string();
  2575. break;
  2576. case "pessimisticProbabilityOutputFeatureName":
  2577. message.pessimisticProbabilityOutputFeatureName = reader.string();
  2578. break;
  2579. case "sampledProbabilityOutputFeatureName":
  2580. message.sampledProbabilityOutputFeatureName = reader.string();
  2581. break;
  2582. default:
  2583. reader.field(tag, message);
  2584. break;
  2585. }
  2586. }
  2587. return message;
  2588. }
  2589. };
  2590. CoreML.Specification.BayesianProbitRegressor.prototype.numberOfFeatures = 0;
  2591. CoreML.Specification.BayesianProbitRegressor.prototype.bias = null;
  2592. CoreML.Specification.BayesianProbitRegressor.prototype.regressionInputFeatureName = "";
  2593. CoreML.Specification.BayesianProbitRegressor.prototype.optimismInputFeatureName = "";
  2594. CoreML.Specification.BayesianProbitRegressor.prototype.samplingScaleInputFeatureName = "";
  2595. CoreML.Specification.BayesianProbitRegressor.prototype.samplingTruncationInputFeatureName = "";
  2596. CoreML.Specification.BayesianProbitRegressor.prototype.meanOutputFeatureName = "";
  2597. CoreML.Specification.BayesianProbitRegressor.prototype.varianceOutputFeatureName = "";
  2598. CoreML.Specification.BayesianProbitRegressor.prototype.pessimisticProbabilityOutputFeatureName = "";
  2599. CoreML.Specification.BayesianProbitRegressor.prototype.sampledProbabilityOutputFeatureName = "";
  2600. CoreML.Specification.BayesianProbitRegressor.Gaussian = class Gaussian {
  2601. static decode(reader, length) {
  2602. const message = new CoreML.Specification.BayesianProbitRegressor.Gaussian();
  2603. const end = length === undefined ? reader.length : reader.position + length;
  2604. while (reader.position < end) {
  2605. const tag = reader.uint32();
  2606. switch (tag >>> 3) {
  2607. case 1:
  2608. message.mean = reader.double();
  2609. break;
  2610. case 2:
  2611. message.precision = reader.double();
  2612. break;
  2613. default:
  2614. reader.skipType(tag & 7);
  2615. break;
  2616. }
  2617. }
  2618. return message;
  2619. }
  2620. static decodeText(reader) {
  2621. const message = new CoreML.Specification.BayesianProbitRegressor.Gaussian();
  2622. reader.start();
  2623. while (!reader.end()) {
  2624. const tag = reader.tag();
  2625. switch (tag) {
  2626. case "mean":
  2627. message.mean = reader.double();
  2628. break;
  2629. case "precision":
  2630. message.precision = reader.double();
  2631. break;
  2632. default:
  2633. reader.field(tag, message);
  2634. break;
  2635. }
  2636. }
  2637. return message;
  2638. }
  2639. };
  2640. CoreML.Specification.BayesianProbitRegressor.Gaussian.prototype.mean = 0;
  2641. CoreML.Specification.BayesianProbitRegressor.Gaussian.prototype.precision = 0;
  2642. CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight = class FeatureValueWeight {
  2643. static decode(reader, length) {
  2644. const message = new CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight();
  2645. const end = length === undefined ? reader.length : reader.position + length;
  2646. while (reader.position < end) {
  2647. const tag = reader.uint32();
  2648. switch (tag >>> 3) {
  2649. case 1:
  2650. message.featureValue = reader.uint32();
  2651. break;
  2652. case 2:
  2653. message.featureWeight = CoreML.Specification.BayesianProbitRegressor.Gaussian.decode(reader, reader.uint32());
  2654. break;
  2655. default:
  2656. reader.skipType(tag & 7);
  2657. break;
  2658. }
  2659. }
  2660. return message;
  2661. }
  2662. static decodeText(reader) {
  2663. const message = new CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight();
  2664. reader.start();
  2665. while (!reader.end()) {
  2666. const tag = reader.tag();
  2667. switch (tag) {
  2668. case "featureValue":
  2669. message.featureValue = reader.uint32();
  2670. break;
  2671. case "featureWeight":
  2672. message.featureWeight = CoreML.Specification.BayesianProbitRegressor.Gaussian.decodeText(reader);
  2673. break;
  2674. default:
  2675. reader.field(tag, message);
  2676. break;
  2677. }
  2678. }
  2679. return message;
  2680. }
  2681. };
  2682. CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.prototype.featureValue = 0;
  2683. CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.prototype.featureWeight = null;
  2684. CoreML.Specification.BayesianProbitRegressor.FeatureWeight = class FeatureWeight {
  2685. constructor() {
  2686. this.weights = [];
  2687. }
  2688. static decode(reader, length) {
  2689. const message = new CoreML.Specification.BayesianProbitRegressor.FeatureWeight();
  2690. const end = length === undefined ? reader.length : reader.position + length;
  2691. while (reader.position < end) {
  2692. const tag = reader.uint32();
  2693. switch (tag >>> 3) {
  2694. case 1:
  2695. message.featureId = reader.uint32();
  2696. break;
  2697. case 2:
  2698. message.weights.push(CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.decode(reader, reader.uint32()));
  2699. break;
  2700. default:
  2701. reader.skipType(tag & 7);
  2702. break;
  2703. }
  2704. }
  2705. return message;
  2706. }
  2707. static decodeText(reader) {
  2708. const message = new CoreML.Specification.BayesianProbitRegressor.FeatureWeight();
  2709. reader.start();
  2710. while (!reader.end()) {
  2711. const tag = reader.tag();
  2712. switch (tag) {
  2713. case "featureId":
  2714. message.featureId = reader.uint32();
  2715. break;
  2716. case "weights":
  2717. message.weights.push(CoreML.Specification.BayesianProbitRegressor.FeatureValueWeight.decodeText(reader));
  2718. break;
  2719. default:
  2720. reader.field(tag, message);
  2721. break;
  2722. }
  2723. }
  2724. return message;
  2725. }
  2726. };
  2727. CoreML.Specification.BayesianProbitRegressor.FeatureWeight.prototype.featureId = 0;
  2728. CoreML.Specification.CategoricalMapping = class CategoricalMapping {
  2729. get MappingType() {
  2730. CoreML.Specification.CategoricalMapping.MappingTypeSet = CoreML.Specification.CategoricalMapping.MappingTypeSet || new Set(["stringToInt64Map", "int64ToStringMap"]);
  2731. return Object.keys(this).find((key) => CoreML.Specification.CategoricalMapping.MappingTypeSet.has(key) && this[key] !== null);
  2732. }
  2733. get ValueOnUnknown() {
  2734. CoreML.Specification.CategoricalMapping.ValueOnUnknownSet = CoreML.Specification.CategoricalMapping.ValueOnUnknownSet || new Set(["strValue", "int64Value"]);
  2735. return Object.keys(this).find((key) => CoreML.Specification.CategoricalMapping.ValueOnUnknownSet.has(key) && this[key] !== null);
  2736. }
  2737. static decode(reader, length) {
  2738. const message = new CoreML.Specification.CategoricalMapping();
  2739. const end = length === undefined ? reader.length : reader.position + length;
  2740. while (reader.position < end) {
  2741. const tag = reader.uint32();
  2742. switch (tag >>> 3) {
  2743. case 1:
  2744. message.stringToInt64Map = CoreML.Specification.StringToInt64Map.decode(reader, reader.uint32());
  2745. break;
  2746. case 2:
  2747. message.int64ToStringMap = CoreML.Specification.Int64ToStringMap.decode(reader, reader.uint32());
  2748. break;
  2749. case 101:
  2750. message.strValue = reader.string();
  2751. break;
  2752. case 102:
  2753. message.int64Value = reader.int64();
  2754. break;
  2755. default:
  2756. reader.skipType(tag & 7);
  2757. break;
  2758. }
  2759. }
  2760. return message;
  2761. }
  2762. static decodeText(reader) {
  2763. const message = new CoreML.Specification.CategoricalMapping();
  2764. reader.start();
  2765. while (!reader.end()) {
  2766. const tag = reader.tag();
  2767. switch (tag) {
  2768. case "stringToInt64Map":
  2769. message.stringToInt64Map = CoreML.Specification.StringToInt64Map.decodeText(reader);
  2770. break;
  2771. case "int64ToStringMap":
  2772. message.int64ToStringMap = CoreML.Specification.Int64ToStringMap.decodeText(reader);
  2773. break;
  2774. case "strValue":
  2775. message.strValue = reader.string();
  2776. break;
  2777. case "int64Value":
  2778. message.int64Value = reader.int64();
  2779. break;
  2780. default:
  2781. reader.field(tag, message);
  2782. break;
  2783. }
  2784. }
  2785. return message;
  2786. }
  2787. };
  2788. CoreML.Specification.CustomModel = class CustomModel {
  2789. constructor() {
  2790. this.parameters = {};
  2791. }
  2792. static decode(reader, length) {
  2793. const message = new CoreML.Specification.CustomModel();
  2794. const end = length === undefined ? reader.length : reader.position + length;
  2795. while (reader.position < end) {
  2796. const tag = reader.uint32();
  2797. switch (tag >>> 3) {
  2798. case 10:
  2799. message.className = reader.string();
  2800. break;
  2801. case 30:
  2802. reader.entry(message.parameters, () => reader.string(), () => CoreML.Specification.CustomModel.CustomModelParamValue.decode(reader, reader.uint32()));
  2803. break;
  2804. case 40:
  2805. message.description = reader.string();
  2806. break;
  2807. default:
  2808. reader.skipType(tag & 7);
  2809. break;
  2810. }
  2811. }
  2812. return message;
  2813. }
  2814. static decodeText(reader) {
  2815. const message = new CoreML.Specification.CustomModel();
  2816. reader.start();
  2817. while (!reader.end()) {
  2818. const tag = reader.tag();
  2819. switch (tag) {
  2820. case "className":
  2821. message.className = reader.string();
  2822. break;
  2823. case "parameters":
  2824. reader.entry(message.parameters, () => reader.string(), () => CoreML.Specification.CustomModel.CustomModelParamValue.decodeText(reader));
  2825. break;
  2826. case "description":
  2827. message.description = reader.string();
  2828. break;
  2829. default:
  2830. reader.field(tag, message);
  2831. break;
  2832. }
  2833. }
  2834. return message;
  2835. }
  2836. };
  2837. CoreML.Specification.CustomModel.prototype.className = "";
  2838. CoreML.Specification.CustomModel.prototype.description = "";
  2839. CoreML.Specification.CustomModel.CustomModelParamValue = class CustomModelParamValue {
  2840. get value() {
  2841. CoreML.Specification.CustomModel.CustomModelParamValue.valueSet = CoreML.Specification.CustomModel.CustomModelParamValue.valueSet || new Set(["doubleValue", "stringValue", "intValue", "longValue", "boolValue", "bytesValue"]);
  2842. return Object.keys(this).find((key) => CoreML.Specification.CustomModel.CustomModelParamValue.valueSet.has(key) && this[key] !== null);
  2843. }
  2844. static decode(reader, length) {
  2845. const message = new CoreML.Specification.CustomModel.CustomModelParamValue();
  2846. const end = length === undefined ? reader.length : reader.position + length;
  2847. while (reader.position < end) {
  2848. const tag = reader.uint32();
  2849. switch (tag >>> 3) {
  2850. case 10:
  2851. message.doubleValue = reader.double();
  2852. break;
  2853. case 20:
  2854. message.stringValue = reader.string();
  2855. break;
  2856. case 30:
  2857. message.intValue = reader.int32();
  2858. break;
  2859. case 40:
  2860. message.longValue = reader.int64();
  2861. break;
  2862. case 50:
  2863. message.boolValue = reader.bool();
  2864. break;
  2865. case 60:
  2866. message.bytesValue = reader.bytes();
  2867. break;
  2868. default:
  2869. reader.skipType(tag & 7);
  2870. break;
  2871. }
  2872. }
  2873. return message;
  2874. }
  2875. static decodeText(reader) {
  2876. const message = new CoreML.Specification.CustomModel.CustomModelParamValue();
  2877. reader.start();
  2878. while (!reader.end()) {
  2879. const tag = reader.tag();
  2880. switch (tag) {
  2881. case "doubleValue":
  2882. message.doubleValue = reader.double();
  2883. break;
  2884. case "stringValue":
  2885. message.stringValue = reader.string();
  2886. break;
  2887. case "intValue":
  2888. message.intValue = reader.int32();
  2889. break;
  2890. case "longValue":
  2891. message.longValue = reader.int64();
  2892. break;
  2893. case "boolValue":
  2894. message.boolValue = reader.bool();
  2895. break;
  2896. case "bytesValue":
  2897. message.bytesValue = reader.bytes();
  2898. break;
  2899. default:
  2900. reader.field(tag, message);
  2901. break;
  2902. }
  2903. }
  2904. return message;
  2905. }
  2906. };
  2907. CoreML.Specification.DictVectorizer = class DictVectorizer {
  2908. get Map() {
  2909. CoreML.Specification.DictVectorizer.MapSet = CoreML.Specification.DictVectorizer.MapSet || new Set(["stringToIndex", "int64ToIndex"]);
  2910. return Object.keys(this).find((key) => CoreML.Specification.DictVectorizer.MapSet.has(key) && this[key] !== null);
  2911. }
  2912. static decode(reader, length) {
  2913. const message = new CoreML.Specification.DictVectorizer();
  2914. const end = length === undefined ? reader.length : reader.position + length;
  2915. while (reader.position < end) {
  2916. const tag = reader.uint32();
  2917. switch (tag >>> 3) {
  2918. case 1:
  2919. message.stringToIndex = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  2920. break;
  2921. case 2:
  2922. message.int64ToIndex = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  2923. break;
  2924. default:
  2925. reader.skipType(tag & 7);
  2926. break;
  2927. }
  2928. }
  2929. return message;
  2930. }
  2931. static decodeText(reader) {
  2932. const message = new CoreML.Specification.DictVectorizer();
  2933. reader.start();
  2934. while (!reader.end()) {
  2935. const tag = reader.tag();
  2936. switch (tag) {
  2937. case "stringToIndex":
  2938. message.stringToIndex = CoreML.Specification.StringVector.decodeText(reader);
  2939. break;
  2940. case "int64ToIndex":
  2941. message.int64ToIndex = CoreML.Specification.Int64Vector.decodeText(reader);
  2942. break;
  2943. default:
  2944. reader.field(tag, message);
  2945. break;
  2946. }
  2947. }
  2948. return message;
  2949. }
  2950. };
  2951. CoreML.Specification.FeatureVectorizer = class FeatureVectorizer {
  2952. constructor() {
  2953. this.inputList = [];
  2954. }
  2955. static decode(reader, length) {
  2956. const message = new CoreML.Specification.FeatureVectorizer();
  2957. const end = length === undefined ? reader.length : reader.position + length;
  2958. while (reader.position < end) {
  2959. const tag = reader.uint32();
  2960. switch (tag >>> 3) {
  2961. case 1:
  2962. message.inputList.push(CoreML.Specification.FeatureVectorizer.InputColumn.decode(reader, reader.uint32()));
  2963. break;
  2964. default:
  2965. reader.skipType(tag & 7);
  2966. break;
  2967. }
  2968. }
  2969. return message;
  2970. }
  2971. static decodeText(reader) {
  2972. const message = new CoreML.Specification.FeatureVectorizer();
  2973. reader.start();
  2974. while (!reader.end()) {
  2975. const tag = reader.tag();
  2976. switch (tag) {
  2977. case "inputList":
  2978. message.inputList.push(CoreML.Specification.FeatureVectorizer.InputColumn.decodeText(reader));
  2979. break;
  2980. default:
  2981. reader.field(tag, message);
  2982. break;
  2983. }
  2984. }
  2985. return message;
  2986. }
  2987. };
  2988. CoreML.Specification.FeatureVectorizer.InputColumn = class InputColumn {
  2989. static decode(reader, length) {
  2990. const message = new CoreML.Specification.FeatureVectorizer.InputColumn();
  2991. const end = length === undefined ? reader.length : reader.position + length;
  2992. while (reader.position < end) {
  2993. const tag = reader.uint32();
  2994. switch (tag >>> 3) {
  2995. case 1:
  2996. message.inputColumn = reader.string();
  2997. break;
  2998. case 2:
  2999. message.inputDimensions = reader.uint64();
  3000. break;
  3001. default:
  3002. reader.skipType(tag & 7);
  3003. break;
  3004. }
  3005. }
  3006. return message;
  3007. }
  3008. static decodeText(reader) {
  3009. const message = new CoreML.Specification.FeatureVectorizer.InputColumn();
  3010. reader.start();
  3011. while (!reader.end()) {
  3012. const tag = reader.tag();
  3013. switch (tag) {
  3014. case "inputColumn":
  3015. message.inputColumn = reader.string();
  3016. break;
  3017. case "inputDimensions":
  3018. message.inputDimensions = reader.uint64();
  3019. break;
  3020. default:
  3021. reader.field(tag, message);
  3022. break;
  3023. }
  3024. }
  3025. return message;
  3026. }
  3027. };
  3028. CoreML.Specification.FeatureVectorizer.InputColumn.prototype.inputColumn = "";
  3029. CoreML.Specification.FeatureVectorizer.InputColumn.prototype.inputDimensions = 0n;
  3030. CoreML.Specification.GLMRegressor = class GLMRegressor {
  3031. constructor() {
  3032. this.weights = [];
  3033. this.offset = [];
  3034. }
  3035. static decode(reader, length) {
  3036. const message = new CoreML.Specification.GLMRegressor();
  3037. const end = length === undefined ? reader.length : reader.position + length;
  3038. while (reader.position < end) {
  3039. const tag = reader.uint32();
  3040. switch (tag >>> 3) {
  3041. case 1:
  3042. message.weights.push(CoreML.Specification.GLMRegressor.DoubleArray.decode(reader, reader.uint32()));
  3043. break;
  3044. case 2:
  3045. message.offset = reader.doubles(message.offset, tag);
  3046. break;
  3047. case 3:
  3048. message.postEvaluationTransform = reader.int32();
  3049. break;
  3050. default:
  3051. reader.skipType(tag & 7);
  3052. break;
  3053. }
  3054. }
  3055. return message;
  3056. }
  3057. static decodeText(reader) {
  3058. const message = new CoreML.Specification.GLMRegressor();
  3059. reader.start();
  3060. while (!reader.end()) {
  3061. const tag = reader.tag();
  3062. switch (tag) {
  3063. case "weights":
  3064. message.weights.push(CoreML.Specification.GLMRegressor.DoubleArray.decodeText(reader));
  3065. break;
  3066. case "offset":
  3067. reader.array(message.offset, () => reader.double());
  3068. break;
  3069. case "postEvaluationTransform":
  3070. message.postEvaluationTransform = reader.enum(CoreML.Specification.GLMRegressor.PostEvaluationTransform);
  3071. break;
  3072. default:
  3073. reader.field(tag, message);
  3074. break;
  3075. }
  3076. }
  3077. return message;
  3078. }
  3079. };
  3080. CoreML.Specification.GLMRegressor.prototype.postEvaluationTransform = 0;
  3081. CoreML.Specification.GLMRegressor.DoubleArray = class DoubleArray {
  3082. constructor() {
  3083. this.value = [];
  3084. }
  3085. static decode(reader, length) {
  3086. const message = new CoreML.Specification.GLMRegressor.DoubleArray();
  3087. const end = length === undefined ? reader.length : reader.position + length;
  3088. while (reader.position < end) {
  3089. const tag = reader.uint32();
  3090. switch (tag >>> 3) {
  3091. case 1:
  3092. message.value = reader.doubles(message.value, tag);
  3093. break;
  3094. default:
  3095. reader.skipType(tag & 7);
  3096. break;
  3097. }
  3098. }
  3099. return message;
  3100. }
  3101. static decodeText(reader) {
  3102. const message = new CoreML.Specification.GLMRegressor.DoubleArray();
  3103. reader.start();
  3104. while (!reader.end()) {
  3105. const tag = reader.tag();
  3106. switch (tag) {
  3107. case "value":
  3108. reader.array(message.value, () => reader.double());
  3109. break;
  3110. default:
  3111. reader.field(tag, message);
  3112. break;
  3113. }
  3114. }
  3115. return message;
  3116. }
  3117. };
  3118. CoreML.Specification.GLMRegressor.PostEvaluationTransform = {
  3119. "NoTransform": 0,
  3120. "Logit": 1,
  3121. "Probit": 2
  3122. };
  3123. CoreML.Specification.GLMClassifier = class GLMClassifier {
  3124. constructor() {
  3125. this.weights = [];
  3126. this.offset = [];
  3127. }
  3128. get ClassLabels() {
  3129. CoreML.Specification.GLMClassifier.ClassLabelsSet = CoreML.Specification.GLMClassifier.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  3130. return Object.keys(this).find((key) => CoreML.Specification.GLMClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  3131. }
  3132. static decode(reader, length) {
  3133. const message = new CoreML.Specification.GLMClassifier();
  3134. const end = length === undefined ? reader.length : reader.position + length;
  3135. while (reader.position < end) {
  3136. const tag = reader.uint32();
  3137. switch (tag >>> 3) {
  3138. case 1:
  3139. message.weights.push(CoreML.Specification.GLMClassifier.DoubleArray.decode(reader, reader.uint32()));
  3140. break;
  3141. case 2:
  3142. message.offset = reader.doubles(message.offset, tag);
  3143. break;
  3144. case 3:
  3145. message.postEvaluationTransform = reader.int32();
  3146. break;
  3147. case 4:
  3148. message.classEncoding = reader.int32();
  3149. break;
  3150. case 100:
  3151. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  3152. break;
  3153. case 101:
  3154. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  3155. break;
  3156. default:
  3157. reader.skipType(tag & 7);
  3158. break;
  3159. }
  3160. }
  3161. return message;
  3162. }
  3163. static decodeText(reader) {
  3164. const message = new CoreML.Specification.GLMClassifier();
  3165. reader.start();
  3166. while (!reader.end()) {
  3167. const tag = reader.tag();
  3168. switch (tag) {
  3169. case "weights":
  3170. message.weights.push(CoreML.Specification.GLMClassifier.DoubleArray.decodeText(reader));
  3171. break;
  3172. case "offset":
  3173. reader.array(message.offset, () => reader.double());
  3174. break;
  3175. case "postEvaluationTransform":
  3176. message.postEvaluationTransform = reader.enum(CoreML.Specification.GLMClassifier.PostEvaluationTransform);
  3177. break;
  3178. case "classEncoding":
  3179. message.classEncoding = reader.enum(CoreML.Specification.GLMClassifier.ClassEncoding);
  3180. break;
  3181. case "stringClassLabels":
  3182. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  3183. break;
  3184. case "int64ClassLabels":
  3185. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  3186. break;
  3187. default:
  3188. reader.field(tag, message);
  3189. break;
  3190. }
  3191. }
  3192. return message;
  3193. }
  3194. };
  3195. CoreML.Specification.GLMClassifier.prototype.postEvaluationTransform = 0;
  3196. CoreML.Specification.GLMClassifier.prototype.classEncoding = 0;
  3197. CoreML.Specification.GLMClassifier.DoubleArray = class DoubleArray {
  3198. constructor() {
  3199. this.value = [];
  3200. }
  3201. static decode(reader, length) {
  3202. const message = new CoreML.Specification.GLMClassifier.DoubleArray();
  3203. const end = length === undefined ? reader.length : reader.position + length;
  3204. while (reader.position < end) {
  3205. const tag = reader.uint32();
  3206. switch (tag >>> 3) {
  3207. case 1:
  3208. message.value = reader.doubles(message.value, tag);
  3209. break;
  3210. default:
  3211. reader.skipType(tag & 7);
  3212. break;
  3213. }
  3214. }
  3215. return message;
  3216. }
  3217. static decodeText(reader) {
  3218. const message = new CoreML.Specification.GLMClassifier.DoubleArray();
  3219. reader.start();
  3220. while (!reader.end()) {
  3221. const tag = reader.tag();
  3222. switch (tag) {
  3223. case "value":
  3224. reader.array(message.value, () => reader.double());
  3225. break;
  3226. default:
  3227. reader.field(tag, message);
  3228. break;
  3229. }
  3230. }
  3231. return message;
  3232. }
  3233. };
  3234. CoreML.Specification.GLMClassifier.PostEvaluationTransform = {
  3235. "Logit": 0,
  3236. "Probit": 1
  3237. };
  3238. CoreML.Specification.GLMClassifier.ClassEncoding = {
  3239. "ReferenceClass": 0,
  3240. "OneVsRest": 1
  3241. };
  3242. CoreML.Specification.KNearestNeighborsClassifier = class KNearestNeighborsClassifier {
  3243. get ClassLabels() {
  3244. CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet = CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  3245. return Object.keys(this).find((key) => CoreML.Specification.KNearestNeighborsClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  3246. }
  3247. get DefaultClassLabel() {
  3248. CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet = CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet || new Set(["defaultStringLabel", "defaultInt64Label"]);
  3249. return Object.keys(this).find((key) => CoreML.Specification.KNearestNeighborsClassifier.DefaultClassLabelSet.has(key) && this[key] !== null);
  3250. }
  3251. get WeightingScheme() {
  3252. CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet = CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet || new Set(["uniformWeighting", "inverseDistanceWeighting"]);
  3253. return Object.keys(this).find((key) => CoreML.Specification.KNearestNeighborsClassifier.WeightingSchemeSet.has(key) && this[key] !== null);
  3254. }
  3255. static decode(reader, length) {
  3256. const message = new CoreML.Specification.KNearestNeighborsClassifier();
  3257. const end = length === undefined ? reader.length : reader.position + length;
  3258. while (reader.position < end) {
  3259. const tag = reader.uint32();
  3260. switch (tag >>> 3) {
  3261. case 1:
  3262. message.nearestNeighborsIndex = CoreML.Specification.NearestNeighborsIndex.decode(reader, reader.uint32());
  3263. break;
  3264. case 3:
  3265. message.numberOfNeighbors = CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  3266. break;
  3267. case 100:
  3268. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  3269. break;
  3270. case 101:
  3271. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  3272. break;
  3273. case 110:
  3274. message.defaultStringLabel = reader.string();
  3275. break;
  3276. case 111:
  3277. message.defaultInt64Label = reader.int64();
  3278. break;
  3279. case 200:
  3280. message.uniformWeighting = CoreML.Specification.UniformWeighting.decode(reader, reader.uint32());
  3281. break;
  3282. case 210:
  3283. message.inverseDistanceWeighting = CoreML.Specification.InverseDistanceWeighting.decode(reader, reader.uint32());
  3284. break;
  3285. default:
  3286. reader.skipType(tag & 7);
  3287. break;
  3288. }
  3289. }
  3290. return message;
  3291. }
  3292. static decodeText(reader) {
  3293. const message = new CoreML.Specification.KNearestNeighborsClassifier();
  3294. reader.start();
  3295. while (!reader.end()) {
  3296. const tag = reader.tag();
  3297. switch (tag) {
  3298. case "nearestNeighborsIndex":
  3299. message.nearestNeighborsIndex = CoreML.Specification.NearestNeighborsIndex.decodeText(reader);
  3300. break;
  3301. case "numberOfNeighbors":
  3302. message.numberOfNeighbors = CoreML.Specification.Int64Parameter.decodeText(reader);
  3303. break;
  3304. case "stringClassLabels":
  3305. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  3306. break;
  3307. case "int64ClassLabels":
  3308. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  3309. break;
  3310. case "defaultStringLabel":
  3311. message.defaultStringLabel = reader.string();
  3312. break;
  3313. case "defaultInt64Label":
  3314. message.defaultInt64Label = reader.int64();
  3315. break;
  3316. case "uniformWeighting":
  3317. message.uniformWeighting = CoreML.Specification.UniformWeighting.decodeText(reader);
  3318. break;
  3319. case "inverseDistanceWeighting":
  3320. message.inverseDistanceWeighting = CoreML.Specification.InverseDistanceWeighting.decodeText(reader);
  3321. break;
  3322. default:
  3323. reader.field(tag, message);
  3324. break;
  3325. }
  3326. }
  3327. return message;
  3328. }
  3329. };
  3330. CoreML.Specification.KNearestNeighborsClassifier.prototype.nearestNeighborsIndex = null;
  3331. CoreML.Specification.KNearestNeighborsClassifier.prototype.numberOfNeighbors = null;
  3332. CoreML.Specification.NearestNeighborsIndex = class NearestNeighborsIndex {
  3333. constructor() {
  3334. this.floatSamples = [];
  3335. }
  3336. get IndexType() {
  3337. CoreML.Specification.NearestNeighborsIndex.IndexTypeSet = CoreML.Specification.NearestNeighborsIndex.IndexTypeSet || new Set(["linearIndex", "singleKdTreeIndex"]);
  3338. return Object.keys(this).find((key) => CoreML.Specification.NearestNeighborsIndex.IndexTypeSet.has(key) && this[key] !== null);
  3339. }
  3340. get DistanceFunction() {
  3341. CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet = CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet || new Set(["squaredEuclideanDistance"]);
  3342. return Object.keys(this).find((key) => CoreML.Specification.NearestNeighborsIndex.DistanceFunctionSet.has(key) && this[key] !== null);
  3343. }
  3344. static decode(reader, length) {
  3345. const message = new CoreML.Specification.NearestNeighborsIndex();
  3346. const end = length === undefined ? reader.length : reader.position + length;
  3347. while (reader.position < end) {
  3348. const tag = reader.uint32();
  3349. switch (tag >>> 3) {
  3350. case 1:
  3351. message.numberOfDimensions = reader.int32();
  3352. break;
  3353. case 2:
  3354. message.floatSamples.push(CoreML.Specification.FloatVector.decode(reader, reader.uint32()));
  3355. break;
  3356. case 100:
  3357. message.linearIndex = CoreML.Specification.LinearIndex.decode(reader, reader.uint32());
  3358. break;
  3359. case 110:
  3360. message.singleKdTreeIndex = CoreML.Specification.SingleKdTreeIndex.decode(reader, reader.uint32());
  3361. break;
  3362. case 200:
  3363. message.squaredEuclideanDistance = CoreML.Specification.SquaredEuclideanDistance.decode(reader, reader.uint32());
  3364. break;
  3365. default:
  3366. reader.skipType(tag & 7);
  3367. break;
  3368. }
  3369. }
  3370. return message;
  3371. }
  3372. static decodeText(reader) {
  3373. const message = new CoreML.Specification.NearestNeighborsIndex();
  3374. reader.start();
  3375. while (!reader.end()) {
  3376. const tag = reader.tag();
  3377. switch (tag) {
  3378. case "numberOfDimensions":
  3379. message.numberOfDimensions = reader.int32();
  3380. break;
  3381. case "floatSamples":
  3382. message.floatSamples.push(CoreML.Specification.FloatVector.decodeText(reader));
  3383. break;
  3384. case "linearIndex":
  3385. message.linearIndex = CoreML.Specification.LinearIndex.decodeText(reader);
  3386. break;
  3387. case "singleKdTreeIndex":
  3388. message.singleKdTreeIndex = CoreML.Specification.SingleKdTreeIndex.decodeText(reader);
  3389. break;
  3390. case "squaredEuclideanDistance":
  3391. message.squaredEuclideanDistance = CoreML.Specification.SquaredEuclideanDistance.decodeText(reader);
  3392. break;
  3393. default:
  3394. reader.field(tag, message);
  3395. break;
  3396. }
  3397. }
  3398. return message;
  3399. }
  3400. };
  3401. CoreML.Specification.NearestNeighborsIndex.prototype.numberOfDimensions = 0;
  3402. CoreML.Specification.UniformWeighting = class UniformWeighting {
  3403. static decode(reader, length) {
  3404. const message = new CoreML.Specification.UniformWeighting();
  3405. const end = length === undefined ? reader.length : reader.position + length;
  3406. while (reader.position < end) {
  3407. const tag = reader.uint32();
  3408. switch (tag >>> 3) {
  3409. default:
  3410. reader.skipType(tag & 7);
  3411. break;
  3412. }
  3413. }
  3414. return message;
  3415. }
  3416. static decodeText(reader) {
  3417. const message = new CoreML.Specification.UniformWeighting();
  3418. reader.start();
  3419. while (!reader.end()) {
  3420. const tag = reader.tag();
  3421. switch (tag) {
  3422. default:
  3423. reader.field(tag, message);
  3424. break;
  3425. }
  3426. }
  3427. return message;
  3428. }
  3429. };
  3430. CoreML.Specification.InverseDistanceWeighting = class InverseDistanceWeighting {
  3431. static decode(reader, length) {
  3432. const message = new CoreML.Specification.InverseDistanceWeighting();
  3433. const end = length === undefined ? reader.length : reader.position + length;
  3434. while (reader.position < end) {
  3435. const tag = reader.uint32();
  3436. switch (tag >>> 3) {
  3437. default:
  3438. reader.skipType(tag & 7);
  3439. break;
  3440. }
  3441. }
  3442. return message;
  3443. }
  3444. static decodeText(reader) {
  3445. const message = new CoreML.Specification.InverseDistanceWeighting();
  3446. reader.start();
  3447. while (!reader.end()) {
  3448. const tag = reader.tag();
  3449. switch (tag) {
  3450. default:
  3451. reader.field(tag, message);
  3452. break;
  3453. }
  3454. }
  3455. return message;
  3456. }
  3457. };
  3458. CoreML.Specification.LinearIndex = class LinearIndex {
  3459. static decode(reader, length) {
  3460. const message = new CoreML.Specification.LinearIndex();
  3461. const end = length === undefined ? reader.length : reader.position + length;
  3462. while (reader.position < end) {
  3463. const tag = reader.uint32();
  3464. switch (tag >>> 3) {
  3465. default:
  3466. reader.skipType(tag & 7);
  3467. break;
  3468. }
  3469. }
  3470. return message;
  3471. }
  3472. static decodeText(reader) {
  3473. const message = new CoreML.Specification.LinearIndex();
  3474. reader.start();
  3475. while (!reader.end()) {
  3476. const tag = reader.tag();
  3477. switch (tag) {
  3478. default:
  3479. reader.field(tag, message);
  3480. break;
  3481. }
  3482. }
  3483. return message;
  3484. }
  3485. };
  3486. CoreML.Specification.SingleKdTreeIndex = class SingleKdTreeIndex {
  3487. static decode(reader, length) {
  3488. const message = new CoreML.Specification.SingleKdTreeIndex();
  3489. const end = length === undefined ? reader.length : reader.position + length;
  3490. while (reader.position < end) {
  3491. const tag = reader.uint32();
  3492. switch (tag >>> 3) {
  3493. case 1:
  3494. message.leafSize = reader.int32();
  3495. break;
  3496. default:
  3497. reader.skipType(tag & 7);
  3498. break;
  3499. }
  3500. }
  3501. return message;
  3502. }
  3503. static decodeText(reader) {
  3504. const message = new CoreML.Specification.SingleKdTreeIndex();
  3505. reader.start();
  3506. while (!reader.end()) {
  3507. const tag = reader.tag();
  3508. switch (tag) {
  3509. case "leafSize":
  3510. message.leafSize = reader.int32();
  3511. break;
  3512. default:
  3513. reader.field(tag, message);
  3514. break;
  3515. }
  3516. }
  3517. return message;
  3518. }
  3519. };
  3520. CoreML.Specification.SingleKdTreeIndex.prototype.leafSize = 0;
  3521. CoreML.Specification.SquaredEuclideanDistance = class SquaredEuclideanDistance {
  3522. static decode(reader, length) {
  3523. const message = new CoreML.Specification.SquaredEuclideanDistance();
  3524. const end = length === undefined ? reader.length : reader.position + length;
  3525. while (reader.position < end) {
  3526. const tag = reader.uint32();
  3527. switch (tag >>> 3) {
  3528. default:
  3529. reader.skipType(tag & 7);
  3530. break;
  3531. }
  3532. }
  3533. return message;
  3534. }
  3535. static decodeText(reader) {
  3536. const message = new CoreML.Specification.SquaredEuclideanDistance();
  3537. reader.start();
  3538. while (!reader.end()) {
  3539. const tag = reader.tag();
  3540. switch (tag) {
  3541. default:
  3542. reader.field(tag, message);
  3543. break;
  3544. }
  3545. }
  3546. return message;
  3547. }
  3548. };
  3549. CoreML.Specification.Int64Parameter = class Int64Parameter {
  3550. get AllowedValues() {
  3551. CoreML.Specification.Int64Parameter.AllowedValuesSet = CoreML.Specification.Int64Parameter.AllowedValuesSet || new Set(["range", "set"]);
  3552. return Object.keys(this).find((key) => CoreML.Specification.Int64Parameter.AllowedValuesSet.has(key) && this[key] !== null);
  3553. }
  3554. static decode(reader, length) {
  3555. const message = new CoreML.Specification.Int64Parameter();
  3556. const end = length === undefined ? reader.length : reader.position + length;
  3557. while (reader.position < end) {
  3558. const tag = reader.uint32();
  3559. switch (tag >>> 3) {
  3560. case 1:
  3561. message.defaultValue = reader.int64();
  3562. break;
  3563. case 10:
  3564. message.range = CoreML.Specification.Int64Range.decode(reader, reader.uint32());
  3565. break;
  3566. case 11:
  3567. message.set = CoreML.Specification.Int64Set.decode(reader, reader.uint32());
  3568. break;
  3569. default:
  3570. reader.skipType(tag & 7);
  3571. break;
  3572. }
  3573. }
  3574. return message;
  3575. }
  3576. static decodeText(reader) {
  3577. const message = new CoreML.Specification.Int64Parameter();
  3578. reader.start();
  3579. while (!reader.end()) {
  3580. const tag = reader.tag();
  3581. switch (tag) {
  3582. case "defaultValue":
  3583. message.defaultValue = reader.int64();
  3584. break;
  3585. case "range":
  3586. message.range = CoreML.Specification.Int64Range.decodeText(reader);
  3587. break;
  3588. case "set":
  3589. message.set = CoreML.Specification.Int64Set.decodeText(reader);
  3590. break;
  3591. default:
  3592. reader.field(tag, message);
  3593. break;
  3594. }
  3595. }
  3596. return message;
  3597. }
  3598. };
  3599. CoreML.Specification.Int64Parameter.prototype.defaultValue = 0n;
  3600. CoreML.Specification.DoubleParameter = class DoubleParameter {
  3601. get AllowedValues() {
  3602. CoreML.Specification.DoubleParameter.AllowedValuesSet = CoreML.Specification.DoubleParameter.AllowedValuesSet || new Set(["range"]);
  3603. return Object.keys(this).find((key) => CoreML.Specification.DoubleParameter.AllowedValuesSet.has(key) && this[key] !== null);
  3604. }
  3605. static decode(reader, length) {
  3606. const message = new CoreML.Specification.DoubleParameter();
  3607. const end = length === undefined ? reader.length : reader.position + length;
  3608. while (reader.position < end) {
  3609. const tag = reader.uint32();
  3610. switch (tag >>> 3) {
  3611. case 1:
  3612. message.defaultValue = reader.double();
  3613. break;
  3614. case 10:
  3615. message.range = CoreML.Specification.DoubleRange.decode(reader, reader.uint32());
  3616. break;
  3617. default:
  3618. reader.skipType(tag & 7);
  3619. break;
  3620. }
  3621. }
  3622. return message;
  3623. }
  3624. static decodeText(reader) {
  3625. const message = new CoreML.Specification.DoubleParameter();
  3626. reader.start();
  3627. while (!reader.end()) {
  3628. const tag = reader.tag();
  3629. switch (tag) {
  3630. case "defaultValue":
  3631. message.defaultValue = reader.double();
  3632. break;
  3633. case "range":
  3634. message.range = CoreML.Specification.DoubleRange.decodeText(reader);
  3635. break;
  3636. default:
  3637. reader.field(tag, message);
  3638. break;
  3639. }
  3640. }
  3641. return message;
  3642. }
  3643. };
  3644. CoreML.Specification.DoubleParameter.prototype.defaultValue = 0;
  3645. CoreML.Specification.StringParameter = class StringParameter {
  3646. static decode(reader, length) {
  3647. const message = new CoreML.Specification.StringParameter();
  3648. const end = length === undefined ? reader.length : reader.position + length;
  3649. while (reader.position < end) {
  3650. const tag = reader.uint32();
  3651. switch (tag >>> 3) {
  3652. case 1:
  3653. message.defaultValue = reader.string();
  3654. break;
  3655. default:
  3656. reader.skipType(tag & 7);
  3657. break;
  3658. }
  3659. }
  3660. return message;
  3661. }
  3662. static decodeText(reader) {
  3663. const message = new CoreML.Specification.StringParameter();
  3664. reader.start();
  3665. while (!reader.end()) {
  3666. const tag = reader.tag();
  3667. switch (tag) {
  3668. case "defaultValue":
  3669. message.defaultValue = reader.string();
  3670. break;
  3671. default:
  3672. reader.field(tag, message);
  3673. break;
  3674. }
  3675. }
  3676. return message;
  3677. }
  3678. };
  3679. CoreML.Specification.StringParameter.prototype.defaultValue = "";
  3680. CoreML.Specification.BoolParameter = class BoolParameter {
  3681. static decode(reader, length) {
  3682. const message = new CoreML.Specification.BoolParameter();
  3683. const end = length === undefined ? reader.length : reader.position + length;
  3684. while (reader.position < end) {
  3685. const tag = reader.uint32();
  3686. switch (tag >>> 3) {
  3687. case 1:
  3688. message.defaultValue = reader.bool();
  3689. break;
  3690. default:
  3691. reader.skipType(tag & 7);
  3692. break;
  3693. }
  3694. }
  3695. return message;
  3696. }
  3697. static decodeText(reader) {
  3698. const message = new CoreML.Specification.BoolParameter();
  3699. reader.start();
  3700. while (!reader.end()) {
  3701. const tag = reader.tag();
  3702. switch (tag) {
  3703. case "defaultValue":
  3704. message.defaultValue = reader.bool();
  3705. break;
  3706. default:
  3707. reader.field(tag, message);
  3708. break;
  3709. }
  3710. }
  3711. return message;
  3712. }
  3713. };
  3714. CoreML.Specification.BoolParameter.prototype.defaultValue = false;
  3715. CoreML.Specification.Identity = class Identity {
  3716. static decode(reader, length) {
  3717. const message = new CoreML.Specification.Identity();
  3718. const end = length === undefined ? reader.length : reader.position + length;
  3719. while (reader.position < end) {
  3720. const tag = reader.uint32();
  3721. switch (tag >>> 3) {
  3722. default:
  3723. reader.skipType(tag & 7);
  3724. break;
  3725. }
  3726. }
  3727. return message;
  3728. }
  3729. static decodeText(reader) {
  3730. const message = new CoreML.Specification.Identity();
  3731. reader.start();
  3732. while (!reader.end()) {
  3733. const tag = reader.tag();
  3734. switch (tag) {
  3735. default:
  3736. reader.field(tag, message);
  3737. break;
  3738. }
  3739. }
  3740. return message;
  3741. }
  3742. };
  3743. CoreML.Specification.Imputer = class Imputer {
  3744. get ImputedValue() {
  3745. CoreML.Specification.Imputer.ImputedValueSet = CoreML.Specification.Imputer.ImputedValueSet || new Set(["imputedDoubleValue", "imputedInt64Value", "imputedStringValue", "imputedDoubleArray", "imputedInt64Array", "imputedStringDictionary", "imputedInt64Dictionary"]);
  3746. return Object.keys(this).find((key) => CoreML.Specification.Imputer.ImputedValueSet.has(key) && this[key] !== null);
  3747. }
  3748. get ReplaceValue() {
  3749. CoreML.Specification.Imputer.ReplaceValueSet = CoreML.Specification.Imputer.ReplaceValueSet || new Set(["replaceDoubleValue", "replaceInt64Value", "replaceStringValue"]);
  3750. return Object.keys(this).find((key) => CoreML.Specification.Imputer.ReplaceValueSet.has(key) && this[key] !== null);
  3751. }
  3752. static decode(reader, length) {
  3753. const message = new CoreML.Specification.Imputer();
  3754. const end = length === undefined ? reader.length : reader.position + length;
  3755. while (reader.position < end) {
  3756. const tag = reader.uint32();
  3757. switch (tag >>> 3) {
  3758. case 1:
  3759. message.imputedDoubleValue = reader.double();
  3760. break;
  3761. case 2:
  3762. message.imputedInt64Value = reader.int64();
  3763. break;
  3764. case 3:
  3765. message.imputedStringValue = reader.string();
  3766. break;
  3767. case 4:
  3768. message.imputedDoubleArray = CoreML.Specification.DoubleVector.decode(reader, reader.uint32());
  3769. break;
  3770. case 5:
  3771. message.imputedInt64Array = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  3772. break;
  3773. case 6:
  3774. message.imputedStringDictionary = CoreML.Specification.StringToDoubleMap.decode(reader, reader.uint32());
  3775. break;
  3776. case 7:
  3777. message.imputedInt64Dictionary = CoreML.Specification.Int64ToDoubleMap.decode(reader, reader.uint32());
  3778. break;
  3779. case 11:
  3780. message.replaceDoubleValue = reader.double();
  3781. break;
  3782. case 12:
  3783. message.replaceInt64Value = reader.int64();
  3784. break;
  3785. case 13:
  3786. message.replaceStringValue = reader.string();
  3787. break;
  3788. default:
  3789. reader.skipType(tag & 7);
  3790. break;
  3791. }
  3792. }
  3793. return message;
  3794. }
  3795. static decodeText(reader) {
  3796. const message = new CoreML.Specification.Imputer();
  3797. reader.start();
  3798. while (!reader.end()) {
  3799. const tag = reader.tag();
  3800. switch (tag) {
  3801. case "imputedDoubleValue":
  3802. message.imputedDoubleValue = reader.double();
  3803. break;
  3804. case "imputedInt64Value":
  3805. message.imputedInt64Value = reader.int64();
  3806. break;
  3807. case "imputedStringValue":
  3808. message.imputedStringValue = reader.string();
  3809. break;
  3810. case "imputedDoubleArray":
  3811. message.imputedDoubleArray = CoreML.Specification.DoubleVector.decodeText(reader);
  3812. break;
  3813. case "imputedInt64Array":
  3814. message.imputedInt64Array = CoreML.Specification.Int64Vector.decodeText(reader);
  3815. break;
  3816. case "imputedStringDictionary":
  3817. message.imputedStringDictionary = CoreML.Specification.StringToDoubleMap.decodeText(reader);
  3818. break;
  3819. case "imputedInt64Dictionary":
  3820. message.imputedInt64Dictionary = CoreML.Specification.Int64ToDoubleMap.decodeText(reader);
  3821. break;
  3822. case "replaceDoubleValue":
  3823. message.replaceDoubleValue = reader.double();
  3824. break;
  3825. case "replaceInt64Value":
  3826. message.replaceInt64Value = reader.int64();
  3827. break;
  3828. case "replaceStringValue":
  3829. message.replaceStringValue = reader.string();
  3830. break;
  3831. default:
  3832. reader.field(tag, message);
  3833. break;
  3834. }
  3835. }
  3836. return message;
  3837. }
  3838. };
  3839. CoreML.Specification.MILSpec = {};
  3840. CoreML.Specification.MILSpec.Program = class Program {
  3841. constructor() {
  3842. this.functions = {};
  3843. this.attributes = {};
  3844. }
  3845. static decode(reader, length) {
  3846. const message = new CoreML.Specification.MILSpec.Program();
  3847. const end = length === undefined ? reader.length : reader.position + length;
  3848. while (reader.position < end) {
  3849. const tag = reader.uint32();
  3850. switch (tag >>> 3) {
  3851. case 1:
  3852. message.version = reader.int64();
  3853. break;
  3854. case 2:
  3855. reader.entry(message.functions, () => reader.string(), () => CoreML.Specification.MILSpec.Function.decode(reader, reader.uint32()));
  3856. break;
  3857. case 3:
  3858. message.docString = reader.string();
  3859. break;
  3860. case 4:
  3861. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  3862. break;
  3863. default:
  3864. reader.skipType(tag & 7);
  3865. break;
  3866. }
  3867. }
  3868. return message;
  3869. }
  3870. static decodeText(reader) {
  3871. const message = new CoreML.Specification.MILSpec.Program();
  3872. reader.start();
  3873. while (!reader.end()) {
  3874. const tag = reader.tag();
  3875. switch (tag) {
  3876. case "version":
  3877. message.version = reader.int64();
  3878. break;
  3879. case "functions":
  3880. reader.entry(message.functions, () => reader.string(), () => CoreML.Specification.MILSpec.Function.decodeText(reader));
  3881. break;
  3882. case "docString":
  3883. message.docString = reader.string();
  3884. break;
  3885. case "attributes":
  3886. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decodeText(reader));
  3887. break;
  3888. default:
  3889. reader.field(tag, message);
  3890. break;
  3891. }
  3892. }
  3893. return message;
  3894. }
  3895. };
  3896. CoreML.Specification.MILSpec.Program.prototype.version = 0n;
  3897. CoreML.Specification.MILSpec.Program.prototype.docString = "";
  3898. CoreML.Specification.MILSpec.Function = class Function {
  3899. constructor() {
  3900. this.inputs = [];
  3901. this.block_specializations = {};
  3902. this.attributes = {};
  3903. }
  3904. static decode(reader, length) {
  3905. const message = new CoreML.Specification.MILSpec.Function();
  3906. const end = length === undefined ? reader.length : reader.position + length;
  3907. while (reader.position < end) {
  3908. const tag = reader.uint32();
  3909. switch (tag >>> 3) {
  3910. case 1:
  3911. message.inputs.push(CoreML.Specification.MILSpec.NamedValueType.decode(reader, reader.uint32()));
  3912. break;
  3913. case 2:
  3914. message.opset = reader.string();
  3915. break;
  3916. case 3:
  3917. reader.entry(message.block_specializations, () => reader.string(), () => CoreML.Specification.MILSpec.Block.decode(reader, reader.uint32()));
  3918. break;
  3919. case 4:
  3920. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  3921. break;
  3922. default:
  3923. reader.skipType(tag & 7);
  3924. break;
  3925. }
  3926. }
  3927. return message;
  3928. }
  3929. static decodeText(reader) {
  3930. const message = new CoreML.Specification.MILSpec.Function();
  3931. reader.start();
  3932. while (!reader.end()) {
  3933. const tag = reader.tag();
  3934. switch (tag) {
  3935. case "inputs":
  3936. message.inputs.push(CoreML.Specification.MILSpec.NamedValueType.decodeText(reader));
  3937. break;
  3938. case "opset":
  3939. message.opset = reader.string();
  3940. break;
  3941. case "block_specializations":
  3942. reader.entry(message.block_specializations, () => reader.string(), () => CoreML.Specification.MILSpec.Block.decodeText(reader));
  3943. break;
  3944. case "attributes":
  3945. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decodeText(reader));
  3946. break;
  3947. default:
  3948. reader.field(tag, message);
  3949. break;
  3950. }
  3951. }
  3952. return message;
  3953. }
  3954. };
  3955. CoreML.Specification.MILSpec.Function.prototype.opset = "";
  3956. CoreML.Specification.MILSpec.Block = class Block {
  3957. constructor() {
  3958. this.inputs = [];
  3959. this.outputs = [];
  3960. this.operations = [];
  3961. this.attributes = {};
  3962. }
  3963. static decode(reader, length) {
  3964. const message = new CoreML.Specification.MILSpec.Block();
  3965. const end = length === undefined ? reader.length : reader.position + length;
  3966. while (reader.position < end) {
  3967. const tag = reader.uint32();
  3968. switch (tag >>> 3) {
  3969. case 1:
  3970. message.inputs.push(CoreML.Specification.MILSpec.NamedValueType.decode(reader, reader.uint32()));
  3971. break;
  3972. case 2:
  3973. message.outputs.push(reader.string());
  3974. break;
  3975. case 3:
  3976. message.operations.push(CoreML.Specification.MILSpec.Operation.decode(reader, reader.uint32()));
  3977. break;
  3978. case 4:
  3979. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  3980. break;
  3981. default:
  3982. reader.skipType(tag & 7);
  3983. break;
  3984. }
  3985. }
  3986. return message;
  3987. }
  3988. static decodeText(reader) {
  3989. const message = new CoreML.Specification.MILSpec.Block();
  3990. reader.start();
  3991. while (!reader.end()) {
  3992. const tag = reader.tag();
  3993. switch (tag) {
  3994. case "inputs":
  3995. message.inputs.push(CoreML.Specification.MILSpec.NamedValueType.decodeText(reader));
  3996. break;
  3997. case "outputs":
  3998. reader.array(message.outputs, () => reader.string());
  3999. break;
  4000. case "operations":
  4001. message.operations.push(CoreML.Specification.MILSpec.Operation.decodeText(reader));
  4002. break;
  4003. case "attributes":
  4004. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decodeText(reader));
  4005. break;
  4006. default:
  4007. reader.field(tag, message);
  4008. break;
  4009. }
  4010. }
  4011. return message;
  4012. }
  4013. };
  4014. CoreML.Specification.MILSpec.Argument = class Argument {
  4015. constructor() {
  4016. this.arguments = [];
  4017. }
  4018. static decode(reader, length) {
  4019. const message = new CoreML.Specification.MILSpec.Argument();
  4020. const end = length === undefined ? reader.length : reader.position + length;
  4021. while (reader.position < end) {
  4022. const tag = reader.uint32();
  4023. switch (tag >>> 3) {
  4024. case 1:
  4025. message.arguments.push(CoreML.Specification.MILSpec.Argument.Binding.decode(reader, reader.uint32()));
  4026. break;
  4027. default:
  4028. reader.skipType(tag & 7);
  4029. break;
  4030. }
  4031. }
  4032. return message;
  4033. }
  4034. static decodeText(reader) {
  4035. const message = new CoreML.Specification.MILSpec.Argument();
  4036. reader.start();
  4037. while (!reader.end()) {
  4038. const tag = reader.tag();
  4039. switch (tag) {
  4040. case "arguments":
  4041. message.arguments.push(CoreML.Specification.MILSpec.Argument.Binding.decodeText(reader));
  4042. break;
  4043. default:
  4044. reader.field(tag, message);
  4045. break;
  4046. }
  4047. }
  4048. return message;
  4049. }
  4050. };
  4051. CoreML.Specification.MILSpec.Argument.Binding = class Binding {
  4052. get binding() {
  4053. CoreML.Specification.MILSpec.Argument.Binding.bindingSet = CoreML.Specification.MILSpec.Argument.Binding.bindingSet || new Set(["name", "value"]);
  4054. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.Argument.Binding.bindingSet.has(key) && this[key] !== null);
  4055. }
  4056. static decode(reader, length) {
  4057. const message = new CoreML.Specification.MILSpec.Argument.Binding();
  4058. const end = length === undefined ? reader.length : reader.position + length;
  4059. while (reader.position < end) {
  4060. const tag = reader.uint32();
  4061. switch (tag >>> 3) {
  4062. case 1:
  4063. message.name = reader.string();
  4064. break;
  4065. case 2:
  4066. message.value = CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32());
  4067. break;
  4068. default:
  4069. reader.skipType(tag & 7);
  4070. break;
  4071. }
  4072. }
  4073. return message;
  4074. }
  4075. static decodeText(reader) {
  4076. const message = new CoreML.Specification.MILSpec.Argument.Binding();
  4077. reader.start();
  4078. while (!reader.end()) {
  4079. const tag = reader.tag();
  4080. switch (tag) {
  4081. case "name":
  4082. message.name = reader.string();
  4083. break;
  4084. case "value":
  4085. message.value = CoreML.Specification.MILSpec.Value.decodeText(reader);
  4086. break;
  4087. default:
  4088. reader.field(tag, message);
  4089. break;
  4090. }
  4091. }
  4092. return message;
  4093. }
  4094. };
  4095. CoreML.Specification.MILSpec.Operation = class Operation {
  4096. constructor() {
  4097. this.inputs = {};
  4098. this.outputs = [];
  4099. this.blocks = [];
  4100. this.attributes = {};
  4101. }
  4102. static decode(reader, length) {
  4103. const message = new CoreML.Specification.MILSpec.Operation();
  4104. const end = length === undefined ? reader.length : reader.position + length;
  4105. while (reader.position < end) {
  4106. const tag = reader.uint32();
  4107. switch (tag >>> 3) {
  4108. case 1:
  4109. message.type = reader.string();
  4110. break;
  4111. case 2:
  4112. reader.entry(message.inputs, () => reader.string(), () => CoreML.Specification.MILSpec.Argument.decode(reader, reader.uint32()));
  4113. break;
  4114. case 3:
  4115. message.outputs.push(CoreML.Specification.MILSpec.NamedValueType.decode(reader, reader.uint32()));
  4116. break;
  4117. case 4:
  4118. message.blocks.push(CoreML.Specification.MILSpec.Block.decode(reader, reader.uint32()));
  4119. break;
  4120. case 5:
  4121. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  4122. break;
  4123. default:
  4124. reader.skipType(tag & 7);
  4125. break;
  4126. }
  4127. }
  4128. return message;
  4129. }
  4130. static decodeText(reader) {
  4131. const message = new CoreML.Specification.MILSpec.Operation();
  4132. reader.start();
  4133. while (!reader.end()) {
  4134. const tag = reader.tag();
  4135. switch (tag) {
  4136. case "type":
  4137. message.type = reader.string();
  4138. break;
  4139. case "inputs":
  4140. reader.entry(message.inputs, () => reader.string(), () => CoreML.Specification.MILSpec.Argument.decodeText(reader));
  4141. break;
  4142. case "outputs":
  4143. message.outputs.push(CoreML.Specification.MILSpec.NamedValueType.decodeText(reader));
  4144. break;
  4145. case "blocks":
  4146. message.blocks.push(CoreML.Specification.MILSpec.Block.decodeText(reader));
  4147. break;
  4148. case "attributes":
  4149. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decodeText(reader));
  4150. break;
  4151. default:
  4152. reader.field(tag, message);
  4153. break;
  4154. }
  4155. }
  4156. return message;
  4157. }
  4158. };
  4159. CoreML.Specification.MILSpec.Operation.prototype.type = "";
  4160. CoreML.Specification.MILSpec.NamedValueType = class NamedValueType {
  4161. static decode(reader, length) {
  4162. const message = new CoreML.Specification.MILSpec.NamedValueType();
  4163. const end = length === undefined ? reader.length : reader.position + length;
  4164. while (reader.position < end) {
  4165. const tag = reader.uint32();
  4166. switch (tag >>> 3) {
  4167. case 1:
  4168. message.name = reader.string();
  4169. break;
  4170. case 2:
  4171. message.type = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4172. break;
  4173. default:
  4174. reader.skipType(tag & 7);
  4175. break;
  4176. }
  4177. }
  4178. return message;
  4179. }
  4180. static decodeText(reader) {
  4181. const message = new CoreML.Specification.MILSpec.NamedValueType();
  4182. reader.start();
  4183. while (!reader.end()) {
  4184. const tag = reader.tag();
  4185. switch (tag) {
  4186. case "name":
  4187. message.name = reader.string();
  4188. break;
  4189. case "type":
  4190. message.type = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4191. break;
  4192. default:
  4193. reader.field(tag, message);
  4194. break;
  4195. }
  4196. }
  4197. return message;
  4198. }
  4199. };
  4200. CoreML.Specification.MILSpec.NamedValueType.prototype.name = "";
  4201. CoreML.Specification.MILSpec.NamedValueType.prototype.type = null;
  4202. CoreML.Specification.MILSpec.ValueType = class ValueType {
  4203. get type() {
  4204. CoreML.Specification.MILSpec.ValueType.typeSet = CoreML.Specification.MILSpec.ValueType.typeSet || new Set(["tensorType", "listType", "tupleType", "dictionaryType", "stateType"]);
  4205. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.ValueType.typeSet.has(key) && this[key] !== null);
  4206. }
  4207. static decode(reader, length) {
  4208. const message = new CoreML.Specification.MILSpec.ValueType();
  4209. const end = length === undefined ? reader.length : reader.position + length;
  4210. while (reader.position < end) {
  4211. const tag = reader.uint32();
  4212. switch (tag >>> 3) {
  4213. case 1:
  4214. message.tensorType = CoreML.Specification.MILSpec.TensorType.decode(reader, reader.uint32());
  4215. break;
  4216. case 2:
  4217. message.listType = CoreML.Specification.MILSpec.ListType.decode(reader, reader.uint32());
  4218. break;
  4219. case 3:
  4220. message.tupleType = CoreML.Specification.MILSpec.TupleType.decode(reader, reader.uint32());
  4221. break;
  4222. case 4:
  4223. message.dictionaryType = CoreML.Specification.MILSpec.DictionaryType.decode(reader, reader.uint32());
  4224. break;
  4225. case 5:
  4226. message.stateType = CoreML.Specification.MILSpec.StateType.decode(reader, reader.uint32());
  4227. break;
  4228. default:
  4229. reader.skipType(tag & 7);
  4230. break;
  4231. }
  4232. }
  4233. return message;
  4234. }
  4235. static decodeText(reader) {
  4236. const message = new CoreML.Specification.MILSpec.ValueType();
  4237. reader.start();
  4238. while (!reader.end()) {
  4239. const tag = reader.tag();
  4240. switch (tag) {
  4241. case "tensorType":
  4242. message.tensorType = CoreML.Specification.MILSpec.TensorType.decodeText(reader);
  4243. break;
  4244. case "listType":
  4245. message.listType = CoreML.Specification.MILSpec.ListType.decodeText(reader);
  4246. break;
  4247. case "tupleType":
  4248. message.tupleType = CoreML.Specification.MILSpec.TupleType.decodeText(reader);
  4249. break;
  4250. case "dictionaryType":
  4251. message.dictionaryType = CoreML.Specification.MILSpec.DictionaryType.decodeText(reader);
  4252. break;
  4253. case "stateType":
  4254. message.stateType = CoreML.Specification.MILSpec.StateType.decodeText(reader);
  4255. break;
  4256. default:
  4257. reader.field(tag, message);
  4258. break;
  4259. }
  4260. }
  4261. return message;
  4262. }
  4263. };
  4264. CoreML.Specification.MILSpec.DataType = {
  4265. "UNUSED_TYPE": 0,
  4266. "BOOL": 1,
  4267. "STRING": 2,
  4268. "FLOAT8E4M3FN": 40,
  4269. "FLOAT8E5M2": 41,
  4270. "FLOAT16": 10,
  4271. "FLOAT32": 11,
  4272. "FLOAT64": 12,
  4273. "BFLOAT16": 13,
  4274. "INT8": 21,
  4275. "INT16": 22,
  4276. "INT32": 23,
  4277. "INT64": 24,
  4278. "INT4": 25,
  4279. "UINT8": 31,
  4280. "UINT16": 32,
  4281. "UINT32": 33,
  4282. "UINT64": 34,
  4283. "UINT4": 35,
  4284. "UINT2": 36,
  4285. "UINT1": 37,
  4286. "UINT6": 38,
  4287. "UINT3": 39
  4288. };
  4289. CoreML.Specification.MILSpec.TensorType = class TensorType {
  4290. constructor() {
  4291. this.dimensions = [];
  4292. this.attributes = {};
  4293. }
  4294. static decode(reader, length) {
  4295. const message = new CoreML.Specification.MILSpec.TensorType();
  4296. const end = length === undefined ? reader.length : reader.position + length;
  4297. while (reader.position < end) {
  4298. const tag = reader.uint32();
  4299. switch (tag >>> 3) {
  4300. case 1:
  4301. message.dataType = reader.int32();
  4302. break;
  4303. case 2:
  4304. message.rank = reader.int64();
  4305. break;
  4306. case 3:
  4307. message.dimensions.push(CoreML.Specification.MILSpec.Dimension.decode(reader, reader.uint32()));
  4308. break;
  4309. case 4:
  4310. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  4311. break;
  4312. default:
  4313. reader.skipType(tag & 7);
  4314. break;
  4315. }
  4316. }
  4317. return message;
  4318. }
  4319. static decodeText(reader) {
  4320. const message = new CoreML.Specification.MILSpec.TensorType();
  4321. reader.start();
  4322. while (!reader.end()) {
  4323. const tag = reader.tag();
  4324. switch (tag) {
  4325. case "dataType":
  4326. message.dataType = reader.enum(CoreML.Specification.MILSpec.DataType);
  4327. break;
  4328. case "rank":
  4329. message.rank = reader.int64();
  4330. break;
  4331. case "dimensions":
  4332. message.dimensions.push(CoreML.Specification.MILSpec.Dimension.decodeText(reader));
  4333. break;
  4334. case "attributes":
  4335. reader.entry(message.attributes, () => reader.string(), () => CoreML.Specification.MILSpec.Value.decodeText(reader));
  4336. break;
  4337. default:
  4338. reader.field(tag, message);
  4339. break;
  4340. }
  4341. }
  4342. return message;
  4343. }
  4344. };
  4345. CoreML.Specification.MILSpec.TensorType.prototype.dataType = 0;
  4346. CoreML.Specification.MILSpec.TensorType.prototype.rank = 0n;
  4347. CoreML.Specification.MILSpec.TupleType = class TupleType {
  4348. constructor() {
  4349. this.types = [];
  4350. }
  4351. static decode(reader, length) {
  4352. const message = new CoreML.Specification.MILSpec.TupleType();
  4353. const end = length === undefined ? reader.length : reader.position + length;
  4354. while (reader.position < end) {
  4355. const tag = reader.uint32();
  4356. switch (tag >>> 3) {
  4357. case 1:
  4358. message.types.push(CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32()));
  4359. break;
  4360. default:
  4361. reader.skipType(tag & 7);
  4362. break;
  4363. }
  4364. }
  4365. return message;
  4366. }
  4367. static decodeText(reader) {
  4368. const message = new CoreML.Specification.MILSpec.TupleType();
  4369. reader.start();
  4370. while (!reader.end()) {
  4371. const tag = reader.tag();
  4372. switch (tag) {
  4373. case "types":
  4374. message.types.push(CoreML.Specification.MILSpec.ValueType.decodeText(reader));
  4375. break;
  4376. default:
  4377. reader.field(tag, message);
  4378. break;
  4379. }
  4380. }
  4381. return message;
  4382. }
  4383. };
  4384. CoreML.Specification.MILSpec.ListType = class ListType {
  4385. static decode(reader, length) {
  4386. const message = new CoreML.Specification.MILSpec.ListType();
  4387. const end = length === undefined ? reader.length : reader.position + length;
  4388. while (reader.position < end) {
  4389. const tag = reader.uint32();
  4390. switch (tag >>> 3) {
  4391. case 1:
  4392. message.type = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4393. break;
  4394. case 2:
  4395. message.length = CoreML.Specification.MILSpec.Dimension.decode(reader, reader.uint32());
  4396. break;
  4397. default:
  4398. reader.skipType(tag & 7);
  4399. break;
  4400. }
  4401. }
  4402. return message;
  4403. }
  4404. static decodeText(reader) {
  4405. const message = new CoreML.Specification.MILSpec.ListType();
  4406. reader.start();
  4407. while (!reader.end()) {
  4408. const tag = reader.tag();
  4409. switch (tag) {
  4410. case "type":
  4411. message.type = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4412. break;
  4413. case "length":
  4414. message.length = CoreML.Specification.MILSpec.Dimension.decodeText(reader);
  4415. break;
  4416. default:
  4417. reader.field(tag, message);
  4418. break;
  4419. }
  4420. }
  4421. return message;
  4422. }
  4423. };
  4424. CoreML.Specification.MILSpec.ListType.prototype.type = null;
  4425. CoreML.Specification.MILSpec.ListType.prototype.length = null;
  4426. CoreML.Specification.MILSpec.DictionaryType = class DictionaryType {
  4427. static decode(reader, length) {
  4428. const message = new CoreML.Specification.MILSpec.DictionaryType();
  4429. const end = length === undefined ? reader.length : reader.position + length;
  4430. while (reader.position < end) {
  4431. const tag = reader.uint32();
  4432. switch (tag >>> 3) {
  4433. case 1:
  4434. message.keyType = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4435. break;
  4436. case 2:
  4437. message.valueType = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4438. break;
  4439. default:
  4440. reader.skipType(tag & 7);
  4441. break;
  4442. }
  4443. }
  4444. return message;
  4445. }
  4446. static decodeText(reader) {
  4447. const message = new CoreML.Specification.MILSpec.DictionaryType();
  4448. reader.start();
  4449. while (!reader.end()) {
  4450. const tag = reader.tag();
  4451. switch (tag) {
  4452. case "keyType":
  4453. message.keyType = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4454. break;
  4455. case "valueType":
  4456. message.valueType = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4457. break;
  4458. default:
  4459. reader.field(tag, message);
  4460. break;
  4461. }
  4462. }
  4463. return message;
  4464. }
  4465. };
  4466. CoreML.Specification.MILSpec.DictionaryType.prototype.keyType = null;
  4467. CoreML.Specification.MILSpec.DictionaryType.prototype.valueType = null;
  4468. CoreML.Specification.MILSpec.StateType = class StateType {
  4469. static decode(reader, length) {
  4470. const message = new CoreML.Specification.MILSpec.StateType();
  4471. const end = length === undefined ? reader.length : reader.position + length;
  4472. while (reader.position < end) {
  4473. const tag = reader.uint32();
  4474. switch (tag >>> 3) {
  4475. case 1:
  4476. message.wrappedType = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4477. break;
  4478. default:
  4479. reader.skipType(tag & 7);
  4480. break;
  4481. }
  4482. }
  4483. return message;
  4484. }
  4485. static decodeText(reader) {
  4486. const message = new CoreML.Specification.MILSpec.StateType();
  4487. reader.start();
  4488. while (!reader.end()) {
  4489. const tag = reader.tag();
  4490. switch (tag) {
  4491. case "wrappedType":
  4492. message.wrappedType = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4493. break;
  4494. default:
  4495. reader.field(tag, message);
  4496. break;
  4497. }
  4498. }
  4499. return message;
  4500. }
  4501. };
  4502. CoreML.Specification.MILSpec.StateType.prototype.wrappedType = null;
  4503. CoreML.Specification.MILSpec.Dimension = class Dimension {
  4504. get dimension() {
  4505. CoreML.Specification.MILSpec.Dimension.dimensionSet = CoreML.Specification.MILSpec.Dimension.dimensionSet || new Set(["constant", "unknown"]);
  4506. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.Dimension.dimensionSet.has(key) && this[key] !== null);
  4507. }
  4508. static decode(reader, length) {
  4509. const message = new CoreML.Specification.MILSpec.Dimension();
  4510. const end = length === undefined ? reader.length : reader.position + length;
  4511. while (reader.position < end) {
  4512. const tag = reader.uint32();
  4513. switch (tag >>> 3) {
  4514. case 1:
  4515. message.constant = CoreML.Specification.MILSpec.Dimension.ConstantDimension.decode(reader, reader.uint32());
  4516. break;
  4517. case 2:
  4518. message.unknown = CoreML.Specification.MILSpec.Dimension.UnknownDimension.decode(reader, reader.uint32());
  4519. break;
  4520. default:
  4521. reader.skipType(tag & 7);
  4522. break;
  4523. }
  4524. }
  4525. return message;
  4526. }
  4527. static decodeText(reader) {
  4528. const message = new CoreML.Specification.MILSpec.Dimension();
  4529. reader.start();
  4530. while (!reader.end()) {
  4531. const tag = reader.tag();
  4532. switch (tag) {
  4533. case "constant":
  4534. message.constant = CoreML.Specification.MILSpec.Dimension.ConstantDimension.decodeText(reader);
  4535. break;
  4536. case "unknown":
  4537. message.unknown = CoreML.Specification.MILSpec.Dimension.UnknownDimension.decodeText(reader);
  4538. break;
  4539. default:
  4540. reader.field(tag, message);
  4541. break;
  4542. }
  4543. }
  4544. return message;
  4545. }
  4546. };
  4547. CoreML.Specification.MILSpec.Dimension.ConstantDimension = class ConstantDimension {
  4548. static decode(reader, length) {
  4549. const message = new CoreML.Specification.MILSpec.Dimension.ConstantDimension();
  4550. const end = length === undefined ? reader.length : reader.position + length;
  4551. while (reader.position < end) {
  4552. const tag = reader.uint32();
  4553. switch (tag >>> 3) {
  4554. case 1:
  4555. message.size = reader.uint64();
  4556. break;
  4557. default:
  4558. reader.skipType(tag & 7);
  4559. break;
  4560. }
  4561. }
  4562. return message;
  4563. }
  4564. static decodeText(reader) {
  4565. const message = new CoreML.Specification.MILSpec.Dimension.ConstantDimension();
  4566. reader.start();
  4567. while (!reader.end()) {
  4568. const tag = reader.tag();
  4569. switch (tag) {
  4570. case "size":
  4571. message.size = reader.uint64();
  4572. break;
  4573. default:
  4574. reader.field(tag, message);
  4575. break;
  4576. }
  4577. }
  4578. return message;
  4579. }
  4580. };
  4581. CoreML.Specification.MILSpec.Dimension.ConstantDimension.prototype.size = 0n;
  4582. CoreML.Specification.MILSpec.Dimension.UnknownDimension = class UnknownDimension {
  4583. static decode(reader, length) {
  4584. const message = new CoreML.Specification.MILSpec.Dimension.UnknownDimension();
  4585. const end = length === undefined ? reader.length : reader.position + length;
  4586. while (reader.position < end) {
  4587. const tag = reader.uint32();
  4588. switch (tag >>> 3) {
  4589. case 1:
  4590. message.variadic = reader.bool();
  4591. break;
  4592. default:
  4593. reader.skipType(tag & 7);
  4594. break;
  4595. }
  4596. }
  4597. return message;
  4598. }
  4599. static decodeText(reader) {
  4600. const message = new CoreML.Specification.MILSpec.Dimension.UnknownDimension();
  4601. reader.start();
  4602. while (!reader.end()) {
  4603. const tag = reader.tag();
  4604. switch (tag) {
  4605. case "variadic":
  4606. message.variadic = reader.bool();
  4607. break;
  4608. default:
  4609. reader.field(tag, message);
  4610. break;
  4611. }
  4612. }
  4613. return message;
  4614. }
  4615. };
  4616. CoreML.Specification.MILSpec.Dimension.UnknownDimension.prototype.variadic = false;
  4617. CoreML.Specification.MILSpec.Value = class Value {
  4618. get value() {
  4619. CoreML.Specification.MILSpec.Value.valueSet = CoreML.Specification.MILSpec.Value.valueSet || new Set(["immediateValue", "blobFileValue"]);
  4620. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.Value.valueSet.has(key) && this[key] !== null);
  4621. }
  4622. static decode(reader, length) {
  4623. const message = new CoreML.Specification.MILSpec.Value();
  4624. const end = length === undefined ? reader.length : reader.position + length;
  4625. while (reader.position < end) {
  4626. const tag = reader.uint32();
  4627. switch (tag >>> 3) {
  4628. case 1:
  4629. message.docString = reader.string();
  4630. break;
  4631. case 2:
  4632. message.type = CoreML.Specification.MILSpec.ValueType.decode(reader, reader.uint32());
  4633. break;
  4634. case 3:
  4635. message.immediateValue = CoreML.Specification.MILSpec.Value.ImmediateValue.decode(reader, reader.uint32());
  4636. break;
  4637. case 5:
  4638. message.blobFileValue = CoreML.Specification.MILSpec.Value.BlobFileValue.decode(reader, reader.uint32());
  4639. break;
  4640. default:
  4641. reader.skipType(tag & 7);
  4642. break;
  4643. }
  4644. }
  4645. return message;
  4646. }
  4647. static decodeText(reader) {
  4648. const message = new CoreML.Specification.MILSpec.Value();
  4649. reader.start();
  4650. while (!reader.end()) {
  4651. const tag = reader.tag();
  4652. switch (tag) {
  4653. case "docString":
  4654. message.docString = reader.string();
  4655. break;
  4656. case "type":
  4657. message.type = CoreML.Specification.MILSpec.ValueType.decodeText(reader);
  4658. break;
  4659. case "immediateValue":
  4660. message.immediateValue = CoreML.Specification.MILSpec.Value.ImmediateValue.decodeText(reader);
  4661. break;
  4662. case "blobFileValue":
  4663. message.blobFileValue = CoreML.Specification.MILSpec.Value.BlobFileValue.decodeText(reader);
  4664. break;
  4665. default:
  4666. reader.field(tag, message);
  4667. break;
  4668. }
  4669. }
  4670. return message;
  4671. }
  4672. };
  4673. CoreML.Specification.MILSpec.Value.prototype.docString = "";
  4674. CoreML.Specification.MILSpec.Value.prototype.type = null;
  4675. CoreML.Specification.MILSpec.Value.ImmediateValue = class ImmediateValue {
  4676. get value() {
  4677. CoreML.Specification.MILSpec.Value.ImmediateValue.valueSet = CoreML.Specification.MILSpec.Value.ImmediateValue.valueSet || new Set(["tensor", "tuple", "list", "dictionary"]);
  4678. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.Value.ImmediateValue.valueSet.has(key) && this[key] !== null);
  4679. }
  4680. static decode(reader, length) {
  4681. const message = new CoreML.Specification.MILSpec.Value.ImmediateValue();
  4682. const end = length === undefined ? reader.length : reader.position + length;
  4683. while (reader.position < end) {
  4684. const tag = reader.uint32();
  4685. switch (tag >>> 3) {
  4686. case 1:
  4687. message.tensor = CoreML.Specification.MILSpec.TensorValue.decode(reader, reader.uint32());
  4688. break;
  4689. case 2:
  4690. message.tuple = CoreML.Specification.MILSpec.TupleValue.decode(reader, reader.uint32());
  4691. break;
  4692. case 3:
  4693. message.list = CoreML.Specification.MILSpec.ListValue.decode(reader, reader.uint32());
  4694. break;
  4695. case 4:
  4696. message.dictionary = CoreML.Specification.MILSpec.DictionaryValue.decode(reader, reader.uint32());
  4697. break;
  4698. default:
  4699. reader.skipType(tag & 7);
  4700. break;
  4701. }
  4702. }
  4703. return message;
  4704. }
  4705. static decodeText(reader) {
  4706. const message = new CoreML.Specification.MILSpec.Value.ImmediateValue();
  4707. reader.start();
  4708. while (!reader.end()) {
  4709. const tag = reader.tag();
  4710. switch (tag) {
  4711. case "tensor":
  4712. message.tensor = CoreML.Specification.MILSpec.TensorValue.decodeText(reader);
  4713. break;
  4714. case "tuple":
  4715. message.tuple = CoreML.Specification.MILSpec.TupleValue.decodeText(reader);
  4716. break;
  4717. case "list":
  4718. message.list = CoreML.Specification.MILSpec.ListValue.decodeText(reader);
  4719. break;
  4720. case "dictionary":
  4721. message.dictionary = CoreML.Specification.MILSpec.DictionaryValue.decodeText(reader);
  4722. break;
  4723. default:
  4724. reader.field(tag, message);
  4725. break;
  4726. }
  4727. }
  4728. return message;
  4729. }
  4730. };
  4731. CoreML.Specification.MILSpec.Value.BlobFileValue = class BlobFileValue {
  4732. static decode(reader, length) {
  4733. const message = new CoreML.Specification.MILSpec.Value.BlobFileValue();
  4734. const end = length === undefined ? reader.length : reader.position + length;
  4735. while (reader.position < end) {
  4736. const tag = reader.uint32();
  4737. switch (tag >>> 3) {
  4738. case 1:
  4739. message.fileName = reader.string();
  4740. break;
  4741. case 2:
  4742. message.offset = reader.uint64();
  4743. break;
  4744. default:
  4745. reader.skipType(tag & 7);
  4746. break;
  4747. }
  4748. }
  4749. return message;
  4750. }
  4751. static decodeText(reader) {
  4752. const message = new CoreML.Specification.MILSpec.Value.BlobFileValue();
  4753. reader.start();
  4754. while (!reader.end()) {
  4755. const tag = reader.tag();
  4756. switch (tag) {
  4757. case "fileName":
  4758. message.fileName = reader.string();
  4759. break;
  4760. case "offset":
  4761. message.offset = reader.uint64();
  4762. break;
  4763. default:
  4764. reader.field(tag, message);
  4765. break;
  4766. }
  4767. }
  4768. return message;
  4769. }
  4770. };
  4771. CoreML.Specification.MILSpec.Value.BlobFileValue.prototype.fileName = "";
  4772. CoreML.Specification.MILSpec.Value.BlobFileValue.prototype.offset = 0n;
  4773. CoreML.Specification.MILSpec.TensorValue = class TensorValue {
  4774. get value() {
  4775. CoreML.Specification.MILSpec.TensorValue.valueSet = CoreML.Specification.MILSpec.TensorValue.valueSet || new Set(["floats", "ints", "bools", "strings", "longInts", "doubles", "bytes"]);
  4776. return Object.keys(this).find((key) => CoreML.Specification.MILSpec.TensorValue.valueSet.has(key) && this[key] !== null);
  4777. }
  4778. static decode(reader, length) {
  4779. const message = new CoreML.Specification.MILSpec.TensorValue();
  4780. const end = length === undefined ? reader.length : reader.position + length;
  4781. while (reader.position < end) {
  4782. const tag = reader.uint32();
  4783. switch (tag >>> 3) {
  4784. case 1:
  4785. message.floats = CoreML.Specification.MILSpec.TensorValue.RepeatedFloats.decode(reader, reader.uint32());
  4786. break;
  4787. case 2:
  4788. message.ints = CoreML.Specification.MILSpec.TensorValue.RepeatedInts.decode(reader, reader.uint32());
  4789. break;
  4790. case 3:
  4791. message.bools = CoreML.Specification.MILSpec.TensorValue.RepeatedBools.decode(reader, reader.uint32());
  4792. break;
  4793. case 4:
  4794. message.strings = CoreML.Specification.MILSpec.TensorValue.RepeatedStrings.decode(reader, reader.uint32());
  4795. break;
  4796. case 5:
  4797. message.longInts = CoreML.Specification.MILSpec.TensorValue.RepeatedLongInts.decode(reader, reader.uint32());
  4798. break;
  4799. case 6:
  4800. message.doubles = CoreML.Specification.MILSpec.TensorValue.RepeatedDoubles.decode(reader, reader.uint32());
  4801. break;
  4802. case 7:
  4803. message.bytes = CoreML.Specification.MILSpec.TensorValue.RepeatedBytes.decode(reader, reader.uint32());
  4804. break;
  4805. default:
  4806. reader.skipType(tag & 7);
  4807. break;
  4808. }
  4809. }
  4810. return message;
  4811. }
  4812. static decodeText(reader) {
  4813. const message = new CoreML.Specification.MILSpec.TensorValue();
  4814. reader.start();
  4815. while (!reader.end()) {
  4816. const tag = reader.tag();
  4817. switch (tag) {
  4818. case "floats":
  4819. message.floats = CoreML.Specification.MILSpec.TensorValue.RepeatedFloats.decodeText(reader);
  4820. break;
  4821. case "ints":
  4822. message.ints = CoreML.Specification.MILSpec.TensorValue.RepeatedInts.decodeText(reader);
  4823. break;
  4824. case "bools":
  4825. message.bools = CoreML.Specification.MILSpec.TensorValue.RepeatedBools.decodeText(reader);
  4826. break;
  4827. case "strings":
  4828. message.strings = CoreML.Specification.MILSpec.TensorValue.RepeatedStrings.decodeText(reader);
  4829. break;
  4830. case "longInts":
  4831. message.longInts = CoreML.Specification.MILSpec.TensorValue.RepeatedLongInts.decodeText(reader);
  4832. break;
  4833. case "doubles":
  4834. message.doubles = CoreML.Specification.MILSpec.TensorValue.RepeatedDoubles.decodeText(reader);
  4835. break;
  4836. case "bytes":
  4837. message.bytes = CoreML.Specification.MILSpec.TensorValue.RepeatedBytes.decodeText(reader);
  4838. break;
  4839. default:
  4840. reader.field(tag, message);
  4841. break;
  4842. }
  4843. }
  4844. return message;
  4845. }
  4846. };
  4847. CoreML.Specification.MILSpec.TensorValue.RepeatedFloats = class RepeatedFloats {
  4848. constructor() {
  4849. this.values = [];
  4850. }
  4851. static decode(reader, length) {
  4852. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedFloats();
  4853. const end = length === undefined ? reader.length : reader.position + length;
  4854. while (reader.position < end) {
  4855. const tag = reader.uint32();
  4856. switch (tag >>> 3) {
  4857. case 1:
  4858. message.values = reader.floats(message.values, tag);
  4859. break;
  4860. default:
  4861. reader.skipType(tag & 7);
  4862. break;
  4863. }
  4864. }
  4865. return message;
  4866. }
  4867. static decodeText(reader) {
  4868. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedFloats();
  4869. reader.start();
  4870. while (!reader.end()) {
  4871. const tag = reader.tag();
  4872. switch (tag) {
  4873. case "values":
  4874. reader.array(message.values, () => reader.float());
  4875. break;
  4876. default:
  4877. reader.field(tag, message);
  4878. break;
  4879. }
  4880. }
  4881. return message;
  4882. }
  4883. };
  4884. CoreML.Specification.MILSpec.TensorValue.RepeatedDoubles = class RepeatedDoubles {
  4885. constructor() {
  4886. this.values = [];
  4887. }
  4888. static decode(reader, length) {
  4889. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedDoubles();
  4890. const end = length === undefined ? reader.length : reader.position + length;
  4891. while (reader.position < end) {
  4892. const tag = reader.uint32();
  4893. switch (tag >>> 3) {
  4894. case 1:
  4895. message.values = reader.doubles(message.values, tag);
  4896. break;
  4897. default:
  4898. reader.skipType(tag & 7);
  4899. break;
  4900. }
  4901. }
  4902. return message;
  4903. }
  4904. static decodeText(reader) {
  4905. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedDoubles();
  4906. reader.start();
  4907. while (!reader.end()) {
  4908. const tag = reader.tag();
  4909. switch (tag) {
  4910. case "values":
  4911. reader.array(message.values, () => reader.double());
  4912. break;
  4913. default:
  4914. reader.field(tag, message);
  4915. break;
  4916. }
  4917. }
  4918. return message;
  4919. }
  4920. };
  4921. CoreML.Specification.MILSpec.TensorValue.RepeatedInts = class RepeatedInts {
  4922. constructor() {
  4923. this.values = [];
  4924. }
  4925. static decode(reader, length) {
  4926. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedInts();
  4927. const end = length === undefined ? reader.length : reader.position + length;
  4928. while (reader.position < end) {
  4929. const tag = reader.uint32();
  4930. switch (tag >>> 3) {
  4931. case 1:
  4932. message.values = reader.array(message.values, () => reader.int32(), tag);
  4933. break;
  4934. default:
  4935. reader.skipType(tag & 7);
  4936. break;
  4937. }
  4938. }
  4939. return message;
  4940. }
  4941. static decodeText(reader) {
  4942. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedInts();
  4943. reader.start();
  4944. while (!reader.end()) {
  4945. const tag = reader.tag();
  4946. switch (tag) {
  4947. case "values":
  4948. reader.array(message.values, () => reader.int32());
  4949. break;
  4950. default:
  4951. reader.field(tag, message);
  4952. break;
  4953. }
  4954. }
  4955. return message;
  4956. }
  4957. };
  4958. CoreML.Specification.MILSpec.TensorValue.RepeatedLongInts = class RepeatedLongInts {
  4959. constructor() {
  4960. this.values = [];
  4961. }
  4962. static decode(reader, length) {
  4963. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedLongInts();
  4964. const end = length === undefined ? reader.length : reader.position + length;
  4965. while (reader.position < end) {
  4966. const tag = reader.uint32();
  4967. switch (tag >>> 3) {
  4968. case 1:
  4969. message.values = reader.array(message.values, () => reader.int64(), tag);
  4970. break;
  4971. default:
  4972. reader.skipType(tag & 7);
  4973. break;
  4974. }
  4975. }
  4976. return message;
  4977. }
  4978. static decodeText(reader) {
  4979. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedLongInts();
  4980. reader.start();
  4981. while (!reader.end()) {
  4982. const tag = reader.tag();
  4983. switch (tag) {
  4984. case "values":
  4985. reader.array(message.values, () => reader.int64());
  4986. break;
  4987. default:
  4988. reader.field(tag, message);
  4989. break;
  4990. }
  4991. }
  4992. return message;
  4993. }
  4994. };
  4995. CoreML.Specification.MILSpec.TensorValue.RepeatedBools = class RepeatedBools {
  4996. constructor() {
  4997. this.values = [];
  4998. }
  4999. static decode(reader, length) {
  5000. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedBools();
  5001. const end = length === undefined ? reader.length : reader.position + length;
  5002. while (reader.position < end) {
  5003. const tag = reader.uint32();
  5004. switch (tag >>> 3) {
  5005. case 1:
  5006. message.values = reader.array(message.values, () => reader.bool(), tag);
  5007. break;
  5008. default:
  5009. reader.skipType(tag & 7);
  5010. break;
  5011. }
  5012. }
  5013. return message;
  5014. }
  5015. static decodeText(reader) {
  5016. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedBools();
  5017. reader.start();
  5018. while (!reader.end()) {
  5019. const tag = reader.tag();
  5020. switch (tag) {
  5021. case "values":
  5022. reader.array(message.values, () => reader.bool());
  5023. break;
  5024. default:
  5025. reader.field(tag, message);
  5026. break;
  5027. }
  5028. }
  5029. return message;
  5030. }
  5031. };
  5032. CoreML.Specification.MILSpec.TensorValue.RepeatedStrings = class RepeatedStrings {
  5033. constructor() {
  5034. this.values = [];
  5035. }
  5036. static decode(reader, length) {
  5037. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedStrings();
  5038. const end = length === undefined ? reader.length : reader.position + length;
  5039. while (reader.position < end) {
  5040. const tag = reader.uint32();
  5041. switch (tag >>> 3) {
  5042. case 1:
  5043. message.values.push(reader.string());
  5044. break;
  5045. default:
  5046. reader.skipType(tag & 7);
  5047. break;
  5048. }
  5049. }
  5050. return message;
  5051. }
  5052. static decodeText(reader) {
  5053. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedStrings();
  5054. reader.start();
  5055. while (!reader.end()) {
  5056. const tag = reader.tag();
  5057. switch (tag) {
  5058. case "values":
  5059. reader.array(message.values, () => reader.string());
  5060. break;
  5061. default:
  5062. reader.field(tag, message);
  5063. break;
  5064. }
  5065. }
  5066. return message;
  5067. }
  5068. };
  5069. CoreML.Specification.MILSpec.TensorValue.RepeatedBytes = class RepeatedBytes {
  5070. static decode(reader, length) {
  5071. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedBytes();
  5072. const end = length === undefined ? reader.length : reader.position + length;
  5073. while (reader.position < end) {
  5074. const tag = reader.uint32();
  5075. switch (tag >>> 3) {
  5076. case 1:
  5077. message.values = reader.bytes();
  5078. break;
  5079. default:
  5080. reader.skipType(tag & 7);
  5081. break;
  5082. }
  5083. }
  5084. return message;
  5085. }
  5086. static decodeText(reader) {
  5087. const message = new CoreML.Specification.MILSpec.TensorValue.RepeatedBytes();
  5088. reader.start();
  5089. while (!reader.end()) {
  5090. const tag = reader.tag();
  5091. switch (tag) {
  5092. case "values":
  5093. message.values = reader.bytes();
  5094. break;
  5095. default:
  5096. reader.field(tag, message);
  5097. break;
  5098. }
  5099. }
  5100. return message;
  5101. }
  5102. };
  5103. CoreML.Specification.MILSpec.TensorValue.RepeatedBytes.prototype.values = new Uint8Array([]);
  5104. CoreML.Specification.MILSpec.TupleValue = class TupleValue {
  5105. constructor() {
  5106. this.values = [];
  5107. }
  5108. static decode(reader, length) {
  5109. const message = new CoreML.Specification.MILSpec.TupleValue();
  5110. const end = length === undefined ? reader.length : reader.position + length;
  5111. while (reader.position < end) {
  5112. const tag = reader.uint32();
  5113. switch (tag >>> 3) {
  5114. case 1:
  5115. message.values.push(CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  5116. break;
  5117. default:
  5118. reader.skipType(tag & 7);
  5119. break;
  5120. }
  5121. }
  5122. return message;
  5123. }
  5124. static decodeText(reader) {
  5125. const message = new CoreML.Specification.MILSpec.TupleValue();
  5126. reader.start();
  5127. while (!reader.end()) {
  5128. const tag = reader.tag();
  5129. switch (tag) {
  5130. case "values":
  5131. message.values.push(CoreML.Specification.MILSpec.Value.decodeText(reader));
  5132. break;
  5133. default:
  5134. reader.field(tag, message);
  5135. break;
  5136. }
  5137. }
  5138. return message;
  5139. }
  5140. };
  5141. CoreML.Specification.MILSpec.ListValue = class ListValue {
  5142. constructor() {
  5143. this.values = [];
  5144. }
  5145. static decode(reader, length) {
  5146. const message = new CoreML.Specification.MILSpec.ListValue();
  5147. const end = length === undefined ? reader.length : reader.position + length;
  5148. while (reader.position < end) {
  5149. const tag = reader.uint32();
  5150. switch (tag >>> 3) {
  5151. case 1:
  5152. message.values.push(CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32()));
  5153. break;
  5154. default:
  5155. reader.skipType(tag & 7);
  5156. break;
  5157. }
  5158. }
  5159. return message;
  5160. }
  5161. static decodeText(reader) {
  5162. const message = new CoreML.Specification.MILSpec.ListValue();
  5163. reader.start();
  5164. while (!reader.end()) {
  5165. const tag = reader.tag();
  5166. switch (tag) {
  5167. case "values":
  5168. message.values.push(CoreML.Specification.MILSpec.Value.decodeText(reader));
  5169. break;
  5170. default:
  5171. reader.field(tag, message);
  5172. break;
  5173. }
  5174. }
  5175. return message;
  5176. }
  5177. };
  5178. CoreML.Specification.MILSpec.DictionaryValue = class DictionaryValue {
  5179. constructor() {
  5180. this.values = [];
  5181. }
  5182. static decode(reader, length) {
  5183. const message = new CoreML.Specification.MILSpec.DictionaryValue();
  5184. const end = length === undefined ? reader.length : reader.position + length;
  5185. while (reader.position < end) {
  5186. const tag = reader.uint32();
  5187. switch (tag >>> 3) {
  5188. case 1:
  5189. message.values.push(CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair.decode(reader, reader.uint32()));
  5190. break;
  5191. default:
  5192. reader.skipType(tag & 7);
  5193. break;
  5194. }
  5195. }
  5196. return message;
  5197. }
  5198. static decodeText(reader) {
  5199. const message = new CoreML.Specification.MILSpec.DictionaryValue();
  5200. reader.start();
  5201. while (!reader.end()) {
  5202. const tag = reader.tag();
  5203. switch (tag) {
  5204. case "values":
  5205. message.values.push(CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair.decodeText(reader));
  5206. break;
  5207. default:
  5208. reader.field(tag, message);
  5209. break;
  5210. }
  5211. }
  5212. return message;
  5213. }
  5214. };
  5215. CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair = class KeyValuePair {
  5216. static decode(reader, length) {
  5217. const message = new CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair();
  5218. const end = length === undefined ? reader.length : reader.position + length;
  5219. while (reader.position < end) {
  5220. const tag = reader.uint32();
  5221. switch (tag >>> 3) {
  5222. case 1:
  5223. message.key = CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32());
  5224. break;
  5225. case 2:
  5226. message.value = CoreML.Specification.MILSpec.Value.decode(reader, reader.uint32());
  5227. break;
  5228. default:
  5229. reader.skipType(tag & 7);
  5230. break;
  5231. }
  5232. }
  5233. return message;
  5234. }
  5235. static decodeText(reader) {
  5236. const message = new CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair();
  5237. reader.start();
  5238. while (!reader.end()) {
  5239. const tag = reader.tag();
  5240. switch (tag) {
  5241. case "key":
  5242. message.key = CoreML.Specification.MILSpec.Value.decodeText(reader);
  5243. break;
  5244. case "value":
  5245. message.value = CoreML.Specification.MILSpec.Value.decodeText(reader);
  5246. break;
  5247. default:
  5248. reader.field(tag, message);
  5249. break;
  5250. }
  5251. }
  5252. return message;
  5253. }
  5254. };
  5255. CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair.prototype.key = null;
  5256. CoreML.Specification.MILSpec.DictionaryValue.KeyValuePair.prototype.value = null;
  5257. CoreML.Specification.NeuralNetworkMultiArrayShapeMapping = {
  5258. "RANK5_ARRAY_MAPPING": 0,
  5259. "EXACT_ARRAY_MAPPING": 1
  5260. };
  5261. CoreML.Specification.NeuralNetworkImageShapeMapping = {
  5262. "RANK5_IMAGE_MAPPING": 0,
  5263. "RANK4_IMAGE_MAPPING": 1
  5264. };
  5265. CoreML.Specification.NeuralNetwork = class NeuralNetwork {
  5266. constructor() {
  5267. this.layers = [];
  5268. this.preprocessing = [];
  5269. }
  5270. static decode(reader, length) {
  5271. const message = new CoreML.Specification.NeuralNetwork();
  5272. const end = length === undefined ? reader.length : reader.position + length;
  5273. while (reader.position < end) {
  5274. const tag = reader.uint32();
  5275. switch (tag >>> 3) {
  5276. case 1:
  5277. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  5278. break;
  5279. case 2:
  5280. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  5281. break;
  5282. case 5:
  5283. message.arrayInputShapeMapping = reader.int32();
  5284. break;
  5285. case 6:
  5286. message.imageInputShapeMapping = reader.int32();
  5287. break;
  5288. case 10:
  5289. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  5290. break;
  5291. default:
  5292. reader.skipType(tag & 7);
  5293. break;
  5294. }
  5295. }
  5296. return message;
  5297. }
  5298. static decodeText(reader) {
  5299. const message = new CoreML.Specification.NeuralNetwork();
  5300. reader.start();
  5301. while (!reader.end()) {
  5302. const tag = reader.tag();
  5303. switch (tag) {
  5304. case "layers":
  5305. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decodeText(reader));
  5306. break;
  5307. case "preprocessing":
  5308. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decodeText(reader));
  5309. break;
  5310. case "arrayInputShapeMapping":
  5311. message.arrayInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkMultiArrayShapeMapping);
  5312. break;
  5313. case "imageInputShapeMapping":
  5314. message.imageInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkImageShapeMapping);
  5315. break;
  5316. case "updateParams":
  5317. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decodeText(reader);
  5318. break;
  5319. default:
  5320. reader.field(tag, message);
  5321. break;
  5322. }
  5323. }
  5324. return message;
  5325. }
  5326. };
  5327. CoreML.Specification.NeuralNetwork.prototype.arrayInputShapeMapping = 0;
  5328. CoreML.Specification.NeuralNetwork.prototype.imageInputShapeMapping = 0;
  5329. CoreML.Specification.NeuralNetwork.prototype.updateParams = null;
  5330. CoreML.Specification.NeuralNetworkImageScaler = class NeuralNetworkImageScaler {
  5331. static decode(reader, length) {
  5332. const message = new CoreML.Specification.NeuralNetworkImageScaler();
  5333. const end = length === undefined ? reader.length : reader.position + length;
  5334. while (reader.position < end) {
  5335. const tag = reader.uint32();
  5336. switch (tag >>> 3) {
  5337. case 10:
  5338. message.channelScale = reader.float();
  5339. break;
  5340. case 20:
  5341. message.blueBias = reader.float();
  5342. break;
  5343. case 21:
  5344. message.greenBias = reader.float();
  5345. break;
  5346. case 22:
  5347. message.redBias = reader.float();
  5348. break;
  5349. case 30:
  5350. message.grayBias = reader.float();
  5351. break;
  5352. default:
  5353. reader.skipType(tag & 7);
  5354. break;
  5355. }
  5356. }
  5357. return message;
  5358. }
  5359. static decodeText(reader) {
  5360. const message = new CoreML.Specification.NeuralNetworkImageScaler();
  5361. reader.start();
  5362. while (!reader.end()) {
  5363. const tag = reader.tag();
  5364. switch (tag) {
  5365. case "channelScale":
  5366. message.channelScale = reader.float();
  5367. break;
  5368. case "blueBias":
  5369. message.blueBias = reader.float();
  5370. break;
  5371. case "greenBias":
  5372. message.greenBias = reader.float();
  5373. break;
  5374. case "redBias":
  5375. message.redBias = reader.float();
  5376. break;
  5377. case "grayBias":
  5378. message.grayBias = reader.float();
  5379. break;
  5380. default:
  5381. reader.field(tag, message);
  5382. break;
  5383. }
  5384. }
  5385. return message;
  5386. }
  5387. };
  5388. CoreML.Specification.NeuralNetworkImageScaler.prototype.channelScale = 0;
  5389. CoreML.Specification.NeuralNetworkImageScaler.prototype.blueBias = 0;
  5390. CoreML.Specification.NeuralNetworkImageScaler.prototype.greenBias = 0;
  5391. CoreML.Specification.NeuralNetworkImageScaler.prototype.redBias = 0;
  5392. CoreML.Specification.NeuralNetworkImageScaler.prototype.grayBias = 0;
  5393. CoreML.Specification.NeuralNetworkMeanImage = class NeuralNetworkMeanImage {
  5394. constructor() {
  5395. this.meanImage = [];
  5396. }
  5397. static decode(reader, length) {
  5398. const message = new CoreML.Specification.NeuralNetworkMeanImage();
  5399. const end = length === undefined ? reader.length : reader.position + length;
  5400. while (reader.position < end) {
  5401. const tag = reader.uint32();
  5402. switch (tag >>> 3) {
  5403. case 1:
  5404. message.meanImage = reader.floats(message.meanImage, tag);
  5405. break;
  5406. default:
  5407. reader.skipType(tag & 7);
  5408. break;
  5409. }
  5410. }
  5411. return message;
  5412. }
  5413. static decodeText(reader) {
  5414. const message = new CoreML.Specification.NeuralNetworkMeanImage();
  5415. reader.start();
  5416. while (!reader.end()) {
  5417. const tag = reader.tag();
  5418. switch (tag) {
  5419. case "meanImage":
  5420. reader.array(message.meanImage, () => reader.float());
  5421. break;
  5422. default:
  5423. reader.field(tag, message);
  5424. break;
  5425. }
  5426. }
  5427. return message;
  5428. }
  5429. };
  5430. CoreML.Specification.NeuralNetworkPreprocessing = class NeuralNetworkPreprocessing {
  5431. get preprocessor() {
  5432. CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet = CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet || new Set(["scaler", "meanImage"]);
  5433. return Object.keys(this).find((key) => CoreML.Specification.NeuralNetworkPreprocessing.preprocessorSet.has(key) && this[key] !== null);
  5434. }
  5435. static decode(reader, length) {
  5436. const message = new CoreML.Specification.NeuralNetworkPreprocessing();
  5437. const end = length === undefined ? reader.length : reader.position + length;
  5438. while (reader.position < end) {
  5439. const tag = reader.uint32();
  5440. switch (tag >>> 3) {
  5441. case 1:
  5442. message.featureName = reader.string();
  5443. break;
  5444. case 10:
  5445. message.scaler = CoreML.Specification.NeuralNetworkImageScaler.decode(reader, reader.uint32());
  5446. break;
  5447. case 11:
  5448. message.meanImage = CoreML.Specification.NeuralNetworkMeanImage.decode(reader, reader.uint32());
  5449. break;
  5450. default:
  5451. reader.skipType(tag & 7);
  5452. break;
  5453. }
  5454. }
  5455. return message;
  5456. }
  5457. static decodeText(reader) {
  5458. const message = new CoreML.Specification.NeuralNetworkPreprocessing();
  5459. reader.start();
  5460. while (!reader.end()) {
  5461. const tag = reader.tag();
  5462. switch (tag) {
  5463. case "featureName":
  5464. message.featureName = reader.string();
  5465. break;
  5466. case "scaler":
  5467. message.scaler = CoreML.Specification.NeuralNetworkImageScaler.decodeText(reader);
  5468. break;
  5469. case "meanImage":
  5470. message.meanImage = CoreML.Specification.NeuralNetworkMeanImage.decodeText(reader);
  5471. break;
  5472. default:
  5473. reader.field(tag, message);
  5474. break;
  5475. }
  5476. }
  5477. return message;
  5478. }
  5479. };
  5480. CoreML.Specification.NeuralNetworkPreprocessing.prototype.featureName = "";
  5481. CoreML.Specification.ActivationReLU = class ActivationReLU {
  5482. static decode(reader, length) {
  5483. const message = new CoreML.Specification.ActivationReLU();
  5484. const end = length === undefined ? reader.length : reader.position + length;
  5485. while (reader.position < end) {
  5486. const tag = reader.uint32();
  5487. switch (tag >>> 3) {
  5488. default:
  5489. reader.skipType(tag & 7);
  5490. break;
  5491. }
  5492. }
  5493. return message;
  5494. }
  5495. static decodeText(reader) {
  5496. const message = new CoreML.Specification.ActivationReLU();
  5497. reader.start();
  5498. while (!reader.end()) {
  5499. const tag = reader.tag();
  5500. switch (tag) {
  5501. default:
  5502. reader.field(tag, message);
  5503. break;
  5504. }
  5505. }
  5506. return message;
  5507. }
  5508. };
  5509. CoreML.Specification.ActivationLeakyReLU = class ActivationLeakyReLU {
  5510. static decode(reader, length) {
  5511. const message = new CoreML.Specification.ActivationLeakyReLU();
  5512. const end = length === undefined ? reader.length : reader.position + length;
  5513. while (reader.position < end) {
  5514. const tag = reader.uint32();
  5515. switch (tag >>> 3) {
  5516. case 1:
  5517. message.alpha = reader.float();
  5518. break;
  5519. default:
  5520. reader.skipType(tag & 7);
  5521. break;
  5522. }
  5523. }
  5524. return message;
  5525. }
  5526. static decodeText(reader) {
  5527. const message = new CoreML.Specification.ActivationLeakyReLU();
  5528. reader.start();
  5529. while (!reader.end()) {
  5530. const tag = reader.tag();
  5531. switch (tag) {
  5532. case "alpha":
  5533. message.alpha = reader.float();
  5534. break;
  5535. default:
  5536. reader.field(tag, message);
  5537. break;
  5538. }
  5539. }
  5540. return message;
  5541. }
  5542. };
  5543. CoreML.Specification.ActivationLeakyReLU.prototype.alpha = 0;
  5544. CoreML.Specification.ActivationTanh = class ActivationTanh {
  5545. static decode(reader, length) {
  5546. const message = new CoreML.Specification.ActivationTanh();
  5547. const end = length === undefined ? reader.length : reader.position + length;
  5548. while (reader.position < end) {
  5549. const tag = reader.uint32();
  5550. switch (tag >>> 3) {
  5551. default:
  5552. reader.skipType(tag & 7);
  5553. break;
  5554. }
  5555. }
  5556. return message;
  5557. }
  5558. static decodeText(reader) {
  5559. const message = new CoreML.Specification.ActivationTanh();
  5560. reader.start();
  5561. while (!reader.end()) {
  5562. const tag = reader.tag();
  5563. switch (tag) {
  5564. default:
  5565. reader.field(tag, message);
  5566. break;
  5567. }
  5568. }
  5569. return message;
  5570. }
  5571. };
  5572. CoreML.Specification.ActivationScaledTanh = class ActivationScaledTanh {
  5573. static decode(reader, length) {
  5574. const message = new CoreML.Specification.ActivationScaledTanh();
  5575. const end = length === undefined ? reader.length : reader.position + length;
  5576. while (reader.position < end) {
  5577. const tag = reader.uint32();
  5578. switch (tag >>> 3) {
  5579. case 1:
  5580. message.alpha = reader.float();
  5581. break;
  5582. case 2:
  5583. message.beta = reader.float();
  5584. break;
  5585. default:
  5586. reader.skipType(tag & 7);
  5587. break;
  5588. }
  5589. }
  5590. return message;
  5591. }
  5592. static decodeText(reader) {
  5593. const message = new CoreML.Specification.ActivationScaledTanh();
  5594. reader.start();
  5595. while (!reader.end()) {
  5596. const tag = reader.tag();
  5597. switch (tag) {
  5598. case "alpha":
  5599. message.alpha = reader.float();
  5600. break;
  5601. case "beta":
  5602. message.beta = reader.float();
  5603. break;
  5604. default:
  5605. reader.field(tag, message);
  5606. break;
  5607. }
  5608. }
  5609. return message;
  5610. }
  5611. };
  5612. CoreML.Specification.ActivationScaledTanh.prototype.alpha = 0;
  5613. CoreML.Specification.ActivationScaledTanh.prototype.beta = 0;
  5614. CoreML.Specification.ActivationSigmoid = class ActivationSigmoid {
  5615. static decode(reader, length) {
  5616. const message = new CoreML.Specification.ActivationSigmoid();
  5617. const end = length === undefined ? reader.length : reader.position + length;
  5618. while (reader.position < end) {
  5619. const tag = reader.uint32();
  5620. switch (tag >>> 3) {
  5621. default:
  5622. reader.skipType(tag & 7);
  5623. break;
  5624. }
  5625. }
  5626. return message;
  5627. }
  5628. static decodeText(reader) {
  5629. const message = new CoreML.Specification.ActivationSigmoid();
  5630. reader.start();
  5631. while (!reader.end()) {
  5632. const tag = reader.tag();
  5633. switch (tag) {
  5634. default:
  5635. reader.field(tag, message);
  5636. break;
  5637. }
  5638. }
  5639. return message;
  5640. }
  5641. };
  5642. CoreML.Specification.ActivationLinear = class ActivationLinear {
  5643. static decode(reader, length) {
  5644. const message = new CoreML.Specification.ActivationLinear();
  5645. const end = length === undefined ? reader.length : reader.position + length;
  5646. while (reader.position < end) {
  5647. const tag = reader.uint32();
  5648. switch (tag >>> 3) {
  5649. case 1:
  5650. message.alpha = reader.float();
  5651. break;
  5652. case 2:
  5653. message.beta = reader.float();
  5654. break;
  5655. default:
  5656. reader.skipType(tag & 7);
  5657. break;
  5658. }
  5659. }
  5660. return message;
  5661. }
  5662. static decodeText(reader) {
  5663. const message = new CoreML.Specification.ActivationLinear();
  5664. reader.start();
  5665. while (!reader.end()) {
  5666. const tag = reader.tag();
  5667. switch (tag) {
  5668. case "alpha":
  5669. message.alpha = reader.float();
  5670. break;
  5671. case "beta":
  5672. message.beta = reader.float();
  5673. break;
  5674. default:
  5675. reader.field(tag, message);
  5676. break;
  5677. }
  5678. }
  5679. return message;
  5680. }
  5681. };
  5682. CoreML.Specification.ActivationLinear.prototype.alpha = 0;
  5683. CoreML.Specification.ActivationLinear.prototype.beta = 0;
  5684. CoreML.Specification.ActivationSigmoidHard = class ActivationSigmoidHard {
  5685. static decode(reader, length) {
  5686. const message = new CoreML.Specification.ActivationSigmoidHard();
  5687. const end = length === undefined ? reader.length : reader.position + length;
  5688. while (reader.position < end) {
  5689. const tag = reader.uint32();
  5690. switch (tag >>> 3) {
  5691. case 1:
  5692. message.alpha = reader.float();
  5693. break;
  5694. case 2:
  5695. message.beta = reader.float();
  5696. break;
  5697. default:
  5698. reader.skipType(tag & 7);
  5699. break;
  5700. }
  5701. }
  5702. return message;
  5703. }
  5704. static decodeText(reader) {
  5705. const message = new CoreML.Specification.ActivationSigmoidHard();
  5706. reader.start();
  5707. while (!reader.end()) {
  5708. const tag = reader.tag();
  5709. switch (tag) {
  5710. case "alpha":
  5711. message.alpha = reader.float();
  5712. break;
  5713. case "beta":
  5714. message.beta = reader.float();
  5715. break;
  5716. default:
  5717. reader.field(tag, message);
  5718. break;
  5719. }
  5720. }
  5721. return message;
  5722. }
  5723. };
  5724. CoreML.Specification.ActivationSigmoidHard.prototype.alpha = 0;
  5725. CoreML.Specification.ActivationSigmoidHard.prototype.beta = 0;
  5726. CoreML.Specification.ActivationPReLU = class ActivationPReLU {
  5727. static decode(reader, length) {
  5728. const message = new CoreML.Specification.ActivationPReLU();
  5729. const end = length === undefined ? reader.length : reader.position + length;
  5730. while (reader.position < end) {
  5731. const tag = reader.uint32();
  5732. switch (tag >>> 3) {
  5733. case 1:
  5734. message.alpha = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5735. break;
  5736. default:
  5737. reader.skipType(tag & 7);
  5738. break;
  5739. }
  5740. }
  5741. return message;
  5742. }
  5743. static decodeText(reader) {
  5744. const message = new CoreML.Specification.ActivationPReLU();
  5745. reader.start();
  5746. while (!reader.end()) {
  5747. const tag = reader.tag();
  5748. switch (tag) {
  5749. case "alpha":
  5750. message.alpha = CoreML.Specification.WeightParams.decodeText(reader);
  5751. break;
  5752. default:
  5753. reader.field(tag, message);
  5754. break;
  5755. }
  5756. }
  5757. return message;
  5758. }
  5759. };
  5760. CoreML.Specification.ActivationPReLU.prototype.alpha = null;
  5761. CoreML.Specification.ActivationELU = class ActivationELU {
  5762. static decode(reader, length) {
  5763. const message = new CoreML.Specification.ActivationELU();
  5764. const end = length === undefined ? reader.length : reader.position + length;
  5765. while (reader.position < end) {
  5766. const tag = reader.uint32();
  5767. switch (tag >>> 3) {
  5768. case 1:
  5769. message.alpha = reader.float();
  5770. break;
  5771. default:
  5772. reader.skipType(tag & 7);
  5773. break;
  5774. }
  5775. }
  5776. return message;
  5777. }
  5778. static decodeText(reader) {
  5779. const message = new CoreML.Specification.ActivationELU();
  5780. reader.start();
  5781. while (!reader.end()) {
  5782. const tag = reader.tag();
  5783. switch (tag) {
  5784. case "alpha":
  5785. message.alpha = reader.float();
  5786. break;
  5787. default:
  5788. reader.field(tag, message);
  5789. break;
  5790. }
  5791. }
  5792. return message;
  5793. }
  5794. };
  5795. CoreML.Specification.ActivationELU.prototype.alpha = 0;
  5796. CoreML.Specification.ActivationThresholdedReLU = class ActivationThresholdedReLU {
  5797. static decode(reader, length) {
  5798. const message = new CoreML.Specification.ActivationThresholdedReLU();
  5799. const end = length === undefined ? reader.length : reader.position + length;
  5800. while (reader.position < end) {
  5801. const tag = reader.uint32();
  5802. switch (tag >>> 3) {
  5803. case 1:
  5804. message.alpha = reader.float();
  5805. break;
  5806. default:
  5807. reader.skipType(tag & 7);
  5808. break;
  5809. }
  5810. }
  5811. return message;
  5812. }
  5813. static decodeText(reader) {
  5814. const message = new CoreML.Specification.ActivationThresholdedReLU();
  5815. reader.start();
  5816. while (!reader.end()) {
  5817. const tag = reader.tag();
  5818. switch (tag) {
  5819. case "alpha":
  5820. message.alpha = reader.float();
  5821. break;
  5822. default:
  5823. reader.field(tag, message);
  5824. break;
  5825. }
  5826. }
  5827. return message;
  5828. }
  5829. };
  5830. CoreML.Specification.ActivationThresholdedReLU.prototype.alpha = 0;
  5831. CoreML.Specification.ActivationSoftsign = class ActivationSoftsign {
  5832. static decode(reader, length) {
  5833. const message = new CoreML.Specification.ActivationSoftsign();
  5834. const end = length === undefined ? reader.length : reader.position + length;
  5835. while (reader.position < end) {
  5836. const tag = reader.uint32();
  5837. switch (tag >>> 3) {
  5838. default:
  5839. reader.skipType(tag & 7);
  5840. break;
  5841. }
  5842. }
  5843. return message;
  5844. }
  5845. static decodeText(reader) {
  5846. const message = new CoreML.Specification.ActivationSoftsign();
  5847. reader.start();
  5848. while (!reader.end()) {
  5849. const tag = reader.tag();
  5850. switch (tag) {
  5851. default:
  5852. reader.field(tag, message);
  5853. break;
  5854. }
  5855. }
  5856. return message;
  5857. }
  5858. };
  5859. CoreML.Specification.ActivationSoftplus = class ActivationSoftplus {
  5860. static decode(reader, length) {
  5861. const message = new CoreML.Specification.ActivationSoftplus();
  5862. const end = length === undefined ? reader.length : reader.position + length;
  5863. while (reader.position < 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. static decodeText(reader) {
  5874. const message = new CoreML.Specification.ActivationSoftplus();
  5875. reader.start();
  5876. while (!reader.end()) {
  5877. const tag = reader.tag();
  5878. switch (tag) {
  5879. default:
  5880. reader.field(tag, message);
  5881. break;
  5882. }
  5883. }
  5884. return message;
  5885. }
  5886. };
  5887. CoreML.Specification.ActivationParametricSoftplus = class ActivationParametricSoftplus {
  5888. static decode(reader, length) {
  5889. const message = new CoreML.Specification.ActivationParametricSoftplus();
  5890. const end = length === undefined ? reader.length : reader.position + length;
  5891. while (reader.position < end) {
  5892. const tag = reader.uint32();
  5893. switch (tag >>> 3) {
  5894. case 1:
  5895. message.alpha = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5896. break;
  5897. case 2:
  5898. message.beta = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  5899. break;
  5900. default:
  5901. reader.skipType(tag & 7);
  5902. break;
  5903. }
  5904. }
  5905. return message;
  5906. }
  5907. static decodeText(reader) {
  5908. const message = new CoreML.Specification.ActivationParametricSoftplus();
  5909. reader.start();
  5910. while (!reader.end()) {
  5911. const tag = reader.tag();
  5912. switch (tag) {
  5913. case "alpha":
  5914. message.alpha = CoreML.Specification.WeightParams.decodeText(reader);
  5915. break;
  5916. case "beta":
  5917. message.beta = CoreML.Specification.WeightParams.decodeText(reader);
  5918. break;
  5919. default:
  5920. reader.field(tag, message);
  5921. break;
  5922. }
  5923. }
  5924. return message;
  5925. }
  5926. };
  5927. CoreML.Specification.ActivationParametricSoftplus.prototype.alpha = null;
  5928. CoreML.Specification.ActivationParametricSoftplus.prototype.beta = null;
  5929. CoreML.Specification.ActivationParams = class ActivationParams {
  5930. get NonlinearityType() {
  5931. CoreML.Specification.ActivationParams.NonlinearityTypeSet = CoreML.Specification.ActivationParams.NonlinearityTypeSet || new Set(["linear", "ReLU", "leakyReLU", "thresholdedReLU", "PReLU", "tanh", "scaledTanh", "sigmoid", "sigmoidHard", "ELU", "softsign", "softplus", "parametricSoftplus"]);
  5932. return Object.keys(this).find((key) => CoreML.Specification.ActivationParams.NonlinearityTypeSet.has(key) && this[key] !== null);
  5933. }
  5934. static decode(reader, length) {
  5935. const message = new CoreML.Specification.ActivationParams();
  5936. const end = length === undefined ? reader.length : reader.position + length;
  5937. while (reader.position < end) {
  5938. const tag = reader.uint32();
  5939. switch (tag >>> 3) {
  5940. case 5:
  5941. message.linear = CoreML.Specification.ActivationLinear.decode(reader, reader.uint32());
  5942. break;
  5943. case 10:
  5944. message.ReLU = CoreML.Specification.ActivationReLU.decode(reader, reader.uint32());
  5945. break;
  5946. case 15:
  5947. message.leakyReLU = CoreML.Specification.ActivationLeakyReLU.decode(reader, reader.uint32());
  5948. break;
  5949. case 20:
  5950. message.thresholdedReLU = CoreML.Specification.ActivationThresholdedReLU.decode(reader, reader.uint32());
  5951. break;
  5952. case 25:
  5953. message.PReLU = CoreML.Specification.ActivationPReLU.decode(reader, reader.uint32());
  5954. break;
  5955. case 30:
  5956. message.tanh = CoreML.Specification.ActivationTanh.decode(reader, reader.uint32());
  5957. break;
  5958. case 31:
  5959. message.scaledTanh = CoreML.Specification.ActivationScaledTanh.decode(reader, reader.uint32());
  5960. break;
  5961. case 40:
  5962. message.sigmoid = CoreML.Specification.ActivationSigmoid.decode(reader, reader.uint32());
  5963. break;
  5964. case 41:
  5965. message.sigmoidHard = CoreML.Specification.ActivationSigmoidHard.decode(reader, reader.uint32());
  5966. break;
  5967. case 50:
  5968. message.ELU = CoreML.Specification.ActivationELU.decode(reader, reader.uint32());
  5969. break;
  5970. case 60:
  5971. message.softsign = CoreML.Specification.ActivationSoftsign.decode(reader, reader.uint32());
  5972. break;
  5973. case 70:
  5974. message.softplus = CoreML.Specification.ActivationSoftplus.decode(reader, reader.uint32());
  5975. break;
  5976. case 71:
  5977. message.parametricSoftplus = CoreML.Specification.ActivationParametricSoftplus.decode(reader, reader.uint32());
  5978. break;
  5979. default:
  5980. reader.skipType(tag & 7);
  5981. break;
  5982. }
  5983. }
  5984. return message;
  5985. }
  5986. static decodeText(reader) {
  5987. const message = new CoreML.Specification.ActivationParams();
  5988. reader.start();
  5989. while (!reader.end()) {
  5990. const tag = reader.tag();
  5991. switch (tag) {
  5992. case "linear":
  5993. message.linear = CoreML.Specification.ActivationLinear.decodeText(reader);
  5994. break;
  5995. case "ReLU":
  5996. message.ReLU = CoreML.Specification.ActivationReLU.decodeText(reader);
  5997. break;
  5998. case "leakyReLU":
  5999. message.leakyReLU = CoreML.Specification.ActivationLeakyReLU.decodeText(reader);
  6000. break;
  6001. case "thresholdedReLU":
  6002. message.thresholdedReLU = CoreML.Specification.ActivationThresholdedReLU.decodeText(reader);
  6003. break;
  6004. case "PReLU":
  6005. message.PReLU = CoreML.Specification.ActivationPReLU.decodeText(reader);
  6006. break;
  6007. case "tanh":
  6008. message.tanh = CoreML.Specification.ActivationTanh.decodeText(reader);
  6009. break;
  6010. case "scaledTanh":
  6011. message.scaledTanh = CoreML.Specification.ActivationScaledTanh.decodeText(reader);
  6012. break;
  6013. case "sigmoid":
  6014. message.sigmoid = CoreML.Specification.ActivationSigmoid.decodeText(reader);
  6015. break;
  6016. case "sigmoidHard":
  6017. message.sigmoidHard = CoreML.Specification.ActivationSigmoidHard.decodeText(reader);
  6018. break;
  6019. case "ELU":
  6020. message.ELU = CoreML.Specification.ActivationELU.decodeText(reader);
  6021. break;
  6022. case "softsign":
  6023. message.softsign = CoreML.Specification.ActivationSoftsign.decodeText(reader);
  6024. break;
  6025. case "softplus":
  6026. message.softplus = CoreML.Specification.ActivationSoftplus.decodeText(reader);
  6027. break;
  6028. case "parametricSoftplus":
  6029. message.parametricSoftplus = CoreML.Specification.ActivationParametricSoftplus.decodeText(reader);
  6030. break;
  6031. default:
  6032. reader.field(tag, message);
  6033. break;
  6034. }
  6035. }
  6036. return message;
  6037. }
  6038. };
  6039. CoreML.Specification.Tensor = class Tensor {
  6040. constructor() {
  6041. this.dimValue = [];
  6042. }
  6043. static decode(reader, length) {
  6044. const message = new CoreML.Specification.Tensor();
  6045. const end = length === undefined ? reader.length : reader.position + length;
  6046. while (reader.position < end) {
  6047. const tag = reader.uint32();
  6048. switch (tag >>> 3) {
  6049. case 1:
  6050. message.rank = reader.uint32();
  6051. break;
  6052. case 2:
  6053. message.dimValue = reader.array(message.dimValue, () => reader.int64(), tag);
  6054. break;
  6055. default:
  6056. reader.skipType(tag & 7);
  6057. break;
  6058. }
  6059. }
  6060. return message;
  6061. }
  6062. static decodeText(reader) {
  6063. const message = new CoreML.Specification.Tensor();
  6064. reader.start();
  6065. while (!reader.end()) {
  6066. const tag = reader.tag();
  6067. switch (tag) {
  6068. case "rank":
  6069. message.rank = reader.uint32();
  6070. break;
  6071. case "dimValue":
  6072. reader.array(message.dimValue, () => reader.int64());
  6073. break;
  6074. default:
  6075. reader.field(tag, message);
  6076. break;
  6077. }
  6078. }
  6079. return message;
  6080. }
  6081. };
  6082. CoreML.Specification.Tensor.prototype.rank = 0;
  6083. CoreML.Specification.NeuralNetworkLayer = class NeuralNetworkLayer {
  6084. constructor() {
  6085. this.input = [];
  6086. this.output = [];
  6087. this.inputTensor = [];
  6088. this.outputTensor = [];
  6089. }
  6090. get layer() {
  6091. CoreML.Specification.NeuralNetworkLayer.layerSet = 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"]);
  6092. return Object.keys(this).find((key) => CoreML.Specification.NeuralNetworkLayer.layerSet.has(key) && this[key] !== null);
  6093. }
  6094. static decode(reader, length) {
  6095. const message = new CoreML.Specification.NeuralNetworkLayer();
  6096. const end = length === undefined ? reader.length : reader.position + length;
  6097. while (reader.position < end) {
  6098. const tag = reader.uint32();
  6099. switch (tag >>> 3) {
  6100. case 1:
  6101. message.name = reader.string();
  6102. break;
  6103. case 2:
  6104. message.input.push(reader.string());
  6105. break;
  6106. case 3:
  6107. message.output.push(reader.string());
  6108. break;
  6109. case 4:
  6110. message.inputTensor.push(CoreML.Specification.Tensor.decode(reader, reader.uint32()));
  6111. break;
  6112. case 5:
  6113. message.outputTensor.push(CoreML.Specification.Tensor.decode(reader, reader.uint32()));
  6114. break;
  6115. case 10:
  6116. message.isUpdatable = reader.bool();
  6117. break;
  6118. case 100:
  6119. message.convolution = CoreML.Specification.ConvolutionLayerParams.decode(reader, reader.uint32());
  6120. break;
  6121. case 120:
  6122. message.pooling = CoreML.Specification.PoolingLayerParams.decode(reader, reader.uint32());
  6123. break;
  6124. case 130:
  6125. message.activation = CoreML.Specification.ActivationParams.decode(reader, reader.uint32());
  6126. break;
  6127. case 140:
  6128. message.innerProduct = CoreML.Specification.InnerProductLayerParams.decode(reader, reader.uint32());
  6129. break;
  6130. case 150:
  6131. message.embedding = CoreML.Specification.EmbeddingLayerParams.decode(reader, reader.uint32());
  6132. break;
  6133. case 160:
  6134. message.batchnorm = CoreML.Specification.BatchnormLayerParams.decode(reader, reader.uint32());
  6135. break;
  6136. case 165:
  6137. message.mvn = CoreML.Specification.MeanVarianceNormalizeLayerParams.decode(reader, reader.uint32());
  6138. break;
  6139. case 170:
  6140. message.l2normalize = CoreML.Specification.L2NormalizeLayerParams.decode(reader, reader.uint32());
  6141. break;
  6142. case 175:
  6143. message.softmax = CoreML.Specification.SoftmaxLayerParams.decode(reader, reader.uint32());
  6144. break;
  6145. case 180:
  6146. message.lrn = CoreML.Specification.LRNLayerParams.decode(reader, reader.uint32());
  6147. break;
  6148. case 190:
  6149. message.crop = CoreML.Specification.CropLayerParams.decode(reader, reader.uint32());
  6150. break;
  6151. case 200:
  6152. message.padding = CoreML.Specification.PaddingLayerParams.decode(reader, reader.uint32());
  6153. break;
  6154. case 210:
  6155. message.upsample = CoreML.Specification.UpsampleLayerParams.decode(reader, reader.uint32());
  6156. break;
  6157. case 211:
  6158. message.resizeBilinear = CoreML.Specification.ResizeBilinearLayerParams.decode(reader, reader.uint32());
  6159. break;
  6160. case 212:
  6161. message.cropResize = CoreML.Specification.CropResizeLayerParams.decode(reader, reader.uint32());
  6162. break;
  6163. case 220:
  6164. message.unary = CoreML.Specification.UnaryFunctionLayerParams.decode(reader, reader.uint32());
  6165. break;
  6166. case 230:
  6167. message.add = CoreML.Specification.AddLayerParams.decode(reader, reader.uint32());
  6168. break;
  6169. case 231:
  6170. message.multiply = CoreML.Specification.MultiplyLayerParams.decode(reader, reader.uint32());
  6171. break;
  6172. case 240:
  6173. message.average = CoreML.Specification.AverageLayerParams.decode(reader, reader.uint32());
  6174. break;
  6175. case 245:
  6176. message.scale = CoreML.Specification.ScaleLayerParams.decode(reader, reader.uint32());
  6177. break;
  6178. case 250:
  6179. message.bias = CoreML.Specification.BiasLayerParams.decode(reader, reader.uint32());
  6180. break;
  6181. case 260:
  6182. message.max = CoreML.Specification.MaxLayerParams.decode(reader, reader.uint32());
  6183. break;
  6184. case 261:
  6185. message.min = CoreML.Specification.MinLayerParams.decode(reader, reader.uint32());
  6186. break;
  6187. case 270:
  6188. message.dot = CoreML.Specification.DotProductLayerParams.decode(reader, reader.uint32());
  6189. break;
  6190. case 280:
  6191. message.reduce = CoreML.Specification.ReduceLayerParams.decode(reader, reader.uint32());
  6192. break;
  6193. case 290:
  6194. message.loadConstant = CoreML.Specification.LoadConstantLayerParams.decode(reader, reader.uint32());
  6195. break;
  6196. case 300:
  6197. message.reshape = CoreML.Specification.ReshapeLayerParams.decode(reader, reader.uint32());
  6198. break;
  6199. case 301:
  6200. message.flatten = CoreML.Specification.FlattenLayerParams.decode(reader, reader.uint32());
  6201. break;
  6202. case 310:
  6203. message.permute = CoreML.Specification.PermuteLayerParams.decode(reader, reader.uint32());
  6204. break;
  6205. case 320:
  6206. message.concat = CoreML.Specification.ConcatLayerParams.decode(reader, reader.uint32());
  6207. break;
  6208. case 330:
  6209. message.split = CoreML.Specification.SplitLayerParams.decode(reader, reader.uint32());
  6210. break;
  6211. case 340:
  6212. message.sequenceRepeat = CoreML.Specification.SequenceRepeatLayerParams.decode(reader, reader.uint32());
  6213. break;
  6214. case 345:
  6215. message.reorganizeData = CoreML.Specification.ReorganizeDataLayerParams.decode(reader, reader.uint32());
  6216. break;
  6217. case 350:
  6218. message.slice = CoreML.Specification.SliceLayerParams.decode(reader, reader.uint32());
  6219. break;
  6220. case 400:
  6221. message.simpleRecurrent = CoreML.Specification.SimpleRecurrentLayerParams.decode(reader, reader.uint32());
  6222. break;
  6223. case 410:
  6224. message.gru = CoreML.Specification.GRULayerParams.decode(reader, reader.uint32());
  6225. break;
  6226. case 420:
  6227. message.uniDirectionalLSTM = CoreML.Specification.UniDirectionalLSTMLayerParams.decode(reader, reader.uint32());
  6228. break;
  6229. case 430:
  6230. message.biDirectionalLSTM = CoreML.Specification.BiDirectionalLSTMLayerParams.decode(reader, reader.uint32());
  6231. break;
  6232. case 500:
  6233. message.custom = CoreML.Specification.CustomLayerParams.decode(reader, reader.uint32());
  6234. break;
  6235. case 600:
  6236. message.copy = CoreML.Specification.CopyLayerParams.decode(reader, reader.uint32());
  6237. break;
  6238. case 605:
  6239. message.branch = CoreML.Specification.BranchLayerParams.decode(reader, reader.uint32());
  6240. break;
  6241. case 615:
  6242. message.loop = CoreML.Specification.LoopLayerParams.decode(reader, reader.uint32());
  6243. break;
  6244. case 620:
  6245. message.loopBreak = CoreML.Specification.LoopBreakLayerParams.decode(reader, reader.uint32());
  6246. break;
  6247. case 625:
  6248. message.loopContinue = CoreML.Specification.LoopContinueLayerParams.decode(reader, reader.uint32());
  6249. break;
  6250. case 635:
  6251. message.rangeStatic = CoreML.Specification.RangeStaticLayerParams.decode(reader, reader.uint32());
  6252. break;
  6253. case 640:
  6254. message.rangeDynamic = CoreML.Specification.RangeDynamicLayerParams.decode(reader, reader.uint32());
  6255. break;
  6256. case 660:
  6257. message.clip = CoreML.Specification.ClipLayerParams.decode(reader, reader.uint32());
  6258. break;
  6259. case 665:
  6260. message.ceil = CoreML.Specification.CeilLayerParams.decode(reader, reader.uint32());
  6261. break;
  6262. case 670:
  6263. message.floor = CoreML.Specification.FloorLayerParams.decode(reader, reader.uint32());
  6264. break;
  6265. case 680:
  6266. message.sign = CoreML.Specification.SignLayerParams.decode(reader, reader.uint32());
  6267. break;
  6268. case 685:
  6269. message.round = CoreML.Specification.RoundLayerParams.decode(reader, reader.uint32());
  6270. break;
  6271. case 700:
  6272. message.exp2 = CoreML.Specification.Exp2LayerParams.decode(reader, reader.uint32());
  6273. break;
  6274. case 710:
  6275. message.sin = CoreML.Specification.SinLayerParams.decode(reader, reader.uint32());
  6276. break;
  6277. case 715:
  6278. message.cos = CoreML.Specification.CosLayerParams.decode(reader, reader.uint32());
  6279. break;
  6280. case 720:
  6281. message.tan = CoreML.Specification.TanLayerParams.decode(reader, reader.uint32());
  6282. break;
  6283. case 730:
  6284. message.asin = CoreML.Specification.AsinLayerParams.decode(reader, reader.uint32());
  6285. break;
  6286. case 735:
  6287. message.acos = CoreML.Specification.AcosLayerParams.decode(reader, reader.uint32());
  6288. break;
  6289. case 740:
  6290. message.atan = CoreML.Specification.AtanLayerParams.decode(reader, reader.uint32());
  6291. break;
  6292. case 750:
  6293. message.sinh = CoreML.Specification.SinhLayerParams.decode(reader, reader.uint32());
  6294. break;
  6295. case 755:
  6296. message.cosh = CoreML.Specification.CoshLayerParams.decode(reader, reader.uint32());
  6297. break;
  6298. case 760:
  6299. message.tanh = CoreML.Specification.TanhLayerParams.decode(reader, reader.uint32());
  6300. break;
  6301. case 770:
  6302. message.asinh = CoreML.Specification.AsinhLayerParams.decode(reader, reader.uint32());
  6303. break;
  6304. case 775:
  6305. message.acosh = CoreML.Specification.AcoshLayerParams.decode(reader, reader.uint32());
  6306. break;
  6307. case 780:
  6308. message.atanh = CoreML.Specification.AtanhLayerParams.decode(reader, reader.uint32());
  6309. break;
  6310. case 790:
  6311. message.erf = CoreML.Specification.ErfLayerParams.decode(reader, reader.uint32());
  6312. break;
  6313. case 795:
  6314. message.gelu = CoreML.Specification.GeluLayerParams.decode(reader, reader.uint32());
  6315. break;
  6316. case 815:
  6317. message.equal = CoreML.Specification.EqualLayerParams.decode(reader, reader.uint32());
  6318. break;
  6319. case 820:
  6320. message.notEqual = CoreML.Specification.NotEqualLayerParams.decode(reader, reader.uint32());
  6321. break;
  6322. case 825:
  6323. message.lessThan = CoreML.Specification.LessThanLayerParams.decode(reader, reader.uint32());
  6324. break;
  6325. case 827:
  6326. message.lessEqual = CoreML.Specification.LessEqualLayerParams.decode(reader, reader.uint32());
  6327. break;
  6328. case 830:
  6329. message.greaterThan = CoreML.Specification.GreaterThanLayerParams.decode(reader, reader.uint32());
  6330. break;
  6331. case 832:
  6332. message.greaterEqual = CoreML.Specification.GreaterEqualLayerParams.decode(reader, reader.uint32());
  6333. break;
  6334. case 840:
  6335. message.logicalOr = CoreML.Specification.LogicalOrLayerParams.decode(reader, reader.uint32());
  6336. break;
  6337. case 845:
  6338. message.logicalXor = CoreML.Specification.LogicalXorLayerParams.decode(reader, reader.uint32());
  6339. break;
  6340. case 850:
  6341. message.logicalNot = CoreML.Specification.LogicalNotLayerParams.decode(reader, reader.uint32());
  6342. break;
  6343. case 855:
  6344. message.logicalAnd = CoreML.Specification.LogicalAndLayerParams.decode(reader, reader.uint32());
  6345. break;
  6346. case 865:
  6347. message.modBroadcastable = CoreML.Specification.ModBroadcastableLayerParams.decode(reader, reader.uint32());
  6348. break;
  6349. case 870:
  6350. message.minBroadcastable = CoreML.Specification.MinBroadcastableLayerParams.decode(reader, reader.uint32());
  6351. break;
  6352. case 875:
  6353. message.maxBroadcastable = CoreML.Specification.MaxBroadcastableLayerParams.decode(reader, reader.uint32());
  6354. break;
  6355. case 880:
  6356. message.addBroadcastable = CoreML.Specification.AddBroadcastableLayerParams.decode(reader, reader.uint32());
  6357. break;
  6358. case 885:
  6359. message.powBroadcastable = CoreML.Specification.PowBroadcastableLayerParams.decode(reader, reader.uint32());
  6360. break;
  6361. case 890:
  6362. message.divideBroadcastable = CoreML.Specification.DivideBroadcastableLayerParams.decode(reader, reader.uint32());
  6363. break;
  6364. case 895:
  6365. message.floorDivBroadcastable = CoreML.Specification.FloorDivBroadcastableLayerParams.decode(reader, reader.uint32());
  6366. break;
  6367. case 900:
  6368. message.multiplyBroadcastable = CoreML.Specification.MultiplyBroadcastableLayerParams.decode(reader, reader.uint32());
  6369. break;
  6370. case 905:
  6371. message.subtractBroadcastable = CoreML.Specification.SubtractBroadcastableLayerParams.decode(reader, reader.uint32());
  6372. break;
  6373. case 920:
  6374. message.tile = CoreML.Specification.TileLayerParams.decode(reader, reader.uint32());
  6375. break;
  6376. case 925:
  6377. message.stack = CoreML.Specification.StackLayerParams.decode(reader, reader.uint32());
  6378. break;
  6379. case 930:
  6380. message.gather = CoreML.Specification.GatherLayerParams.decode(reader, reader.uint32());
  6381. break;
  6382. case 935:
  6383. message.scatter = CoreML.Specification.ScatterLayerParams.decode(reader, reader.uint32());
  6384. break;
  6385. case 940:
  6386. message.gatherND = CoreML.Specification.GatherNDLayerParams.decode(reader, reader.uint32());
  6387. break;
  6388. case 945:
  6389. message.scatterND = CoreML.Specification.ScatterNDLayerParams.decode(reader, reader.uint32());
  6390. break;
  6391. case 950:
  6392. message.softmaxND = CoreML.Specification.SoftmaxNDLayerParams.decode(reader, reader.uint32());
  6393. break;
  6394. case 952:
  6395. message.gatherAlongAxis = CoreML.Specification.GatherAlongAxisLayerParams.decode(reader, reader.uint32());
  6396. break;
  6397. case 954:
  6398. message.scatterAlongAxis = CoreML.Specification.ScatterAlongAxisLayerParams.decode(reader, reader.uint32());
  6399. break;
  6400. case 960:
  6401. message.reverse = CoreML.Specification.ReverseLayerParams.decode(reader, reader.uint32());
  6402. break;
  6403. case 965:
  6404. message.reverseSeq = CoreML.Specification.ReverseSeqLayerParams.decode(reader, reader.uint32());
  6405. break;
  6406. case 975:
  6407. message.splitND = CoreML.Specification.SplitNDLayerParams.decode(reader, reader.uint32());
  6408. break;
  6409. case 980:
  6410. message.concatND = CoreML.Specification.ConcatNDLayerParams.decode(reader, reader.uint32());
  6411. break;
  6412. case 985:
  6413. message.transpose = CoreML.Specification.TransposeLayerParams.decode(reader, reader.uint32());
  6414. break;
  6415. case 995:
  6416. message.sliceStatic = CoreML.Specification.SliceStaticLayerParams.decode(reader, reader.uint32());
  6417. break;
  6418. case 1000:
  6419. message.sliceDynamic = CoreML.Specification.SliceDynamicLayerParams.decode(reader, reader.uint32());
  6420. break;
  6421. case 1005:
  6422. message.slidingWindows = CoreML.Specification.SlidingWindowsLayerParams.decode(reader, reader.uint32());
  6423. break;
  6424. case 1015:
  6425. message.topK = CoreML.Specification.TopKLayerParams.decode(reader, reader.uint32());
  6426. break;
  6427. case 1020:
  6428. message.argMin = CoreML.Specification.ArgMinLayerParams.decode(reader, reader.uint32());
  6429. break;
  6430. case 1025:
  6431. message.argMax = CoreML.Specification.ArgMaxLayerParams.decode(reader, reader.uint32());
  6432. break;
  6433. case 1040:
  6434. message.embeddingND = CoreML.Specification.EmbeddingNDLayerParams.decode(reader, reader.uint32());
  6435. break;
  6436. case 1045:
  6437. message.batchedMatmul = CoreML.Specification.BatchedMatMulLayerParams.decode(reader, reader.uint32());
  6438. break;
  6439. case 1065:
  6440. message.getShape = CoreML.Specification.GetShapeLayerParams.decode(reader, reader.uint32());
  6441. break;
  6442. case 1070:
  6443. message.loadConstantND = CoreML.Specification.LoadConstantNDLayerParams.decode(reader, reader.uint32());
  6444. break;
  6445. case 1080:
  6446. message.fillLike = CoreML.Specification.FillLikeLayerParams.decode(reader, reader.uint32());
  6447. break;
  6448. case 1085:
  6449. message.fillStatic = CoreML.Specification.FillStaticLayerParams.decode(reader, reader.uint32());
  6450. break;
  6451. case 1090:
  6452. message.fillDynamic = CoreML.Specification.FillDynamicLayerParams.decode(reader, reader.uint32());
  6453. break;
  6454. case 1100:
  6455. message.broadcastToLike = CoreML.Specification.BroadcastToLikeLayerParams.decode(reader, reader.uint32());
  6456. break;
  6457. case 1105:
  6458. message.broadcastToStatic = CoreML.Specification.BroadcastToStaticLayerParams.decode(reader, reader.uint32());
  6459. break;
  6460. case 1110:
  6461. message.broadcastToDynamic = CoreML.Specification.BroadcastToDynamicLayerParams.decode(reader, reader.uint32());
  6462. break;
  6463. case 1120:
  6464. message.squeeze = CoreML.Specification.SqueezeLayerParams.decode(reader, reader.uint32());
  6465. break;
  6466. case 1125:
  6467. message.expandDims = CoreML.Specification.ExpandDimsLayerParams.decode(reader, reader.uint32());
  6468. break;
  6469. case 1130:
  6470. message.flattenTo2D = CoreML.Specification.FlattenTo2DLayerParams.decode(reader, reader.uint32());
  6471. break;
  6472. case 1135:
  6473. message.reshapeLike = CoreML.Specification.ReshapeLikeLayerParams.decode(reader, reader.uint32());
  6474. break;
  6475. case 1140:
  6476. message.reshapeStatic = CoreML.Specification.ReshapeStaticLayerParams.decode(reader, reader.uint32());
  6477. break;
  6478. case 1145:
  6479. message.reshapeDynamic = CoreML.Specification.ReshapeDynamicLayerParams.decode(reader, reader.uint32());
  6480. break;
  6481. case 1150:
  6482. message.rankPreservingReshape = CoreML.Specification.RankPreservingReshapeLayerParams.decode(reader, reader.uint32());
  6483. break;
  6484. case 1155:
  6485. message.constantPad = CoreML.Specification.ConstantPaddingLayerParams.decode(reader, reader.uint32());
  6486. break;
  6487. case 1170:
  6488. message.randomNormalLike = CoreML.Specification.RandomNormalLikeLayerParams.decode(reader, reader.uint32());
  6489. break;
  6490. case 1175:
  6491. message.randomNormalStatic = CoreML.Specification.RandomNormalStaticLayerParams.decode(reader, reader.uint32());
  6492. break;
  6493. case 1180:
  6494. message.randomNormalDynamic = CoreML.Specification.RandomNormalDynamicLayerParams.decode(reader, reader.uint32());
  6495. break;
  6496. case 1190:
  6497. message.randomUniformLike = CoreML.Specification.RandomUniformLikeLayerParams.decode(reader, reader.uint32());
  6498. break;
  6499. case 1195:
  6500. message.randomUniformStatic = CoreML.Specification.RandomUniformStaticLayerParams.decode(reader, reader.uint32());
  6501. break;
  6502. case 1200:
  6503. message.randomUniformDynamic = CoreML.Specification.RandomUniformDynamicLayerParams.decode(reader, reader.uint32());
  6504. break;
  6505. case 1210:
  6506. message.randomBernoulliLike = CoreML.Specification.RandomBernoulliLikeLayerParams.decode(reader, reader.uint32());
  6507. break;
  6508. case 1215:
  6509. message.randomBernoulliStatic = CoreML.Specification.RandomBernoulliStaticLayerParams.decode(reader, reader.uint32());
  6510. break;
  6511. case 1220:
  6512. message.randomBernoulliDynamic = CoreML.Specification.RandomBernoulliDynamicLayerParams.decode(reader, reader.uint32());
  6513. break;
  6514. case 1230:
  6515. message.categoricalDistribution = CoreML.Specification.CategoricalDistributionLayerParams.decode(reader, reader.uint32());
  6516. break;
  6517. case 1250:
  6518. message.reduceL1 = CoreML.Specification.ReduceL1LayerParams.decode(reader, reader.uint32());
  6519. break;
  6520. case 1255:
  6521. message.reduceL2 = CoreML.Specification.ReduceL2LayerParams.decode(reader, reader.uint32());
  6522. break;
  6523. case 1260:
  6524. message.reduceMax = CoreML.Specification.ReduceMaxLayerParams.decode(reader, reader.uint32());
  6525. break;
  6526. case 1265:
  6527. message.reduceMin = CoreML.Specification.ReduceMinLayerParams.decode(reader, reader.uint32());
  6528. break;
  6529. case 1270:
  6530. message.reduceSum = CoreML.Specification.ReduceSumLayerParams.decode(reader, reader.uint32());
  6531. break;
  6532. case 1275:
  6533. message.reduceProd = CoreML.Specification.ReduceProdLayerParams.decode(reader, reader.uint32());
  6534. break;
  6535. case 1280:
  6536. message.reduceMean = CoreML.Specification.ReduceMeanLayerParams.decode(reader, reader.uint32());
  6537. break;
  6538. case 1285:
  6539. message.reduceLogSum = CoreML.Specification.ReduceLogSumLayerParams.decode(reader, reader.uint32());
  6540. break;
  6541. case 1290:
  6542. message.reduceSumSquare = CoreML.Specification.ReduceSumSquareLayerParams.decode(reader, reader.uint32());
  6543. break;
  6544. case 1295:
  6545. message.reduceLogSumExp = CoreML.Specification.ReduceLogSumExpLayerParams.decode(reader, reader.uint32());
  6546. break;
  6547. case 1313:
  6548. message.whereNonZero = CoreML.Specification.WhereNonZeroLayerParams.decode(reader, reader.uint32());
  6549. break;
  6550. case 1315:
  6551. message.matrixBandPart = CoreML.Specification.MatrixBandPartLayerParams.decode(reader, reader.uint32());
  6552. break;
  6553. case 1320:
  6554. message.lowerTriangular = CoreML.Specification.LowerTriangularLayerParams.decode(reader, reader.uint32());
  6555. break;
  6556. case 1325:
  6557. message.upperTriangular = CoreML.Specification.UpperTriangularLayerParams.decode(reader, reader.uint32());
  6558. break;
  6559. case 1330:
  6560. message.whereBroadcastable = CoreML.Specification.WhereBroadcastableLayerParams.decode(reader, reader.uint32());
  6561. break;
  6562. case 1350:
  6563. message.layerNormalization = CoreML.Specification.LayerNormalizationLayerParams.decode(reader, reader.uint32());
  6564. break;
  6565. case 1400:
  6566. message.NonMaximumSuppression = CoreML.Specification.NonMaximumSuppressionLayerParams.decode(reader, reader.uint32());
  6567. break;
  6568. case 1450:
  6569. message.oneHot = CoreML.Specification.OneHotLayerParams.decode(reader, reader.uint32());
  6570. break;
  6571. case 1455:
  6572. message.cumSum = CoreML.Specification.CumSumLayerParams.decode(reader, reader.uint32());
  6573. break;
  6574. case 1460:
  6575. message.clampedReLU = CoreML.Specification.ClampedReLULayerParams.decode(reader, reader.uint32());
  6576. break;
  6577. case 1461:
  6578. message.argSort = CoreML.Specification.ArgSortLayerParams.decode(reader, reader.uint32());
  6579. break;
  6580. case 1465:
  6581. message.pooling3d = CoreML.Specification.Pooling3DLayerParams.decode(reader, reader.uint32());
  6582. break;
  6583. case 1466:
  6584. message.globalPooling3d = CoreML.Specification.GlobalPooling3DLayerParams.decode(reader, reader.uint32());
  6585. break;
  6586. case 1470:
  6587. message.sliceBySize = CoreML.Specification.SliceBySizeLayerParams.decode(reader, reader.uint32());
  6588. break;
  6589. case 1471:
  6590. message.convolution3d = CoreML.Specification.Convolution3DLayerParams.decode(reader, reader.uint32());
  6591. break;
  6592. default:
  6593. reader.skipType(tag & 7);
  6594. break;
  6595. }
  6596. }
  6597. return message;
  6598. }
  6599. static decodeText(reader) {
  6600. const message = new CoreML.Specification.NeuralNetworkLayer();
  6601. reader.start();
  6602. while (!reader.end()) {
  6603. const tag = reader.tag();
  6604. switch (tag) {
  6605. case "name":
  6606. message.name = reader.string();
  6607. break;
  6608. case "input":
  6609. reader.array(message.input, () => reader.string());
  6610. break;
  6611. case "output":
  6612. reader.array(message.output, () => reader.string());
  6613. break;
  6614. case "inputTensor":
  6615. message.inputTensor.push(CoreML.Specification.Tensor.decodeText(reader));
  6616. break;
  6617. case "outputTensor":
  6618. message.outputTensor.push(CoreML.Specification.Tensor.decodeText(reader));
  6619. break;
  6620. case "isUpdatable":
  6621. message.isUpdatable = reader.bool();
  6622. break;
  6623. case "convolution":
  6624. message.convolution = CoreML.Specification.ConvolutionLayerParams.decodeText(reader);
  6625. break;
  6626. case "pooling":
  6627. message.pooling = CoreML.Specification.PoolingLayerParams.decodeText(reader);
  6628. break;
  6629. case "activation":
  6630. message.activation = CoreML.Specification.ActivationParams.decodeText(reader);
  6631. break;
  6632. case "innerProduct":
  6633. message.innerProduct = CoreML.Specification.InnerProductLayerParams.decodeText(reader);
  6634. break;
  6635. case "embedding":
  6636. message.embedding = CoreML.Specification.EmbeddingLayerParams.decodeText(reader);
  6637. break;
  6638. case "batchnorm":
  6639. message.batchnorm = CoreML.Specification.BatchnormLayerParams.decodeText(reader);
  6640. break;
  6641. case "mvn":
  6642. message.mvn = CoreML.Specification.MeanVarianceNormalizeLayerParams.decodeText(reader);
  6643. break;
  6644. case "l2normalize":
  6645. message.l2normalize = CoreML.Specification.L2NormalizeLayerParams.decodeText(reader);
  6646. break;
  6647. case "softmax":
  6648. message.softmax = CoreML.Specification.SoftmaxLayerParams.decodeText(reader);
  6649. break;
  6650. case "lrn":
  6651. message.lrn = CoreML.Specification.LRNLayerParams.decodeText(reader);
  6652. break;
  6653. case "crop":
  6654. message.crop = CoreML.Specification.CropLayerParams.decodeText(reader);
  6655. break;
  6656. case "padding":
  6657. message.padding = CoreML.Specification.PaddingLayerParams.decodeText(reader);
  6658. break;
  6659. case "upsample":
  6660. message.upsample = CoreML.Specification.UpsampleLayerParams.decodeText(reader);
  6661. break;
  6662. case "resizeBilinear":
  6663. message.resizeBilinear = CoreML.Specification.ResizeBilinearLayerParams.decodeText(reader);
  6664. break;
  6665. case "cropResize":
  6666. message.cropResize = CoreML.Specification.CropResizeLayerParams.decodeText(reader);
  6667. break;
  6668. case "unary":
  6669. message.unary = CoreML.Specification.UnaryFunctionLayerParams.decodeText(reader);
  6670. break;
  6671. case "add":
  6672. message.add = CoreML.Specification.AddLayerParams.decodeText(reader);
  6673. break;
  6674. case "multiply":
  6675. message.multiply = CoreML.Specification.MultiplyLayerParams.decodeText(reader);
  6676. break;
  6677. case "average":
  6678. message.average = CoreML.Specification.AverageLayerParams.decodeText(reader);
  6679. break;
  6680. case "scale":
  6681. message.scale = CoreML.Specification.ScaleLayerParams.decodeText(reader);
  6682. break;
  6683. case "bias":
  6684. message.bias = CoreML.Specification.BiasLayerParams.decodeText(reader);
  6685. break;
  6686. case "max":
  6687. message.max = CoreML.Specification.MaxLayerParams.decodeText(reader);
  6688. break;
  6689. case "min":
  6690. message.min = CoreML.Specification.MinLayerParams.decodeText(reader);
  6691. break;
  6692. case "dot":
  6693. message.dot = CoreML.Specification.DotProductLayerParams.decodeText(reader);
  6694. break;
  6695. case "reduce":
  6696. message.reduce = CoreML.Specification.ReduceLayerParams.decodeText(reader);
  6697. break;
  6698. case "loadConstant":
  6699. message.loadConstant = CoreML.Specification.LoadConstantLayerParams.decodeText(reader);
  6700. break;
  6701. case "reshape":
  6702. message.reshape = CoreML.Specification.ReshapeLayerParams.decodeText(reader);
  6703. break;
  6704. case "flatten":
  6705. message.flatten = CoreML.Specification.FlattenLayerParams.decodeText(reader);
  6706. break;
  6707. case "permute":
  6708. message.permute = CoreML.Specification.PermuteLayerParams.decodeText(reader);
  6709. break;
  6710. case "concat":
  6711. message.concat = CoreML.Specification.ConcatLayerParams.decodeText(reader);
  6712. break;
  6713. case "split":
  6714. message.split = CoreML.Specification.SplitLayerParams.decodeText(reader);
  6715. break;
  6716. case "sequenceRepeat":
  6717. message.sequenceRepeat = CoreML.Specification.SequenceRepeatLayerParams.decodeText(reader);
  6718. break;
  6719. case "reorganizeData":
  6720. message.reorganizeData = CoreML.Specification.ReorganizeDataLayerParams.decodeText(reader);
  6721. break;
  6722. case "slice":
  6723. message.slice = CoreML.Specification.SliceLayerParams.decodeText(reader);
  6724. break;
  6725. case "simpleRecurrent":
  6726. message.simpleRecurrent = CoreML.Specification.SimpleRecurrentLayerParams.decodeText(reader);
  6727. break;
  6728. case "gru":
  6729. message.gru = CoreML.Specification.GRULayerParams.decodeText(reader);
  6730. break;
  6731. case "uniDirectionalLSTM":
  6732. message.uniDirectionalLSTM = CoreML.Specification.UniDirectionalLSTMLayerParams.decodeText(reader);
  6733. break;
  6734. case "biDirectionalLSTM":
  6735. message.biDirectionalLSTM = CoreML.Specification.BiDirectionalLSTMLayerParams.decodeText(reader);
  6736. break;
  6737. case "custom":
  6738. message.custom = CoreML.Specification.CustomLayerParams.decodeText(reader);
  6739. break;
  6740. case "copy":
  6741. message.copy = CoreML.Specification.CopyLayerParams.decodeText(reader);
  6742. break;
  6743. case "branch":
  6744. message.branch = CoreML.Specification.BranchLayerParams.decodeText(reader);
  6745. break;
  6746. case "loop":
  6747. message.loop = CoreML.Specification.LoopLayerParams.decodeText(reader);
  6748. break;
  6749. case "loopBreak":
  6750. message.loopBreak = CoreML.Specification.LoopBreakLayerParams.decodeText(reader);
  6751. break;
  6752. case "loopContinue":
  6753. message.loopContinue = CoreML.Specification.LoopContinueLayerParams.decodeText(reader);
  6754. break;
  6755. case "rangeStatic":
  6756. message.rangeStatic = CoreML.Specification.RangeStaticLayerParams.decodeText(reader);
  6757. break;
  6758. case "rangeDynamic":
  6759. message.rangeDynamic = CoreML.Specification.RangeDynamicLayerParams.decodeText(reader);
  6760. break;
  6761. case "clip":
  6762. message.clip = CoreML.Specification.ClipLayerParams.decodeText(reader);
  6763. break;
  6764. case "ceil":
  6765. message.ceil = CoreML.Specification.CeilLayerParams.decodeText(reader);
  6766. break;
  6767. case "floor":
  6768. message.floor = CoreML.Specification.FloorLayerParams.decodeText(reader);
  6769. break;
  6770. case "sign":
  6771. message.sign = CoreML.Specification.SignLayerParams.decodeText(reader);
  6772. break;
  6773. case "round":
  6774. message.round = CoreML.Specification.RoundLayerParams.decodeText(reader);
  6775. break;
  6776. case "exp2":
  6777. message.exp2 = CoreML.Specification.Exp2LayerParams.decodeText(reader);
  6778. break;
  6779. case "sin":
  6780. message.sin = CoreML.Specification.SinLayerParams.decodeText(reader);
  6781. break;
  6782. case "cos":
  6783. message.cos = CoreML.Specification.CosLayerParams.decodeText(reader);
  6784. break;
  6785. case "tan":
  6786. message.tan = CoreML.Specification.TanLayerParams.decodeText(reader);
  6787. break;
  6788. case "asin":
  6789. message.asin = CoreML.Specification.AsinLayerParams.decodeText(reader);
  6790. break;
  6791. case "acos":
  6792. message.acos = CoreML.Specification.AcosLayerParams.decodeText(reader);
  6793. break;
  6794. case "atan":
  6795. message.atan = CoreML.Specification.AtanLayerParams.decodeText(reader);
  6796. break;
  6797. case "sinh":
  6798. message.sinh = CoreML.Specification.SinhLayerParams.decodeText(reader);
  6799. break;
  6800. case "cosh":
  6801. message.cosh = CoreML.Specification.CoshLayerParams.decodeText(reader);
  6802. break;
  6803. case "tanh":
  6804. message.tanh = CoreML.Specification.TanhLayerParams.decodeText(reader);
  6805. break;
  6806. case "asinh":
  6807. message.asinh = CoreML.Specification.AsinhLayerParams.decodeText(reader);
  6808. break;
  6809. case "acosh":
  6810. message.acosh = CoreML.Specification.AcoshLayerParams.decodeText(reader);
  6811. break;
  6812. case "atanh":
  6813. message.atanh = CoreML.Specification.AtanhLayerParams.decodeText(reader);
  6814. break;
  6815. case "erf":
  6816. message.erf = CoreML.Specification.ErfLayerParams.decodeText(reader);
  6817. break;
  6818. case "gelu":
  6819. message.gelu = CoreML.Specification.GeluLayerParams.decodeText(reader);
  6820. break;
  6821. case "equal":
  6822. message.equal = CoreML.Specification.EqualLayerParams.decodeText(reader);
  6823. break;
  6824. case "notEqual":
  6825. message.notEqual = CoreML.Specification.NotEqualLayerParams.decodeText(reader);
  6826. break;
  6827. case "lessThan":
  6828. message.lessThan = CoreML.Specification.LessThanLayerParams.decodeText(reader);
  6829. break;
  6830. case "lessEqual":
  6831. message.lessEqual = CoreML.Specification.LessEqualLayerParams.decodeText(reader);
  6832. break;
  6833. case "greaterThan":
  6834. message.greaterThan = CoreML.Specification.GreaterThanLayerParams.decodeText(reader);
  6835. break;
  6836. case "greaterEqual":
  6837. message.greaterEqual = CoreML.Specification.GreaterEqualLayerParams.decodeText(reader);
  6838. break;
  6839. case "logicalOr":
  6840. message.logicalOr = CoreML.Specification.LogicalOrLayerParams.decodeText(reader);
  6841. break;
  6842. case "logicalXor":
  6843. message.logicalXor = CoreML.Specification.LogicalXorLayerParams.decodeText(reader);
  6844. break;
  6845. case "logicalNot":
  6846. message.logicalNot = CoreML.Specification.LogicalNotLayerParams.decodeText(reader);
  6847. break;
  6848. case "logicalAnd":
  6849. message.logicalAnd = CoreML.Specification.LogicalAndLayerParams.decodeText(reader);
  6850. break;
  6851. case "modBroadcastable":
  6852. message.modBroadcastable = CoreML.Specification.ModBroadcastableLayerParams.decodeText(reader);
  6853. break;
  6854. case "minBroadcastable":
  6855. message.minBroadcastable = CoreML.Specification.MinBroadcastableLayerParams.decodeText(reader);
  6856. break;
  6857. case "maxBroadcastable":
  6858. message.maxBroadcastable = CoreML.Specification.MaxBroadcastableLayerParams.decodeText(reader);
  6859. break;
  6860. case "addBroadcastable":
  6861. message.addBroadcastable = CoreML.Specification.AddBroadcastableLayerParams.decodeText(reader);
  6862. break;
  6863. case "powBroadcastable":
  6864. message.powBroadcastable = CoreML.Specification.PowBroadcastableLayerParams.decodeText(reader);
  6865. break;
  6866. case "divideBroadcastable":
  6867. message.divideBroadcastable = CoreML.Specification.DivideBroadcastableLayerParams.decodeText(reader);
  6868. break;
  6869. case "floorDivBroadcastable":
  6870. message.floorDivBroadcastable = CoreML.Specification.FloorDivBroadcastableLayerParams.decodeText(reader);
  6871. break;
  6872. case "multiplyBroadcastable":
  6873. message.multiplyBroadcastable = CoreML.Specification.MultiplyBroadcastableLayerParams.decodeText(reader);
  6874. break;
  6875. case "subtractBroadcastable":
  6876. message.subtractBroadcastable = CoreML.Specification.SubtractBroadcastableLayerParams.decodeText(reader);
  6877. break;
  6878. case "tile":
  6879. message.tile = CoreML.Specification.TileLayerParams.decodeText(reader);
  6880. break;
  6881. case "stack":
  6882. message.stack = CoreML.Specification.StackLayerParams.decodeText(reader);
  6883. break;
  6884. case "gather":
  6885. message.gather = CoreML.Specification.GatherLayerParams.decodeText(reader);
  6886. break;
  6887. case "scatter":
  6888. message.scatter = CoreML.Specification.ScatterLayerParams.decodeText(reader);
  6889. break;
  6890. case "gatherND":
  6891. message.gatherND = CoreML.Specification.GatherNDLayerParams.decodeText(reader);
  6892. break;
  6893. case "scatterND":
  6894. message.scatterND = CoreML.Specification.ScatterNDLayerParams.decodeText(reader);
  6895. break;
  6896. case "softmaxND":
  6897. message.softmaxND = CoreML.Specification.SoftmaxNDLayerParams.decodeText(reader);
  6898. break;
  6899. case "gatherAlongAxis":
  6900. message.gatherAlongAxis = CoreML.Specification.GatherAlongAxisLayerParams.decodeText(reader);
  6901. break;
  6902. case "scatterAlongAxis":
  6903. message.scatterAlongAxis = CoreML.Specification.ScatterAlongAxisLayerParams.decodeText(reader);
  6904. break;
  6905. case "reverse":
  6906. message.reverse = CoreML.Specification.ReverseLayerParams.decodeText(reader);
  6907. break;
  6908. case "reverseSeq":
  6909. message.reverseSeq = CoreML.Specification.ReverseSeqLayerParams.decodeText(reader);
  6910. break;
  6911. case "splitND":
  6912. message.splitND = CoreML.Specification.SplitNDLayerParams.decodeText(reader);
  6913. break;
  6914. case "concatND":
  6915. message.concatND = CoreML.Specification.ConcatNDLayerParams.decodeText(reader);
  6916. break;
  6917. case "transpose":
  6918. message.transpose = CoreML.Specification.TransposeLayerParams.decodeText(reader);
  6919. break;
  6920. case "sliceStatic":
  6921. message.sliceStatic = CoreML.Specification.SliceStaticLayerParams.decodeText(reader);
  6922. break;
  6923. case "sliceDynamic":
  6924. message.sliceDynamic = CoreML.Specification.SliceDynamicLayerParams.decodeText(reader);
  6925. break;
  6926. case "slidingWindows":
  6927. message.slidingWindows = CoreML.Specification.SlidingWindowsLayerParams.decodeText(reader);
  6928. break;
  6929. case "topK":
  6930. message.topK = CoreML.Specification.TopKLayerParams.decodeText(reader);
  6931. break;
  6932. case "argMin":
  6933. message.argMin = CoreML.Specification.ArgMinLayerParams.decodeText(reader);
  6934. break;
  6935. case "argMax":
  6936. message.argMax = CoreML.Specification.ArgMaxLayerParams.decodeText(reader);
  6937. break;
  6938. case "embeddingND":
  6939. message.embeddingND = CoreML.Specification.EmbeddingNDLayerParams.decodeText(reader);
  6940. break;
  6941. case "batchedMatmul":
  6942. message.batchedMatmul = CoreML.Specification.BatchedMatMulLayerParams.decodeText(reader);
  6943. break;
  6944. case "getShape":
  6945. message.getShape = CoreML.Specification.GetShapeLayerParams.decodeText(reader);
  6946. break;
  6947. case "loadConstantND":
  6948. message.loadConstantND = CoreML.Specification.LoadConstantNDLayerParams.decodeText(reader);
  6949. break;
  6950. case "fillLike":
  6951. message.fillLike = CoreML.Specification.FillLikeLayerParams.decodeText(reader);
  6952. break;
  6953. case "fillStatic":
  6954. message.fillStatic = CoreML.Specification.FillStaticLayerParams.decodeText(reader);
  6955. break;
  6956. case "fillDynamic":
  6957. message.fillDynamic = CoreML.Specification.FillDynamicLayerParams.decodeText(reader);
  6958. break;
  6959. case "broadcastToLike":
  6960. message.broadcastToLike = CoreML.Specification.BroadcastToLikeLayerParams.decodeText(reader);
  6961. break;
  6962. case "broadcastToStatic":
  6963. message.broadcastToStatic = CoreML.Specification.BroadcastToStaticLayerParams.decodeText(reader);
  6964. break;
  6965. case "broadcastToDynamic":
  6966. message.broadcastToDynamic = CoreML.Specification.BroadcastToDynamicLayerParams.decodeText(reader);
  6967. break;
  6968. case "squeeze":
  6969. message.squeeze = CoreML.Specification.SqueezeLayerParams.decodeText(reader);
  6970. break;
  6971. case "expandDims":
  6972. message.expandDims = CoreML.Specification.ExpandDimsLayerParams.decodeText(reader);
  6973. break;
  6974. case "flattenTo2D":
  6975. message.flattenTo2D = CoreML.Specification.FlattenTo2DLayerParams.decodeText(reader);
  6976. break;
  6977. case "reshapeLike":
  6978. message.reshapeLike = CoreML.Specification.ReshapeLikeLayerParams.decodeText(reader);
  6979. break;
  6980. case "reshapeStatic":
  6981. message.reshapeStatic = CoreML.Specification.ReshapeStaticLayerParams.decodeText(reader);
  6982. break;
  6983. case "reshapeDynamic":
  6984. message.reshapeDynamic = CoreML.Specification.ReshapeDynamicLayerParams.decodeText(reader);
  6985. break;
  6986. case "rankPreservingReshape":
  6987. message.rankPreservingReshape = CoreML.Specification.RankPreservingReshapeLayerParams.decodeText(reader);
  6988. break;
  6989. case "constantPad":
  6990. message.constantPad = CoreML.Specification.ConstantPaddingLayerParams.decodeText(reader);
  6991. break;
  6992. case "randomNormalLike":
  6993. message.randomNormalLike = CoreML.Specification.RandomNormalLikeLayerParams.decodeText(reader);
  6994. break;
  6995. case "randomNormalStatic":
  6996. message.randomNormalStatic = CoreML.Specification.RandomNormalStaticLayerParams.decodeText(reader);
  6997. break;
  6998. case "randomNormalDynamic":
  6999. message.randomNormalDynamic = CoreML.Specification.RandomNormalDynamicLayerParams.decodeText(reader);
  7000. break;
  7001. case "randomUniformLike":
  7002. message.randomUniformLike = CoreML.Specification.RandomUniformLikeLayerParams.decodeText(reader);
  7003. break;
  7004. case "randomUniformStatic":
  7005. message.randomUniformStatic = CoreML.Specification.RandomUniformStaticLayerParams.decodeText(reader);
  7006. break;
  7007. case "randomUniformDynamic":
  7008. message.randomUniformDynamic = CoreML.Specification.RandomUniformDynamicLayerParams.decodeText(reader);
  7009. break;
  7010. case "randomBernoulliLike":
  7011. message.randomBernoulliLike = CoreML.Specification.RandomBernoulliLikeLayerParams.decodeText(reader);
  7012. break;
  7013. case "randomBernoulliStatic":
  7014. message.randomBernoulliStatic = CoreML.Specification.RandomBernoulliStaticLayerParams.decodeText(reader);
  7015. break;
  7016. case "randomBernoulliDynamic":
  7017. message.randomBernoulliDynamic = CoreML.Specification.RandomBernoulliDynamicLayerParams.decodeText(reader);
  7018. break;
  7019. case "categoricalDistribution":
  7020. message.categoricalDistribution = CoreML.Specification.CategoricalDistributionLayerParams.decodeText(reader);
  7021. break;
  7022. case "reduceL1":
  7023. message.reduceL1 = CoreML.Specification.ReduceL1LayerParams.decodeText(reader);
  7024. break;
  7025. case "reduceL2":
  7026. message.reduceL2 = CoreML.Specification.ReduceL2LayerParams.decodeText(reader);
  7027. break;
  7028. case "reduceMax":
  7029. message.reduceMax = CoreML.Specification.ReduceMaxLayerParams.decodeText(reader);
  7030. break;
  7031. case "reduceMin":
  7032. message.reduceMin = CoreML.Specification.ReduceMinLayerParams.decodeText(reader);
  7033. break;
  7034. case "reduceSum":
  7035. message.reduceSum = CoreML.Specification.ReduceSumLayerParams.decodeText(reader);
  7036. break;
  7037. case "reduceProd":
  7038. message.reduceProd = CoreML.Specification.ReduceProdLayerParams.decodeText(reader);
  7039. break;
  7040. case "reduceMean":
  7041. message.reduceMean = CoreML.Specification.ReduceMeanLayerParams.decodeText(reader);
  7042. break;
  7043. case "reduceLogSum":
  7044. message.reduceLogSum = CoreML.Specification.ReduceLogSumLayerParams.decodeText(reader);
  7045. break;
  7046. case "reduceSumSquare":
  7047. message.reduceSumSquare = CoreML.Specification.ReduceSumSquareLayerParams.decodeText(reader);
  7048. break;
  7049. case "reduceLogSumExp":
  7050. message.reduceLogSumExp = CoreML.Specification.ReduceLogSumExpLayerParams.decodeText(reader);
  7051. break;
  7052. case "whereNonZero":
  7053. message.whereNonZero = CoreML.Specification.WhereNonZeroLayerParams.decodeText(reader);
  7054. break;
  7055. case "matrixBandPart":
  7056. message.matrixBandPart = CoreML.Specification.MatrixBandPartLayerParams.decodeText(reader);
  7057. break;
  7058. case "lowerTriangular":
  7059. message.lowerTriangular = CoreML.Specification.LowerTriangularLayerParams.decodeText(reader);
  7060. break;
  7061. case "upperTriangular":
  7062. message.upperTriangular = CoreML.Specification.UpperTriangularLayerParams.decodeText(reader);
  7063. break;
  7064. case "whereBroadcastable":
  7065. message.whereBroadcastable = CoreML.Specification.WhereBroadcastableLayerParams.decodeText(reader);
  7066. break;
  7067. case "layerNormalization":
  7068. message.layerNormalization = CoreML.Specification.LayerNormalizationLayerParams.decodeText(reader);
  7069. break;
  7070. case "NonMaximumSuppression":
  7071. message.NonMaximumSuppression = CoreML.Specification.NonMaximumSuppressionLayerParams.decodeText(reader);
  7072. break;
  7073. case "oneHot":
  7074. message.oneHot = CoreML.Specification.OneHotLayerParams.decodeText(reader);
  7075. break;
  7076. case "cumSum":
  7077. message.cumSum = CoreML.Specification.CumSumLayerParams.decodeText(reader);
  7078. break;
  7079. case "clampedReLU":
  7080. message.clampedReLU = CoreML.Specification.ClampedReLULayerParams.decodeText(reader);
  7081. break;
  7082. case "argSort":
  7083. message.argSort = CoreML.Specification.ArgSortLayerParams.decodeText(reader);
  7084. break;
  7085. case "pooling3d":
  7086. message.pooling3d = CoreML.Specification.Pooling3DLayerParams.decodeText(reader);
  7087. break;
  7088. case "globalPooling3d":
  7089. message.globalPooling3d = CoreML.Specification.GlobalPooling3DLayerParams.decodeText(reader);
  7090. break;
  7091. case "sliceBySize":
  7092. message.sliceBySize = CoreML.Specification.SliceBySizeLayerParams.decodeText(reader);
  7093. break;
  7094. case "convolution3d":
  7095. message.convolution3d = CoreML.Specification.Convolution3DLayerParams.decodeText(reader);
  7096. break;
  7097. default:
  7098. reader.field(tag, message);
  7099. break;
  7100. }
  7101. }
  7102. return message;
  7103. }
  7104. };
  7105. CoreML.Specification.NeuralNetworkLayer.prototype.name = "";
  7106. CoreML.Specification.NeuralNetworkLayer.prototype.isUpdatable = false;
  7107. CoreML.Specification.BranchLayerParams = class BranchLayerParams {
  7108. static decode(reader, length) {
  7109. const message = new CoreML.Specification.BranchLayerParams();
  7110. const end = length === undefined ? reader.length : reader.position + length;
  7111. while (reader.position < end) {
  7112. const tag = reader.uint32();
  7113. switch (tag >>> 3) {
  7114. case 1:
  7115. message.ifBranch = CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  7116. break;
  7117. case 2:
  7118. message.elseBranch = CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  7119. break;
  7120. default:
  7121. reader.skipType(tag & 7);
  7122. break;
  7123. }
  7124. }
  7125. return message;
  7126. }
  7127. static decodeText(reader) {
  7128. const message = new CoreML.Specification.BranchLayerParams();
  7129. reader.start();
  7130. while (!reader.end()) {
  7131. const tag = reader.tag();
  7132. switch (tag) {
  7133. case "ifBranch":
  7134. message.ifBranch = CoreML.Specification.NeuralNetwork.decodeText(reader);
  7135. break;
  7136. case "elseBranch":
  7137. message.elseBranch = CoreML.Specification.NeuralNetwork.decodeText(reader);
  7138. break;
  7139. default:
  7140. reader.field(tag, message);
  7141. break;
  7142. }
  7143. }
  7144. return message;
  7145. }
  7146. };
  7147. CoreML.Specification.BranchLayerParams.prototype.ifBranch = null;
  7148. CoreML.Specification.BranchLayerParams.prototype.elseBranch = null;
  7149. CoreML.Specification.LoopLayerParams = class LoopLayerParams {
  7150. static decode(reader, length) {
  7151. const message = new CoreML.Specification.LoopLayerParams();
  7152. const end = length === undefined ? reader.length : reader.position + length;
  7153. while (reader.position < end) {
  7154. const tag = reader.uint32();
  7155. switch (tag >>> 3) {
  7156. case 1:
  7157. message.maxLoopIterations = reader.uint64();
  7158. break;
  7159. case 2:
  7160. message.conditionVar = reader.string();
  7161. break;
  7162. case 3:
  7163. message.conditionNetwork = CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  7164. break;
  7165. case 4:
  7166. message.bodyNetwork = CoreML.Specification.NeuralNetwork.decode(reader, reader.uint32());
  7167. break;
  7168. default:
  7169. reader.skipType(tag & 7);
  7170. break;
  7171. }
  7172. }
  7173. return message;
  7174. }
  7175. static decodeText(reader) {
  7176. const message = new CoreML.Specification.LoopLayerParams();
  7177. reader.start();
  7178. while (!reader.end()) {
  7179. const tag = reader.tag();
  7180. switch (tag) {
  7181. case "maxLoopIterations":
  7182. message.maxLoopIterations = reader.uint64();
  7183. break;
  7184. case "conditionVar":
  7185. message.conditionVar = reader.string();
  7186. break;
  7187. case "conditionNetwork":
  7188. message.conditionNetwork = CoreML.Specification.NeuralNetwork.decodeText(reader);
  7189. break;
  7190. case "bodyNetwork":
  7191. message.bodyNetwork = CoreML.Specification.NeuralNetwork.decodeText(reader);
  7192. break;
  7193. default:
  7194. reader.field(tag, message);
  7195. break;
  7196. }
  7197. }
  7198. return message;
  7199. }
  7200. };
  7201. CoreML.Specification.LoopLayerParams.prototype.maxLoopIterations = 0n;
  7202. CoreML.Specification.LoopLayerParams.prototype.conditionVar = "";
  7203. CoreML.Specification.LoopLayerParams.prototype.conditionNetwork = null;
  7204. CoreML.Specification.LoopLayerParams.prototype.bodyNetwork = null;
  7205. CoreML.Specification.LoopBreakLayerParams = class LoopBreakLayerParams {
  7206. static decode(reader, length) {
  7207. const message = new CoreML.Specification.LoopBreakLayerParams();
  7208. const end = length === undefined ? reader.length : reader.position + length;
  7209. while (reader.position < end) {
  7210. const tag = reader.uint32();
  7211. switch (tag >>> 3) {
  7212. default:
  7213. reader.skipType(tag & 7);
  7214. break;
  7215. }
  7216. }
  7217. return message;
  7218. }
  7219. static decodeText(reader) {
  7220. const message = new CoreML.Specification.LoopBreakLayerParams();
  7221. reader.start();
  7222. while (!reader.end()) {
  7223. const tag = reader.tag();
  7224. switch (tag) {
  7225. default:
  7226. reader.field(tag, message);
  7227. break;
  7228. }
  7229. }
  7230. return message;
  7231. }
  7232. };
  7233. CoreML.Specification.LoopContinueLayerParams = class LoopContinueLayerParams {
  7234. static decode(reader, length) {
  7235. const message = new CoreML.Specification.LoopContinueLayerParams();
  7236. const end = length === undefined ? reader.length : reader.position + length;
  7237. while (reader.position < end) {
  7238. const tag = reader.uint32();
  7239. switch (tag >>> 3) {
  7240. default:
  7241. reader.skipType(tag & 7);
  7242. break;
  7243. }
  7244. }
  7245. return message;
  7246. }
  7247. static decodeText(reader) {
  7248. const message = new CoreML.Specification.LoopContinueLayerParams();
  7249. reader.start();
  7250. while (!reader.end()) {
  7251. const tag = reader.tag();
  7252. switch (tag) {
  7253. default:
  7254. reader.field(tag, message);
  7255. break;
  7256. }
  7257. }
  7258. return message;
  7259. }
  7260. };
  7261. CoreML.Specification.CopyLayerParams = class CopyLayerParams {
  7262. static decode(reader, length) {
  7263. const message = new CoreML.Specification.CopyLayerParams();
  7264. const end = length === undefined ? reader.length : reader.position + length;
  7265. while (reader.position < end) {
  7266. const tag = reader.uint32();
  7267. switch (tag >>> 3) {
  7268. default:
  7269. reader.skipType(tag & 7);
  7270. break;
  7271. }
  7272. }
  7273. return message;
  7274. }
  7275. static decodeText(reader) {
  7276. const message = new CoreML.Specification.CopyLayerParams();
  7277. reader.start();
  7278. while (!reader.end()) {
  7279. const tag = reader.tag();
  7280. switch (tag) {
  7281. default:
  7282. reader.field(tag, message);
  7283. break;
  7284. }
  7285. }
  7286. return message;
  7287. }
  7288. };
  7289. CoreML.Specification.GreaterThanLayerParams = class GreaterThanLayerParams {
  7290. static decode(reader, length) {
  7291. const message = new CoreML.Specification.GreaterThanLayerParams();
  7292. const end = length === undefined ? reader.length : reader.position + length;
  7293. while (reader.position < end) {
  7294. const tag = reader.uint32();
  7295. switch (tag >>> 3) {
  7296. case 2:
  7297. message.alpha = reader.float();
  7298. break;
  7299. default:
  7300. reader.skipType(tag & 7);
  7301. break;
  7302. }
  7303. }
  7304. return message;
  7305. }
  7306. static decodeText(reader) {
  7307. const message = new CoreML.Specification.GreaterThanLayerParams();
  7308. reader.start();
  7309. while (!reader.end()) {
  7310. const tag = reader.tag();
  7311. switch (tag) {
  7312. case "alpha":
  7313. message.alpha = reader.float();
  7314. break;
  7315. default:
  7316. reader.field(tag, message);
  7317. break;
  7318. }
  7319. }
  7320. return message;
  7321. }
  7322. };
  7323. CoreML.Specification.GreaterThanLayerParams.prototype.alpha = 0;
  7324. CoreML.Specification.GreaterEqualLayerParams = class GreaterEqualLayerParams {
  7325. static decode(reader, length) {
  7326. const message = new CoreML.Specification.GreaterEqualLayerParams();
  7327. const end = length === undefined ? reader.length : reader.position + length;
  7328. while (reader.position < end) {
  7329. const tag = reader.uint32();
  7330. switch (tag >>> 3) {
  7331. case 2:
  7332. message.alpha = reader.float();
  7333. break;
  7334. default:
  7335. reader.skipType(tag & 7);
  7336. break;
  7337. }
  7338. }
  7339. return message;
  7340. }
  7341. static decodeText(reader) {
  7342. const message = new CoreML.Specification.GreaterEqualLayerParams();
  7343. reader.start();
  7344. while (!reader.end()) {
  7345. const tag = reader.tag();
  7346. switch (tag) {
  7347. case "alpha":
  7348. message.alpha = reader.float();
  7349. break;
  7350. default:
  7351. reader.field(tag, message);
  7352. break;
  7353. }
  7354. }
  7355. return message;
  7356. }
  7357. };
  7358. CoreML.Specification.GreaterEqualLayerParams.prototype.alpha = 0;
  7359. CoreML.Specification.LessThanLayerParams = class LessThanLayerParams {
  7360. static decode(reader, length) {
  7361. const message = new CoreML.Specification.LessThanLayerParams();
  7362. const end = length === undefined ? reader.length : reader.position + length;
  7363. while (reader.position < end) {
  7364. const tag = reader.uint32();
  7365. switch (tag >>> 3) {
  7366. case 2:
  7367. message.alpha = reader.float();
  7368. break;
  7369. default:
  7370. reader.skipType(tag & 7);
  7371. break;
  7372. }
  7373. }
  7374. return message;
  7375. }
  7376. static decodeText(reader) {
  7377. const message = new CoreML.Specification.LessThanLayerParams();
  7378. reader.start();
  7379. while (!reader.end()) {
  7380. const tag = reader.tag();
  7381. switch (tag) {
  7382. case "alpha":
  7383. message.alpha = reader.float();
  7384. break;
  7385. default:
  7386. reader.field(tag, message);
  7387. break;
  7388. }
  7389. }
  7390. return message;
  7391. }
  7392. };
  7393. CoreML.Specification.LessThanLayerParams.prototype.alpha = 0;
  7394. CoreML.Specification.LessEqualLayerParams = class LessEqualLayerParams {
  7395. static decode(reader, length) {
  7396. const message = new CoreML.Specification.LessEqualLayerParams();
  7397. const end = length === undefined ? reader.length : reader.position + length;
  7398. while (reader.position < end) {
  7399. const tag = reader.uint32();
  7400. switch (tag >>> 3) {
  7401. case 2:
  7402. message.alpha = reader.float();
  7403. break;
  7404. default:
  7405. reader.skipType(tag & 7);
  7406. break;
  7407. }
  7408. }
  7409. return message;
  7410. }
  7411. static decodeText(reader) {
  7412. const message = new CoreML.Specification.LessEqualLayerParams();
  7413. reader.start();
  7414. while (!reader.end()) {
  7415. const tag = reader.tag();
  7416. switch (tag) {
  7417. case "alpha":
  7418. message.alpha = reader.float();
  7419. break;
  7420. default:
  7421. reader.field(tag, message);
  7422. break;
  7423. }
  7424. }
  7425. return message;
  7426. }
  7427. };
  7428. CoreML.Specification.LessEqualLayerParams.prototype.alpha = 0;
  7429. CoreML.Specification.EqualLayerParams = class EqualLayerParams {
  7430. static decode(reader, length) {
  7431. const message = new CoreML.Specification.EqualLayerParams();
  7432. const end = length === undefined ? reader.length : reader.position + length;
  7433. while (reader.position < end) {
  7434. const tag = reader.uint32();
  7435. switch (tag >>> 3) {
  7436. case 1:
  7437. message.alpha = reader.float();
  7438. break;
  7439. default:
  7440. reader.skipType(tag & 7);
  7441. break;
  7442. }
  7443. }
  7444. return message;
  7445. }
  7446. static decodeText(reader) {
  7447. const message = new CoreML.Specification.EqualLayerParams();
  7448. reader.start();
  7449. while (!reader.end()) {
  7450. const tag = reader.tag();
  7451. switch (tag) {
  7452. case "alpha":
  7453. message.alpha = reader.float();
  7454. break;
  7455. default:
  7456. reader.field(tag, message);
  7457. break;
  7458. }
  7459. }
  7460. return message;
  7461. }
  7462. };
  7463. CoreML.Specification.EqualLayerParams.prototype.alpha = 0;
  7464. CoreML.Specification.NotEqualLayerParams = class NotEqualLayerParams {
  7465. static decode(reader, length) {
  7466. const message = new CoreML.Specification.NotEqualLayerParams();
  7467. const end = length === undefined ? reader.length : reader.position + length;
  7468. while (reader.position < end) {
  7469. const tag = reader.uint32();
  7470. switch (tag >>> 3) {
  7471. case 1:
  7472. message.alpha = reader.float();
  7473. break;
  7474. default:
  7475. reader.skipType(tag & 7);
  7476. break;
  7477. }
  7478. }
  7479. return message;
  7480. }
  7481. static decodeText(reader) {
  7482. const message = new CoreML.Specification.NotEqualLayerParams();
  7483. reader.start();
  7484. while (!reader.end()) {
  7485. const tag = reader.tag();
  7486. switch (tag) {
  7487. case "alpha":
  7488. message.alpha = reader.float();
  7489. break;
  7490. default:
  7491. reader.field(tag, message);
  7492. break;
  7493. }
  7494. }
  7495. return message;
  7496. }
  7497. };
  7498. CoreML.Specification.NotEqualLayerParams.prototype.alpha = 0;
  7499. CoreML.Specification.LogicalAndLayerParams = class LogicalAndLayerParams {
  7500. static decode(reader, length) {
  7501. const message = new CoreML.Specification.LogicalAndLayerParams();
  7502. const end = length === undefined ? reader.length : reader.position + length;
  7503. while (reader.position < end) {
  7504. const tag = reader.uint32();
  7505. switch (tag >>> 3) {
  7506. default:
  7507. reader.skipType(tag & 7);
  7508. break;
  7509. }
  7510. }
  7511. return message;
  7512. }
  7513. static decodeText(reader) {
  7514. const message = new CoreML.Specification.LogicalAndLayerParams();
  7515. reader.start();
  7516. while (!reader.end()) {
  7517. const tag = reader.tag();
  7518. switch (tag) {
  7519. default:
  7520. reader.field(tag, message);
  7521. break;
  7522. }
  7523. }
  7524. return message;
  7525. }
  7526. };
  7527. CoreML.Specification.LogicalOrLayerParams = class LogicalOrLayerParams {
  7528. static decode(reader, length) {
  7529. const message = new CoreML.Specification.LogicalOrLayerParams();
  7530. const end = length === undefined ? reader.length : reader.position + length;
  7531. while (reader.position < end) {
  7532. const tag = reader.uint32();
  7533. switch (tag >>> 3) {
  7534. default:
  7535. reader.skipType(tag & 7);
  7536. break;
  7537. }
  7538. }
  7539. return message;
  7540. }
  7541. static decodeText(reader) {
  7542. const message = new CoreML.Specification.LogicalOrLayerParams();
  7543. reader.start();
  7544. while (!reader.end()) {
  7545. const tag = reader.tag();
  7546. switch (tag) {
  7547. default:
  7548. reader.field(tag, message);
  7549. break;
  7550. }
  7551. }
  7552. return message;
  7553. }
  7554. };
  7555. CoreML.Specification.LogicalXorLayerParams = class LogicalXorLayerParams {
  7556. static decode(reader, length) {
  7557. const message = new CoreML.Specification.LogicalXorLayerParams();
  7558. const end = length === undefined ? reader.length : reader.position + length;
  7559. while (reader.position < end) {
  7560. const tag = reader.uint32();
  7561. switch (tag >>> 3) {
  7562. default:
  7563. reader.skipType(tag & 7);
  7564. break;
  7565. }
  7566. }
  7567. return message;
  7568. }
  7569. static decodeText(reader) {
  7570. const message = new CoreML.Specification.LogicalXorLayerParams();
  7571. reader.start();
  7572. while (!reader.end()) {
  7573. const tag = reader.tag();
  7574. switch (tag) {
  7575. default:
  7576. reader.field(tag, message);
  7577. break;
  7578. }
  7579. }
  7580. return message;
  7581. }
  7582. };
  7583. CoreML.Specification.LogicalNotLayerParams = class LogicalNotLayerParams {
  7584. static decode(reader, length) {
  7585. const message = new CoreML.Specification.LogicalNotLayerParams();
  7586. const end = length === undefined ? reader.length : reader.position + length;
  7587. while (reader.position < end) {
  7588. const tag = reader.uint32();
  7589. switch (tag >>> 3) {
  7590. default:
  7591. reader.skipType(tag & 7);
  7592. break;
  7593. }
  7594. }
  7595. return message;
  7596. }
  7597. static decodeText(reader) {
  7598. const message = new CoreML.Specification.LogicalNotLayerParams();
  7599. reader.start();
  7600. while (!reader.end()) {
  7601. const tag = reader.tag();
  7602. switch (tag) {
  7603. default:
  7604. reader.field(tag, message);
  7605. break;
  7606. }
  7607. }
  7608. return message;
  7609. }
  7610. };
  7611. CoreML.Specification.BorderAmounts = class BorderAmounts {
  7612. constructor() {
  7613. this.borderAmounts = [];
  7614. }
  7615. static decode(reader, length) {
  7616. const message = new CoreML.Specification.BorderAmounts();
  7617. const end = length === undefined ? reader.length : reader.position + length;
  7618. while (reader.position < end) {
  7619. const tag = reader.uint32();
  7620. switch (tag >>> 3) {
  7621. case 10:
  7622. message.borderAmounts.push(CoreML.Specification.BorderAmounts.EdgeSizes.decode(reader, reader.uint32()));
  7623. break;
  7624. default:
  7625. reader.skipType(tag & 7);
  7626. break;
  7627. }
  7628. }
  7629. return message;
  7630. }
  7631. static decodeText(reader) {
  7632. const message = new CoreML.Specification.BorderAmounts();
  7633. reader.start();
  7634. while (!reader.end()) {
  7635. const tag = reader.tag();
  7636. switch (tag) {
  7637. case "borderAmounts":
  7638. message.borderAmounts.push(CoreML.Specification.BorderAmounts.EdgeSizes.decodeText(reader));
  7639. break;
  7640. default:
  7641. reader.field(tag, message);
  7642. break;
  7643. }
  7644. }
  7645. return message;
  7646. }
  7647. };
  7648. CoreML.Specification.BorderAmounts.EdgeSizes = class EdgeSizes {
  7649. static decode(reader, length) {
  7650. const message = new CoreML.Specification.BorderAmounts.EdgeSizes();
  7651. const end = length === undefined ? reader.length : reader.position + length;
  7652. while (reader.position < end) {
  7653. const tag = reader.uint32();
  7654. switch (tag >>> 3) {
  7655. case 1:
  7656. message.startEdgeSize = reader.uint64();
  7657. break;
  7658. case 2:
  7659. message.endEdgeSize = reader.uint64();
  7660. break;
  7661. default:
  7662. reader.skipType(tag & 7);
  7663. break;
  7664. }
  7665. }
  7666. return message;
  7667. }
  7668. static decodeText(reader) {
  7669. const message = new CoreML.Specification.BorderAmounts.EdgeSizes();
  7670. reader.start();
  7671. while (!reader.end()) {
  7672. const tag = reader.tag();
  7673. switch (tag) {
  7674. case "startEdgeSize":
  7675. message.startEdgeSize = reader.uint64();
  7676. break;
  7677. case "endEdgeSize":
  7678. message.endEdgeSize = reader.uint64();
  7679. break;
  7680. default:
  7681. reader.field(tag, message);
  7682. break;
  7683. }
  7684. }
  7685. return message;
  7686. }
  7687. };
  7688. CoreML.Specification.BorderAmounts.EdgeSizes.prototype.startEdgeSize = 0n;
  7689. CoreML.Specification.BorderAmounts.EdgeSizes.prototype.endEdgeSize = 0n;
  7690. CoreML.Specification.ValidPadding = class ValidPadding {
  7691. static decode(reader, length) {
  7692. const message = new CoreML.Specification.ValidPadding();
  7693. const end = length === undefined ? reader.length : reader.position + length;
  7694. while (reader.position < end) {
  7695. const tag = reader.uint32();
  7696. switch (tag >>> 3) {
  7697. case 1:
  7698. message.paddingAmounts = CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  7699. break;
  7700. default:
  7701. reader.skipType(tag & 7);
  7702. break;
  7703. }
  7704. }
  7705. return message;
  7706. }
  7707. static decodeText(reader) {
  7708. const message = new CoreML.Specification.ValidPadding();
  7709. reader.start();
  7710. while (!reader.end()) {
  7711. const tag = reader.tag();
  7712. switch (tag) {
  7713. case "paddingAmounts":
  7714. message.paddingAmounts = CoreML.Specification.BorderAmounts.decodeText(reader);
  7715. break;
  7716. default:
  7717. reader.field(tag, message);
  7718. break;
  7719. }
  7720. }
  7721. return message;
  7722. }
  7723. };
  7724. CoreML.Specification.ValidPadding.prototype.paddingAmounts = null;
  7725. CoreML.Specification.SamePadding = class SamePadding {
  7726. static decode(reader, length) {
  7727. const message = new CoreML.Specification.SamePadding();
  7728. const end = length === undefined ? reader.length : reader.position + length;
  7729. while (reader.position < end) {
  7730. const tag = reader.uint32();
  7731. switch (tag >>> 3) {
  7732. case 1:
  7733. message.asymmetryMode = reader.int32();
  7734. break;
  7735. default:
  7736. reader.skipType(tag & 7);
  7737. break;
  7738. }
  7739. }
  7740. return message;
  7741. }
  7742. static decodeText(reader) {
  7743. const message = new CoreML.Specification.SamePadding();
  7744. reader.start();
  7745. while (!reader.end()) {
  7746. const tag = reader.tag();
  7747. switch (tag) {
  7748. case "asymmetryMode":
  7749. message.asymmetryMode = reader.enum(CoreML.Specification.SamePadding.SamePaddingMode);
  7750. break;
  7751. default:
  7752. reader.field(tag, message);
  7753. break;
  7754. }
  7755. }
  7756. return message;
  7757. }
  7758. };
  7759. CoreML.Specification.SamePadding.prototype.asymmetryMode = 0;
  7760. CoreML.Specification.SamePadding.SamePaddingMode = {
  7761. "BOTTOM_RIGHT_HEAVY": 0,
  7762. "TOP_LEFT_HEAVY": 1
  7763. };
  7764. CoreML.Specification.SamplingMode = class SamplingMode {
  7765. static decode(reader, length) {
  7766. const message = new CoreML.Specification.SamplingMode();
  7767. const end = length === undefined ? reader.length : reader.position + length;
  7768. while (reader.position < end) {
  7769. const tag = reader.uint32();
  7770. switch (tag >>> 3) {
  7771. case 1:
  7772. message.samplingMethod = reader.int32();
  7773. break;
  7774. default:
  7775. reader.skipType(tag & 7);
  7776. break;
  7777. }
  7778. }
  7779. return message;
  7780. }
  7781. static decodeText(reader) {
  7782. const message = new CoreML.Specification.SamplingMode();
  7783. reader.start();
  7784. while (!reader.end()) {
  7785. const tag = reader.tag();
  7786. switch (tag) {
  7787. case "samplingMethod":
  7788. message.samplingMethod = reader.enum(CoreML.Specification.SamplingMode.Method);
  7789. break;
  7790. default:
  7791. reader.field(tag, message);
  7792. break;
  7793. }
  7794. }
  7795. return message;
  7796. }
  7797. };
  7798. CoreML.Specification.SamplingMode.prototype.samplingMethod = 0;
  7799. CoreML.Specification.SamplingMode.Method = {
  7800. "STRICT_ALIGN_ENDPOINTS_MODE": 0,
  7801. "ALIGN_ENDPOINTS_MODE": 1,
  7802. "UPSAMPLE_MODE": 2,
  7803. "ROI_ALIGN_MODE": 3
  7804. };
  7805. CoreML.Specification.BoxCoordinatesMode = class BoxCoordinatesMode {
  7806. static decode(reader, length) {
  7807. const message = new CoreML.Specification.BoxCoordinatesMode();
  7808. const end = length === undefined ? reader.length : reader.position + length;
  7809. while (reader.position < end) {
  7810. const tag = reader.uint32();
  7811. switch (tag >>> 3) {
  7812. case 1:
  7813. message.boxMode = reader.int32();
  7814. break;
  7815. default:
  7816. reader.skipType(tag & 7);
  7817. break;
  7818. }
  7819. }
  7820. return message;
  7821. }
  7822. static decodeText(reader) {
  7823. const message = new CoreML.Specification.BoxCoordinatesMode();
  7824. reader.start();
  7825. while (!reader.end()) {
  7826. const tag = reader.tag();
  7827. switch (tag) {
  7828. case "boxMode":
  7829. message.boxMode = reader.enum(CoreML.Specification.BoxCoordinatesMode.Coordinates);
  7830. break;
  7831. default:
  7832. reader.field(tag, message);
  7833. break;
  7834. }
  7835. }
  7836. return message;
  7837. }
  7838. };
  7839. CoreML.Specification.BoxCoordinatesMode.prototype.boxMode = 0;
  7840. CoreML.Specification.BoxCoordinatesMode.Coordinates = {
  7841. "CORNERS_HEIGHT_FIRST": 0,
  7842. "CORNERS_WIDTH_FIRST": 1,
  7843. "CENTER_SIZE_HEIGHT_FIRST": 2,
  7844. "CENTER_SIZE_WIDTH_FIRST": 3
  7845. };
  7846. CoreML.Specification.WeightParams = class WeightParams {
  7847. constructor() {
  7848. this.floatValue = [];
  7849. }
  7850. static decode(reader, length) {
  7851. const message = new CoreML.Specification.WeightParams();
  7852. const end = length === undefined ? reader.length : reader.position + length;
  7853. while (reader.position < end) {
  7854. const tag = reader.uint32();
  7855. switch (tag >>> 3) {
  7856. case 1:
  7857. message.floatValue = reader.floats(message.floatValue, tag);
  7858. break;
  7859. case 2:
  7860. message.float16Value = reader.bytes();
  7861. break;
  7862. case 30:
  7863. message.rawValue = reader.bytes();
  7864. break;
  7865. case 31:
  7866. message.int8RawValue = reader.bytes();
  7867. break;
  7868. case 40:
  7869. message.quantization = CoreML.Specification.QuantizationParams.decode(reader, reader.uint32());
  7870. break;
  7871. case 50:
  7872. message.isUpdatable = reader.bool();
  7873. break;
  7874. default:
  7875. reader.skipType(tag & 7);
  7876. break;
  7877. }
  7878. }
  7879. return message;
  7880. }
  7881. static decodeText(reader) {
  7882. const message = new CoreML.Specification.WeightParams();
  7883. reader.start();
  7884. while (!reader.end()) {
  7885. const tag = reader.tag();
  7886. switch (tag) {
  7887. case "floatValue":
  7888. reader.array(message.floatValue, () => reader.float());
  7889. break;
  7890. case "float16Value":
  7891. message.float16Value = reader.bytes();
  7892. break;
  7893. case "rawValue":
  7894. message.rawValue = reader.bytes();
  7895. break;
  7896. case "int8RawValue":
  7897. message.int8RawValue = reader.bytes();
  7898. break;
  7899. case "quantization":
  7900. message.quantization = CoreML.Specification.QuantizationParams.decodeText(reader);
  7901. break;
  7902. case "isUpdatable":
  7903. message.isUpdatable = reader.bool();
  7904. break;
  7905. default:
  7906. reader.field(tag, message);
  7907. break;
  7908. }
  7909. }
  7910. return message;
  7911. }
  7912. };
  7913. CoreML.Specification.WeightParams.prototype.float16Value = new Uint8Array([]);
  7914. CoreML.Specification.WeightParams.prototype.rawValue = new Uint8Array([]);
  7915. CoreML.Specification.WeightParams.prototype.int8RawValue = new Uint8Array([]);
  7916. CoreML.Specification.WeightParams.prototype.quantization = null;
  7917. CoreML.Specification.WeightParams.prototype.isUpdatable = false;
  7918. CoreML.Specification.QuantizationParams = class QuantizationParams {
  7919. get QuantizationType() {
  7920. CoreML.Specification.QuantizationParams.QuantizationTypeSet = CoreML.Specification.QuantizationParams.QuantizationTypeSet || new Set(["linearQuantization", "lookupTableQuantization"]);
  7921. return Object.keys(this).find((key) => CoreML.Specification.QuantizationParams.QuantizationTypeSet.has(key) && this[key] !== null);
  7922. }
  7923. static decode(reader, length) {
  7924. const message = new CoreML.Specification.QuantizationParams();
  7925. const end = length === undefined ? reader.length : reader.position + length;
  7926. while (reader.position < end) {
  7927. const tag = reader.uint32();
  7928. switch (tag >>> 3) {
  7929. case 1:
  7930. message.numberOfBits = reader.uint64();
  7931. break;
  7932. case 101:
  7933. message.linearQuantization = CoreML.Specification.LinearQuantizationParams.decode(reader, reader.uint32());
  7934. break;
  7935. case 102:
  7936. message.lookupTableQuantization = CoreML.Specification.LookUpTableQuantizationParams.decode(reader, reader.uint32());
  7937. break;
  7938. default:
  7939. reader.skipType(tag & 7);
  7940. break;
  7941. }
  7942. }
  7943. return message;
  7944. }
  7945. static decodeText(reader) {
  7946. const message = new CoreML.Specification.QuantizationParams();
  7947. reader.start();
  7948. while (!reader.end()) {
  7949. const tag = reader.tag();
  7950. switch (tag) {
  7951. case "numberOfBits":
  7952. message.numberOfBits = reader.uint64();
  7953. break;
  7954. case "linearQuantization":
  7955. message.linearQuantization = CoreML.Specification.LinearQuantizationParams.decodeText(reader);
  7956. break;
  7957. case "lookupTableQuantization":
  7958. message.lookupTableQuantization = CoreML.Specification.LookUpTableQuantizationParams.decodeText(reader);
  7959. break;
  7960. default:
  7961. reader.field(tag, message);
  7962. break;
  7963. }
  7964. }
  7965. return message;
  7966. }
  7967. };
  7968. CoreML.Specification.QuantizationParams.prototype.numberOfBits = 0n;
  7969. CoreML.Specification.LinearQuantizationParams = class LinearQuantizationParams {
  7970. constructor() {
  7971. this.scale = [];
  7972. this.bias = [];
  7973. }
  7974. static decode(reader, length) {
  7975. const message = new CoreML.Specification.LinearQuantizationParams();
  7976. const end = length === undefined ? reader.length : reader.position + length;
  7977. while (reader.position < end) {
  7978. const tag = reader.uint32();
  7979. switch (tag >>> 3) {
  7980. case 1:
  7981. message.scale = reader.floats(message.scale, tag);
  7982. break;
  7983. case 2:
  7984. message.bias = reader.floats(message.bias, tag);
  7985. break;
  7986. default:
  7987. reader.skipType(tag & 7);
  7988. break;
  7989. }
  7990. }
  7991. return message;
  7992. }
  7993. static decodeText(reader) {
  7994. const message = new CoreML.Specification.LinearQuantizationParams();
  7995. reader.start();
  7996. while (!reader.end()) {
  7997. const tag = reader.tag();
  7998. switch (tag) {
  7999. case "scale":
  8000. reader.array(message.scale, () => reader.float());
  8001. break;
  8002. case "bias":
  8003. reader.array(message.bias, () => reader.float());
  8004. break;
  8005. default:
  8006. reader.field(tag, message);
  8007. break;
  8008. }
  8009. }
  8010. return message;
  8011. }
  8012. };
  8013. CoreML.Specification.LookUpTableQuantizationParams = class LookUpTableQuantizationParams {
  8014. constructor() {
  8015. this.floatValue = [];
  8016. }
  8017. static decode(reader, length) {
  8018. const message = new CoreML.Specification.LookUpTableQuantizationParams();
  8019. const end = length === undefined ? reader.length : reader.position + length;
  8020. while (reader.position < end) {
  8021. const tag = reader.uint32();
  8022. switch (tag >>> 3) {
  8023. case 1:
  8024. message.floatValue = reader.floats(message.floatValue, tag);
  8025. break;
  8026. default:
  8027. reader.skipType(tag & 7);
  8028. break;
  8029. }
  8030. }
  8031. return message;
  8032. }
  8033. static decodeText(reader) {
  8034. const message = new CoreML.Specification.LookUpTableQuantizationParams();
  8035. reader.start();
  8036. while (!reader.end()) {
  8037. const tag = reader.tag();
  8038. switch (tag) {
  8039. case "floatValue":
  8040. reader.array(message.floatValue, () => reader.float());
  8041. break;
  8042. default:
  8043. reader.field(tag, message);
  8044. break;
  8045. }
  8046. }
  8047. return message;
  8048. }
  8049. };
  8050. CoreML.Specification.ConvolutionLayerParams = class ConvolutionLayerParams {
  8051. constructor() {
  8052. this.kernelSize = [];
  8053. this.stride = [];
  8054. this.dilationFactor = [];
  8055. this.outputShape = [];
  8056. }
  8057. get ConvolutionPaddingType() {
  8058. CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet = CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet || new Set(["valid", "same"]);
  8059. return Object.keys(this).find((key) => CoreML.Specification.ConvolutionLayerParams.ConvolutionPaddingTypeSet.has(key) && this[key] !== null);
  8060. }
  8061. static decode(reader, length) {
  8062. const message = new CoreML.Specification.ConvolutionLayerParams();
  8063. const end = length === undefined ? reader.length : reader.position + length;
  8064. while (reader.position < end) {
  8065. const tag = reader.uint32();
  8066. switch (tag >>> 3) {
  8067. case 1:
  8068. message.outputChannels = reader.uint64();
  8069. break;
  8070. case 2:
  8071. message.kernelChannels = reader.uint64();
  8072. break;
  8073. case 10:
  8074. message.nGroups = reader.uint64();
  8075. break;
  8076. case 20:
  8077. message.kernelSize = reader.array(message.kernelSize, () => reader.uint64(), tag);
  8078. break;
  8079. case 30:
  8080. message.stride = reader.array(message.stride, () => reader.uint64(), tag);
  8081. break;
  8082. case 40:
  8083. message.dilationFactor = reader.array(message.dilationFactor, () => reader.uint64(), tag);
  8084. break;
  8085. case 50:
  8086. message.valid = CoreML.Specification.ValidPadding.decode(reader, reader.uint32());
  8087. break;
  8088. case 51:
  8089. message.same = CoreML.Specification.SamePadding.decode(reader, reader.uint32());
  8090. break;
  8091. case 60:
  8092. message.isDeconvolution = reader.bool();
  8093. break;
  8094. case 70:
  8095. message.hasBias = reader.bool();
  8096. break;
  8097. case 90:
  8098. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8099. break;
  8100. case 91:
  8101. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8102. break;
  8103. case 100:
  8104. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  8105. break;
  8106. default:
  8107. reader.skipType(tag & 7);
  8108. break;
  8109. }
  8110. }
  8111. return message;
  8112. }
  8113. static decodeText(reader) {
  8114. const message = new CoreML.Specification.ConvolutionLayerParams();
  8115. reader.start();
  8116. while (!reader.end()) {
  8117. const tag = reader.tag();
  8118. switch (tag) {
  8119. case "outputChannels":
  8120. message.outputChannels = reader.uint64();
  8121. break;
  8122. case "kernelChannels":
  8123. message.kernelChannels = reader.uint64();
  8124. break;
  8125. case "nGroups":
  8126. message.nGroups = reader.uint64();
  8127. break;
  8128. case "kernelSize":
  8129. reader.array(message.kernelSize, () => reader.uint64());
  8130. break;
  8131. case "stride":
  8132. reader.array(message.stride, () => reader.uint64());
  8133. break;
  8134. case "dilationFactor":
  8135. reader.array(message.dilationFactor, () => reader.uint64());
  8136. break;
  8137. case "valid":
  8138. message.valid = CoreML.Specification.ValidPadding.decodeText(reader);
  8139. break;
  8140. case "same":
  8141. message.same = CoreML.Specification.SamePadding.decodeText(reader);
  8142. break;
  8143. case "isDeconvolution":
  8144. message.isDeconvolution = reader.bool();
  8145. break;
  8146. case "hasBias":
  8147. message.hasBias = reader.bool();
  8148. break;
  8149. case "weights":
  8150. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  8151. break;
  8152. case "bias":
  8153. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  8154. break;
  8155. case "outputShape":
  8156. reader.array(message.outputShape, () => reader.uint64());
  8157. break;
  8158. default:
  8159. reader.field(tag, message);
  8160. break;
  8161. }
  8162. }
  8163. return message;
  8164. }
  8165. };
  8166. CoreML.Specification.ConvolutionLayerParams.prototype.outputChannels = 0n;
  8167. CoreML.Specification.ConvolutionLayerParams.prototype.kernelChannels = 0n;
  8168. CoreML.Specification.ConvolutionLayerParams.prototype.nGroups = 0n;
  8169. CoreML.Specification.ConvolutionLayerParams.prototype.isDeconvolution = false;
  8170. CoreML.Specification.ConvolutionLayerParams.prototype.hasBias = false;
  8171. CoreML.Specification.ConvolutionLayerParams.prototype.weights = null;
  8172. CoreML.Specification.ConvolutionLayerParams.prototype.bias = null;
  8173. CoreML.Specification.Convolution3DLayerParams = class Convolution3DLayerParams {
  8174. constructor() {
  8175. this.outputShape = [];
  8176. }
  8177. static decode(reader, length) {
  8178. const message = new CoreML.Specification.Convolution3DLayerParams();
  8179. const end = length === undefined ? reader.length : reader.position + length;
  8180. while (reader.position < end) {
  8181. const tag = reader.uint32();
  8182. switch (tag >>> 3) {
  8183. case 1:
  8184. message.outputChannels = reader.int32();
  8185. break;
  8186. case 2:
  8187. message.inputChannels = reader.int32();
  8188. break;
  8189. case 10:
  8190. message.nGroups = reader.int32();
  8191. break;
  8192. case 20:
  8193. message.kernelDepth = reader.int32();
  8194. break;
  8195. case 21:
  8196. message.kernelHeight = reader.int32();
  8197. break;
  8198. case 22:
  8199. message.kernelWidth = reader.int32();
  8200. break;
  8201. case 31:
  8202. message.strideDepth = reader.int32();
  8203. break;
  8204. case 32:
  8205. message.strideHeight = reader.int32();
  8206. break;
  8207. case 33:
  8208. message.strideWidth = reader.int32();
  8209. break;
  8210. case 40:
  8211. message.dilationDepth = reader.int32();
  8212. break;
  8213. case 41:
  8214. message.dilationHeight = reader.int32();
  8215. break;
  8216. case 42:
  8217. message.dilationWidth = reader.int32();
  8218. break;
  8219. case 50:
  8220. message.hasBias = reader.bool();
  8221. break;
  8222. case 60:
  8223. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8224. break;
  8225. case 61:
  8226. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8227. break;
  8228. case 70:
  8229. message.paddingType = reader.int32();
  8230. break;
  8231. case 80:
  8232. message.customPaddingFront = reader.int32();
  8233. break;
  8234. case 81:
  8235. message.customPaddingBack = reader.int32();
  8236. break;
  8237. case 82:
  8238. message.customPaddingTop = reader.int32();
  8239. break;
  8240. case 83:
  8241. message.customPaddingBottom = reader.int32();
  8242. break;
  8243. case 84:
  8244. message.customPaddingLeft = reader.int32();
  8245. break;
  8246. case 85:
  8247. message.customPaddingRight = reader.int32();
  8248. break;
  8249. case 86:
  8250. message.isDeconvolution = reader.bool();
  8251. break;
  8252. case 87:
  8253. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  8254. break;
  8255. default:
  8256. reader.skipType(tag & 7);
  8257. break;
  8258. }
  8259. }
  8260. return message;
  8261. }
  8262. static decodeText(reader) {
  8263. const message = new CoreML.Specification.Convolution3DLayerParams();
  8264. reader.start();
  8265. while (!reader.end()) {
  8266. const tag = reader.tag();
  8267. switch (tag) {
  8268. case "outputChannels":
  8269. message.outputChannels = reader.int32();
  8270. break;
  8271. case "inputChannels":
  8272. message.inputChannels = reader.int32();
  8273. break;
  8274. case "nGroups":
  8275. message.nGroups = reader.int32();
  8276. break;
  8277. case "kernelDepth":
  8278. message.kernelDepth = reader.int32();
  8279. break;
  8280. case "kernelHeight":
  8281. message.kernelHeight = reader.int32();
  8282. break;
  8283. case "kernelWidth":
  8284. message.kernelWidth = reader.int32();
  8285. break;
  8286. case "strideDepth":
  8287. message.strideDepth = reader.int32();
  8288. break;
  8289. case "strideHeight":
  8290. message.strideHeight = reader.int32();
  8291. break;
  8292. case "strideWidth":
  8293. message.strideWidth = reader.int32();
  8294. break;
  8295. case "dilationDepth":
  8296. message.dilationDepth = reader.int32();
  8297. break;
  8298. case "dilationHeight":
  8299. message.dilationHeight = reader.int32();
  8300. break;
  8301. case "dilationWidth":
  8302. message.dilationWidth = reader.int32();
  8303. break;
  8304. case "hasBias":
  8305. message.hasBias = reader.bool();
  8306. break;
  8307. case "weights":
  8308. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  8309. break;
  8310. case "bias":
  8311. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  8312. break;
  8313. case "paddingType":
  8314. message.paddingType = reader.enum(CoreML.Specification.Convolution3DLayerParams.PaddingType);
  8315. break;
  8316. case "customPaddingFront":
  8317. message.customPaddingFront = reader.int32();
  8318. break;
  8319. case "customPaddingBack":
  8320. message.customPaddingBack = reader.int32();
  8321. break;
  8322. case "customPaddingTop":
  8323. message.customPaddingTop = reader.int32();
  8324. break;
  8325. case "customPaddingBottom":
  8326. message.customPaddingBottom = reader.int32();
  8327. break;
  8328. case "customPaddingLeft":
  8329. message.customPaddingLeft = reader.int32();
  8330. break;
  8331. case "customPaddingRight":
  8332. message.customPaddingRight = reader.int32();
  8333. break;
  8334. case "isDeconvolution":
  8335. message.isDeconvolution = reader.bool();
  8336. break;
  8337. case "outputShape":
  8338. reader.array(message.outputShape, () => reader.uint64());
  8339. break;
  8340. default:
  8341. reader.field(tag, message);
  8342. break;
  8343. }
  8344. }
  8345. return message;
  8346. }
  8347. };
  8348. CoreML.Specification.Convolution3DLayerParams.prototype.outputChannels = 0;
  8349. CoreML.Specification.Convolution3DLayerParams.prototype.inputChannels = 0;
  8350. CoreML.Specification.Convolution3DLayerParams.prototype.nGroups = 0;
  8351. CoreML.Specification.Convolution3DLayerParams.prototype.kernelDepth = 0;
  8352. CoreML.Specification.Convolution3DLayerParams.prototype.kernelHeight = 0;
  8353. CoreML.Specification.Convolution3DLayerParams.prototype.kernelWidth = 0;
  8354. CoreML.Specification.Convolution3DLayerParams.prototype.strideDepth = 0;
  8355. CoreML.Specification.Convolution3DLayerParams.prototype.strideHeight = 0;
  8356. CoreML.Specification.Convolution3DLayerParams.prototype.strideWidth = 0;
  8357. CoreML.Specification.Convolution3DLayerParams.prototype.dilationDepth = 0;
  8358. CoreML.Specification.Convolution3DLayerParams.prototype.dilationHeight = 0;
  8359. CoreML.Specification.Convolution3DLayerParams.prototype.dilationWidth = 0;
  8360. CoreML.Specification.Convolution3DLayerParams.prototype.hasBias = false;
  8361. CoreML.Specification.Convolution3DLayerParams.prototype.weights = null;
  8362. CoreML.Specification.Convolution3DLayerParams.prototype.bias = null;
  8363. CoreML.Specification.Convolution3DLayerParams.prototype.paddingType = 0;
  8364. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingFront = 0;
  8365. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingBack = 0;
  8366. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingTop = 0;
  8367. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingBottom = 0;
  8368. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingLeft = 0;
  8369. CoreML.Specification.Convolution3DLayerParams.prototype.customPaddingRight = 0;
  8370. CoreML.Specification.Convolution3DLayerParams.prototype.isDeconvolution = false;
  8371. CoreML.Specification.Convolution3DLayerParams.PaddingType = {
  8372. "CUSTOM": 0,
  8373. "VALID": 1,
  8374. "SAME": 2
  8375. };
  8376. CoreML.Specification.InnerProductLayerParams = class InnerProductLayerParams {
  8377. static decode(reader, length) {
  8378. const message = new CoreML.Specification.InnerProductLayerParams();
  8379. const end = length === undefined ? reader.length : reader.position + length;
  8380. while (reader.position < end) {
  8381. const tag = reader.uint32();
  8382. switch (tag >>> 3) {
  8383. case 1:
  8384. message.inputChannels = reader.uint64();
  8385. break;
  8386. case 2:
  8387. message.outputChannels = reader.uint64();
  8388. break;
  8389. case 10:
  8390. message.hasBias = reader.bool();
  8391. break;
  8392. case 20:
  8393. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8394. break;
  8395. case 21:
  8396. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8397. break;
  8398. case 22:
  8399. message.int8DynamicQuantize = reader.bool();
  8400. break;
  8401. default:
  8402. reader.skipType(tag & 7);
  8403. break;
  8404. }
  8405. }
  8406. return message;
  8407. }
  8408. static decodeText(reader) {
  8409. const message = new CoreML.Specification.InnerProductLayerParams();
  8410. reader.start();
  8411. while (!reader.end()) {
  8412. const tag = reader.tag();
  8413. switch (tag) {
  8414. case "inputChannels":
  8415. message.inputChannels = reader.uint64();
  8416. break;
  8417. case "outputChannels":
  8418. message.outputChannels = reader.uint64();
  8419. break;
  8420. case "hasBias":
  8421. message.hasBias = reader.bool();
  8422. break;
  8423. case "weights":
  8424. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  8425. break;
  8426. case "bias":
  8427. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  8428. break;
  8429. case "int8DynamicQuantize":
  8430. message.int8DynamicQuantize = reader.bool();
  8431. break;
  8432. default:
  8433. reader.field(tag, message);
  8434. break;
  8435. }
  8436. }
  8437. return message;
  8438. }
  8439. };
  8440. CoreML.Specification.InnerProductLayerParams.prototype.inputChannels = 0n;
  8441. CoreML.Specification.InnerProductLayerParams.prototype.outputChannels = 0n;
  8442. CoreML.Specification.InnerProductLayerParams.prototype.hasBias = false;
  8443. CoreML.Specification.InnerProductLayerParams.prototype.weights = null;
  8444. CoreML.Specification.InnerProductLayerParams.prototype.bias = null;
  8445. CoreML.Specification.InnerProductLayerParams.prototype.int8DynamicQuantize = false;
  8446. CoreML.Specification.EmbeddingLayerParams = class EmbeddingLayerParams {
  8447. static decode(reader, length) {
  8448. const message = new CoreML.Specification.EmbeddingLayerParams();
  8449. const end = length === undefined ? reader.length : reader.position + length;
  8450. while (reader.position < end) {
  8451. const tag = reader.uint32();
  8452. switch (tag >>> 3) {
  8453. case 1:
  8454. message.inputDim = reader.uint64();
  8455. break;
  8456. case 2:
  8457. message.outputChannels = reader.uint64();
  8458. break;
  8459. case 10:
  8460. message.hasBias = reader.bool();
  8461. break;
  8462. case 20:
  8463. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8464. break;
  8465. case 21:
  8466. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8467. break;
  8468. default:
  8469. reader.skipType(tag & 7);
  8470. break;
  8471. }
  8472. }
  8473. return message;
  8474. }
  8475. static decodeText(reader) {
  8476. const message = new CoreML.Specification.EmbeddingLayerParams();
  8477. reader.start();
  8478. while (!reader.end()) {
  8479. const tag = reader.tag();
  8480. switch (tag) {
  8481. case "inputDim":
  8482. message.inputDim = reader.uint64();
  8483. break;
  8484. case "outputChannels":
  8485. message.outputChannels = reader.uint64();
  8486. break;
  8487. case "hasBias":
  8488. message.hasBias = reader.bool();
  8489. break;
  8490. case "weights":
  8491. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  8492. break;
  8493. case "bias":
  8494. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  8495. break;
  8496. default:
  8497. reader.field(tag, message);
  8498. break;
  8499. }
  8500. }
  8501. return message;
  8502. }
  8503. };
  8504. CoreML.Specification.EmbeddingLayerParams.prototype.inputDim = 0n;
  8505. CoreML.Specification.EmbeddingLayerParams.prototype.outputChannels = 0n;
  8506. CoreML.Specification.EmbeddingLayerParams.prototype.hasBias = false;
  8507. CoreML.Specification.EmbeddingLayerParams.prototype.weights = null;
  8508. CoreML.Specification.EmbeddingLayerParams.prototype.bias = null;
  8509. CoreML.Specification.EmbeddingNDLayerParams = class EmbeddingNDLayerParams {
  8510. static decode(reader, length) {
  8511. const message = new CoreML.Specification.EmbeddingNDLayerParams();
  8512. const end = length === undefined ? reader.length : reader.position + length;
  8513. while (reader.position < end) {
  8514. const tag = reader.uint32();
  8515. switch (tag >>> 3) {
  8516. case 1:
  8517. message.vocabSize = reader.uint64();
  8518. break;
  8519. case 2:
  8520. message.embeddingSize = reader.uint64();
  8521. break;
  8522. case 3:
  8523. message.hasBias = reader.bool();
  8524. break;
  8525. case 20:
  8526. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8527. break;
  8528. case 21:
  8529. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8530. break;
  8531. default:
  8532. reader.skipType(tag & 7);
  8533. break;
  8534. }
  8535. }
  8536. return message;
  8537. }
  8538. static decodeText(reader) {
  8539. const message = new CoreML.Specification.EmbeddingNDLayerParams();
  8540. reader.start();
  8541. while (!reader.end()) {
  8542. const tag = reader.tag();
  8543. switch (tag) {
  8544. case "vocabSize":
  8545. message.vocabSize = reader.uint64();
  8546. break;
  8547. case "embeddingSize":
  8548. message.embeddingSize = reader.uint64();
  8549. break;
  8550. case "hasBias":
  8551. message.hasBias = reader.bool();
  8552. break;
  8553. case "weights":
  8554. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  8555. break;
  8556. case "bias":
  8557. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  8558. break;
  8559. default:
  8560. reader.field(tag, message);
  8561. break;
  8562. }
  8563. }
  8564. return message;
  8565. }
  8566. };
  8567. CoreML.Specification.EmbeddingNDLayerParams.prototype.vocabSize = 0n;
  8568. CoreML.Specification.EmbeddingNDLayerParams.prototype.embeddingSize = 0n;
  8569. CoreML.Specification.EmbeddingNDLayerParams.prototype.hasBias = false;
  8570. CoreML.Specification.EmbeddingNDLayerParams.prototype.weights = null;
  8571. CoreML.Specification.EmbeddingNDLayerParams.prototype.bias = null;
  8572. CoreML.Specification.BatchnormLayerParams = class BatchnormLayerParams {
  8573. static decode(reader, length) {
  8574. const message = new CoreML.Specification.BatchnormLayerParams();
  8575. const end = length === undefined ? reader.length : reader.position + length;
  8576. while (reader.position < end) {
  8577. const tag = reader.uint32();
  8578. switch (tag >>> 3) {
  8579. case 1:
  8580. message.channels = reader.uint64();
  8581. break;
  8582. case 5:
  8583. message.computeMeanVar = reader.bool();
  8584. break;
  8585. case 6:
  8586. message.instanceNormalization = reader.bool();
  8587. break;
  8588. case 10:
  8589. message.epsilon = reader.float();
  8590. break;
  8591. case 15:
  8592. message.gamma = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8593. break;
  8594. case 16:
  8595. message.beta = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8596. break;
  8597. case 17:
  8598. message.mean = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8599. break;
  8600. case 18:
  8601. message.variance = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  8602. break;
  8603. default:
  8604. reader.skipType(tag & 7);
  8605. break;
  8606. }
  8607. }
  8608. return message;
  8609. }
  8610. static decodeText(reader) {
  8611. const message = new CoreML.Specification.BatchnormLayerParams();
  8612. reader.start();
  8613. while (!reader.end()) {
  8614. const tag = reader.tag();
  8615. switch (tag) {
  8616. case "channels":
  8617. message.channels = reader.uint64();
  8618. break;
  8619. case "computeMeanVar":
  8620. message.computeMeanVar = reader.bool();
  8621. break;
  8622. case "instanceNormalization":
  8623. message.instanceNormalization = reader.bool();
  8624. break;
  8625. case "epsilon":
  8626. message.epsilon = reader.float();
  8627. break;
  8628. case "gamma":
  8629. message.gamma = CoreML.Specification.WeightParams.decodeText(reader);
  8630. break;
  8631. case "beta":
  8632. message.beta = CoreML.Specification.WeightParams.decodeText(reader);
  8633. break;
  8634. case "mean":
  8635. message.mean = CoreML.Specification.WeightParams.decodeText(reader);
  8636. break;
  8637. case "variance":
  8638. message.variance = CoreML.Specification.WeightParams.decodeText(reader);
  8639. break;
  8640. default:
  8641. reader.field(tag, message);
  8642. break;
  8643. }
  8644. }
  8645. return message;
  8646. }
  8647. };
  8648. CoreML.Specification.BatchnormLayerParams.prototype.channels = 0n;
  8649. CoreML.Specification.BatchnormLayerParams.prototype.computeMeanVar = false;
  8650. CoreML.Specification.BatchnormLayerParams.prototype.instanceNormalization = false;
  8651. CoreML.Specification.BatchnormLayerParams.prototype.epsilon = 0;
  8652. CoreML.Specification.BatchnormLayerParams.prototype.gamma = null;
  8653. CoreML.Specification.BatchnormLayerParams.prototype.beta = null;
  8654. CoreML.Specification.BatchnormLayerParams.prototype.mean = null;
  8655. CoreML.Specification.BatchnormLayerParams.prototype.variance = null;
  8656. CoreML.Specification.PoolingLayerParams = class PoolingLayerParams {
  8657. constructor() {
  8658. this.kernelSize = [];
  8659. this.stride = [];
  8660. }
  8661. get PoolingPaddingType() {
  8662. CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet = CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet || new Set(["valid", "same", "includeLastPixel"]);
  8663. return Object.keys(this).find((key) => CoreML.Specification.PoolingLayerParams.PoolingPaddingTypeSet.has(key) && this[key] !== null);
  8664. }
  8665. static decode(reader, length) {
  8666. const message = new CoreML.Specification.PoolingLayerParams();
  8667. const end = length === undefined ? reader.length : reader.position + length;
  8668. while (reader.position < end) {
  8669. const tag = reader.uint32();
  8670. switch (tag >>> 3) {
  8671. case 1:
  8672. message.type = reader.int32();
  8673. break;
  8674. case 10:
  8675. message.kernelSize = reader.array(message.kernelSize, () => reader.uint64(), tag);
  8676. break;
  8677. case 20:
  8678. message.stride = reader.array(message.stride, () => reader.uint64(), tag);
  8679. break;
  8680. case 30:
  8681. message.valid = CoreML.Specification.ValidPadding.decode(reader, reader.uint32());
  8682. break;
  8683. case 31:
  8684. message.same = CoreML.Specification.SamePadding.decode(reader, reader.uint32());
  8685. break;
  8686. case 32:
  8687. message.includeLastPixel = CoreML.Specification.PoolingLayerParams.ValidCompletePadding.decode(reader, reader.uint32());
  8688. break;
  8689. case 50:
  8690. message.avgPoolExcludePadding = reader.bool();
  8691. break;
  8692. case 60:
  8693. message.globalPooling = reader.bool();
  8694. break;
  8695. default:
  8696. reader.skipType(tag & 7);
  8697. break;
  8698. }
  8699. }
  8700. return message;
  8701. }
  8702. static decodeText(reader) {
  8703. const message = new CoreML.Specification.PoolingLayerParams();
  8704. reader.start();
  8705. while (!reader.end()) {
  8706. const tag = reader.tag();
  8707. switch (tag) {
  8708. case "type":
  8709. message.type = reader.enum(CoreML.Specification.PoolingLayerParams.PoolingType);
  8710. break;
  8711. case "kernelSize":
  8712. reader.array(message.kernelSize, () => reader.uint64());
  8713. break;
  8714. case "stride":
  8715. reader.array(message.stride, () => reader.uint64());
  8716. break;
  8717. case "valid":
  8718. message.valid = CoreML.Specification.ValidPadding.decodeText(reader);
  8719. break;
  8720. case "same":
  8721. message.same = CoreML.Specification.SamePadding.decodeText(reader);
  8722. break;
  8723. case "includeLastPixel":
  8724. message.includeLastPixel = CoreML.Specification.PoolingLayerParams.ValidCompletePadding.decodeText(reader);
  8725. break;
  8726. case "avgPoolExcludePadding":
  8727. message.avgPoolExcludePadding = reader.bool();
  8728. break;
  8729. case "globalPooling":
  8730. message.globalPooling = reader.bool();
  8731. break;
  8732. default:
  8733. reader.field(tag, message);
  8734. break;
  8735. }
  8736. }
  8737. return message;
  8738. }
  8739. };
  8740. CoreML.Specification.PoolingLayerParams.prototype.type = 0;
  8741. CoreML.Specification.PoolingLayerParams.prototype.avgPoolExcludePadding = false;
  8742. CoreML.Specification.PoolingLayerParams.prototype.globalPooling = false;
  8743. CoreML.Specification.PoolingLayerParams.PoolingType = {
  8744. "MAX": 0,
  8745. "AVERAGE": 1,
  8746. "L2": 2
  8747. };
  8748. CoreML.Specification.PoolingLayerParams.ValidCompletePadding = class ValidCompletePadding {
  8749. constructor() {
  8750. this.paddingAmounts = [];
  8751. }
  8752. static decode(reader, length) {
  8753. const message = new CoreML.Specification.PoolingLayerParams.ValidCompletePadding();
  8754. const end = length === undefined ? reader.length : reader.position + length;
  8755. while (reader.position < end) {
  8756. const tag = reader.uint32();
  8757. switch (tag >>> 3) {
  8758. case 10:
  8759. message.paddingAmounts = reader.array(message.paddingAmounts, () => reader.uint64(), tag);
  8760. break;
  8761. default:
  8762. reader.skipType(tag & 7);
  8763. break;
  8764. }
  8765. }
  8766. return message;
  8767. }
  8768. static decodeText(reader) {
  8769. const message = new CoreML.Specification.PoolingLayerParams.ValidCompletePadding();
  8770. reader.start();
  8771. while (!reader.end()) {
  8772. const tag = reader.tag();
  8773. switch (tag) {
  8774. case "paddingAmounts":
  8775. reader.array(message.paddingAmounts, () => reader.uint64());
  8776. break;
  8777. default:
  8778. reader.field(tag, message);
  8779. break;
  8780. }
  8781. }
  8782. return message;
  8783. }
  8784. };
  8785. CoreML.Specification.Pooling3DLayerParams = class Pooling3DLayerParams {
  8786. static decode(reader, length) {
  8787. const message = new CoreML.Specification.Pooling3DLayerParams();
  8788. const end = length === undefined ? reader.length : reader.position + length;
  8789. while (reader.position < end) {
  8790. const tag = reader.uint32();
  8791. switch (tag >>> 3) {
  8792. case 1:
  8793. message.type = reader.int32();
  8794. break;
  8795. case 2:
  8796. message.kernelDepth = reader.int32();
  8797. break;
  8798. case 3:
  8799. message.kernelHeight = reader.int32();
  8800. break;
  8801. case 4:
  8802. message.kernelWidth = reader.int32();
  8803. break;
  8804. case 5:
  8805. message.strideDepth = reader.int32();
  8806. break;
  8807. case 6:
  8808. message.strideHeight = reader.int32();
  8809. break;
  8810. case 7:
  8811. message.strideWidth = reader.int32();
  8812. break;
  8813. case 15:
  8814. message.paddingType = reader.int32();
  8815. break;
  8816. case 8:
  8817. message.customPaddingFront = reader.int32();
  8818. break;
  8819. case 9:
  8820. message.customPaddingBack = reader.int32();
  8821. break;
  8822. case 10:
  8823. message.customPaddingTop = reader.int32();
  8824. break;
  8825. case 11:
  8826. message.customPaddingBottom = reader.int32();
  8827. break;
  8828. case 12:
  8829. message.customPaddingLeft = reader.int32();
  8830. break;
  8831. case 13:
  8832. message.customPaddingRight = reader.int32();
  8833. break;
  8834. case 14:
  8835. message.countExcludePadding = reader.bool();
  8836. break;
  8837. default:
  8838. reader.skipType(tag & 7);
  8839. break;
  8840. }
  8841. }
  8842. return message;
  8843. }
  8844. static decodeText(reader) {
  8845. const message = new CoreML.Specification.Pooling3DLayerParams();
  8846. reader.start();
  8847. while (!reader.end()) {
  8848. const tag = reader.tag();
  8849. switch (tag) {
  8850. case "type":
  8851. message.type = reader.enum(CoreML.Specification.Pooling3DLayerParams.PoolingType3D);
  8852. break;
  8853. case "kernelDepth":
  8854. message.kernelDepth = reader.int32();
  8855. break;
  8856. case "kernelHeight":
  8857. message.kernelHeight = reader.int32();
  8858. break;
  8859. case "kernelWidth":
  8860. message.kernelWidth = reader.int32();
  8861. break;
  8862. case "strideDepth":
  8863. message.strideDepth = reader.int32();
  8864. break;
  8865. case "strideHeight":
  8866. message.strideHeight = reader.int32();
  8867. break;
  8868. case "strideWidth":
  8869. message.strideWidth = reader.int32();
  8870. break;
  8871. case "paddingType":
  8872. message.paddingType = reader.enum(CoreML.Specification.Pooling3DLayerParams.Pooling3DPaddingType);
  8873. break;
  8874. case "customPaddingFront":
  8875. message.customPaddingFront = reader.int32();
  8876. break;
  8877. case "customPaddingBack":
  8878. message.customPaddingBack = reader.int32();
  8879. break;
  8880. case "customPaddingTop":
  8881. message.customPaddingTop = reader.int32();
  8882. break;
  8883. case "customPaddingBottom":
  8884. message.customPaddingBottom = reader.int32();
  8885. break;
  8886. case "customPaddingLeft":
  8887. message.customPaddingLeft = reader.int32();
  8888. break;
  8889. case "customPaddingRight":
  8890. message.customPaddingRight = reader.int32();
  8891. break;
  8892. case "countExcludePadding":
  8893. message.countExcludePadding = reader.bool();
  8894. break;
  8895. default:
  8896. reader.field(tag, message);
  8897. break;
  8898. }
  8899. }
  8900. return message;
  8901. }
  8902. };
  8903. CoreML.Specification.Pooling3DLayerParams.prototype.type = 0;
  8904. CoreML.Specification.Pooling3DLayerParams.prototype.kernelDepth = 0;
  8905. CoreML.Specification.Pooling3DLayerParams.prototype.kernelHeight = 0;
  8906. CoreML.Specification.Pooling3DLayerParams.prototype.kernelWidth = 0;
  8907. CoreML.Specification.Pooling3DLayerParams.prototype.strideDepth = 0;
  8908. CoreML.Specification.Pooling3DLayerParams.prototype.strideHeight = 0;
  8909. CoreML.Specification.Pooling3DLayerParams.prototype.strideWidth = 0;
  8910. CoreML.Specification.Pooling3DLayerParams.prototype.paddingType = 0;
  8911. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingFront = 0;
  8912. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingBack = 0;
  8913. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingTop = 0;
  8914. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingBottom = 0;
  8915. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingLeft = 0;
  8916. CoreML.Specification.Pooling3DLayerParams.prototype.customPaddingRight = 0;
  8917. CoreML.Specification.Pooling3DLayerParams.prototype.countExcludePadding = false;
  8918. CoreML.Specification.Pooling3DLayerParams.PoolingType3D = {
  8919. "MAX": 0,
  8920. "AVERAGE": 1
  8921. };
  8922. CoreML.Specification.Pooling3DLayerParams.Pooling3DPaddingType = {
  8923. "CUSTOM": 0,
  8924. "VALID": 1,
  8925. "SAME": 2
  8926. };
  8927. CoreML.Specification.GlobalPooling3DLayerParams = class GlobalPooling3DLayerParams {
  8928. static decode(reader, length) {
  8929. const message = new CoreML.Specification.GlobalPooling3DLayerParams();
  8930. const end = length === undefined ? reader.length : reader.position + length;
  8931. while (reader.position < end) {
  8932. const tag = reader.uint32();
  8933. switch (tag >>> 3) {
  8934. case 1:
  8935. message.type = reader.int32();
  8936. break;
  8937. default:
  8938. reader.skipType(tag & 7);
  8939. break;
  8940. }
  8941. }
  8942. return message;
  8943. }
  8944. static decodeText(reader) {
  8945. const message = new CoreML.Specification.GlobalPooling3DLayerParams();
  8946. reader.start();
  8947. while (!reader.end()) {
  8948. const tag = reader.tag();
  8949. switch (tag) {
  8950. case "type":
  8951. message.type = reader.enum(CoreML.Specification.GlobalPooling3DLayerParams.GlobalPoolingType3D);
  8952. break;
  8953. default:
  8954. reader.field(tag, message);
  8955. break;
  8956. }
  8957. }
  8958. return message;
  8959. }
  8960. };
  8961. CoreML.Specification.GlobalPooling3DLayerParams.prototype.type = 0;
  8962. CoreML.Specification.GlobalPooling3DLayerParams.GlobalPoolingType3D = {
  8963. "MAX": 0,
  8964. "AVERAGE": 1
  8965. };
  8966. CoreML.Specification.PaddingLayerParams = class PaddingLayerParams {
  8967. get PaddingType() {
  8968. CoreML.Specification.PaddingLayerParams.PaddingTypeSet = CoreML.Specification.PaddingLayerParams.PaddingTypeSet || new Set(["constant", "reflection", "replication"]);
  8969. return Object.keys(this).find((key) => CoreML.Specification.PaddingLayerParams.PaddingTypeSet.has(key) && this[key] !== null);
  8970. }
  8971. static decode(reader, length) {
  8972. const message = new CoreML.Specification.PaddingLayerParams();
  8973. const end = length === undefined ? reader.length : reader.position + length;
  8974. while (reader.position < end) {
  8975. const tag = reader.uint32();
  8976. switch (tag >>> 3) {
  8977. case 1:
  8978. message.constant = CoreML.Specification.PaddingLayerParams.PaddingConstant.decode(reader, reader.uint32());
  8979. break;
  8980. case 2:
  8981. message.reflection = CoreML.Specification.PaddingLayerParams.PaddingReflection.decode(reader, reader.uint32());
  8982. break;
  8983. case 3:
  8984. message.replication = CoreML.Specification.PaddingLayerParams.PaddingReplication.decode(reader, reader.uint32());
  8985. break;
  8986. case 10:
  8987. message.paddingAmounts = CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  8988. break;
  8989. default:
  8990. reader.skipType(tag & 7);
  8991. break;
  8992. }
  8993. }
  8994. return message;
  8995. }
  8996. static decodeText(reader) {
  8997. const message = new CoreML.Specification.PaddingLayerParams();
  8998. reader.start();
  8999. while (!reader.end()) {
  9000. const tag = reader.tag();
  9001. switch (tag) {
  9002. case "constant":
  9003. message.constant = CoreML.Specification.PaddingLayerParams.PaddingConstant.decodeText(reader);
  9004. break;
  9005. case "reflection":
  9006. message.reflection = CoreML.Specification.PaddingLayerParams.PaddingReflection.decodeText(reader);
  9007. break;
  9008. case "replication":
  9009. message.replication = CoreML.Specification.PaddingLayerParams.PaddingReplication.decodeText(reader);
  9010. break;
  9011. case "paddingAmounts":
  9012. message.paddingAmounts = CoreML.Specification.BorderAmounts.decodeText(reader);
  9013. break;
  9014. default:
  9015. reader.field(tag, message);
  9016. break;
  9017. }
  9018. }
  9019. return message;
  9020. }
  9021. };
  9022. CoreML.Specification.PaddingLayerParams.prototype.paddingAmounts = null;
  9023. CoreML.Specification.PaddingLayerParams.PaddingConstant = class PaddingConstant {
  9024. static decode(reader, length) {
  9025. const message = new CoreML.Specification.PaddingLayerParams.PaddingConstant();
  9026. const end = length === undefined ? reader.length : reader.position + length;
  9027. while (reader.position < end) {
  9028. const tag = reader.uint32();
  9029. switch (tag >>> 3) {
  9030. case 1:
  9031. message.value = reader.float();
  9032. break;
  9033. default:
  9034. reader.skipType(tag & 7);
  9035. break;
  9036. }
  9037. }
  9038. return message;
  9039. }
  9040. static decodeText(reader) {
  9041. const message = new CoreML.Specification.PaddingLayerParams.PaddingConstant();
  9042. reader.start();
  9043. while (!reader.end()) {
  9044. const tag = reader.tag();
  9045. switch (tag) {
  9046. case "value":
  9047. message.value = reader.float();
  9048. break;
  9049. default:
  9050. reader.field(tag, message);
  9051. break;
  9052. }
  9053. }
  9054. return message;
  9055. }
  9056. };
  9057. CoreML.Specification.PaddingLayerParams.PaddingConstant.prototype.value = 0;
  9058. CoreML.Specification.PaddingLayerParams.PaddingReflection = class PaddingReflection {
  9059. static decode(reader, length) {
  9060. const message = new CoreML.Specification.PaddingLayerParams.PaddingReflection();
  9061. const end = length === undefined ? reader.length : reader.position + length;
  9062. while (reader.position < end) {
  9063. const tag = reader.uint32();
  9064. switch (tag >>> 3) {
  9065. default:
  9066. reader.skipType(tag & 7);
  9067. break;
  9068. }
  9069. }
  9070. return message;
  9071. }
  9072. static decodeText(reader) {
  9073. const message = new CoreML.Specification.PaddingLayerParams.PaddingReflection();
  9074. reader.start();
  9075. while (!reader.end()) {
  9076. const tag = reader.tag();
  9077. switch (tag) {
  9078. default:
  9079. reader.field(tag, message);
  9080. break;
  9081. }
  9082. }
  9083. return message;
  9084. }
  9085. };
  9086. CoreML.Specification.PaddingLayerParams.PaddingReplication = class PaddingReplication {
  9087. static decode(reader, length) {
  9088. const message = new CoreML.Specification.PaddingLayerParams.PaddingReplication();
  9089. const end = length === undefined ? reader.length : reader.position + length;
  9090. while (reader.position < end) {
  9091. const tag = reader.uint32();
  9092. switch (tag >>> 3) {
  9093. default:
  9094. reader.skipType(tag & 7);
  9095. break;
  9096. }
  9097. }
  9098. return message;
  9099. }
  9100. static decodeText(reader) {
  9101. const message = new CoreML.Specification.PaddingLayerParams.PaddingReplication();
  9102. reader.start();
  9103. while (!reader.end()) {
  9104. const tag = reader.tag();
  9105. switch (tag) {
  9106. default:
  9107. reader.field(tag, message);
  9108. break;
  9109. }
  9110. }
  9111. return message;
  9112. }
  9113. };
  9114. CoreML.Specification.ConcatLayerParams = class ConcatLayerParams {
  9115. static decode(reader, length) {
  9116. const message = new CoreML.Specification.ConcatLayerParams();
  9117. const end = length === undefined ? reader.length : reader.position + length;
  9118. while (reader.position < end) {
  9119. const tag = reader.uint32();
  9120. switch (tag >>> 3) {
  9121. case 100:
  9122. message.sequenceConcat = reader.bool();
  9123. break;
  9124. default:
  9125. reader.skipType(tag & 7);
  9126. break;
  9127. }
  9128. }
  9129. return message;
  9130. }
  9131. static decodeText(reader) {
  9132. const message = new CoreML.Specification.ConcatLayerParams();
  9133. reader.start();
  9134. while (!reader.end()) {
  9135. const tag = reader.tag();
  9136. switch (tag) {
  9137. case "sequenceConcat":
  9138. message.sequenceConcat = reader.bool();
  9139. break;
  9140. default:
  9141. reader.field(tag, message);
  9142. break;
  9143. }
  9144. }
  9145. return message;
  9146. }
  9147. };
  9148. CoreML.Specification.ConcatLayerParams.prototype.sequenceConcat = false;
  9149. CoreML.Specification.LRNLayerParams = class LRNLayerParams {
  9150. static decode(reader, length) {
  9151. const message = new CoreML.Specification.LRNLayerParams();
  9152. const end = length === undefined ? reader.length : reader.position + length;
  9153. while (reader.position < end) {
  9154. const tag = reader.uint32();
  9155. switch (tag >>> 3) {
  9156. case 1:
  9157. message.alpha = reader.float();
  9158. break;
  9159. case 2:
  9160. message.beta = reader.float();
  9161. break;
  9162. case 3:
  9163. message.localSize = reader.uint64();
  9164. break;
  9165. case 4:
  9166. message.k = reader.float();
  9167. break;
  9168. default:
  9169. reader.skipType(tag & 7);
  9170. break;
  9171. }
  9172. }
  9173. return message;
  9174. }
  9175. static decodeText(reader) {
  9176. const message = new CoreML.Specification.LRNLayerParams();
  9177. reader.start();
  9178. while (!reader.end()) {
  9179. const tag = reader.tag();
  9180. switch (tag) {
  9181. case "alpha":
  9182. message.alpha = reader.float();
  9183. break;
  9184. case "beta":
  9185. message.beta = reader.float();
  9186. break;
  9187. case "localSize":
  9188. message.localSize = reader.uint64();
  9189. break;
  9190. case "k":
  9191. message.k = reader.float();
  9192. break;
  9193. default:
  9194. reader.field(tag, message);
  9195. break;
  9196. }
  9197. }
  9198. return message;
  9199. }
  9200. };
  9201. CoreML.Specification.LRNLayerParams.prototype.alpha = 0;
  9202. CoreML.Specification.LRNLayerParams.prototype.beta = 0;
  9203. CoreML.Specification.LRNLayerParams.prototype.localSize = 0n;
  9204. CoreML.Specification.LRNLayerParams.prototype.k = 0;
  9205. CoreML.Specification.SoftmaxLayerParams = class SoftmaxLayerParams {
  9206. static decode(reader, length) {
  9207. const message = new CoreML.Specification.SoftmaxLayerParams();
  9208. const end = length === undefined ? reader.length : reader.position + length;
  9209. while (reader.position < end) {
  9210. const tag = reader.uint32();
  9211. switch (tag >>> 3) {
  9212. default:
  9213. reader.skipType(tag & 7);
  9214. break;
  9215. }
  9216. }
  9217. return message;
  9218. }
  9219. static decodeText(reader) {
  9220. const message = new CoreML.Specification.SoftmaxLayerParams();
  9221. reader.start();
  9222. while (!reader.end()) {
  9223. const tag = reader.tag();
  9224. switch (tag) {
  9225. default:
  9226. reader.field(tag, message);
  9227. break;
  9228. }
  9229. }
  9230. return message;
  9231. }
  9232. };
  9233. CoreML.Specification.SplitLayerParams = class SplitLayerParams {
  9234. static decode(reader, length) {
  9235. const message = new CoreML.Specification.SplitLayerParams();
  9236. const end = length === undefined ? reader.length : reader.position + length;
  9237. while (reader.position < end) {
  9238. const tag = reader.uint32();
  9239. switch (tag >>> 3) {
  9240. case 1:
  9241. message.nOutputs = reader.uint64();
  9242. break;
  9243. default:
  9244. reader.skipType(tag & 7);
  9245. break;
  9246. }
  9247. }
  9248. return message;
  9249. }
  9250. static decodeText(reader) {
  9251. const message = new CoreML.Specification.SplitLayerParams();
  9252. reader.start();
  9253. while (!reader.end()) {
  9254. const tag = reader.tag();
  9255. switch (tag) {
  9256. case "nOutputs":
  9257. message.nOutputs = reader.uint64();
  9258. break;
  9259. default:
  9260. reader.field(tag, message);
  9261. break;
  9262. }
  9263. }
  9264. return message;
  9265. }
  9266. };
  9267. CoreML.Specification.SplitLayerParams.prototype.nOutputs = 0n;
  9268. CoreML.Specification.AddLayerParams = class AddLayerParams {
  9269. static decode(reader, length) {
  9270. const message = new CoreML.Specification.AddLayerParams();
  9271. const end = length === undefined ? reader.length : reader.position + length;
  9272. while (reader.position < end) {
  9273. const tag = reader.uint32();
  9274. switch (tag >>> 3) {
  9275. case 1:
  9276. message.alpha = reader.float();
  9277. break;
  9278. default:
  9279. reader.skipType(tag & 7);
  9280. break;
  9281. }
  9282. }
  9283. return message;
  9284. }
  9285. static decodeText(reader) {
  9286. const message = new CoreML.Specification.AddLayerParams();
  9287. reader.start();
  9288. while (!reader.end()) {
  9289. const tag = reader.tag();
  9290. switch (tag) {
  9291. case "alpha":
  9292. message.alpha = reader.float();
  9293. break;
  9294. default:
  9295. reader.field(tag, message);
  9296. break;
  9297. }
  9298. }
  9299. return message;
  9300. }
  9301. };
  9302. CoreML.Specification.AddLayerParams.prototype.alpha = 0;
  9303. CoreML.Specification.MultiplyLayerParams = class MultiplyLayerParams {
  9304. static decode(reader, length) {
  9305. const message = new CoreML.Specification.MultiplyLayerParams();
  9306. const end = length === undefined ? reader.length : reader.position + length;
  9307. while (reader.position < end) {
  9308. const tag = reader.uint32();
  9309. switch (tag >>> 3) {
  9310. case 1:
  9311. message.alpha = reader.float();
  9312. break;
  9313. default:
  9314. reader.skipType(tag & 7);
  9315. break;
  9316. }
  9317. }
  9318. return message;
  9319. }
  9320. static decodeText(reader) {
  9321. const message = new CoreML.Specification.MultiplyLayerParams();
  9322. reader.start();
  9323. while (!reader.end()) {
  9324. const tag = reader.tag();
  9325. switch (tag) {
  9326. case "alpha":
  9327. message.alpha = reader.float();
  9328. break;
  9329. default:
  9330. reader.field(tag, message);
  9331. break;
  9332. }
  9333. }
  9334. return message;
  9335. }
  9336. };
  9337. CoreML.Specification.MultiplyLayerParams.prototype.alpha = 0;
  9338. CoreML.Specification.UnaryFunctionLayerParams = class UnaryFunctionLayerParams {
  9339. static decode(reader, length) {
  9340. const message = new CoreML.Specification.UnaryFunctionLayerParams();
  9341. const end = length === undefined ? reader.length : reader.position + length;
  9342. while (reader.position < end) {
  9343. const tag = reader.uint32();
  9344. switch (tag >>> 3) {
  9345. case 1:
  9346. message.type = reader.int32();
  9347. break;
  9348. case 2:
  9349. message.alpha = reader.float();
  9350. break;
  9351. case 3:
  9352. message.epsilon = reader.float();
  9353. break;
  9354. case 4:
  9355. message.shift = reader.float();
  9356. break;
  9357. case 5:
  9358. message.scale = reader.float();
  9359. break;
  9360. default:
  9361. reader.skipType(tag & 7);
  9362. break;
  9363. }
  9364. }
  9365. return message;
  9366. }
  9367. static decodeText(reader) {
  9368. const message = new CoreML.Specification.UnaryFunctionLayerParams();
  9369. reader.start();
  9370. while (!reader.end()) {
  9371. const tag = reader.tag();
  9372. switch (tag) {
  9373. case "type":
  9374. message.type = reader.enum(CoreML.Specification.UnaryFunctionLayerParams.Operation);
  9375. break;
  9376. case "alpha":
  9377. message.alpha = reader.float();
  9378. break;
  9379. case "epsilon":
  9380. message.epsilon = reader.float();
  9381. break;
  9382. case "shift":
  9383. message.shift = reader.float();
  9384. break;
  9385. case "scale":
  9386. message.scale = reader.float();
  9387. break;
  9388. default:
  9389. reader.field(tag, message);
  9390. break;
  9391. }
  9392. }
  9393. return message;
  9394. }
  9395. };
  9396. CoreML.Specification.UnaryFunctionLayerParams.prototype.type = 0;
  9397. CoreML.Specification.UnaryFunctionLayerParams.prototype.alpha = 0;
  9398. CoreML.Specification.UnaryFunctionLayerParams.prototype.epsilon = 0;
  9399. CoreML.Specification.UnaryFunctionLayerParams.prototype.shift = 0;
  9400. CoreML.Specification.UnaryFunctionLayerParams.prototype.scale = 0;
  9401. CoreML.Specification.UnaryFunctionLayerParams.Operation = {
  9402. "SQRT": 0,
  9403. "RSQRT": 1,
  9404. "INVERSE": 2,
  9405. "POWER": 3,
  9406. "EXP": 4,
  9407. "LOG": 5,
  9408. "ABS": 6,
  9409. "THRESHOLD": 7
  9410. };
  9411. CoreML.Specification.UpsampleLayerParams = class UpsampleLayerParams {
  9412. constructor() {
  9413. this.scalingFactor = [];
  9414. this.fractionalScalingFactor = [];
  9415. }
  9416. static decode(reader, length) {
  9417. const message = new CoreML.Specification.UpsampleLayerParams();
  9418. const end = length === undefined ? reader.length : reader.position + length;
  9419. while (reader.position < end) {
  9420. const tag = reader.uint32();
  9421. switch (tag >>> 3) {
  9422. case 1:
  9423. message.scalingFactor = reader.array(message.scalingFactor, () => reader.uint64(), tag);
  9424. break;
  9425. case 7:
  9426. message.fractionalScalingFactor = reader.floats(message.fractionalScalingFactor, tag);
  9427. break;
  9428. case 5:
  9429. message.mode = reader.int32();
  9430. break;
  9431. case 6:
  9432. message.linearUpsampleMode = reader.int32();
  9433. break;
  9434. default:
  9435. reader.skipType(tag & 7);
  9436. break;
  9437. }
  9438. }
  9439. return message;
  9440. }
  9441. static decodeText(reader) {
  9442. const message = new CoreML.Specification.UpsampleLayerParams();
  9443. reader.start();
  9444. while (!reader.end()) {
  9445. const tag = reader.tag();
  9446. switch (tag) {
  9447. case "scalingFactor":
  9448. reader.array(message.scalingFactor, () => reader.uint64());
  9449. break;
  9450. case "fractionalScalingFactor":
  9451. reader.array(message.fractionalScalingFactor, () => reader.float());
  9452. break;
  9453. case "mode":
  9454. message.mode = reader.enum(CoreML.Specification.UpsampleLayerParams.InterpolationMode);
  9455. break;
  9456. case "linearUpsampleMode":
  9457. message.linearUpsampleMode = reader.enum(CoreML.Specification.UpsampleLayerParams.LinearUpsampleMode);
  9458. break;
  9459. default:
  9460. reader.field(tag, message);
  9461. break;
  9462. }
  9463. }
  9464. return message;
  9465. }
  9466. };
  9467. CoreML.Specification.UpsampleLayerParams.prototype.mode = 0;
  9468. CoreML.Specification.UpsampleLayerParams.prototype.linearUpsampleMode = 0;
  9469. CoreML.Specification.UpsampleLayerParams.InterpolationMode = {
  9470. "NN": 0,
  9471. "BILINEAR": 1
  9472. };
  9473. CoreML.Specification.UpsampleLayerParams.LinearUpsampleMode = {
  9474. "DEFAULT": 0,
  9475. "ALIGN_CORNERS_TRUE": 1,
  9476. "ALIGN_CORNERS_FALSE": 2
  9477. };
  9478. CoreML.Specification.ResizeBilinearLayerParams = class ResizeBilinearLayerParams {
  9479. constructor() {
  9480. this.targetSize = [];
  9481. }
  9482. static decode(reader, length) {
  9483. const message = new CoreML.Specification.ResizeBilinearLayerParams();
  9484. const end = length === undefined ? reader.length : reader.position + length;
  9485. while (reader.position < end) {
  9486. const tag = reader.uint32();
  9487. switch (tag >>> 3) {
  9488. case 1:
  9489. message.targetSize = reader.array(message.targetSize, () => reader.uint64(), tag);
  9490. break;
  9491. case 2:
  9492. message.mode = CoreML.Specification.SamplingMode.decode(reader, reader.uint32());
  9493. break;
  9494. default:
  9495. reader.skipType(tag & 7);
  9496. break;
  9497. }
  9498. }
  9499. return message;
  9500. }
  9501. static decodeText(reader) {
  9502. const message = new CoreML.Specification.ResizeBilinearLayerParams();
  9503. reader.start();
  9504. while (!reader.end()) {
  9505. const tag = reader.tag();
  9506. switch (tag) {
  9507. case "targetSize":
  9508. reader.array(message.targetSize, () => reader.uint64());
  9509. break;
  9510. case "mode":
  9511. message.mode = CoreML.Specification.SamplingMode.decodeText(reader);
  9512. break;
  9513. default:
  9514. reader.field(tag, message);
  9515. break;
  9516. }
  9517. }
  9518. return message;
  9519. }
  9520. };
  9521. CoreML.Specification.ResizeBilinearLayerParams.prototype.mode = null;
  9522. CoreML.Specification.CropResizeLayerParams = class CropResizeLayerParams {
  9523. constructor() {
  9524. this.targetSize = [];
  9525. }
  9526. static decode(reader, length) {
  9527. const message = new CoreML.Specification.CropResizeLayerParams();
  9528. const end = length === undefined ? reader.length : reader.position + length;
  9529. while (reader.position < end) {
  9530. const tag = reader.uint32();
  9531. switch (tag >>> 3) {
  9532. case 1:
  9533. message.targetSize = reader.array(message.targetSize, () => reader.uint64(), tag);
  9534. break;
  9535. case 2:
  9536. message.normalizedCoordinates = reader.bool();
  9537. break;
  9538. case 3:
  9539. message.mode = CoreML.Specification.SamplingMode.decode(reader, reader.uint32());
  9540. break;
  9541. case 4:
  9542. message.boxIndicesMode = CoreML.Specification.BoxCoordinatesMode.decode(reader, reader.uint32());
  9543. break;
  9544. case 5:
  9545. message.spatialScale = reader.float();
  9546. break;
  9547. default:
  9548. reader.skipType(tag & 7);
  9549. break;
  9550. }
  9551. }
  9552. return message;
  9553. }
  9554. static decodeText(reader) {
  9555. const message = new CoreML.Specification.CropResizeLayerParams();
  9556. reader.start();
  9557. while (!reader.end()) {
  9558. const tag = reader.tag();
  9559. switch (tag) {
  9560. case "targetSize":
  9561. reader.array(message.targetSize, () => reader.uint64());
  9562. break;
  9563. case "normalizedCoordinates":
  9564. message.normalizedCoordinates = reader.bool();
  9565. break;
  9566. case "mode":
  9567. message.mode = CoreML.Specification.SamplingMode.decodeText(reader);
  9568. break;
  9569. case "boxIndicesMode":
  9570. message.boxIndicesMode = CoreML.Specification.BoxCoordinatesMode.decodeText(reader);
  9571. break;
  9572. case "spatialScale":
  9573. message.spatialScale = reader.float();
  9574. break;
  9575. default:
  9576. reader.field(tag, message);
  9577. break;
  9578. }
  9579. }
  9580. return message;
  9581. }
  9582. };
  9583. CoreML.Specification.CropResizeLayerParams.prototype.normalizedCoordinates = false;
  9584. CoreML.Specification.CropResizeLayerParams.prototype.mode = null;
  9585. CoreML.Specification.CropResizeLayerParams.prototype.boxIndicesMode = null;
  9586. CoreML.Specification.CropResizeLayerParams.prototype.spatialScale = 0;
  9587. CoreML.Specification.BiasLayerParams = class BiasLayerParams {
  9588. constructor() {
  9589. this.shape = [];
  9590. }
  9591. static decode(reader, length) {
  9592. const message = new CoreML.Specification.BiasLayerParams();
  9593. const end = length === undefined ? reader.length : reader.position + length;
  9594. while (reader.position < end) {
  9595. const tag = reader.uint32();
  9596. switch (tag >>> 3) {
  9597. case 1:
  9598. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  9599. break;
  9600. case 2:
  9601. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  9602. break;
  9603. default:
  9604. reader.skipType(tag & 7);
  9605. break;
  9606. }
  9607. }
  9608. return message;
  9609. }
  9610. static decodeText(reader) {
  9611. const message = new CoreML.Specification.BiasLayerParams();
  9612. reader.start();
  9613. while (!reader.end()) {
  9614. const tag = reader.tag();
  9615. switch (tag) {
  9616. case "shape":
  9617. reader.array(message.shape, () => reader.uint64());
  9618. break;
  9619. case "bias":
  9620. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  9621. break;
  9622. default:
  9623. reader.field(tag, message);
  9624. break;
  9625. }
  9626. }
  9627. return message;
  9628. }
  9629. };
  9630. CoreML.Specification.BiasLayerParams.prototype.bias = null;
  9631. CoreML.Specification.ScaleLayerParams = class ScaleLayerParams {
  9632. constructor() {
  9633. this.shapeScale = [];
  9634. this.shapeBias = [];
  9635. }
  9636. static decode(reader, length) {
  9637. const message = new CoreML.Specification.ScaleLayerParams();
  9638. const end = length === undefined ? reader.length : reader.position + length;
  9639. while (reader.position < end) {
  9640. const tag = reader.uint32();
  9641. switch (tag >>> 3) {
  9642. case 1:
  9643. message.shapeScale = reader.array(message.shapeScale, () => reader.uint64(), tag);
  9644. break;
  9645. case 2:
  9646. message.scale = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  9647. break;
  9648. case 3:
  9649. message.hasBias = reader.bool();
  9650. break;
  9651. case 4:
  9652. message.shapeBias = reader.array(message.shapeBias, () => reader.uint64(), tag);
  9653. break;
  9654. case 5:
  9655. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  9656. break;
  9657. default:
  9658. reader.skipType(tag & 7);
  9659. break;
  9660. }
  9661. }
  9662. return message;
  9663. }
  9664. static decodeText(reader) {
  9665. const message = new CoreML.Specification.ScaleLayerParams();
  9666. reader.start();
  9667. while (!reader.end()) {
  9668. const tag = reader.tag();
  9669. switch (tag) {
  9670. case "shapeScale":
  9671. reader.array(message.shapeScale, () => reader.uint64());
  9672. break;
  9673. case "scale":
  9674. message.scale = CoreML.Specification.WeightParams.decodeText(reader);
  9675. break;
  9676. case "hasBias":
  9677. message.hasBias = reader.bool();
  9678. break;
  9679. case "shapeBias":
  9680. reader.array(message.shapeBias, () => reader.uint64());
  9681. break;
  9682. case "bias":
  9683. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  9684. break;
  9685. default:
  9686. reader.field(tag, message);
  9687. break;
  9688. }
  9689. }
  9690. return message;
  9691. }
  9692. };
  9693. CoreML.Specification.ScaleLayerParams.prototype.scale = null;
  9694. CoreML.Specification.ScaleLayerParams.prototype.hasBias = false;
  9695. CoreML.Specification.ScaleLayerParams.prototype.bias = null;
  9696. CoreML.Specification.LoadConstantLayerParams = class LoadConstantLayerParams {
  9697. constructor() {
  9698. this.shape = [];
  9699. }
  9700. static decode(reader, length) {
  9701. const message = new CoreML.Specification.LoadConstantLayerParams();
  9702. const end = length === undefined ? reader.length : reader.position + length;
  9703. while (reader.position < end) {
  9704. const tag = reader.uint32();
  9705. switch (tag >>> 3) {
  9706. case 1:
  9707. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  9708. break;
  9709. case 2:
  9710. message.data = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  9711. break;
  9712. default:
  9713. reader.skipType(tag & 7);
  9714. break;
  9715. }
  9716. }
  9717. return message;
  9718. }
  9719. static decodeText(reader) {
  9720. const message = new CoreML.Specification.LoadConstantLayerParams();
  9721. reader.start();
  9722. while (!reader.end()) {
  9723. const tag = reader.tag();
  9724. switch (tag) {
  9725. case "shape":
  9726. reader.array(message.shape, () => reader.uint64());
  9727. break;
  9728. case "data":
  9729. message.data = CoreML.Specification.WeightParams.decodeText(reader);
  9730. break;
  9731. default:
  9732. reader.field(tag, message);
  9733. break;
  9734. }
  9735. }
  9736. return message;
  9737. }
  9738. };
  9739. CoreML.Specification.LoadConstantLayerParams.prototype.data = null;
  9740. CoreML.Specification.L2NormalizeLayerParams = class L2NormalizeLayerParams {
  9741. static decode(reader, length) {
  9742. const message = new CoreML.Specification.L2NormalizeLayerParams();
  9743. const end = length === undefined ? reader.length : reader.position + length;
  9744. while (reader.position < end) {
  9745. const tag = reader.uint32();
  9746. switch (tag >>> 3) {
  9747. case 1:
  9748. message.epsilon = reader.float();
  9749. break;
  9750. default:
  9751. reader.skipType(tag & 7);
  9752. break;
  9753. }
  9754. }
  9755. return message;
  9756. }
  9757. static decodeText(reader) {
  9758. const message = new CoreML.Specification.L2NormalizeLayerParams();
  9759. reader.start();
  9760. while (!reader.end()) {
  9761. const tag = reader.tag();
  9762. switch (tag) {
  9763. case "epsilon":
  9764. message.epsilon = reader.float();
  9765. break;
  9766. default:
  9767. reader.field(tag, message);
  9768. break;
  9769. }
  9770. }
  9771. return message;
  9772. }
  9773. };
  9774. CoreML.Specification.L2NormalizeLayerParams.prototype.epsilon = 0;
  9775. CoreML.Specification.FlattenLayerParams = class FlattenLayerParams {
  9776. static decode(reader, length) {
  9777. const message = new CoreML.Specification.FlattenLayerParams();
  9778. const end = length === undefined ? reader.length : reader.position + length;
  9779. while (reader.position < end) {
  9780. const tag = reader.uint32();
  9781. switch (tag >>> 3) {
  9782. case 1:
  9783. message.mode = reader.int32();
  9784. break;
  9785. default:
  9786. reader.skipType(tag & 7);
  9787. break;
  9788. }
  9789. }
  9790. return message;
  9791. }
  9792. static decodeText(reader) {
  9793. const message = new CoreML.Specification.FlattenLayerParams();
  9794. reader.start();
  9795. while (!reader.end()) {
  9796. const tag = reader.tag();
  9797. switch (tag) {
  9798. case "mode":
  9799. message.mode = reader.enum(CoreML.Specification.FlattenLayerParams.FlattenOrder);
  9800. break;
  9801. default:
  9802. reader.field(tag, message);
  9803. break;
  9804. }
  9805. }
  9806. return message;
  9807. }
  9808. };
  9809. CoreML.Specification.FlattenLayerParams.prototype.mode = 0;
  9810. CoreML.Specification.FlattenLayerParams.FlattenOrder = {
  9811. "CHANNEL_FIRST": 0,
  9812. "CHANNEL_LAST": 1
  9813. };
  9814. CoreML.Specification.ReshapeLayerParams = class ReshapeLayerParams {
  9815. constructor() {
  9816. this.targetShape = [];
  9817. }
  9818. static decode(reader, length) {
  9819. const message = new CoreML.Specification.ReshapeLayerParams();
  9820. const end = length === undefined ? reader.length : reader.position + length;
  9821. while (reader.position < end) {
  9822. const tag = reader.uint32();
  9823. switch (tag >>> 3) {
  9824. case 1:
  9825. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  9826. break;
  9827. case 2:
  9828. message.mode = reader.int32();
  9829. break;
  9830. default:
  9831. reader.skipType(tag & 7);
  9832. break;
  9833. }
  9834. }
  9835. return message;
  9836. }
  9837. static decodeText(reader) {
  9838. const message = new CoreML.Specification.ReshapeLayerParams();
  9839. reader.start();
  9840. while (!reader.end()) {
  9841. const tag = reader.tag();
  9842. switch (tag) {
  9843. case "targetShape":
  9844. reader.array(message.targetShape, () => reader.int64());
  9845. break;
  9846. case "mode":
  9847. message.mode = reader.enum(CoreML.Specification.ReshapeLayerParams.ReshapeOrder);
  9848. break;
  9849. default:
  9850. reader.field(tag, message);
  9851. break;
  9852. }
  9853. }
  9854. return message;
  9855. }
  9856. };
  9857. CoreML.Specification.ReshapeLayerParams.prototype.mode = 0;
  9858. CoreML.Specification.ReshapeLayerParams.ReshapeOrder = {
  9859. "CHANNEL_FIRST": 0,
  9860. "CHANNEL_LAST": 1
  9861. };
  9862. CoreML.Specification.PermuteLayerParams = class PermuteLayerParams {
  9863. constructor() {
  9864. this.axis = [];
  9865. }
  9866. static decode(reader, length) {
  9867. const message = new CoreML.Specification.PermuteLayerParams();
  9868. const end = length === undefined ? reader.length : reader.position + length;
  9869. while (reader.position < end) {
  9870. const tag = reader.uint32();
  9871. switch (tag >>> 3) {
  9872. case 1:
  9873. message.axis = reader.array(message.axis, () => reader.uint64(), tag);
  9874. break;
  9875. default:
  9876. reader.skipType(tag & 7);
  9877. break;
  9878. }
  9879. }
  9880. return message;
  9881. }
  9882. static decodeText(reader) {
  9883. const message = new CoreML.Specification.PermuteLayerParams();
  9884. reader.start();
  9885. while (!reader.end()) {
  9886. const tag = reader.tag();
  9887. switch (tag) {
  9888. case "axis":
  9889. reader.array(message.axis, () => reader.uint64());
  9890. break;
  9891. default:
  9892. reader.field(tag, message);
  9893. break;
  9894. }
  9895. }
  9896. return message;
  9897. }
  9898. };
  9899. CoreML.Specification.ReorganizeDataLayerParams = class ReorganizeDataLayerParams {
  9900. static decode(reader, length) {
  9901. const message = new CoreML.Specification.ReorganizeDataLayerParams();
  9902. const end = length === undefined ? reader.length : reader.position + length;
  9903. while (reader.position < end) {
  9904. const tag = reader.uint32();
  9905. switch (tag >>> 3) {
  9906. case 1:
  9907. message.mode = reader.int32();
  9908. break;
  9909. case 2:
  9910. message.blockSize = reader.uint64();
  9911. break;
  9912. default:
  9913. reader.skipType(tag & 7);
  9914. break;
  9915. }
  9916. }
  9917. return message;
  9918. }
  9919. static decodeText(reader) {
  9920. const message = new CoreML.Specification.ReorganizeDataLayerParams();
  9921. reader.start();
  9922. while (!reader.end()) {
  9923. const tag = reader.tag();
  9924. switch (tag) {
  9925. case "mode":
  9926. message.mode = reader.enum(CoreML.Specification.ReorganizeDataLayerParams.ReorganizationType);
  9927. break;
  9928. case "blockSize":
  9929. message.blockSize = reader.uint64();
  9930. break;
  9931. default:
  9932. reader.field(tag, message);
  9933. break;
  9934. }
  9935. }
  9936. return message;
  9937. }
  9938. };
  9939. CoreML.Specification.ReorganizeDataLayerParams.prototype.mode = 0;
  9940. CoreML.Specification.ReorganizeDataLayerParams.prototype.blockSize = 0n;
  9941. CoreML.Specification.ReorganizeDataLayerParams.ReorganizationType = {
  9942. "SPACE_TO_DEPTH": 0,
  9943. "DEPTH_TO_SPACE": 1,
  9944. "PIXEL_SHUFFLE": 2
  9945. };
  9946. CoreML.Specification.SliceLayerParams = class SliceLayerParams {
  9947. static decode(reader, length) {
  9948. const message = new CoreML.Specification.SliceLayerParams();
  9949. const end = length === undefined ? reader.length : reader.position + length;
  9950. while (reader.position < end) {
  9951. const tag = reader.uint32();
  9952. switch (tag >>> 3) {
  9953. case 1:
  9954. message.startIndex = reader.int64();
  9955. break;
  9956. case 2:
  9957. message.endIndex = reader.int64();
  9958. break;
  9959. case 3:
  9960. message.stride = reader.uint64();
  9961. break;
  9962. case 4:
  9963. message.axis = reader.int32();
  9964. break;
  9965. default:
  9966. reader.skipType(tag & 7);
  9967. break;
  9968. }
  9969. }
  9970. return message;
  9971. }
  9972. static decodeText(reader) {
  9973. const message = new CoreML.Specification.SliceLayerParams();
  9974. reader.start();
  9975. while (!reader.end()) {
  9976. const tag = reader.tag();
  9977. switch (tag) {
  9978. case "startIndex":
  9979. message.startIndex = reader.int64();
  9980. break;
  9981. case "endIndex":
  9982. message.endIndex = reader.int64();
  9983. break;
  9984. case "stride":
  9985. message.stride = reader.uint64();
  9986. break;
  9987. case "axis":
  9988. message.axis = reader.enum(CoreML.Specification.SliceLayerParams.SliceAxis);
  9989. break;
  9990. default:
  9991. reader.field(tag, message);
  9992. break;
  9993. }
  9994. }
  9995. return message;
  9996. }
  9997. };
  9998. CoreML.Specification.SliceLayerParams.prototype.startIndex = 0n;
  9999. CoreML.Specification.SliceLayerParams.prototype.endIndex = 0n;
  10000. CoreML.Specification.SliceLayerParams.prototype.stride = 0n;
  10001. CoreML.Specification.SliceLayerParams.prototype.axis = 0;
  10002. CoreML.Specification.SliceLayerParams.SliceAxis = {
  10003. "CHANNEL_AXIS": 0,
  10004. "HEIGHT_AXIS": 1,
  10005. "WIDTH_AXIS": 2
  10006. };
  10007. CoreML.Specification.ReduceLayerParams = class ReduceLayerParams {
  10008. static decode(reader, length) {
  10009. const message = new CoreML.Specification.ReduceLayerParams();
  10010. const end = length === undefined ? reader.length : reader.position + length;
  10011. while (reader.position < end) {
  10012. const tag = reader.uint32();
  10013. switch (tag >>> 3) {
  10014. case 1:
  10015. message.mode = reader.int32();
  10016. break;
  10017. case 2:
  10018. message.epsilon = reader.float();
  10019. break;
  10020. case 3:
  10021. message.axis = reader.int32();
  10022. break;
  10023. default:
  10024. reader.skipType(tag & 7);
  10025. break;
  10026. }
  10027. }
  10028. return message;
  10029. }
  10030. static decodeText(reader) {
  10031. const message = new CoreML.Specification.ReduceLayerParams();
  10032. reader.start();
  10033. while (!reader.end()) {
  10034. const tag = reader.tag();
  10035. switch (tag) {
  10036. case "mode":
  10037. message.mode = reader.enum(CoreML.Specification.ReduceLayerParams.ReduceOperation);
  10038. break;
  10039. case "epsilon":
  10040. message.epsilon = reader.float();
  10041. break;
  10042. case "axis":
  10043. message.axis = reader.enum(CoreML.Specification.ReduceLayerParams.ReduceAxis);
  10044. break;
  10045. default:
  10046. reader.field(tag, message);
  10047. break;
  10048. }
  10049. }
  10050. return message;
  10051. }
  10052. };
  10053. CoreML.Specification.ReduceLayerParams.prototype.mode = 0;
  10054. CoreML.Specification.ReduceLayerParams.prototype.epsilon = 0;
  10055. CoreML.Specification.ReduceLayerParams.prototype.axis = 0;
  10056. CoreML.Specification.ReduceLayerParams.ReduceOperation = {
  10057. "SUM": 0,
  10058. "AVG": 1,
  10059. "PROD": 2,
  10060. "LOGSUM": 3,
  10061. "SUMSQUARE": 4,
  10062. "L1": 5,
  10063. "L2": 6,
  10064. "MAX": 7,
  10065. "MIN": 8,
  10066. "ARGMAX": 9
  10067. };
  10068. CoreML.Specification.ReduceLayerParams.ReduceAxis = {
  10069. "CHW": 0,
  10070. "HW": 1,
  10071. "C": 2,
  10072. "H": 3,
  10073. "W": 4
  10074. };
  10075. CoreML.Specification.CropLayerParams = class CropLayerParams {
  10076. constructor() {
  10077. this.offset = [];
  10078. }
  10079. static decode(reader, length) {
  10080. const message = new CoreML.Specification.CropLayerParams();
  10081. const end = length === undefined ? reader.length : reader.position + length;
  10082. while (reader.position < end) {
  10083. const tag = reader.uint32();
  10084. switch (tag >>> 3) {
  10085. case 1:
  10086. message.cropAmounts = CoreML.Specification.BorderAmounts.decode(reader, reader.uint32());
  10087. break;
  10088. case 5:
  10089. message.offset = reader.array(message.offset, () => reader.uint64(), tag);
  10090. break;
  10091. default:
  10092. reader.skipType(tag & 7);
  10093. break;
  10094. }
  10095. }
  10096. return message;
  10097. }
  10098. static decodeText(reader) {
  10099. const message = new CoreML.Specification.CropLayerParams();
  10100. reader.start();
  10101. while (!reader.end()) {
  10102. const tag = reader.tag();
  10103. switch (tag) {
  10104. case "cropAmounts":
  10105. message.cropAmounts = CoreML.Specification.BorderAmounts.decodeText(reader);
  10106. break;
  10107. case "offset":
  10108. reader.array(message.offset, () => reader.uint64());
  10109. break;
  10110. default:
  10111. reader.field(tag, message);
  10112. break;
  10113. }
  10114. }
  10115. return message;
  10116. }
  10117. };
  10118. CoreML.Specification.CropLayerParams.prototype.cropAmounts = null;
  10119. CoreML.Specification.AverageLayerParams = class AverageLayerParams {
  10120. static decode(reader, length) {
  10121. const message = new CoreML.Specification.AverageLayerParams();
  10122. const end = length === undefined ? reader.length : reader.position + length;
  10123. while (reader.position < end) {
  10124. const tag = reader.uint32();
  10125. switch (tag >>> 3) {
  10126. default:
  10127. reader.skipType(tag & 7);
  10128. break;
  10129. }
  10130. }
  10131. return message;
  10132. }
  10133. static decodeText(reader) {
  10134. const message = new CoreML.Specification.AverageLayerParams();
  10135. reader.start();
  10136. while (!reader.end()) {
  10137. const tag = reader.tag();
  10138. switch (tag) {
  10139. default:
  10140. reader.field(tag, message);
  10141. break;
  10142. }
  10143. }
  10144. return message;
  10145. }
  10146. };
  10147. CoreML.Specification.MaxLayerParams = class MaxLayerParams {
  10148. static decode(reader, length) {
  10149. const message = new CoreML.Specification.MaxLayerParams();
  10150. const end = length === undefined ? reader.length : reader.position + length;
  10151. while (reader.position < end) {
  10152. const tag = reader.uint32();
  10153. switch (tag >>> 3) {
  10154. default:
  10155. reader.skipType(tag & 7);
  10156. break;
  10157. }
  10158. }
  10159. return message;
  10160. }
  10161. static decodeText(reader) {
  10162. const message = new CoreML.Specification.MaxLayerParams();
  10163. reader.start();
  10164. while (!reader.end()) {
  10165. const tag = reader.tag();
  10166. switch (tag) {
  10167. default:
  10168. reader.field(tag, message);
  10169. break;
  10170. }
  10171. }
  10172. return message;
  10173. }
  10174. };
  10175. CoreML.Specification.MinLayerParams = class MinLayerParams {
  10176. static decode(reader, length) {
  10177. const message = new CoreML.Specification.MinLayerParams();
  10178. const end = length === undefined ? reader.length : reader.position + length;
  10179. while (reader.position < end) {
  10180. const tag = reader.uint32();
  10181. switch (tag >>> 3) {
  10182. default:
  10183. reader.skipType(tag & 7);
  10184. break;
  10185. }
  10186. }
  10187. return message;
  10188. }
  10189. static decodeText(reader) {
  10190. const message = new CoreML.Specification.MinLayerParams();
  10191. reader.start();
  10192. while (!reader.end()) {
  10193. const tag = reader.tag();
  10194. switch (tag) {
  10195. default:
  10196. reader.field(tag, message);
  10197. break;
  10198. }
  10199. }
  10200. return message;
  10201. }
  10202. };
  10203. CoreML.Specification.DotProductLayerParams = class DotProductLayerParams {
  10204. static decode(reader, length) {
  10205. const message = new CoreML.Specification.DotProductLayerParams();
  10206. const end = length === undefined ? reader.length : reader.position + length;
  10207. while (reader.position < end) {
  10208. const tag = reader.uint32();
  10209. switch (tag >>> 3) {
  10210. case 1:
  10211. message.cosineSimilarity = reader.bool();
  10212. break;
  10213. default:
  10214. reader.skipType(tag & 7);
  10215. break;
  10216. }
  10217. }
  10218. return message;
  10219. }
  10220. static decodeText(reader) {
  10221. const message = new CoreML.Specification.DotProductLayerParams();
  10222. reader.start();
  10223. while (!reader.end()) {
  10224. const tag = reader.tag();
  10225. switch (tag) {
  10226. case "cosineSimilarity":
  10227. message.cosineSimilarity = reader.bool();
  10228. break;
  10229. default:
  10230. reader.field(tag, message);
  10231. break;
  10232. }
  10233. }
  10234. return message;
  10235. }
  10236. };
  10237. CoreML.Specification.DotProductLayerParams.prototype.cosineSimilarity = false;
  10238. CoreML.Specification.MeanVarianceNormalizeLayerParams = class MeanVarianceNormalizeLayerParams {
  10239. static decode(reader, length) {
  10240. const message = new CoreML.Specification.MeanVarianceNormalizeLayerParams();
  10241. const end = length === undefined ? reader.length : reader.position + length;
  10242. while (reader.position < end) {
  10243. const tag = reader.uint32();
  10244. switch (tag >>> 3) {
  10245. case 1:
  10246. message.acrossChannels = reader.bool();
  10247. break;
  10248. case 2:
  10249. message.normalizeVariance = reader.bool();
  10250. break;
  10251. case 3:
  10252. message.epsilon = reader.float();
  10253. break;
  10254. default:
  10255. reader.skipType(tag & 7);
  10256. break;
  10257. }
  10258. }
  10259. return message;
  10260. }
  10261. static decodeText(reader) {
  10262. const message = new CoreML.Specification.MeanVarianceNormalizeLayerParams();
  10263. reader.start();
  10264. while (!reader.end()) {
  10265. const tag = reader.tag();
  10266. switch (tag) {
  10267. case "acrossChannels":
  10268. message.acrossChannels = reader.bool();
  10269. break;
  10270. case "normalizeVariance":
  10271. message.normalizeVariance = reader.bool();
  10272. break;
  10273. case "epsilon":
  10274. message.epsilon = reader.float();
  10275. break;
  10276. default:
  10277. reader.field(tag, message);
  10278. break;
  10279. }
  10280. }
  10281. return message;
  10282. }
  10283. };
  10284. CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.acrossChannels = false;
  10285. CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.normalizeVariance = false;
  10286. CoreML.Specification.MeanVarianceNormalizeLayerParams.prototype.epsilon = 0;
  10287. CoreML.Specification.SequenceRepeatLayerParams = class SequenceRepeatLayerParams {
  10288. static decode(reader, length) {
  10289. const message = new CoreML.Specification.SequenceRepeatLayerParams();
  10290. const end = length === undefined ? reader.length : reader.position + length;
  10291. while (reader.position < end) {
  10292. const tag = reader.uint32();
  10293. switch (tag >>> 3) {
  10294. case 1:
  10295. message.nRepetitions = reader.uint64();
  10296. break;
  10297. default:
  10298. reader.skipType(tag & 7);
  10299. break;
  10300. }
  10301. }
  10302. return message;
  10303. }
  10304. static decodeText(reader) {
  10305. const message = new CoreML.Specification.SequenceRepeatLayerParams();
  10306. reader.start();
  10307. while (!reader.end()) {
  10308. const tag = reader.tag();
  10309. switch (tag) {
  10310. case "nRepetitions":
  10311. message.nRepetitions = reader.uint64();
  10312. break;
  10313. default:
  10314. reader.field(tag, message);
  10315. break;
  10316. }
  10317. }
  10318. return message;
  10319. }
  10320. };
  10321. CoreML.Specification.SequenceRepeatLayerParams.prototype.nRepetitions = 0n;
  10322. CoreML.Specification.SimpleRecurrentLayerParams = class SimpleRecurrentLayerParams {
  10323. static decode(reader, length) {
  10324. const message = new CoreML.Specification.SimpleRecurrentLayerParams();
  10325. const end = length === undefined ? reader.length : reader.position + length;
  10326. while (reader.position < end) {
  10327. const tag = reader.uint32();
  10328. switch (tag >>> 3) {
  10329. case 1:
  10330. message.inputVectorSize = reader.uint64();
  10331. break;
  10332. case 2:
  10333. message.outputVectorSize = reader.uint64();
  10334. break;
  10335. case 10:
  10336. message.activation = CoreML.Specification.ActivationParams.decode(reader, reader.uint32());
  10337. break;
  10338. case 15:
  10339. message.sequenceOutput = reader.bool();
  10340. break;
  10341. case 20:
  10342. message.hasBiasVector = reader.bool();
  10343. break;
  10344. case 30:
  10345. message.weightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10346. break;
  10347. case 31:
  10348. message.recursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10349. break;
  10350. case 32:
  10351. message.biasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10352. break;
  10353. case 100:
  10354. message.reverseInput = reader.bool();
  10355. break;
  10356. default:
  10357. reader.skipType(tag & 7);
  10358. break;
  10359. }
  10360. }
  10361. return message;
  10362. }
  10363. static decodeText(reader) {
  10364. const message = new CoreML.Specification.SimpleRecurrentLayerParams();
  10365. reader.start();
  10366. while (!reader.end()) {
  10367. const tag = reader.tag();
  10368. switch (tag) {
  10369. case "inputVectorSize":
  10370. message.inputVectorSize = reader.uint64();
  10371. break;
  10372. case "outputVectorSize":
  10373. message.outputVectorSize = reader.uint64();
  10374. break;
  10375. case "activation":
  10376. message.activation = CoreML.Specification.ActivationParams.decodeText(reader);
  10377. break;
  10378. case "sequenceOutput":
  10379. message.sequenceOutput = reader.bool();
  10380. break;
  10381. case "hasBiasVector":
  10382. message.hasBiasVector = reader.bool();
  10383. break;
  10384. case "weightMatrix":
  10385. message.weightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10386. break;
  10387. case "recursionMatrix":
  10388. message.recursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10389. break;
  10390. case "biasVector":
  10391. message.biasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10392. break;
  10393. case "reverseInput":
  10394. message.reverseInput = reader.bool();
  10395. break;
  10396. default:
  10397. reader.field(tag, message);
  10398. break;
  10399. }
  10400. }
  10401. return message;
  10402. }
  10403. };
  10404. CoreML.Specification.SimpleRecurrentLayerParams.prototype.inputVectorSize = 0n;
  10405. CoreML.Specification.SimpleRecurrentLayerParams.prototype.outputVectorSize = 0n;
  10406. CoreML.Specification.SimpleRecurrentLayerParams.prototype.activation = null;
  10407. CoreML.Specification.SimpleRecurrentLayerParams.prototype.sequenceOutput = false;
  10408. CoreML.Specification.SimpleRecurrentLayerParams.prototype.hasBiasVector = false;
  10409. CoreML.Specification.SimpleRecurrentLayerParams.prototype.weightMatrix = null;
  10410. CoreML.Specification.SimpleRecurrentLayerParams.prototype.recursionMatrix = null;
  10411. CoreML.Specification.SimpleRecurrentLayerParams.prototype.biasVector = null;
  10412. CoreML.Specification.SimpleRecurrentLayerParams.prototype.reverseInput = false;
  10413. CoreML.Specification.GRULayerParams = class GRULayerParams {
  10414. constructor() {
  10415. this.activations = [];
  10416. }
  10417. static decode(reader, length) {
  10418. const message = new CoreML.Specification.GRULayerParams();
  10419. const end = length === undefined ? reader.length : reader.position + length;
  10420. while (reader.position < end) {
  10421. const tag = reader.uint32();
  10422. switch (tag >>> 3) {
  10423. case 1:
  10424. message.inputVectorSize = reader.uint64();
  10425. break;
  10426. case 2:
  10427. message.outputVectorSize = reader.uint64();
  10428. break;
  10429. case 10:
  10430. message.activations.push(CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  10431. break;
  10432. case 15:
  10433. message.sequenceOutput = reader.bool();
  10434. break;
  10435. case 20:
  10436. message.hasBiasVectors = reader.bool();
  10437. break;
  10438. case 30:
  10439. message.updateGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10440. break;
  10441. case 31:
  10442. message.resetGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10443. break;
  10444. case 32:
  10445. message.outputGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10446. break;
  10447. case 50:
  10448. message.updateGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10449. break;
  10450. case 51:
  10451. message.resetGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10452. break;
  10453. case 52:
  10454. message.outputGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10455. break;
  10456. case 70:
  10457. message.updateGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10458. break;
  10459. case 71:
  10460. message.resetGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10461. break;
  10462. case 72:
  10463. message.outputGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10464. break;
  10465. case 100:
  10466. message.reverseInput = reader.bool();
  10467. break;
  10468. default:
  10469. reader.skipType(tag & 7);
  10470. break;
  10471. }
  10472. }
  10473. return message;
  10474. }
  10475. static decodeText(reader) {
  10476. const message = new CoreML.Specification.GRULayerParams();
  10477. reader.start();
  10478. while (!reader.end()) {
  10479. const tag = reader.tag();
  10480. switch (tag) {
  10481. case "inputVectorSize":
  10482. message.inputVectorSize = reader.uint64();
  10483. break;
  10484. case "outputVectorSize":
  10485. message.outputVectorSize = reader.uint64();
  10486. break;
  10487. case "activations":
  10488. message.activations.push(CoreML.Specification.ActivationParams.decodeText(reader));
  10489. break;
  10490. case "sequenceOutput":
  10491. message.sequenceOutput = reader.bool();
  10492. break;
  10493. case "hasBiasVectors":
  10494. message.hasBiasVectors = reader.bool();
  10495. break;
  10496. case "updateGateWeightMatrix":
  10497. message.updateGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10498. break;
  10499. case "resetGateWeightMatrix":
  10500. message.resetGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10501. break;
  10502. case "outputGateWeightMatrix":
  10503. message.outputGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10504. break;
  10505. case "updateGateRecursionMatrix":
  10506. message.updateGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10507. break;
  10508. case "resetGateRecursionMatrix":
  10509. message.resetGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10510. break;
  10511. case "outputGateRecursionMatrix":
  10512. message.outputGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10513. break;
  10514. case "updateGateBiasVector":
  10515. message.updateGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10516. break;
  10517. case "resetGateBiasVector":
  10518. message.resetGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10519. break;
  10520. case "outputGateBiasVector":
  10521. message.outputGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10522. break;
  10523. case "reverseInput":
  10524. message.reverseInput = reader.bool();
  10525. break;
  10526. default:
  10527. reader.field(tag, message);
  10528. break;
  10529. }
  10530. }
  10531. return message;
  10532. }
  10533. };
  10534. CoreML.Specification.GRULayerParams.prototype.inputVectorSize = 0n;
  10535. CoreML.Specification.GRULayerParams.prototype.outputVectorSize = 0n;
  10536. CoreML.Specification.GRULayerParams.prototype.sequenceOutput = false;
  10537. CoreML.Specification.GRULayerParams.prototype.hasBiasVectors = false;
  10538. CoreML.Specification.GRULayerParams.prototype.updateGateWeightMatrix = null;
  10539. CoreML.Specification.GRULayerParams.prototype.resetGateWeightMatrix = null;
  10540. CoreML.Specification.GRULayerParams.prototype.outputGateWeightMatrix = null;
  10541. CoreML.Specification.GRULayerParams.prototype.updateGateRecursionMatrix = null;
  10542. CoreML.Specification.GRULayerParams.prototype.resetGateRecursionMatrix = null;
  10543. CoreML.Specification.GRULayerParams.prototype.outputGateRecursionMatrix = null;
  10544. CoreML.Specification.GRULayerParams.prototype.updateGateBiasVector = null;
  10545. CoreML.Specification.GRULayerParams.prototype.resetGateBiasVector = null;
  10546. CoreML.Specification.GRULayerParams.prototype.outputGateBiasVector = null;
  10547. CoreML.Specification.GRULayerParams.prototype.reverseInput = false;
  10548. CoreML.Specification.LSTMParams = class LSTMParams {
  10549. static decode(reader, length) {
  10550. const message = new CoreML.Specification.LSTMParams();
  10551. const end = length === undefined ? reader.length : reader.position + length;
  10552. while (reader.position < end) {
  10553. const tag = reader.uint32();
  10554. switch (tag >>> 3) {
  10555. case 10:
  10556. message.sequenceOutput = reader.bool();
  10557. break;
  10558. case 20:
  10559. message.hasBiasVectors = reader.bool();
  10560. break;
  10561. case 30:
  10562. message.forgetBias = reader.bool();
  10563. break;
  10564. case 40:
  10565. message.hasPeepholeVectors = reader.bool();
  10566. break;
  10567. case 50:
  10568. message.coupledInputAndForgetGate = reader.bool();
  10569. break;
  10570. case 60:
  10571. message.cellClipThreshold = reader.float();
  10572. break;
  10573. default:
  10574. reader.skipType(tag & 7);
  10575. break;
  10576. }
  10577. }
  10578. return message;
  10579. }
  10580. static decodeText(reader) {
  10581. const message = new CoreML.Specification.LSTMParams();
  10582. reader.start();
  10583. while (!reader.end()) {
  10584. const tag = reader.tag();
  10585. switch (tag) {
  10586. case "sequenceOutput":
  10587. message.sequenceOutput = reader.bool();
  10588. break;
  10589. case "hasBiasVectors":
  10590. message.hasBiasVectors = reader.bool();
  10591. break;
  10592. case "forgetBias":
  10593. message.forgetBias = reader.bool();
  10594. break;
  10595. case "hasPeepholeVectors":
  10596. message.hasPeepholeVectors = reader.bool();
  10597. break;
  10598. case "coupledInputAndForgetGate":
  10599. message.coupledInputAndForgetGate = reader.bool();
  10600. break;
  10601. case "cellClipThreshold":
  10602. message.cellClipThreshold = reader.float();
  10603. break;
  10604. default:
  10605. reader.field(tag, message);
  10606. break;
  10607. }
  10608. }
  10609. return message;
  10610. }
  10611. };
  10612. CoreML.Specification.LSTMParams.prototype.sequenceOutput = false;
  10613. CoreML.Specification.LSTMParams.prototype.hasBiasVectors = false;
  10614. CoreML.Specification.LSTMParams.prototype.forgetBias = false;
  10615. CoreML.Specification.LSTMParams.prototype.hasPeepholeVectors = false;
  10616. CoreML.Specification.LSTMParams.prototype.coupledInputAndForgetGate = false;
  10617. CoreML.Specification.LSTMParams.prototype.cellClipThreshold = 0;
  10618. CoreML.Specification.LSTMWeightParams = class LSTMWeightParams {
  10619. static decode(reader, length) {
  10620. const message = new CoreML.Specification.LSTMWeightParams();
  10621. const end = length === undefined ? reader.length : reader.position + length;
  10622. while (reader.position < end) {
  10623. const tag = reader.uint32();
  10624. switch (tag >>> 3) {
  10625. case 1:
  10626. message.inputGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10627. break;
  10628. case 2:
  10629. message.forgetGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10630. break;
  10631. case 3:
  10632. message.blockInputWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10633. break;
  10634. case 4:
  10635. message.outputGateWeightMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10636. break;
  10637. case 20:
  10638. message.inputGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10639. break;
  10640. case 21:
  10641. message.forgetGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10642. break;
  10643. case 22:
  10644. message.blockInputRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10645. break;
  10646. case 23:
  10647. message.outputGateRecursionMatrix = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10648. break;
  10649. case 40:
  10650. message.inputGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10651. break;
  10652. case 41:
  10653. message.forgetGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10654. break;
  10655. case 42:
  10656. message.blockInputBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10657. break;
  10658. case 43:
  10659. message.outputGateBiasVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10660. break;
  10661. case 60:
  10662. message.inputGatePeepholeVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10663. break;
  10664. case 61:
  10665. message.forgetGatePeepholeVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10666. break;
  10667. case 62:
  10668. message.outputGatePeepholeVector = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  10669. break;
  10670. default:
  10671. reader.skipType(tag & 7);
  10672. break;
  10673. }
  10674. }
  10675. return message;
  10676. }
  10677. static decodeText(reader) {
  10678. const message = new CoreML.Specification.LSTMWeightParams();
  10679. reader.start();
  10680. while (!reader.end()) {
  10681. const tag = reader.tag();
  10682. switch (tag) {
  10683. case "inputGateWeightMatrix":
  10684. message.inputGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10685. break;
  10686. case "forgetGateWeightMatrix":
  10687. message.forgetGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10688. break;
  10689. case "blockInputWeightMatrix":
  10690. message.blockInputWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10691. break;
  10692. case "outputGateWeightMatrix":
  10693. message.outputGateWeightMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10694. break;
  10695. case "inputGateRecursionMatrix":
  10696. message.inputGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10697. break;
  10698. case "forgetGateRecursionMatrix":
  10699. message.forgetGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10700. break;
  10701. case "blockInputRecursionMatrix":
  10702. message.blockInputRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10703. break;
  10704. case "outputGateRecursionMatrix":
  10705. message.outputGateRecursionMatrix = CoreML.Specification.WeightParams.decodeText(reader);
  10706. break;
  10707. case "inputGateBiasVector":
  10708. message.inputGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10709. break;
  10710. case "forgetGateBiasVector":
  10711. message.forgetGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10712. break;
  10713. case "blockInputBiasVector":
  10714. message.blockInputBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10715. break;
  10716. case "outputGateBiasVector":
  10717. message.outputGateBiasVector = CoreML.Specification.WeightParams.decodeText(reader);
  10718. break;
  10719. case "inputGatePeepholeVector":
  10720. message.inputGatePeepholeVector = CoreML.Specification.WeightParams.decodeText(reader);
  10721. break;
  10722. case "forgetGatePeepholeVector":
  10723. message.forgetGatePeepholeVector = CoreML.Specification.WeightParams.decodeText(reader);
  10724. break;
  10725. case "outputGatePeepholeVector":
  10726. message.outputGatePeepholeVector = CoreML.Specification.WeightParams.decodeText(reader);
  10727. break;
  10728. default:
  10729. reader.field(tag, message);
  10730. break;
  10731. }
  10732. }
  10733. return message;
  10734. }
  10735. };
  10736. CoreML.Specification.LSTMWeightParams.prototype.inputGateWeightMatrix = null;
  10737. CoreML.Specification.LSTMWeightParams.prototype.forgetGateWeightMatrix = null;
  10738. CoreML.Specification.LSTMWeightParams.prototype.blockInputWeightMatrix = null;
  10739. CoreML.Specification.LSTMWeightParams.prototype.outputGateWeightMatrix = null;
  10740. CoreML.Specification.LSTMWeightParams.prototype.inputGateRecursionMatrix = null;
  10741. CoreML.Specification.LSTMWeightParams.prototype.forgetGateRecursionMatrix = null;
  10742. CoreML.Specification.LSTMWeightParams.prototype.blockInputRecursionMatrix = null;
  10743. CoreML.Specification.LSTMWeightParams.prototype.outputGateRecursionMatrix = null;
  10744. CoreML.Specification.LSTMWeightParams.prototype.inputGateBiasVector = null;
  10745. CoreML.Specification.LSTMWeightParams.prototype.forgetGateBiasVector = null;
  10746. CoreML.Specification.LSTMWeightParams.prototype.blockInputBiasVector = null;
  10747. CoreML.Specification.LSTMWeightParams.prototype.outputGateBiasVector = null;
  10748. CoreML.Specification.LSTMWeightParams.prototype.inputGatePeepholeVector = null;
  10749. CoreML.Specification.LSTMWeightParams.prototype.forgetGatePeepholeVector = null;
  10750. CoreML.Specification.LSTMWeightParams.prototype.outputGatePeepholeVector = null;
  10751. CoreML.Specification.UniDirectionalLSTMLayerParams = class UniDirectionalLSTMLayerParams {
  10752. constructor() {
  10753. this.activations = [];
  10754. }
  10755. static decode(reader, length) {
  10756. const message = new CoreML.Specification.UniDirectionalLSTMLayerParams();
  10757. const end = length === undefined ? reader.length : reader.position + length;
  10758. while (reader.position < end) {
  10759. const tag = reader.uint32();
  10760. switch (tag >>> 3) {
  10761. case 1:
  10762. message.inputVectorSize = reader.uint64();
  10763. break;
  10764. case 2:
  10765. message.outputVectorSize = reader.uint64();
  10766. break;
  10767. case 10:
  10768. message.activations.push(CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  10769. break;
  10770. case 15:
  10771. message.params = CoreML.Specification.LSTMParams.decode(reader, reader.uint32());
  10772. break;
  10773. case 20:
  10774. message.weightParams = CoreML.Specification.LSTMWeightParams.decode(reader, reader.uint32());
  10775. break;
  10776. case 100:
  10777. message.reverseInput = reader.bool();
  10778. break;
  10779. default:
  10780. reader.skipType(tag & 7);
  10781. break;
  10782. }
  10783. }
  10784. return message;
  10785. }
  10786. static decodeText(reader) {
  10787. const message = new CoreML.Specification.UniDirectionalLSTMLayerParams();
  10788. reader.start();
  10789. while (!reader.end()) {
  10790. const tag = reader.tag();
  10791. switch (tag) {
  10792. case "inputVectorSize":
  10793. message.inputVectorSize = reader.uint64();
  10794. break;
  10795. case "outputVectorSize":
  10796. message.outputVectorSize = reader.uint64();
  10797. break;
  10798. case "activations":
  10799. message.activations.push(CoreML.Specification.ActivationParams.decodeText(reader));
  10800. break;
  10801. case "params":
  10802. message.params = CoreML.Specification.LSTMParams.decodeText(reader);
  10803. break;
  10804. case "weightParams":
  10805. message.weightParams = CoreML.Specification.LSTMWeightParams.decodeText(reader);
  10806. break;
  10807. case "reverseInput":
  10808. message.reverseInput = reader.bool();
  10809. break;
  10810. default:
  10811. reader.field(tag, message);
  10812. break;
  10813. }
  10814. }
  10815. return message;
  10816. }
  10817. };
  10818. CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.inputVectorSize = 0n;
  10819. CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.outputVectorSize = 0n;
  10820. CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.params = null;
  10821. CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.weightParams = null;
  10822. CoreML.Specification.UniDirectionalLSTMLayerParams.prototype.reverseInput = false;
  10823. CoreML.Specification.BiDirectionalLSTMLayerParams = class BiDirectionalLSTMLayerParams {
  10824. constructor() {
  10825. this.activationsForwardLSTM = [];
  10826. this.activationsBackwardLSTM = [];
  10827. this.weightParams = [];
  10828. }
  10829. static decode(reader, length) {
  10830. const message = new CoreML.Specification.BiDirectionalLSTMLayerParams();
  10831. const end = length === undefined ? reader.length : reader.position + length;
  10832. while (reader.position < end) {
  10833. const tag = reader.uint32();
  10834. switch (tag >>> 3) {
  10835. case 1:
  10836. message.inputVectorSize = reader.uint64();
  10837. break;
  10838. case 2:
  10839. message.outputVectorSize = reader.uint64();
  10840. break;
  10841. case 10:
  10842. message.activationsForwardLSTM.push(CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  10843. break;
  10844. case 11:
  10845. message.activationsBackwardLSTM.push(CoreML.Specification.ActivationParams.decode(reader, reader.uint32()));
  10846. break;
  10847. case 15:
  10848. message.params = CoreML.Specification.LSTMParams.decode(reader, reader.uint32());
  10849. break;
  10850. case 20:
  10851. message.weightParams.push(CoreML.Specification.LSTMWeightParams.decode(reader, reader.uint32()));
  10852. break;
  10853. default:
  10854. reader.skipType(tag & 7);
  10855. break;
  10856. }
  10857. }
  10858. return message;
  10859. }
  10860. static decodeText(reader) {
  10861. const message = new CoreML.Specification.BiDirectionalLSTMLayerParams();
  10862. reader.start();
  10863. while (!reader.end()) {
  10864. const tag = reader.tag();
  10865. switch (tag) {
  10866. case "inputVectorSize":
  10867. message.inputVectorSize = reader.uint64();
  10868. break;
  10869. case "outputVectorSize":
  10870. message.outputVectorSize = reader.uint64();
  10871. break;
  10872. case "activationsForwardLSTM":
  10873. message.activationsForwardLSTM.push(CoreML.Specification.ActivationParams.decodeText(reader));
  10874. break;
  10875. case "activationsBackwardLSTM":
  10876. message.activationsBackwardLSTM.push(CoreML.Specification.ActivationParams.decodeText(reader));
  10877. break;
  10878. case "params":
  10879. message.params = CoreML.Specification.LSTMParams.decodeText(reader);
  10880. break;
  10881. case "weightParams":
  10882. message.weightParams.push(CoreML.Specification.LSTMWeightParams.decodeText(reader));
  10883. break;
  10884. default:
  10885. reader.field(tag, message);
  10886. break;
  10887. }
  10888. }
  10889. return message;
  10890. }
  10891. };
  10892. CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.inputVectorSize = 0n;
  10893. CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.outputVectorSize = 0n;
  10894. CoreML.Specification.BiDirectionalLSTMLayerParams.prototype.params = null;
  10895. CoreML.Specification.CustomLayerParams = class CustomLayerParams {
  10896. constructor() {
  10897. this.weights = [];
  10898. this.parameters = {};
  10899. }
  10900. static decode(reader, length) {
  10901. const message = new CoreML.Specification.CustomLayerParams();
  10902. const end = length === undefined ? reader.length : reader.position + length;
  10903. while (reader.position < end) {
  10904. const tag = reader.uint32();
  10905. switch (tag >>> 3) {
  10906. case 10:
  10907. message.className = reader.string();
  10908. break;
  10909. case 20:
  10910. message.weights.push(CoreML.Specification.WeightParams.decode(reader, reader.uint32()));
  10911. break;
  10912. case 30:
  10913. reader.entry(message.parameters, () => reader.string(), () => CoreML.Specification.CustomLayerParams.CustomLayerParamValue.decode(reader, reader.uint32()));
  10914. break;
  10915. case 40:
  10916. message.description = reader.string();
  10917. break;
  10918. default:
  10919. reader.skipType(tag & 7);
  10920. break;
  10921. }
  10922. }
  10923. return message;
  10924. }
  10925. static decodeText(reader) {
  10926. const message = new CoreML.Specification.CustomLayerParams();
  10927. reader.start();
  10928. while (!reader.end()) {
  10929. const tag = reader.tag();
  10930. switch (tag) {
  10931. case "className":
  10932. message.className = reader.string();
  10933. break;
  10934. case "weights":
  10935. message.weights.push(CoreML.Specification.WeightParams.decodeText(reader));
  10936. break;
  10937. case "parameters":
  10938. reader.entry(message.parameters, () => reader.string(), () => CoreML.Specification.CustomLayerParams.CustomLayerParamValue.decodeText(reader));
  10939. break;
  10940. case "description":
  10941. message.description = reader.string();
  10942. break;
  10943. default:
  10944. reader.field(tag, message);
  10945. break;
  10946. }
  10947. }
  10948. return message;
  10949. }
  10950. };
  10951. CoreML.Specification.CustomLayerParams.prototype.className = "";
  10952. CoreML.Specification.CustomLayerParams.prototype.description = "";
  10953. CoreML.Specification.CustomLayerParams.CustomLayerParamValue = class CustomLayerParamValue {
  10954. get value() {
  10955. CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet = CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet || new Set(["doubleValue", "stringValue", "intValue", "longValue", "boolValue"]);
  10956. return Object.keys(this).find((key) => CoreML.Specification.CustomLayerParams.CustomLayerParamValue.valueSet.has(key) && this[key] !== null);
  10957. }
  10958. static decode(reader, length) {
  10959. const message = new CoreML.Specification.CustomLayerParams.CustomLayerParamValue();
  10960. const end = length === undefined ? reader.length : reader.position + length;
  10961. while (reader.position < end) {
  10962. const tag = reader.uint32();
  10963. switch (tag >>> 3) {
  10964. case 10:
  10965. message.doubleValue = reader.double();
  10966. break;
  10967. case 20:
  10968. message.stringValue = reader.string();
  10969. break;
  10970. case 30:
  10971. message.intValue = reader.int32();
  10972. break;
  10973. case 40:
  10974. message.longValue = reader.int64();
  10975. break;
  10976. case 50:
  10977. message.boolValue = reader.bool();
  10978. break;
  10979. default:
  10980. reader.skipType(tag & 7);
  10981. break;
  10982. }
  10983. }
  10984. return message;
  10985. }
  10986. static decodeText(reader) {
  10987. const message = new CoreML.Specification.CustomLayerParams.CustomLayerParamValue();
  10988. reader.start();
  10989. while (!reader.end()) {
  10990. const tag = reader.tag();
  10991. switch (tag) {
  10992. case "doubleValue":
  10993. message.doubleValue = reader.double();
  10994. break;
  10995. case "stringValue":
  10996. message.stringValue = reader.string();
  10997. break;
  10998. case "intValue":
  10999. message.intValue = reader.int32();
  11000. break;
  11001. case "longValue":
  11002. message.longValue = reader.int64();
  11003. break;
  11004. case "boolValue":
  11005. message.boolValue = reader.bool();
  11006. break;
  11007. default:
  11008. reader.field(tag, message);
  11009. break;
  11010. }
  11011. }
  11012. return message;
  11013. }
  11014. };
  11015. CoreML.Specification.TransposeLayerParams = class TransposeLayerParams {
  11016. constructor() {
  11017. this.axes = [];
  11018. }
  11019. static decode(reader, length) {
  11020. const message = new CoreML.Specification.TransposeLayerParams();
  11021. const end = length === undefined ? reader.length : reader.position + length;
  11022. while (reader.position < end) {
  11023. const tag = reader.uint32();
  11024. switch (tag >>> 3) {
  11025. case 1:
  11026. message.axes = reader.array(message.axes, () => reader.uint64(), tag);
  11027. break;
  11028. default:
  11029. reader.skipType(tag & 7);
  11030. break;
  11031. }
  11032. }
  11033. return message;
  11034. }
  11035. static decodeText(reader) {
  11036. const message = new CoreML.Specification.TransposeLayerParams();
  11037. reader.start();
  11038. while (!reader.end()) {
  11039. const tag = reader.tag();
  11040. switch (tag) {
  11041. case "axes":
  11042. reader.array(message.axes, () => reader.uint64());
  11043. break;
  11044. default:
  11045. reader.field(tag, message);
  11046. break;
  11047. }
  11048. }
  11049. return message;
  11050. }
  11051. };
  11052. CoreML.Specification.BatchedMatMulLayerParams = class BatchedMatMulLayerParams {
  11053. static decode(reader, length) {
  11054. const message = new CoreML.Specification.BatchedMatMulLayerParams();
  11055. const end = length === undefined ? reader.length : reader.position + length;
  11056. while (reader.position < end) {
  11057. const tag = reader.uint32();
  11058. switch (tag >>> 3) {
  11059. case 1:
  11060. message.transposeA = reader.bool();
  11061. break;
  11062. case 2:
  11063. message.transposeB = reader.bool();
  11064. break;
  11065. case 5:
  11066. message.weightMatrixFirstDimension = reader.uint64();
  11067. break;
  11068. case 6:
  11069. message.weightMatrixSecondDimension = reader.uint64();
  11070. break;
  11071. case 7:
  11072. message.hasBias = reader.bool();
  11073. break;
  11074. case 8:
  11075. message.weights = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  11076. break;
  11077. case 9:
  11078. message.bias = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  11079. break;
  11080. case 10:
  11081. message.int8DynamicQuantize = reader.bool();
  11082. break;
  11083. default:
  11084. reader.skipType(tag & 7);
  11085. break;
  11086. }
  11087. }
  11088. return message;
  11089. }
  11090. static decodeText(reader) {
  11091. const message = new CoreML.Specification.BatchedMatMulLayerParams();
  11092. reader.start();
  11093. while (!reader.end()) {
  11094. const tag = reader.tag();
  11095. switch (tag) {
  11096. case "transposeA":
  11097. message.transposeA = reader.bool();
  11098. break;
  11099. case "transposeB":
  11100. message.transposeB = reader.bool();
  11101. break;
  11102. case "weightMatrixFirstDimension":
  11103. message.weightMatrixFirstDimension = reader.uint64();
  11104. break;
  11105. case "weightMatrixSecondDimension":
  11106. message.weightMatrixSecondDimension = reader.uint64();
  11107. break;
  11108. case "hasBias":
  11109. message.hasBias = reader.bool();
  11110. break;
  11111. case "weights":
  11112. message.weights = CoreML.Specification.WeightParams.decodeText(reader);
  11113. break;
  11114. case "bias":
  11115. message.bias = CoreML.Specification.WeightParams.decodeText(reader);
  11116. break;
  11117. case "int8DynamicQuantize":
  11118. message.int8DynamicQuantize = reader.bool();
  11119. break;
  11120. default:
  11121. reader.field(tag, message);
  11122. break;
  11123. }
  11124. }
  11125. return message;
  11126. }
  11127. };
  11128. CoreML.Specification.BatchedMatMulLayerParams.prototype.transposeA = false;
  11129. CoreML.Specification.BatchedMatMulLayerParams.prototype.transposeB = false;
  11130. CoreML.Specification.BatchedMatMulLayerParams.prototype.weightMatrixFirstDimension = 0n;
  11131. CoreML.Specification.BatchedMatMulLayerParams.prototype.weightMatrixSecondDimension = 0n;
  11132. CoreML.Specification.BatchedMatMulLayerParams.prototype.hasBias = false;
  11133. CoreML.Specification.BatchedMatMulLayerParams.prototype.weights = null;
  11134. CoreML.Specification.BatchedMatMulLayerParams.prototype.bias = null;
  11135. CoreML.Specification.BatchedMatMulLayerParams.prototype.int8DynamicQuantize = false;
  11136. CoreML.Specification.ConcatNDLayerParams = class ConcatNDLayerParams {
  11137. static decode(reader, length) {
  11138. const message = new CoreML.Specification.ConcatNDLayerParams();
  11139. const end = length === undefined ? reader.length : reader.position + length;
  11140. while (reader.position < end) {
  11141. const tag = reader.uint32();
  11142. switch (tag >>> 3) {
  11143. case 1:
  11144. message.axis = reader.int64();
  11145. break;
  11146. case 2:
  11147. message.interleave = reader.bool();
  11148. break;
  11149. default:
  11150. reader.skipType(tag & 7);
  11151. break;
  11152. }
  11153. }
  11154. return message;
  11155. }
  11156. static decodeText(reader) {
  11157. const message = new CoreML.Specification.ConcatNDLayerParams();
  11158. reader.start();
  11159. while (!reader.end()) {
  11160. const tag = reader.tag();
  11161. switch (tag) {
  11162. case "axis":
  11163. message.axis = reader.int64();
  11164. break;
  11165. case "interleave":
  11166. message.interleave = reader.bool();
  11167. break;
  11168. default:
  11169. reader.field(tag, message);
  11170. break;
  11171. }
  11172. }
  11173. return message;
  11174. }
  11175. };
  11176. CoreML.Specification.ConcatNDLayerParams.prototype.axis = 0n;
  11177. CoreML.Specification.ConcatNDLayerParams.prototype.interleave = false;
  11178. CoreML.Specification.SoftmaxNDLayerParams = class SoftmaxNDLayerParams {
  11179. static decode(reader, length) {
  11180. const message = new CoreML.Specification.SoftmaxNDLayerParams();
  11181. const end = length === undefined ? reader.length : reader.position + length;
  11182. while (reader.position < end) {
  11183. const tag = reader.uint32();
  11184. switch (tag >>> 3) {
  11185. case 1:
  11186. message.axis = reader.int64();
  11187. break;
  11188. default:
  11189. reader.skipType(tag & 7);
  11190. break;
  11191. }
  11192. }
  11193. return message;
  11194. }
  11195. static decodeText(reader) {
  11196. const message = new CoreML.Specification.SoftmaxNDLayerParams();
  11197. reader.start();
  11198. while (!reader.end()) {
  11199. const tag = reader.tag();
  11200. switch (tag) {
  11201. case "axis":
  11202. message.axis = reader.int64();
  11203. break;
  11204. default:
  11205. reader.field(tag, message);
  11206. break;
  11207. }
  11208. }
  11209. return message;
  11210. }
  11211. };
  11212. CoreML.Specification.SoftmaxNDLayerParams.prototype.axis = 0n;
  11213. CoreML.Specification.ReverseLayerParams = class ReverseLayerParams {
  11214. constructor() {
  11215. this.reverseDim = [];
  11216. }
  11217. static decode(reader, length) {
  11218. const message = new CoreML.Specification.ReverseLayerParams();
  11219. const end = length === undefined ? reader.length : reader.position + length;
  11220. while (reader.position < end) {
  11221. const tag = reader.uint32();
  11222. switch (tag >>> 3) {
  11223. case 1:
  11224. message.reverseDim = reader.array(message.reverseDim, () => reader.bool(), tag);
  11225. break;
  11226. default:
  11227. reader.skipType(tag & 7);
  11228. break;
  11229. }
  11230. }
  11231. return message;
  11232. }
  11233. static decodeText(reader) {
  11234. const message = new CoreML.Specification.ReverseLayerParams();
  11235. reader.start();
  11236. while (!reader.end()) {
  11237. const tag = reader.tag();
  11238. switch (tag) {
  11239. case "reverseDim":
  11240. reader.array(message.reverseDim, () => reader.bool());
  11241. break;
  11242. default:
  11243. reader.field(tag, message);
  11244. break;
  11245. }
  11246. }
  11247. return message;
  11248. }
  11249. };
  11250. CoreML.Specification.ReverseSeqLayerParams = class ReverseSeqLayerParams {
  11251. static decode(reader, length) {
  11252. const message = new CoreML.Specification.ReverseSeqLayerParams();
  11253. const end = length === undefined ? reader.length : reader.position + length;
  11254. while (reader.position < end) {
  11255. const tag = reader.uint32();
  11256. switch (tag >>> 3) {
  11257. case 1:
  11258. message.batchAxis = reader.int64();
  11259. break;
  11260. case 2:
  11261. message.sequenceAxis = reader.int64();
  11262. break;
  11263. default:
  11264. reader.skipType(tag & 7);
  11265. break;
  11266. }
  11267. }
  11268. return message;
  11269. }
  11270. static decodeText(reader) {
  11271. const message = new CoreML.Specification.ReverseSeqLayerParams();
  11272. reader.start();
  11273. while (!reader.end()) {
  11274. const tag = reader.tag();
  11275. switch (tag) {
  11276. case "batchAxis":
  11277. message.batchAxis = reader.int64();
  11278. break;
  11279. case "sequenceAxis":
  11280. message.sequenceAxis = reader.int64();
  11281. break;
  11282. default:
  11283. reader.field(tag, message);
  11284. break;
  11285. }
  11286. }
  11287. return message;
  11288. }
  11289. };
  11290. CoreML.Specification.ReverseSeqLayerParams.prototype.batchAxis = 0n;
  11291. CoreML.Specification.ReverseSeqLayerParams.prototype.sequenceAxis = 0n;
  11292. CoreML.Specification.LoadConstantNDLayerParams = class LoadConstantNDLayerParams {
  11293. constructor() {
  11294. this.shape = [];
  11295. }
  11296. static decode(reader, length) {
  11297. const message = new CoreML.Specification.LoadConstantNDLayerParams();
  11298. const end = length === undefined ? reader.length : reader.position + length;
  11299. while (reader.position < end) {
  11300. const tag = reader.uint32();
  11301. switch (tag >>> 3) {
  11302. case 1:
  11303. message.shape = reader.array(message.shape, () => reader.uint64(), tag);
  11304. break;
  11305. case 2:
  11306. message.data = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  11307. break;
  11308. default:
  11309. reader.skipType(tag & 7);
  11310. break;
  11311. }
  11312. }
  11313. return message;
  11314. }
  11315. static decodeText(reader) {
  11316. const message = new CoreML.Specification.LoadConstantNDLayerParams();
  11317. reader.start();
  11318. while (!reader.end()) {
  11319. const tag = reader.tag();
  11320. switch (tag) {
  11321. case "shape":
  11322. reader.array(message.shape, () => reader.uint64());
  11323. break;
  11324. case "data":
  11325. message.data = CoreML.Specification.WeightParams.decodeText(reader);
  11326. break;
  11327. default:
  11328. reader.field(tag, message);
  11329. break;
  11330. }
  11331. }
  11332. return message;
  11333. }
  11334. };
  11335. CoreML.Specification.LoadConstantNDLayerParams.prototype.data = null;
  11336. CoreML.Specification.FillLikeLayerParams = class FillLikeLayerParams {
  11337. static decode(reader, length) {
  11338. const message = new CoreML.Specification.FillLikeLayerParams();
  11339. const end = length === undefined ? reader.length : reader.position + length;
  11340. while (reader.position < end) {
  11341. const tag = reader.uint32();
  11342. switch (tag >>> 3) {
  11343. case 1:
  11344. message.value = reader.float();
  11345. break;
  11346. default:
  11347. reader.skipType(tag & 7);
  11348. break;
  11349. }
  11350. }
  11351. return message;
  11352. }
  11353. static decodeText(reader) {
  11354. const message = new CoreML.Specification.FillLikeLayerParams();
  11355. reader.start();
  11356. while (!reader.end()) {
  11357. const tag = reader.tag();
  11358. switch (tag) {
  11359. case "value":
  11360. message.value = reader.float();
  11361. break;
  11362. default:
  11363. reader.field(tag, message);
  11364. break;
  11365. }
  11366. }
  11367. return message;
  11368. }
  11369. };
  11370. CoreML.Specification.FillLikeLayerParams.prototype.value = 0;
  11371. CoreML.Specification.FillStaticLayerParams = class FillStaticLayerParams {
  11372. constructor() {
  11373. this.targetShape = [];
  11374. }
  11375. static decode(reader, length) {
  11376. const message = new CoreML.Specification.FillStaticLayerParams();
  11377. const end = length === undefined ? reader.length : reader.position + length;
  11378. while (reader.position < end) {
  11379. const tag = reader.uint32();
  11380. switch (tag >>> 3) {
  11381. case 1:
  11382. message.value = reader.float();
  11383. break;
  11384. case 2:
  11385. message.targetShape = reader.array(message.targetShape, () => reader.uint64(), tag);
  11386. break;
  11387. default:
  11388. reader.skipType(tag & 7);
  11389. break;
  11390. }
  11391. }
  11392. return message;
  11393. }
  11394. static decodeText(reader) {
  11395. const message = new CoreML.Specification.FillStaticLayerParams();
  11396. reader.start();
  11397. while (!reader.end()) {
  11398. const tag = reader.tag();
  11399. switch (tag) {
  11400. case "value":
  11401. message.value = reader.float();
  11402. break;
  11403. case "targetShape":
  11404. reader.array(message.targetShape, () => reader.uint64());
  11405. break;
  11406. default:
  11407. reader.field(tag, message);
  11408. break;
  11409. }
  11410. }
  11411. return message;
  11412. }
  11413. };
  11414. CoreML.Specification.FillStaticLayerParams.prototype.value = 0;
  11415. CoreML.Specification.FillDynamicLayerParams = class FillDynamicLayerParams {
  11416. static decode(reader, length) {
  11417. const message = new CoreML.Specification.FillDynamicLayerParams();
  11418. const end = length === undefined ? reader.length : reader.position + length;
  11419. while (reader.position < end) {
  11420. const tag = reader.uint32();
  11421. switch (tag >>> 3) {
  11422. case 1:
  11423. message.value = reader.float();
  11424. break;
  11425. default:
  11426. reader.skipType(tag & 7);
  11427. break;
  11428. }
  11429. }
  11430. return message;
  11431. }
  11432. static decodeText(reader) {
  11433. const message = new CoreML.Specification.FillDynamicLayerParams();
  11434. reader.start();
  11435. while (!reader.end()) {
  11436. const tag = reader.tag();
  11437. switch (tag) {
  11438. case "value":
  11439. message.value = reader.float();
  11440. break;
  11441. default:
  11442. reader.field(tag, message);
  11443. break;
  11444. }
  11445. }
  11446. return message;
  11447. }
  11448. };
  11449. CoreML.Specification.FillDynamicLayerParams.prototype.value = 0;
  11450. CoreML.Specification.WhereBroadcastableLayerParams = class WhereBroadcastableLayerParams {
  11451. static decode(reader, length) {
  11452. const message = new CoreML.Specification.WhereBroadcastableLayerParams();
  11453. const end = length === undefined ? reader.length : reader.position + length;
  11454. while (reader.position < end) {
  11455. const tag = reader.uint32();
  11456. switch (tag >>> 3) {
  11457. default:
  11458. reader.skipType(tag & 7);
  11459. break;
  11460. }
  11461. }
  11462. return message;
  11463. }
  11464. static decodeText(reader) {
  11465. const message = new CoreML.Specification.WhereBroadcastableLayerParams();
  11466. reader.start();
  11467. while (!reader.end()) {
  11468. const tag = reader.tag();
  11469. switch (tag) {
  11470. default:
  11471. reader.field(tag, message);
  11472. break;
  11473. }
  11474. }
  11475. return message;
  11476. }
  11477. };
  11478. CoreML.Specification.SinLayerParams = class SinLayerParams {
  11479. static decode(reader, length) {
  11480. const message = new CoreML.Specification.SinLayerParams();
  11481. const end = length === undefined ? reader.length : reader.position + length;
  11482. while (reader.position < end) {
  11483. const tag = reader.uint32();
  11484. switch (tag >>> 3) {
  11485. default:
  11486. reader.skipType(tag & 7);
  11487. break;
  11488. }
  11489. }
  11490. return message;
  11491. }
  11492. static decodeText(reader) {
  11493. const message = new CoreML.Specification.SinLayerParams();
  11494. reader.start();
  11495. while (!reader.end()) {
  11496. const tag = reader.tag();
  11497. switch (tag) {
  11498. default:
  11499. reader.field(tag, message);
  11500. break;
  11501. }
  11502. }
  11503. return message;
  11504. }
  11505. };
  11506. CoreML.Specification.CosLayerParams = class CosLayerParams {
  11507. static decode(reader, length) {
  11508. const message = new CoreML.Specification.CosLayerParams();
  11509. const end = length === undefined ? reader.length : reader.position + length;
  11510. while (reader.position < end) {
  11511. const tag = reader.uint32();
  11512. switch (tag >>> 3) {
  11513. default:
  11514. reader.skipType(tag & 7);
  11515. break;
  11516. }
  11517. }
  11518. return message;
  11519. }
  11520. static decodeText(reader) {
  11521. const message = new CoreML.Specification.CosLayerParams();
  11522. reader.start();
  11523. while (!reader.end()) {
  11524. const tag = reader.tag();
  11525. switch (tag) {
  11526. default:
  11527. reader.field(tag, message);
  11528. break;
  11529. }
  11530. }
  11531. return message;
  11532. }
  11533. };
  11534. CoreML.Specification.TanLayerParams = class TanLayerParams {
  11535. static decode(reader, length) {
  11536. const message = new CoreML.Specification.TanLayerParams();
  11537. const end = length === undefined ? reader.length : reader.position + length;
  11538. while (reader.position < end) {
  11539. const tag = reader.uint32();
  11540. switch (tag >>> 3) {
  11541. default:
  11542. reader.skipType(tag & 7);
  11543. break;
  11544. }
  11545. }
  11546. return message;
  11547. }
  11548. static decodeText(reader) {
  11549. const message = new CoreML.Specification.TanLayerParams();
  11550. reader.start();
  11551. while (!reader.end()) {
  11552. const tag = reader.tag();
  11553. switch (tag) {
  11554. default:
  11555. reader.field(tag, message);
  11556. break;
  11557. }
  11558. }
  11559. return message;
  11560. }
  11561. };
  11562. CoreML.Specification.AsinLayerParams = class AsinLayerParams {
  11563. static decode(reader, length) {
  11564. const message = new CoreML.Specification.AsinLayerParams();
  11565. const end = length === undefined ? reader.length : reader.position + length;
  11566. while (reader.position < end) {
  11567. const tag = reader.uint32();
  11568. switch (tag >>> 3) {
  11569. default:
  11570. reader.skipType(tag & 7);
  11571. break;
  11572. }
  11573. }
  11574. return message;
  11575. }
  11576. static decodeText(reader) {
  11577. const message = new CoreML.Specification.AsinLayerParams();
  11578. reader.start();
  11579. while (!reader.end()) {
  11580. const tag = reader.tag();
  11581. switch (tag) {
  11582. default:
  11583. reader.field(tag, message);
  11584. break;
  11585. }
  11586. }
  11587. return message;
  11588. }
  11589. };
  11590. CoreML.Specification.AcosLayerParams = class AcosLayerParams {
  11591. static decode(reader, length) {
  11592. const message = new CoreML.Specification.AcosLayerParams();
  11593. const end = length === undefined ? reader.length : reader.position + length;
  11594. while (reader.position < end) {
  11595. const tag = reader.uint32();
  11596. switch (tag >>> 3) {
  11597. default:
  11598. reader.skipType(tag & 7);
  11599. break;
  11600. }
  11601. }
  11602. return message;
  11603. }
  11604. static decodeText(reader) {
  11605. const message = new CoreML.Specification.AcosLayerParams();
  11606. reader.start();
  11607. while (!reader.end()) {
  11608. const tag = reader.tag();
  11609. switch (tag) {
  11610. default:
  11611. reader.field(tag, message);
  11612. break;
  11613. }
  11614. }
  11615. return message;
  11616. }
  11617. };
  11618. CoreML.Specification.AtanLayerParams = class AtanLayerParams {
  11619. static decode(reader, length) {
  11620. const message = new CoreML.Specification.AtanLayerParams();
  11621. const end = length === undefined ? reader.length : reader.position + length;
  11622. while (reader.position < end) {
  11623. const tag = reader.uint32();
  11624. switch (tag >>> 3) {
  11625. default:
  11626. reader.skipType(tag & 7);
  11627. break;
  11628. }
  11629. }
  11630. return message;
  11631. }
  11632. static decodeText(reader) {
  11633. const message = new CoreML.Specification.AtanLayerParams();
  11634. reader.start();
  11635. while (!reader.end()) {
  11636. const tag = reader.tag();
  11637. switch (tag) {
  11638. default:
  11639. reader.field(tag, message);
  11640. break;
  11641. }
  11642. }
  11643. return message;
  11644. }
  11645. };
  11646. CoreML.Specification.SinhLayerParams = class SinhLayerParams {
  11647. static decode(reader, length) {
  11648. const message = new CoreML.Specification.SinhLayerParams();
  11649. const end = length === undefined ? reader.length : reader.position + length;
  11650. while (reader.position < end) {
  11651. const tag = reader.uint32();
  11652. switch (tag >>> 3) {
  11653. default:
  11654. reader.skipType(tag & 7);
  11655. break;
  11656. }
  11657. }
  11658. return message;
  11659. }
  11660. static decodeText(reader) {
  11661. const message = new CoreML.Specification.SinhLayerParams();
  11662. reader.start();
  11663. while (!reader.end()) {
  11664. const tag = reader.tag();
  11665. switch (tag) {
  11666. default:
  11667. reader.field(tag, message);
  11668. break;
  11669. }
  11670. }
  11671. return message;
  11672. }
  11673. };
  11674. CoreML.Specification.CoshLayerParams = class CoshLayerParams {
  11675. static decode(reader, length) {
  11676. const message = new CoreML.Specification.CoshLayerParams();
  11677. const end = length === undefined ? reader.length : reader.position + length;
  11678. while (reader.position < end) {
  11679. const tag = reader.uint32();
  11680. switch (tag >>> 3) {
  11681. default:
  11682. reader.skipType(tag & 7);
  11683. break;
  11684. }
  11685. }
  11686. return message;
  11687. }
  11688. static decodeText(reader) {
  11689. const message = new CoreML.Specification.CoshLayerParams();
  11690. reader.start();
  11691. while (!reader.end()) {
  11692. const tag = reader.tag();
  11693. switch (tag) {
  11694. default:
  11695. reader.field(tag, message);
  11696. break;
  11697. }
  11698. }
  11699. return message;
  11700. }
  11701. };
  11702. CoreML.Specification.TanhLayerParams = class TanhLayerParams {
  11703. static decode(reader, length) {
  11704. const message = new CoreML.Specification.TanhLayerParams();
  11705. const end = length === undefined ? reader.length : reader.position + length;
  11706. while (reader.position < end) {
  11707. const tag = reader.uint32();
  11708. switch (tag >>> 3) {
  11709. default:
  11710. reader.skipType(tag & 7);
  11711. break;
  11712. }
  11713. }
  11714. return message;
  11715. }
  11716. static decodeText(reader) {
  11717. const message = new CoreML.Specification.TanhLayerParams();
  11718. reader.start();
  11719. while (!reader.end()) {
  11720. const tag = reader.tag();
  11721. switch (tag) {
  11722. default:
  11723. reader.field(tag, message);
  11724. break;
  11725. }
  11726. }
  11727. return message;
  11728. }
  11729. };
  11730. CoreML.Specification.AsinhLayerParams = class AsinhLayerParams {
  11731. static decode(reader, length) {
  11732. const message = new CoreML.Specification.AsinhLayerParams();
  11733. const end = length === undefined ? reader.length : reader.position + length;
  11734. while (reader.position < end) {
  11735. const tag = reader.uint32();
  11736. switch (tag >>> 3) {
  11737. default:
  11738. reader.skipType(tag & 7);
  11739. break;
  11740. }
  11741. }
  11742. return message;
  11743. }
  11744. static decodeText(reader) {
  11745. const message = new CoreML.Specification.AsinhLayerParams();
  11746. reader.start();
  11747. while (!reader.end()) {
  11748. const tag = reader.tag();
  11749. switch (tag) {
  11750. default:
  11751. reader.field(tag, message);
  11752. break;
  11753. }
  11754. }
  11755. return message;
  11756. }
  11757. };
  11758. CoreML.Specification.AcoshLayerParams = class AcoshLayerParams {
  11759. static decode(reader, length) {
  11760. const message = new CoreML.Specification.AcoshLayerParams();
  11761. const end = length === undefined ? reader.length : reader.position + length;
  11762. while (reader.position < end) {
  11763. const tag = reader.uint32();
  11764. switch (tag >>> 3) {
  11765. default:
  11766. reader.skipType(tag & 7);
  11767. break;
  11768. }
  11769. }
  11770. return message;
  11771. }
  11772. static decodeText(reader) {
  11773. const message = new CoreML.Specification.AcoshLayerParams();
  11774. reader.start();
  11775. while (!reader.end()) {
  11776. const tag = reader.tag();
  11777. switch (tag) {
  11778. default:
  11779. reader.field(tag, message);
  11780. break;
  11781. }
  11782. }
  11783. return message;
  11784. }
  11785. };
  11786. CoreML.Specification.AtanhLayerParams = class AtanhLayerParams {
  11787. static decode(reader, length) {
  11788. const message = new CoreML.Specification.AtanhLayerParams();
  11789. const end = length === undefined ? reader.length : reader.position + length;
  11790. while (reader.position < end) {
  11791. const tag = reader.uint32();
  11792. switch (tag >>> 3) {
  11793. default:
  11794. reader.skipType(tag & 7);
  11795. break;
  11796. }
  11797. }
  11798. return message;
  11799. }
  11800. static decodeText(reader) {
  11801. const message = new CoreML.Specification.AtanhLayerParams();
  11802. reader.start();
  11803. while (!reader.end()) {
  11804. const tag = reader.tag();
  11805. switch (tag) {
  11806. default:
  11807. reader.field(tag, message);
  11808. break;
  11809. }
  11810. }
  11811. return message;
  11812. }
  11813. };
  11814. CoreML.Specification.PowBroadcastableLayerParams = class PowBroadcastableLayerParams {
  11815. static decode(reader, length) {
  11816. const message = new CoreML.Specification.PowBroadcastableLayerParams();
  11817. const end = length === undefined ? reader.length : reader.position + length;
  11818. while (reader.position < end) {
  11819. const tag = reader.uint32();
  11820. switch (tag >>> 3) {
  11821. default:
  11822. reader.skipType(tag & 7);
  11823. break;
  11824. }
  11825. }
  11826. return message;
  11827. }
  11828. static decodeText(reader) {
  11829. const message = new CoreML.Specification.PowBroadcastableLayerParams();
  11830. reader.start();
  11831. while (!reader.end()) {
  11832. const tag = reader.tag();
  11833. switch (tag) {
  11834. default:
  11835. reader.field(tag, message);
  11836. break;
  11837. }
  11838. }
  11839. return message;
  11840. }
  11841. };
  11842. CoreML.Specification.Exp2LayerParams = class Exp2LayerParams {
  11843. static decode(reader, length) {
  11844. const message = new CoreML.Specification.Exp2LayerParams();
  11845. const end = length === undefined ? reader.length : reader.position + length;
  11846. while (reader.position < end) {
  11847. const tag = reader.uint32();
  11848. switch (tag >>> 3) {
  11849. default:
  11850. reader.skipType(tag & 7);
  11851. break;
  11852. }
  11853. }
  11854. return message;
  11855. }
  11856. static decodeText(reader) {
  11857. const message = new CoreML.Specification.Exp2LayerParams();
  11858. reader.start();
  11859. while (!reader.end()) {
  11860. const tag = reader.tag();
  11861. switch (tag) {
  11862. default:
  11863. reader.field(tag, message);
  11864. break;
  11865. }
  11866. }
  11867. return message;
  11868. }
  11869. };
  11870. CoreML.Specification.WhereNonZeroLayerParams = class WhereNonZeroLayerParams {
  11871. static decode(reader, length) {
  11872. const message = new CoreML.Specification.WhereNonZeroLayerParams();
  11873. const end = length === undefined ? reader.length : reader.position + length;
  11874. while (reader.position < end) {
  11875. const tag = reader.uint32();
  11876. switch (tag >>> 3) {
  11877. default:
  11878. reader.skipType(tag & 7);
  11879. break;
  11880. }
  11881. }
  11882. return message;
  11883. }
  11884. static decodeText(reader) {
  11885. const message = new CoreML.Specification.WhereNonZeroLayerParams();
  11886. reader.start();
  11887. while (!reader.end()) {
  11888. const tag = reader.tag();
  11889. switch (tag) {
  11890. default:
  11891. reader.field(tag, message);
  11892. break;
  11893. }
  11894. }
  11895. return message;
  11896. }
  11897. };
  11898. CoreML.Specification.MatrixBandPartLayerParams = class MatrixBandPartLayerParams {
  11899. static decode(reader, length) {
  11900. const message = new CoreML.Specification.MatrixBandPartLayerParams();
  11901. const end = length === undefined ? reader.length : reader.position + length;
  11902. while (reader.position < end) {
  11903. const tag = reader.uint32();
  11904. switch (tag >>> 3) {
  11905. case 1:
  11906. message.numLower = reader.int64();
  11907. break;
  11908. case 2:
  11909. message.numUpper = reader.int64();
  11910. break;
  11911. default:
  11912. reader.skipType(tag & 7);
  11913. break;
  11914. }
  11915. }
  11916. return message;
  11917. }
  11918. static decodeText(reader) {
  11919. const message = new CoreML.Specification.MatrixBandPartLayerParams();
  11920. reader.start();
  11921. while (!reader.end()) {
  11922. const tag = reader.tag();
  11923. switch (tag) {
  11924. case "numLower":
  11925. message.numLower = reader.int64();
  11926. break;
  11927. case "numUpper":
  11928. message.numUpper = reader.int64();
  11929. break;
  11930. default:
  11931. reader.field(tag, message);
  11932. break;
  11933. }
  11934. }
  11935. return message;
  11936. }
  11937. };
  11938. CoreML.Specification.MatrixBandPartLayerParams.prototype.numLower = 0n;
  11939. CoreML.Specification.MatrixBandPartLayerParams.prototype.numUpper = 0n;
  11940. CoreML.Specification.UpperTriangularLayerParams = class UpperTriangularLayerParams {
  11941. static decode(reader, length) {
  11942. const message = new CoreML.Specification.UpperTriangularLayerParams();
  11943. const end = length === undefined ? reader.length : reader.position + length;
  11944. while (reader.position < end) {
  11945. const tag = reader.uint32();
  11946. switch (tag >>> 3) {
  11947. case 1:
  11948. message.k = reader.int64();
  11949. break;
  11950. default:
  11951. reader.skipType(tag & 7);
  11952. break;
  11953. }
  11954. }
  11955. return message;
  11956. }
  11957. static decodeText(reader) {
  11958. const message = new CoreML.Specification.UpperTriangularLayerParams();
  11959. reader.start();
  11960. while (!reader.end()) {
  11961. const tag = reader.tag();
  11962. switch (tag) {
  11963. case "k":
  11964. message.k = reader.int64();
  11965. break;
  11966. default:
  11967. reader.field(tag, message);
  11968. break;
  11969. }
  11970. }
  11971. return message;
  11972. }
  11973. };
  11974. CoreML.Specification.UpperTriangularLayerParams.prototype.k = 0n;
  11975. CoreML.Specification.LowerTriangularLayerParams = class LowerTriangularLayerParams {
  11976. static decode(reader, length) {
  11977. const message = new CoreML.Specification.LowerTriangularLayerParams();
  11978. const end = length === undefined ? reader.length : reader.position + length;
  11979. while (reader.position < end) {
  11980. const tag = reader.uint32();
  11981. switch (tag >>> 3) {
  11982. case 1:
  11983. message.k = reader.int64();
  11984. break;
  11985. default:
  11986. reader.skipType(tag & 7);
  11987. break;
  11988. }
  11989. }
  11990. return message;
  11991. }
  11992. static decodeText(reader) {
  11993. const message = new CoreML.Specification.LowerTriangularLayerParams();
  11994. reader.start();
  11995. while (!reader.end()) {
  11996. const tag = reader.tag();
  11997. switch (tag) {
  11998. case "k":
  11999. message.k = reader.int64();
  12000. break;
  12001. default:
  12002. reader.field(tag, message);
  12003. break;
  12004. }
  12005. }
  12006. return message;
  12007. }
  12008. };
  12009. CoreML.Specification.LowerTriangularLayerParams.prototype.k = 0n;
  12010. CoreML.Specification.BroadcastToLikeLayerParams = class BroadcastToLikeLayerParams {
  12011. static decode(reader, length) {
  12012. const message = new CoreML.Specification.BroadcastToLikeLayerParams();
  12013. const end = length === undefined ? reader.length : reader.position + length;
  12014. while (reader.position < end) {
  12015. const tag = reader.uint32();
  12016. switch (tag >>> 3) {
  12017. default:
  12018. reader.skipType(tag & 7);
  12019. break;
  12020. }
  12021. }
  12022. return message;
  12023. }
  12024. static decodeText(reader) {
  12025. const message = new CoreML.Specification.BroadcastToLikeLayerParams();
  12026. reader.start();
  12027. while (!reader.end()) {
  12028. const tag = reader.tag();
  12029. switch (tag) {
  12030. default:
  12031. reader.field(tag, message);
  12032. break;
  12033. }
  12034. }
  12035. return message;
  12036. }
  12037. };
  12038. CoreML.Specification.BroadcastToStaticLayerParams = class BroadcastToStaticLayerParams {
  12039. constructor() {
  12040. this.targetShape = [];
  12041. }
  12042. static decode(reader, length) {
  12043. const message = new CoreML.Specification.BroadcastToStaticLayerParams();
  12044. const end = length === undefined ? reader.length : reader.position + length;
  12045. while (reader.position < end) {
  12046. const tag = reader.uint32();
  12047. switch (tag >>> 3) {
  12048. case 1:
  12049. message.targetShape = reader.array(message.targetShape, () => reader.uint64(), tag);
  12050. break;
  12051. default:
  12052. reader.skipType(tag & 7);
  12053. break;
  12054. }
  12055. }
  12056. return message;
  12057. }
  12058. static decodeText(reader) {
  12059. const message = new CoreML.Specification.BroadcastToStaticLayerParams();
  12060. reader.start();
  12061. while (!reader.end()) {
  12062. const tag = reader.tag();
  12063. switch (tag) {
  12064. case "targetShape":
  12065. reader.array(message.targetShape, () => reader.uint64());
  12066. break;
  12067. default:
  12068. reader.field(tag, message);
  12069. break;
  12070. }
  12071. }
  12072. return message;
  12073. }
  12074. };
  12075. CoreML.Specification.BroadcastToDynamicLayerParams = class BroadcastToDynamicLayerParams {
  12076. static decode(reader, length) {
  12077. const message = new CoreML.Specification.BroadcastToDynamicLayerParams();
  12078. const end = length === undefined ? reader.length : reader.position + length;
  12079. while (reader.position < end) {
  12080. const tag = reader.uint32();
  12081. switch (tag >>> 3) {
  12082. default:
  12083. reader.skipType(tag & 7);
  12084. break;
  12085. }
  12086. }
  12087. return message;
  12088. }
  12089. static decodeText(reader) {
  12090. const message = new CoreML.Specification.BroadcastToDynamicLayerParams();
  12091. reader.start();
  12092. while (!reader.end()) {
  12093. const tag = reader.tag();
  12094. switch (tag) {
  12095. default:
  12096. reader.field(tag, message);
  12097. break;
  12098. }
  12099. }
  12100. return message;
  12101. }
  12102. };
  12103. CoreML.Specification.AddBroadcastableLayerParams = class AddBroadcastableLayerParams {
  12104. static decode(reader, length) {
  12105. const message = new CoreML.Specification.AddBroadcastableLayerParams();
  12106. const end = length === undefined ? reader.length : reader.position + length;
  12107. while (reader.position < end) {
  12108. const tag = reader.uint32();
  12109. switch (tag >>> 3) {
  12110. default:
  12111. reader.skipType(tag & 7);
  12112. break;
  12113. }
  12114. }
  12115. return message;
  12116. }
  12117. static decodeText(reader) {
  12118. const message = new CoreML.Specification.AddBroadcastableLayerParams();
  12119. reader.start();
  12120. while (!reader.end()) {
  12121. const tag = reader.tag();
  12122. switch (tag) {
  12123. default:
  12124. reader.field(tag, message);
  12125. break;
  12126. }
  12127. }
  12128. return message;
  12129. }
  12130. };
  12131. CoreML.Specification.MaxBroadcastableLayerParams = class MaxBroadcastableLayerParams {
  12132. static decode(reader, length) {
  12133. const message = new CoreML.Specification.MaxBroadcastableLayerParams();
  12134. const end = length === undefined ? reader.length : reader.position + length;
  12135. while (reader.position < end) {
  12136. const tag = reader.uint32();
  12137. switch (tag >>> 3) {
  12138. default:
  12139. reader.skipType(tag & 7);
  12140. break;
  12141. }
  12142. }
  12143. return message;
  12144. }
  12145. static decodeText(reader) {
  12146. const message = new CoreML.Specification.MaxBroadcastableLayerParams();
  12147. reader.start();
  12148. while (!reader.end()) {
  12149. const tag = reader.tag();
  12150. switch (tag) {
  12151. default:
  12152. reader.field(tag, message);
  12153. break;
  12154. }
  12155. }
  12156. return message;
  12157. }
  12158. };
  12159. CoreML.Specification.MinBroadcastableLayerParams = class MinBroadcastableLayerParams {
  12160. static decode(reader, length) {
  12161. const message = new CoreML.Specification.MinBroadcastableLayerParams();
  12162. const end = length === undefined ? reader.length : reader.position + length;
  12163. while (reader.position < end) {
  12164. const tag = reader.uint32();
  12165. switch (tag >>> 3) {
  12166. default:
  12167. reader.skipType(tag & 7);
  12168. break;
  12169. }
  12170. }
  12171. return message;
  12172. }
  12173. static decodeText(reader) {
  12174. const message = new CoreML.Specification.MinBroadcastableLayerParams();
  12175. reader.start();
  12176. while (!reader.end()) {
  12177. const tag = reader.tag();
  12178. switch (tag) {
  12179. default:
  12180. reader.field(tag, message);
  12181. break;
  12182. }
  12183. }
  12184. return message;
  12185. }
  12186. };
  12187. CoreML.Specification.ModBroadcastableLayerParams = class ModBroadcastableLayerParams {
  12188. static decode(reader, length) {
  12189. const message = new CoreML.Specification.ModBroadcastableLayerParams();
  12190. const end = length === undefined ? reader.length : reader.position + length;
  12191. while (reader.position < end) {
  12192. const tag = reader.uint32();
  12193. switch (tag >>> 3) {
  12194. default:
  12195. reader.skipType(tag & 7);
  12196. break;
  12197. }
  12198. }
  12199. return message;
  12200. }
  12201. static decodeText(reader) {
  12202. const message = new CoreML.Specification.ModBroadcastableLayerParams();
  12203. reader.start();
  12204. while (!reader.end()) {
  12205. const tag = reader.tag();
  12206. switch (tag) {
  12207. default:
  12208. reader.field(tag, message);
  12209. break;
  12210. }
  12211. }
  12212. return message;
  12213. }
  12214. };
  12215. CoreML.Specification.FloorDivBroadcastableLayerParams = class FloorDivBroadcastableLayerParams {
  12216. static decode(reader, length) {
  12217. const message = new CoreML.Specification.FloorDivBroadcastableLayerParams();
  12218. const end = length === undefined ? reader.length : reader.position + length;
  12219. while (reader.position < end) {
  12220. const tag = reader.uint32();
  12221. switch (tag >>> 3) {
  12222. default:
  12223. reader.skipType(tag & 7);
  12224. break;
  12225. }
  12226. }
  12227. return message;
  12228. }
  12229. static decodeText(reader) {
  12230. const message = new CoreML.Specification.FloorDivBroadcastableLayerParams();
  12231. reader.start();
  12232. while (!reader.end()) {
  12233. const tag = reader.tag();
  12234. switch (tag) {
  12235. default:
  12236. reader.field(tag, message);
  12237. break;
  12238. }
  12239. }
  12240. return message;
  12241. }
  12242. };
  12243. CoreML.Specification.SubtractBroadcastableLayerParams = class SubtractBroadcastableLayerParams {
  12244. static decode(reader, length) {
  12245. const message = new CoreML.Specification.SubtractBroadcastableLayerParams();
  12246. const end = length === undefined ? reader.length : reader.position + length;
  12247. while (reader.position < end) {
  12248. const tag = reader.uint32();
  12249. switch (tag >>> 3) {
  12250. default:
  12251. reader.skipType(tag & 7);
  12252. break;
  12253. }
  12254. }
  12255. return message;
  12256. }
  12257. static decodeText(reader) {
  12258. const message = new CoreML.Specification.SubtractBroadcastableLayerParams();
  12259. reader.start();
  12260. while (!reader.end()) {
  12261. const tag = reader.tag();
  12262. switch (tag) {
  12263. default:
  12264. reader.field(tag, message);
  12265. break;
  12266. }
  12267. }
  12268. return message;
  12269. }
  12270. };
  12271. CoreML.Specification.MultiplyBroadcastableLayerParams = class MultiplyBroadcastableLayerParams {
  12272. static decode(reader, length) {
  12273. const message = new CoreML.Specification.MultiplyBroadcastableLayerParams();
  12274. const end = length === undefined ? reader.length : reader.position + length;
  12275. while (reader.position < end) {
  12276. const tag = reader.uint32();
  12277. switch (tag >>> 3) {
  12278. default:
  12279. reader.skipType(tag & 7);
  12280. break;
  12281. }
  12282. }
  12283. return message;
  12284. }
  12285. static decodeText(reader) {
  12286. const message = new CoreML.Specification.MultiplyBroadcastableLayerParams();
  12287. reader.start();
  12288. while (!reader.end()) {
  12289. const tag = reader.tag();
  12290. switch (tag) {
  12291. default:
  12292. reader.field(tag, message);
  12293. break;
  12294. }
  12295. }
  12296. return message;
  12297. }
  12298. };
  12299. CoreML.Specification.DivideBroadcastableLayerParams = class DivideBroadcastableLayerParams {
  12300. static decode(reader, length) {
  12301. const message = new CoreML.Specification.DivideBroadcastableLayerParams();
  12302. const end = length === undefined ? reader.length : reader.position + length;
  12303. while (reader.position < end) {
  12304. const tag = reader.uint32();
  12305. switch (tag >>> 3) {
  12306. default:
  12307. reader.skipType(tag & 7);
  12308. break;
  12309. }
  12310. }
  12311. return message;
  12312. }
  12313. static decodeText(reader) {
  12314. const message = new CoreML.Specification.DivideBroadcastableLayerParams();
  12315. reader.start();
  12316. while (!reader.end()) {
  12317. const tag = reader.tag();
  12318. switch (tag) {
  12319. default:
  12320. reader.field(tag, message);
  12321. break;
  12322. }
  12323. }
  12324. return message;
  12325. }
  12326. };
  12327. CoreML.Specification.GatherLayerParams = class GatherLayerParams {
  12328. static decode(reader, length) {
  12329. const message = new CoreML.Specification.GatherLayerParams();
  12330. const end = length === undefined ? reader.length : reader.position + length;
  12331. while (reader.position < end) {
  12332. const tag = reader.uint32();
  12333. switch (tag >>> 3) {
  12334. case 1:
  12335. message.axis = reader.int64();
  12336. break;
  12337. default:
  12338. reader.skipType(tag & 7);
  12339. break;
  12340. }
  12341. }
  12342. return message;
  12343. }
  12344. static decodeText(reader) {
  12345. const message = new CoreML.Specification.GatherLayerParams();
  12346. reader.start();
  12347. while (!reader.end()) {
  12348. const tag = reader.tag();
  12349. switch (tag) {
  12350. case "axis":
  12351. message.axis = reader.int64();
  12352. break;
  12353. default:
  12354. reader.field(tag, message);
  12355. break;
  12356. }
  12357. }
  12358. return message;
  12359. }
  12360. };
  12361. CoreML.Specification.GatherLayerParams.prototype.axis = 0n;
  12362. CoreML.Specification.ScatterMode = {
  12363. "SCATTER_UPDATE": 0,
  12364. "SCATTER_ADD": 1,
  12365. "SCATTER_SUB": 2,
  12366. "SCATTER_MUL": 3,
  12367. "SCATTER_DIV": 4,
  12368. "SCATTER_MAX": 5,
  12369. "SCATTER_MIN": 6
  12370. };
  12371. CoreML.Specification.ScatterLayerParams = class ScatterLayerParams {
  12372. static decode(reader, length) {
  12373. const message = new CoreML.Specification.ScatterLayerParams();
  12374. const end = length === undefined ? reader.length : reader.position + length;
  12375. while (reader.position < end) {
  12376. const tag = reader.uint32();
  12377. switch (tag >>> 3) {
  12378. case 1:
  12379. message.axis = reader.int64();
  12380. break;
  12381. case 2:
  12382. message.mode = reader.int32();
  12383. break;
  12384. default:
  12385. reader.skipType(tag & 7);
  12386. break;
  12387. }
  12388. }
  12389. return message;
  12390. }
  12391. static decodeText(reader) {
  12392. const message = new CoreML.Specification.ScatterLayerParams();
  12393. reader.start();
  12394. while (!reader.end()) {
  12395. const tag = reader.tag();
  12396. switch (tag) {
  12397. case "axis":
  12398. message.axis = reader.int64();
  12399. break;
  12400. case "mode":
  12401. message.mode = reader.enum(CoreML.Specification.ScatterMode);
  12402. break;
  12403. default:
  12404. reader.field(tag, message);
  12405. break;
  12406. }
  12407. }
  12408. return message;
  12409. }
  12410. };
  12411. CoreML.Specification.ScatterLayerParams.prototype.axis = 0n;
  12412. CoreML.Specification.ScatterLayerParams.prototype.mode = 0;
  12413. CoreML.Specification.GatherNDLayerParams = class GatherNDLayerParams {
  12414. static decode(reader, length) {
  12415. const message = new CoreML.Specification.GatherNDLayerParams();
  12416. const end = length === undefined ? reader.length : reader.position + length;
  12417. while (reader.position < end) {
  12418. const tag = reader.uint32();
  12419. switch (tag >>> 3) {
  12420. default:
  12421. reader.skipType(tag & 7);
  12422. break;
  12423. }
  12424. }
  12425. return message;
  12426. }
  12427. static decodeText(reader) {
  12428. const message = new CoreML.Specification.GatherNDLayerParams();
  12429. reader.start();
  12430. while (!reader.end()) {
  12431. const tag = reader.tag();
  12432. switch (tag) {
  12433. default:
  12434. reader.field(tag, message);
  12435. break;
  12436. }
  12437. }
  12438. return message;
  12439. }
  12440. };
  12441. CoreML.Specification.ScatterNDLayerParams = class ScatterNDLayerParams {
  12442. static decode(reader, length) {
  12443. const message = new CoreML.Specification.ScatterNDLayerParams();
  12444. const end = length === undefined ? reader.length : reader.position + length;
  12445. while (reader.position < end) {
  12446. const tag = reader.uint32();
  12447. switch (tag >>> 3) {
  12448. case 1:
  12449. message.mode = reader.int32();
  12450. break;
  12451. default:
  12452. reader.skipType(tag & 7);
  12453. break;
  12454. }
  12455. }
  12456. return message;
  12457. }
  12458. static decodeText(reader) {
  12459. const message = new CoreML.Specification.ScatterNDLayerParams();
  12460. reader.start();
  12461. while (!reader.end()) {
  12462. const tag = reader.tag();
  12463. switch (tag) {
  12464. case "mode":
  12465. message.mode = reader.enum(CoreML.Specification.ScatterMode);
  12466. break;
  12467. default:
  12468. reader.field(tag, message);
  12469. break;
  12470. }
  12471. }
  12472. return message;
  12473. }
  12474. };
  12475. CoreML.Specification.ScatterNDLayerParams.prototype.mode = 0;
  12476. CoreML.Specification.GatherAlongAxisLayerParams = class GatherAlongAxisLayerParams {
  12477. static decode(reader, length) {
  12478. const message = new CoreML.Specification.GatherAlongAxisLayerParams();
  12479. const end = length === undefined ? reader.length : reader.position + length;
  12480. while (reader.position < end) {
  12481. const tag = reader.uint32();
  12482. switch (tag >>> 3) {
  12483. case 1:
  12484. message.axis = reader.int64();
  12485. break;
  12486. default:
  12487. reader.skipType(tag & 7);
  12488. break;
  12489. }
  12490. }
  12491. return message;
  12492. }
  12493. static decodeText(reader) {
  12494. const message = new CoreML.Specification.GatherAlongAxisLayerParams();
  12495. reader.start();
  12496. while (!reader.end()) {
  12497. const tag = reader.tag();
  12498. switch (tag) {
  12499. case "axis":
  12500. message.axis = reader.int64();
  12501. break;
  12502. default:
  12503. reader.field(tag, message);
  12504. break;
  12505. }
  12506. }
  12507. return message;
  12508. }
  12509. };
  12510. CoreML.Specification.GatherAlongAxisLayerParams.prototype.axis = 0n;
  12511. CoreML.Specification.ScatterAlongAxisLayerParams = class ScatterAlongAxisLayerParams {
  12512. static decode(reader, length) {
  12513. const message = new CoreML.Specification.ScatterAlongAxisLayerParams();
  12514. const end = length === undefined ? reader.length : reader.position + length;
  12515. while (reader.position < end) {
  12516. const tag = reader.uint32();
  12517. switch (tag >>> 3) {
  12518. case 1:
  12519. message.axis = reader.int64();
  12520. break;
  12521. case 2:
  12522. message.mode = reader.int32();
  12523. break;
  12524. default:
  12525. reader.skipType(tag & 7);
  12526. break;
  12527. }
  12528. }
  12529. return message;
  12530. }
  12531. static decodeText(reader) {
  12532. const message = new CoreML.Specification.ScatterAlongAxisLayerParams();
  12533. reader.start();
  12534. while (!reader.end()) {
  12535. const tag = reader.tag();
  12536. switch (tag) {
  12537. case "axis":
  12538. message.axis = reader.int64();
  12539. break;
  12540. case "mode":
  12541. message.mode = reader.enum(CoreML.Specification.ScatterMode);
  12542. break;
  12543. default:
  12544. reader.field(tag, message);
  12545. break;
  12546. }
  12547. }
  12548. return message;
  12549. }
  12550. };
  12551. CoreML.Specification.ScatterAlongAxisLayerParams.prototype.axis = 0n;
  12552. CoreML.Specification.ScatterAlongAxisLayerParams.prototype.mode = 0;
  12553. CoreML.Specification.StackLayerParams = class StackLayerParams {
  12554. static decode(reader, length) {
  12555. const message = new CoreML.Specification.StackLayerParams();
  12556. const end = length === undefined ? reader.length : reader.position + length;
  12557. while (reader.position < end) {
  12558. const tag = reader.uint32();
  12559. switch (tag >>> 3) {
  12560. case 1:
  12561. message.axis = reader.int64();
  12562. break;
  12563. default:
  12564. reader.skipType(tag & 7);
  12565. break;
  12566. }
  12567. }
  12568. return message;
  12569. }
  12570. static decodeText(reader) {
  12571. const message = new CoreML.Specification.StackLayerParams();
  12572. reader.start();
  12573. while (!reader.end()) {
  12574. const tag = reader.tag();
  12575. switch (tag) {
  12576. case "axis":
  12577. message.axis = reader.int64();
  12578. break;
  12579. default:
  12580. reader.field(tag, message);
  12581. break;
  12582. }
  12583. }
  12584. return message;
  12585. }
  12586. };
  12587. CoreML.Specification.StackLayerParams.prototype.axis = 0n;
  12588. CoreML.Specification.RankPreservingReshapeLayerParams = class RankPreservingReshapeLayerParams {
  12589. constructor() {
  12590. this.targetShape = [];
  12591. }
  12592. static decode(reader, length) {
  12593. const message = new CoreML.Specification.RankPreservingReshapeLayerParams();
  12594. const end = length === undefined ? reader.length : reader.position + length;
  12595. while (reader.position < end) {
  12596. const tag = reader.uint32();
  12597. switch (tag >>> 3) {
  12598. case 1:
  12599. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  12600. break;
  12601. default:
  12602. reader.skipType(tag & 7);
  12603. break;
  12604. }
  12605. }
  12606. return message;
  12607. }
  12608. static decodeText(reader) {
  12609. const message = new CoreML.Specification.RankPreservingReshapeLayerParams();
  12610. reader.start();
  12611. while (!reader.end()) {
  12612. const tag = reader.tag();
  12613. switch (tag) {
  12614. case "targetShape":
  12615. reader.array(message.targetShape, () => reader.int64());
  12616. break;
  12617. default:
  12618. reader.field(tag, message);
  12619. break;
  12620. }
  12621. }
  12622. return message;
  12623. }
  12624. };
  12625. CoreML.Specification.ConstantPaddingLayerParams = class ConstantPaddingLayerParams {
  12626. constructor() {
  12627. this.padAmounts = [];
  12628. }
  12629. static decode(reader, length) {
  12630. const message = new CoreML.Specification.ConstantPaddingLayerParams();
  12631. const end = length === undefined ? reader.length : reader.position + length;
  12632. while (reader.position < end) {
  12633. const tag = reader.uint32();
  12634. switch (tag >>> 3) {
  12635. case 1:
  12636. message.value = reader.float();
  12637. break;
  12638. case 2:
  12639. message.padAmounts = reader.array(message.padAmounts, () => reader.uint64(), tag);
  12640. break;
  12641. case 3:
  12642. message.padToGivenOutputSizeMode = reader.bool();
  12643. break;
  12644. default:
  12645. reader.skipType(tag & 7);
  12646. break;
  12647. }
  12648. }
  12649. return message;
  12650. }
  12651. static decodeText(reader) {
  12652. const message = new CoreML.Specification.ConstantPaddingLayerParams();
  12653. reader.start();
  12654. while (!reader.end()) {
  12655. const tag = reader.tag();
  12656. switch (tag) {
  12657. case "value":
  12658. message.value = reader.float();
  12659. break;
  12660. case "padAmounts":
  12661. reader.array(message.padAmounts, () => reader.uint64());
  12662. break;
  12663. case "padToGivenOutputSizeMode":
  12664. message.padToGivenOutputSizeMode = reader.bool();
  12665. break;
  12666. default:
  12667. reader.field(tag, message);
  12668. break;
  12669. }
  12670. }
  12671. return message;
  12672. }
  12673. };
  12674. CoreML.Specification.ConstantPaddingLayerParams.prototype.value = 0;
  12675. CoreML.Specification.ConstantPaddingLayerParams.prototype.padToGivenOutputSizeMode = false;
  12676. CoreML.Specification.RandomNormalLikeLayerParams = class RandomNormalLikeLayerParams {
  12677. static decode(reader, length) {
  12678. const message = new CoreML.Specification.RandomNormalLikeLayerParams();
  12679. const end = length === undefined ? reader.length : reader.position + length;
  12680. while (reader.position < end) {
  12681. const tag = reader.uint32();
  12682. switch (tag >>> 3) {
  12683. case 1:
  12684. message.seed = reader.int64();
  12685. break;
  12686. case 2:
  12687. message.mean = reader.float();
  12688. break;
  12689. case 3:
  12690. message.stdDev = reader.float();
  12691. break;
  12692. default:
  12693. reader.skipType(tag & 7);
  12694. break;
  12695. }
  12696. }
  12697. return message;
  12698. }
  12699. static decodeText(reader) {
  12700. const message = new CoreML.Specification.RandomNormalLikeLayerParams();
  12701. reader.start();
  12702. while (!reader.end()) {
  12703. const tag = reader.tag();
  12704. switch (tag) {
  12705. case "seed":
  12706. message.seed = reader.int64();
  12707. break;
  12708. case "mean":
  12709. message.mean = reader.float();
  12710. break;
  12711. case "stdDev":
  12712. message.stdDev = reader.float();
  12713. break;
  12714. default:
  12715. reader.field(tag, message);
  12716. break;
  12717. }
  12718. }
  12719. return message;
  12720. }
  12721. };
  12722. CoreML.Specification.RandomNormalLikeLayerParams.prototype.seed = 0n;
  12723. CoreML.Specification.RandomNormalLikeLayerParams.prototype.mean = 0;
  12724. CoreML.Specification.RandomNormalLikeLayerParams.prototype.stdDev = 0;
  12725. CoreML.Specification.RandomNormalStaticLayerParams = class RandomNormalStaticLayerParams {
  12726. constructor() {
  12727. this.outputShape = [];
  12728. }
  12729. static decode(reader, length) {
  12730. const message = new CoreML.Specification.RandomNormalStaticLayerParams();
  12731. const end = length === undefined ? reader.length : reader.position + length;
  12732. while (reader.position < end) {
  12733. const tag = reader.uint32();
  12734. switch (tag >>> 3) {
  12735. case 1:
  12736. message.seed = reader.int64();
  12737. break;
  12738. case 2:
  12739. message.mean = reader.float();
  12740. break;
  12741. case 3:
  12742. message.stdDev = reader.float();
  12743. break;
  12744. case 4:
  12745. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  12746. break;
  12747. default:
  12748. reader.skipType(tag & 7);
  12749. break;
  12750. }
  12751. }
  12752. return message;
  12753. }
  12754. static decodeText(reader) {
  12755. const message = new CoreML.Specification.RandomNormalStaticLayerParams();
  12756. reader.start();
  12757. while (!reader.end()) {
  12758. const tag = reader.tag();
  12759. switch (tag) {
  12760. case "seed":
  12761. message.seed = reader.int64();
  12762. break;
  12763. case "mean":
  12764. message.mean = reader.float();
  12765. break;
  12766. case "stdDev":
  12767. message.stdDev = reader.float();
  12768. break;
  12769. case "outputShape":
  12770. reader.array(message.outputShape, () => reader.uint64());
  12771. break;
  12772. default:
  12773. reader.field(tag, message);
  12774. break;
  12775. }
  12776. }
  12777. return message;
  12778. }
  12779. };
  12780. CoreML.Specification.RandomNormalStaticLayerParams.prototype.seed = 0n;
  12781. CoreML.Specification.RandomNormalStaticLayerParams.prototype.mean = 0;
  12782. CoreML.Specification.RandomNormalStaticLayerParams.prototype.stdDev = 0;
  12783. CoreML.Specification.RandomNormalDynamicLayerParams = class RandomNormalDynamicLayerParams {
  12784. static decode(reader, length) {
  12785. const message = new CoreML.Specification.RandomNormalDynamicLayerParams();
  12786. const end = length === undefined ? reader.length : reader.position + length;
  12787. while (reader.position < end) {
  12788. const tag = reader.uint32();
  12789. switch (tag >>> 3) {
  12790. case 1:
  12791. message.seed = reader.int64();
  12792. break;
  12793. case 2:
  12794. message.mean = reader.float();
  12795. break;
  12796. case 3:
  12797. message.stdDev = reader.float();
  12798. break;
  12799. default:
  12800. reader.skipType(tag & 7);
  12801. break;
  12802. }
  12803. }
  12804. return message;
  12805. }
  12806. static decodeText(reader) {
  12807. const message = new CoreML.Specification.RandomNormalDynamicLayerParams();
  12808. reader.start();
  12809. while (!reader.end()) {
  12810. const tag = reader.tag();
  12811. switch (tag) {
  12812. case "seed":
  12813. message.seed = reader.int64();
  12814. break;
  12815. case "mean":
  12816. message.mean = reader.float();
  12817. break;
  12818. case "stdDev":
  12819. message.stdDev = reader.float();
  12820. break;
  12821. default:
  12822. reader.field(tag, message);
  12823. break;
  12824. }
  12825. }
  12826. return message;
  12827. }
  12828. };
  12829. CoreML.Specification.RandomNormalDynamicLayerParams.prototype.seed = 0n;
  12830. CoreML.Specification.RandomNormalDynamicLayerParams.prototype.mean = 0;
  12831. CoreML.Specification.RandomNormalDynamicLayerParams.prototype.stdDev = 0;
  12832. CoreML.Specification.RandomUniformLikeLayerParams = class RandomUniformLikeLayerParams {
  12833. static decode(reader, length) {
  12834. const message = new CoreML.Specification.RandomUniformLikeLayerParams();
  12835. const end = length === undefined ? reader.length : reader.position + length;
  12836. while (reader.position < end) {
  12837. const tag = reader.uint32();
  12838. switch (tag >>> 3) {
  12839. case 1:
  12840. message.seed = reader.int64();
  12841. break;
  12842. case 2:
  12843. message.minVal = reader.float();
  12844. break;
  12845. case 3:
  12846. message.maxVal = reader.float();
  12847. break;
  12848. default:
  12849. reader.skipType(tag & 7);
  12850. break;
  12851. }
  12852. }
  12853. return message;
  12854. }
  12855. static decodeText(reader) {
  12856. const message = new CoreML.Specification.RandomUniformLikeLayerParams();
  12857. reader.start();
  12858. while (!reader.end()) {
  12859. const tag = reader.tag();
  12860. switch (tag) {
  12861. case "seed":
  12862. message.seed = reader.int64();
  12863. break;
  12864. case "minVal":
  12865. message.minVal = reader.float();
  12866. break;
  12867. case "maxVal":
  12868. message.maxVal = reader.float();
  12869. break;
  12870. default:
  12871. reader.field(tag, message);
  12872. break;
  12873. }
  12874. }
  12875. return message;
  12876. }
  12877. };
  12878. CoreML.Specification.RandomUniformLikeLayerParams.prototype.seed = 0n;
  12879. CoreML.Specification.RandomUniformLikeLayerParams.prototype.minVal = 0;
  12880. CoreML.Specification.RandomUniformLikeLayerParams.prototype.maxVal = 0;
  12881. CoreML.Specification.RandomUniformStaticLayerParams = class RandomUniformStaticLayerParams {
  12882. constructor() {
  12883. this.outputShape = [];
  12884. }
  12885. static decode(reader, length) {
  12886. const message = new CoreML.Specification.RandomUniformStaticLayerParams();
  12887. const end = length === undefined ? reader.length : reader.position + length;
  12888. while (reader.position < end) {
  12889. const tag = reader.uint32();
  12890. switch (tag >>> 3) {
  12891. case 1:
  12892. message.seed = reader.int64();
  12893. break;
  12894. case 2:
  12895. message.minVal = reader.float();
  12896. break;
  12897. case 3:
  12898. message.maxVal = reader.float();
  12899. break;
  12900. case 4:
  12901. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  12902. break;
  12903. default:
  12904. reader.skipType(tag & 7);
  12905. break;
  12906. }
  12907. }
  12908. return message;
  12909. }
  12910. static decodeText(reader) {
  12911. const message = new CoreML.Specification.RandomUniformStaticLayerParams();
  12912. reader.start();
  12913. while (!reader.end()) {
  12914. const tag = reader.tag();
  12915. switch (tag) {
  12916. case "seed":
  12917. message.seed = reader.int64();
  12918. break;
  12919. case "minVal":
  12920. message.minVal = reader.float();
  12921. break;
  12922. case "maxVal":
  12923. message.maxVal = reader.float();
  12924. break;
  12925. case "outputShape":
  12926. reader.array(message.outputShape, () => reader.uint64());
  12927. break;
  12928. default:
  12929. reader.field(tag, message);
  12930. break;
  12931. }
  12932. }
  12933. return message;
  12934. }
  12935. };
  12936. CoreML.Specification.RandomUniformStaticLayerParams.prototype.seed = 0n;
  12937. CoreML.Specification.RandomUniformStaticLayerParams.prototype.minVal = 0;
  12938. CoreML.Specification.RandomUniformStaticLayerParams.prototype.maxVal = 0;
  12939. CoreML.Specification.RandomUniformDynamicLayerParams = class RandomUniformDynamicLayerParams {
  12940. static decode(reader, length) {
  12941. const message = new CoreML.Specification.RandomUniformDynamicLayerParams();
  12942. const end = length === undefined ? reader.length : reader.position + length;
  12943. while (reader.position < end) {
  12944. const tag = reader.uint32();
  12945. switch (tag >>> 3) {
  12946. case 1:
  12947. message.seed = reader.int64();
  12948. break;
  12949. case 2:
  12950. message.minVal = reader.float();
  12951. break;
  12952. case 3:
  12953. message.maxVal = reader.float();
  12954. break;
  12955. default:
  12956. reader.skipType(tag & 7);
  12957. break;
  12958. }
  12959. }
  12960. return message;
  12961. }
  12962. static decodeText(reader) {
  12963. const message = new CoreML.Specification.RandomUniformDynamicLayerParams();
  12964. reader.start();
  12965. while (!reader.end()) {
  12966. const tag = reader.tag();
  12967. switch (tag) {
  12968. case "seed":
  12969. message.seed = reader.int64();
  12970. break;
  12971. case "minVal":
  12972. message.minVal = reader.float();
  12973. break;
  12974. case "maxVal":
  12975. message.maxVal = reader.float();
  12976. break;
  12977. default:
  12978. reader.field(tag, message);
  12979. break;
  12980. }
  12981. }
  12982. return message;
  12983. }
  12984. };
  12985. CoreML.Specification.RandomUniformDynamicLayerParams.prototype.seed = 0n;
  12986. CoreML.Specification.RandomUniformDynamicLayerParams.prototype.minVal = 0;
  12987. CoreML.Specification.RandomUniformDynamicLayerParams.prototype.maxVal = 0;
  12988. CoreML.Specification.RandomBernoulliLikeLayerParams = class RandomBernoulliLikeLayerParams {
  12989. static decode(reader, length) {
  12990. const message = new CoreML.Specification.RandomBernoulliLikeLayerParams();
  12991. const end = length === undefined ? reader.length : reader.position + length;
  12992. while (reader.position < end) {
  12993. const tag = reader.uint32();
  12994. switch (tag >>> 3) {
  12995. case 1:
  12996. message.seed = reader.int64();
  12997. break;
  12998. case 2:
  12999. message.prob = reader.float();
  13000. break;
  13001. default:
  13002. reader.skipType(tag & 7);
  13003. break;
  13004. }
  13005. }
  13006. return message;
  13007. }
  13008. static decodeText(reader) {
  13009. const message = new CoreML.Specification.RandomBernoulliLikeLayerParams();
  13010. reader.start();
  13011. while (!reader.end()) {
  13012. const tag = reader.tag();
  13013. switch (tag) {
  13014. case "seed":
  13015. message.seed = reader.int64();
  13016. break;
  13017. case "prob":
  13018. message.prob = reader.float();
  13019. break;
  13020. default:
  13021. reader.field(tag, message);
  13022. break;
  13023. }
  13024. }
  13025. return message;
  13026. }
  13027. };
  13028. CoreML.Specification.RandomBernoulliLikeLayerParams.prototype.seed = 0n;
  13029. CoreML.Specification.RandomBernoulliLikeLayerParams.prototype.prob = 0;
  13030. CoreML.Specification.RandomBernoulliStaticLayerParams = class RandomBernoulliStaticLayerParams {
  13031. constructor() {
  13032. this.outputShape = [];
  13033. }
  13034. static decode(reader, length) {
  13035. const message = new CoreML.Specification.RandomBernoulliStaticLayerParams();
  13036. const end = length === undefined ? reader.length : reader.position + length;
  13037. while (reader.position < end) {
  13038. const tag = reader.uint32();
  13039. switch (tag >>> 3) {
  13040. case 1:
  13041. message.seed = reader.int64();
  13042. break;
  13043. case 2:
  13044. message.prob = reader.float();
  13045. break;
  13046. case 3:
  13047. message.outputShape = reader.array(message.outputShape, () => reader.uint64(), tag);
  13048. break;
  13049. default:
  13050. reader.skipType(tag & 7);
  13051. break;
  13052. }
  13053. }
  13054. return message;
  13055. }
  13056. static decodeText(reader) {
  13057. const message = new CoreML.Specification.RandomBernoulliStaticLayerParams();
  13058. reader.start();
  13059. while (!reader.end()) {
  13060. const tag = reader.tag();
  13061. switch (tag) {
  13062. case "seed":
  13063. message.seed = reader.int64();
  13064. break;
  13065. case "prob":
  13066. message.prob = reader.float();
  13067. break;
  13068. case "outputShape":
  13069. reader.array(message.outputShape, () => reader.uint64());
  13070. break;
  13071. default:
  13072. reader.field(tag, message);
  13073. break;
  13074. }
  13075. }
  13076. return message;
  13077. }
  13078. };
  13079. CoreML.Specification.RandomBernoulliStaticLayerParams.prototype.seed = 0n;
  13080. CoreML.Specification.RandomBernoulliStaticLayerParams.prototype.prob = 0;
  13081. CoreML.Specification.RandomBernoulliDynamicLayerParams = class RandomBernoulliDynamicLayerParams {
  13082. static decode(reader, length) {
  13083. const message = new CoreML.Specification.RandomBernoulliDynamicLayerParams();
  13084. const end = length === undefined ? reader.length : reader.position + length;
  13085. while (reader.position < end) {
  13086. const tag = reader.uint32();
  13087. switch (tag >>> 3) {
  13088. case 1:
  13089. message.seed = reader.int64();
  13090. break;
  13091. case 2:
  13092. message.prob = reader.float();
  13093. break;
  13094. default:
  13095. reader.skipType(tag & 7);
  13096. break;
  13097. }
  13098. }
  13099. return message;
  13100. }
  13101. static decodeText(reader) {
  13102. const message = new CoreML.Specification.RandomBernoulliDynamicLayerParams();
  13103. reader.start();
  13104. while (!reader.end()) {
  13105. const tag = reader.tag();
  13106. switch (tag) {
  13107. case "seed":
  13108. message.seed = reader.int64();
  13109. break;
  13110. case "prob":
  13111. message.prob = reader.float();
  13112. break;
  13113. default:
  13114. reader.field(tag, message);
  13115. break;
  13116. }
  13117. }
  13118. return message;
  13119. }
  13120. };
  13121. CoreML.Specification.RandomBernoulliDynamicLayerParams.prototype.seed = 0n;
  13122. CoreML.Specification.RandomBernoulliDynamicLayerParams.prototype.prob = 0;
  13123. CoreML.Specification.CategoricalDistributionLayerParams = class CategoricalDistributionLayerParams {
  13124. static decode(reader, length) {
  13125. const message = new CoreML.Specification.CategoricalDistributionLayerParams();
  13126. const end = length === undefined ? reader.length : reader.position + length;
  13127. while (reader.position < end) {
  13128. const tag = reader.uint32();
  13129. switch (tag >>> 3) {
  13130. case 1:
  13131. message.seed = reader.int64();
  13132. break;
  13133. case 2:
  13134. message.numSamples = reader.int64();
  13135. break;
  13136. case 3:
  13137. message.isLogits = reader.bool();
  13138. break;
  13139. case 4:
  13140. message.eps = reader.float();
  13141. break;
  13142. case 5:
  13143. message.temperature = reader.float();
  13144. break;
  13145. default:
  13146. reader.skipType(tag & 7);
  13147. break;
  13148. }
  13149. }
  13150. return message;
  13151. }
  13152. static decodeText(reader) {
  13153. const message = new CoreML.Specification.CategoricalDistributionLayerParams();
  13154. reader.start();
  13155. while (!reader.end()) {
  13156. const tag = reader.tag();
  13157. switch (tag) {
  13158. case "seed":
  13159. message.seed = reader.int64();
  13160. break;
  13161. case "numSamples":
  13162. message.numSamples = reader.int64();
  13163. break;
  13164. case "isLogits":
  13165. message.isLogits = reader.bool();
  13166. break;
  13167. case "eps":
  13168. message.eps = reader.float();
  13169. break;
  13170. case "temperature":
  13171. message.temperature = reader.float();
  13172. break;
  13173. default:
  13174. reader.field(tag, message);
  13175. break;
  13176. }
  13177. }
  13178. return message;
  13179. }
  13180. };
  13181. CoreML.Specification.CategoricalDistributionLayerParams.prototype.seed = 0n;
  13182. CoreML.Specification.CategoricalDistributionLayerParams.prototype.numSamples = 0n;
  13183. CoreML.Specification.CategoricalDistributionLayerParams.prototype.isLogits = false;
  13184. CoreML.Specification.CategoricalDistributionLayerParams.prototype.eps = 0;
  13185. CoreML.Specification.CategoricalDistributionLayerParams.prototype.temperature = 0;
  13186. CoreML.Specification.ReduceL1LayerParams = class ReduceL1LayerParams {
  13187. constructor() {
  13188. this.axes = [];
  13189. }
  13190. static decode(reader, length) {
  13191. const message = new CoreML.Specification.ReduceL1LayerParams();
  13192. const end = length === undefined ? reader.length : reader.position + length;
  13193. while (reader.position < end) {
  13194. const tag = reader.uint32();
  13195. switch (tag >>> 3) {
  13196. case 1:
  13197. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13198. break;
  13199. case 2:
  13200. message.keepDims = reader.bool();
  13201. break;
  13202. case 3:
  13203. message.reduceAll = reader.bool();
  13204. break;
  13205. default:
  13206. reader.skipType(tag & 7);
  13207. break;
  13208. }
  13209. }
  13210. return message;
  13211. }
  13212. static decodeText(reader) {
  13213. const message = new CoreML.Specification.ReduceL1LayerParams();
  13214. reader.start();
  13215. while (!reader.end()) {
  13216. const tag = reader.tag();
  13217. switch (tag) {
  13218. case "axes":
  13219. reader.array(message.axes, () => reader.int64());
  13220. break;
  13221. case "keepDims":
  13222. message.keepDims = reader.bool();
  13223. break;
  13224. case "reduceAll":
  13225. message.reduceAll = reader.bool();
  13226. break;
  13227. default:
  13228. reader.field(tag, message);
  13229. break;
  13230. }
  13231. }
  13232. return message;
  13233. }
  13234. };
  13235. CoreML.Specification.ReduceL1LayerParams.prototype.keepDims = false;
  13236. CoreML.Specification.ReduceL1LayerParams.prototype.reduceAll = false;
  13237. CoreML.Specification.ReduceL2LayerParams = class ReduceL2LayerParams {
  13238. constructor() {
  13239. this.axes = [];
  13240. }
  13241. static decode(reader, length) {
  13242. const message = new CoreML.Specification.ReduceL2LayerParams();
  13243. const end = length === undefined ? reader.length : reader.position + length;
  13244. while (reader.position < end) {
  13245. const tag = reader.uint32();
  13246. switch (tag >>> 3) {
  13247. case 1:
  13248. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13249. break;
  13250. case 2:
  13251. message.keepDims = reader.bool();
  13252. break;
  13253. case 3:
  13254. message.reduceAll = reader.bool();
  13255. break;
  13256. default:
  13257. reader.skipType(tag & 7);
  13258. break;
  13259. }
  13260. }
  13261. return message;
  13262. }
  13263. static decodeText(reader) {
  13264. const message = new CoreML.Specification.ReduceL2LayerParams();
  13265. reader.start();
  13266. while (!reader.end()) {
  13267. const tag = reader.tag();
  13268. switch (tag) {
  13269. case "axes":
  13270. reader.array(message.axes, () => reader.int64());
  13271. break;
  13272. case "keepDims":
  13273. message.keepDims = reader.bool();
  13274. break;
  13275. case "reduceAll":
  13276. message.reduceAll = reader.bool();
  13277. break;
  13278. default:
  13279. reader.field(tag, message);
  13280. break;
  13281. }
  13282. }
  13283. return message;
  13284. }
  13285. };
  13286. CoreML.Specification.ReduceL2LayerParams.prototype.keepDims = false;
  13287. CoreML.Specification.ReduceL2LayerParams.prototype.reduceAll = false;
  13288. CoreML.Specification.ReduceMaxLayerParams = class ReduceMaxLayerParams {
  13289. constructor() {
  13290. this.axes = [];
  13291. }
  13292. static decode(reader, length) {
  13293. const message = new CoreML.Specification.ReduceMaxLayerParams();
  13294. const end = length === undefined ? reader.length : reader.position + length;
  13295. while (reader.position < end) {
  13296. const tag = reader.uint32();
  13297. switch (tag >>> 3) {
  13298. case 1:
  13299. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13300. break;
  13301. case 2:
  13302. message.keepDims = reader.bool();
  13303. break;
  13304. case 3:
  13305. message.reduceAll = reader.bool();
  13306. break;
  13307. default:
  13308. reader.skipType(tag & 7);
  13309. break;
  13310. }
  13311. }
  13312. return message;
  13313. }
  13314. static decodeText(reader) {
  13315. const message = new CoreML.Specification.ReduceMaxLayerParams();
  13316. reader.start();
  13317. while (!reader.end()) {
  13318. const tag = reader.tag();
  13319. switch (tag) {
  13320. case "axes":
  13321. reader.array(message.axes, () => reader.int64());
  13322. break;
  13323. case "keepDims":
  13324. message.keepDims = reader.bool();
  13325. break;
  13326. case "reduceAll":
  13327. message.reduceAll = reader.bool();
  13328. break;
  13329. default:
  13330. reader.field(tag, message);
  13331. break;
  13332. }
  13333. }
  13334. return message;
  13335. }
  13336. };
  13337. CoreML.Specification.ReduceMaxLayerParams.prototype.keepDims = false;
  13338. CoreML.Specification.ReduceMaxLayerParams.prototype.reduceAll = false;
  13339. CoreML.Specification.ReduceMinLayerParams = class ReduceMinLayerParams {
  13340. constructor() {
  13341. this.axes = [];
  13342. }
  13343. static decode(reader, length) {
  13344. const message = new CoreML.Specification.ReduceMinLayerParams();
  13345. const end = length === undefined ? reader.length : reader.position + length;
  13346. while (reader.position < end) {
  13347. const tag = reader.uint32();
  13348. switch (tag >>> 3) {
  13349. case 1:
  13350. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13351. break;
  13352. case 2:
  13353. message.keepDims = reader.bool();
  13354. break;
  13355. case 3:
  13356. message.reduceAll = reader.bool();
  13357. break;
  13358. default:
  13359. reader.skipType(tag & 7);
  13360. break;
  13361. }
  13362. }
  13363. return message;
  13364. }
  13365. static decodeText(reader) {
  13366. const message = new CoreML.Specification.ReduceMinLayerParams();
  13367. reader.start();
  13368. while (!reader.end()) {
  13369. const tag = reader.tag();
  13370. switch (tag) {
  13371. case "axes":
  13372. reader.array(message.axes, () => reader.int64());
  13373. break;
  13374. case "keepDims":
  13375. message.keepDims = reader.bool();
  13376. break;
  13377. case "reduceAll":
  13378. message.reduceAll = reader.bool();
  13379. break;
  13380. default:
  13381. reader.field(tag, message);
  13382. break;
  13383. }
  13384. }
  13385. return message;
  13386. }
  13387. };
  13388. CoreML.Specification.ReduceMinLayerParams.prototype.keepDims = false;
  13389. CoreML.Specification.ReduceMinLayerParams.prototype.reduceAll = false;
  13390. CoreML.Specification.ReduceSumLayerParams = class ReduceSumLayerParams {
  13391. constructor() {
  13392. this.axes = [];
  13393. }
  13394. static decode(reader, length) {
  13395. const message = new CoreML.Specification.ReduceSumLayerParams();
  13396. const end = length === undefined ? reader.length : reader.position + length;
  13397. while (reader.position < end) {
  13398. const tag = reader.uint32();
  13399. switch (tag >>> 3) {
  13400. case 1:
  13401. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13402. break;
  13403. case 2:
  13404. message.keepDims = reader.bool();
  13405. break;
  13406. case 3:
  13407. message.reduceAll = reader.bool();
  13408. break;
  13409. default:
  13410. reader.skipType(tag & 7);
  13411. break;
  13412. }
  13413. }
  13414. return message;
  13415. }
  13416. static decodeText(reader) {
  13417. const message = new CoreML.Specification.ReduceSumLayerParams();
  13418. reader.start();
  13419. while (!reader.end()) {
  13420. const tag = reader.tag();
  13421. switch (tag) {
  13422. case "axes":
  13423. reader.array(message.axes, () => reader.int64());
  13424. break;
  13425. case "keepDims":
  13426. message.keepDims = reader.bool();
  13427. break;
  13428. case "reduceAll":
  13429. message.reduceAll = reader.bool();
  13430. break;
  13431. default:
  13432. reader.field(tag, message);
  13433. break;
  13434. }
  13435. }
  13436. return message;
  13437. }
  13438. };
  13439. CoreML.Specification.ReduceSumLayerParams.prototype.keepDims = false;
  13440. CoreML.Specification.ReduceSumLayerParams.prototype.reduceAll = false;
  13441. CoreML.Specification.ReduceProdLayerParams = class ReduceProdLayerParams {
  13442. constructor() {
  13443. this.axes = [];
  13444. }
  13445. static decode(reader, length) {
  13446. const message = new CoreML.Specification.ReduceProdLayerParams();
  13447. const end = length === undefined ? reader.length : reader.position + length;
  13448. while (reader.position < end) {
  13449. const tag = reader.uint32();
  13450. switch (tag >>> 3) {
  13451. case 1:
  13452. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13453. break;
  13454. case 2:
  13455. message.keepDims = reader.bool();
  13456. break;
  13457. case 3:
  13458. message.reduceAll = reader.bool();
  13459. break;
  13460. default:
  13461. reader.skipType(tag & 7);
  13462. break;
  13463. }
  13464. }
  13465. return message;
  13466. }
  13467. static decodeText(reader) {
  13468. const message = new CoreML.Specification.ReduceProdLayerParams();
  13469. reader.start();
  13470. while (!reader.end()) {
  13471. const tag = reader.tag();
  13472. switch (tag) {
  13473. case "axes":
  13474. reader.array(message.axes, () => reader.int64());
  13475. break;
  13476. case "keepDims":
  13477. message.keepDims = reader.bool();
  13478. break;
  13479. case "reduceAll":
  13480. message.reduceAll = reader.bool();
  13481. break;
  13482. default:
  13483. reader.field(tag, message);
  13484. break;
  13485. }
  13486. }
  13487. return message;
  13488. }
  13489. };
  13490. CoreML.Specification.ReduceProdLayerParams.prototype.keepDims = false;
  13491. CoreML.Specification.ReduceProdLayerParams.prototype.reduceAll = false;
  13492. CoreML.Specification.ReduceMeanLayerParams = class ReduceMeanLayerParams {
  13493. constructor() {
  13494. this.axes = [];
  13495. }
  13496. static decode(reader, length) {
  13497. const message = new CoreML.Specification.ReduceMeanLayerParams();
  13498. const end = length === undefined ? reader.length : reader.position + length;
  13499. while (reader.position < end) {
  13500. const tag = reader.uint32();
  13501. switch (tag >>> 3) {
  13502. case 1:
  13503. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13504. break;
  13505. case 2:
  13506. message.keepDims = reader.bool();
  13507. break;
  13508. case 3:
  13509. message.reduceAll = reader.bool();
  13510. break;
  13511. default:
  13512. reader.skipType(tag & 7);
  13513. break;
  13514. }
  13515. }
  13516. return message;
  13517. }
  13518. static decodeText(reader) {
  13519. const message = new CoreML.Specification.ReduceMeanLayerParams();
  13520. reader.start();
  13521. while (!reader.end()) {
  13522. const tag = reader.tag();
  13523. switch (tag) {
  13524. case "axes":
  13525. reader.array(message.axes, () => reader.int64());
  13526. break;
  13527. case "keepDims":
  13528. message.keepDims = reader.bool();
  13529. break;
  13530. case "reduceAll":
  13531. message.reduceAll = reader.bool();
  13532. break;
  13533. default:
  13534. reader.field(tag, message);
  13535. break;
  13536. }
  13537. }
  13538. return message;
  13539. }
  13540. };
  13541. CoreML.Specification.ReduceMeanLayerParams.prototype.keepDims = false;
  13542. CoreML.Specification.ReduceMeanLayerParams.prototype.reduceAll = false;
  13543. CoreML.Specification.ReduceLogSumLayerParams = class ReduceLogSumLayerParams {
  13544. constructor() {
  13545. this.axes = [];
  13546. }
  13547. static decode(reader, length) {
  13548. const message = new CoreML.Specification.ReduceLogSumLayerParams();
  13549. const end = length === undefined ? reader.length : reader.position + length;
  13550. while (reader.position < end) {
  13551. const tag = reader.uint32();
  13552. switch (tag >>> 3) {
  13553. case 1:
  13554. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13555. break;
  13556. case 2:
  13557. message.keepDims = reader.bool();
  13558. break;
  13559. case 3:
  13560. message.reduceAll = reader.bool();
  13561. break;
  13562. default:
  13563. reader.skipType(tag & 7);
  13564. break;
  13565. }
  13566. }
  13567. return message;
  13568. }
  13569. static decodeText(reader) {
  13570. const message = new CoreML.Specification.ReduceLogSumLayerParams();
  13571. reader.start();
  13572. while (!reader.end()) {
  13573. const tag = reader.tag();
  13574. switch (tag) {
  13575. case "axes":
  13576. reader.array(message.axes, () => reader.int64());
  13577. break;
  13578. case "keepDims":
  13579. message.keepDims = reader.bool();
  13580. break;
  13581. case "reduceAll":
  13582. message.reduceAll = reader.bool();
  13583. break;
  13584. default:
  13585. reader.field(tag, message);
  13586. break;
  13587. }
  13588. }
  13589. return message;
  13590. }
  13591. };
  13592. CoreML.Specification.ReduceLogSumLayerParams.prototype.keepDims = false;
  13593. CoreML.Specification.ReduceLogSumLayerParams.prototype.reduceAll = false;
  13594. CoreML.Specification.ReduceSumSquareLayerParams = class ReduceSumSquareLayerParams {
  13595. constructor() {
  13596. this.axes = [];
  13597. }
  13598. static decode(reader, length) {
  13599. const message = new CoreML.Specification.ReduceSumSquareLayerParams();
  13600. const end = length === undefined ? reader.length : reader.position + length;
  13601. while (reader.position < end) {
  13602. const tag = reader.uint32();
  13603. switch (tag >>> 3) {
  13604. case 1:
  13605. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13606. break;
  13607. case 2:
  13608. message.keepDims = reader.bool();
  13609. break;
  13610. case 3:
  13611. message.reduceAll = reader.bool();
  13612. break;
  13613. default:
  13614. reader.skipType(tag & 7);
  13615. break;
  13616. }
  13617. }
  13618. return message;
  13619. }
  13620. static decodeText(reader) {
  13621. const message = new CoreML.Specification.ReduceSumSquareLayerParams();
  13622. reader.start();
  13623. while (!reader.end()) {
  13624. const tag = reader.tag();
  13625. switch (tag) {
  13626. case "axes":
  13627. reader.array(message.axes, () => reader.int64());
  13628. break;
  13629. case "keepDims":
  13630. message.keepDims = reader.bool();
  13631. break;
  13632. case "reduceAll":
  13633. message.reduceAll = reader.bool();
  13634. break;
  13635. default:
  13636. reader.field(tag, message);
  13637. break;
  13638. }
  13639. }
  13640. return message;
  13641. }
  13642. };
  13643. CoreML.Specification.ReduceSumSquareLayerParams.prototype.keepDims = false;
  13644. CoreML.Specification.ReduceSumSquareLayerParams.prototype.reduceAll = false;
  13645. CoreML.Specification.ReduceLogSumExpLayerParams = class ReduceLogSumExpLayerParams {
  13646. constructor() {
  13647. this.axes = [];
  13648. }
  13649. static decode(reader, length) {
  13650. const message = new CoreML.Specification.ReduceLogSumExpLayerParams();
  13651. const end = length === undefined ? reader.length : reader.position + length;
  13652. while (reader.position < end) {
  13653. const tag = reader.uint32();
  13654. switch (tag >>> 3) {
  13655. case 1:
  13656. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13657. break;
  13658. case 2:
  13659. message.keepDims = reader.bool();
  13660. break;
  13661. case 3:
  13662. message.reduceAll = reader.bool();
  13663. break;
  13664. default:
  13665. reader.skipType(tag & 7);
  13666. break;
  13667. }
  13668. }
  13669. return message;
  13670. }
  13671. static decodeText(reader) {
  13672. const message = new CoreML.Specification.ReduceLogSumExpLayerParams();
  13673. reader.start();
  13674. while (!reader.end()) {
  13675. const tag = reader.tag();
  13676. switch (tag) {
  13677. case "axes":
  13678. reader.array(message.axes, () => reader.int64());
  13679. break;
  13680. case "keepDims":
  13681. message.keepDims = reader.bool();
  13682. break;
  13683. case "reduceAll":
  13684. message.reduceAll = reader.bool();
  13685. break;
  13686. default:
  13687. reader.field(tag, message);
  13688. break;
  13689. }
  13690. }
  13691. return message;
  13692. }
  13693. };
  13694. CoreML.Specification.ReduceLogSumExpLayerParams.prototype.keepDims = false;
  13695. CoreML.Specification.ReduceLogSumExpLayerParams.prototype.reduceAll = false;
  13696. CoreML.Specification.ExpandDimsLayerParams = class ExpandDimsLayerParams {
  13697. constructor() {
  13698. this.axes = [];
  13699. }
  13700. static decode(reader, length) {
  13701. const message = new CoreML.Specification.ExpandDimsLayerParams();
  13702. const end = length === undefined ? reader.length : reader.position + length;
  13703. while (reader.position < end) {
  13704. const tag = reader.uint32();
  13705. switch (tag >>> 3) {
  13706. case 1:
  13707. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13708. break;
  13709. default:
  13710. reader.skipType(tag & 7);
  13711. break;
  13712. }
  13713. }
  13714. return message;
  13715. }
  13716. static decodeText(reader) {
  13717. const message = new CoreML.Specification.ExpandDimsLayerParams();
  13718. reader.start();
  13719. while (!reader.end()) {
  13720. const tag = reader.tag();
  13721. switch (tag) {
  13722. case "axes":
  13723. reader.array(message.axes, () => reader.int64());
  13724. break;
  13725. default:
  13726. reader.field(tag, message);
  13727. break;
  13728. }
  13729. }
  13730. return message;
  13731. }
  13732. };
  13733. CoreML.Specification.FlattenTo2DLayerParams = class FlattenTo2DLayerParams {
  13734. static decode(reader, length) {
  13735. const message = new CoreML.Specification.FlattenTo2DLayerParams();
  13736. const end = length === undefined ? reader.length : reader.position + length;
  13737. while (reader.position < end) {
  13738. const tag = reader.uint32();
  13739. switch (tag >>> 3) {
  13740. case 1:
  13741. message.axis = reader.int64();
  13742. break;
  13743. default:
  13744. reader.skipType(tag & 7);
  13745. break;
  13746. }
  13747. }
  13748. return message;
  13749. }
  13750. static decodeText(reader) {
  13751. const message = new CoreML.Specification.FlattenTo2DLayerParams();
  13752. reader.start();
  13753. while (!reader.end()) {
  13754. const tag = reader.tag();
  13755. switch (tag) {
  13756. case "axis":
  13757. message.axis = reader.int64();
  13758. break;
  13759. default:
  13760. reader.field(tag, message);
  13761. break;
  13762. }
  13763. }
  13764. return message;
  13765. }
  13766. };
  13767. CoreML.Specification.FlattenTo2DLayerParams.prototype.axis = 0n;
  13768. CoreML.Specification.ReshapeStaticLayerParams = class ReshapeStaticLayerParams {
  13769. constructor() {
  13770. this.targetShape = [];
  13771. }
  13772. static decode(reader, length) {
  13773. const message = new CoreML.Specification.ReshapeStaticLayerParams();
  13774. const end = length === undefined ? reader.length : reader.position + length;
  13775. while (reader.position < end) {
  13776. const tag = reader.uint32();
  13777. switch (tag >>> 3) {
  13778. case 1:
  13779. message.targetShape = reader.array(message.targetShape, () => reader.int64(), tag);
  13780. break;
  13781. default:
  13782. reader.skipType(tag & 7);
  13783. break;
  13784. }
  13785. }
  13786. return message;
  13787. }
  13788. static decodeText(reader) {
  13789. const message = new CoreML.Specification.ReshapeStaticLayerParams();
  13790. reader.start();
  13791. while (!reader.end()) {
  13792. const tag = reader.tag();
  13793. switch (tag) {
  13794. case "targetShape":
  13795. reader.array(message.targetShape, () => reader.int64());
  13796. break;
  13797. default:
  13798. reader.field(tag, message);
  13799. break;
  13800. }
  13801. }
  13802. return message;
  13803. }
  13804. };
  13805. CoreML.Specification.ReshapeLikeLayerParams = class ReshapeLikeLayerParams {
  13806. static decode(reader, length) {
  13807. const message = new CoreML.Specification.ReshapeLikeLayerParams();
  13808. const end = length === undefined ? reader.length : reader.position + length;
  13809. while (reader.position < end) {
  13810. const tag = reader.uint32();
  13811. switch (tag >>> 3) {
  13812. default:
  13813. reader.skipType(tag & 7);
  13814. break;
  13815. }
  13816. }
  13817. return message;
  13818. }
  13819. static decodeText(reader) {
  13820. const message = new CoreML.Specification.ReshapeLikeLayerParams();
  13821. reader.start();
  13822. while (!reader.end()) {
  13823. const tag = reader.tag();
  13824. switch (tag) {
  13825. default:
  13826. reader.field(tag, message);
  13827. break;
  13828. }
  13829. }
  13830. return message;
  13831. }
  13832. };
  13833. CoreML.Specification.ReshapeDynamicLayerParams = class ReshapeDynamicLayerParams {
  13834. static decode(reader, length) {
  13835. const message = new CoreML.Specification.ReshapeDynamicLayerParams();
  13836. const end = length === undefined ? reader.length : reader.position + length;
  13837. while (reader.position < end) {
  13838. const tag = reader.uint32();
  13839. switch (tag >>> 3) {
  13840. default:
  13841. reader.skipType(tag & 7);
  13842. break;
  13843. }
  13844. }
  13845. return message;
  13846. }
  13847. static decodeText(reader) {
  13848. const message = new CoreML.Specification.ReshapeDynamicLayerParams();
  13849. reader.start();
  13850. while (!reader.end()) {
  13851. const tag = reader.tag();
  13852. switch (tag) {
  13853. default:
  13854. reader.field(tag, message);
  13855. break;
  13856. }
  13857. }
  13858. return message;
  13859. }
  13860. };
  13861. CoreML.Specification.SqueezeLayerParams = class SqueezeLayerParams {
  13862. constructor() {
  13863. this.axes = [];
  13864. }
  13865. static decode(reader, length) {
  13866. const message = new CoreML.Specification.SqueezeLayerParams();
  13867. const end = length === undefined ? reader.length : reader.position + length;
  13868. while (reader.position < end) {
  13869. const tag = reader.uint32();
  13870. switch (tag >>> 3) {
  13871. case 1:
  13872. message.axes = reader.array(message.axes, () => reader.int64(), tag);
  13873. break;
  13874. case 2:
  13875. message.squeezeAll = reader.bool();
  13876. break;
  13877. default:
  13878. reader.skipType(tag & 7);
  13879. break;
  13880. }
  13881. }
  13882. return message;
  13883. }
  13884. static decodeText(reader) {
  13885. const message = new CoreML.Specification.SqueezeLayerParams();
  13886. reader.start();
  13887. while (!reader.end()) {
  13888. const tag = reader.tag();
  13889. switch (tag) {
  13890. case "axes":
  13891. reader.array(message.axes, () => reader.int64());
  13892. break;
  13893. case "squeezeAll":
  13894. message.squeezeAll = reader.bool();
  13895. break;
  13896. default:
  13897. reader.field(tag, message);
  13898. break;
  13899. }
  13900. }
  13901. return message;
  13902. }
  13903. };
  13904. CoreML.Specification.SqueezeLayerParams.prototype.squeezeAll = false;
  13905. CoreML.Specification.TopKLayerParams = class TopKLayerParams {
  13906. static decode(reader, length) {
  13907. const message = new CoreML.Specification.TopKLayerParams();
  13908. const end = length === undefined ? reader.length : reader.position + length;
  13909. while (reader.position < end) {
  13910. const tag = reader.uint32();
  13911. switch (tag >>> 3) {
  13912. case 1:
  13913. message.axis = reader.int64();
  13914. break;
  13915. case 2:
  13916. message.K = reader.uint64();
  13917. break;
  13918. case 3:
  13919. message.useBottomK = reader.bool();
  13920. break;
  13921. default:
  13922. reader.skipType(tag & 7);
  13923. break;
  13924. }
  13925. }
  13926. return message;
  13927. }
  13928. static decodeText(reader) {
  13929. const message = new CoreML.Specification.TopKLayerParams();
  13930. reader.start();
  13931. while (!reader.end()) {
  13932. const tag = reader.tag();
  13933. switch (tag) {
  13934. case "axis":
  13935. message.axis = reader.int64();
  13936. break;
  13937. case "K":
  13938. message.K = reader.uint64();
  13939. break;
  13940. case "useBottomK":
  13941. message.useBottomK = reader.bool();
  13942. break;
  13943. default:
  13944. reader.field(tag, message);
  13945. break;
  13946. }
  13947. }
  13948. return message;
  13949. }
  13950. };
  13951. CoreML.Specification.TopKLayerParams.prototype.axis = 0n;
  13952. CoreML.Specification.TopKLayerParams.prototype.K = 0n;
  13953. CoreML.Specification.TopKLayerParams.prototype.useBottomK = false;
  13954. CoreML.Specification.ArgMaxLayerParams = class ArgMaxLayerParams {
  13955. static decode(reader, length) {
  13956. const message = new CoreML.Specification.ArgMaxLayerParams();
  13957. const end = length === undefined ? reader.length : reader.position + length;
  13958. while (reader.position < end) {
  13959. const tag = reader.uint32();
  13960. switch (tag >>> 3) {
  13961. case 1:
  13962. message.axis = reader.int64();
  13963. break;
  13964. case 2:
  13965. message.removeDim = reader.bool();
  13966. break;
  13967. default:
  13968. reader.skipType(tag & 7);
  13969. break;
  13970. }
  13971. }
  13972. return message;
  13973. }
  13974. static decodeText(reader) {
  13975. const message = new CoreML.Specification.ArgMaxLayerParams();
  13976. reader.start();
  13977. while (!reader.end()) {
  13978. const tag = reader.tag();
  13979. switch (tag) {
  13980. case "axis":
  13981. message.axis = reader.int64();
  13982. break;
  13983. case "removeDim":
  13984. message.removeDim = reader.bool();
  13985. break;
  13986. default:
  13987. reader.field(tag, message);
  13988. break;
  13989. }
  13990. }
  13991. return message;
  13992. }
  13993. };
  13994. CoreML.Specification.ArgMaxLayerParams.prototype.axis = 0n;
  13995. CoreML.Specification.ArgMaxLayerParams.prototype.removeDim = false;
  13996. CoreML.Specification.ArgMinLayerParams = class ArgMinLayerParams {
  13997. static decode(reader, length) {
  13998. const message = new CoreML.Specification.ArgMinLayerParams();
  13999. const end = length === undefined ? reader.length : reader.position + length;
  14000. while (reader.position < end) {
  14001. const tag = reader.uint32();
  14002. switch (tag >>> 3) {
  14003. case 1:
  14004. message.axis = reader.int64();
  14005. break;
  14006. case 2:
  14007. message.removeDim = reader.bool();
  14008. break;
  14009. default:
  14010. reader.skipType(tag & 7);
  14011. break;
  14012. }
  14013. }
  14014. return message;
  14015. }
  14016. static decodeText(reader) {
  14017. const message = new CoreML.Specification.ArgMinLayerParams();
  14018. reader.start();
  14019. while (!reader.end()) {
  14020. const tag = reader.tag();
  14021. switch (tag) {
  14022. case "axis":
  14023. message.axis = reader.int64();
  14024. break;
  14025. case "removeDim":
  14026. message.removeDim = reader.bool();
  14027. break;
  14028. default:
  14029. reader.field(tag, message);
  14030. break;
  14031. }
  14032. }
  14033. return message;
  14034. }
  14035. };
  14036. CoreML.Specification.ArgMinLayerParams.prototype.axis = 0n;
  14037. CoreML.Specification.ArgMinLayerParams.prototype.removeDim = false;
  14038. CoreML.Specification.SplitNDLayerParams = class SplitNDLayerParams {
  14039. constructor() {
  14040. this.splitSizes = [];
  14041. }
  14042. static decode(reader, length) {
  14043. const message = new CoreML.Specification.SplitNDLayerParams();
  14044. const end = length === undefined ? reader.length : reader.position + length;
  14045. while (reader.position < end) {
  14046. const tag = reader.uint32();
  14047. switch (tag >>> 3) {
  14048. case 1:
  14049. message.axis = reader.int64();
  14050. break;
  14051. case 2:
  14052. message.numSplits = reader.uint64();
  14053. break;
  14054. case 3:
  14055. message.splitSizes = reader.array(message.splitSizes, () => reader.uint64(), tag);
  14056. break;
  14057. default:
  14058. reader.skipType(tag & 7);
  14059. break;
  14060. }
  14061. }
  14062. return message;
  14063. }
  14064. static decodeText(reader) {
  14065. const message = new CoreML.Specification.SplitNDLayerParams();
  14066. reader.start();
  14067. while (!reader.end()) {
  14068. const tag = reader.tag();
  14069. switch (tag) {
  14070. case "axis":
  14071. message.axis = reader.int64();
  14072. break;
  14073. case "numSplits":
  14074. message.numSplits = reader.uint64();
  14075. break;
  14076. case "splitSizes":
  14077. reader.array(message.splitSizes, () => reader.uint64());
  14078. break;
  14079. default:
  14080. reader.field(tag, message);
  14081. break;
  14082. }
  14083. }
  14084. return message;
  14085. }
  14086. };
  14087. CoreML.Specification.SplitNDLayerParams.prototype.axis = 0n;
  14088. CoreML.Specification.SplitNDLayerParams.prototype.numSplits = 0n;
  14089. CoreML.Specification.CeilLayerParams = class CeilLayerParams {
  14090. static decode(reader, length) {
  14091. const message = new CoreML.Specification.CeilLayerParams();
  14092. const end = length === undefined ? reader.length : reader.position + length;
  14093. while (reader.position < end) {
  14094. const tag = reader.uint32();
  14095. switch (tag >>> 3) {
  14096. default:
  14097. reader.skipType(tag & 7);
  14098. break;
  14099. }
  14100. }
  14101. return message;
  14102. }
  14103. static decodeText(reader) {
  14104. const message = new CoreML.Specification.CeilLayerParams();
  14105. reader.start();
  14106. while (!reader.end()) {
  14107. const tag = reader.tag();
  14108. switch (tag) {
  14109. default:
  14110. reader.field(tag, message);
  14111. break;
  14112. }
  14113. }
  14114. return message;
  14115. }
  14116. };
  14117. CoreML.Specification.RoundLayerParams = class RoundLayerParams {
  14118. static decode(reader, length) {
  14119. const message = new CoreML.Specification.RoundLayerParams();
  14120. const end = length === undefined ? reader.length : reader.position + length;
  14121. while (reader.position < end) {
  14122. const tag = reader.uint32();
  14123. switch (tag >>> 3) {
  14124. default:
  14125. reader.skipType(tag & 7);
  14126. break;
  14127. }
  14128. }
  14129. return message;
  14130. }
  14131. static decodeText(reader) {
  14132. const message = new CoreML.Specification.RoundLayerParams();
  14133. reader.start();
  14134. while (!reader.end()) {
  14135. const tag = reader.tag();
  14136. switch (tag) {
  14137. default:
  14138. reader.field(tag, message);
  14139. break;
  14140. }
  14141. }
  14142. return message;
  14143. }
  14144. };
  14145. CoreML.Specification.FloorLayerParams = class FloorLayerParams {
  14146. static decode(reader, length) {
  14147. const message = new CoreML.Specification.FloorLayerParams();
  14148. const end = length === undefined ? reader.length : reader.position + length;
  14149. while (reader.position < end) {
  14150. const tag = reader.uint32();
  14151. switch (tag >>> 3) {
  14152. default:
  14153. reader.skipType(tag & 7);
  14154. break;
  14155. }
  14156. }
  14157. return message;
  14158. }
  14159. static decodeText(reader) {
  14160. const message = new CoreML.Specification.FloorLayerParams();
  14161. reader.start();
  14162. while (!reader.end()) {
  14163. const tag = reader.tag();
  14164. switch (tag) {
  14165. default:
  14166. reader.field(tag, message);
  14167. break;
  14168. }
  14169. }
  14170. return message;
  14171. }
  14172. };
  14173. CoreML.Specification.SignLayerParams = class SignLayerParams {
  14174. static decode(reader, length) {
  14175. const message = new CoreML.Specification.SignLayerParams();
  14176. const end = length === undefined ? reader.length : reader.position + length;
  14177. while (reader.position < end) {
  14178. const tag = reader.uint32();
  14179. switch (tag >>> 3) {
  14180. default:
  14181. reader.skipType(tag & 7);
  14182. break;
  14183. }
  14184. }
  14185. return message;
  14186. }
  14187. static decodeText(reader) {
  14188. const message = new CoreML.Specification.SignLayerParams();
  14189. reader.start();
  14190. while (!reader.end()) {
  14191. const tag = reader.tag();
  14192. switch (tag) {
  14193. default:
  14194. reader.field(tag, message);
  14195. break;
  14196. }
  14197. }
  14198. return message;
  14199. }
  14200. };
  14201. CoreML.Specification.ClipLayerParams = class ClipLayerParams {
  14202. static decode(reader, length) {
  14203. const message = new CoreML.Specification.ClipLayerParams();
  14204. const end = length === undefined ? reader.length : reader.position + length;
  14205. while (reader.position < end) {
  14206. const tag = reader.uint32();
  14207. switch (tag >>> 3) {
  14208. case 1:
  14209. message.minVal = reader.float();
  14210. break;
  14211. case 2:
  14212. message.maxVal = reader.float();
  14213. break;
  14214. default:
  14215. reader.skipType(tag & 7);
  14216. break;
  14217. }
  14218. }
  14219. return message;
  14220. }
  14221. static decodeText(reader) {
  14222. const message = new CoreML.Specification.ClipLayerParams();
  14223. reader.start();
  14224. while (!reader.end()) {
  14225. const tag = reader.tag();
  14226. switch (tag) {
  14227. case "minVal":
  14228. message.minVal = reader.float();
  14229. break;
  14230. case "maxVal":
  14231. message.maxVal = reader.float();
  14232. break;
  14233. default:
  14234. reader.field(tag, message);
  14235. break;
  14236. }
  14237. }
  14238. return message;
  14239. }
  14240. };
  14241. CoreML.Specification.ClipLayerParams.prototype.minVal = 0;
  14242. CoreML.Specification.ClipLayerParams.prototype.maxVal = 0;
  14243. CoreML.Specification.SliceStaticLayerParams = class SliceStaticLayerParams {
  14244. constructor() {
  14245. this.beginIds = [];
  14246. this.beginMasks = [];
  14247. this.endIds = [];
  14248. this.endMasks = [];
  14249. this.strides = [];
  14250. this.squeezeMasks = [];
  14251. }
  14252. static decode(reader, length) {
  14253. const message = new CoreML.Specification.SliceStaticLayerParams();
  14254. const end = length === undefined ? reader.length : reader.position + length;
  14255. while (reader.position < end) {
  14256. const tag = reader.uint32();
  14257. switch (tag >>> 3) {
  14258. case 1:
  14259. message.beginIds = reader.array(message.beginIds, () => reader.int64(), tag);
  14260. break;
  14261. case 2:
  14262. message.beginMasks = reader.array(message.beginMasks, () => reader.bool(), tag);
  14263. break;
  14264. case 3:
  14265. message.endIds = reader.array(message.endIds, () => reader.int64(), tag);
  14266. break;
  14267. case 4:
  14268. message.endMasks = reader.array(message.endMasks, () => reader.bool(), tag);
  14269. break;
  14270. case 5:
  14271. message.strides = reader.array(message.strides, () => reader.int64(), tag);
  14272. break;
  14273. case 6:
  14274. message.squeezeMasks = reader.array(message.squeezeMasks, () => reader.bool(), tag);
  14275. break;
  14276. default:
  14277. reader.skipType(tag & 7);
  14278. break;
  14279. }
  14280. }
  14281. return message;
  14282. }
  14283. static decodeText(reader) {
  14284. const message = new CoreML.Specification.SliceStaticLayerParams();
  14285. reader.start();
  14286. while (!reader.end()) {
  14287. const tag = reader.tag();
  14288. switch (tag) {
  14289. case "beginIds":
  14290. reader.array(message.beginIds, () => reader.int64());
  14291. break;
  14292. case "beginMasks":
  14293. reader.array(message.beginMasks, () => reader.bool());
  14294. break;
  14295. case "endIds":
  14296. reader.array(message.endIds, () => reader.int64());
  14297. break;
  14298. case "endMasks":
  14299. reader.array(message.endMasks, () => reader.bool());
  14300. break;
  14301. case "strides":
  14302. reader.array(message.strides, () => reader.int64());
  14303. break;
  14304. case "squeezeMasks":
  14305. reader.array(message.squeezeMasks, () => reader.bool());
  14306. break;
  14307. default:
  14308. reader.field(tag, message);
  14309. break;
  14310. }
  14311. }
  14312. return message;
  14313. }
  14314. };
  14315. CoreML.Specification.SliceDynamicLayerParams = class SliceDynamicLayerParams {
  14316. constructor() {
  14317. this.beginMasks = [];
  14318. this.endIds = [];
  14319. this.endMasks = [];
  14320. this.strides = [];
  14321. this.squeezeMasks = [];
  14322. }
  14323. static decode(reader, length) {
  14324. const message = new CoreML.Specification.SliceDynamicLayerParams();
  14325. const end = length === undefined ? reader.length : reader.position + length;
  14326. while (reader.position < end) {
  14327. const tag = reader.uint32();
  14328. switch (tag >>> 3) {
  14329. case 2:
  14330. message.beginMasks = reader.array(message.beginMasks, () => reader.bool(), tag);
  14331. break;
  14332. case 3:
  14333. message.endIds = reader.array(message.endIds, () => reader.int64(), tag);
  14334. break;
  14335. case 4:
  14336. message.endMasks = reader.array(message.endMasks, () => reader.bool(), tag);
  14337. break;
  14338. case 5:
  14339. message.strides = reader.array(message.strides, () => reader.int64(), tag);
  14340. break;
  14341. case 6:
  14342. message.squeezeMasks = reader.array(message.squeezeMasks, () => reader.bool(), tag);
  14343. break;
  14344. default:
  14345. reader.skipType(tag & 7);
  14346. break;
  14347. }
  14348. }
  14349. return message;
  14350. }
  14351. static decodeText(reader) {
  14352. const message = new CoreML.Specification.SliceDynamicLayerParams();
  14353. reader.start();
  14354. while (!reader.end()) {
  14355. const tag = reader.tag();
  14356. switch (tag) {
  14357. case "beginMasks":
  14358. reader.array(message.beginMasks, () => reader.bool());
  14359. break;
  14360. case "endIds":
  14361. reader.array(message.endIds, () => reader.int64());
  14362. break;
  14363. case "endMasks":
  14364. reader.array(message.endMasks, () => reader.bool());
  14365. break;
  14366. case "strides":
  14367. reader.array(message.strides, () => reader.int64());
  14368. break;
  14369. case "squeezeMasks":
  14370. reader.array(message.squeezeMasks, () => reader.bool());
  14371. break;
  14372. default:
  14373. reader.field(tag, message);
  14374. break;
  14375. }
  14376. }
  14377. return message;
  14378. }
  14379. };
  14380. CoreML.Specification.TileLayerParams = class TileLayerParams {
  14381. constructor() {
  14382. this.reps = [];
  14383. }
  14384. static decode(reader, length) {
  14385. const message = new CoreML.Specification.TileLayerParams();
  14386. const end = length === undefined ? reader.length : reader.position + length;
  14387. while (reader.position < end) {
  14388. const tag = reader.uint32();
  14389. switch (tag >>> 3) {
  14390. case 1:
  14391. message.reps = reader.array(message.reps, () => reader.uint64(), tag);
  14392. break;
  14393. default:
  14394. reader.skipType(tag & 7);
  14395. break;
  14396. }
  14397. }
  14398. return message;
  14399. }
  14400. static decodeText(reader) {
  14401. const message = new CoreML.Specification.TileLayerParams();
  14402. reader.start();
  14403. while (!reader.end()) {
  14404. const tag = reader.tag();
  14405. switch (tag) {
  14406. case "reps":
  14407. reader.array(message.reps, () => reader.uint64());
  14408. break;
  14409. default:
  14410. reader.field(tag, message);
  14411. break;
  14412. }
  14413. }
  14414. return message;
  14415. }
  14416. };
  14417. CoreML.Specification.GetShapeLayerParams = class GetShapeLayerParams {
  14418. static decode(reader, length) {
  14419. const message = new CoreML.Specification.GetShapeLayerParams();
  14420. const end = length === undefined ? reader.length : reader.position + length;
  14421. while (reader.position < end) {
  14422. const tag = reader.uint32();
  14423. switch (tag >>> 3) {
  14424. default:
  14425. reader.skipType(tag & 7);
  14426. break;
  14427. }
  14428. }
  14429. return message;
  14430. }
  14431. static decodeText(reader) {
  14432. const message = new CoreML.Specification.GetShapeLayerParams();
  14433. reader.start();
  14434. while (!reader.end()) {
  14435. const tag = reader.tag();
  14436. switch (tag) {
  14437. default:
  14438. reader.field(tag, message);
  14439. break;
  14440. }
  14441. }
  14442. return message;
  14443. }
  14444. };
  14445. CoreML.Specification.ErfLayerParams = class ErfLayerParams {
  14446. static decode(reader, length) {
  14447. const message = new CoreML.Specification.ErfLayerParams();
  14448. const end = length === undefined ? reader.length : reader.position + length;
  14449. while (reader.position < end) {
  14450. const tag = reader.uint32();
  14451. switch (tag >>> 3) {
  14452. default:
  14453. reader.skipType(tag & 7);
  14454. break;
  14455. }
  14456. }
  14457. return message;
  14458. }
  14459. static decodeText(reader) {
  14460. const message = new CoreML.Specification.ErfLayerParams();
  14461. reader.start();
  14462. while (!reader.end()) {
  14463. const tag = reader.tag();
  14464. switch (tag) {
  14465. default:
  14466. reader.field(tag, message);
  14467. break;
  14468. }
  14469. }
  14470. return message;
  14471. }
  14472. };
  14473. CoreML.Specification.GeluLayerParams = class GeluLayerParams {
  14474. static decode(reader, length) {
  14475. const message = new CoreML.Specification.GeluLayerParams();
  14476. const end = length === undefined ? reader.length : reader.position + length;
  14477. while (reader.position < end) {
  14478. const tag = reader.uint32();
  14479. switch (tag >>> 3) {
  14480. case 1:
  14481. message.mode = reader.int32();
  14482. break;
  14483. default:
  14484. reader.skipType(tag & 7);
  14485. break;
  14486. }
  14487. }
  14488. return message;
  14489. }
  14490. static decodeText(reader) {
  14491. const message = new CoreML.Specification.GeluLayerParams();
  14492. reader.start();
  14493. while (!reader.end()) {
  14494. const tag = reader.tag();
  14495. switch (tag) {
  14496. case "mode":
  14497. message.mode = reader.enum(CoreML.Specification.GeluLayerParams.GeluMode);
  14498. break;
  14499. default:
  14500. reader.field(tag, message);
  14501. break;
  14502. }
  14503. }
  14504. return message;
  14505. }
  14506. };
  14507. CoreML.Specification.GeluLayerParams.prototype.mode = 0;
  14508. CoreML.Specification.GeluLayerParams.GeluMode = {
  14509. "EXACT": 0,
  14510. "TANH_APPROXIMATION": 1,
  14511. "SIGMOID_APPROXIMATION": 2
  14512. };
  14513. CoreML.Specification.RangeStaticLayerParams = class RangeStaticLayerParams {
  14514. static decode(reader, length) {
  14515. const message = new CoreML.Specification.RangeStaticLayerParams();
  14516. const end = length === undefined ? reader.length : reader.position + length;
  14517. while (reader.position < end) {
  14518. const tag = reader.uint32();
  14519. switch (tag >>> 3) {
  14520. case 1:
  14521. message.endValue = reader.float();
  14522. break;
  14523. case 2:
  14524. message.startValue = reader.float();
  14525. break;
  14526. case 3:
  14527. message.stepSizeValue = reader.float();
  14528. break;
  14529. default:
  14530. reader.skipType(tag & 7);
  14531. break;
  14532. }
  14533. }
  14534. return message;
  14535. }
  14536. static decodeText(reader) {
  14537. const message = new CoreML.Specification.RangeStaticLayerParams();
  14538. reader.start();
  14539. while (!reader.end()) {
  14540. const tag = reader.tag();
  14541. switch (tag) {
  14542. case "endValue":
  14543. message.endValue = reader.float();
  14544. break;
  14545. case "startValue":
  14546. message.startValue = reader.float();
  14547. break;
  14548. case "stepSizeValue":
  14549. message.stepSizeValue = reader.float();
  14550. break;
  14551. default:
  14552. reader.field(tag, message);
  14553. break;
  14554. }
  14555. }
  14556. return message;
  14557. }
  14558. };
  14559. CoreML.Specification.RangeStaticLayerParams.prototype.endValue = 0;
  14560. CoreML.Specification.RangeStaticLayerParams.prototype.startValue = 0;
  14561. CoreML.Specification.RangeStaticLayerParams.prototype.stepSizeValue = 0;
  14562. CoreML.Specification.RangeDynamicLayerParams = class RangeDynamicLayerParams {
  14563. static decode(reader, length) {
  14564. const message = new CoreML.Specification.RangeDynamicLayerParams();
  14565. const end = length === undefined ? reader.length : reader.position + length;
  14566. while (reader.position < end) {
  14567. const tag = reader.uint32();
  14568. switch (tag >>> 3) {
  14569. case 2:
  14570. message.startValue = reader.float();
  14571. break;
  14572. case 3:
  14573. message.stepSizeValue = reader.float();
  14574. break;
  14575. default:
  14576. reader.skipType(tag & 7);
  14577. break;
  14578. }
  14579. }
  14580. return message;
  14581. }
  14582. static decodeText(reader) {
  14583. const message = new CoreML.Specification.RangeDynamicLayerParams();
  14584. reader.start();
  14585. while (!reader.end()) {
  14586. const tag = reader.tag();
  14587. switch (tag) {
  14588. case "startValue":
  14589. message.startValue = reader.float();
  14590. break;
  14591. case "stepSizeValue":
  14592. message.stepSizeValue = reader.float();
  14593. break;
  14594. default:
  14595. reader.field(tag, message);
  14596. break;
  14597. }
  14598. }
  14599. return message;
  14600. }
  14601. };
  14602. CoreML.Specification.RangeDynamicLayerParams.prototype.startValue = 0;
  14603. CoreML.Specification.RangeDynamicLayerParams.prototype.stepSizeValue = 0;
  14604. CoreML.Specification.SlidingWindowsLayerParams = class SlidingWindowsLayerParams {
  14605. static decode(reader, length) {
  14606. const message = new CoreML.Specification.SlidingWindowsLayerParams();
  14607. const end = length === undefined ? reader.length : reader.position + length;
  14608. while (reader.position < end) {
  14609. const tag = reader.uint32();
  14610. switch (tag >>> 3) {
  14611. case 1:
  14612. message.axis = reader.int64();
  14613. break;
  14614. case 2:
  14615. message.windowSize = reader.uint64();
  14616. break;
  14617. case 3:
  14618. message.step = reader.uint64();
  14619. break;
  14620. default:
  14621. reader.skipType(tag & 7);
  14622. break;
  14623. }
  14624. }
  14625. return message;
  14626. }
  14627. static decodeText(reader) {
  14628. const message = new CoreML.Specification.SlidingWindowsLayerParams();
  14629. reader.start();
  14630. while (!reader.end()) {
  14631. const tag = reader.tag();
  14632. switch (tag) {
  14633. case "axis":
  14634. message.axis = reader.int64();
  14635. break;
  14636. case "windowSize":
  14637. message.windowSize = reader.uint64();
  14638. break;
  14639. case "step":
  14640. message.step = reader.uint64();
  14641. break;
  14642. default:
  14643. reader.field(tag, message);
  14644. break;
  14645. }
  14646. }
  14647. return message;
  14648. }
  14649. };
  14650. CoreML.Specification.SlidingWindowsLayerParams.prototype.axis = 0n;
  14651. CoreML.Specification.SlidingWindowsLayerParams.prototype.windowSize = 0n;
  14652. CoreML.Specification.SlidingWindowsLayerParams.prototype.step = 0n;
  14653. CoreML.Specification.LayerNormalizationLayerParams = class LayerNormalizationLayerParams {
  14654. constructor() {
  14655. this.normalizedShape = [];
  14656. }
  14657. static decode(reader, length) {
  14658. const message = new CoreML.Specification.LayerNormalizationLayerParams();
  14659. const end = length === undefined ? reader.length : reader.position + length;
  14660. while (reader.position < end) {
  14661. const tag = reader.uint32();
  14662. switch (tag >>> 3) {
  14663. case 1:
  14664. message.normalizedShape = reader.array(message.normalizedShape, () => reader.int64(), tag);
  14665. break;
  14666. case 2:
  14667. message.eps = reader.float();
  14668. break;
  14669. case 3:
  14670. message.gamma = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  14671. break;
  14672. case 4:
  14673. message.beta = CoreML.Specification.WeightParams.decode(reader, reader.uint32());
  14674. break;
  14675. default:
  14676. reader.skipType(tag & 7);
  14677. break;
  14678. }
  14679. }
  14680. return message;
  14681. }
  14682. static decodeText(reader) {
  14683. const message = new CoreML.Specification.LayerNormalizationLayerParams();
  14684. reader.start();
  14685. while (!reader.end()) {
  14686. const tag = reader.tag();
  14687. switch (tag) {
  14688. case "normalizedShape":
  14689. reader.array(message.normalizedShape, () => reader.int64());
  14690. break;
  14691. case "eps":
  14692. message.eps = reader.float();
  14693. break;
  14694. case "gamma":
  14695. message.gamma = CoreML.Specification.WeightParams.decodeText(reader);
  14696. break;
  14697. case "beta":
  14698. message.beta = CoreML.Specification.WeightParams.decodeText(reader);
  14699. break;
  14700. default:
  14701. reader.field(tag, message);
  14702. break;
  14703. }
  14704. }
  14705. return message;
  14706. }
  14707. };
  14708. CoreML.Specification.LayerNormalizationLayerParams.prototype.eps = 0;
  14709. CoreML.Specification.LayerNormalizationLayerParams.prototype.gamma = null;
  14710. CoreML.Specification.LayerNormalizationLayerParams.prototype.beta = null;
  14711. CoreML.Specification.NonMaximumSuppressionLayerParams = class NonMaximumSuppressionLayerParams {
  14712. static decode(reader, length) {
  14713. const message = new CoreML.Specification.NonMaximumSuppressionLayerParams();
  14714. const end = length === undefined ? reader.length : reader.position + length;
  14715. while (reader.position < end) {
  14716. const tag = reader.uint32();
  14717. switch (tag >>> 3) {
  14718. case 1:
  14719. message.iouThreshold = reader.float();
  14720. break;
  14721. case 2:
  14722. message.scoreThreshold = reader.float();
  14723. break;
  14724. case 3:
  14725. message.maxBoxes = reader.uint64();
  14726. break;
  14727. case 4:
  14728. message.perClassSuppression = reader.bool();
  14729. break;
  14730. default:
  14731. reader.skipType(tag & 7);
  14732. break;
  14733. }
  14734. }
  14735. return message;
  14736. }
  14737. static decodeText(reader) {
  14738. const message = new CoreML.Specification.NonMaximumSuppressionLayerParams();
  14739. reader.start();
  14740. while (!reader.end()) {
  14741. const tag = reader.tag();
  14742. switch (tag) {
  14743. case "iouThreshold":
  14744. message.iouThreshold = reader.float();
  14745. break;
  14746. case "scoreThreshold":
  14747. message.scoreThreshold = reader.float();
  14748. break;
  14749. case "maxBoxes":
  14750. message.maxBoxes = reader.uint64();
  14751. break;
  14752. case "perClassSuppression":
  14753. message.perClassSuppression = reader.bool();
  14754. break;
  14755. default:
  14756. reader.field(tag, message);
  14757. break;
  14758. }
  14759. }
  14760. return message;
  14761. }
  14762. };
  14763. CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.iouThreshold = 0;
  14764. CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.scoreThreshold = 0;
  14765. CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.maxBoxes = 0n;
  14766. CoreML.Specification.NonMaximumSuppressionLayerParams.prototype.perClassSuppression = false;
  14767. CoreML.Specification.ClampedReLULayerParams = class ClampedReLULayerParams {
  14768. static decode(reader, length) {
  14769. const message = new CoreML.Specification.ClampedReLULayerParams();
  14770. const end = length === undefined ? reader.length : reader.position + length;
  14771. while (reader.position < end) {
  14772. const tag = reader.uint32();
  14773. switch (tag >>> 3) {
  14774. case 1:
  14775. message.alpha = reader.float();
  14776. break;
  14777. case 2:
  14778. message.beta = reader.float();
  14779. break;
  14780. default:
  14781. reader.skipType(tag & 7);
  14782. break;
  14783. }
  14784. }
  14785. return message;
  14786. }
  14787. static decodeText(reader) {
  14788. const message = new CoreML.Specification.ClampedReLULayerParams();
  14789. reader.start();
  14790. while (!reader.end()) {
  14791. const tag = reader.tag();
  14792. switch (tag) {
  14793. case "alpha":
  14794. message.alpha = reader.float();
  14795. break;
  14796. case "beta":
  14797. message.beta = reader.float();
  14798. break;
  14799. default:
  14800. reader.field(tag, message);
  14801. break;
  14802. }
  14803. }
  14804. return message;
  14805. }
  14806. };
  14807. CoreML.Specification.ClampedReLULayerParams.prototype.alpha = 0;
  14808. CoreML.Specification.ClampedReLULayerParams.prototype.beta = 0;
  14809. CoreML.Specification.ArgSortLayerParams = class ArgSortLayerParams {
  14810. static decode(reader, length) {
  14811. const message = new CoreML.Specification.ArgSortLayerParams();
  14812. const end = length === undefined ? reader.length : reader.position + length;
  14813. while (reader.position < end) {
  14814. const tag = reader.uint32();
  14815. switch (tag >>> 3) {
  14816. case 1:
  14817. message.axis = reader.int64();
  14818. break;
  14819. case 2:
  14820. message.descending = reader.bool();
  14821. break;
  14822. default:
  14823. reader.skipType(tag & 7);
  14824. break;
  14825. }
  14826. }
  14827. return message;
  14828. }
  14829. static decodeText(reader) {
  14830. const message = new CoreML.Specification.ArgSortLayerParams();
  14831. reader.start();
  14832. while (!reader.end()) {
  14833. const tag = reader.tag();
  14834. switch (tag) {
  14835. case "axis":
  14836. message.axis = reader.int64();
  14837. break;
  14838. case "descending":
  14839. message.descending = reader.bool();
  14840. break;
  14841. default:
  14842. reader.field(tag, message);
  14843. break;
  14844. }
  14845. }
  14846. return message;
  14847. }
  14848. };
  14849. CoreML.Specification.ArgSortLayerParams.prototype.axis = 0n;
  14850. CoreML.Specification.ArgSortLayerParams.prototype.descending = false;
  14851. CoreML.Specification.SliceBySizeLayerParams = class SliceBySizeLayerParams {
  14852. static decode(reader, length) {
  14853. const message = new CoreML.Specification.SliceBySizeLayerParams();
  14854. const end = length === undefined ? reader.length : reader.position + length;
  14855. while (reader.position < end) {
  14856. const tag = reader.uint32();
  14857. switch (tag >>> 3) {
  14858. case 2:
  14859. message.size = reader.int64();
  14860. break;
  14861. case 3:
  14862. message.axis = reader.int64();
  14863. break;
  14864. default:
  14865. reader.skipType(tag & 7);
  14866. break;
  14867. }
  14868. }
  14869. return message;
  14870. }
  14871. static decodeText(reader) {
  14872. const message = new CoreML.Specification.SliceBySizeLayerParams();
  14873. reader.start();
  14874. while (!reader.end()) {
  14875. const tag = reader.tag();
  14876. switch (tag) {
  14877. case "size":
  14878. message.size = reader.int64();
  14879. break;
  14880. case "axis":
  14881. message.axis = reader.int64();
  14882. break;
  14883. default:
  14884. reader.field(tag, message);
  14885. break;
  14886. }
  14887. }
  14888. return message;
  14889. }
  14890. };
  14891. CoreML.Specification.SliceBySizeLayerParams.prototype.size = 0n;
  14892. CoreML.Specification.SliceBySizeLayerParams.prototype.axis = 0n;
  14893. CoreML.Specification.NeuralNetworkClassifier = class NeuralNetworkClassifier {
  14894. constructor() {
  14895. this.layers = [];
  14896. this.preprocessing = [];
  14897. }
  14898. get ClassLabels() {
  14899. CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet = CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  14900. return Object.keys(this).find((key) => CoreML.Specification.NeuralNetworkClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  14901. }
  14902. static decode(reader, length) {
  14903. const message = new CoreML.Specification.NeuralNetworkClassifier();
  14904. const end = length === undefined ? reader.length : reader.position + length;
  14905. while (reader.position < end) {
  14906. const tag = reader.uint32();
  14907. switch (tag >>> 3) {
  14908. case 1:
  14909. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  14910. break;
  14911. case 2:
  14912. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  14913. break;
  14914. case 5:
  14915. message.arrayInputShapeMapping = reader.int32();
  14916. break;
  14917. case 6:
  14918. message.imageInputShapeMapping = reader.int32();
  14919. break;
  14920. case 10:
  14921. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  14922. break;
  14923. case 100:
  14924. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  14925. break;
  14926. case 101:
  14927. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  14928. break;
  14929. case 200:
  14930. message.labelProbabilityLayerName = reader.string();
  14931. break;
  14932. default:
  14933. reader.skipType(tag & 7);
  14934. break;
  14935. }
  14936. }
  14937. return message;
  14938. }
  14939. static decodeText(reader) {
  14940. const message = new CoreML.Specification.NeuralNetworkClassifier();
  14941. reader.start();
  14942. while (!reader.end()) {
  14943. const tag = reader.tag();
  14944. switch (tag) {
  14945. case "layers":
  14946. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decodeText(reader));
  14947. break;
  14948. case "preprocessing":
  14949. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decodeText(reader));
  14950. break;
  14951. case "arrayInputShapeMapping":
  14952. message.arrayInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkMultiArrayShapeMapping);
  14953. break;
  14954. case "imageInputShapeMapping":
  14955. message.imageInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkImageShapeMapping);
  14956. break;
  14957. case "updateParams":
  14958. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decodeText(reader);
  14959. break;
  14960. case "stringClassLabels":
  14961. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  14962. break;
  14963. case "int64ClassLabels":
  14964. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  14965. break;
  14966. case "labelProbabilityLayerName":
  14967. message.labelProbabilityLayerName = reader.string();
  14968. break;
  14969. default:
  14970. reader.field(tag, message);
  14971. break;
  14972. }
  14973. }
  14974. return message;
  14975. }
  14976. };
  14977. CoreML.Specification.NeuralNetworkClassifier.prototype.arrayInputShapeMapping = 0;
  14978. CoreML.Specification.NeuralNetworkClassifier.prototype.imageInputShapeMapping = 0;
  14979. CoreML.Specification.NeuralNetworkClassifier.prototype.updateParams = null;
  14980. CoreML.Specification.NeuralNetworkClassifier.prototype.labelProbabilityLayerName = "";
  14981. CoreML.Specification.OneHotLayerParams = class OneHotLayerParams {
  14982. static decode(reader, length) {
  14983. const message = new CoreML.Specification.OneHotLayerParams();
  14984. const end = length === undefined ? reader.length : reader.position + length;
  14985. while (reader.position < end) {
  14986. const tag = reader.uint32();
  14987. switch (tag >>> 3) {
  14988. case 1:
  14989. message.oneHotVectorSize = reader.uint64();
  14990. break;
  14991. case 2:
  14992. message.axis = reader.int64();
  14993. break;
  14994. case 3:
  14995. message.onValue = reader.float();
  14996. break;
  14997. case 4:
  14998. message.offValue = reader.float();
  14999. break;
  15000. default:
  15001. reader.skipType(tag & 7);
  15002. break;
  15003. }
  15004. }
  15005. return message;
  15006. }
  15007. static decodeText(reader) {
  15008. const message = new CoreML.Specification.OneHotLayerParams();
  15009. reader.start();
  15010. while (!reader.end()) {
  15011. const tag = reader.tag();
  15012. switch (tag) {
  15013. case "oneHotVectorSize":
  15014. message.oneHotVectorSize = reader.uint64();
  15015. break;
  15016. case "axis":
  15017. message.axis = reader.int64();
  15018. break;
  15019. case "onValue":
  15020. message.onValue = reader.float();
  15021. break;
  15022. case "offValue":
  15023. message.offValue = reader.float();
  15024. break;
  15025. default:
  15026. reader.field(tag, message);
  15027. break;
  15028. }
  15029. }
  15030. return message;
  15031. }
  15032. };
  15033. CoreML.Specification.OneHotLayerParams.prototype.oneHotVectorSize = 0n;
  15034. CoreML.Specification.OneHotLayerParams.prototype.axis = 0n;
  15035. CoreML.Specification.OneHotLayerParams.prototype.onValue = 0;
  15036. CoreML.Specification.OneHotLayerParams.prototype.offValue = 0;
  15037. CoreML.Specification.CumSumLayerParams = class CumSumLayerParams {
  15038. static decode(reader, length) {
  15039. const message = new CoreML.Specification.CumSumLayerParams();
  15040. const end = length === undefined ? reader.length : reader.position + length;
  15041. while (reader.position < end) {
  15042. const tag = reader.uint32();
  15043. switch (tag >>> 3) {
  15044. case 1:
  15045. message.axis = reader.int64();
  15046. break;
  15047. case 2:
  15048. message.excludeFinalSum = reader.bool();
  15049. break;
  15050. case 3:
  15051. message.reverse = reader.bool();
  15052. break;
  15053. default:
  15054. reader.skipType(tag & 7);
  15055. break;
  15056. }
  15057. }
  15058. return message;
  15059. }
  15060. static decodeText(reader) {
  15061. const message = new CoreML.Specification.CumSumLayerParams();
  15062. reader.start();
  15063. while (!reader.end()) {
  15064. const tag = reader.tag();
  15065. switch (tag) {
  15066. case "axis":
  15067. message.axis = reader.int64();
  15068. break;
  15069. case "excludeFinalSum":
  15070. message.excludeFinalSum = reader.bool();
  15071. break;
  15072. case "reverse":
  15073. message.reverse = reader.bool();
  15074. break;
  15075. default:
  15076. reader.field(tag, message);
  15077. break;
  15078. }
  15079. }
  15080. return message;
  15081. }
  15082. };
  15083. CoreML.Specification.CumSumLayerParams.prototype.axis = 0n;
  15084. CoreML.Specification.CumSumLayerParams.prototype.excludeFinalSum = false;
  15085. CoreML.Specification.CumSumLayerParams.prototype.reverse = false;
  15086. CoreML.Specification.NeuralNetworkRegressor = class NeuralNetworkRegressor {
  15087. constructor() {
  15088. this.layers = [];
  15089. this.preprocessing = [];
  15090. }
  15091. static decode(reader, length) {
  15092. const message = new CoreML.Specification.NeuralNetworkRegressor();
  15093. const end = length === undefined ? reader.length : reader.position + length;
  15094. while (reader.position < end) {
  15095. const tag = reader.uint32();
  15096. switch (tag >>> 3) {
  15097. case 1:
  15098. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decode(reader, reader.uint32()));
  15099. break;
  15100. case 2:
  15101. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decode(reader, reader.uint32()));
  15102. break;
  15103. case 5:
  15104. message.arrayInputShapeMapping = reader.int32();
  15105. break;
  15106. case 6:
  15107. message.imageInputShapeMapping = reader.int32();
  15108. break;
  15109. case 10:
  15110. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decode(reader, reader.uint32());
  15111. break;
  15112. default:
  15113. reader.skipType(tag & 7);
  15114. break;
  15115. }
  15116. }
  15117. return message;
  15118. }
  15119. static decodeText(reader) {
  15120. const message = new CoreML.Specification.NeuralNetworkRegressor();
  15121. reader.start();
  15122. while (!reader.end()) {
  15123. const tag = reader.tag();
  15124. switch (tag) {
  15125. case "layers":
  15126. message.layers.push(CoreML.Specification.NeuralNetworkLayer.decodeText(reader));
  15127. break;
  15128. case "preprocessing":
  15129. message.preprocessing.push(CoreML.Specification.NeuralNetworkPreprocessing.decodeText(reader));
  15130. break;
  15131. case "arrayInputShapeMapping":
  15132. message.arrayInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkMultiArrayShapeMapping);
  15133. break;
  15134. case "imageInputShapeMapping":
  15135. message.imageInputShapeMapping = reader.enum(CoreML.Specification.NeuralNetworkImageShapeMapping);
  15136. break;
  15137. case "updateParams":
  15138. message.updateParams = CoreML.Specification.NetworkUpdateParameters.decodeText(reader);
  15139. break;
  15140. default:
  15141. reader.field(tag, message);
  15142. break;
  15143. }
  15144. }
  15145. return message;
  15146. }
  15147. };
  15148. CoreML.Specification.NeuralNetworkRegressor.prototype.arrayInputShapeMapping = 0;
  15149. CoreML.Specification.NeuralNetworkRegressor.prototype.imageInputShapeMapping = 0;
  15150. CoreML.Specification.NeuralNetworkRegressor.prototype.updateParams = null;
  15151. CoreML.Specification.NetworkUpdateParameters = class NetworkUpdateParameters {
  15152. constructor() {
  15153. this.lossLayers = [];
  15154. }
  15155. static decode(reader, length) {
  15156. const message = new CoreML.Specification.NetworkUpdateParameters();
  15157. const end = length === undefined ? reader.length : reader.position + length;
  15158. while (reader.position < end) {
  15159. const tag = reader.uint32();
  15160. switch (tag >>> 3) {
  15161. case 1:
  15162. message.lossLayers.push(CoreML.Specification.LossLayer.decode(reader, reader.uint32()));
  15163. break;
  15164. case 2:
  15165. message.optimizer = CoreML.Specification.Optimizer.decode(reader, reader.uint32());
  15166. break;
  15167. case 3:
  15168. message.epochs = CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  15169. break;
  15170. case 10:
  15171. message.shuffle = CoreML.Specification.BoolParameter.decode(reader, reader.uint32());
  15172. break;
  15173. case 20:
  15174. message.seed = CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  15175. break;
  15176. default:
  15177. reader.skipType(tag & 7);
  15178. break;
  15179. }
  15180. }
  15181. return message;
  15182. }
  15183. static decodeText(reader) {
  15184. const message = new CoreML.Specification.NetworkUpdateParameters();
  15185. reader.start();
  15186. while (!reader.end()) {
  15187. const tag = reader.tag();
  15188. switch (tag) {
  15189. case "lossLayers":
  15190. message.lossLayers.push(CoreML.Specification.LossLayer.decodeText(reader));
  15191. break;
  15192. case "optimizer":
  15193. message.optimizer = CoreML.Specification.Optimizer.decodeText(reader);
  15194. break;
  15195. case "epochs":
  15196. message.epochs = CoreML.Specification.Int64Parameter.decodeText(reader);
  15197. break;
  15198. case "shuffle":
  15199. message.shuffle = CoreML.Specification.BoolParameter.decodeText(reader);
  15200. break;
  15201. case "seed":
  15202. message.seed = CoreML.Specification.Int64Parameter.decodeText(reader);
  15203. break;
  15204. default:
  15205. reader.field(tag, message);
  15206. break;
  15207. }
  15208. }
  15209. return message;
  15210. }
  15211. };
  15212. CoreML.Specification.NetworkUpdateParameters.prototype.optimizer = null;
  15213. CoreML.Specification.NetworkUpdateParameters.prototype.epochs = null;
  15214. CoreML.Specification.NetworkUpdateParameters.prototype.shuffle = null;
  15215. CoreML.Specification.NetworkUpdateParameters.prototype.seed = null;
  15216. CoreML.Specification.LossLayer = class LossLayer {
  15217. get LossLayerType() {
  15218. CoreML.Specification.LossLayer.LossLayerTypeSet = CoreML.Specification.LossLayer.LossLayerTypeSet || new Set(["categoricalCrossEntropyLossLayer", "meanSquaredErrorLossLayer"]);
  15219. return Object.keys(this).find((key) => CoreML.Specification.LossLayer.LossLayerTypeSet.has(key) && this[key] !== null);
  15220. }
  15221. static decode(reader, length) {
  15222. const message = new CoreML.Specification.LossLayer();
  15223. const end = length === undefined ? reader.length : reader.position + length;
  15224. while (reader.position < end) {
  15225. const tag = reader.uint32();
  15226. switch (tag >>> 3) {
  15227. case 1:
  15228. message.name = reader.string();
  15229. break;
  15230. case 10:
  15231. message.categoricalCrossEntropyLossLayer = CoreML.Specification.CategoricalCrossEntropyLossLayer.decode(reader, reader.uint32());
  15232. break;
  15233. case 11:
  15234. message.meanSquaredErrorLossLayer = CoreML.Specification.MeanSquaredErrorLossLayer.decode(reader, reader.uint32());
  15235. break;
  15236. default:
  15237. reader.skipType(tag & 7);
  15238. break;
  15239. }
  15240. }
  15241. return message;
  15242. }
  15243. static decodeText(reader) {
  15244. const message = new CoreML.Specification.LossLayer();
  15245. reader.start();
  15246. while (!reader.end()) {
  15247. const tag = reader.tag();
  15248. switch (tag) {
  15249. case "name":
  15250. message.name = reader.string();
  15251. break;
  15252. case "categoricalCrossEntropyLossLayer":
  15253. message.categoricalCrossEntropyLossLayer = CoreML.Specification.CategoricalCrossEntropyLossLayer.decodeText(reader);
  15254. break;
  15255. case "meanSquaredErrorLossLayer":
  15256. message.meanSquaredErrorLossLayer = CoreML.Specification.MeanSquaredErrorLossLayer.decodeText(reader);
  15257. break;
  15258. default:
  15259. reader.field(tag, message);
  15260. break;
  15261. }
  15262. }
  15263. return message;
  15264. }
  15265. };
  15266. CoreML.Specification.LossLayer.prototype.name = "";
  15267. CoreML.Specification.CategoricalCrossEntropyLossLayer = class CategoricalCrossEntropyLossLayer {
  15268. static decode(reader, length) {
  15269. const message = new CoreML.Specification.CategoricalCrossEntropyLossLayer();
  15270. const end = length === undefined ? reader.length : reader.position + length;
  15271. while (reader.position < end) {
  15272. const tag = reader.uint32();
  15273. switch (tag >>> 3) {
  15274. case 1:
  15275. message.input = reader.string();
  15276. break;
  15277. case 2:
  15278. message.target = reader.string();
  15279. break;
  15280. default:
  15281. reader.skipType(tag & 7);
  15282. break;
  15283. }
  15284. }
  15285. return message;
  15286. }
  15287. static decodeText(reader) {
  15288. const message = new CoreML.Specification.CategoricalCrossEntropyLossLayer();
  15289. reader.start();
  15290. while (!reader.end()) {
  15291. const tag = reader.tag();
  15292. switch (tag) {
  15293. case "input":
  15294. message.input = reader.string();
  15295. break;
  15296. case "target":
  15297. message.target = reader.string();
  15298. break;
  15299. default:
  15300. reader.field(tag, message);
  15301. break;
  15302. }
  15303. }
  15304. return message;
  15305. }
  15306. };
  15307. CoreML.Specification.CategoricalCrossEntropyLossLayer.prototype.input = "";
  15308. CoreML.Specification.CategoricalCrossEntropyLossLayer.prototype.target = "";
  15309. CoreML.Specification.MeanSquaredErrorLossLayer = class MeanSquaredErrorLossLayer {
  15310. static decode(reader, length) {
  15311. const message = new CoreML.Specification.MeanSquaredErrorLossLayer();
  15312. const end = length === undefined ? reader.length : reader.position + length;
  15313. while (reader.position < end) {
  15314. const tag = reader.uint32();
  15315. switch (tag >>> 3) {
  15316. case 1:
  15317. message.input = reader.string();
  15318. break;
  15319. case 2:
  15320. message.target = reader.string();
  15321. break;
  15322. default:
  15323. reader.skipType(tag & 7);
  15324. break;
  15325. }
  15326. }
  15327. return message;
  15328. }
  15329. static decodeText(reader) {
  15330. const message = new CoreML.Specification.MeanSquaredErrorLossLayer();
  15331. reader.start();
  15332. while (!reader.end()) {
  15333. const tag = reader.tag();
  15334. switch (tag) {
  15335. case "input":
  15336. message.input = reader.string();
  15337. break;
  15338. case "target":
  15339. message.target = reader.string();
  15340. break;
  15341. default:
  15342. reader.field(tag, message);
  15343. break;
  15344. }
  15345. }
  15346. return message;
  15347. }
  15348. };
  15349. CoreML.Specification.MeanSquaredErrorLossLayer.prototype.input = "";
  15350. CoreML.Specification.MeanSquaredErrorLossLayer.prototype.target = "";
  15351. CoreML.Specification.Optimizer = class Optimizer {
  15352. get OptimizerType() {
  15353. CoreML.Specification.Optimizer.OptimizerTypeSet = CoreML.Specification.Optimizer.OptimizerTypeSet || new Set(["sgdOptimizer", "adamOptimizer"]);
  15354. return Object.keys(this).find((key) => CoreML.Specification.Optimizer.OptimizerTypeSet.has(key) && this[key] !== null);
  15355. }
  15356. static decode(reader, length) {
  15357. const message = new CoreML.Specification.Optimizer();
  15358. const end = length === undefined ? reader.length : reader.position + length;
  15359. while (reader.position < end) {
  15360. const tag = reader.uint32();
  15361. switch (tag >>> 3) {
  15362. case 10:
  15363. message.sgdOptimizer = CoreML.Specification.SGDOptimizer.decode(reader, reader.uint32());
  15364. break;
  15365. case 11:
  15366. message.adamOptimizer = CoreML.Specification.AdamOptimizer.decode(reader, reader.uint32());
  15367. break;
  15368. default:
  15369. reader.skipType(tag & 7);
  15370. break;
  15371. }
  15372. }
  15373. return message;
  15374. }
  15375. static decodeText(reader) {
  15376. const message = new CoreML.Specification.Optimizer();
  15377. reader.start();
  15378. while (!reader.end()) {
  15379. const tag = reader.tag();
  15380. switch (tag) {
  15381. case "sgdOptimizer":
  15382. message.sgdOptimizer = CoreML.Specification.SGDOptimizer.decodeText(reader);
  15383. break;
  15384. case "adamOptimizer":
  15385. message.adamOptimizer = CoreML.Specification.AdamOptimizer.decodeText(reader);
  15386. break;
  15387. default:
  15388. reader.field(tag, message);
  15389. break;
  15390. }
  15391. }
  15392. return message;
  15393. }
  15394. };
  15395. CoreML.Specification.SGDOptimizer = class SGDOptimizer {
  15396. static decode(reader, length) {
  15397. const message = new CoreML.Specification.SGDOptimizer();
  15398. const end = length === undefined ? reader.length : reader.position + length;
  15399. while (reader.position < end) {
  15400. const tag = reader.uint32();
  15401. switch (tag >>> 3) {
  15402. case 1:
  15403. message.learningRate = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15404. break;
  15405. case 2:
  15406. message.miniBatchSize = CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  15407. break;
  15408. case 3:
  15409. message.momentum = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15410. break;
  15411. default:
  15412. reader.skipType(tag & 7);
  15413. break;
  15414. }
  15415. }
  15416. return message;
  15417. }
  15418. static decodeText(reader) {
  15419. const message = new CoreML.Specification.SGDOptimizer();
  15420. reader.start();
  15421. while (!reader.end()) {
  15422. const tag = reader.tag();
  15423. switch (tag) {
  15424. case "learningRate":
  15425. message.learningRate = CoreML.Specification.DoubleParameter.decodeText(reader);
  15426. break;
  15427. case "miniBatchSize":
  15428. message.miniBatchSize = CoreML.Specification.Int64Parameter.decodeText(reader);
  15429. break;
  15430. case "momentum":
  15431. message.momentum = CoreML.Specification.DoubleParameter.decodeText(reader);
  15432. break;
  15433. default:
  15434. reader.field(tag, message);
  15435. break;
  15436. }
  15437. }
  15438. return message;
  15439. }
  15440. };
  15441. CoreML.Specification.SGDOptimizer.prototype.learningRate = null;
  15442. CoreML.Specification.SGDOptimizer.prototype.miniBatchSize = null;
  15443. CoreML.Specification.SGDOptimizer.prototype.momentum = null;
  15444. CoreML.Specification.AdamOptimizer = class AdamOptimizer {
  15445. static decode(reader, length) {
  15446. const message = new CoreML.Specification.AdamOptimizer();
  15447. const end = length === undefined ? reader.length : reader.position + length;
  15448. while (reader.position < end) {
  15449. const tag = reader.uint32();
  15450. switch (tag >>> 3) {
  15451. case 1:
  15452. message.learningRate = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15453. break;
  15454. case 2:
  15455. message.miniBatchSize = CoreML.Specification.Int64Parameter.decode(reader, reader.uint32());
  15456. break;
  15457. case 3:
  15458. message.beta1 = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15459. break;
  15460. case 4:
  15461. message.beta2 = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15462. break;
  15463. case 5:
  15464. message.eps = CoreML.Specification.DoubleParameter.decode(reader, reader.uint32());
  15465. break;
  15466. default:
  15467. reader.skipType(tag & 7);
  15468. break;
  15469. }
  15470. }
  15471. return message;
  15472. }
  15473. static decodeText(reader) {
  15474. const message = new CoreML.Specification.AdamOptimizer();
  15475. reader.start();
  15476. while (!reader.end()) {
  15477. const tag = reader.tag();
  15478. switch (tag) {
  15479. case "learningRate":
  15480. message.learningRate = CoreML.Specification.DoubleParameter.decodeText(reader);
  15481. break;
  15482. case "miniBatchSize":
  15483. message.miniBatchSize = CoreML.Specification.Int64Parameter.decodeText(reader);
  15484. break;
  15485. case "beta1":
  15486. message.beta1 = CoreML.Specification.DoubleParameter.decodeText(reader);
  15487. break;
  15488. case "beta2":
  15489. message.beta2 = CoreML.Specification.DoubleParameter.decodeText(reader);
  15490. break;
  15491. case "eps":
  15492. message.eps = CoreML.Specification.DoubleParameter.decodeText(reader);
  15493. break;
  15494. default:
  15495. reader.field(tag, message);
  15496. break;
  15497. }
  15498. }
  15499. return message;
  15500. }
  15501. };
  15502. CoreML.Specification.AdamOptimizer.prototype.learningRate = null;
  15503. CoreML.Specification.AdamOptimizer.prototype.miniBatchSize = null;
  15504. CoreML.Specification.AdamOptimizer.prototype.beta1 = null;
  15505. CoreML.Specification.AdamOptimizer.prototype.beta2 = null;
  15506. CoreML.Specification.AdamOptimizer.prototype.eps = null;
  15507. CoreML.Specification.Normalizer = class Normalizer {
  15508. static decode(reader, length) {
  15509. const message = new CoreML.Specification.Normalizer();
  15510. const end = length === undefined ? reader.length : reader.position + length;
  15511. while (reader.position < end) {
  15512. const tag = reader.uint32();
  15513. switch (tag >>> 3) {
  15514. case 1:
  15515. message.normType = reader.int32();
  15516. break;
  15517. default:
  15518. reader.skipType(tag & 7);
  15519. break;
  15520. }
  15521. }
  15522. return message;
  15523. }
  15524. static decodeText(reader) {
  15525. const message = new CoreML.Specification.Normalizer();
  15526. reader.start();
  15527. while (!reader.end()) {
  15528. const tag = reader.tag();
  15529. switch (tag) {
  15530. case "normType":
  15531. message.normType = reader.enum(CoreML.Specification.Normalizer.NormType);
  15532. break;
  15533. default:
  15534. reader.field(tag, message);
  15535. break;
  15536. }
  15537. }
  15538. return message;
  15539. }
  15540. };
  15541. CoreML.Specification.Normalizer.prototype.normType = 0;
  15542. CoreML.Specification.Normalizer.NormType = {
  15543. "LMax": 0,
  15544. "L1": 1,
  15545. "L2": 2
  15546. };
  15547. CoreML.Specification.OneHotEncoder = class OneHotEncoder {
  15548. get CategoryType() {
  15549. CoreML.Specification.OneHotEncoder.CategoryTypeSet = CoreML.Specification.OneHotEncoder.CategoryTypeSet || new Set(["stringCategories", "int64Categories"]);
  15550. return Object.keys(this).find((key) => CoreML.Specification.OneHotEncoder.CategoryTypeSet.has(key) && this[key] !== null);
  15551. }
  15552. static decode(reader, length) {
  15553. const message = new CoreML.Specification.OneHotEncoder();
  15554. const end = length === undefined ? reader.length : reader.position + length;
  15555. while (reader.position < end) {
  15556. const tag = reader.uint32();
  15557. switch (tag >>> 3) {
  15558. case 1:
  15559. message.stringCategories = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  15560. break;
  15561. case 2:
  15562. message.int64Categories = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  15563. break;
  15564. case 10:
  15565. message.outputSparse = reader.bool();
  15566. break;
  15567. case 11:
  15568. message.handleUnknown = reader.int32();
  15569. break;
  15570. default:
  15571. reader.skipType(tag & 7);
  15572. break;
  15573. }
  15574. }
  15575. return message;
  15576. }
  15577. static decodeText(reader) {
  15578. const message = new CoreML.Specification.OneHotEncoder();
  15579. reader.start();
  15580. while (!reader.end()) {
  15581. const tag = reader.tag();
  15582. switch (tag) {
  15583. case "stringCategories":
  15584. message.stringCategories = CoreML.Specification.StringVector.decodeText(reader);
  15585. break;
  15586. case "int64Categories":
  15587. message.int64Categories = CoreML.Specification.Int64Vector.decodeText(reader);
  15588. break;
  15589. case "outputSparse":
  15590. message.outputSparse = reader.bool();
  15591. break;
  15592. case "handleUnknown":
  15593. message.handleUnknown = reader.enum(CoreML.Specification.OneHotEncoder.HandleUnknown);
  15594. break;
  15595. default:
  15596. reader.field(tag, message);
  15597. break;
  15598. }
  15599. }
  15600. return message;
  15601. }
  15602. };
  15603. CoreML.Specification.OneHotEncoder.prototype.outputSparse = false;
  15604. CoreML.Specification.OneHotEncoder.prototype.handleUnknown = 0;
  15605. CoreML.Specification.OneHotEncoder.HandleUnknown = {
  15606. "ErrorOnUnknown": 0,
  15607. "IgnoreUnknown": 1
  15608. };
  15609. CoreML.Specification.Scaler = class Scaler {
  15610. constructor() {
  15611. this.shiftValue = [];
  15612. this.scaleValue = [];
  15613. }
  15614. static decode(reader, length) {
  15615. const message = new CoreML.Specification.Scaler();
  15616. const end = length === undefined ? reader.length : reader.position + length;
  15617. while (reader.position < end) {
  15618. const tag = reader.uint32();
  15619. switch (tag >>> 3) {
  15620. case 1:
  15621. message.shiftValue = reader.doubles(message.shiftValue, tag);
  15622. break;
  15623. case 2:
  15624. message.scaleValue = reader.doubles(message.scaleValue, tag);
  15625. break;
  15626. default:
  15627. reader.skipType(tag & 7);
  15628. break;
  15629. }
  15630. }
  15631. return message;
  15632. }
  15633. static decodeText(reader) {
  15634. const message = new CoreML.Specification.Scaler();
  15635. reader.start();
  15636. while (!reader.end()) {
  15637. const tag = reader.tag();
  15638. switch (tag) {
  15639. case "shiftValue":
  15640. reader.array(message.shiftValue, () => reader.double());
  15641. break;
  15642. case "scaleValue":
  15643. reader.array(message.scaleValue, () => reader.double());
  15644. break;
  15645. default:
  15646. reader.field(tag, message);
  15647. break;
  15648. }
  15649. }
  15650. return message;
  15651. }
  15652. };
  15653. CoreML.Specification.NonMaximumSuppression = class NonMaximumSuppression {
  15654. get SuppressionMethod() {
  15655. CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet = CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet || new Set(["pickTop"]);
  15656. return Object.keys(this).find((key) => CoreML.Specification.NonMaximumSuppression.SuppressionMethodSet.has(key) && this[key] !== null);
  15657. }
  15658. get ClassLabels() {
  15659. CoreML.Specification.NonMaximumSuppression.ClassLabelsSet = CoreML.Specification.NonMaximumSuppression.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  15660. return Object.keys(this).find((key) => CoreML.Specification.NonMaximumSuppression.ClassLabelsSet.has(key) && this[key] !== null);
  15661. }
  15662. static decode(reader, length) {
  15663. const message = new CoreML.Specification.NonMaximumSuppression();
  15664. const end = length === undefined ? reader.length : reader.position + length;
  15665. while (reader.position < end) {
  15666. const tag = reader.uint32();
  15667. switch (tag >>> 3) {
  15668. case 1:
  15669. message.pickTop = CoreML.Specification.NonMaximumSuppression.PickTop.decode(reader, reader.uint32());
  15670. break;
  15671. case 100:
  15672. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  15673. break;
  15674. case 101:
  15675. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  15676. break;
  15677. case 110:
  15678. message.iouThreshold = reader.double();
  15679. break;
  15680. case 111:
  15681. message.confidenceThreshold = reader.double();
  15682. break;
  15683. case 200:
  15684. message.confidenceInputFeatureName = reader.string();
  15685. break;
  15686. case 201:
  15687. message.coordinatesInputFeatureName = reader.string();
  15688. break;
  15689. case 202:
  15690. message.iouThresholdInputFeatureName = reader.string();
  15691. break;
  15692. case 203:
  15693. message.confidenceThresholdInputFeatureName = reader.string();
  15694. break;
  15695. case 210:
  15696. message.confidenceOutputFeatureName = reader.string();
  15697. break;
  15698. case 211:
  15699. message.coordinatesOutputFeatureName = reader.string();
  15700. break;
  15701. default:
  15702. reader.skipType(tag & 7);
  15703. break;
  15704. }
  15705. }
  15706. return message;
  15707. }
  15708. static decodeText(reader) {
  15709. const message = new CoreML.Specification.NonMaximumSuppression();
  15710. reader.start();
  15711. while (!reader.end()) {
  15712. const tag = reader.tag();
  15713. switch (tag) {
  15714. case "pickTop":
  15715. message.pickTop = CoreML.Specification.NonMaximumSuppression.PickTop.decodeText(reader);
  15716. break;
  15717. case "stringClassLabels":
  15718. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  15719. break;
  15720. case "int64ClassLabels":
  15721. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  15722. break;
  15723. case "iouThreshold":
  15724. message.iouThreshold = reader.double();
  15725. break;
  15726. case "confidenceThreshold":
  15727. message.confidenceThreshold = reader.double();
  15728. break;
  15729. case "confidenceInputFeatureName":
  15730. message.confidenceInputFeatureName = reader.string();
  15731. break;
  15732. case "coordinatesInputFeatureName":
  15733. message.coordinatesInputFeatureName = reader.string();
  15734. break;
  15735. case "iouThresholdInputFeatureName":
  15736. message.iouThresholdInputFeatureName = reader.string();
  15737. break;
  15738. case "confidenceThresholdInputFeatureName":
  15739. message.confidenceThresholdInputFeatureName = reader.string();
  15740. break;
  15741. case "confidenceOutputFeatureName":
  15742. message.confidenceOutputFeatureName = reader.string();
  15743. break;
  15744. case "coordinatesOutputFeatureName":
  15745. message.coordinatesOutputFeatureName = reader.string();
  15746. break;
  15747. default:
  15748. reader.field(tag, message);
  15749. break;
  15750. }
  15751. }
  15752. return message;
  15753. }
  15754. };
  15755. CoreML.Specification.NonMaximumSuppression.prototype.iouThreshold = 0;
  15756. CoreML.Specification.NonMaximumSuppression.prototype.confidenceThreshold = 0;
  15757. CoreML.Specification.NonMaximumSuppression.prototype.confidenceInputFeatureName = "";
  15758. CoreML.Specification.NonMaximumSuppression.prototype.coordinatesInputFeatureName = "";
  15759. CoreML.Specification.NonMaximumSuppression.prototype.iouThresholdInputFeatureName = "";
  15760. CoreML.Specification.NonMaximumSuppression.prototype.confidenceThresholdInputFeatureName = "";
  15761. CoreML.Specification.NonMaximumSuppression.prototype.confidenceOutputFeatureName = "";
  15762. CoreML.Specification.NonMaximumSuppression.prototype.coordinatesOutputFeatureName = "";
  15763. CoreML.Specification.NonMaximumSuppression.PickTop = class PickTop {
  15764. static decode(reader, length) {
  15765. const message = new CoreML.Specification.NonMaximumSuppression.PickTop();
  15766. const end = length === undefined ? reader.length : reader.position + length;
  15767. while (reader.position < end) {
  15768. const tag = reader.uint32();
  15769. switch (tag >>> 3) {
  15770. case 1:
  15771. message.perClass = reader.bool();
  15772. break;
  15773. default:
  15774. reader.skipType(tag & 7);
  15775. break;
  15776. }
  15777. }
  15778. return message;
  15779. }
  15780. static decodeText(reader) {
  15781. const message = new CoreML.Specification.NonMaximumSuppression.PickTop();
  15782. reader.start();
  15783. while (!reader.end()) {
  15784. const tag = reader.tag();
  15785. switch (tag) {
  15786. case "perClass":
  15787. message.perClass = reader.bool();
  15788. break;
  15789. default:
  15790. reader.field(tag, message);
  15791. break;
  15792. }
  15793. }
  15794. return message;
  15795. }
  15796. };
  15797. CoreML.Specification.NonMaximumSuppression.PickTop.prototype.perClass = false;
  15798. CoreML.Specification.LinearKernel = class LinearKernel {
  15799. static decode(reader, length) {
  15800. const message = new CoreML.Specification.LinearKernel();
  15801. const end = length === undefined ? reader.length : reader.position + length;
  15802. while (reader.position < end) {
  15803. const tag = reader.uint32();
  15804. switch (tag >>> 3) {
  15805. default:
  15806. reader.skipType(tag & 7);
  15807. break;
  15808. }
  15809. }
  15810. return message;
  15811. }
  15812. static decodeText(reader) {
  15813. const message = new CoreML.Specification.LinearKernel();
  15814. reader.start();
  15815. while (!reader.end()) {
  15816. const tag = reader.tag();
  15817. switch (tag) {
  15818. default:
  15819. reader.field(tag, message);
  15820. break;
  15821. }
  15822. }
  15823. return message;
  15824. }
  15825. };
  15826. CoreML.Specification.RBFKernel = class RBFKernel {
  15827. static decode(reader, length) {
  15828. const message = new CoreML.Specification.RBFKernel();
  15829. const end = length === undefined ? reader.length : reader.position + length;
  15830. while (reader.position < end) {
  15831. const tag = reader.uint32();
  15832. switch (tag >>> 3) {
  15833. case 1:
  15834. message.gamma = reader.double();
  15835. break;
  15836. default:
  15837. reader.skipType(tag & 7);
  15838. break;
  15839. }
  15840. }
  15841. return message;
  15842. }
  15843. static decodeText(reader) {
  15844. const message = new CoreML.Specification.RBFKernel();
  15845. reader.start();
  15846. while (!reader.end()) {
  15847. const tag = reader.tag();
  15848. switch (tag) {
  15849. case "gamma":
  15850. message.gamma = reader.double();
  15851. break;
  15852. default:
  15853. reader.field(tag, message);
  15854. break;
  15855. }
  15856. }
  15857. return message;
  15858. }
  15859. };
  15860. CoreML.Specification.RBFKernel.prototype.gamma = 0;
  15861. CoreML.Specification.PolyKernel = class PolyKernel {
  15862. static decode(reader, length) {
  15863. const message = new CoreML.Specification.PolyKernel();
  15864. const end = length === undefined ? reader.length : reader.position + length;
  15865. while (reader.position < end) {
  15866. const tag = reader.uint32();
  15867. switch (tag >>> 3) {
  15868. case 1:
  15869. message.degree = reader.int32();
  15870. break;
  15871. case 2:
  15872. message.c = reader.double();
  15873. break;
  15874. case 3:
  15875. message.gamma = reader.double();
  15876. break;
  15877. default:
  15878. reader.skipType(tag & 7);
  15879. break;
  15880. }
  15881. }
  15882. return message;
  15883. }
  15884. static decodeText(reader) {
  15885. const message = new CoreML.Specification.PolyKernel();
  15886. reader.start();
  15887. while (!reader.end()) {
  15888. const tag = reader.tag();
  15889. switch (tag) {
  15890. case "degree":
  15891. message.degree = reader.int32();
  15892. break;
  15893. case "c":
  15894. message.c = reader.double();
  15895. break;
  15896. case "gamma":
  15897. message.gamma = reader.double();
  15898. break;
  15899. default:
  15900. reader.field(tag, message);
  15901. break;
  15902. }
  15903. }
  15904. return message;
  15905. }
  15906. };
  15907. CoreML.Specification.PolyKernel.prototype.degree = 0;
  15908. CoreML.Specification.PolyKernel.prototype.c = 0;
  15909. CoreML.Specification.PolyKernel.prototype.gamma = 0;
  15910. CoreML.Specification.SigmoidKernel = class SigmoidKernel {
  15911. static decode(reader, length) {
  15912. const message = new CoreML.Specification.SigmoidKernel();
  15913. const end = length === undefined ? reader.length : reader.position + length;
  15914. while (reader.position < end) {
  15915. const tag = reader.uint32();
  15916. switch (tag >>> 3) {
  15917. case 1:
  15918. message.gamma = reader.double();
  15919. break;
  15920. case 2:
  15921. message.c = reader.double();
  15922. break;
  15923. default:
  15924. reader.skipType(tag & 7);
  15925. break;
  15926. }
  15927. }
  15928. return message;
  15929. }
  15930. static decodeText(reader) {
  15931. const message = new CoreML.Specification.SigmoidKernel();
  15932. reader.start();
  15933. while (!reader.end()) {
  15934. const tag = reader.tag();
  15935. switch (tag) {
  15936. case "gamma":
  15937. message.gamma = reader.double();
  15938. break;
  15939. case "c":
  15940. message.c = reader.double();
  15941. break;
  15942. default:
  15943. reader.field(tag, message);
  15944. break;
  15945. }
  15946. }
  15947. return message;
  15948. }
  15949. };
  15950. CoreML.Specification.SigmoidKernel.prototype.gamma = 0;
  15951. CoreML.Specification.SigmoidKernel.prototype.c = 0;
  15952. CoreML.Specification.Kernel = class Kernel {
  15953. get kernel() {
  15954. CoreML.Specification.Kernel.kernelSet = CoreML.Specification.Kernel.kernelSet || new Set(["linearKernel", "rbfKernel", "polyKernel", "sigmoidKernel"]);
  15955. return Object.keys(this).find((key) => CoreML.Specification.Kernel.kernelSet.has(key) && this[key] !== null);
  15956. }
  15957. static decode(reader, length) {
  15958. const message = new CoreML.Specification.Kernel();
  15959. const end = length === undefined ? reader.length : reader.position + length;
  15960. while (reader.position < end) {
  15961. const tag = reader.uint32();
  15962. switch (tag >>> 3) {
  15963. case 1:
  15964. message.linearKernel = CoreML.Specification.LinearKernel.decode(reader, reader.uint32());
  15965. break;
  15966. case 2:
  15967. message.rbfKernel = CoreML.Specification.RBFKernel.decode(reader, reader.uint32());
  15968. break;
  15969. case 3:
  15970. message.polyKernel = CoreML.Specification.PolyKernel.decode(reader, reader.uint32());
  15971. break;
  15972. case 4:
  15973. message.sigmoidKernel = CoreML.Specification.SigmoidKernel.decode(reader, reader.uint32());
  15974. break;
  15975. default:
  15976. reader.skipType(tag & 7);
  15977. break;
  15978. }
  15979. }
  15980. return message;
  15981. }
  15982. static decodeText(reader) {
  15983. const message = new CoreML.Specification.Kernel();
  15984. reader.start();
  15985. while (!reader.end()) {
  15986. const tag = reader.tag();
  15987. switch (tag) {
  15988. case "linearKernel":
  15989. message.linearKernel = CoreML.Specification.LinearKernel.decodeText(reader);
  15990. break;
  15991. case "rbfKernel":
  15992. message.rbfKernel = CoreML.Specification.RBFKernel.decodeText(reader);
  15993. break;
  15994. case "polyKernel":
  15995. message.polyKernel = CoreML.Specification.PolyKernel.decodeText(reader);
  15996. break;
  15997. case "sigmoidKernel":
  15998. message.sigmoidKernel = CoreML.Specification.SigmoidKernel.decodeText(reader);
  15999. break;
  16000. default:
  16001. reader.field(tag, message);
  16002. break;
  16003. }
  16004. }
  16005. return message;
  16006. }
  16007. };
  16008. CoreML.Specification.SparseNode = class SparseNode {
  16009. static decode(reader, length) {
  16010. const message = new CoreML.Specification.SparseNode();
  16011. const end = length === undefined ? reader.length : reader.position + length;
  16012. while (reader.position < end) {
  16013. const tag = reader.uint32();
  16014. switch (tag >>> 3) {
  16015. case 1:
  16016. message.index = reader.int32();
  16017. break;
  16018. case 2:
  16019. message.value = reader.double();
  16020. break;
  16021. default:
  16022. reader.skipType(tag & 7);
  16023. break;
  16024. }
  16025. }
  16026. return message;
  16027. }
  16028. static decodeText(reader) {
  16029. const message = new CoreML.Specification.SparseNode();
  16030. reader.start();
  16031. while (!reader.end()) {
  16032. const tag = reader.tag();
  16033. switch (tag) {
  16034. case "index":
  16035. message.index = reader.int32();
  16036. break;
  16037. case "value":
  16038. message.value = reader.double();
  16039. break;
  16040. default:
  16041. reader.field(tag, message);
  16042. break;
  16043. }
  16044. }
  16045. return message;
  16046. }
  16047. };
  16048. CoreML.Specification.SparseNode.prototype.index = 0;
  16049. CoreML.Specification.SparseNode.prototype.value = 0;
  16050. CoreML.Specification.SparseVector = class SparseVector {
  16051. constructor() {
  16052. this.nodes = [];
  16053. }
  16054. static decode(reader, length) {
  16055. const message = new CoreML.Specification.SparseVector();
  16056. const end = length === undefined ? reader.length : reader.position + length;
  16057. while (reader.position < end) {
  16058. const tag = reader.uint32();
  16059. switch (tag >>> 3) {
  16060. case 1:
  16061. message.nodes.push(CoreML.Specification.SparseNode.decode(reader, reader.uint32()));
  16062. break;
  16063. default:
  16064. reader.skipType(tag & 7);
  16065. break;
  16066. }
  16067. }
  16068. return message;
  16069. }
  16070. static decodeText(reader) {
  16071. const message = new CoreML.Specification.SparseVector();
  16072. reader.start();
  16073. while (!reader.end()) {
  16074. const tag = reader.tag();
  16075. switch (tag) {
  16076. case "nodes":
  16077. message.nodes.push(CoreML.Specification.SparseNode.decodeText(reader));
  16078. break;
  16079. default:
  16080. reader.field(tag, message);
  16081. break;
  16082. }
  16083. }
  16084. return message;
  16085. }
  16086. };
  16087. CoreML.Specification.SparseSupportVectors = class SparseSupportVectors {
  16088. constructor() {
  16089. this.vectors = [];
  16090. }
  16091. static decode(reader, length) {
  16092. const message = new CoreML.Specification.SparseSupportVectors();
  16093. const end = length === undefined ? reader.length : reader.position + length;
  16094. while (reader.position < end) {
  16095. const tag = reader.uint32();
  16096. switch (tag >>> 3) {
  16097. case 1:
  16098. message.vectors.push(CoreML.Specification.SparseVector.decode(reader, reader.uint32()));
  16099. break;
  16100. default:
  16101. reader.skipType(tag & 7);
  16102. break;
  16103. }
  16104. }
  16105. return message;
  16106. }
  16107. static decodeText(reader) {
  16108. const message = new CoreML.Specification.SparseSupportVectors();
  16109. reader.start();
  16110. while (!reader.end()) {
  16111. const tag = reader.tag();
  16112. switch (tag) {
  16113. case "vectors":
  16114. message.vectors.push(CoreML.Specification.SparseVector.decodeText(reader));
  16115. break;
  16116. default:
  16117. reader.field(tag, message);
  16118. break;
  16119. }
  16120. }
  16121. return message;
  16122. }
  16123. };
  16124. CoreML.Specification.DenseVector = class DenseVector {
  16125. constructor() {
  16126. this.values = [];
  16127. }
  16128. static decode(reader, length) {
  16129. const message = new CoreML.Specification.DenseVector();
  16130. const end = length === undefined ? reader.length : reader.position + length;
  16131. while (reader.position < end) {
  16132. const tag = reader.uint32();
  16133. switch (tag >>> 3) {
  16134. case 1:
  16135. message.values = reader.doubles(message.values, tag);
  16136. break;
  16137. default:
  16138. reader.skipType(tag & 7);
  16139. break;
  16140. }
  16141. }
  16142. return message;
  16143. }
  16144. static decodeText(reader) {
  16145. const message = new CoreML.Specification.DenseVector();
  16146. reader.start();
  16147. while (!reader.end()) {
  16148. const tag = reader.tag();
  16149. switch (tag) {
  16150. case "values":
  16151. reader.array(message.values, () => reader.double());
  16152. break;
  16153. default:
  16154. reader.field(tag, message);
  16155. break;
  16156. }
  16157. }
  16158. return message;
  16159. }
  16160. };
  16161. CoreML.Specification.DenseSupportVectors = class DenseSupportVectors {
  16162. constructor() {
  16163. this.vectors = [];
  16164. }
  16165. static decode(reader, length) {
  16166. const message = new CoreML.Specification.DenseSupportVectors();
  16167. const end = length === undefined ? reader.length : reader.position + length;
  16168. while (reader.position < end) {
  16169. const tag = reader.uint32();
  16170. switch (tag >>> 3) {
  16171. case 1:
  16172. message.vectors.push(CoreML.Specification.DenseVector.decode(reader, reader.uint32()));
  16173. break;
  16174. default:
  16175. reader.skipType(tag & 7);
  16176. break;
  16177. }
  16178. }
  16179. return message;
  16180. }
  16181. static decodeText(reader) {
  16182. const message = new CoreML.Specification.DenseSupportVectors();
  16183. reader.start();
  16184. while (!reader.end()) {
  16185. const tag = reader.tag();
  16186. switch (tag) {
  16187. case "vectors":
  16188. message.vectors.push(CoreML.Specification.DenseVector.decodeText(reader));
  16189. break;
  16190. default:
  16191. reader.field(tag, message);
  16192. break;
  16193. }
  16194. }
  16195. return message;
  16196. }
  16197. };
  16198. CoreML.Specification.Coefficients = class Coefficients {
  16199. constructor() {
  16200. this.alpha = [];
  16201. }
  16202. static decode(reader, length) {
  16203. const message = new CoreML.Specification.Coefficients();
  16204. const end = length === undefined ? reader.length : reader.position + length;
  16205. while (reader.position < end) {
  16206. const tag = reader.uint32();
  16207. switch (tag >>> 3) {
  16208. case 1:
  16209. message.alpha = reader.doubles(message.alpha, tag);
  16210. break;
  16211. default:
  16212. reader.skipType(tag & 7);
  16213. break;
  16214. }
  16215. }
  16216. return message;
  16217. }
  16218. static decodeText(reader) {
  16219. const message = new CoreML.Specification.Coefficients();
  16220. reader.start();
  16221. while (!reader.end()) {
  16222. const tag = reader.tag();
  16223. switch (tag) {
  16224. case "alpha":
  16225. reader.array(message.alpha, () => reader.double());
  16226. break;
  16227. default:
  16228. reader.field(tag, message);
  16229. break;
  16230. }
  16231. }
  16232. return message;
  16233. }
  16234. };
  16235. CoreML.Specification.SupportVectorRegressor = class SupportVectorRegressor {
  16236. get supportVectors() {
  16237. CoreML.Specification.SupportVectorRegressor.supportVectorsSet = CoreML.Specification.SupportVectorRegressor.supportVectorsSet || new Set(["sparseSupportVectors", "denseSupportVectors"]);
  16238. return Object.keys(this).find((key) => CoreML.Specification.SupportVectorRegressor.supportVectorsSet.has(key) && this[key] !== null);
  16239. }
  16240. static decode(reader, length) {
  16241. const message = new CoreML.Specification.SupportVectorRegressor();
  16242. const end = length === undefined ? reader.length : reader.position + length;
  16243. while (reader.position < end) {
  16244. const tag = reader.uint32();
  16245. switch (tag >>> 3) {
  16246. case 1:
  16247. message.kernel = CoreML.Specification.Kernel.decode(reader, reader.uint32());
  16248. break;
  16249. case 2:
  16250. message.sparseSupportVectors = CoreML.Specification.SparseSupportVectors.decode(reader, reader.uint32());
  16251. break;
  16252. case 3:
  16253. message.denseSupportVectors = CoreML.Specification.DenseSupportVectors.decode(reader, reader.uint32());
  16254. break;
  16255. case 4:
  16256. message.coefficients = CoreML.Specification.Coefficients.decode(reader, reader.uint32());
  16257. break;
  16258. case 5:
  16259. message.rho = reader.double();
  16260. break;
  16261. default:
  16262. reader.skipType(tag & 7);
  16263. break;
  16264. }
  16265. }
  16266. return message;
  16267. }
  16268. static decodeText(reader) {
  16269. const message = new CoreML.Specification.SupportVectorRegressor();
  16270. reader.start();
  16271. while (!reader.end()) {
  16272. const tag = reader.tag();
  16273. switch (tag) {
  16274. case "kernel":
  16275. message.kernel = CoreML.Specification.Kernel.decodeText(reader);
  16276. break;
  16277. case "sparseSupportVectors":
  16278. message.sparseSupportVectors = CoreML.Specification.SparseSupportVectors.decodeText(reader);
  16279. break;
  16280. case "denseSupportVectors":
  16281. message.denseSupportVectors = CoreML.Specification.DenseSupportVectors.decodeText(reader);
  16282. break;
  16283. case "coefficients":
  16284. message.coefficients = CoreML.Specification.Coefficients.decodeText(reader);
  16285. break;
  16286. case "rho":
  16287. message.rho = reader.double();
  16288. break;
  16289. default:
  16290. reader.field(tag, message);
  16291. break;
  16292. }
  16293. }
  16294. return message;
  16295. }
  16296. };
  16297. CoreML.Specification.SupportVectorRegressor.prototype.kernel = null;
  16298. CoreML.Specification.SupportVectorRegressor.prototype.coefficients = null;
  16299. CoreML.Specification.SupportVectorRegressor.prototype.rho = 0;
  16300. CoreML.Specification.SupportVectorClassifier = class SupportVectorClassifier {
  16301. constructor() {
  16302. this.numberOfSupportVectorsPerClass = [];
  16303. this.coefficients = [];
  16304. this.rho = [];
  16305. this.probA = [];
  16306. this.probB = [];
  16307. }
  16308. get supportVectors() {
  16309. CoreML.Specification.SupportVectorClassifier.supportVectorsSet = CoreML.Specification.SupportVectorClassifier.supportVectorsSet || new Set(["sparseSupportVectors", "denseSupportVectors"]);
  16310. return Object.keys(this).find((key) => CoreML.Specification.SupportVectorClassifier.supportVectorsSet.has(key) && this[key] !== null);
  16311. }
  16312. get ClassLabels() {
  16313. CoreML.Specification.SupportVectorClassifier.ClassLabelsSet = CoreML.Specification.SupportVectorClassifier.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  16314. return Object.keys(this).find((key) => CoreML.Specification.SupportVectorClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  16315. }
  16316. static decode(reader, length) {
  16317. const message = new CoreML.Specification.SupportVectorClassifier();
  16318. const end = length === undefined ? reader.length : reader.position + length;
  16319. while (reader.position < end) {
  16320. const tag = reader.uint32();
  16321. switch (tag >>> 3) {
  16322. case 1:
  16323. message.kernel = CoreML.Specification.Kernel.decode(reader, reader.uint32());
  16324. break;
  16325. case 2:
  16326. message.numberOfSupportVectorsPerClass = reader.array(message.numberOfSupportVectorsPerClass, () => reader.int32(), tag);
  16327. break;
  16328. case 3:
  16329. message.sparseSupportVectors = CoreML.Specification.SparseSupportVectors.decode(reader, reader.uint32());
  16330. break;
  16331. case 4:
  16332. message.denseSupportVectors = CoreML.Specification.DenseSupportVectors.decode(reader, reader.uint32());
  16333. break;
  16334. case 5:
  16335. message.coefficients.push(CoreML.Specification.Coefficients.decode(reader, reader.uint32()));
  16336. break;
  16337. case 6:
  16338. message.rho = reader.doubles(message.rho, tag);
  16339. break;
  16340. case 7:
  16341. message.probA = reader.doubles(message.probA, tag);
  16342. break;
  16343. case 8:
  16344. message.probB = reader.doubles(message.probB, tag);
  16345. break;
  16346. case 100:
  16347. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  16348. break;
  16349. case 101:
  16350. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  16351. break;
  16352. default:
  16353. reader.skipType(tag & 7);
  16354. break;
  16355. }
  16356. }
  16357. return message;
  16358. }
  16359. static decodeText(reader) {
  16360. const message = new CoreML.Specification.SupportVectorClassifier();
  16361. reader.start();
  16362. while (!reader.end()) {
  16363. const tag = reader.tag();
  16364. switch (tag) {
  16365. case "kernel":
  16366. message.kernel = CoreML.Specification.Kernel.decodeText(reader);
  16367. break;
  16368. case "numberOfSupportVectorsPerClass":
  16369. reader.array(message.numberOfSupportVectorsPerClass, () => reader.int32());
  16370. break;
  16371. case "sparseSupportVectors":
  16372. message.sparseSupportVectors = CoreML.Specification.SparseSupportVectors.decodeText(reader);
  16373. break;
  16374. case "denseSupportVectors":
  16375. message.denseSupportVectors = CoreML.Specification.DenseSupportVectors.decodeText(reader);
  16376. break;
  16377. case "coefficients":
  16378. message.coefficients.push(CoreML.Specification.Coefficients.decodeText(reader));
  16379. break;
  16380. case "rho":
  16381. reader.array(message.rho, () => reader.double());
  16382. break;
  16383. case "probA":
  16384. reader.array(message.probA, () => reader.double());
  16385. break;
  16386. case "probB":
  16387. reader.array(message.probB, () => reader.double());
  16388. break;
  16389. case "stringClassLabels":
  16390. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  16391. break;
  16392. case "int64ClassLabels":
  16393. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  16394. break;
  16395. default:
  16396. reader.field(tag, message);
  16397. break;
  16398. }
  16399. }
  16400. return message;
  16401. }
  16402. };
  16403. CoreML.Specification.SupportVectorClassifier.prototype.kernel = null;
  16404. CoreML.Specification.TreeEnsemblePostEvaluationTransform = {
  16405. "NoTransform": 0,
  16406. "Classification_SoftMax": 1,
  16407. "Regression_Logistic": 2,
  16408. "Classification_SoftMaxWithZeroClassReference": 3
  16409. };
  16410. CoreML.Specification.TreeEnsembleParameters = class TreeEnsembleParameters {
  16411. constructor() {
  16412. this.nodes = [];
  16413. this.basePredictionValue = [];
  16414. }
  16415. static decode(reader, length) {
  16416. const message = new CoreML.Specification.TreeEnsembleParameters();
  16417. const end = length === undefined ? reader.length : reader.position + length;
  16418. while (reader.position < end) {
  16419. const tag = reader.uint32();
  16420. switch (tag >>> 3) {
  16421. case 1:
  16422. message.nodes.push(CoreML.Specification.TreeEnsembleParameters.TreeNode.decode(reader, reader.uint32()));
  16423. break;
  16424. case 2:
  16425. message.numPredictionDimensions = reader.uint64();
  16426. break;
  16427. case 3:
  16428. message.basePredictionValue = reader.doubles(message.basePredictionValue, tag);
  16429. break;
  16430. default:
  16431. reader.skipType(tag & 7);
  16432. break;
  16433. }
  16434. }
  16435. return message;
  16436. }
  16437. static decodeText(reader) {
  16438. const message = new CoreML.Specification.TreeEnsembleParameters();
  16439. reader.start();
  16440. while (!reader.end()) {
  16441. const tag = reader.tag();
  16442. switch (tag) {
  16443. case "nodes":
  16444. message.nodes.push(CoreML.Specification.TreeEnsembleParameters.TreeNode.decodeText(reader));
  16445. break;
  16446. case "numPredictionDimensions":
  16447. message.numPredictionDimensions = reader.uint64();
  16448. break;
  16449. case "basePredictionValue":
  16450. reader.array(message.basePredictionValue, () => reader.double());
  16451. break;
  16452. default:
  16453. reader.field(tag, message);
  16454. break;
  16455. }
  16456. }
  16457. return message;
  16458. }
  16459. };
  16460. CoreML.Specification.TreeEnsembleParameters.prototype.numPredictionDimensions = 0n;
  16461. CoreML.Specification.TreeEnsembleParameters.TreeNode = class TreeNode {
  16462. constructor() {
  16463. this.evaluationInfo = [];
  16464. }
  16465. static decode(reader, length) {
  16466. const message = new CoreML.Specification.TreeEnsembleParameters.TreeNode();
  16467. const end = length === undefined ? reader.length : reader.position + length;
  16468. while (reader.position < end) {
  16469. const tag = reader.uint32();
  16470. switch (tag >>> 3) {
  16471. case 1:
  16472. message.treeId = reader.uint64();
  16473. break;
  16474. case 2:
  16475. message.nodeId = reader.uint64();
  16476. break;
  16477. case 3:
  16478. message.nodeBehavior = reader.int32();
  16479. break;
  16480. case 10:
  16481. message.branchFeatureIndex = reader.uint64();
  16482. break;
  16483. case 11:
  16484. message.branchFeatureValue = reader.double();
  16485. break;
  16486. case 12:
  16487. message.trueChildNodeId = reader.uint64();
  16488. break;
  16489. case 13:
  16490. message.falseChildNodeId = reader.uint64();
  16491. break;
  16492. case 14:
  16493. message.missingValueTracksTrueChild = reader.bool();
  16494. break;
  16495. case 20:
  16496. message.evaluationInfo.push(CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.decode(reader, reader.uint32()));
  16497. break;
  16498. case 30:
  16499. message.relativeHitRate = reader.double();
  16500. break;
  16501. default:
  16502. reader.skipType(tag & 7);
  16503. break;
  16504. }
  16505. }
  16506. return message;
  16507. }
  16508. static decodeText(reader) {
  16509. const message = new CoreML.Specification.TreeEnsembleParameters.TreeNode();
  16510. reader.start();
  16511. while (!reader.end()) {
  16512. const tag = reader.tag();
  16513. switch (tag) {
  16514. case "treeId":
  16515. message.treeId = reader.uint64();
  16516. break;
  16517. case "nodeId":
  16518. message.nodeId = reader.uint64();
  16519. break;
  16520. case "nodeBehavior":
  16521. message.nodeBehavior = reader.enum(CoreML.Specification.TreeEnsembleParameters.TreeNode.TreeNodeBehavior);
  16522. break;
  16523. case "branchFeatureIndex":
  16524. message.branchFeatureIndex = reader.uint64();
  16525. break;
  16526. case "branchFeatureValue":
  16527. message.branchFeatureValue = reader.double();
  16528. break;
  16529. case "trueChildNodeId":
  16530. message.trueChildNodeId = reader.uint64();
  16531. break;
  16532. case "falseChildNodeId":
  16533. message.falseChildNodeId = reader.uint64();
  16534. break;
  16535. case "missingValueTracksTrueChild":
  16536. message.missingValueTracksTrueChild = reader.bool();
  16537. break;
  16538. case "evaluationInfo":
  16539. message.evaluationInfo.push(CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.decodeText(reader));
  16540. break;
  16541. case "relativeHitRate":
  16542. message.relativeHitRate = reader.double();
  16543. break;
  16544. default:
  16545. reader.field(tag, message);
  16546. break;
  16547. }
  16548. }
  16549. return message;
  16550. }
  16551. };
  16552. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.treeId = 0n;
  16553. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.nodeId = 0n;
  16554. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.nodeBehavior = 0;
  16555. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.branchFeatureIndex = 0n;
  16556. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.branchFeatureValue = 0;
  16557. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.trueChildNodeId = 0n;
  16558. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.falseChildNodeId = 0n;
  16559. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.missingValueTracksTrueChild = false;
  16560. CoreML.Specification.TreeEnsembleParameters.TreeNode.prototype.relativeHitRate = 0;
  16561. CoreML.Specification.TreeEnsembleParameters.TreeNode.TreeNodeBehavior = {
  16562. "BranchOnValueLessThanEqual": 0,
  16563. "BranchOnValueLessThan": 1,
  16564. "BranchOnValueGreaterThanEqual": 2,
  16565. "BranchOnValueGreaterThan": 3,
  16566. "BranchOnValueEqual": 4,
  16567. "BranchOnValueNotEqual": 5,
  16568. "LeafNode": 6
  16569. };
  16570. CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo = class EvaluationInfo {
  16571. static decode(reader, length) {
  16572. const message = new CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo();
  16573. const end = length === undefined ? reader.length : reader.position + length;
  16574. while (reader.position < end) {
  16575. const tag = reader.uint32();
  16576. switch (tag >>> 3) {
  16577. case 1:
  16578. message.evaluationIndex = reader.uint64();
  16579. break;
  16580. case 2:
  16581. message.evaluationValue = reader.double();
  16582. break;
  16583. default:
  16584. reader.skipType(tag & 7);
  16585. break;
  16586. }
  16587. }
  16588. return message;
  16589. }
  16590. static decodeText(reader) {
  16591. const message = new CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo();
  16592. reader.start();
  16593. while (!reader.end()) {
  16594. const tag = reader.tag();
  16595. switch (tag) {
  16596. case "evaluationIndex":
  16597. message.evaluationIndex = reader.uint64();
  16598. break;
  16599. case "evaluationValue":
  16600. message.evaluationValue = reader.double();
  16601. break;
  16602. default:
  16603. reader.field(tag, message);
  16604. break;
  16605. }
  16606. }
  16607. return message;
  16608. }
  16609. };
  16610. CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.prototype.evaluationIndex = 0n;
  16611. CoreML.Specification.TreeEnsembleParameters.TreeNode.EvaluationInfo.prototype.evaluationValue = 0;
  16612. CoreML.Specification.TreeEnsembleClassifier = class TreeEnsembleClassifier {
  16613. get ClassLabels() {
  16614. CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet = CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet || new Set(["stringClassLabels", "int64ClassLabels"]);
  16615. return Object.keys(this).find((key) => CoreML.Specification.TreeEnsembleClassifier.ClassLabelsSet.has(key) && this[key] !== null);
  16616. }
  16617. static decode(reader, length) {
  16618. const message = new CoreML.Specification.TreeEnsembleClassifier();
  16619. const end = length === undefined ? reader.length : reader.position + length;
  16620. while (reader.position < end) {
  16621. const tag = reader.uint32();
  16622. switch (tag >>> 3) {
  16623. case 1:
  16624. message.treeEnsemble = CoreML.Specification.TreeEnsembleParameters.decode(reader, reader.uint32());
  16625. break;
  16626. case 2:
  16627. message.postEvaluationTransform = reader.int32();
  16628. break;
  16629. case 100:
  16630. message.stringClassLabels = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  16631. break;
  16632. case 101:
  16633. message.int64ClassLabels = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  16634. break;
  16635. default:
  16636. reader.skipType(tag & 7);
  16637. break;
  16638. }
  16639. }
  16640. return message;
  16641. }
  16642. static decodeText(reader) {
  16643. const message = new CoreML.Specification.TreeEnsembleClassifier();
  16644. reader.start();
  16645. while (!reader.end()) {
  16646. const tag = reader.tag();
  16647. switch (tag) {
  16648. case "treeEnsemble":
  16649. message.treeEnsemble = CoreML.Specification.TreeEnsembleParameters.decodeText(reader);
  16650. break;
  16651. case "postEvaluationTransform":
  16652. message.postEvaluationTransform = reader.enum(CoreML.Specification.TreeEnsemblePostEvaluationTransform);
  16653. break;
  16654. case "stringClassLabels":
  16655. message.stringClassLabels = CoreML.Specification.StringVector.decodeText(reader);
  16656. break;
  16657. case "int64ClassLabels":
  16658. message.int64ClassLabels = CoreML.Specification.Int64Vector.decodeText(reader);
  16659. break;
  16660. default:
  16661. reader.field(tag, message);
  16662. break;
  16663. }
  16664. }
  16665. return message;
  16666. }
  16667. };
  16668. CoreML.Specification.TreeEnsembleClassifier.prototype.treeEnsemble = null;
  16669. CoreML.Specification.TreeEnsembleClassifier.prototype.postEvaluationTransform = 0;
  16670. CoreML.Specification.TreeEnsembleRegressor = class TreeEnsembleRegressor {
  16671. static decode(reader, length) {
  16672. const message = new CoreML.Specification.TreeEnsembleRegressor();
  16673. const end = length === undefined ? reader.length : reader.position + length;
  16674. while (reader.position < end) {
  16675. const tag = reader.uint32();
  16676. switch (tag >>> 3) {
  16677. case 1:
  16678. message.treeEnsemble = CoreML.Specification.TreeEnsembleParameters.decode(reader, reader.uint32());
  16679. break;
  16680. case 2:
  16681. message.postEvaluationTransform = reader.int32();
  16682. break;
  16683. default:
  16684. reader.skipType(tag & 7);
  16685. break;
  16686. }
  16687. }
  16688. return message;
  16689. }
  16690. static decodeText(reader) {
  16691. const message = new CoreML.Specification.TreeEnsembleRegressor();
  16692. reader.start();
  16693. while (!reader.end()) {
  16694. const tag = reader.tag();
  16695. switch (tag) {
  16696. case "treeEnsemble":
  16697. message.treeEnsemble = CoreML.Specification.TreeEnsembleParameters.decodeText(reader);
  16698. break;
  16699. case "postEvaluationTransform":
  16700. message.postEvaluationTransform = reader.enum(CoreML.Specification.TreeEnsemblePostEvaluationTransform);
  16701. break;
  16702. default:
  16703. reader.field(tag, message);
  16704. break;
  16705. }
  16706. }
  16707. return message;
  16708. }
  16709. };
  16710. CoreML.Specification.TreeEnsembleRegressor.prototype.treeEnsemble = null;
  16711. CoreML.Specification.TreeEnsembleRegressor.prototype.postEvaluationTransform = 0;
  16712. CoreML.Specification.ItemSimilarityRecommender = class ItemSimilarityRecommender {
  16713. constructor() {
  16714. this.itemItemSimilarities = [];
  16715. }
  16716. static decode(reader, length) {
  16717. const message = new CoreML.Specification.ItemSimilarityRecommender();
  16718. const end = length === undefined ? reader.length : reader.position + length;
  16719. while (reader.position < end) {
  16720. const tag = reader.uint32();
  16721. switch (tag >>> 3) {
  16722. case 1:
  16723. message.itemItemSimilarities.push(CoreML.Specification.ItemSimilarityRecommender.SimilarItems.decode(reader, reader.uint32()));
  16724. break;
  16725. case 2:
  16726. message.itemStringIds = CoreML.Specification.StringVector.decode(reader, reader.uint32());
  16727. break;
  16728. case 3:
  16729. message.itemInt64Ids = CoreML.Specification.Int64Vector.decode(reader, reader.uint32());
  16730. break;
  16731. case 10:
  16732. message.itemInputFeatureName = reader.string();
  16733. break;
  16734. case 11:
  16735. message.numRecommendationsInputFeatureName = reader.string();
  16736. break;
  16737. case 12:
  16738. message.itemRestrictionInputFeatureName = reader.string();
  16739. break;
  16740. case 13:
  16741. message.itemExclusionInputFeatureName = reader.string();
  16742. break;
  16743. case 20:
  16744. message.recommendedItemListOutputFeatureName = reader.string();
  16745. break;
  16746. case 21:
  16747. message.recommendedItemScoreOutputFeatureName = reader.string();
  16748. break;
  16749. default:
  16750. reader.skipType(tag & 7);
  16751. break;
  16752. }
  16753. }
  16754. return message;
  16755. }
  16756. static decodeText(reader) {
  16757. const message = new CoreML.Specification.ItemSimilarityRecommender();
  16758. reader.start();
  16759. while (!reader.end()) {
  16760. const tag = reader.tag();
  16761. switch (tag) {
  16762. case "itemItemSimilarities":
  16763. message.itemItemSimilarities.push(CoreML.Specification.ItemSimilarityRecommender.SimilarItems.decodeText(reader));
  16764. break;
  16765. case "itemStringIds":
  16766. message.itemStringIds = CoreML.Specification.StringVector.decodeText(reader);
  16767. break;
  16768. case "itemInt64Ids":
  16769. message.itemInt64Ids = CoreML.Specification.Int64Vector.decodeText(reader);
  16770. break;
  16771. case "itemInputFeatureName":
  16772. message.itemInputFeatureName = reader.string();
  16773. break;
  16774. case "numRecommendationsInputFeatureName":
  16775. message.numRecommendationsInputFeatureName = reader.string();
  16776. break;
  16777. case "itemRestrictionInputFeatureName":
  16778. message.itemRestrictionInputFeatureName = reader.string();
  16779. break;
  16780. case "itemExclusionInputFeatureName":
  16781. message.itemExclusionInputFeatureName = reader.string();
  16782. break;
  16783. case "recommendedItemListOutputFeatureName":
  16784. message.recommendedItemListOutputFeatureName = reader.string();
  16785. break;
  16786. case "recommendedItemScoreOutputFeatureName":
  16787. message.recommendedItemScoreOutputFeatureName = reader.string();
  16788. break;
  16789. default:
  16790. reader.field(tag, message);
  16791. break;
  16792. }
  16793. }
  16794. return message;
  16795. }
  16796. };
  16797. CoreML.Specification.ItemSimilarityRecommender.prototype.itemStringIds = null;
  16798. CoreML.Specification.ItemSimilarityRecommender.prototype.itemInt64Ids = null;
  16799. CoreML.Specification.ItemSimilarityRecommender.prototype.itemInputFeatureName = "";
  16800. CoreML.Specification.ItemSimilarityRecommender.prototype.numRecommendationsInputFeatureName = "";
  16801. CoreML.Specification.ItemSimilarityRecommender.prototype.itemRestrictionInputFeatureName = "";
  16802. CoreML.Specification.ItemSimilarityRecommender.prototype.itemExclusionInputFeatureName = "";
  16803. CoreML.Specification.ItemSimilarityRecommender.prototype.recommendedItemListOutputFeatureName = "";
  16804. CoreML.Specification.ItemSimilarityRecommender.prototype.recommendedItemScoreOutputFeatureName = "";
  16805. CoreML.Specification.ItemSimilarityRecommender.ConnectedItem = class ConnectedItem {
  16806. static decode(reader, length) {
  16807. const message = new CoreML.Specification.ItemSimilarityRecommender.ConnectedItem();
  16808. const end = length === undefined ? reader.length : reader.position + length;
  16809. while (reader.position < end) {
  16810. const tag = reader.uint32();
  16811. switch (tag >>> 3) {
  16812. case 1:
  16813. message.itemId = reader.uint64();
  16814. break;
  16815. case 2:
  16816. message.similarityScore = reader.double();
  16817. break;
  16818. default:
  16819. reader.skipType(tag & 7);
  16820. break;
  16821. }
  16822. }
  16823. return message;
  16824. }
  16825. static decodeText(reader) {
  16826. const message = new CoreML.Specification.ItemSimilarityRecommender.ConnectedItem();
  16827. reader.start();
  16828. while (!reader.end()) {
  16829. const tag = reader.tag();
  16830. switch (tag) {
  16831. case "itemId":
  16832. message.itemId = reader.uint64();
  16833. break;
  16834. case "similarityScore":
  16835. message.similarityScore = reader.double();
  16836. break;
  16837. default:
  16838. reader.field(tag, message);
  16839. break;
  16840. }
  16841. }
  16842. return message;
  16843. }
  16844. };
  16845. CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.prototype.itemId = 0n;
  16846. CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.prototype.similarityScore = 0;
  16847. CoreML.Specification.ItemSimilarityRecommender.SimilarItems = class SimilarItems {
  16848. constructor() {
  16849. this.similarItemList = [];
  16850. }
  16851. static decode(reader, length) {
  16852. const message = new CoreML.Specification.ItemSimilarityRecommender.SimilarItems();
  16853. const end = length === undefined ? reader.length : reader.position + length;
  16854. while (reader.position < end) {
  16855. const tag = reader.uint32();
  16856. switch (tag >>> 3) {
  16857. case 1:
  16858. message.itemId = reader.uint64();
  16859. break;
  16860. case 2:
  16861. message.similarItemList.push(CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.decode(reader, reader.uint32()));
  16862. break;
  16863. case 3:
  16864. message.itemScoreAdjustment = reader.double();
  16865. break;
  16866. default:
  16867. reader.skipType(tag & 7);
  16868. break;
  16869. }
  16870. }
  16871. return message;
  16872. }
  16873. static decodeText(reader) {
  16874. const message = new CoreML.Specification.ItemSimilarityRecommender.SimilarItems();
  16875. reader.start();
  16876. while (!reader.end()) {
  16877. const tag = reader.tag();
  16878. switch (tag) {
  16879. case "itemId":
  16880. message.itemId = reader.uint64();
  16881. break;
  16882. case "similarItemList":
  16883. message.similarItemList.push(CoreML.Specification.ItemSimilarityRecommender.ConnectedItem.decodeText(reader));
  16884. break;
  16885. case "itemScoreAdjustment":
  16886. message.itemScoreAdjustment = reader.double();
  16887. break;
  16888. default:
  16889. reader.field(tag, message);
  16890. break;
  16891. }
  16892. }
  16893. return message;
  16894. }
  16895. };
  16896. CoreML.Specification.ItemSimilarityRecommender.SimilarItems.prototype.itemId = 0n;
  16897. CoreML.Specification.ItemSimilarityRecommender.SimilarItems.prototype.itemScoreAdjustment = 0;
  16898. CoreML.Specification.LinkedModel = class LinkedModel {
  16899. get LinkType() {
  16900. CoreML.Specification.LinkedModel.LinkTypeSet = CoreML.Specification.LinkedModel.LinkTypeSet || new Set(["linkedModelFile"]);
  16901. return Object.keys(this).find((key) => CoreML.Specification.LinkedModel.LinkTypeSet.has(key) && this[key] !== null);
  16902. }
  16903. static decode(reader, length) {
  16904. const message = new CoreML.Specification.LinkedModel();
  16905. const end = length === undefined ? reader.length : reader.position + length;
  16906. while (reader.position < end) {
  16907. const tag = reader.uint32();
  16908. switch (tag >>> 3) {
  16909. case 1:
  16910. message.linkedModelFile = CoreML.Specification.LinkedModelFile.decode(reader, reader.uint32());
  16911. break;
  16912. default:
  16913. reader.skipType(tag & 7);
  16914. break;
  16915. }
  16916. }
  16917. return message;
  16918. }
  16919. static decodeText(reader) {
  16920. const message = new CoreML.Specification.LinkedModel();
  16921. reader.start();
  16922. while (!reader.end()) {
  16923. const tag = reader.tag();
  16924. switch (tag) {
  16925. case "linkedModelFile":
  16926. message.linkedModelFile = CoreML.Specification.LinkedModelFile.decodeText(reader);
  16927. break;
  16928. default:
  16929. reader.field(tag, message);
  16930. break;
  16931. }
  16932. }
  16933. return message;
  16934. }
  16935. };
  16936. CoreML.Specification.LinkedModelFile = class LinkedModelFile {
  16937. static decode(reader, length) {
  16938. const message = new CoreML.Specification.LinkedModelFile();
  16939. const end = length === undefined ? reader.length : reader.position + length;
  16940. while (reader.position < end) {
  16941. const tag = reader.uint32();
  16942. switch (tag >>> 3) {
  16943. case 1:
  16944. message.linkedModelFileName = CoreML.Specification.StringParameter.decode(reader, reader.uint32());
  16945. break;
  16946. case 2:
  16947. message.linkedModelSearchPath = CoreML.Specification.StringParameter.decode(reader, reader.uint32());
  16948. break;
  16949. default:
  16950. reader.skipType(tag & 7);
  16951. break;
  16952. }
  16953. }
  16954. return message;
  16955. }
  16956. static decodeText(reader) {
  16957. const message = new CoreML.Specification.LinkedModelFile();
  16958. reader.start();
  16959. while (!reader.end()) {
  16960. const tag = reader.tag();
  16961. switch (tag) {
  16962. case "linkedModelFileName":
  16963. message.linkedModelFileName = CoreML.Specification.StringParameter.decodeText(reader);
  16964. break;
  16965. case "linkedModelSearchPath":
  16966. message.linkedModelSearchPath = CoreML.Specification.StringParameter.decodeText(reader);
  16967. break;
  16968. default:
  16969. reader.field(tag, message);
  16970. break;
  16971. }
  16972. }
  16973. return message;
  16974. }
  16975. };
  16976. CoreML.Specification.LinkedModelFile.prototype.linkedModelFileName = null;
  16977. CoreML.Specification.LinkedModelFile.prototype.linkedModelSearchPath = null;
  16978. CoreML.Specification.ClassConfidenceThresholding = class ClassConfidenceThresholding {
  16979. constructor() {
  16980. this.precisionRecallCurves = [];
  16981. }
  16982. static decode(reader, length) {
  16983. const message = new CoreML.Specification.ClassConfidenceThresholding();
  16984. const end = length === undefined ? reader.length : reader.position + length;
  16985. while (reader.position < end) {
  16986. const tag = reader.uint32();
  16987. switch (tag >>> 3) {
  16988. case 100:
  16989. message.precisionRecallCurves.push(CoreML.Specification.PrecisionRecallCurve.decode(reader, reader.uint32()));
  16990. break;
  16991. default:
  16992. reader.skipType(tag & 7);
  16993. break;
  16994. }
  16995. }
  16996. return message;
  16997. }
  16998. static decodeText(reader) {
  16999. const message = new CoreML.Specification.ClassConfidenceThresholding();
  17000. reader.start();
  17001. while (!reader.end()) {
  17002. const tag = reader.tag();
  17003. switch (tag) {
  17004. case "precisionRecallCurves":
  17005. message.precisionRecallCurves.push(CoreML.Specification.PrecisionRecallCurve.decodeText(reader));
  17006. break;
  17007. default:
  17008. reader.field(tag, message);
  17009. break;
  17010. }
  17011. }
  17012. return message;
  17013. }
  17014. };