coreml-proto.js 403 KB

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