coreml-proto.js 403 KB

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