| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012 |
- export const tflite = {};
- tflite.TensorType = {
- FLOAT32: 0, '0': 'FLOAT32',
- FLOAT16: 1, '1': 'FLOAT16',
- INT32: 2, '2': 'INT32',
- UINT8: 3, '3': 'UINT8',
- INT64: 4, '4': 'INT64',
- STRING: 5, '5': 'STRING',
- BOOL: 6, '6': 'BOOL',
- INT16: 7, '7': 'INT16',
- COMPLEX64: 8, '8': 'COMPLEX64',
- INT8: 9, '9': 'INT8',
- FLOAT64: 10, '10': 'FLOAT64',
- COMPLEX128: 11, '11': 'COMPLEX128',
- UINT64: 12, '12': 'UINT64',
- RESOURCE: 13, '13': 'RESOURCE',
- VARIANT: 14, '14': 'VARIANT',
- UINT32: 15, '15': 'UINT32',
- UINT16: 16, '16': 'UINT16',
- INT4: 17, '17': 'INT4',
- BFLOAT16: 18, '18': 'BFLOAT16',
- INT2: 19, '19': 'INT2',
- UINT4: 20, '20': 'UINT4'
- };
- tflite.CustomQuantization = class CustomQuantization {
- static decode(reader, position) {
- const $ = new tflite.CustomQuantization();
- $.custom = reader.array(position, 4, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CustomQuantization();
- $.custom = reader.array(json.custom, Uint8Array);
- return $;
- }
- };
- tflite.QuantizationDetails = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.CustomQuantization.decode(reader, position);
- case 2: return tflite.BlockwiseQuantization.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'CustomQuantization': return tflite.CustomQuantization.decodeText(reader, json);
- case 'BlockwiseQuantization': return tflite.BlockwiseQuantization.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.BlockwiseQuantization = class BlockwiseQuantization {
- static decode(reader, position) {
- const $ = new tflite.BlockwiseQuantization();
- $.scales = reader.int32_(position, 4, 0);
- $.zero_points = reader.int32_(position, 6, 0);
- $.block_size = reader.int32_(position, 8, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BlockwiseQuantization();
- $.scales = reader.value(json.scales, 0);
- $.zero_points = reader.value(json.zero_points, 0);
- $.block_size = reader.value(json.block_size, 0);
- return $;
- }
- };
- tflite.QuantizationParameters = class QuantizationParameters {
- static decode(reader, position) {
- const $ = new tflite.QuantizationParameters();
- $.min = reader.array(position, 4, Float32Array);
- $.max = reader.array(position, 6, Float32Array);
- $.scale = reader.array(position, 8, Float32Array);
- $.zero_point = reader.int64s_(position, 10);
- $.details = reader.union(position, 12, tflite.QuantizationDetails);
- $.quantized_dimension = reader.int32_(position, 16, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.QuantizationParameters();
- $.min = reader.array(json.min, Float32Array);
- $.max = reader.array(json.max, Float32Array);
- $.scale = reader.array(json.scale, Float32Array);
- $.zero_point = reader.array(json.zero_point);
- $.details = tflite.QuantizationDetails.decodeText(reader, json.details, json.details_type);
- $.quantized_dimension = reader.value(json.quantized_dimension, 0);
- return $;
- }
- };
- tflite.DimensionType = {
- DENSE: 0, '0': 'DENSE',
- SPARSE_CSR: 1, '1': 'SPARSE_CSR'
- };
- tflite.Int32Vector = class Int32Vector {
- static decode(reader, position) {
- const $ = new tflite.Int32Vector();
- $.values = reader.array(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Int32Vector();
- $.values = reader.array(json.values, Int32Array);
- return $;
- }
- };
- tflite.Uint16Vector = class Uint16Vector {
- static decode(reader, position) {
- const $ = new tflite.Uint16Vector();
- $.values = reader.array(position, 4, Uint16Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Uint16Vector();
- $.values = reader.array(json.values, Uint16Array);
- return $;
- }
- };
- tflite.Uint8Vector = class Uint8Vector {
- static decode(reader, position) {
- const $ = new tflite.Uint8Vector();
- $.values = reader.array(position, 4, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Uint8Vector();
- $.values = reader.array(json.values, Uint8Array);
- return $;
- }
- };
- tflite.SparseIndexVector = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.Int32Vector.decode(reader, position);
- case 2: return tflite.Uint16Vector.decode(reader, position);
- case 3: return tflite.Uint8Vector.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'Int32Vector': return tflite.Int32Vector.decodeText(reader, json);
- case 'Uint16Vector': return tflite.Uint16Vector.decodeText(reader, json);
- case 'Uint8Vector': return tflite.Uint8Vector.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.DimensionMetadata = class DimensionMetadata {
- static decode(reader, position) {
- const $ = new tflite.DimensionMetadata();
- $.format = reader.int8_(position, 4, 0);
- $.dense_size = reader.int32_(position, 6, 0);
- $.array_segments = reader.union(position, 8, tflite.SparseIndexVector);
- $.array_indices = reader.union(position, 12, tflite.SparseIndexVector);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.DimensionMetadata();
- $.format = tflite.DimensionType[json.format];
- $.dense_size = reader.value(json.dense_size, 0);
- $.array_segments = tflite.SparseIndexVector.decodeText(reader, json.array_segments, json.array_segments_type);
- $.array_indices = tflite.SparseIndexVector.decodeText(reader, json.array_indices, json.array_indices_type);
- return $;
- }
- };
- tflite.SparsityParameters = class SparsityParameters {
- static decode(reader, position) {
- const $ = new tflite.SparsityParameters();
- $.traversal_order = reader.array(position, 4, Int32Array);
- $.block_map = reader.array(position, 6, Int32Array);
- $.dim_metadata = reader.tables(position, 8, tflite.DimensionMetadata);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SparsityParameters();
- $.traversal_order = reader.array(json.traversal_order, Int32Array);
- $.block_map = reader.array(json.block_map, Int32Array);
- $.dim_metadata = reader.objects(json.dim_metadata, tflite.DimensionMetadata);
- return $;
- }
- };
- tflite.VariantSubType = class VariantSubType {
- static decode(reader, position) {
- const $ = new tflite.VariantSubType();
- $.shape = reader.array(position, 4, Int32Array);
- $.type = reader.int8_(position, 6, 0);
- $.has_rank = reader.bool_(position, 8, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.VariantSubType();
- $.shape = reader.array(json.shape, Int32Array);
- $.type = tflite.TensorType[json.type];
- $.has_rank = reader.value(json.has_rank, false);
- return $;
- }
- };
- tflite.Tensor = class Tensor {
- static decode(reader, position) {
- const $ = new tflite.Tensor();
- $.shape = reader.array(position, 4, Int32Array);
- $.type = reader.int8_(position, 6, 0);
- $.buffer = reader.uint32_(position, 8, 0);
- $.name = reader.string_(position, 10, null);
- $.quantization = reader.table(position, 12, tflite.QuantizationParameters);
- $.is_variable = reader.bool_(position, 14, false);
- $.sparsity = reader.table(position, 16, tflite.SparsityParameters);
- $.shape_signature = reader.array(position, 18, Int32Array);
- $.has_rank = reader.bool_(position, 20, false);
- $.variant_tensors = reader.tables(position, 22, tflite.VariantSubType);
- $.external_buffer = reader.uint32_(position, 24, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Tensor();
- $.shape = reader.array(json.shape, Int32Array);
- $.type = tflite.TensorType[json.type];
- $.buffer = reader.value(json.buffer, 0);
- $.name = reader.value(json.name, null);
- $.quantization = reader.object(json.quantization, tflite.QuantizationParameters);
- $.is_variable = reader.value(json.is_variable, false);
- $.sparsity = reader.object(json.sparsity, tflite.SparsityParameters);
- $.shape_signature = reader.array(json.shape_signature, Int32Array);
- $.has_rank = reader.value(json.has_rank, false);
- $.variant_tensors = reader.objects(json.variant_tensors, tflite.VariantSubType);
- $.external_buffer = reader.value(json.external_buffer, 0);
- return $;
- }
- };
- tflite.BuiltinOperator = {
- ADD: 0, '0': 'ADD',
- AVERAGE_POOL_2D: 1, '1': 'AVERAGE_POOL_2D',
- CONCATENATION: 2, '2': 'CONCATENATION',
- CONV_2D: 3, '3': 'CONV_2D',
- DEPTHWISE_CONV_2D: 4, '4': 'DEPTHWISE_CONV_2D',
- DEPTH_TO_SPACE: 5, '5': 'DEPTH_TO_SPACE',
- DEQUANTIZE: 6, '6': 'DEQUANTIZE',
- EMBEDDING_LOOKUP: 7, '7': 'EMBEDDING_LOOKUP',
- FLOOR: 8, '8': 'FLOOR',
- FULLY_CONNECTED: 9, '9': 'FULLY_CONNECTED',
- HASHTABLE_LOOKUP: 10, '10': 'HASHTABLE_LOOKUP',
- L2_NORMALIZATION: 11, '11': 'L2_NORMALIZATION',
- L2_POOL_2D: 12, '12': 'L2_POOL_2D',
- LOCAL_RESPONSE_NORMALIZATION: 13, '13': 'LOCAL_RESPONSE_NORMALIZATION',
- LOGISTIC: 14, '14': 'LOGISTIC',
- LSH_PROJECTION: 15, '15': 'LSH_PROJECTION',
- LSTM: 16, '16': 'LSTM',
- MAX_POOL_2D: 17, '17': 'MAX_POOL_2D',
- MUL: 18, '18': 'MUL',
- RELU: 19, '19': 'RELU',
- RELU_N1_TO_1: 20, '20': 'RELU_N1_TO_1',
- RELU6: 21, '21': 'RELU6',
- RESHAPE: 22, '22': 'RESHAPE',
- RESIZE_BILINEAR: 23, '23': 'RESIZE_BILINEAR',
- RNN: 24, '24': 'RNN',
- SOFTMAX: 25, '25': 'SOFTMAX',
- SPACE_TO_DEPTH: 26, '26': 'SPACE_TO_DEPTH',
- SVDF: 27, '27': 'SVDF',
- TANH: 28, '28': 'TANH',
- CONCAT_EMBEDDINGS: 29, '29': 'CONCAT_EMBEDDINGS',
- SKIP_GRAM: 30, '30': 'SKIP_GRAM',
- CALL: 31, '31': 'CALL',
- CUSTOM: 32, '32': 'CUSTOM',
- EMBEDDING_LOOKUP_SPARSE: 33, '33': 'EMBEDDING_LOOKUP_SPARSE',
- PAD: 34, '34': 'PAD',
- UNIDIRECTIONAL_SEQUENCE_RNN: 35, '35': 'UNIDIRECTIONAL_SEQUENCE_RNN',
- GATHER: 36, '36': 'GATHER',
- BATCH_TO_SPACE_ND: 37, '37': 'BATCH_TO_SPACE_ND',
- SPACE_TO_BATCH_ND: 38, '38': 'SPACE_TO_BATCH_ND',
- TRANSPOSE: 39, '39': 'TRANSPOSE',
- MEAN: 40, '40': 'MEAN',
- SUB: 41, '41': 'SUB',
- DIV: 42, '42': 'DIV',
- SQUEEZE: 43, '43': 'SQUEEZE',
- UNIDIRECTIONAL_SEQUENCE_LSTM: 44, '44': 'UNIDIRECTIONAL_SEQUENCE_LSTM',
- STRIDED_SLICE: 45, '45': 'STRIDED_SLICE',
- BIDIRECTIONAL_SEQUENCE_RNN: 46, '46': 'BIDIRECTIONAL_SEQUENCE_RNN',
- EXP: 47, '47': 'EXP',
- TOPK_V2: 48, '48': 'TOPK_V2',
- SPLIT: 49, '49': 'SPLIT',
- LOG_SOFTMAX: 50, '50': 'LOG_SOFTMAX',
- DELEGATE: 51, '51': 'DELEGATE',
- BIDIRECTIONAL_SEQUENCE_LSTM: 52, '52': 'BIDIRECTIONAL_SEQUENCE_LSTM',
- CAST: 53, '53': 'CAST',
- PRELU: 54, '54': 'PRELU',
- MAXIMUM: 55, '55': 'MAXIMUM',
- ARG_MAX: 56, '56': 'ARG_MAX',
- MINIMUM: 57, '57': 'MINIMUM',
- LESS: 58, '58': 'LESS',
- NEG: 59, '59': 'NEG',
- PADV2: 60, '60': 'PADV2',
- GREATER: 61, '61': 'GREATER',
- GREATER_EQUAL: 62, '62': 'GREATER_EQUAL',
- LESS_EQUAL: 63, '63': 'LESS_EQUAL',
- SELECT: 64, '64': 'SELECT',
- SLICE: 65, '65': 'SLICE',
- SIN: 66, '66': 'SIN',
- TRANSPOSE_CONV: 67, '67': 'TRANSPOSE_CONV',
- SPARSE_TO_DENSE: 68, '68': 'SPARSE_TO_DENSE',
- TILE: 69, '69': 'TILE',
- EXPAND_DIMS: 70, '70': 'EXPAND_DIMS',
- EQUAL: 71, '71': 'EQUAL',
- NOT_EQUAL: 72, '72': 'NOT_EQUAL',
- LOG: 73, '73': 'LOG',
- SUM: 74, '74': 'SUM',
- SQRT: 75, '75': 'SQRT',
- RSQRT: 76, '76': 'RSQRT',
- SHAPE: 77, '77': 'SHAPE',
- POW: 78, '78': 'POW',
- ARG_MIN: 79, '79': 'ARG_MIN',
- FAKE_QUANT: 80, '80': 'FAKE_QUANT',
- REDUCE_PROD: 81, '81': 'REDUCE_PROD',
- REDUCE_MAX: 82, '82': 'REDUCE_MAX',
- PACK: 83, '83': 'PACK',
- LOGICAL_OR: 84, '84': 'LOGICAL_OR',
- ONE_HOT: 85, '85': 'ONE_HOT',
- LOGICAL_AND: 86, '86': 'LOGICAL_AND',
- LOGICAL_NOT: 87, '87': 'LOGICAL_NOT',
- UNPACK: 88, '88': 'UNPACK',
- REDUCE_MIN: 89, '89': 'REDUCE_MIN',
- FLOOR_DIV: 90, '90': 'FLOOR_DIV',
- REDUCE_ANY: 91, '91': 'REDUCE_ANY',
- SQUARE: 92, '92': 'SQUARE',
- ZEROS_LIKE: 93, '93': 'ZEROS_LIKE',
- FILL: 94, '94': 'FILL',
- FLOOR_MOD: 95, '95': 'FLOOR_MOD',
- RANGE: 96, '96': 'RANGE',
- RESIZE_NEAREST_NEIGHBOR: 97, '97': 'RESIZE_NEAREST_NEIGHBOR',
- LEAKY_RELU: 98, '98': 'LEAKY_RELU',
- SQUARED_DIFFERENCE: 99, '99': 'SQUARED_DIFFERENCE',
- MIRROR_PAD: 100, '100': 'MIRROR_PAD',
- ABS: 101, '101': 'ABS',
- SPLIT_V: 102, '102': 'SPLIT_V',
- UNIQUE: 103, '103': 'UNIQUE',
- CEIL: 104, '104': 'CEIL',
- REVERSE_V2: 105, '105': 'REVERSE_V2',
- ADD_N: 106, '106': 'ADD_N',
- GATHER_ND: 107, '107': 'GATHER_ND',
- COS: 108, '108': 'COS',
- WHERE: 109, '109': 'WHERE',
- RANK: 110, '110': 'RANK',
- ELU: 111, '111': 'ELU',
- REVERSE_SEQUENCE: 112, '112': 'REVERSE_SEQUENCE',
- MATRIX_DIAG: 113, '113': 'MATRIX_DIAG',
- QUANTIZE: 114, '114': 'QUANTIZE',
- MATRIX_SET_DIAG: 115, '115': 'MATRIX_SET_DIAG',
- ROUND: 116, '116': 'ROUND',
- HARD_SWISH: 117, '117': 'HARD_SWISH',
- IF: 118, '118': 'IF',
- WHILE: 119, '119': 'WHILE',
- NON_MAX_SUPPRESSION_V4: 120, '120': 'NON_MAX_SUPPRESSION_V4',
- NON_MAX_SUPPRESSION_V5: 121, '121': 'NON_MAX_SUPPRESSION_V5',
- SCATTER_ND: 122, '122': 'SCATTER_ND',
- SELECT_V2: 123, '123': 'SELECT_V2',
- DENSIFY: 124, '124': 'DENSIFY',
- SEGMENT_SUM: 125, '125': 'SEGMENT_SUM',
- BATCH_MATMUL: 126, '126': 'BATCH_MATMUL',
- PLACEHOLDER_FOR_GREATER_OP_CODES: 127, '127': 'PLACEHOLDER_FOR_GREATER_OP_CODES',
- CUMSUM: 128, '128': 'CUMSUM',
- CALL_ONCE: 129, '129': 'CALL_ONCE',
- BROADCAST_TO: 130, '130': 'BROADCAST_TO',
- RFFT2D: 131, '131': 'RFFT2D',
- CONV_3D: 132, '132': 'CONV_3D',
- IMAG: 133, '133': 'IMAG',
- REAL: 134, '134': 'REAL',
- COMPLEX_ABS: 135, '135': 'COMPLEX_ABS',
- HASHTABLE: 136, '136': 'HASHTABLE',
- HASHTABLE_FIND: 137, '137': 'HASHTABLE_FIND',
- HASHTABLE_IMPORT: 138, '138': 'HASHTABLE_IMPORT',
- HASHTABLE_SIZE: 139, '139': 'HASHTABLE_SIZE',
- REDUCE_ALL: 140, '140': 'REDUCE_ALL',
- CONV_3D_TRANSPOSE: 141, '141': 'CONV_3D_TRANSPOSE',
- VAR_HANDLE: 142, '142': 'VAR_HANDLE',
- READ_VARIABLE: 143, '143': 'READ_VARIABLE',
- ASSIGN_VARIABLE: 144, '144': 'ASSIGN_VARIABLE',
- BROADCAST_ARGS: 145, '145': 'BROADCAST_ARGS',
- RANDOM_STANDARD_NORMAL: 146, '146': 'RANDOM_STANDARD_NORMAL',
- BUCKETIZE: 147, '147': 'BUCKETIZE',
- RANDOM_UNIFORM: 148, '148': 'RANDOM_UNIFORM',
- MULTINOMIAL: 149, '149': 'MULTINOMIAL',
- GELU: 150, '150': 'GELU',
- DYNAMIC_UPDATE_SLICE: 151, '151': 'DYNAMIC_UPDATE_SLICE',
- RELU_0_TO_1: 152, '152': 'RELU_0_TO_1',
- UNSORTED_SEGMENT_PROD: 153, '153': 'UNSORTED_SEGMENT_PROD',
- UNSORTED_SEGMENT_MAX: 154, '154': 'UNSORTED_SEGMENT_MAX',
- UNSORTED_SEGMENT_SUM: 155, '155': 'UNSORTED_SEGMENT_SUM',
- ATAN2: 156, '156': 'ATAN2',
- UNSORTED_SEGMENT_MIN: 157, '157': 'UNSORTED_SEGMENT_MIN',
- SIGN: 158, '158': 'SIGN',
- BITCAST: 159, '159': 'BITCAST',
- BITWISE_XOR: 160, '160': 'BITWISE_XOR',
- RIGHT_SHIFT: 161, '161': 'RIGHT_SHIFT',
- STABLEHLO_LOGISTIC: 162, '162': 'STABLEHLO_LOGISTIC',
- STABLEHLO_ADD: 163, '163': 'STABLEHLO_ADD',
- STABLEHLO_DIVIDE: 164, '164': 'STABLEHLO_DIVIDE',
- STABLEHLO_MULTIPLY: 165, '165': 'STABLEHLO_MULTIPLY',
- STABLEHLO_MAXIMUM: 166, '166': 'STABLEHLO_MAXIMUM',
- STABLEHLO_RESHAPE: 167, '167': 'STABLEHLO_RESHAPE',
- STABLEHLO_CLAMP: 168, '168': 'STABLEHLO_CLAMP',
- STABLEHLO_CONCATENATE: 169, '169': 'STABLEHLO_CONCATENATE',
- STABLEHLO_BROADCAST_IN_DIM: 170, '170': 'STABLEHLO_BROADCAST_IN_DIM',
- STABLEHLO_CONVOLUTION: 171, '171': 'STABLEHLO_CONVOLUTION',
- STABLEHLO_SLICE: 172, '172': 'STABLEHLO_SLICE',
- STABLEHLO_CUSTOM_CALL: 173, '173': 'STABLEHLO_CUSTOM_CALL',
- STABLEHLO_REDUCE: 174, '174': 'STABLEHLO_REDUCE',
- STABLEHLO_ABS: 175, '175': 'STABLEHLO_ABS',
- STABLEHLO_AND: 176, '176': 'STABLEHLO_AND',
- STABLEHLO_COSINE: 177, '177': 'STABLEHLO_COSINE',
- STABLEHLO_EXPONENTIAL: 178, '178': 'STABLEHLO_EXPONENTIAL',
- STABLEHLO_FLOOR: 179, '179': 'STABLEHLO_FLOOR',
- STABLEHLO_LOG: 180, '180': 'STABLEHLO_LOG',
- STABLEHLO_MINIMUM: 181, '181': 'STABLEHLO_MINIMUM',
- STABLEHLO_NEGATE: 182, '182': 'STABLEHLO_NEGATE',
- STABLEHLO_OR: 183, '183': 'STABLEHLO_OR',
- STABLEHLO_POWER: 184, '184': 'STABLEHLO_POWER',
- STABLEHLO_REMAINDER: 185, '185': 'STABLEHLO_REMAINDER',
- STABLEHLO_RSQRT: 186, '186': 'STABLEHLO_RSQRT',
- STABLEHLO_SELECT: 187, '187': 'STABLEHLO_SELECT',
- STABLEHLO_SUBTRACT: 188, '188': 'STABLEHLO_SUBTRACT',
- STABLEHLO_TANH: 189, '189': 'STABLEHLO_TANH',
- STABLEHLO_SCATTER: 190, '190': 'STABLEHLO_SCATTER',
- STABLEHLO_COMPARE: 191, '191': 'STABLEHLO_COMPARE',
- STABLEHLO_CONVERT: 192, '192': 'STABLEHLO_CONVERT',
- STABLEHLO_DYNAMIC_SLICE: 193, '193': 'STABLEHLO_DYNAMIC_SLICE',
- STABLEHLO_DYNAMIC_UPDATE_SLICE: 194, '194': 'STABLEHLO_DYNAMIC_UPDATE_SLICE',
- STABLEHLO_PAD: 195, '195': 'STABLEHLO_PAD',
- STABLEHLO_IOTA: 196, '196': 'STABLEHLO_IOTA',
- STABLEHLO_DOT_GENERAL: 197, '197': 'STABLEHLO_DOT_GENERAL',
- STABLEHLO_REDUCE_WINDOW: 198, '198': 'STABLEHLO_REDUCE_WINDOW',
- STABLEHLO_SORT: 199, '199': 'STABLEHLO_SORT',
- STABLEHLO_WHILE: 200, '200': 'STABLEHLO_WHILE',
- STABLEHLO_GATHER: 201, '201': 'STABLEHLO_GATHER',
- STABLEHLO_TRANSPOSE: 202, '202': 'STABLEHLO_TRANSPOSE',
- DILATE: 203, '203': 'DILATE',
- STABLEHLO_RNG_BIT_GENERATOR: 204, '204': 'STABLEHLO_RNG_BIT_GENERATOR',
- REDUCE_WINDOW: 205, '205': 'REDUCE_WINDOW',
- STABLEHLO_COMPOSITE: 206, '206': 'STABLEHLO_COMPOSITE',
- STABLEHLO_SHIFT_LEFT: 207, '207': 'STABLEHLO_SHIFT_LEFT',
- STABLEHLO_CBRT: 208, '208': 'STABLEHLO_CBRT',
- STABLEHLO_CASE: 209, '209': 'STABLEHLO_CASE'
- };
- tflite.BuiltinOptions = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.Conv2DOptions.decode(reader, position);
- case 2: return tflite.DepthwiseConv2DOptions.decode(reader, position);
- case 3: return tflite.ConcatEmbeddingsOptions.decode(reader, position);
- case 4: return tflite.LSHProjectionOptions.decode(reader, position);
- case 5: return tflite.Pool2DOptions.decode(reader, position);
- case 6: return tflite.SVDFOptions.decode(reader, position);
- case 7: return tflite.RNNOptions.decode(reader, position);
- case 8: return tflite.FullyConnectedOptions.decode(reader, position);
- case 9: return tflite.SoftmaxOptions.decode(reader, position);
- case 10: return tflite.ConcatenationOptions.decode(reader, position);
- case 11: return tflite.AddOptions.decode(reader, position);
- case 12: return tflite.L2NormOptions.decode(reader, position);
- case 13: return tflite.LocalResponseNormalizationOptions.decode(reader, position);
- case 14: return tflite.LSTMOptions.decode(reader, position);
- case 15: return tflite.ResizeBilinearOptions.decode(reader, position);
- case 16: return tflite.CallOptions.decode(reader, position);
- case 17: return tflite.ReshapeOptions.decode(reader, position);
- case 18: return tflite.SkipGramOptions.decode(reader, position);
- case 19: return tflite.SpaceToDepthOptions.decode(reader, position);
- case 20: return tflite.EmbeddingLookupSparseOptions.decode(reader, position);
- case 21: return tflite.MulOptions.decode(reader, position);
- case 22: return tflite.PadOptions.decode(reader, position);
- case 23: return tflite.GatherOptions.decode(reader, position);
- case 24: return tflite.BatchToSpaceNDOptions.decode(reader, position);
- case 25: return tflite.SpaceToBatchNDOptions.decode(reader, position);
- case 26: return tflite.TransposeOptions.decode(reader, position);
- case 27: return tflite.ReducerOptions.decode(reader, position);
- case 28: return tflite.SubOptions.decode(reader, position);
- case 29: return tflite.DivOptions.decode(reader, position);
- case 30: return tflite.SqueezeOptions.decode(reader, position);
- case 31: return tflite.SequenceRNNOptions.decode(reader, position);
- case 32: return tflite.StridedSliceOptions.decode(reader, position);
- case 33: return tflite.ExpOptions.decode(reader, position);
- case 34: return tflite.TopKV2Options.decode(reader, position);
- case 35: return tflite.SplitOptions.decode(reader, position);
- case 36: return tflite.LogSoftmaxOptions.decode(reader, position);
- case 37: return tflite.CastOptions.decode(reader, position);
- case 38: return tflite.DequantizeOptions.decode(reader, position);
- case 39: return tflite.MaximumMinimumOptions.decode(reader, position);
- case 40: return tflite.ArgMaxOptions.decode(reader, position);
- case 41: return tflite.LessOptions.decode(reader, position);
- case 42: return tflite.NegOptions.decode(reader, position);
- case 43: return tflite.PadV2Options.decode(reader, position);
- case 44: return tflite.GreaterOptions.decode(reader, position);
- case 45: return tflite.GreaterEqualOptions.decode(reader, position);
- case 46: return tflite.LessEqualOptions.decode(reader, position);
- case 47: return tflite.SelectOptions.decode(reader, position);
- case 48: return tflite.SliceOptions.decode(reader, position);
- case 49: return tflite.TransposeConvOptions.decode(reader, position);
- case 50: return tflite.SparseToDenseOptions.decode(reader, position);
- case 51: return tflite.TileOptions.decode(reader, position);
- case 52: return tflite.ExpandDimsOptions.decode(reader, position);
- case 53: return tflite.EqualOptions.decode(reader, position);
- case 54: return tflite.NotEqualOptions.decode(reader, position);
- case 55: return tflite.ShapeOptions.decode(reader, position);
- case 56: return tflite.PowOptions.decode(reader, position);
- case 57: return tflite.ArgMinOptions.decode(reader, position);
- case 58: return tflite.FakeQuantOptions.decode(reader, position);
- case 59: return tflite.PackOptions.decode(reader, position);
- case 60: return tflite.LogicalOrOptions.decode(reader, position);
- case 61: return tflite.OneHotOptions.decode(reader, position);
- case 62: return tflite.LogicalAndOptions.decode(reader, position);
- case 63: return tflite.LogicalNotOptions.decode(reader, position);
- case 64: return tflite.UnpackOptions.decode(reader, position);
- case 65: return tflite.FloorDivOptions.decode(reader, position);
- case 66: return tflite.SquareOptions.decode(reader, position);
- case 67: return tflite.ZerosLikeOptions.decode(reader, position);
- case 68: return tflite.FillOptions.decode(reader, position);
- case 69: return tflite.BidirectionalSequenceLSTMOptions.decode(reader, position);
- case 70: return tflite.BidirectionalSequenceRNNOptions.decode(reader, position);
- case 71: return tflite.UnidirectionalSequenceLSTMOptions.decode(reader, position);
- case 72: return tflite.FloorModOptions.decode(reader, position);
- case 73: return tflite.RangeOptions.decode(reader, position);
- case 74: return tflite.ResizeNearestNeighborOptions.decode(reader, position);
- case 75: return tflite.LeakyReluOptions.decode(reader, position);
- case 76: return tflite.SquaredDifferenceOptions.decode(reader, position);
- case 77: return tflite.MirrorPadOptions.decode(reader, position);
- case 78: return tflite.AbsOptions.decode(reader, position);
- case 79: return tflite.SplitVOptions.decode(reader, position);
- case 80: return tflite.UniqueOptions.decode(reader, position);
- case 81: return tflite.ReverseV2Options.decode(reader, position);
- case 82: return tflite.AddNOptions.decode(reader, position);
- case 83: return tflite.GatherNdOptions.decode(reader, position);
- case 84: return tflite.CosOptions.decode(reader, position);
- case 85: return tflite.WhereOptions.decode(reader, position);
- case 86: return tflite.RankOptions.decode(reader, position);
- case 87: return tflite.ReverseSequenceOptions.decode(reader, position);
- case 88: return tflite.MatrixDiagOptions.decode(reader, position);
- case 89: return tflite.QuantizeOptions.decode(reader, position);
- case 90: return tflite.MatrixSetDiagOptions.decode(reader, position);
- case 91: return tflite.HardSwishOptions.decode(reader, position);
- case 92: return tflite.IfOptions.decode(reader, position);
- case 93: return tflite.WhileOptions.decode(reader, position);
- case 94: return tflite.DepthToSpaceOptions.decode(reader, position);
- case 95: return tflite.NonMaxSuppressionV4Options.decode(reader, position);
- case 96: return tflite.NonMaxSuppressionV5Options.decode(reader, position);
- case 97: return tflite.ScatterNdOptions.decode(reader, position);
- case 98: return tflite.SelectV2Options.decode(reader, position);
- case 99: return tflite.DensifyOptions.decode(reader, position);
- case 100: return tflite.SegmentSumOptions.decode(reader, position);
- case 101: return tflite.BatchMatMulOptions.decode(reader, position);
- case 102: return tflite.CumsumOptions.decode(reader, position);
- case 103: return tflite.CallOnceOptions.decode(reader, position);
- case 104: return tflite.BroadcastToOptions.decode(reader, position);
- case 105: return tflite.Rfft2dOptions.decode(reader, position);
- case 106: return tflite.Conv3DOptions.decode(reader, position);
- case 107: return tflite.HashtableOptions.decode(reader, position);
- case 108: return tflite.HashtableFindOptions.decode(reader, position);
- case 109: return tflite.HashtableImportOptions.decode(reader, position);
- case 110: return tflite.HashtableSizeOptions.decode(reader, position);
- case 111: return tflite.VarHandleOptions.decode(reader, position);
- case 112: return tflite.ReadVariableOptions.decode(reader, position);
- case 113: return tflite.AssignVariableOptions.decode(reader, position);
- case 114: return tflite.RandomOptions.decode(reader, position);
- case 115: return tflite.BucketizeOptions.decode(reader, position);
- case 116: return tflite.GeluOptions.decode(reader, position);
- case 117: return tflite.DynamicUpdateSliceOptions.decode(reader, position);
- case 118: return tflite.UnsortedSegmentProdOptions.decode(reader, position);
- case 119: return tflite.UnsortedSegmentMaxOptions.decode(reader, position);
- case 120: return tflite.UnsortedSegmentMinOptions.decode(reader, position);
- case 121: return tflite.UnsortedSegmentSumOptions.decode(reader, position);
- case 122: return tflite.ATan2Options.decode(reader, position);
- case 123: return tflite.SignOptions.decode(reader, position);
- case 124: return tflite.BitcastOptions.decode(reader, position);
- case 125: return tflite.BitwiseXorOptions.decode(reader, position);
- case 126: return tflite.RightShiftOptions.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'Conv2DOptions': return tflite.Conv2DOptions.decodeText(reader, json);
- case 'DepthwiseConv2DOptions': return tflite.DepthwiseConv2DOptions.decodeText(reader, json);
- case 'ConcatEmbeddingsOptions': return tflite.ConcatEmbeddingsOptions.decodeText(reader, json);
- case 'LSHProjectionOptions': return tflite.LSHProjectionOptions.decodeText(reader, json);
- case 'Pool2DOptions': return tflite.Pool2DOptions.decodeText(reader, json);
- case 'SVDFOptions': return tflite.SVDFOptions.decodeText(reader, json);
- case 'RNNOptions': return tflite.RNNOptions.decodeText(reader, json);
- case 'FullyConnectedOptions': return tflite.FullyConnectedOptions.decodeText(reader, json);
- case 'SoftmaxOptions': return tflite.SoftmaxOptions.decodeText(reader, json);
- case 'ConcatenationOptions': return tflite.ConcatenationOptions.decodeText(reader, json);
- case 'AddOptions': return tflite.AddOptions.decodeText(reader, json);
- case 'L2NormOptions': return tflite.L2NormOptions.decodeText(reader, json);
- case 'LocalResponseNormalizationOptions': return tflite.LocalResponseNormalizationOptions.decodeText(reader, json);
- case 'LSTMOptions': return tflite.LSTMOptions.decodeText(reader, json);
- case 'ResizeBilinearOptions': return tflite.ResizeBilinearOptions.decodeText(reader, json);
- case 'CallOptions': return tflite.CallOptions.decodeText(reader, json);
- case 'ReshapeOptions': return tflite.ReshapeOptions.decodeText(reader, json);
- case 'SkipGramOptions': return tflite.SkipGramOptions.decodeText(reader, json);
- case 'SpaceToDepthOptions': return tflite.SpaceToDepthOptions.decodeText(reader, json);
- case 'EmbeddingLookupSparseOptions': return tflite.EmbeddingLookupSparseOptions.decodeText(reader, json);
- case 'MulOptions': return tflite.MulOptions.decodeText(reader, json);
- case 'PadOptions': return tflite.PadOptions.decodeText(reader, json);
- case 'GatherOptions': return tflite.GatherOptions.decodeText(reader, json);
- case 'BatchToSpaceNDOptions': return tflite.BatchToSpaceNDOptions.decodeText(reader, json);
- case 'SpaceToBatchNDOptions': return tflite.SpaceToBatchNDOptions.decodeText(reader, json);
- case 'TransposeOptions': return tflite.TransposeOptions.decodeText(reader, json);
- case 'ReducerOptions': return tflite.ReducerOptions.decodeText(reader, json);
- case 'SubOptions': return tflite.SubOptions.decodeText(reader, json);
- case 'DivOptions': return tflite.DivOptions.decodeText(reader, json);
- case 'SqueezeOptions': return tflite.SqueezeOptions.decodeText(reader, json);
- case 'SequenceRNNOptions': return tflite.SequenceRNNOptions.decodeText(reader, json);
- case 'StridedSliceOptions': return tflite.StridedSliceOptions.decodeText(reader, json);
- case 'ExpOptions': return tflite.ExpOptions.decodeText(reader, json);
- case 'TopKV2Options': return tflite.TopKV2Options.decodeText(reader, json);
- case 'SplitOptions': return tflite.SplitOptions.decodeText(reader, json);
- case 'LogSoftmaxOptions': return tflite.LogSoftmaxOptions.decodeText(reader, json);
- case 'CastOptions': return tflite.CastOptions.decodeText(reader, json);
- case 'DequantizeOptions': return tflite.DequantizeOptions.decodeText(reader, json);
- case 'MaximumMinimumOptions': return tflite.MaximumMinimumOptions.decodeText(reader, json);
- case 'ArgMaxOptions': return tflite.ArgMaxOptions.decodeText(reader, json);
- case 'LessOptions': return tflite.LessOptions.decodeText(reader, json);
- case 'NegOptions': return tflite.NegOptions.decodeText(reader, json);
- case 'PadV2Options': return tflite.PadV2Options.decodeText(reader, json);
- case 'GreaterOptions': return tflite.GreaterOptions.decodeText(reader, json);
- case 'GreaterEqualOptions': return tflite.GreaterEqualOptions.decodeText(reader, json);
- case 'LessEqualOptions': return tflite.LessEqualOptions.decodeText(reader, json);
- case 'SelectOptions': return tflite.SelectOptions.decodeText(reader, json);
- case 'SliceOptions': return tflite.SliceOptions.decodeText(reader, json);
- case 'TransposeConvOptions': return tflite.TransposeConvOptions.decodeText(reader, json);
- case 'SparseToDenseOptions': return tflite.SparseToDenseOptions.decodeText(reader, json);
- case 'TileOptions': return tflite.TileOptions.decodeText(reader, json);
- case 'ExpandDimsOptions': return tflite.ExpandDimsOptions.decodeText(reader, json);
- case 'EqualOptions': return tflite.EqualOptions.decodeText(reader, json);
- case 'NotEqualOptions': return tflite.NotEqualOptions.decodeText(reader, json);
- case 'ShapeOptions': return tflite.ShapeOptions.decodeText(reader, json);
- case 'PowOptions': return tflite.PowOptions.decodeText(reader, json);
- case 'ArgMinOptions': return tflite.ArgMinOptions.decodeText(reader, json);
- case 'FakeQuantOptions': return tflite.FakeQuantOptions.decodeText(reader, json);
- case 'PackOptions': return tflite.PackOptions.decodeText(reader, json);
- case 'LogicalOrOptions': return tflite.LogicalOrOptions.decodeText(reader, json);
- case 'OneHotOptions': return tflite.OneHotOptions.decodeText(reader, json);
- case 'LogicalAndOptions': return tflite.LogicalAndOptions.decodeText(reader, json);
- case 'LogicalNotOptions': return tflite.LogicalNotOptions.decodeText(reader, json);
- case 'UnpackOptions': return tflite.UnpackOptions.decodeText(reader, json);
- case 'FloorDivOptions': return tflite.FloorDivOptions.decodeText(reader, json);
- case 'SquareOptions': return tflite.SquareOptions.decodeText(reader, json);
- case 'ZerosLikeOptions': return tflite.ZerosLikeOptions.decodeText(reader, json);
- case 'FillOptions': return tflite.FillOptions.decodeText(reader, json);
- case 'BidirectionalSequenceLSTMOptions': return tflite.BidirectionalSequenceLSTMOptions.decodeText(reader, json);
- case 'BidirectionalSequenceRNNOptions': return tflite.BidirectionalSequenceRNNOptions.decodeText(reader, json);
- case 'UnidirectionalSequenceLSTMOptions': return tflite.UnidirectionalSequenceLSTMOptions.decodeText(reader, json);
- case 'FloorModOptions': return tflite.FloorModOptions.decodeText(reader, json);
- case 'RangeOptions': return tflite.RangeOptions.decodeText(reader, json);
- case 'ResizeNearestNeighborOptions': return tflite.ResizeNearestNeighborOptions.decodeText(reader, json);
- case 'LeakyReluOptions': return tflite.LeakyReluOptions.decodeText(reader, json);
- case 'SquaredDifferenceOptions': return tflite.SquaredDifferenceOptions.decodeText(reader, json);
- case 'MirrorPadOptions': return tflite.MirrorPadOptions.decodeText(reader, json);
- case 'AbsOptions': return tflite.AbsOptions.decodeText(reader, json);
- case 'SplitVOptions': return tflite.SplitVOptions.decodeText(reader, json);
- case 'UniqueOptions': return tflite.UniqueOptions.decodeText(reader, json);
- case 'ReverseV2Options': return tflite.ReverseV2Options.decodeText(reader, json);
- case 'AddNOptions': return tflite.AddNOptions.decodeText(reader, json);
- case 'GatherNdOptions': return tflite.GatherNdOptions.decodeText(reader, json);
- case 'CosOptions': return tflite.CosOptions.decodeText(reader, json);
- case 'WhereOptions': return tflite.WhereOptions.decodeText(reader, json);
- case 'RankOptions': return tflite.RankOptions.decodeText(reader, json);
- case 'ReverseSequenceOptions': return tflite.ReverseSequenceOptions.decodeText(reader, json);
- case 'MatrixDiagOptions': return tflite.MatrixDiagOptions.decodeText(reader, json);
- case 'QuantizeOptions': return tflite.QuantizeOptions.decodeText(reader, json);
- case 'MatrixSetDiagOptions': return tflite.MatrixSetDiagOptions.decodeText(reader, json);
- case 'HardSwishOptions': return tflite.HardSwishOptions.decodeText(reader, json);
- case 'IfOptions': return tflite.IfOptions.decodeText(reader, json);
- case 'WhileOptions': return tflite.WhileOptions.decodeText(reader, json);
- case 'DepthToSpaceOptions': return tflite.DepthToSpaceOptions.decodeText(reader, json);
- case 'NonMaxSuppressionV4Options': return tflite.NonMaxSuppressionV4Options.decodeText(reader, json);
- case 'NonMaxSuppressionV5Options': return tflite.NonMaxSuppressionV5Options.decodeText(reader, json);
- case 'ScatterNdOptions': return tflite.ScatterNdOptions.decodeText(reader, json);
- case 'SelectV2Options': return tflite.SelectV2Options.decodeText(reader, json);
- case 'DensifyOptions': return tflite.DensifyOptions.decodeText(reader, json);
- case 'SegmentSumOptions': return tflite.SegmentSumOptions.decodeText(reader, json);
- case 'BatchMatMulOptions': return tflite.BatchMatMulOptions.decodeText(reader, json);
- case 'CumsumOptions': return tflite.CumsumOptions.decodeText(reader, json);
- case 'CallOnceOptions': return tflite.CallOnceOptions.decodeText(reader, json);
- case 'BroadcastToOptions': return tflite.BroadcastToOptions.decodeText(reader, json);
- case 'Rfft2dOptions': return tflite.Rfft2dOptions.decodeText(reader, json);
- case 'Conv3DOptions': return tflite.Conv3DOptions.decodeText(reader, json);
- case 'HashtableOptions': return tflite.HashtableOptions.decodeText(reader, json);
- case 'HashtableFindOptions': return tflite.HashtableFindOptions.decodeText(reader, json);
- case 'HashtableImportOptions': return tflite.HashtableImportOptions.decodeText(reader, json);
- case 'HashtableSizeOptions': return tflite.HashtableSizeOptions.decodeText(reader, json);
- case 'VarHandleOptions': return tflite.VarHandleOptions.decodeText(reader, json);
- case 'ReadVariableOptions': return tflite.ReadVariableOptions.decodeText(reader, json);
- case 'AssignVariableOptions': return tflite.AssignVariableOptions.decodeText(reader, json);
- case 'RandomOptions': return tflite.RandomOptions.decodeText(reader, json);
- case 'BucketizeOptions': return tflite.BucketizeOptions.decodeText(reader, json);
- case 'GeluOptions': return tflite.GeluOptions.decodeText(reader, json);
- case 'DynamicUpdateSliceOptions': return tflite.DynamicUpdateSliceOptions.decodeText(reader, json);
- case 'UnsortedSegmentProdOptions': return tflite.UnsortedSegmentProdOptions.decodeText(reader, json);
- case 'UnsortedSegmentMaxOptions': return tflite.UnsortedSegmentMaxOptions.decodeText(reader, json);
- case 'UnsortedSegmentMinOptions': return tflite.UnsortedSegmentMinOptions.decodeText(reader, json);
- case 'UnsortedSegmentSumOptions': return tflite.UnsortedSegmentSumOptions.decodeText(reader, json);
- case 'ATan2Options': return tflite.ATan2Options.decodeText(reader, json);
- case 'SignOptions': return tflite.SignOptions.decodeText(reader, json);
- case 'BitcastOptions': return tflite.BitcastOptions.decodeText(reader, json);
- case 'BitwiseXorOptions': return tflite.BitwiseXorOptions.decodeText(reader, json);
- case 'RightShiftOptions': return tflite.RightShiftOptions.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.BuiltinOptions2 = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.StablehloConcatenateOptions.decode(reader, position);
- case 2: return tflite.StablehloBroadcastInDimOptions.decode(reader, position);
- case 3: return tflite.StablehloSliceOptions.decode(reader, position);
- case 4: return tflite.StablehloConvolutionOptions.decode(reader, position);
- case 5: return tflite.StablehloCustomCallOptions.decode(reader, position);
- case 6: return tflite.StablehloReduceOptions.decode(reader, position);
- case 7: return tflite.StablehloScatterOptions.decode(reader, position);
- case 8: return tflite.StablehloCompareOptions.decode(reader, position);
- case 9: return tflite.StablehloDynamicSliceOptions.decode(reader, position);
- case 10: return tflite.StablehloPadOptions.decode(reader, position);
- case 11: return tflite.StablehloIotaOptions.decode(reader, position);
- case 12: return tflite.StablehloDotGeneralOptions.decode(reader, position);
- case 13: return tflite.StablehloReduceWindowOptions.decode(reader, position);
- case 14: return tflite.StablehloSortOptions.decode(reader, position);
- case 15: return tflite.StablehloWhileOptions.decode(reader, position);
- case 16: return tflite.StablehloGatherOptions.decode(reader, position);
- case 17: return tflite.StablehloTransposeOptions.decode(reader, position);
- case 18: return tflite.DilateOptions.decode(reader, position);
- case 19: return tflite.StablehloRngBitGeneratorOptions.decode(reader, position);
- case 20: return tflite.ReduceWindowOptions.decode(reader, position);
- case 21: return tflite.StableHLOCompositeOptions.decode(reader, position);
- case 22: return tflite.StablehloShiftLeftOptions.decode(reader, position);
- case 23: return tflite.StablehloCaseOptions.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'StablehloConcatenateOptions': return tflite.StablehloConcatenateOptions.decodeText(reader, json);
- case 'StablehloBroadcastInDimOptions': return tflite.StablehloBroadcastInDimOptions.decodeText(reader, json);
- case 'StablehloSliceOptions': return tflite.StablehloSliceOptions.decodeText(reader, json);
- case 'StablehloConvolutionOptions': return tflite.StablehloConvolutionOptions.decodeText(reader, json);
- case 'StablehloCustomCallOptions': return tflite.StablehloCustomCallOptions.decodeText(reader, json);
- case 'StablehloReduceOptions': return tflite.StablehloReduceOptions.decodeText(reader, json);
- case 'StablehloScatterOptions': return tflite.StablehloScatterOptions.decodeText(reader, json);
- case 'StablehloCompareOptions': return tflite.StablehloCompareOptions.decodeText(reader, json);
- case 'StablehloDynamicSliceOptions': return tflite.StablehloDynamicSliceOptions.decodeText(reader, json);
- case 'StablehloPadOptions': return tflite.StablehloPadOptions.decodeText(reader, json);
- case 'StablehloIotaOptions': return tflite.StablehloIotaOptions.decodeText(reader, json);
- case 'StablehloDotGeneralOptions': return tflite.StablehloDotGeneralOptions.decodeText(reader, json);
- case 'StablehloReduceWindowOptions': return tflite.StablehloReduceWindowOptions.decodeText(reader, json);
- case 'StablehloSortOptions': return tflite.StablehloSortOptions.decodeText(reader, json);
- case 'StablehloWhileOptions': return tflite.StablehloWhileOptions.decodeText(reader, json);
- case 'StablehloGatherOptions': return tflite.StablehloGatherOptions.decodeText(reader, json);
- case 'StablehloTransposeOptions': return tflite.StablehloTransposeOptions.decodeText(reader, json);
- case 'DilateOptions': return tflite.DilateOptions.decodeText(reader, json);
- case 'StablehloRngBitGeneratorOptions': return tflite.StablehloRngBitGeneratorOptions.decodeText(reader, json);
- case 'ReduceWindowOptions': return tflite.ReduceWindowOptions.decodeText(reader, json);
- case 'StableHLOCompositeOptions': return tflite.StableHLOCompositeOptions.decodeText(reader, json);
- case 'StablehloShiftLeftOptions': return tflite.StablehloShiftLeftOptions.decodeText(reader, json);
- case 'StablehloCaseOptions': return tflite.StablehloCaseOptions.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.StablehloGatherOptions = class StablehloGatherOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloGatherOptions();
- $.offset_dims = reader.int64s_(position, 4);
- $.collapsed_slice_dims = reader.int64s_(position, 6);
- $.start_index_map = reader.int64s_(position, 8);
- $.index_vector_dim = reader.int64_(position, 10, 0n);
- $.slice_sizes = reader.int64s_(position, 12);
- $.indices_are_sorted = reader.bool_(position, 14, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloGatherOptions();
- $.offset_dims = reader.array(json.offset_dims);
- $.collapsed_slice_dims = reader.array(json.collapsed_slice_dims);
- $.start_index_map = reader.array(json.start_index_map);
- $.index_vector_dim = reader.int64(json.index_vector_dim, 0n);
- $.slice_sizes = reader.array(json.slice_sizes);
- $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
- return $;
- }
- };
- tflite.StablehloTransposeOptions = class StablehloTransposeOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloTransposeOptions();
- $.permutation = reader.int64s_(position, 4);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloTransposeOptions();
- $.permutation = reader.array(json.permutation);
- return $;
- }
- };
- tflite.StablehloPrecisionConfig = {
- DEFAULT: 0, '0': 'DEFAULT',
- HIGH: 1, '1': 'HIGH',
- HIGHEST: 2, '2': 'HIGHEST'
- };
- tflite.StablehloDotGeneralOptions = class StablehloDotGeneralOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloDotGeneralOptions();
- $.lhs_batching_dimensions = reader.int64s_(position, 4);
- $.rhs_batching_dimensions = reader.int64s_(position, 6);
- $.lhs_contracting_dimensions = reader.int64s_(position, 8);
- $.rhs_contracting_dimensions = reader.int64s_(position, 10);
- $.precision_config = reader.array(position, 12, Uint32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloDotGeneralOptions();
- $.lhs_batching_dimensions = reader.array(json.lhs_batching_dimensions);
- $.rhs_batching_dimensions = reader.array(json.rhs_batching_dimensions);
- $.lhs_contracting_dimensions = reader.array(json.lhs_contracting_dimensions);
- $.rhs_contracting_dimensions = reader.array(json.rhs_contracting_dimensions);
- $.precision_config = reader.objects(json.precision_config, tflite.StablehloPrecisionConfig);
- return $;
- }
- };
- tflite.StablehloReduceWindowOptions = class StablehloReduceWindowOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloReduceWindowOptions();
- $.window_dimensions = reader.int64s_(position, 4);
- $.window_strides = reader.int64s_(position, 6);
- $.base_dilations = reader.int64s_(position, 8);
- $.window_dilations = reader.int64s_(position, 10);
- $.padding = reader.int64s_(position, 12);
- $.body_subgraph_index = reader.int32_(position, 14, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloReduceWindowOptions();
- $.window_dimensions = reader.array(json.window_dimensions);
- $.window_strides = reader.array(json.window_strides);
- $.base_dilations = reader.array(json.base_dilations);
- $.window_dilations = reader.array(json.window_dilations);
- $.padding = reader.array(json.padding);
- $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
- return $;
- }
- };
- tflite.StablehloWhileOptions = class StablehloWhileOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloWhileOptions();
- $.cond_subgraph_index = reader.int32_(position, 4, 0);
- $.body_subgraph_index = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloWhileOptions();
- $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
- $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
- return $;
- }
- };
- tflite.StablehloSortOptions = class StablehloSortOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloSortOptions();
- $.dimension = reader.int64_(position, 4, 0n);
- $.is_stable = reader.bool_(position, 6, false);
- $.comparator_subgraph_index = reader.int32_(position, 8, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloSortOptions();
- $.dimension = reader.int64(json.dimension, 0n);
- $.is_stable = reader.value(json.is_stable, false);
- $.comparator_subgraph_index = reader.value(json.comparator_subgraph_index, 0);
- return $;
- }
- };
- tflite.StablehloConcatenateOptions = class StablehloConcatenateOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloConcatenateOptions();
- $.dimension = reader.int64_(position, 4, 0n);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloConcatenateOptions();
- $.dimension = reader.int64(json.dimension, 0n);
- return $;
- }
- };
- tflite.StablehloBroadcastInDimOptions = class StablehloBroadcastInDimOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloBroadcastInDimOptions();
- $.broadcast_dimensions = reader.int64s_(position, 4);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloBroadcastInDimOptions();
- $.broadcast_dimensions = reader.array(json.broadcast_dimensions);
- return $;
- }
- };
- tflite.StablehloComparisonDirection = {
- STABLEHLO_COMPARISON_DIRECTION_EQ: 0, '0': 'STABLEHLO_COMPARISON_DIRECTION_EQ',
- STABLEHLO_COMPARISON_DIRECTION_NE: 1, '1': 'STABLEHLO_COMPARISON_DIRECTION_NE',
- STABLEHLO_COMPARISON_DIRECTION_GE: 2, '2': 'STABLEHLO_COMPARISON_DIRECTION_GE',
- STABLEHLO_COMPARISON_DIRECTION_GT: 3, '3': 'STABLEHLO_COMPARISON_DIRECTION_GT',
- STABLEHLO_COMPARISON_DIRECTION_LE: 4, '4': 'STABLEHLO_COMPARISON_DIRECTION_LE',
- STABLEHLO_COMPARISON_DIRECTION_LT: 5, '5': 'STABLEHLO_COMPARISON_DIRECTION_LT'
- };
- tflite.StablehloComparisonType = {
- STABLEHLO_COMPARISON_TYPE_NOTYPE: 0, '0': 'STABLEHLO_COMPARISON_TYPE_NOTYPE',
- STABLEHLO_COMPARISON_TYPE_FLOAT: 1, '1': 'STABLEHLO_COMPARISON_TYPE_FLOAT',
- STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER: 2, '2': 'STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER',
- STABLEHLO_COMPARISON_TYPE_SIGNED: 3, '3': 'STABLEHLO_COMPARISON_TYPE_SIGNED',
- STABLEHLO_COMPARISON_TYPE_UNSIGNED: 4, '4': 'STABLEHLO_COMPARISON_TYPE_UNSIGNED'
- };
- tflite.StablehloCompareOptions = class StablehloCompareOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloCompareOptions();
- $.comparison_direction = reader.uint32_(position, 4, 0);
- $.compare_type = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloCompareOptions();
- $.comparison_direction = tflite.StablehloComparisonDirection[json.comparison_direction];
- $.compare_type = tflite.StablehloComparisonType[json.compare_type];
- return $;
- }
- };
- tflite.StablehloDynamicSliceOptions = class StablehloDynamicSliceOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloDynamicSliceOptions();
- $.slice_sizes = reader.int64s_(position, 4);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloDynamicSliceOptions();
- $.slice_sizes = reader.array(json.slice_sizes);
- return $;
- }
- };
- tflite.StablehloPadOptions = class StablehloPadOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloPadOptions();
- $.edge_padding_low = reader.int64s_(position, 4);
- $.edge_padding_high = reader.int64s_(position, 6);
- $.interior_padding = reader.int64s_(position, 8);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloPadOptions();
- $.edge_padding_low = reader.array(json.edge_padding_low);
- $.edge_padding_high = reader.array(json.edge_padding_high);
- $.interior_padding = reader.array(json.interior_padding);
- return $;
- }
- };
- tflite.StablehloIotaOptions = class StablehloIotaOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloIotaOptions();
- $.iota_dimension = reader.int64_(position, 4, 0n);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloIotaOptions();
- $.iota_dimension = reader.int64(json.iota_dimension, 0n);
- return $;
- }
- };
- tflite.StablehloCustomCallOptions = class StablehloCustomCallOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloCustomCallOptions();
- $.call_target_name = reader.string_(position, 4, null);
- $.has_side_effect = reader.bool_(position, 6, false);
- $.backend_config = reader.string_(position, 8, null);
- $.api_version = reader.int32_(position, 10, 0);
- $.called_computations = reader.array(position, 12, Int32Array);
- $.custom_attributes = reader.array(position, 14, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloCustomCallOptions();
- $.call_target_name = reader.value(json.call_target_name, null);
- $.has_side_effect = reader.value(json.has_side_effect, false);
- $.backend_config = reader.value(json.backend_config, null);
- $.api_version = reader.value(json.api_version, 0);
- $.called_computations = reader.array(json.called_computations, Int32Array);
- $.custom_attributes = reader.array(json.custom_attributes, Uint8Array);
- return $;
- }
- };
- tflite.StablehloReduceOptions = class StablehloReduceOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloReduceOptions();
- $.dimensions = reader.int64s_(position, 4);
- $.body_subgraph_index = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloReduceOptions();
- $.dimensions = reader.array(json.dimensions);
- $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
- return $;
- }
- };
- tflite.StablehloSliceOptions = class StablehloSliceOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloSliceOptions();
- $.start_indices = reader.int64s_(position, 4);
- $.limit_indices = reader.int64s_(position, 6);
- $.strides = reader.int64s_(position, 8);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloSliceOptions();
- $.start_indices = reader.array(json.start_indices);
- $.limit_indices = reader.array(json.limit_indices);
- $.strides = reader.array(json.strides);
- return $;
- }
- };
- tflite.StablehloConvolutionOptions = class StablehloConvolutionOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloConvolutionOptions();
- $.window_strides = reader.int64s_(position, 4);
- $.padding = reader.int64s_(position, 6);
- $.lhs_dilation = reader.int64s_(position, 8);
- $.rhs_dilation = reader.int64s_(position, 10);
- $.window_reversal = reader.bools_(position, 12);
- $.input_batch_dimension = reader.int64_(position, 14, 0n);
- $.input_feature_dimension = reader.int64_(position, 16, 0n);
- $.input_spatial_dimensions = reader.int64s_(position, 18);
- $.kernel_input_feature_dimension = reader.int64_(position, 20, 0n);
- $.kernel_output_feature_dimension = reader.int64_(position, 22, 0n);
- $.kernel_spatial_dimensions = reader.int64s_(position, 24);
- $.output_batch_dimension = reader.int64_(position, 26, 0n);
- $.output_feature_dimension = reader.int64_(position, 28, 0n);
- $.output_spatial_dimensions = reader.int64s_(position, 30);
- $.feature_group_count = reader.int64_(position, 32, 0n);
- $.batch_group_count = reader.int64_(position, 34, 0n);
- $.precision_config = reader.array(position, 36, Uint32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloConvolutionOptions();
- $.window_strides = reader.array(json.window_strides);
- $.padding = reader.array(json.padding);
- $.lhs_dilation = reader.array(json.lhs_dilation);
- $.rhs_dilation = reader.array(json.rhs_dilation);
- $.window_reversal = reader.array(json.window_reversal);
- $.input_batch_dimension = reader.int64(json.input_batch_dimension, 0n);
- $.input_feature_dimension = reader.int64(json.input_feature_dimension, 0n);
- $.input_spatial_dimensions = reader.array(json.input_spatial_dimensions);
- $.kernel_input_feature_dimension = reader.int64(json.kernel_input_feature_dimension, 0n);
- $.kernel_output_feature_dimension = reader.int64(json.kernel_output_feature_dimension, 0n);
- $.kernel_spatial_dimensions = reader.array(json.kernel_spatial_dimensions);
- $.output_batch_dimension = reader.int64(json.output_batch_dimension, 0n);
- $.output_feature_dimension = reader.int64(json.output_feature_dimension, 0n);
- $.output_spatial_dimensions = reader.array(json.output_spatial_dimensions);
- $.feature_group_count = reader.int64(json.feature_group_count, 0n);
- $.batch_group_count = reader.int64(json.batch_group_count, 0n);
- $.precision_config = reader.objects(json.precision_config, tflite.StablehloPrecisionConfig);
- return $;
- }
- };
- tflite.StablehloScatterOptions = class StablehloScatterOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloScatterOptions();
- $.indices_are_sorted = reader.bool_(position, 4, false);
- $.update_window_dims = reader.int64s_(position, 6);
- $.inserted_window_dims = reader.int64s_(position, 8);
- $.scatter_dims_to_operand_dims = reader.int64s_(position, 10);
- $.index_vector_dim = reader.int64_(position, 12, 0n);
- $.unique_indices = reader.bool_(position, 14, false);
- $.update_computation_subgraph_index = reader.int32_(position, 16, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloScatterOptions();
- $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
- $.update_window_dims = reader.array(json.update_window_dims);
- $.inserted_window_dims = reader.array(json.inserted_window_dims);
- $.scatter_dims_to_operand_dims = reader.array(json.scatter_dims_to_operand_dims);
- $.index_vector_dim = reader.int64(json.index_vector_dim, 0n);
- $.unique_indices = reader.value(json.unique_indices, false);
- $.update_computation_subgraph_index = reader.value(json.update_computation_subgraph_index, 0);
- return $;
- }
- };
- tflite.StablehloCaseOptions = class StablehloCaseOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloCaseOptions();
- $.branch_subgraph_indices = reader.array(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloCaseOptions();
- $.branch_subgraph_indices = reader.array(json.branch_subgraph_indices, Int32Array);
- return $;
- }
- };
- tflite.RngAlgorithm = {
- DEFAULT: 0, '0': 'DEFAULT',
- PHILOX: 1, '1': 'PHILOX',
- THREEFRY: 2, '2': 'THREEFRY'
- };
- tflite.StablehloRngBitGeneratorOptions = class StablehloRngBitGeneratorOptions {
- static decode(reader, position) {
- const $ = new tflite.StablehloRngBitGeneratorOptions();
- $.algorithm = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StablehloRngBitGeneratorOptions();
- $.algorithm = tflite.RngAlgorithm[json.algorithm];
- return $;
- }
- };
- tflite.Padding = {
- SAME: 0, '0': 'SAME',
- VALID: 1, '1': 'VALID'
- };
- tflite.ActivationFunctionType = {
- NONE: 0, '0': 'NONE',
- RELU: 1, '1': 'RELU',
- RELU_N1_TO_1: 2, '2': 'RELU_N1_TO_1',
- RELU6: 3, '3': 'RELU6',
- TANH: 4, '4': 'TANH',
- SIGN_BIT: 5, '5': 'SIGN_BIT'
- };
- tflite.Conv2DOptions = class Conv2DOptions {
- static decode(reader, position) {
- const $ = new tflite.Conv2DOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_w = reader.int32_(position, 6, 0);
- $.stride_h = reader.int32_(position, 8, 0);
- $.fused_activation_function = reader.int8_(position, 10, 0);
- $.dilation_w_factor = reader.int32_(position, 12, 1);
- $.dilation_h_factor = reader.int32_(position, 14, 1);
- $.quantized_bias_type = reader.int8_(position, 16, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Conv2DOptions();
- $.padding = tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
- $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
- $.quantized_bias_type = tflite.TensorType[json.quantized_bias_type];
- return $;
- }
- };
- tflite.Conv3DOptions = class Conv3DOptions {
- static decode(reader, position) {
- const $ = new tflite.Conv3DOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_d = reader.int32_(position, 6, 0);
- $.stride_w = reader.int32_(position, 8, 0);
- $.stride_h = reader.int32_(position, 10, 0);
- $.fused_activation_function = reader.int8_(position, 12, 0);
- $.dilation_d_factor = reader.int32_(position, 14, 1);
- $.dilation_w_factor = reader.int32_(position, 16, 1);
- $.dilation_h_factor = reader.int32_(position, 18, 1);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Conv3DOptions();
- $.padding = tflite.Padding[json.padding];
- $.stride_d = reader.value(json.stride_d, 0);
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.dilation_d_factor = reader.value(json.dilation_d_factor, 1);
- $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
- $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
- return $;
- }
- };
- tflite.Pool2DOptions = class Pool2DOptions {
- static decode(reader, position) {
- const $ = new tflite.Pool2DOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_w = reader.int32_(position, 6, 0);
- $.stride_h = reader.int32_(position, 8, 0);
- $.filter_width = reader.int32_(position, 10, 0);
- $.filter_height = reader.int32_(position, 12, 0);
- $.fused_activation_function = reader.int8_(position, 14, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Pool2DOptions();
- $.padding = tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.filter_width = reader.value(json.filter_width, 0);
- $.filter_height = reader.value(json.filter_height, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- tflite.DepthwiseConv2DOptions = class DepthwiseConv2DOptions {
- static decode(reader, position) {
- const $ = new tflite.DepthwiseConv2DOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_w = reader.int32_(position, 6, 0);
- $.stride_h = reader.int32_(position, 8, 0);
- $.depth_multiplier = reader.int32_(position, 10, 0);
- $.fused_activation_function = reader.int8_(position, 12, 0);
- $.dilation_w_factor = reader.int32_(position, 14, 1);
- $.dilation_h_factor = reader.int32_(position, 16, 1);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.DepthwiseConv2DOptions();
- $.padding = tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.depth_multiplier = reader.value(json.depth_multiplier, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
- $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
- return $;
- }
- };
- tflite.ConcatEmbeddingsOptions = class ConcatEmbeddingsOptions {
- static decode(reader, position) {
- const $ = new tflite.ConcatEmbeddingsOptions();
- $.num_channels = reader.int32_(position, 4, 0);
- $.num_columns_per_channel = reader.array(position, 6, Int32Array);
- $.embedding_dim_per_channel = reader.array(position, 8, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ConcatEmbeddingsOptions();
- $.num_channels = reader.value(json.num_channels, 0);
- $.num_columns_per_channel = reader.array(json.num_columns_per_channel, Int32Array);
- $.embedding_dim_per_channel = reader.array(json.embedding_dim_per_channel, Int32Array);
- return $;
- }
- };
- tflite.LSHProjectionType = {
- UNKNOWN: 0, '0': 'UNKNOWN',
- SPARSE: 1, '1': 'SPARSE',
- DENSE: 2, '2': 'DENSE'
- };
- tflite.LSHProjectionOptions = class LSHProjectionOptions {
- static decode(reader, position) {
- const $ = new tflite.LSHProjectionOptions();
- $.type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.LSHProjectionOptions();
- $.type = tflite.LSHProjectionType[json.type];
- return $;
- }
- };
- tflite.SVDFOptions = class SVDFOptions {
- static decode(reader, position) {
- const $ = new tflite.SVDFOptions();
- $.rank = reader.int32_(position, 4, 0);
- $.fused_activation_function = reader.int8_(position, 6, 0);
- $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SVDFOptions();
- $.rank = reader.value(json.rank, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.RNNOptions = class RNNOptions {
- static decode(reader, position) {
- const $ = new tflite.RNNOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.asymmetric_quantize_inputs = reader.bool_(position, 6, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.RNNOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.SequenceRNNOptions = class SequenceRNNOptions {
- static decode(reader, position) {
- const $ = new tflite.SequenceRNNOptions();
- $.time_major = reader.bool_(position, 4, false);
- $.fused_activation_function = reader.int8_(position, 6, 0);
- $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SequenceRNNOptions();
- $.time_major = reader.value(json.time_major, false);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.BidirectionalSequenceRNNOptions = class BidirectionalSequenceRNNOptions {
- static decode(reader, position) {
- const $ = new tflite.BidirectionalSequenceRNNOptions();
- $.time_major = reader.bool_(position, 4, false);
- $.fused_activation_function = reader.int8_(position, 6, 0);
- $.merge_outputs = reader.bool_(position, 8, false);
- $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BidirectionalSequenceRNNOptions();
- $.time_major = reader.value(json.time_major, false);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.merge_outputs = reader.value(json.merge_outputs, false);
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.FullyConnectedOptionsWeightsFormat = {
- DEFAULT: 0, '0': 'DEFAULT',
- SHUFFLED4x16INT8: 1, '1': 'SHUFFLED4x16INT8'
- };
- tflite.FullyConnectedOptions = class FullyConnectedOptions {
- static decode(reader, position) {
- const $ = new tflite.FullyConnectedOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.weights_format = reader.int8_(position, 6, 0);
- $.keep_num_dims = reader.bool_(position, 8, false);
- $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
- $.quantized_bias_type = reader.int8_(position, 12, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.FullyConnectedOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.weights_format = tflite.FullyConnectedOptionsWeightsFormat[json.weights_format];
- $.keep_num_dims = reader.value(json.keep_num_dims, false);
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- $.quantized_bias_type = tflite.TensorType[json.quantized_bias_type];
- return $;
- }
- };
- tflite.SoftmaxOptions = class SoftmaxOptions {
- static decode(reader, position) {
- const $ = new tflite.SoftmaxOptions();
- $.beta = reader.float32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SoftmaxOptions();
- $.beta = reader.value(json.beta, 0);
- return $;
- }
- };
- tflite.ConcatenationOptions = class ConcatenationOptions {
- static decode(reader, position) {
- const $ = new tflite.ConcatenationOptions();
- $.axis = reader.int32_(position, 4, 0);
- $.fused_activation_function = reader.int8_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ConcatenationOptions();
- $.axis = reader.value(json.axis, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- tflite.AddOptions = class AddOptions {
- static decode(reader, position) {
- const $ = new tflite.AddOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.pot_scale_int16 = reader.bool_(position, 6, true);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.AddOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
- return $;
- }
- };
- tflite.MulOptions = class MulOptions {
- static decode(reader, position) {
- const $ = new tflite.MulOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.MulOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- tflite.L2NormOptions = class L2NormOptions {
- static decode(reader, position) {
- const $ = new tflite.L2NormOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.L2NormOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- tflite.LocalResponseNormalizationOptions = class LocalResponseNormalizationOptions {
- static decode(reader, position) {
- const $ = new tflite.LocalResponseNormalizationOptions();
- $.radius = reader.int32_(position, 4, 0);
- $.bias = reader.float32_(position, 6, 0);
- $.alpha = reader.float32_(position, 8, 0);
- $.beta = reader.float32_(position, 10, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.LocalResponseNormalizationOptions();
- $.radius = reader.value(json.radius, 0);
- $.bias = reader.value(json.bias, 0);
- $.alpha = reader.value(json.alpha, 0);
- $.beta = reader.value(json.beta, 0);
- return $;
- }
- };
- tflite.LSTMKernelType = {
- FULL: 0, '0': 'FULL',
- BASIC: 1, '1': 'BASIC'
- };
- tflite.LSTMOptions = class LSTMOptions {
- static decode(reader, position) {
- const $ = new tflite.LSTMOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.cell_clip = reader.float32_(position, 6, 0);
- $.proj_clip = reader.float32_(position, 8, 0);
- $.kernel_type = reader.int8_(position, 10, 0);
- $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.LSTMOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.cell_clip = reader.value(json.cell_clip, 0);
- $.proj_clip = reader.value(json.proj_clip, 0);
- $.kernel_type = tflite.LSTMKernelType[json.kernel_type];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.UnidirectionalSequenceLSTMOptions = class UnidirectionalSequenceLSTMOptions {
- static decode(reader, position) {
- const $ = new tflite.UnidirectionalSequenceLSTMOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.cell_clip = reader.float32_(position, 6, 0);
- $.proj_clip = reader.float32_(position, 8, 0);
- $.time_major = reader.bool_(position, 10, false);
- $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
- $.diagonal_recurrent_tensors = reader.bool_(position, 14, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.UnidirectionalSequenceLSTMOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.cell_clip = reader.value(json.cell_clip, 0);
- $.proj_clip = reader.value(json.proj_clip, 0);
- $.time_major = reader.value(json.time_major, false);
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- $.diagonal_recurrent_tensors = reader.value(json.diagonal_recurrent_tensors, false);
- return $;
- }
- };
- tflite.BidirectionalSequenceLSTMOptions = class BidirectionalSequenceLSTMOptions {
- static decode(reader, position) {
- const $ = new tflite.BidirectionalSequenceLSTMOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.cell_clip = reader.float32_(position, 6, 0);
- $.proj_clip = reader.float32_(position, 8, 0);
- $.merge_outputs = reader.bool_(position, 10, false);
- $.time_major = reader.bool_(position, 12, true);
- $.asymmetric_quantize_inputs = reader.bool_(position, 14, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BidirectionalSequenceLSTMOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.cell_clip = reader.value(json.cell_clip, 0);
- $.proj_clip = reader.value(json.proj_clip, 0);
- $.merge_outputs = reader.value(json.merge_outputs, false);
- $.time_major = reader.value(json.time_major, true);
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.ResizeBilinearOptions = class ResizeBilinearOptions {
- static decode(reader, position) {
- const $ = new tflite.ResizeBilinearOptions();
- $.new_height = reader.int32_(position, 4, 0);
- $.new_width = reader.int32_(position, 6, 0);
- $.align_corners = reader.bool_(position, 8, false);
- $.half_pixel_centers = reader.bool_(position, 10, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ResizeBilinearOptions();
- $.new_height = reader.value(json.new_height, 0);
- $.new_width = reader.value(json.new_width, 0);
- $.align_corners = reader.value(json.align_corners, false);
- $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
- return $;
- }
- };
- tflite.ResizeNearestNeighborOptions = class ResizeNearestNeighborOptions {
- static decode(reader, position) {
- const $ = new tflite.ResizeNearestNeighborOptions();
- $.align_corners = reader.bool_(position, 4, false);
- $.half_pixel_centers = reader.bool_(position, 6, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ResizeNearestNeighborOptions();
- $.align_corners = reader.value(json.align_corners, false);
- $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
- return $;
- }
- };
- tflite.CallOptions = class CallOptions {
- static decode(reader, position) {
- const $ = new tflite.CallOptions();
- $.subgraph = reader.uint32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CallOptions();
- $.subgraph = reader.value(json.subgraph, 0);
- return $;
- }
- };
- tflite.PadOptions = class PadOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.PadOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.PadOptions();
- return $;
- }
- };
- tflite.PadV2Options = class PadV2Options {
- static decode(/* reader, position */) {
- const $ = new tflite.PadV2Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.PadV2Options();
- return $;
- }
- };
- tflite.ReshapeOptions = class ReshapeOptions {
- static decode(reader, position) {
- const $ = new tflite.ReshapeOptions();
- $.new_shape = reader.array(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ReshapeOptions();
- $.new_shape = reader.array(json.new_shape, Int32Array);
- return $;
- }
- };
- tflite.SpaceToBatchNDOptions = class SpaceToBatchNDOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SpaceToBatchNDOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SpaceToBatchNDOptions();
- return $;
- }
- };
- tflite.BatchToSpaceNDOptions = class BatchToSpaceNDOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.BatchToSpaceNDOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.BatchToSpaceNDOptions();
- return $;
- }
- };
- tflite.SkipGramOptions = class SkipGramOptions {
- static decode(reader, position) {
- const $ = new tflite.SkipGramOptions();
- $.ngram_size = reader.int32_(position, 4, 0);
- $.max_skip_size = reader.int32_(position, 6, 0);
- $.include_all_ngrams = reader.bool_(position, 8, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SkipGramOptions();
- $.ngram_size = reader.value(json.ngram_size, 0);
- $.max_skip_size = reader.value(json.max_skip_size, 0);
- $.include_all_ngrams = reader.value(json.include_all_ngrams, false);
- return $;
- }
- };
- tflite.SpaceToDepthOptions = class SpaceToDepthOptions {
- static decode(reader, position) {
- const $ = new tflite.SpaceToDepthOptions();
- $.block_size = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SpaceToDepthOptions();
- $.block_size = reader.value(json.block_size, 0);
- return $;
- }
- };
- tflite.DepthToSpaceOptions = class DepthToSpaceOptions {
- static decode(reader, position) {
- const $ = new tflite.DepthToSpaceOptions();
- $.block_size = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.DepthToSpaceOptions();
- $.block_size = reader.value(json.block_size, 0);
- return $;
- }
- };
- tflite.SubOptions = class SubOptions {
- static decode(reader, position) {
- const $ = new tflite.SubOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- $.pot_scale_int16 = reader.bool_(position, 6, true);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SubOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
- return $;
- }
- };
- tflite.DivOptions = class DivOptions {
- static decode(reader, position) {
- const $ = new tflite.DivOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.DivOptions();
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- tflite.TopKV2Options = class TopKV2Options {
- static decode(/* reader, position */) {
- const $ = new tflite.TopKV2Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.TopKV2Options();
- return $;
- }
- };
- tflite.CombinerType = {
- SUM: 0, '0': 'SUM',
- MEAN: 1, '1': 'MEAN',
- SQRTN: 2, '2': 'SQRTN'
- };
- tflite.EmbeddingLookupSparseOptions = class EmbeddingLookupSparseOptions {
- static decode(reader, position) {
- const $ = new tflite.EmbeddingLookupSparseOptions();
- $.combiner = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.EmbeddingLookupSparseOptions();
- $.combiner = tflite.CombinerType[json.combiner];
- return $;
- }
- };
- tflite.GatherOptions = class GatherOptions {
- static decode(reader, position) {
- const $ = new tflite.GatherOptions();
- $.axis = reader.int32_(position, 4, 0);
- $.batch_dims = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.GatherOptions();
- $.axis = reader.value(json.axis, 0);
- $.batch_dims = reader.value(json.batch_dims, 0);
- return $;
- }
- };
- tflite.TransposeOptions = class TransposeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.TransposeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.TransposeOptions();
- return $;
- }
- };
- tflite.ExpOptions = class ExpOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.ExpOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ExpOptions();
- return $;
- }
- };
- tflite.CosOptions = class CosOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.CosOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.CosOptions();
- return $;
- }
- };
- tflite.ReducerOptions = class ReducerOptions {
- static decode(reader, position) {
- const $ = new tflite.ReducerOptions();
- $.keep_dims = reader.bool_(position, 4, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ReducerOptions();
- $.keep_dims = reader.value(json.keep_dims, false);
- return $;
- }
- };
- tflite.SqueezeOptions = class SqueezeOptions {
- static decode(reader, position) {
- const $ = new tflite.SqueezeOptions();
- $.squeeze_dims = reader.array(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SqueezeOptions();
- $.squeeze_dims = reader.array(json.squeeze_dims, Int32Array);
- return $;
- }
- };
- tflite.SplitOptions = class SplitOptions {
- static decode(reader, position) {
- const $ = new tflite.SplitOptions();
- $.num_splits = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SplitOptions();
- $.num_splits = reader.value(json.num_splits, 0);
- return $;
- }
- };
- tflite.SplitVOptions = class SplitVOptions {
- static decode(reader, position) {
- const $ = new tflite.SplitVOptions();
- $.num_splits = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SplitVOptions();
- $.num_splits = reader.value(json.num_splits, 0);
- return $;
- }
- };
- tflite.StridedSliceOptions = class StridedSliceOptions {
- static decode(reader, position) {
- const $ = new tflite.StridedSliceOptions();
- $.begin_mask = reader.int32_(position, 4, 0);
- $.end_mask = reader.int32_(position, 6, 0);
- $.ellipsis_mask = reader.int32_(position, 8, 0);
- $.new_axis_mask = reader.int32_(position, 10, 0);
- $.shrink_axis_mask = reader.int32_(position, 12, 0);
- $.offset = reader.bool_(position, 14, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StridedSliceOptions();
- $.begin_mask = reader.value(json.begin_mask, 0);
- $.end_mask = reader.value(json.end_mask, 0);
- $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
- $.new_axis_mask = reader.value(json.new_axis_mask, 0);
- $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
- $.offset = reader.value(json.offset, false);
- return $;
- }
- };
- tflite.LogSoftmaxOptions = class LogSoftmaxOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LogSoftmaxOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LogSoftmaxOptions();
- return $;
- }
- };
- tflite.CastOptions = class CastOptions {
- static decode(reader, position) {
- const $ = new tflite.CastOptions();
- $.in_data_type = reader.int8_(position, 4, 0);
- $.out_data_type = reader.int8_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CastOptions();
- $.in_data_type = tflite.TensorType[json.in_data_type];
- $.out_data_type = tflite.TensorType[json.out_data_type];
- return $;
- }
- };
- tflite.DequantizeOptions = class DequantizeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.DequantizeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.DequantizeOptions();
- return $;
- }
- };
- tflite.MaximumMinimumOptions = class MaximumMinimumOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.MaximumMinimumOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.MaximumMinimumOptions();
- return $;
- }
- };
- tflite.TileOptions = class TileOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.TileOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.TileOptions();
- return $;
- }
- };
- tflite.ArgMaxOptions = class ArgMaxOptions {
- static decode(reader, position) {
- const $ = new tflite.ArgMaxOptions();
- $.output_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ArgMaxOptions();
- $.output_type = tflite.TensorType[json.output_type];
- return $;
- }
- };
- tflite.ArgMinOptions = class ArgMinOptions {
- static decode(reader, position) {
- const $ = new tflite.ArgMinOptions();
- $.output_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ArgMinOptions();
- $.output_type = tflite.TensorType[json.output_type];
- return $;
- }
- };
- tflite.GreaterOptions = class GreaterOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.GreaterOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.GreaterOptions();
- return $;
- }
- };
- tflite.GreaterEqualOptions = class GreaterEqualOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.GreaterEqualOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.GreaterEqualOptions();
- return $;
- }
- };
- tflite.LessOptions = class LessOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LessOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LessOptions();
- return $;
- }
- };
- tflite.LessEqualOptions = class LessEqualOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LessEqualOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LessEqualOptions();
- return $;
- }
- };
- tflite.NegOptions = class NegOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.NegOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.NegOptions();
- return $;
- }
- };
- tflite.SelectOptions = class SelectOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SelectOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SelectOptions();
- return $;
- }
- };
- tflite.SliceOptions = class SliceOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SliceOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SliceOptions();
- return $;
- }
- };
- tflite.TransposeConvOptions = class TransposeConvOptions {
- static decode(reader, position) {
- const $ = new tflite.TransposeConvOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_w = reader.int32_(position, 6, 0);
- $.stride_h = reader.int32_(position, 8, 0);
- $.fused_activation_function = reader.int8_(position, 10, 0);
- $.quantized_bias_type = reader.int8_(position, 12, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.TransposeConvOptions();
- $.padding = tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.fused_activation_function = tflite.ActivationFunctionType[json.fused_activation_function];
- $.quantized_bias_type = tflite.TensorType[json.quantized_bias_type];
- return $;
- }
- };
- tflite.ExpandDimsOptions = class ExpandDimsOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.ExpandDimsOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ExpandDimsOptions();
- return $;
- }
- };
- tflite.SparseToDenseOptions = class SparseToDenseOptions {
- static decode(reader, position) {
- const $ = new tflite.SparseToDenseOptions();
- $.validate_indices = reader.bool_(position, 4, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SparseToDenseOptions();
- $.validate_indices = reader.value(json.validate_indices, false);
- return $;
- }
- };
- tflite.EqualOptions = class EqualOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.EqualOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.EqualOptions();
- return $;
- }
- };
- tflite.NotEqualOptions = class NotEqualOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.NotEqualOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.NotEqualOptions();
- return $;
- }
- };
- tflite.ShapeOptions = class ShapeOptions {
- static decode(reader, position) {
- const $ = new tflite.ShapeOptions();
- $.out_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ShapeOptions();
- $.out_type = tflite.TensorType[json.out_type];
- return $;
- }
- };
- tflite.RankOptions = class RankOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.RankOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.RankOptions();
- return $;
- }
- };
- tflite.PowOptions = class PowOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.PowOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.PowOptions();
- return $;
- }
- };
- tflite.FakeQuantOptions = class FakeQuantOptions {
- static decode(reader, position) {
- const $ = new tflite.FakeQuantOptions();
- $.min = reader.float32_(position, 4, 0);
- $.max = reader.float32_(position, 6, 0);
- $.num_bits = reader.int32_(position, 8, 0);
- $.narrow_range = reader.bool_(position, 10, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.FakeQuantOptions();
- $.min = reader.value(json.min, 0);
- $.max = reader.value(json.max, 0);
- $.num_bits = reader.value(json.num_bits, 0);
- $.narrow_range = reader.value(json.narrow_range, false);
- return $;
- }
- };
- tflite.PackOptions = class PackOptions {
- static decode(reader, position) {
- const $ = new tflite.PackOptions();
- $.values_count = reader.int32_(position, 4, 0);
- $.axis = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.PackOptions();
- $.values_count = reader.value(json.values_count, 0);
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- tflite.LogicalOrOptions = class LogicalOrOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LogicalOrOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LogicalOrOptions();
- return $;
- }
- };
- tflite.OneHotOptions = class OneHotOptions {
- static decode(reader, position) {
- const $ = new tflite.OneHotOptions();
- $.axis = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.OneHotOptions();
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- tflite.AbsOptions = class AbsOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.AbsOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.AbsOptions();
- return $;
- }
- };
- tflite.HardSwishOptions = class HardSwishOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.HardSwishOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.HardSwishOptions();
- return $;
- }
- };
- tflite.LogicalAndOptions = class LogicalAndOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LogicalAndOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LogicalAndOptions();
- return $;
- }
- };
- tflite.LogicalNotOptions = class LogicalNotOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.LogicalNotOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.LogicalNotOptions();
- return $;
- }
- };
- tflite.UnpackOptions = class UnpackOptions {
- static decode(reader, position) {
- const $ = new tflite.UnpackOptions();
- $.num = reader.int32_(position, 4, 0);
- $.axis = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.UnpackOptions();
- $.num = reader.value(json.num, 0);
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- tflite.FloorDivOptions = class FloorDivOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.FloorDivOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.FloorDivOptions();
- return $;
- }
- };
- tflite.SquareOptions = class SquareOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SquareOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SquareOptions();
- return $;
- }
- };
- tflite.ZerosLikeOptions = class ZerosLikeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.ZerosLikeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ZerosLikeOptions();
- return $;
- }
- };
- tflite.FillOptions = class FillOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.FillOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.FillOptions();
- return $;
- }
- };
- tflite.FloorModOptions = class FloorModOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.FloorModOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.FloorModOptions();
- return $;
- }
- };
- tflite.RangeOptions = class RangeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.RangeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.RangeOptions();
- return $;
- }
- };
- tflite.LeakyReluOptions = class LeakyReluOptions {
- static decode(reader, position) {
- const $ = new tflite.LeakyReluOptions();
- $.alpha = reader.float32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.LeakyReluOptions();
- $.alpha = reader.value(json.alpha, 0);
- return $;
- }
- };
- tflite.SquaredDifferenceOptions = class SquaredDifferenceOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SquaredDifferenceOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SquaredDifferenceOptions();
- return $;
- }
- };
- tflite.MirrorPadMode = {
- REFLECT: 0, '0': 'REFLECT',
- SYMMETRIC: 1, '1': 'SYMMETRIC'
- };
- tflite.MirrorPadOptions = class MirrorPadOptions {
- static decode(reader, position) {
- const $ = new tflite.MirrorPadOptions();
- $.mode = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.MirrorPadOptions();
- $.mode = tflite.MirrorPadMode[json.mode];
- return $;
- }
- };
- tflite.UniqueOptions = class UniqueOptions {
- static decode(reader, position) {
- const $ = new tflite.UniqueOptions();
- $.idx_out_type = reader.int8_(position, 4, 2);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.UniqueOptions();
- $.idx_out_type = tflite.TensorType[json.idx_out_type];
- return $;
- }
- };
- tflite.ReverseV2Options = class ReverseV2Options {
- static decode(/* reader, position */) {
- const $ = new tflite.ReverseV2Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ReverseV2Options();
- return $;
- }
- };
- tflite.AddNOptions = class AddNOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.AddNOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.AddNOptions();
- return $;
- }
- };
- tflite.GatherNdOptions = class GatherNdOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.GatherNdOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.GatherNdOptions();
- return $;
- }
- };
- tflite.WhereOptions = class WhereOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.WhereOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.WhereOptions();
- return $;
- }
- };
- tflite.ReverseSequenceOptions = class ReverseSequenceOptions {
- static decode(reader, position) {
- const $ = new tflite.ReverseSequenceOptions();
- $.seq_dim = reader.int32_(position, 4, 0);
- $.batch_dim = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ReverseSequenceOptions();
- $.seq_dim = reader.value(json.seq_dim, 0);
- $.batch_dim = reader.value(json.batch_dim, 0);
- return $;
- }
- };
- tflite.MatrixDiagOptions = class MatrixDiagOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.MatrixDiagOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.MatrixDiagOptions();
- return $;
- }
- };
- tflite.QuantizeOptions = class QuantizeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.QuantizeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.QuantizeOptions();
- return $;
- }
- };
- tflite.MatrixSetDiagOptions = class MatrixSetDiagOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.MatrixSetDiagOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.MatrixSetDiagOptions();
- return $;
- }
- };
- tflite.IfOptions = class IfOptions {
- static decode(reader, position) {
- const $ = new tflite.IfOptions();
- $.then_subgraph_index = reader.int32_(position, 4, 0);
- $.else_subgraph_index = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.IfOptions();
- $.then_subgraph_index = reader.value(json.then_subgraph_index, 0);
- $.else_subgraph_index = reader.value(json.else_subgraph_index, 0);
- return $;
- }
- };
- tflite.CallOnceOptions = class CallOnceOptions {
- static decode(reader, position) {
- const $ = new tflite.CallOnceOptions();
- $.init_subgraph_index = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CallOnceOptions();
- $.init_subgraph_index = reader.value(json.init_subgraph_index, 0);
- return $;
- }
- };
- tflite.WhileOptions = class WhileOptions {
- static decode(reader, position) {
- const $ = new tflite.WhileOptions();
- $.cond_subgraph_index = reader.int32_(position, 4, 0);
- $.body_subgraph_index = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.WhileOptions();
- $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
- $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
- return $;
- }
- };
- tflite.NonMaxSuppressionV4Options = class NonMaxSuppressionV4Options {
- static decode(/* reader, position */) {
- const $ = new tflite.NonMaxSuppressionV4Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.NonMaxSuppressionV4Options();
- return $;
- }
- };
- tflite.NonMaxSuppressionV5Options = class NonMaxSuppressionV5Options {
- static decode(/* reader, position */) {
- const $ = new tflite.NonMaxSuppressionV5Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.NonMaxSuppressionV5Options();
- return $;
- }
- };
- tflite.ScatterNdOptions = class ScatterNdOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.ScatterNdOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ScatterNdOptions();
- return $;
- }
- };
- tflite.SelectV2Options = class SelectV2Options {
- static decode(/* reader, position */) {
- const $ = new tflite.SelectV2Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SelectV2Options();
- return $;
- }
- };
- tflite.DensifyOptions = class DensifyOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.DensifyOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.DensifyOptions();
- return $;
- }
- };
- tflite.SegmentSumOptions = class SegmentSumOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SegmentSumOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SegmentSumOptions();
- return $;
- }
- };
- tflite.BatchMatMulOptions = class BatchMatMulOptions {
- static decode(reader, position) {
- const $ = new tflite.BatchMatMulOptions();
- $.adj_x = reader.bool_(position, 4, false);
- $.adj_y = reader.bool_(position, 6, false);
- $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BatchMatMulOptions();
- $.adj_x = reader.value(json.adj_x, false);
- $.adj_y = reader.value(json.adj_y, false);
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- tflite.CumsumOptions = class CumsumOptions {
- static decode(reader, position) {
- const $ = new tflite.CumsumOptions();
- $.exclusive = reader.bool_(position, 4, false);
- $.reverse = reader.bool_(position, 6, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CumsumOptions();
- $.exclusive = reader.value(json.exclusive, false);
- $.reverse = reader.value(json.reverse, false);
- return $;
- }
- };
- tflite.BroadcastToOptions = class BroadcastToOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.BroadcastToOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.BroadcastToOptions();
- return $;
- }
- };
- tflite.Rfft2dOptions = class Rfft2dOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.Rfft2dOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.Rfft2dOptions();
- return $;
- }
- };
- tflite.HashtableOptions = class HashtableOptions {
- static decode(reader, position) {
- const $ = new tflite.HashtableOptions();
- $.table_id = reader.int32_(position, 4, 0);
- $.key_dtype = reader.int8_(position, 6, 0);
- $.value_dtype = reader.int8_(position, 8, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.HashtableOptions();
- $.table_id = reader.value(json.table_id, 0);
- $.key_dtype = tflite.TensorType[json.key_dtype];
- $.value_dtype = tflite.TensorType[json.value_dtype];
- return $;
- }
- };
- tflite.HashtableFindOptions = class HashtableFindOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.HashtableFindOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.HashtableFindOptions();
- return $;
- }
- };
- tflite.HashtableImportOptions = class HashtableImportOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.HashtableImportOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.HashtableImportOptions();
- return $;
- }
- };
- tflite.HashtableSizeOptions = class HashtableSizeOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.HashtableSizeOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.HashtableSizeOptions();
- return $;
- }
- };
- tflite.VarHandleOptions = class VarHandleOptions {
- static decode(reader, position) {
- const $ = new tflite.VarHandleOptions();
- $.container = reader.string_(position, 4, null);
- $.shared_name = reader.string_(position, 6, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.VarHandleOptions();
- $.container = reader.value(json.container, null);
- $.shared_name = reader.value(json.shared_name, null);
- return $;
- }
- };
- tflite.ReadVariableOptions = class ReadVariableOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.ReadVariableOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ReadVariableOptions();
- return $;
- }
- };
- tflite.AssignVariableOptions = class AssignVariableOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.AssignVariableOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.AssignVariableOptions();
- return $;
- }
- };
- tflite.RandomOptions = class RandomOptions {
- static decode(reader, position) {
- const $ = new tflite.RandomOptions();
- $.seed = reader.int64_(position, 4, 0n);
- $.seed2 = reader.int64_(position, 6, 0n);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.RandomOptions();
- $.seed = reader.int64(json.seed, 0n);
- $.seed2 = reader.int64(json.seed2, 0n);
- return $;
- }
- };
- tflite.BucketizeOptions = class BucketizeOptions {
- static decode(reader, position) {
- const $ = new tflite.BucketizeOptions();
- $.boundaries = reader.array(position, 4, Float32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BucketizeOptions();
- $.boundaries = reader.array(json.boundaries, Float32Array);
- return $;
- }
- };
- tflite.GeluOptions = class GeluOptions {
- static decode(reader, position) {
- const $ = new tflite.GeluOptions();
- $.approximate = reader.bool_(position, 4, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.GeluOptions();
- $.approximate = reader.value(json.approximate, false);
- return $;
- }
- };
- tflite.DynamicUpdateSliceOptions = class DynamicUpdateSliceOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.DynamicUpdateSliceOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.DynamicUpdateSliceOptions();
- return $;
- }
- };
- tflite.UnsortedSegmentProdOptions = class UnsortedSegmentProdOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.UnsortedSegmentProdOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.UnsortedSegmentProdOptions();
- return $;
- }
- };
- tflite.UnsortedSegmentMaxOptions = class UnsortedSegmentMaxOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.UnsortedSegmentMaxOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.UnsortedSegmentMaxOptions();
- return $;
- }
- };
- tflite.UnsortedSegmentSumOptions = class UnsortedSegmentSumOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.UnsortedSegmentSumOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.UnsortedSegmentSumOptions();
- return $;
- }
- };
- tflite.ATan2Options = class ATan2Options {
- static decode(/* reader, position */) {
- const $ = new tflite.ATan2Options();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.ATan2Options();
- return $;
- }
- };
- tflite.UnsortedSegmentMinOptions = class UnsortedSegmentMinOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.UnsortedSegmentMinOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.UnsortedSegmentMinOptions();
- return $;
- }
- };
- tflite.SignOptions = class SignOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.SignOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.SignOptions();
- return $;
- }
- };
- tflite.BitcastOptions = class BitcastOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.BitcastOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.BitcastOptions();
- return $;
- }
- };
- tflite.BitwiseXorOptions = class BitwiseXorOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.BitwiseXorOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.BitwiseXorOptions();
- return $;
- }
- };
- tflite.RightShiftOptions = class RightShiftOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.RightShiftOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.RightShiftOptions();
- return $;
- }
- };
- tflite.DilateOptions = class DilateOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.DilateOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.DilateOptions();
- return $;
- }
- };
- tflite.ReduceWindowFunction = {
- UNSUPPORTED: 0, '0': 'UNSUPPORTED',
- ADD: 1, '1': 'ADD',
- MUL: 2, '2': 'MUL',
- MINIMUM: 3, '3': 'MINIMUM',
- MAXIMUM: 4, '4': 'MAXIMUM',
- ALL: 5, '5': 'ALL',
- ANY: 6, '6': 'ANY'
- };
- tflite.ReduceWindowOptions = class ReduceWindowOptions {
- static decode(reader, position) {
- const $ = new tflite.ReduceWindowOptions();
- $.reduce_function = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ReduceWindowOptions();
- $.reduce_function = tflite.ReduceWindowFunction[json.reduce_function];
- return $;
- }
- };
- tflite.OperatorCode = class OperatorCode {
- static decode(reader, position) {
- const $ = new tflite.OperatorCode();
- $.deprecated_builtin_code = reader.int8_(position, 4, 0);
- $.custom_code = reader.string_(position, 6, null);
- $.version = reader.int32_(position, 8, 1);
- $.builtin_code = reader.int32_(position, 10, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.OperatorCode();
- $.deprecated_builtin_code = reader.value(json.deprecated_builtin_code, 0);
- $.custom_code = reader.value(json.custom_code, null);
- $.version = reader.value(json.version, 1);
- $.builtin_code = tflite.BuiltinOperator[json.builtin_code];
- return $;
- }
- };
- tflite.CustomOptionsFormat = {
- FLEXBUFFERS: 0, '0': 'FLEXBUFFERS'
- };
- tflite.StableHLOCompositeOptions = class StableHLOCompositeOptions {
- static decode(reader, position) {
- const $ = new tflite.StableHLOCompositeOptions();
- $.name = reader.string_(position, 4, null);
- $.decomposition_subgraph_index = reader.int32_(position, 6, 0);
- $.composite_attributes = reader.array(position, 8, Uint8Array);
- $.composite_attributes_format = reader.int8_(position, 10, 0);
- $.version = reader.int32_(position, 12, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.StableHLOCompositeOptions();
- $.name = reader.value(json.name, null);
- $.decomposition_subgraph_index = reader.value(json.decomposition_subgraph_index, 0);
- $.composite_attributes = reader.array(json.composite_attributes, Uint8Array);
- $.composite_attributes_format = tflite.CustomOptionsFormat[json.composite_attributes_format];
- $.version = reader.value(json.version, 0);
- return $;
- }
- };
- tflite.StablehloShiftLeftOptions = class StablehloShiftLeftOptions {
- static decode(/* reader, position */) {
- const $ = new tflite.StablehloShiftLeftOptions();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.StablehloShiftLeftOptions();
- return $;
- }
- };
- tflite.Operator = class Operator {
- static decode(reader, position) {
- const $ = new tflite.Operator();
- $.opcode_index = reader.uint32_(position, 4, 0);
- $.inputs = reader.array(position, 6, Int32Array);
- $.outputs = reader.array(position, 8, Int32Array);
- $.builtin_options = reader.union(position, 10, tflite.BuiltinOptions);
- $.custom_options = reader.array(position, 14, Uint8Array);
- $.custom_options_format = reader.int8_(position, 16, 0);
- $.mutating_variable_inputs = reader.bools_(position, 18);
- $.intermediates = reader.array(position, 20, Int32Array);
- $.large_custom_options_offset = reader.uint64_(position, 22, 0n);
- $.large_custom_options_size = reader.uint64_(position, 24, 0n);
- $.builtin_options_2 = reader.union(position, 26, tflite.BuiltinOptions2);
- $.debug_metadata_index = reader.int32_(position, 30, -1);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Operator();
- $.opcode_index = reader.value(json.opcode_index, 0);
- $.inputs = reader.array(json.inputs, Int32Array);
- $.outputs = reader.array(json.outputs, Int32Array);
- $.builtin_options = tflite.BuiltinOptions.decodeText(reader, json.builtin_options, json.builtin_options_type);
- $.custom_options = reader.array(json.custom_options, Uint8Array);
- $.custom_options_format = tflite.CustomOptionsFormat[json.custom_options_format];
- $.mutating_variable_inputs = reader.array(json.mutating_variable_inputs);
- $.intermediates = reader.array(json.intermediates, Int32Array);
- $.large_custom_options_offset = reader.uint64(json.large_custom_options_offset, 0n);
- $.large_custom_options_size = reader.uint64(json.large_custom_options_size, 0n);
- $.builtin_options_2 = tflite.BuiltinOptions2.decodeText(reader, json.builtin_options_2, json.builtin_options_2_type);
- $.debug_metadata_index = reader.value(json.debug_metadata_index, -1);
- return $;
- }
- };
- tflite.SubGraph = class SubGraph {
- static decode(reader, position) {
- const $ = new tflite.SubGraph();
- $.tensors = reader.tables(position, 4, tflite.Tensor);
- $.inputs = reader.array(position, 6, Int32Array);
- $.outputs = reader.array(position, 8, Int32Array);
- $.operators = reader.tables(position, 10, tflite.Operator);
- $.name = reader.string_(position, 12, null);
- $.debug_metadata_index = reader.int32_(position, 14, -1);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SubGraph();
- $.tensors = reader.objects(json.tensors, tflite.Tensor);
- $.inputs = reader.array(json.inputs, Int32Array);
- $.outputs = reader.array(json.outputs, Int32Array);
- $.operators = reader.objects(json.operators, tflite.Operator);
- $.name = reader.value(json.name, null);
- $.debug_metadata_index = reader.value(json.debug_metadata_index, -1);
- return $;
- }
- };
- tflite.Buffer = class Buffer {
- static decode(reader, position) {
- const $ = new tflite.Buffer();
- $.data = reader.array(position, 4, Uint8Array);
- $.offset = reader.uint64_(position, 6, 0n);
- $.size = reader.uint64_(position, 8, 0n);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Buffer();
- $.data = reader.array(json.data, Uint8Array);
- $.offset = reader.uint64(json.offset, 0n);
- $.size = reader.uint64(json.size, 0n);
- return $;
- }
- };
- tflite.ExternalBufferGroup = class ExternalBufferGroup {
- static decode(reader, position) {
- const $ = new tflite.ExternalBufferGroup();
- $.name = reader.string_(position, 4, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ExternalBufferGroup();
- $.name = reader.value(json.name, null);
- return $;
- }
- };
- tflite.ExternalBuffer = class ExternalBuffer {
- static decode(reader, position) {
- const $ = new tflite.ExternalBuffer();
- $.id = reader.uint32_(position, 4, 0);
- $.group = reader.uint32_(position, 6, 0);
- $.offset = reader.uint64_(position, 8, 0n);
- $.length = reader.uint64_(position, 10, 0n);
- $.packing = reader.string_(position, 12, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ExternalBuffer();
- $.id = reader.value(json.id, 0);
- $.group = reader.value(json.group, 0);
- $.offset = reader.uint64(json.offset, 0n);
- $.length = reader.uint64(json.length, 0n);
- $.packing = reader.value(json.packing, null);
- return $;
- }
- };
- tflite.Metadata = class Metadata {
- static decode(reader, position) {
- const $ = new tflite.Metadata();
- $.name = reader.string_(position, 4, null);
- $.buffer = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Metadata();
- $.name = reader.value(json.name, null);
- $.buffer = reader.value(json.buffer, 0);
- return $;
- }
- };
- tflite.TensorMap = class TensorMap {
- static decode(reader, position) {
- const $ = new tflite.TensorMap();
- $.name = reader.string_(position, 4, null);
- $.tensor_index = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.TensorMap();
- $.name = reader.value(json.name, null);
- $.tensor_index = reader.value(json.tensor_index, 0);
- return $;
- }
- };
- tflite.SignatureDef = class SignatureDef {
- static decode(reader, position) {
- const $ = new tflite.SignatureDef();
- $.inputs = reader.tables(position, 4, tflite.TensorMap);
- $.outputs = reader.tables(position, 6, tflite.TensorMap);
- $.signature_key = reader.string_(position, 8, null);
- $.deprecated_tag = reader.string_(position, 10, null);
- $.subgraph_index = reader.uint32_(position, 12, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SignatureDef();
- $.inputs = reader.objects(json.inputs, tflite.TensorMap);
- $.outputs = reader.objects(json.outputs, tflite.TensorMap);
- $.signature_key = reader.value(json.signature_key, null);
- $.deprecated_tag = reader.value(json.deprecated_tag, null);
- $.subgraph_index = reader.value(json.subgraph_index, 0);
- return $;
- }
- };
- tflite.Model = class Model {
- static identifier(reader) {
- return reader.identifier === 'TFL3';
- }
- static create(reader) {
- return tflite.Model.decode(reader, reader.root);
- }
- static createText(reader) {
- return tflite.Model.decodeText(reader, reader.root);
- }
- static decode(reader, position) {
- const $ = new tflite.Model();
- $.version = reader.uint32_(position, 4, 0);
- $.operator_codes = reader.tables(position, 6, tflite.OperatorCode);
- $.subgraphs = reader.tables(position, 8, tflite.SubGraph);
- $.description = reader.string_(position, 10, null);
- $.buffers = reader.tables(position, 12, tflite.Buffer);
- $.metadata_buffer = reader.array(position, 14, Int32Array);
- $.metadata = reader.tables(position, 16, tflite.Metadata);
- $.signature_defs = reader.tables(position, 18, tflite.SignatureDef);
- $.external_buffer_groups = reader.tables(position, 20, tflite.ExternalBufferGroup);
- $.external_buffers = reader.tables(position, 22, tflite.ExternalBuffer);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Model();
- $.version = reader.value(json.version, 0);
- $.operator_codes = reader.objects(json.operator_codes, tflite.OperatorCode);
- $.subgraphs = reader.objects(json.subgraphs, tflite.SubGraph);
- $.description = reader.value(json.description, null);
- $.buffers = reader.objects(json.buffers, tflite.Buffer);
- $.metadata_buffer = reader.array(json.metadata_buffer, Int32Array);
- $.metadata = reader.objects(json.metadata, tflite.Metadata);
- $.signature_defs = reader.objects(json.signature_defs, tflite.SignatureDef);
- $.external_buffer_groups = reader.objects(json.external_buffer_groups, tflite.ExternalBufferGroup);
- $.external_buffers = reader.objects(json.external_buffers, tflite.ExternalBuffer);
- return $;
- }
- };
- tflite.AssociatedFileType = {
- UNKNOWN: 0, '0': 'UNKNOWN',
- DESCRIPTIONS: 1, '1': 'DESCRIPTIONS',
- TENSOR_AXIS_LABELS: 2, '2': 'TENSOR_AXIS_LABELS',
- TENSOR_VALUE_LABELS: 3, '3': 'TENSOR_VALUE_LABELS',
- TENSOR_AXIS_SCORE_CALIBRATION: 4, '4': 'TENSOR_AXIS_SCORE_CALIBRATION',
- VOCABULARY: 5, '5': 'VOCABULARY',
- SCANN_INDEX_FILE: 6, '6': 'SCANN_INDEX_FILE'
- };
- tflite.AssociatedFile = class AssociatedFile {
- static decode(reader, position) {
- const $ = new tflite.AssociatedFile();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.type = reader.int8_(position, 8, 0);
- $.locale = reader.string_(position, 10, null);
- $.version = reader.string_(position, 12, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.AssociatedFile();
- $.name = reader.value(json.name, null);
- $.description = reader.value(json.description, null);
- $.type = tflite.AssociatedFileType[json.type];
- $.locale = reader.value(json.locale, null);
- $.version = reader.value(json.version, null);
- return $;
- }
- };
- tflite.FeatureProperties = class FeatureProperties {
- static decode(/* reader, position */) {
- const $ = new tflite.FeatureProperties();
- return $;
- }
- static decodeText(/* reader, json */) {
- const $ = new tflite.FeatureProperties();
- return $;
- }
- };
- tflite.ColorSpaceType = {
- UNKNOWN: 0, '0': 'UNKNOWN',
- RGB: 1, '1': 'RGB',
- GRAYSCALE: 2, '2': 'GRAYSCALE'
- };
- tflite.ImageSize = class ImageSize {
- static decode(reader, position) {
- const $ = new tflite.ImageSize();
- $.width = reader.uint32_(position, 4, 0);
- $.height = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ImageSize();
- $.width = reader.value(json.width, 0);
- $.height = reader.value(json.height, 0);
- return $;
- }
- };
- tflite.ImageProperties = class ImageProperties {
- static decode(reader, position) {
- const $ = new tflite.ImageProperties();
- $.color_space = reader.int8_(position, 4, 0);
- $.default_size = reader.table(position, 6, tflite.ImageSize);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ImageProperties();
- $.color_space = tflite.ColorSpaceType[json.color_space];
- $.default_size = reader.object(json.default_size, tflite.ImageSize);
- return $;
- }
- };
- tflite.BoundingBoxType = {
- UNKNOWN: 0, '0': 'UNKNOWN',
- BOUNDARIES: 1, '1': 'BOUNDARIES',
- UPPER_LEFT: 2, '2': 'UPPER_LEFT',
- CENTER: 3, '3': 'CENTER'
- };
- tflite.AudioProperties = class AudioProperties {
- static decode(reader, position) {
- const $ = new tflite.AudioProperties();
- $.sample_rate = reader.uint32_(position, 4, 0);
- $.channels = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.AudioProperties();
- $.sample_rate = reader.value(json.sample_rate, 0);
- $.channels = reader.value(json.channels, 0);
- return $;
- }
- };
- tflite.CoordinateType = {
- RATIO: 0, '0': 'RATIO',
- PIXEL: 1, '1': 'PIXEL'
- };
- tflite.BoundingBoxProperties = class BoundingBoxProperties {
- static decode(reader, position) {
- const $ = new tflite.BoundingBoxProperties();
- $.index = reader.array(position, 4, Uint32Array);
- $.type = reader.int8_(position, 6, 0);
- $.coordinate_type = reader.int8_(position, 8, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BoundingBoxProperties();
- $.index = reader.array(json.index, Uint32Array);
- $.type = tflite.BoundingBoxType[json.type];
- $.coordinate_type = tflite.CoordinateType[json.coordinate_type];
- return $;
- }
- };
- tflite.ContentProperties = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.FeatureProperties.decode(reader, position);
- case 2: return tflite.ImageProperties.decode(reader, position);
- case 3: return tflite.BoundingBoxProperties.decode(reader, position);
- case 4: return tflite.AudioProperties.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'FeatureProperties': return tflite.FeatureProperties.decodeText(reader, json);
- case 'ImageProperties': return tflite.ImageProperties.decodeText(reader, json);
- case 'BoundingBoxProperties': return tflite.BoundingBoxProperties.decodeText(reader, json);
- case 'AudioProperties': return tflite.AudioProperties.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.ValueRange = class ValueRange {
- static decode(reader, position) {
- const $ = new tflite.ValueRange();
- $.min = reader.int32_(position, 4, 0);
- $.max = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ValueRange();
- $.min = reader.value(json.min, 0);
- $.max = reader.value(json.max, 0);
- return $;
- }
- };
- tflite.Content = class Content {
- static decode(reader, position) {
- const $ = new tflite.Content();
- $.content_properties = reader.union(position, 4, tflite.ContentProperties);
- $.range = reader.table(position, 8, tflite.ValueRange);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Content();
- $.content_properties = tflite.ContentProperties.decodeText(reader, json.content_properties, json.content_properties_type);
- $.range = reader.object(json.range, tflite.ValueRange);
- return $;
- }
- };
- tflite.NormalizationOptions = class NormalizationOptions {
- static decode(reader, position) {
- const $ = new tflite.NormalizationOptions();
- $.mean = reader.array(position, 4, Float32Array);
- $.std = reader.array(position, 6, Float32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.NormalizationOptions();
- $.mean = reader.array(json.mean, Float32Array);
- $.std = reader.array(json.std, Float32Array);
- return $;
- }
- };
- tflite.ScoreTransformationType = {
- IDENTITY: 0, '0': 'IDENTITY',
- LOG: 1, '1': 'LOG',
- INVERSE_LOGISTIC: 2, '2': 'INVERSE_LOGISTIC'
- };
- tflite.ScoreCalibrationOptions = class ScoreCalibrationOptions {
- static decode(reader, position) {
- const $ = new tflite.ScoreCalibrationOptions();
- $.score_transformation = reader.int8_(position, 4, 0);
- $.default_score = reader.float32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ScoreCalibrationOptions();
- $.score_transformation = tflite.ScoreTransformationType[json.score_transformation];
- $.default_score = reader.value(json.default_score, 0);
- return $;
- }
- };
- tflite.ScoreThresholdingOptions = class ScoreThresholdingOptions {
- static decode(reader, position) {
- const $ = new tflite.ScoreThresholdingOptions();
- $.global_score_threshold = reader.float32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ScoreThresholdingOptions();
- $.global_score_threshold = reader.value(json.global_score_threshold, 0);
- return $;
- }
- };
- tflite.BertTokenizerOptions = class BertTokenizerOptions {
- static decode(reader, position) {
- const $ = new tflite.BertTokenizerOptions();
- $.vocab_file = reader.tables(position, 4, tflite.AssociatedFile);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.BertTokenizerOptions();
- $.vocab_file = reader.objects(json.vocab_file, tflite.AssociatedFile);
- return $;
- }
- };
- tflite.SentencePieceTokenizerOptions = class SentencePieceTokenizerOptions {
- static decode(reader, position) {
- const $ = new tflite.SentencePieceTokenizerOptions();
- $.sentencePiece_model = reader.tables(position, 4, tflite.AssociatedFile);
- $.vocab_file = reader.tables(position, 6, tflite.AssociatedFile);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SentencePieceTokenizerOptions();
- $.sentencePiece_model = reader.objects(json.sentencePiece_model, tflite.AssociatedFile);
- $.vocab_file = reader.objects(json.vocab_file, tflite.AssociatedFile);
- return $;
- }
- };
- tflite.RegexTokenizerOptions = class RegexTokenizerOptions {
- static decode(reader, position) {
- const $ = new tflite.RegexTokenizerOptions();
- $.delim_regex_pattern = reader.string_(position, 4, null);
- $.vocab_file = reader.tables(position, 6, tflite.AssociatedFile);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.RegexTokenizerOptions();
- $.delim_regex_pattern = reader.value(json.delim_regex_pattern, null);
- $.vocab_file = reader.objects(json.vocab_file, tflite.AssociatedFile);
- return $;
- }
- };
- tflite.ProcessUnitOptions = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return tflite.NormalizationOptions.decode(reader, position);
- case 2: return tflite.ScoreCalibrationOptions.decode(reader, position);
- case 3: return tflite.ScoreThresholdingOptions.decode(reader, position);
- case 4: return tflite.BertTokenizerOptions.decode(reader, position);
- case 5: return tflite.SentencePieceTokenizerOptions.decode(reader, position);
- case 6: return tflite.RegexTokenizerOptions.decode(reader, position);
- default: return undefined;
- }
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'NormalizationOptions': return tflite.NormalizationOptions.decodeText(reader, json);
- case 'ScoreCalibrationOptions': return tflite.ScoreCalibrationOptions.decodeText(reader, json);
- case 'ScoreThresholdingOptions': return tflite.ScoreThresholdingOptions.decodeText(reader, json);
- case 'BertTokenizerOptions': return tflite.BertTokenizerOptions.decodeText(reader, json);
- case 'SentencePieceTokenizerOptions': return tflite.SentencePieceTokenizerOptions.decodeText(reader, json);
- case 'RegexTokenizerOptions': return tflite.RegexTokenizerOptions.decodeText(reader, json);
- default: return undefined;
- }
- }
- };
- tflite.ProcessUnit = class ProcessUnit {
- static decode(reader, position) {
- const $ = new tflite.ProcessUnit();
- $.options = reader.union(position, 4, tflite.ProcessUnitOptions);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ProcessUnit();
- $.options = tflite.ProcessUnitOptions.decodeText(reader, json.options, json.options_type);
- return $;
- }
- };
- tflite.Stats = class Stats {
- static decode(reader, position) {
- const $ = new tflite.Stats();
- $.max = reader.array(position, 4, Float32Array);
- $.min = reader.array(position, 6, Float32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.Stats();
- $.max = reader.array(json.max, Float32Array);
- $.min = reader.array(json.min, Float32Array);
- return $;
- }
- };
- tflite.TensorGroup = class TensorGroup {
- static decode(reader, position) {
- const $ = new tflite.TensorGroup();
- $.name = reader.string_(position, 4, null);
- $.tensor_names = reader.strings_(position, 6);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.TensorGroup();
- $.name = reader.value(json.name, null);
- $.tensor_names = reader.array(json.tensor_names);
- return $;
- }
- };
- tflite.TensorMetadata = class TensorMetadata {
- static decode(reader, position) {
- const $ = new tflite.TensorMetadata();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.dimension_names = reader.strings_(position, 8);
- $.content = reader.table(position, 10, tflite.Content);
- $.process_units = reader.tables(position, 12, tflite.ProcessUnit);
- $.stats = reader.table(position, 14, tflite.Stats);
- $.associated_files = reader.tables(position, 16, tflite.AssociatedFile);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.TensorMetadata();
- $.name = reader.value(json.name, null);
- $.description = reader.value(json.description, null);
- $.dimension_names = reader.array(json.dimension_names);
- $.content = reader.object(json.content, tflite.Content);
- $.process_units = reader.objects(json.process_units, tflite.ProcessUnit);
- $.stats = reader.object(json.stats, tflite.Stats);
- $.associated_files = reader.objects(json.associated_files, tflite.AssociatedFile);
- return $;
- }
- };
- tflite.CustomMetadata = class CustomMetadata {
- static decode(reader, position) {
- const $ = new tflite.CustomMetadata();
- $.name = reader.string_(position, 4, null);
- $.data = reader.array(position, 6, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.CustomMetadata();
- $.name = reader.value(json.name, null);
- $.data = reader.array(json.data, Uint8Array);
- return $;
- }
- };
- tflite.SubGraphMetadata = class SubGraphMetadata {
- static decode(reader, position) {
- const $ = new tflite.SubGraphMetadata();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.input_tensor_metadata = reader.tables(position, 8, tflite.TensorMetadata);
- $.output_tensor_metadata = reader.tables(position, 10, tflite.TensorMetadata);
- $.associated_files = reader.tables(position, 12, tflite.AssociatedFile);
- $.input_process_units = reader.tables(position, 14, tflite.ProcessUnit);
- $.output_process_units = reader.tables(position, 16, tflite.ProcessUnit);
- $.input_tensor_groups = reader.tables(position, 18, tflite.TensorGroup);
- $.output_tensor_groups = reader.tables(position, 20, tflite.TensorGroup);
- $.custom_metadata = reader.tables(position, 22, tflite.CustomMetadata);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.SubGraphMetadata();
- $.name = reader.value(json.name, null);
- $.description = reader.value(json.description, null);
- $.input_tensor_metadata = reader.objects(json.input_tensor_metadata, tflite.TensorMetadata);
- $.output_tensor_metadata = reader.objects(json.output_tensor_metadata, tflite.TensorMetadata);
- $.associated_files = reader.objects(json.associated_files, tflite.AssociatedFile);
- $.input_process_units = reader.objects(json.input_process_units, tflite.ProcessUnit);
- $.output_process_units = reader.objects(json.output_process_units, tflite.ProcessUnit);
- $.input_tensor_groups = reader.objects(json.input_tensor_groups, tflite.TensorGroup);
- $.output_tensor_groups = reader.objects(json.output_tensor_groups, tflite.TensorGroup);
- $.custom_metadata = reader.objects(json.custom_metadata, tflite.CustomMetadata);
- return $;
- }
- };
- tflite.ModelMetadata = class ModelMetadata {
- static identifier(reader) {
- return reader.identifier === 'M001';
- }
- static create(reader) {
- return tflite.ModelMetadata.decode(reader, reader.root);
- }
- static createText(reader) {
- return tflite.ModelMetadata.decodeText(reader, reader.root);
- }
- static decode(reader, position) {
- const $ = new tflite.ModelMetadata();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.version = reader.string_(position, 8, null);
- $.subgraph_metadata = reader.tables(position, 10, tflite.SubGraphMetadata);
- $.author = reader.string_(position, 12, null);
- $.license = reader.string_(position, 14, null);
- $.associated_files = reader.tables(position, 16, tflite.AssociatedFile);
- $.min_parser_version = reader.string_(position, 18, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new tflite.ModelMetadata();
- $.name = reader.value(json.name, null);
- $.description = reader.value(json.description, null);
- $.version = reader.value(json.version, null);
- $.subgraph_metadata = reader.objects(json.subgraph_metadata, tflite.SubGraphMetadata);
- $.author = reader.value(json.author, null);
- $.license = reader.value(json.license, null);
- $.associated_files = reader.objects(json.associated_files, tflite.AssociatedFile);
- $.min_parser_version = reader.value(json.min_parser_version, null);
- return $;
- }
- };
|