2
0

tf-proto.js 342 KB

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