| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604 |
- var $root = flatbuffers.get('tflite');
- $root.tflite = $root.tflite || {};
- $root.tflite.TensorType = {
- FLOAT32: 0,
- FLOAT16: 1,
- INT32: 2,
- UINT8: 3,
- INT64: 4,
- STRING: 5,
- BOOL: 6,
- INT16: 7,
- COMPLEX64: 8,
- INT8: 9,
- FLOAT64: 10,
- COMPLEX128: 11
- };
- $root.tflite.CustomQuantization = class CustomQuantization {
- static decode(reader, position) {
- const $ = new $root.tflite.CustomQuantization();
- $.custom = reader.typedArray(position, 4, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.CustomQuantization();
- $.custom = reader.typedArray(json.custom, Uint8Array);
- return $;
- }
- };
- $root.tflite.QuantizationDetails = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return $root.tflite.CustomQuantization.decode(reader, position);
- }
- return undefined;
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'CustomQuantization': return $root.tflite.CustomQuantization.decodeText(reader, json);
- }
- return undefined;
- }
- };
- $root.tflite.QuantizationParameters = class QuantizationParameters {
- static decode(reader, position) {
- const $ = new $root.tflite.QuantizationParameters();
- $.min = reader.typedArray(position, 4, Float32Array);
- $.max = reader.typedArray(position, 6, Float32Array);
- $.scale = reader.typedArray(position, 8, Float32Array);
- $.zero_point = reader.int64s_(position, 10);
- $.details = reader.union(position, 12, $root.tflite.QuantizationDetails.decode);
- $.quantized_dimension = reader.int32_(position, 16, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.QuantizationParameters();
- $.min = reader.typedArray(json.min, Float32Array);
- $.max = reader.typedArray(json.max, Float32Array);
- $.scale = reader.typedArray(json.scale, Float32Array);
- $.zero_point = reader.array(json.zero_point);
- $.details = $root.tflite.QuantizationDetails.decodeText(reader, json.details, json.details_type);
- $.quantized_dimension = reader.value(json.quantized_dimension, 0);
- return $;
- }
- };
- $root.tflite.DimensionType = {
- DENSE: 0,
- SPARSE_CSR: 1
- };
- $root.tflite.Int32Vector = class Int32Vector {
- static decode(reader, position) {
- const $ = new $root.tflite.Int32Vector();
- $.values = reader.typedArray(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Int32Vector();
- $.values = reader.typedArray(json.values, Int32Array);
- return $;
- }
- };
- $root.tflite.Uint16Vector = class Uint16Vector {
- static decode(reader, position) {
- const $ = new $root.tflite.Uint16Vector();
- $.values = reader.typedArray(position, 4, Uint16Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Uint16Vector();
- $.values = reader.typedArray(json.values, Uint16Array);
- return $;
- }
- };
- $root.tflite.Uint8Vector = class Uint8Vector {
- static decode(reader, position) {
- const $ = new $root.tflite.Uint8Vector();
- $.values = reader.typedArray(position, 4, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Uint8Vector();
- $.values = reader.typedArray(json.values, Uint8Array);
- return $;
- }
- };
- $root.tflite.SparseIndexVector = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return $root.tflite.Int32Vector.decode(reader, position);
- case 2: return $root.tflite.Uint16Vector.decode(reader, position);
- case 3: return $root.tflite.Uint8Vector.decode(reader, position);
- }
- return undefined;
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'Int32Vector': return $root.tflite.Int32Vector.decodeText(reader, json);
- case 'Uint16Vector': return $root.tflite.Uint16Vector.decodeText(reader, json);
- case 'Uint8Vector': return $root.tflite.Uint8Vector.decodeText(reader, json);
- }
- return undefined;
- }
- };
- $root.tflite.DimensionMetadata = class DimensionMetadata {
- static decode(reader, position) {
- const $ = new $root.tflite.DimensionMetadata();
- $.format = reader.int8_(position, 4, 0);
- $.dense_size = reader.int32_(position, 6, 0);
- $.array_segments = reader.union(position, 8, $root.tflite.SparseIndexVector.decode);
- $.array_indices = reader.union(position, 12, $root.tflite.SparseIndexVector.decode);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.DimensionMetadata();
- $.format = $root.tflite.DimensionType[json.format];
- $.dense_size = reader.value(json.dense_size, 0);
- $.array_segments = $root.tflite.SparseIndexVector.decodeText(reader, json.array_segments, json.array_segments_type);
- $.array_indices = $root.tflite.SparseIndexVector.decodeText(reader, json.array_indices, json.array_indices_type);
- return $;
- }
- };
- $root.tflite.SparsityParameters = class SparsityParameters {
- static decode(reader, position) {
- const $ = new $root.tflite.SparsityParameters();
- $.traversal_order = reader.typedArray(position, 4, Int32Array);
- $.block_map = reader.typedArray(position, 6, Int32Array);
- $.dim_metadata = reader.tableArray(position, 8, $root.tflite.DimensionMetadata.decode);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SparsityParameters();
- $.traversal_order = reader.typedArray(json.traversal_order, Int32Array);
- $.block_map = reader.typedArray(json.block_map, Int32Array);
- $.dim_metadata = reader.objectArray(json.dim_metadata, $root.tflite.DimensionMetadata.decodeText);
- return $;
- }
- };
- $root.tflite.Tensor = class Tensor {
- static decode(reader, position) {
- const $ = new $root.tflite.Tensor();
- $.shape = reader.typedArray(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, $root.tflite.QuantizationParameters.decode);
- $.is_variable = reader.bool_(position, 14, false);
- $.sparsity = reader.table(position, 16, $root.tflite.SparsityParameters.decode);
- $.shape_signature = reader.typedArray(position, 18, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Tensor();
- $.shape = reader.typedArray(json.shape, Int32Array);
- $.type = $root.tflite.TensorType[json.type];
- $.buffer = reader.value(json.buffer, 0);
- $.name = reader.value(json.name, null);
- $.quantization = reader.object(json.quantization, $root.tflite.QuantizationParameters.decodeText);
- $.is_variable = reader.value(json.is_variable, false);
- $.sparsity = reader.object(json.sparsity, $root.tflite.SparsityParameters.decodeText);
- $.shape_signature = reader.typedArray(json.shape_signature, Int32Array);
- return $;
- }
- };
- $root.tflite.BuiltinOperator = {
- ADD: 0,
- AVERAGE_POOL_2D: 1,
- CONCATENATION: 2,
- CONV_2D: 3,
- DEPTHWISE_CONV_2D: 4,
- DEPTH_TO_SPACE: 5,
- DEQUANTIZE: 6,
- EMBEDDING_LOOKUP: 7,
- FLOOR: 8,
- FULLY_CONNECTED: 9,
- HASHTABLE_LOOKUP: 10,
- L2_NORMALIZATION: 11,
- L2_POOL_2D: 12,
- LOCAL_RESPONSE_NORMALIZATION: 13,
- LOGISTIC: 14,
- LSH_PROJECTION: 15,
- LSTM: 16,
- MAX_POOL_2D: 17,
- MUL: 18,
- RELU: 19,
- RELU_N1_TO_1: 20,
- RELU6: 21,
- RESHAPE: 22,
- RESIZE_BILINEAR: 23,
- RNN: 24,
- SOFTMAX: 25,
- SPACE_TO_DEPTH: 26,
- SVDF: 27,
- TANH: 28,
- CONCAT_EMBEDDINGS: 29,
- SKIP_GRAM: 30,
- CALL: 31,
- CUSTOM: 32,
- EMBEDDING_LOOKUP_SPARSE: 33,
- PAD: 34,
- UNIDIRECTIONAL_SEQUENCE_RNN: 35,
- GATHER: 36,
- BATCH_TO_SPACE_ND: 37,
- SPACE_TO_BATCH_ND: 38,
- TRANSPOSE: 39,
- MEAN: 40,
- SUB: 41,
- DIV: 42,
- SQUEEZE: 43,
- UNIDIRECTIONAL_SEQUENCE_LSTM: 44,
- STRIDED_SLICE: 45,
- BIDIRECTIONAL_SEQUENCE_RNN: 46,
- EXP: 47,
- TOPK_V2: 48,
- SPLIT: 49,
- LOG_SOFTMAX: 50,
- DELEGATE: 51,
- BIDIRECTIONAL_SEQUENCE_LSTM: 52,
- CAST: 53,
- PRELU: 54,
- MAXIMUM: 55,
- ARG_MAX: 56,
- MINIMUM: 57,
- LESS: 58,
- NEG: 59,
- PADV2: 60,
- GREATER: 61,
- GREATER_EQUAL: 62,
- LESS_EQUAL: 63,
- SELECT: 64,
- SLICE: 65,
- SIN: 66,
- TRANSPOSE_CONV: 67,
- SPARSE_TO_DENSE: 68,
- TILE: 69,
- EXPAND_DIMS: 70,
- EQUAL: 71,
- NOT_EQUAL: 72,
- LOG: 73,
- SUM: 74,
- SQRT: 75,
- RSQRT: 76,
- SHAPE: 77,
- POW: 78,
- ARG_MIN: 79,
- FAKE_QUANT: 80,
- REDUCE_PROD: 81,
- REDUCE_MAX: 82,
- PACK: 83,
- LOGICAL_OR: 84,
- ONE_HOT: 85,
- LOGICAL_AND: 86,
- LOGICAL_NOT: 87,
- UNPACK: 88,
- REDUCE_MIN: 89,
- FLOOR_DIV: 90,
- REDUCE_ANY: 91,
- SQUARE: 92,
- ZEROS_LIKE: 93,
- FILL: 94,
- FLOOR_MOD: 95,
- RANGE: 96,
- RESIZE_NEAREST_NEIGHBOR: 97,
- LEAKY_RELU: 98,
- SQUARED_DIFFERENCE: 99,
- MIRROR_PAD: 100,
- ABS: 101,
- SPLIT_V: 102,
- UNIQUE: 103,
- CEIL: 104,
- REVERSE_V2: 105,
- ADD_N: 106,
- GATHER_ND: 107,
- COS: 108,
- WHERE: 109,
- RANK: 110,
- ELU: 111,
- REVERSE_SEQUENCE: 112,
- MATRIX_DIAG: 113,
- QUANTIZE: 114,
- MATRIX_SET_DIAG: 115,
- ROUND: 116,
- HARD_SWISH: 117,
- IF: 118,
- WHILE: 119,
- NON_MAX_SUPPRESSION_V4: 120,
- NON_MAX_SUPPRESSION_V5: 121,
- SCATTER_ND: 122,
- SELECT_V2: 123,
- DENSIFY: 124,
- SEGMENT_SUM: 125,
- BATCH_MATMUL: 126
- };
- $root.tflite.BuiltinOptions = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return $root.tflite.Conv2DOptions.decode(reader, position);
- case 2: return $root.tflite.DepthwiseConv2DOptions.decode(reader, position);
- case 3: return $root.tflite.ConcatEmbeddingsOptions.decode(reader, position);
- case 4: return $root.tflite.LSHProjectionOptions.decode(reader, position);
- case 5: return $root.tflite.Pool2DOptions.decode(reader, position);
- case 6: return $root.tflite.SVDFOptions.decode(reader, position);
- case 7: return $root.tflite.RNNOptions.decode(reader, position);
- case 8: return $root.tflite.FullyConnectedOptions.decode(reader, position);
- case 9: return $root.tflite.SoftmaxOptions.decode(reader, position);
- case 10: return $root.tflite.ConcatenationOptions.decode(reader, position);
- case 11: return $root.tflite.AddOptions.decode(reader, position);
- case 12: return $root.tflite.L2NormOptions.decode(reader, position);
- case 13: return $root.tflite.LocalResponseNormalizationOptions.decode(reader, position);
- case 14: return $root.tflite.LSTMOptions.decode(reader, position);
- case 15: return $root.tflite.ResizeBilinearOptions.decode(reader, position);
- case 16: return $root.tflite.CallOptions.decode(reader, position);
- case 17: return $root.tflite.ReshapeOptions.decode(reader, position);
- case 18: return $root.tflite.SkipGramOptions.decode(reader, position);
- case 19: return $root.tflite.SpaceToDepthOptions.decode(reader, position);
- case 20: return $root.tflite.EmbeddingLookupSparseOptions.decode(reader, position);
- case 21: return $root.tflite.MulOptions.decode(reader, position);
- case 22: return $root.tflite.PadOptions.decode(reader, position);
- case 23: return $root.tflite.GatherOptions.decode(reader, position);
- case 24: return $root.tflite.BatchToSpaceNDOptions.decode(reader, position);
- case 25: return $root.tflite.SpaceToBatchNDOptions.decode(reader, position);
- case 26: return $root.tflite.TransposeOptions.decode(reader, position);
- case 27: return $root.tflite.ReducerOptions.decode(reader, position);
- case 28: return $root.tflite.SubOptions.decode(reader, position);
- case 29: return $root.tflite.DivOptions.decode(reader, position);
- case 30: return $root.tflite.SqueezeOptions.decode(reader, position);
- case 31: return $root.tflite.SequenceRNNOptions.decode(reader, position);
- case 32: return $root.tflite.StridedSliceOptions.decode(reader, position);
- case 33: return $root.tflite.ExpOptions.decode(reader, position);
- case 34: return $root.tflite.TopKV2Options.decode(reader, position);
- case 35: return $root.tflite.SplitOptions.decode(reader, position);
- case 36: return $root.tflite.LogSoftmaxOptions.decode(reader, position);
- case 37: return $root.tflite.CastOptions.decode(reader, position);
- case 38: return $root.tflite.DequantizeOptions.decode(reader, position);
- case 39: return $root.tflite.MaximumMinimumOptions.decode(reader, position);
- case 40: return $root.tflite.ArgMaxOptions.decode(reader, position);
- case 41: return $root.tflite.LessOptions.decode(reader, position);
- case 42: return $root.tflite.NegOptions.decode(reader, position);
- case 43: return $root.tflite.PadV2Options.decode(reader, position);
- case 44: return $root.tflite.GreaterOptions.decode(reader, position);
- case 45: return $root.tflite.GreaterEqualOptions.decode(reader, position);
- case 46: return $root.tflite.LessEqualOptions.decode(reader, position);
- case 47: return $root.tflite.SelectOptions.decode(reader, position);
- case 48: return $root.tflite.SliceOptions.decode(reader, position);
- case 49: return $root.tflite.TransposeConvOptions.decode(reader, position);
- case 50: return $root.tflite.SparseToDenseOptions.decode(reader, position);
- case 51: return $root.tflite.TileOptions.decode(reader, position);
- case 52: return $root.tflite.ExpandDimsOptions.decode(reader, position);
- case 53: return $root.tflite.EqualOptions.decode(reader, position);
- case 54: return $root.tflite.NotEqualOptions.decode(reader, position);
- case 55: return $root.tflite.ShapeOptions.decode(reader, position);
- case 56: return $root.tflite.PowOptions.decode(reader, position);
- case 57: return $root.tflite.ArgMinOptions.decode(reader, position);
- case 58: return $root.tflite.FakeQuantOptions.decode(reader, position);
- case 59: return $root.tflite.PackOptions.decode(reader, position);
- case 60: return $root.tflite.LogicalOrOptions.decode(reader, position);
- case 61: return $root.tflite.OneHotOptions.decode(reader, position);
- case 62: return $root.tflite.LogicalAndOptions.decode(reader, position);
- case 63: return $root.tflite.LogicalNotOptions.decode(reader, position);
- case 64: return $root.tflite.UnpackOptions.decode(reader, position);
- case 65: return $root.tflite.FloorDivOptions.decode(reader, position);
- case 66: return $root.tflite.SquareOptions.decode(reader, position);
- case 67: return $root.tflite.ZerosLikeOptions.decode(reader, position);
- case 68: return $root.tflite.FillOptions.decode(reader, position);
- case 69: return $root.tflite.BidirectionalSequenceLSTMOptions.decode(reader, position);
- case 70: return $root.tflite.BidirectionalSequenceRNNOptions.decode(reader, position);
- case 71: return $root.tflite.UnidirectionalSequenceLSTMOptions.decode(reader, position);
- case 72: return $root.tflite.FloorModOptions.decode(reader, position);
- case 73: return $root.tflite.RangeOptions.decode(reader, position);
- case 74: return $root.tflite.ResizeNearestNeighborOptions.decode(reader, position);
- case 75: return $root.tflite.LeakyReluOptions.decode(reader, position);
- case 76: return $root.tflite.SquaredDifferenceOptions.decode(reader, position);
- case 77: return $root.tflite.MirrorPadOptions.decode(reader, position);
- case 78: return $root.tflite.AbsOptions.decode(reader, position);
- case 79: return $root.tflite.SplitVOptions.decode(reader, position);
- case 80: return $root.tflite.UniqueOptions.decode(reader, position);
- case 81: return $root.tflite.ReverseV2Options.decode(reader, position);
- case 82: return $root.tflite.AddNOptions.decode(reader, position);
- case 83: return $root.tflite.GatherNdOptions.decode(reader, position);
- case 84: return $root.tflite.CosOptions.decode(reader, position);
- case 85: return $root.tflite.WhereOptions.decode(reader, position);
- case 86: return $root.tflite.RankOptions.decode(reader, position);
- case 87: return $root.tflite.ReverseSequenceOptions.decode(reader, position);
- case 88: return $root.tflite.MatrixDiagOptions.decode(reader, position);
- case 89: return $root.tflite.QuantizeOptions.decode(reader, position);
- case 90: return $root.tflite.MatrixSetDiagOptions.decode(reader, position);
- case 91: return $root.tflite.HardSwishOptions.decode(reader, position);
- case 92: return $root.tflite.IfOptions.decode(reader, position);
- case 93: return $root.tflite.WhileOptions.decode(reader, position);
- case 94: return $root.tflite.DepthToSpaceOptions.decode(reader, position);
- case 95: return $root.tflite.NonMaxSuppressionV4Options.decode(reader, position);
- case 96: return $root.tflite.NonMaxSuppressionV5Options.decode(reader, position);
- case 97: return $root.tflite.ScatterNdOptions.decode(reader, position);
- case 98: return $root.tflite.SelectV2Options.decode(reader, position);
- case 99: return $root.tflite.DensifyOptions.decode(reader, position);
- case 100: return $root.tflite.SegmentSumOptions.decode(reader, position);
- case 101: return $root.tflite.BatchMatMulOptions.decode(reader, position);
- }
- return undefined;
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'Conv2DOptions': return $root.tflite.Conv2DOptions.decodeText(reader, json);
- case 'DepthwiseConv2DOptions': return $root.tflite.DepthwiseConv2DOptions.decodeText(reader, json);
- case 'ConcatEmbeddingsOptions': return $root.tflite.ConcatEmbeddingsOptions.decodeText(reader, json);
- case 'LSHProjectionOptions': return $root.tflite.LSHProjectionOptions.decodeText(reader, json);
- case 'Pool2DOptions': return $root.tflite.Pool2DOptions.decodeText(reader, json);
- case 'SVDFOptions': return $root.tflite.SVDFOptions.decodeText(reader, json);
- case 'RNNOptions': return $root.tflite.RNNOptions.decodeText(reader, json);
- case 'FullyConnectedOptions': return $root.tflite.FullyConnectedOptions.decodeText(reader, json);
- case 'SoftmaxOptions': return $root.tflite.SoftmaxOptions.decodeText(reader, json);
- case 'ConcatenationOptions': return $root.tflite.ConcatenationOptions.decodeText(reader, json);
- case 'AddOptions': return $root.tflite.AddOptions.decodeText(reader, json);
- case 'L2NormOptions': return $root.tflite.L2NormOptions.decodeText(reader, json);
- case 'LocalResponseNormalizationOptions': return $root.tflite.LocalResponseNormalizationOptions.decodeText(reader, json);
- case 'LSTMOptions': return $root.tflite.LSTMOptions.decodeText(reader, json);
- case 'ResizeBilinearOptions': return $root.tflite.ResizeBilinearOptions.decodeText(reader, json);
- case 'CallOptions': return $root.tflite.CallOptions.decodeText(reader, json);
- case 'ReshapeOptions': return $root.tflite.ReshapeOptions.decodeText(reader, json);
- case 'SkipGramOptions': return $root.tflite.SkipGramOptions.decodeText(reader, json);
- case 'SpaceToDepthOptions': return $root.tflite.SpaceToDepthOptions.decodeText(reader, json);
- case 'EmbeddingLookupSparseOptions': return $root.tflite.EmbeddingLookupSparseOptions.decodeText(reader, json);
- case 'MulOptions': return $root.tflite.MulOptions.decodeText(reader, json);
- case 'PadOptions': return $root.tflite.PadOptions.decodeText(reader, json);
- case 'GatherOptions': return $root.tflite.GatherOptions.decodeText(reader, json);
- case 'BatchToSpaceNDOptions': return $root.tflite.BatchToSpaceNDOptions.decodeText(reader, json);
- case 'SpaceToBatchNDOptions': return $root.tflite.SpaceToBatchNDOptions.decodeText(reader, json);
- case 'TransposeOptions': return $root.tflite.TransposeOptions.decodeText(reader, json);
- case 'ReducerOptions': return $root.tflite.ReducerOptions.decodeText(reader, json);
- case 'SubOptions': return $root.tflite.SubOptions.decodeText(reader, json);
- case 'DivOptions': return $root.tflite.DivOptions.decodeText(reader, json);
- case 'SqueezeOptions': return $root.tflite.SqueezeOptions.decodeText(reader, json);
- case 'SequenceRNNOptions': return $root.tflite.SequenceRNNOptions.decodeText(reader, json);
- case 'StridedSliceOptions': return $root.tflite.StridedSliceOptions.decodeText(reader, json);
- case 'ExpOptions': return $root.tflite.ExpOptions.decodeText(reader, json);
- case 'TopKV2Options': return $root.tflite.TopKV2Options.decodeText(reader, json);
- case 'SplitOptions': return $root.tflite.SplitOptions.decodeText(reader, json);
- case 'LogSoftmaxOptions': return $root.tflite.LogSoftmaxOptions.decodeText(reader, json);
- case 'CastOptions': return $root.tflite.CastOptions.decodeText(reader, json);
- case 'DequantizeOptions': return $root.tflite.DequantizeOptions.decodeText(reader, json);
- case 'MaximumMinimumOptions': return $root.tflite.MaximumMinimumOptions.decodeText(reader, json);
- case 'ArgMaxOptions': return $root.tflite.ArgMaxOptions.decodeText(reader, json);
- case 'LessOptions': return $root.tflite.LessOptions.decodeText(reader, json);
- case 'NegOptions': return $root.tflite.NegOptions.decodeText(reader, json);
- case 'PadV2Options': return $root.tflite.PadV2Options.decodeText(reader, json);
- case 'GreaterOptions': return $root.tflite.GreaterOptions.decodeText(reader, json);
- case 'GreaterEqualOptions': return $root.tflite.GreaterEqualOptions.decodeText(reader, json);
- case 'LessEqualOptions': return $root.tflite.LessEqualOptions.decodeText(reader, json);
- case 'SelectOptions': return $root.tflite.SelectOptions.decodeText(reader, json);
- case 'SliceOptions': return $root.tflite.SliceOptions.decodeText(reader, json);
- case 'TransposeConvOptions': return $root.tflite.TransposeConvOptions.decodeText(reader, json);
- case 'SparseToDenseOptions': return $root.tflite.SparseToDenseOptions.decodeText(reader, json);
- case 'TileOptions': return $root.tflite.TileOptions.decodeText(reader, json);
- case 'ExpandDimsOptions': return $root.tflite.ExpandDimsOptions.decodeText(reader, json);
- case 'EqualOptions': return $root.tflite.EqualOptions.decodeText(reader, json);
- case 'NotEqualOptions': return $root.tflite.NotEqualOptions.decodeText(reader, json);
- case 'ShapeOptions': return $root.tflite.ShapeOptions.decodeText(reader, json);
- case 'PowOptions': return $root.tflite.PowOptions.decodeText(reader, json);
- case 'ArgMinOptions': return $root.tflite.ArgMinOptions.decodeText(reader, json);
- case 'FakeQuantOptions': return $root.tflite.FakeQuantOptions.decodeText(reader, json);
- case 'PackOptions': return $root.tflite.PackOptions.decodeText(reader, json);
- case 'LogicalOrOptions': return $root.tflite.LogicalOrOptions.decodeText(reader, json);
- case 'OneHotOptions': return $root.tflite.OneHotOptions.decodeText(reader, json);
- case 'LogicalAndOptions': return $root.tflite.LogicalAndOptions.decodeText(reader, json);
- case 'LogicalNotOptions': return $root.tflite.LogicalNotOptions.decodeText(reader, json);
- case 'UnpackOptions': return $root.tflite.UnpackOptions.decodeText(reader, json);
- case 'FloorDivOptions': return $root.tflite.FloorDivOptions.decodeText(reader, json);
- case 'SquareOptions': return $root.tflite.SquareOptions.decodeText(reader, json);
- case 'ZerosLikeOptions': return $root.tflite.ZerosLikeOptions.decodeText(reader, json);
- case 'FillOptions': return $root.tflite.FillOptions.decodeText(reader, json);
- case 'BidirectionalSequenceLSTMOptions': return $root.tflite.BidirectionalSequenceLSTMOptions.decodeText(reader, json);
- case 'BidirectionalSequenceRNNOptions': return $root.tflite.BidirectionalSequenceRNNOptions.decodeText(reader, json);
- case 'UnidirectionalSequenceLSTMOptions': return $root.tflite.UnidirectionalSequenceLSTMOptions.decodeText(reader, json);
- case 'FloorModOptions': return $root.tflite.FloorModOptions.decodeText(reader, json);
- case 'RangeOptions': return $root.tflite.RangeOptions.decodeText(reader, json);
- case 'ResizeNearestNeighborOptions': return $root.tflite.ResizeNearestNeighborOptions.decodeText(reader, json);
- case 'LeakyReluOptions': return $root.tflite.LeakyReluOptions.decodeText(reader, json);
- case 'SquaredDifferenceOptions': return $root.tflite.SquaredDifferenceOptions.decodeText(reader, json);
- case 'MirrorPadOptions': return $root.tflite.MirrorPadOptions.decodeText(reader, json);
- case 'AbsOptions': return $root.tflite.AbsOptions.decodeText(reader, json);
- case 'SplitVOptions': return $root.tflite.SplitVOptions.decodeText(reader, json);
- case 'UniqueOptions': return $root.tflite.UniqueOptions.decodeText(reader, json);
- case 'ReverseV2Options': return $root.tflite.ReverseV2Options.decodeText(reader, json);
- case 'AddNOptions': return $root.tflite.AddNOptions.decodeText(reader, json);
- case 'GatherNdOptions': return $root.tflite.GatherNdOptions.decodeText(reader, json);
- case 'CosOptions': return $root.tflite.CosOptions.decodeText(reader, json);
- case 'WhereOptions': return $root.tflite.WhereOptions.decodeText(reader, json);
- case 'RankOptions': return $root.tflite.RankOptions.decodeText(reader, json);
- case 'ReverseSequenceOptions': return $root.tflite.ReverseSequenceOptions.decodeText(reader, json);
- case 'MatrixDiagOptions': return $root.tflite.MatrixDiagOptions.decodeText(reader, json);
- case 'QuantizeOptions': return $root.tflite.QuantizeOptions.decodeText(reader, json);
- case 'MatrixSetDiagOptions': return $root.tflite.MatrixSetDiagOptions.decodeText(reader, json);
- case 'HardSwishOptions': return $root.tflite.HardSwishOptions.decodeText(reader, json);
- case 'IfOptions': return $root.tflite.IfOptions.decodeText(reader, json);
- case 'WhileOptions': return $root.tflite.WhileOptions.decodeText(reader, json);
- case 'DepthToSpaceOptions': return $root.tflite.DepthToSpaceOptions.decodeText(reader, json);
- case 'NonMaxSuppressionV4Options': return $root.tflite.NonMaxSuppressionV4Options.decodeText(reader, json);
- case 'NonMaxSuppressionV5Options': return $root.tflite.NonMaxSuppressionV5Options.decodeText(reader, json);
- case 'ScatterNdOptions': return $root.tflite.ScatterNdOptions.decodeText(reader, json);
- case 'SelectV2Options': return $root.tflite.SelectV2Options.decodeText(reader, json);
- case 'DensifyOptions': return $root.tflite.DensifyOptions.decodeText(reader, json);
- case 'SegmentSumOptions': return $root.tflite.SegmentSumOptions.decodeText(reader, json);
- case 'BatchMatMulOptions': return $root.tflite.BatchMatMulOptions.decodeText(reader, json);
- }
- return undefined;
- }
- };
- $root.tflite.Padding = {
- SAME: 0,
- VALID: 1
- };
- $root.tflite.ActivationFunctionType = {
- NONE: 0,
- RELU: 1,
- RELU_N1_TO_1: 2,
- RELU6: 3,
- TANH: 4,
- SIGN_BIT: 5
- };
- $root.tflite.Conv2DOptions = class Conv2DOptions {
- static decode(reader, position) {
- const $ = new $root.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);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Conv2DOptions();
- $.padding = $root.tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- $.fused_activation_function = $root.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 $;
- }
- };
- $root.tflite.Pool2DOptions = class Pool2DOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.Pool2DOptions();
- $.padding = $root.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 = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- $root.tflite.DepthwiseConv2DOptions = class DepthwiseConv2DOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.DepthwiseConv2DOptions();
- $.padding = $root.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 = $root.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 $;
- }
- };
- $root.tflite.ConcatEmbeddingsOptions = class ConcatEmbeddingsOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ConcatEmbeddingsOptions();
- $.num_channels = reader.int32_(position, 4, 0);
- $.num_columns_per_channel = reader.typedArray(position, 6, Int32Array);
- $.embedding_dim_per_channel = reader.typedArray(position, 8, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ConcatEmbeddingsOptions();
- $.num_channels = reader.value(json.num_channels, 0);
- $.num_columns_per_channel = reader.typedArray(json.num_columns_per_channel, Int32Array);
- $.embedding_dim_per_channel = reader.typedArray(json.embedding_dim_per_channel, Int32Array);
- return $;
- }
- };
- $root.tflite.LSHProjectionType = {
- UNKNOWN: 0,
- SPARSE: 1,
- DENSE: 2
- };
- $root.tflite.LSHProjectionOptions = class LSHProjectionOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LSHProjectionOptions();
- $.type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LSHProjectionOptions();
- $.type = $root.tflite.LSHProjectionType[json.type];
- return $;
- }
- };
- $root.tflite.SVDFOptions = class SVDFOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.SVDFOptions();
- $.rank = reader.value(json.rank, 0);
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- $root.tflite.RNNOptions = class RNNOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.RNNOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- $root.tflite.SequenceRNNOptions = class SequenceRNNOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.SequenceRNNOptions();
- $.time_major = reader.value(json.time_major, false);
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- $root.tflite.BidirectionalSequenceRNNOptions = class BidirectionalSequenceRNNOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.BidirectionalSequenceRNNOptions();
- $.time_major = reader.value(json.time_major, false);
- $.fused_activation_function = $root.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 $;
- }
- };
- $root.tflite.FullyConnectedOptionsWeightsFormat = {
- DEFAULT: 0,
- SHUFFLED4x16INT8: 1
- };
- $root.tflite.FullyConnectedOptions = class FullyConnectedOptions {
- static decode(reader, position) {
- const $ = new $root.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);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.FullyConnectedOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.weights_format = $root.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);
- return $;
- }
- };
- $root.tflite.SoftmaxOptions = class SoftmaxOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SoftmaxOptions();
- $.beta = reader.float32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SoftmaxOptions();
- $.beta = reader.value(json.beta, 0);
- return $;
- }
- };
- $root.tflite.ConcatenationOptions = class ConcatenationOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ConcatenationOptions();
- $.axis = reader.int32_(position, 4, 0);
- $.fused_activation_function = reader.int8_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ConcatenationOptions();
- $.axis = reader.value(json.axis, 0);
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- $root.tflite.AddOptions = class AddOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.AddOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
- return $;
- }
- };
- $root.tflite.MulOptions = class MulOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.MulOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.MulOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- $root.tflite.L2NormOptions = class L2NormOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.L2NormOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.L2NormOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- $root.tflite.LocalResponseNormalizationOptions = class LocalResponseNormalizationOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.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 $;
- }
- };
- $root.tflite.LSTMKernelType = {
- FULL: 0,
- BASIC: 1
- };
- $root.tflite.LSTMOptions = class LSTMOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.LSTMOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.cell_clip = reader.value(json.cell_clip, 0);
- $.proj_clip = reader.value(json.proj_clip, 0);
- $.kernel_type = $root.tflite.LSTMKernelType[json.kernel_type];
- $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
- return $;
- }
- };
- $root.tflite.UnidirectionalSequenceLSTMOptions = class UnidirectionalSequenceLSTMOptions {
- static decode(reader, position) {
- const $ = new $root.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);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.UnidirectionalSequenceLSTMOptions();
- $.fused_activation_function = $root.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);
- return $;
- }
- };
- $root.tflite.BidirectionalSequenceLSTMOptions = class BidirectionalSequenceLSTMOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.BidirectionalSequenceLSTMOptions();
- $.fused_activation_function = $root.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 $;
- }
- };
- $root.tflite.ResizeBilinearOptions = class ResizeBilinearOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.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 $;
- }
- };
- $root.tflite.ResizeNearestNeighborOptions = class ResizeNearestNeighborOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ResizeNearestNeighborOptions();
- $.align_corners = reader.bool_(position, 4, false);
- $.half_pixel_centers = reader.bool_(position, 6, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ResizeNearestNeighborOptions();
- $.align_corners = reader.value(json.align_corners, false);
- $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
- return $;
- }
- };
- $root.tflite.CallOptions = class CallOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.CallOptions();
- $.subgraph = reader.uint32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.CallOptions();
- $.subgraph = reader.value(json.subgraph, 0);
- return $;
- }
- };
- $root.tflite.PadOptions = class PadOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.PadOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.PadOptions();
- return $;
- }
- };
- $root.tflite.PadV2Options = class PadV2Options {
- static decode(reader, position) {
- const $ = new $root.tflite.PadV2Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.PadV2Options();
- return $;
- }
- };
- $root.tflite.ReshapeOptions = class ReshapeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ReshapeOptions();
- $.new_shape = reader.typedArray(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ReshapeOptions();
- $.new_shape = reader.typedArray(json.new_shape, Int32Array);
- return $;
- }
- };
- $root.tflite.SpaceToBatchNDOptions = class SpaceToBatchNDOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SpaceToBatchNDOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SpaceToBatchNDOptions();
- return $;
- }
- };
- $root.tflite.BatchToSpaceNDOptions = class BatchToSpaceNDOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.BatchToSpaceNDOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.BatchToSpaceNDOptions();
- return $;
- }
- };
- $root.tflite.SkipGramOptions = class SkipGramOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.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 $;
- }
- };
- $root.tflite.SpaceToDepthOptions = class SpaceToDepthOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SpaceToDepthOptions();
- $.block_size = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SpaceToDepthOptions();
- $.block_size = reader.value(json.block_size, 0);
- return $;
- }
- };
- $root.tflite.DepthToSpaceOptions = class DepthToSpaceOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.DepthToSpaceOptions();
- $.block_size = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.DepthToSpaceOptions();
- $.block_size = reader.value(json.block_size, 0);
- return $;
- }
- };
- $root.tflite.SubOptions = class SubOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.SubOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
- return $;
- }
- };
- $root.tflite.DivOptions = class DivOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.DivOptions();
- $.fused_activation_function = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.DivOptions();
- $.fused_activation_function = $root.tflite.ActivationFunctionType[json.fused_activation_function];
- return $;
- }
- };
- $root.tflite.TopKV2Options = class TopKV2Options {
- static decode(reader, position) {
- const $ = new $root.tflite.TopKV2Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.TopKV2Options();
- return $;
- }
- };
- $root.tflite.CombinerType = {
- SUM: 0,
- MEAN: 1,
- SQRTN: 2
- };
- $root.tflite.EmbeddingLookupSparseOptions = class EmbeddingLookupSparseOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.EmbeddingLookupSparseOptions();
- $.combiner = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.EmbeddingLookupSparseOptions();
- $.combiner = $root.tflite.CombinerType[json.combiner];
- return $;
- }
- };
- $root.tflite.GatherOptions = class GatherOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.GatherOptions();
- $.axis = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.GatherOptions();
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- $root.tflite.TransposeOptions = class TransposeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.TransposeOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.TransposeOptions();
- return $;
- }
- };
- $root.tflite.ExpOptions = class ExpOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ExpOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ExpOptions();
- return $;
- }
- };
- $root.tflite.CosOptions = class CosOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.CosOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.CosOptions();
- return $;
- }
- };
- $root.tflite.ReducerOptions = class ReducerOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ReducerOptions();
- $.keep_dims = reader.bool_(position, 4, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ReducerOptions();
- $.keep_dims = reader.value(json.keep_dims, false);
- return $;
- }
- };
- $root.tflite.SqueezeOptions = class SqueezeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SqueezeOptions();
- $.squeeze_dims = reader.typedArray(position, 4, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SqueezeOptions();
- $.squeeze_dims = reader.typedArray(json.squeeze_dims, Int32Array);
- return $;
- }
- };
- $root.tflite.SplitOptions = class SplitOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SplitOptions();
- $.num_splits = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SplitOptions();
- $.num_splits = reader.value(json.num_splits, 0);
- return $;
- }
- };
- $root.tflite.SplitVOptions = class SplitVOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SplitVOptions();
- $.num_splits = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SplitVOptions();
- $.num_splits = reader.value(json.num_splits, 0);
- return $;
- }
- };
- $root.tflite.StridedSliceOptions = class StridedSliceOptions {
- static decode(reader, position) {
- const $ = new $root.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);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.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);
- return $;
- }
- };
- $root.tflite.LogSoftmaxOptions = class LogSoftmaxOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LogSoftmaxOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LogSoftmaxOptions();
- return $;
- }
- };
- $root.tflite.CastOptions = class CastOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.CastOptions();
- $.in_data_type = $root.tflite.TensorType[json.in_data_type];
- $.out_data_type = $root.tflite.TensorType[json.out_data_type];
- return $;
- }
- };
- $root.tflite.DequantizeOptions = class DequantizeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.DequantizeOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.DequantizeOptions();
- return $;
- }
- };
- $root.tflite.MaximumMinimumOptions = class MaximumMinimumOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.MaximumMinimumOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.MaximumMinimumOptions();
- return $;
- }
- };
- $root.tflite.TileOptions = class TileOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.TileOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.TileOptions();
- return $;
- }
- };
- $root.tflite.ArgMaxOptions = class ArgMaxOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ArgMaxOptions();
- $.output_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ArgMaxOptions();
- $.output_type = $root.tflite.TensorType[json.output_type];
- return $;
- }
- };
- $root.tflite.ArgMinOptions = class ArgMinOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ArgMinOptions();
- $.output_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ArgMinOptions();
- $.output_type = $root.tflite.TensorType[json.output_type];
- return $;
- }
- };
- $root.tflite.GreaterOptions = class GreaterOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.GreaterOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.GreaterOptions();
- return $;
- }
- };
- $root.tflite.GreaterEqualOptions = class GreaterEqualOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.GreaterEqualOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.GreaterEqualOptions();
- return $;
- }
- };
- $root.tflite.LessOptions = class LessOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LessOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LessOptions();
- return $;
- }
- };
- $root.tflite.LessEqualOptions = class LessEqualOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LessEqualOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LessEqualOptions();
- return $;
- }
- };
- $root.tflite.NegOptions = class NegOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.NegOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.NegOptions();
- return $;
- }
- };
- $root.tflite.SelectOptions = class SelectOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SelectOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SelectOptions();
- return $;
- }
- };
- $root.tflite.SliceOptions = class SliceOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SliceOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SliceOptions();
- return $;
- }
- };
- $root.tflite.TransposeConvOptions = class TransposeConvOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.TransposeConvOptions();
- $.padding = reader.int8_(position, 4, 0);
- $.stride_w = reader.int32_(position, 6, 0);
- $.stride_h = reader.int32_(position, 8, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.TransposeConvOptions();
- $.padding = $root.tflite.Padding[json.padding];
- $.stride_w = reader.value(json.stride_w, 0);
- $.stride_h = reader.value(json.stride_h, 0);
- return $;
- }
- };
- $root.tflite.ExpandDimsOptions = class ExpandDimsOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ExpandDimsOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ExpandDimsOptions();
- return $;
- }
- };
- $root.tflite.SparseToDenseOptions = class SparseToDenseOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SparseToDenseOptions();
- $.validate_indices = reader.bool_(position, 4, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SparseToDenseOptions();
- $.validate_indices = reader.value(json.validate_indices, false);
- return $;
- }
- };
- $root.tflite.EqualOptions = class EqualOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.EqualOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.EqualOptions();
- return $;
- }
- };
- $root.tflite.NotEqualOptions = class NotEqualOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.NotEqualOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.NotEqualOptions();
- return $;
- }
- };
- $root.tflite.ShapeOptions = class ShapeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ShapeOptions();
- $.out_type = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ShapeOptions();
- $.out_type = $root.tflite.TensorType[json.out_type];
- return $;
- }
- };
- $root.tflite.RankOptions = class RankOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.RankOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.RankOptions();
- return $;
- }
- };
- $root.tflite.PowOptions = class PowOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.PowOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.PowOptions();
- return $;
- }
- };
- $root.tflite.FakeQuantOptions = class FakeQuantOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.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 $;
- }
- };
- $root.tflite.PackOptions = class PackOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.PackOptions();
- $.values_count = reader.int32_(position, 4, 0);
- $.axis = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.PackOptions();
- $.values_count = reader.value(json.values_count, 0);
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- $root.tflite.LogicalOrOptions = class LogicalOrOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LogicalOrOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LogicalOrOptions();
- return $;
- }
- };
- $root.tflite.OneHotOptions = class OneHotOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.OneHotOptions();
- $.axis = reader.int32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.OneHotOptions();
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- $root.tflite.AbsOptions = class AbsOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.AbsOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.AbsOptions();
- return $;
- }
- };
- $root.tflite.HardSwishOptions = class HardSwishOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.HardSwishOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.HardSwishOptions();
- return $;
- }
- };
- $root.tflite.LogicalAndOptions = class LogicalAndOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LogicalAndOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LogicalAndOptions();
- return $;
- }
- };
- $root.tflite.LogicalNotOptions = class LogicalNotOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LogicalNotOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LogicalNotOptions();
- return $;
- }
- };
- $root.tflite.UnpackOptions = class UnpackOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.UnpackOptions();
- $.num = reader.int32_(position, 4, 0);
- $.axis = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.UnpackOptions();
- $.num = reader.value(json.num, 0);
- $.axis = reader.value(json.axis, 0);
- return $;
- }
- };
- $root.tflite.FloorDivOptions = class FloorDivOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.FloorDivOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.FloorDivOptions();
- return $;
- }
- };
- $root.tflite.SquareOptions = class SquareOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SquareOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SquareOptions();
- return $;
- }
- };
- $root.tflite.ZerosLikeOptions = class ZerosLikeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ZerosLikeOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ZerosLikeOptions();
- return $;
- }
- };
- $root.tflite.FillOptions = class FillOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.FillOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.FillOptions();
- return $;
- }
- };
- $root.tflite.FloorModOptions = class FloorModOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.FloorModOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.FloorModOptions();
- return $;
- }
- };
- $root.tflite.RangeOptions = class RangeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.RangeOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.RangeOptions();
- return $;
- }
- };
- $root.tflite.LeakyReluOptions = class LeakyReluOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.LeakyReluOptions();
- $.alpha = reader.float32_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.LeakyReluOptions();
- $.alpha = reader.value(json.alpha, 0);
- return $;
- }
- };
- $root.tflite.SquaredDifferenceOptions = class SquaredDifferenceOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SquaredDifferenceOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SquaredDifferenceOptions();
- return $;
- }
- };
- $root.tflite.MirrorPadMode = {
- REFLECT: 0,
- SYMMETRIC: 1
- };
- $root.tflite.MirrorPadOptions = class MirrorPadOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.MirrorPadOptions();
- $.mode = reader.int8_(position, 4, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.MirrorPadOptions();
- $.mode = $root.tflite.MirrorPadMode[json.mode];
- return $;
- }
- };
- $root.tflite.UniqueOptions = class UniqueOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.UniqueOptions();
- $.idx_out_type = reader.int8_(position, 4, 2);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.UniqueOptions();
- $.idx_out_type = $root.tflite.TensorType[json.idx_out_type];
- return $;
- }
- };
- $root.tflite.ReverseV2Options = class ReverseV2Options {
- static decode(reader, position) {
- const $ = new $root.tflite.ReverseV2Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ReverseV2Options();
- return $;
- }
- };
- $root.tflite.AddNOptions = class AddNOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.AddNOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.AddNOptions();
- return $;
- }
- };
- $root.tflite.GatherNdOptions = class GatherNdOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.GatherNdOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.GatherNdOptions();
- return $;
- }
- };
- $root.tflite.WhereOptions = class WhereOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.WhereOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.WhereOptions();
- return $;
- }
- };
- $root.tflite.ReverseSequenceOptions = class ReverseSequenceOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ReverseSequenceOptions();
- $.seq_dim = reader.int32_(position, 4, 0);
- $.batch_dim = reader.int32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ReverseSequenceOptions();
- $.seq_dim = reader.value(json.seq_dim, 0);
- $.batch_dim = reader.value(json.batch_dim, 0);
- return $;
- }
- };
- $root.tflite.MatrixDiagOptions = class MatrixDiagOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.MatrixDiagOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.MatrixDiagOptions();
- return $;
- }
- };
- $root.tflite.QuantizeOptions = class QuantizeOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.QuantizeOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.QuantizeOptions();
- return $;
- }
- };
- $root.tflite.MatrixSetDiagOptions = class MatrixSetDiagOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.MatrixSetDiagOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.MatrixSetDiagOptions();
- return $;
- }
- };
- $root.tflite.IfOptions = class IfOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.IfOptions();
- $.then_subgraph_index = reader.value(json.then_subgraph_index, 0);
- $.else_subgraph_index = reader.value(json.else_subgraph_index, 0);
- return $;
- }
- };
- $root.tflite.WhileOptions = class WhileOptions {
- static decode(reader, position) {
- const $ = new $root.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 $root.tflite.WhileOptions();
- $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
- $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
- return $;
- }
- };
- $root.tflite.NonMaxSuppressionV4Options = class NonMaxSuppressionV4Options {
- static decode(reader, position) {
- const $ = new $root.tflite.NonMaxSuppressionV4Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.NonMaxSuppressionV4Options();
- return $;
- }
- };
- $root.tflite.NonMaxSuppressionV5Options = class NonMaxSuppressionV5Options {
- static decode(reader, position) {
- const $ = new $root.tflite.NonMaxSuppressionV5Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.NonMaxSuppressionV5Options();
- return $;
- }
- };
- $root.tflite.ScatterNdOptions = class ScatterNdOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ScatterNdOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.ScatterNdOptions();
- return $;
- }
- };
- $root.tflite.SelectV2Options = class SelectV2Options {
- static decode(reader, position) {
- const $ = new $root.tflite.SelectV2Options();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SelectV2Options();
- return $;
- }
- };
- $root.tflite.DensifyOptions = class DensifyOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.DensifyOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.DensifyOptions();
- return $;
- }
- };
- $root.tflite.SegmentSumOptions = class SegmentSumOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SegmentSumOptions();
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SegmentSumOptions();
- return $;
- }
- };
- $root.tflite.BatchMatMulOptions = class BatchMatMulOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.BatchMatMulOptions();
- $.adj_x = reader.bool_(position, 4, false);
- $.adj_y = reader.bool_(position, 6, false);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.BatchMatMulOptions();
- $.adj_x = reader.value(json.adj_x, false);
- $.adj_y = reader.value(json.adj_y, false);
- return $;
- }
- };
- $root.tflite.OperatorCode = class OperatorCode {
- static decode(reader, position) {
- const $ = new $root.tflite.OperatorCode();
- $.builtin_code = reader.int8_(position, 4, 0);
- $.custom_code = reader.string_(position, 6, null);
- $.version = reader.int32_(position, 8, 1);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.OperatorCode();
- $.builtin_code = $root.tflite.BuiltinOperator[json.builtin_code];
- $.custom_code = reader.value(json.custom_code, null);
- $.version = reader.value(json.version, 1);
- return $;
- }
- };
- $root.tflite.CustomOptionsFormat = {
- FLEXBUFFERS: 0
- };
- $root.tflite.Operator = class Operator {
- static decode(reader, position) {
- const $ = new $root.tflite.Operator();
- $.opcode_index = reader.uint32_(position, 4, 0);
- $.inputs = reader.typedArray(position, 6, Int32Array);
- $.outputs = reader.typedArray(position, 8, Int32Array);
- $.builtin_options = reader.union(position, 10, $root.tflite.BuiltinOptions.decode);
- $.custom_options = reader.typedArray(position, 14, Uint8Array);
- $.custom_options_format = reader.int8_(position, 16, 0);
- $.mutating_variable_inputs = reader.bools_(position, 18);
- $.intermediates = reader.typedArray(position, 20, Int32Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Operator();
- $.opcode_index = reader.value(json.opcode_index, 0);
- $.inputs = reader.typedArray(json.inputs, Int32Array);
- $.outputs = reader.typedArray(json.outputs, Int32Array);
- $.builtin_options = $root.tflite.BuiltinOptions.decodeText(reader, json.builtin_options, json.builtin_options_type);
- $.custom_options = reader.typedArray(json.custom_options, Uint8Array);
- $.custom_options_format = $root.tflite.CustomOptionsFormat[json.custom_options_format];
- $.mutating_variable_inputs = reader.array(json.mutating_variable_inputs);
- $.intermediates = reader.typedArray(json.intermediates, Int32Array);
- return $;
- }
- };
- $root.tflite.SubGraph = class SubGraph {
- static decode(reader, position) {
- const $ = new $root.tflite.SubGraph();
- $.tensors = reader.tableArray(position, 4, $root.tflite.Tensor.decode);
- $.inputs = reader.typedArray(position, 6, Int32Array);
- $.outputs = reader.typedArray(position, 8, Int32Array);
- $.operators = reader.tableArray(position, 10, $root.tflite.Operator.decode);
- $.name = reader.string_(position, 12, null);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.SubGraph();
- $.tensors = reader.objectArray(json.tensors, $root.tflite.Tensor.decodeText);
- $.inputs = reader.typedArray(json.inputs, Int32Array);
- $.outputs = reader.typedArray(json.outputs, Int32Array);
- $.operators = reader.objectArray(json.operators, $root.tflite.Operator.decodeText);
- $.name = reader.value(json.name, null);
- return $;
- }
- };
- $root.tflite.Buffer = class Buffer {
- static decode(reader, position) {
- const $ = new $root.tflite.Buffer();
- $.data = reader.typedArray(position, 4, Uint8Array);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Buffer();
- $.data = reader.typedArray(json.data, Uint8Array);
- return $;
- }
- };
- $root.tflite.Metadata = class Metadata {
- static decode(reader, position) {
- const $ = new $root.tflite.Metadata();
- $.name = reader.string_(position, 4, null);
- $.buffer = reader.uint32_(position, 6, 0);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Metadata();
- $.name = reader.value(json.name, null);
- $.buffer = reader.value(json.buffer, 0);
- return $;
- }
- };
- $root.tflite.Model = class Model {
- static identifier(reader) {
- return reader.identifier('TFL3');
- }
- static create(reader) {
- return $root.tflite.Model.decode(reader, reader.root);
- }
- static createText(reader) {
- return $root.tflite.Model.decodeText(reader, reader.root);
- }
- static decode(reader, position) {
- const $ = new $root.tflite.Model();
- $.version = reader.uint32_(position, 4, 0);
- $.operator_codes = reader.tableArray(position, 6, $root.tflite.OperatorCode.decode);
- $.subgraphs = reader.tableArray(position, 8, $root.tflite.SubGraph.decode);
- $.description = reader.string_(position, 10, null);
- $.buffers = reader.tableArray(position, 12, $root.tflite.Buffer.decode);
- $.metadata_buffer = reader.typedArray(position, 14, Int32Array);
- $.metadata = reader.tableArray(position, 16, $root.tflite.Metadata.decode);
- return $;
- }
- static decodeText(reader, json) {
- const $ = new $root.tflite.Model();
- $.version = reader.value(json.version, 0);
- $.operator_codes = reader.objectArray(json.operator_codes, $root.tflite.OperatorCode.decodeText);
- $.subgraphs = reader.objectArray(json.subgraphs, $root.tflite.SubGraph.decodeText);
- $.description = reader.value(json.description, null);
- $.buffers = reader.objectArray(json.buffers, $root.tflite.Buffer.decodeText);
- $.metadata_buffer = reader.typedArray(json.metadata_buffer, Int32Array);
- $.metadata = reader.objectArray(json.metadata, $root.tflite.Metadata.decodeText);
- return $;
- }
- };
- $root.tflite = $root.tflite || {};
- $root.tflite.AssociatedFileType = {
- UNKNOWN: 0,
- DESCRIPTIONS: 1,
- TENSOR_AXIS_LABELS: 2,
- TENSOR_VALUE_LABELS: 3,
- TENSOR_AXIS_SCORE_CALIBRATION: 4,
- VOCABULARY: 5
- };
- $root.tflite.AssociatedFile = class AssociatedFile {
- static decode(reader, position) {
- const $ = new $root.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);
- return $;
- }
- };
- $root.tflite.FeatureProperties = class FeatureProperties {
- static decode(reader, position) {
- const $ = new $root.tflite.FeatureProperties();
- return $;
- }
- };
- $root.tflite.ColorSpaceType = {
- UNKNOWN: 0,
- RGB: 1,
- GRAYSCALE: 2
- };
- $root.tflite.ImageSize = class ImageSize {
- static decode(reader, position) {
- const $ = new $root.tflite.ImageSize();
- $.width = reader.uint32_(position, 4, 0);
- $.height = reader.uint32_(position, 6, 0);
- return $;
- }
- };
- $root.tflite.ImageProperties = class ImageProperties {
- static decode(reader, position) {
- const $ = new $root.tflite.ImageProperties();
- $.color_space = reader.int8_(position, 4, 0);
- $.default_size = reader.table(position, 6, $root.tflite.ImageSize.decode);
- return $;
- }
- };
- $root.tflite.BoundingBoxType = {
- UNKNOWN: 0,
- BOUNDARIES: 1,
- UPPER_LEFT: 2,
- CENTER: 3
- };
- $root.tflite.CoordinateType = {
- RATIO: 0,
- PIXEL: 1
- };
- $root.tflite.BoundingBoxProperties = class BoundingBoxProperties {
- static decode(reader, position) {
- const $ = new $root.tflite.BoundingBoxProperties();
- $.index = reader.typedArray(position, 4, Uint32Array);
- $.type = reader.int8_(position, 6, 0);
- $.coordinate_type = reader.int8_(position, 8, 0);
- return $;
- }
- };
- $root.tflite.ContentProperties = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return $root.tflite.FeatureProperties.decode(reader, position);
- case 2: return $root.tflite.ImageProperties.decode(reader, position);
- case 3: return $root.tflite.BoundingBoxProperties.decode(reader, position);
- }
- return undefined;
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'FeatureProperties': return $root.tflite.FeatureProperties.decodeText(reader, json);
- case 'ImageProperties': return $root.tflite.ImageProperties.decodeText(reader, json);
- case 'BoundingBoxProperties': return $root.tflite.BoundingBoxProperties.decodeText(reader, json);
- }
- return undefined;
- }
- };
- $root.tflite.ValueRange = class ValueRange {
- static decode(reader, position) {
- const $ = new $root.tflite.ValueRange();
- $.min = reader.int32_(position, 4, 0);
- $.max = reader.int32_(position, 6, 0);
- return $;
- }
- };
- $root.tflite.Content = class Content {
- static decode(reader, position) {
- const $ = new $root.tflite.Content();
- $.content_properties = reader.union(position, 4, $root.tflite.ContentProperties.decode);
- $.range = reader.table(position, 8, $root.tflite.ValueRange.decode);
- return $;
- }
- };
- $root.tflite.NormalizationOptions = class NormalizationOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.NormalizationOptions();
- $.mean = reader.typedArray(position, 4, Float32Array);
- $.std = reader.typedArray(position, 6, Float32Array);
- return $;
- }
- };
- $root.tflite.ScoreTransformationType = {
- IDENTITY: 0,
- LOG: 1,
- INVERSE_LOGISTIC: 2
- };
- $root.tflite.ScoreCalibrationOptions = class ScoreCalibrationOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ScoreCalibrationOptions();
- $.score_transformation = reader.int8_(position, 4, 0);
- $.default_score = reader.float32_(position, 6, 0);
- return $;
- }
- };
- $root.tflite.ScoreThresholdingOptions = class ScoreThresholdingOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.ScoreThresholdingOptions();
- $.global_score_threshold = reader.float32_(position, 4, 0);
- return $;
- }
- };
- $root.tflite.BertTokenizerOptions = class BertTokenizerOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.BertTokenizerOptions();
- $.vocab_file = reader.tableArray(position, 4, $root.tflite.AssociatedFile.decode);
- return $;
- }
- };
- $root.tflite.SentencePieceTokenizerOptions = class SentencePieceTokenizerOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.SentencePieceTokenizerOptions();
- $.sentencePiece_model = reader.tableArray(position, 4, $root.tflite.AssociatedFile.decode);
- $.vocab_file = reader.tableArray(position, 6, $root.tflite.AssociatedFile.decode);
- return $;
- }
- };
- $root.tflite.RegexTokenizerOptions = class RegexTokenizerOptions {
- static decode(reader, position) {
- const $ = new $root.tflite.RegexTokenizerOptions();
- $.delim_regex_pattern = reader.string_(position, 4, null);
- $.vocab_file = reader.tableArray(position, 6, $root.tflite.AssociatedFile.decode);
- return $;
- }
- };
- $root.tflite.ProcessUnitOptions = class {
- static decode(reader, position, type) {
- switch (type) {
- case 1: return $root.tflite.NormalizationOptions.decode(reader, position);
- case 2: return $root.tflite.ScoreCalibrationOptions.decode(reader, position);
- case 3: return $root.tflite.ScoreThresholdingOptions.decode(reader, position);
- case 4: return $root.tflite.BertTokenizerOptions.decode(reader, position);
- case 5: return $root.tflite.SentencePieceTokenizerOptions.decode(reader, position);
- case 6: return $root.tflite.RegexTokenizerOptions.decode(reader, position);
- }
- return undefined;
- }
- static decodeText(reader, json, type) {
- switch (type) {
- case 'NormalizationOptions': return $root.tflite.NormalizationOptions.decodeText(reader, json);
- case 'ScoreCalibrationOptions': return $root.tflite.ScoreCalibrationOptions.decodeText(reader, json);
- case 'ScoreThresholdingOptions': return $root.tflite.ScoreThresholdingOptions.decodeText(reader, json);
- case 'BertTokenizerOptions': return $root.tflite.BertTokenizerOptions.decodeText(reader, json);
- case 'SentencePieceTokenizerOptions': return $root.tflite.SentencePieceTokenizerOptions.decodeText(reader, json);
- case 'RegexTokenizerOptions': return $root.tflite.RegexTokenizerOptions.decodeText(reader, json);
- }
- return undefined;
- }
- };
- $root.tflite.ProcessUnit = class ProcessUnit {
- static decode(reader, position) {
- const $ = new $root.tflite.ProcessUnit();
- $.options = reader.union(position, 4, $root.tflite.ProcessUnitOptions.decode);
- return $;
- }
- };
- $root.tflite.Stats = class Stats {
- static decode(reader, position) {
- const $ = new $root.tflite.Stats();
- $.max = reader.typedArray(position, 4, Float32Array);
- $.min = reader.typedArray(position, 6, Float32Array);
- return $;
- }
- };
- $root.tflite.TensorGroup = class TensorGroup {
- static decode(reader, position) {
- const $ = new $root.tflite.TensorGroup();
- $.name = reader.string_(position, 4, null);
- $.tensor_names = reader.strings_(position, 6);
- return $;
- }
- };
- $root.tflite.TensorMetadata = class TensorMetadata {
- static decode(reader, position) {
- const $ = new $root.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, $root.tflite.Content.decode);
- $.process_units = reader.tableArray(position, 12, $root.tflite.ProcessUnit.decode);
- $.stats = reader.table(position, 14, $root.tflite.Stats.decode);
- $.associated_files = reader.tableArray(position, 16, $root.tflite.AssociatedFile.decode);
- return $;
- }
- };
- $root.tflite.SubGraphMetadata = class SubGraphMetadata {
- static decode(reader, position) {
- const $ = new $root.tflite.SubGraphMetadata();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.input_tensor_metadata = reader.tableArray(position, 8, $root.tflite.TensorMetadata.decode);
- $.output_tensor_metadata = reader.tableArray(position, 10, $root.tflite.TensorMetadata.decode);
- $.associated_files = reader.tableArray(position, 12, $root.tflite.AssociatedFile.decode);
- $.input_process_units = reader.tableArray(position, 14, $root.tflite.ProcessUnit.decode);
- $.output_process_units = reader.tableArray(position, 16, $root.tflite.ProcessUnit.decode);
- $.input_tensor_groups = reader.tableArray(position, 18, $root.tflite.TensorGroup.decode);
- $.output_tensor_groups = reader.tableArray(position, 20, $root.tflite.TensorGroup.decode);
- return $;
- }
- };
- $root.tflite.ModelMetadata = class ModelMetadata {
- static identifier(reader) {
- return reader.identifier('M001');
- }
- static create(reader) {
- return $root.tflite.ModelMetadata.decode(reader, reader.root);
- }
- static decode(reader, position) {
- const $ = new $root.tflite.ModelMetadata();
- $.name = reader.string_(position, 4, null);
- $.description = reader.string_(position, 6, null);
- $.version = reader.string_(position, 8, null);
- $.subgraph_metadata = reader.tableArray(position, 10, $root.tflite.SubGraphMetadata.decode);
- $.author = reader.string_(position, 12, null);
- $.license = reader.string_(position, 14, null);
- $.associated_files = reader.tableArray(position, 16, $root.tflite.AssociatedFile.decode);
- $.min_parser_version = reader.string_(position, 18, null);
- return $;
- }
- };
|