circle-schema.js 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677
  1. var $root = flatbuffers.get('circle');
  2. $root.circle = $root.circle || {};
  3. $root.circle.TensorType = {
  4. FLOAT32: 0,
  5. FLOAT16: 1,
  6. INT32: 2,
  7. UINT8: 3,
  8. INT64: 4,
  9. STRING: 5,
  10. BOOL: 6,
  11. INT16: 7,
  12. COMPLEX64: 8,
  13. INT8: 9,
  14. FLOAT64: 10,
  15. COMPLEX128: 11,
  16. UINT64: 12,
  17. RESOURCE: 13,
  18. VARIANT: 14,
  19. UINT32: 15
  20. };
  21. $root.circle.CustomQuantization = class CustomQuantization {
  22. static decode(reader, position) {
  23. const $ = new $root.circle.CustomQuantization();
  24. $.custom = reader.typedArray(position, 4, Uint8Array);
  25. return $;
  26. }
  27. static decodeText(reader, json) {
  28. const $ = new $root.circle.CustomQuantization();
  29. $.custom = reader.typedArray(json.custom, Uint8Array);
  30. return $;
  31. }
  32. };
  33. $root.circle.QuantizationDetails = class {
  34. static decode(reader, position, type) {
  35. switch (type) {
  36. case 1: return $root.circle.CustomQuantization.decode(reader, position);
  37. default: return undefined;
  38. }
  39. }
  40. static decodeText(reader, json, type) {
  41. switch (type) {
  42. case 'CustomQuantization': return $root.circle.CustomQuantization.decodeText(reader, json);
  43. default: return undefined;
  44. }
  45. }
  46. };
  47. $root.circle.QuantizationParameters = class QuantizationParameters {
  48. static decode(reader, position) {
  49. const $ = new $root.circle.QuantizationParameters();
  50. $.min = reader.typedArray(position, 4, Float32Array);
  51. $.max = reader.typedArray(position, 6, Float32Array);
  52. $.scale = reader.typedArray(position, 8, Float32Array);
  53. $.zero_point = reader.int64s_(position, 10);
  54. $.details = reader.union(position, 12, $root.circle.QuantizationDetails.decode);
  55. $.quantized_dimension = reader.int32_(position, 16, 0);
  56. return $;
  57. }
  58. static decodeText(reader, json) {
  59. const $ = new $root.circle.QuantizationParameters();
  60. $.min = reader.typedArray(json.min, Float32Array);
  61. $.max = reader.typedArray(json.max, Float32Array);
  62. $.scale = reader.typedArray(json.scale, Float32Array);
  63. $.zero_point = reader.array(json.zero_point);
  64. $.details = $root.circle.QuantizationDetails.decodeText(reader, json.details, json.details_type);
  65. $.quantized_dimension = reader.value(json.quantized_dimension, 0);
  66. return $;
  67. }
  68. };
  69. $root.circle.DimensionType = {
  70. DENSE: 0,
  71. SPARSE_CSR: 1
  72. };
  73. $root.circle.Int32Vector = class Int32Vector {
  74. static decode(reader, position) {
  75. const $ = new $root.circle.Int32Vector();
  76. $.values = reader.typedArray(position, 4, Int32Array);
  77. return $;
  78. }
  79. static decodeText(reader, json) {
  80. const $ = new $root.circle.Int32Vector();
  81. $.values = reader.typedArray(json.values, Int32Array);
  82. return $;
  83. }
  84. };
  85. $root.circle.Uint16Vector = class Uint16Vector {
  86. static decode(reader, position) {
  87. const $ = new $root.circle.Uint16Vector();
  88. $.values = reader.typedArray(position, 4, Uint16Array);
  89. return $;
  90. }
  91. static decodeText(reader, json) {
  92. const $ = new $root.circle.Uint16Vector();
  93. $.values = reader.typedArray(json.values, Uint16Array);
  94. return $;
  95. }
  96. };
  97. $root.circle.Uint8Vector = class Uint8Vector {
  98. static decode(reader, position) {
  99. const $ = new $root.circle.Uint8Vector();
  100. $.values = reader.typedArray(position, 4, Uint8Array);
  101. return $;
  102. }
  103. static decodeText(reader, json) {
  104. const $ = new $root.circle.Uint8Vector();
  105. $.values = reader.typedArray(json.values, Uint8Array);
  106. return $;
  107. }
  108. };
  109. $root.circle.SparseIndexVector = class {
  110. static decode(reader, position, type) {
  111. switch (type) {
  112. case 1: return $root.circle.Int32Vector.decode(reader, position);
  113. case 2: return $root.circle.Uint16Vector.decode(reader, position);
  114. case 3: return $root.circle.Uint8Vector.decode(reader, position);
  115. default: return undefined;
  116. }
  117. }
  118. static decodeText(reader, json, type) {
  119. switch (type) {
  120. case 'Int32Vector': return $root.circle.Int32Vector.decodeText(reader, json);
  121. case 'Uint16Vector': return $root.circle.Uint16Vector.decodeText(reader, json);
  122. case 'Uint8Vector': return $root.circle.Uint8Vector.decodeText(reader, json);
  123. default: return undefined;
  124. }
  125. }
  126. };
  127. $root.circle.DimensionMetadata = class DimensionMetadata {
  128. static decode(reader, position) {
  129. const $ = new $root.circle.DimensionMetadata();
  130. $.format = reader.int8_(position, 4, 0);
  131. $.dense_size = reader.int32_(position, 6, 0);
  132. $.array_segments = reader.union(position, 8, $root.circle.SparseIndexVector.decode);
  133. $.array_indices = reader.union(position, 12, $root.circle.SparseIndexVector.decode);
  134. return $;
  135. }
  136. static decodeText(reader, json) {
  137. const $ = new $root.circle.DimensionMetadata();
  138. $.format = $root.circle.DimensionType[json.format];
  139. $.dense_size = reader.value(json.dense_size, 0);
  140. $.array_segments = $root.circle.SparseIndexVector.decodeText(reader, json.array_segments, json.array_segments_type);
  141. $.array_indices = $root.circle.SparseIndexVector.decodeText(reader, json.array_indices, json.array_indices_type);
  142. return $;
  143. }
  144. };
  145. $root.circle.SparsityParameters = class SparsityParameters {
  146. static decode(reader, position) {
  147. const $ = new $root.circle.SparsityParameters();
  148. $.traversal_order = reader.typedArray(position, 4, Int32Array);
  149. $.block_map = reader.typedArray(position, 6, Int32Array);
  150. $.dim_metadata = reader.tableArray(position, 8, $root.circle.DimensionMetadata.decode);
  151. return $;
  152. }
  153. static decodeText(reader, json) {
  154. const $ = new $root.circle.SparsityParameters();
  155. $.traversal_order = reader.typedArray(json.traversal_order, Int32Array);
  156. $.block_map = reader.typedArray(json.block_map, Int32Array);
  157. $.dim_metadata = reader.objectArray(json.dim_metadata, $root.circle.DimensionMetadata.decodeText);
  158. return $;
  159. }
  160. };
  161. $root.circle.Tensor = class Tensor {
  162. static decode(reader, position) {
  163. const $ = new $root.circle.Tensor();
  164. $.shape = reader.typedArray(position, 4, Int32Array);
  165. $.type = reader.int8_(position, 6, 0);
  166. $.buffer = reader.uint32_(position, 8, 0);
  167. $.name = reader.string_(position, 10, null);
  168. $.quantization = reader.table(position, 12, $root.circle.QuantizationParameters.decode);
  169. $.is_variable = reader.bool_(position, 14, false);
  170. $.sparsity = reader.table(position, 16, $root.circle.SparsityParameters.decode);
  171. $.shape_signature = reader.typedArray(position, 18, Int32Array);
  172. return $;
  173. }
  174. static decodeText(reader, json) {
  175. const $ = new $root.circle.Tensor();
  176. $.shape = reader.typedArray(json.shape, Int32Array);
  177. $.type = $root.circle.TensorType[json.type];
  178. $.buffer = reader.value(json.buffer, 0);
  179. $.name = reader.value(json.name, null);
  180. $.quantization = reader.object(json.quantization, $root.circle.QuantizationParameters.decodeText);
  181. $.is_variable = reader.value(json.is_variable, false);
  182. $.sparsity = reader.object(json.sparsity, $root.circle.SparsityParameters.decodeText);
  183. $.shape_signature = reader.typedArray(json.shape_signature, Int32Array);
  184. return $;
  185. }
  186. };
  187. $root.circle.BuiltinOperator = {
  188. BCQ_GATHER: -4,
  189. BCQ_FULLY_CONNECTED: -3,
  190. INSTANCE_NORM: -2,
  191. ADD: 0,
  192. AVERAGE_POOL_2D: 1,
  193. CONCATENATION: 2,
  194. CONV_2D: 3,
  195. DEPTHWISE_CONV_2D: 4,
  196. DEPTH_TO_SPACE: 5,
  197. DEQUANTIZE: 6,
  198. EMBEDDING_LOOKUP: 7,
  199. FLOOR: 8,
  200. FULLY_CONNECTED: 9,
  201. HASHTABLE_LOOKUP: 10,
  202. L2_NORMALIZATION: 11,
  203. L2_POOL_2D: 12,
  204. LOCAL_RESPONSE_NORMALIZATION: 13,
  205. LOGISTIC: 14,
  206. LSH_PROJECTION: 15,
  207. LSTM: 16,
  208. MAX_POOL_2D: 17,
  209. MUL: 18,
  210. RELU: 19,
  211. RELU_N1_TO_1: 20,
  212. RELU6: 21,
  213. RESHAPE: 22,
  214. RESIZE_BILINEAR: 23,
  215. RNN: 24,
  216. SOFTMAX: 25,
  217. SPACE_TO_DEPTH: 26,
  218. SVDF: 27,
  219. TANH: 28,
  220. CONCAT_EMBEDDINGS: 29,
  221. SKIP_GRAM: 30,
  222. CALL: 31,
  223. CUSTOM: 32,
  224. EMBEDDING_LOOKUP_SPARSE: 33,
  225. PAD: 34,
  226. UNIDIRECTIONAL_SEQUENCE_RNN: 35,
  227. GATHER: 36,
  228. BATCH_TO_SPACE_ND: 37,
  229. SPACE_TO_BATCH_ND: 38,
  230. TRANSPOSE: 39,
  231. MEAN: 40,
  232. SUB: 41,
  233. DIV: 42,
  234. SQUEEZE: 43,
  235. UNIDIRECTIONAL_SEQUENCE_LSTM: 44,
  236. STRIDED_SLICE: 45,
  237. BIDIRECTIONAL_SEQUENCE_RNN: 46,
  238. EXP: 47,
  239. TOPK_V2: 48,
  240. SPLIT: 49,
  241. LOG_SOFTMAX: 50,
  242. DELEGATE: 51,
  243. BIDIRECTIONAL_SEQUENCE_LSTM: 52,
  244. CAST: 53,
  245. PRELU: 54,
  246. MAXIMUM: 55,
  247. ARG_MAX: 56,
  248. MINIMUM: 57,
  249. LESS: 58,
  250. NEG: 59,
  251. PADV2: 60,
  252. GREATER: 61,
  253. GREATER_EQUAL: 62,
  254. LESS_EQUAL: 63,
  255. SELECT: 64,
  256. SLICE: 65,
  257. SIN: 66,
  258. TRANSPOSE_CONV: 67,
  259. SPARSE_TO_DENSE: 68,
  260. TILE: 69,
  261. EXPAND_DIMS: 70,
  262. EQUAL: 71,
  263. NOT_EQUAL: 72,
  264. LOG: 73,
  265. SUM: 74,
  266. SQRT: 75,
  267. RSQRT: 76,
  268. SHAPE: 77,
  269. POW: 78,
  270. ARG_MIN: 79,
  271. FAKE_QUANT: 80,
  272. REDUCE_PROD: 81,
  273. REDUCE_MAX: 82,
  274. PACK: 83,
  275. LOGICAL_OR: 84,
  276. ONE_HOT: 85,
  277. LOGICAL_AND: 86,
  278. LOGICAL_NOT: 87,
  279. UNPACK: 88,
  280. REDUCE_MIN: 89,
  281. FLOOR_DIV: 90,
  282. REDUCE_ANY: 91,
  283. SQUARE: 92,
  284. ZEROS_LIKE: 93,
  285. FILL: 94,
  286. FLOOR_MOD: 95,
  287. RANGE: 96,
  288. RESIZE_NEAREST_NEIGHBOR: 97,
  289. LEAKY_RELU: 98,
  290. SQUARED_DIFFERENCE: 99,
  291. MIRROR_PAD: 100,
  292. ABS: 101,
  293. SPLIT_V: 102,
  294. UNIQUE: 103,
  295. CEIL: 104,
  296. REVERSE_V2: 105,
  297. ADD_N: 106,
  298. GATHER_ND: 107,
  299. COS: 108,
  300. WHERE: 109,
  301. RANK: 110,
  302. ELU: 111,
  303. REVERSE_SEQUENCE: 112,
  304. MATRIX_DIAG: 113,
  305. QUANTIZE: 114,
  306. MATRIX_SET_DIAG: 115,
  307. ROUND: 116,
  308. HARD_SWISH: 117,
  309. IF: 118,
  310. WHILE: 119,
  311. NON_MAX_SUPPRESSION_V4: 120,
  312. NON_MAX_SUPPRESSION_V5: 121,
  313. SCATTER_ND: 122,
  314. SELECT_V2: 123,
  315. DENSIFY: 124,
  316. SEGMENT_SUM: 125,
  317. BATCH_MATMUL: 126,
  318. PLACEHOLDER_FOR_GREATER_OP_CODES: 127,
  319. CUMSUM: 128,
  320. CALL_ONCE: 129,
  321. BROADCAST_TO: 130,
  322. RFFT2D: 131,
  323. CONV_3D: 132,
  324. IMAG: 133,
  325. REAL: 134,
  326. COMPLEX_ABS: 135,
  327. HASHTABLE: 136,
  328. HASHTABLE_FIND: 137,
  329. HASHTABLE_IMPORT: 138,
  330. HASHTABLE_SIZE: 139,
  331. REDUCE_ALL: 140,
  332. CONV_3D_TRANSPOSE: 141,
  333. VAR_HANDLE: 142,
  334. READ_VARIABLE: 143,
  335. ASSIGN_VARIABLE: 144,
  336. BROADCAST_ARGS: 145,
  337. RANDOM_STANDARD_NORMAL: 146
  338. };
  339. $root.circle.BuiltinOptions = class {
  340. static decode(reader, position, type) {
  341. switch (type) {
  342. case 1: return $root.circle.Conv2DOptions.decode(reader, position);
  343. case 2: return $root.circle.DepthwiseConv2DOptions.decode(reader, position);
  344. case 3: return $root.circle.ConcatEmbeddingsOptions.decode(reader, position);
  345. case 4: return $root.circle.LSHProjectionOptions.decode(reader, position);
  346. case 5: return $root.circle.Pool2DOptions.decode(reader, position);
  347. case 6: return $root.circle.SVDFOptions.decode(reader, position);
  348. case 7: return $root.circle.RNNOptions.decode(reader, position);
  349. case 8: return $root.circle.FullyConnectedOptions.decode(reader, position);
  350. case 9: return $root.circle.SoftmaxOptions.decode(reader, position);
  351. case 10: return $root.circle.ConcatenationOptions.decode(reader, position);
  352. case 11: return $root.circle.AddOptions.decode(reader, position);
  353. case 12: return $root.circle.L2NormOptions.decode(reader, position);
  354. case 13: return $root.circle.LocalResponseNormalizationOptions.decode(reader, position);
  355. case 14: return $root.circle.LSTMOptions.decode(reader, position);
  356. case 15: return $root.circle.ResizeBilinearOptions.decode(reader, position);
  357. case 16: return $root.circle.CallOptions.decode(reader, position);
  358. case 17: return $root.circle.ReshapeOptions.decode(reader, position);
  359. case 18: return $root.circle.SkipGramOptions.decode(reader, position);
  360. case 19: return $root.circle.SpaceToDepthOptions.decode(reader, position);
  361. case 20: return $root.circle.EmbeddingLookupSparseOptions.decode(reader, position);
  362. case 21: return $root.circle.MulOptions.decode(reader, position);
  363. case 22: return $root.circle.PadOptions.decode(reader, position);
  364. case 23: return $root.circle.GatherOptions.decode(reader, position);
  365. case 24: return $root.circle.BatchToSpaceNDOptions.decode(reader, position);
  366. case 25: return $root.circle.SpaceToBatchNDOptions.decode(reader, position);
  367. case 26: return $root.circle.TransposeOptions.decode(reader, position);
  368. case 27: return $root.circle.ReducerOptions.decode(reader, position);
  369. case 28: return $root.circle.SubOptions.decode(reader, position);
  370. case 29: return $root.circle.DivOptions.decode(reader, position);
  371. case 30: return $root.circle.SqueezeOptions.decode(reader, position);
  372. case 31: return $root.circle.SequenceRNNOptions.decode(reader, position);
  373. case 32: return $root.circle.StridedSliceOptions.decode(reader, position);
  374. case 33: return $root.circle.ExpOptions.decode(reader, position);
  375. case 34: return $root.circle.TopKV2Options.decode(reader, position);
  376. case 35: return $root.circle.SplitOptions.decode(reader, position);
  377. case 36: return $root.circle.LogSoftmaxOptions.decode(reader, position);
  378. case 37: return $root.circle.CastOptions.decode(reader, position);
  379. case 38: return $root.circle.DequantizeOptions.decode(reader, position);
  380. case 39: return $root.circle.MaximumMinimumOptions.decode(reader, position);
  381. case 40: return $root.circle.ArgMaxOptions.decode(reader, position);
  382. case 41: return $root.circle.LessOptions.decode(reader, position);
  383. case 42: return $root.circle.NegOptions.decode(reader, position);
  384. case 43: return $root.circle.PadV2Options.decode(reader, position);
  385. case 44: return $root.circle.GreaterOptions.decode(reader, position);
  386. case 45: return $root.circle.GreaterEqualOptions.decode(reader, position);
  387. case 46: return $root.circle.LessEqualOptions.decode(reader, position);
  388. case 47: return $root.circle.SelectOptions.decode(reader, position);
  389. case 48: return $root.circle.SliceOptions.decode(reader, position);
  390. case 49: return $root.circle.TransposeConvOptions.decode(reader, position);
  391. case 50: return $root.circle.SparseToDenseOptions.decode(reader, position);
  392. case 51: return $root.circle.TileOptions.decode(reader, position);
  393. case 52: return $root.circle.ExpandDimsOptions.decode(reader, position);
  394. case 53: return $root.circle.EqualOptions.decode(reader, position);
  395. case 54: return $root.circle.NotEqualOptions.decode(reader, position);
  396. case 55: return $root.circle.ShapeOptions.decode(reader, position);
  397. case 56: return $root.circle.PowOptions.decode(reader, position);
  398. case 57: return $root.circle.ArgMinOptions.decode(reader, position);
  399. case 58: return $root.circle.FakeQuantOptions.decode(reader, position);
  400. case 59: return $root.circle.PackOptions.decode(reader, position);
  401. case 60: return $root.circle.LogicalOrOptions.decode(reader, position);
  402. case 61: return $root.circle.OneHotOptions.decode(reader, position);
  403. case 62: return $root.circle.LogicalAndOptions.decode(reader, position);
  404. case 63: return $root.circle.LogicalNotOptions.decode(reader, position);
  405. case 64: return $root.circle.UnpackOptions.decode(reader, position);
  406. case 65: return $root.circle.FloorDivOptions.decode(reader, position);
  407. case 66: return $root.circle.SquareOptions.decode(reader, position);
  408. case 67: return $root.circle.ZerosLikeOptions.decode(reader, position);
  409. case 68: return $root.circle.FillOptions.decode(reader, position);
  410. case 69: return $root.circle.BidirectionalSequenceLSTMOptions.decode(reader, position);
  411. case 70: return $root.circle.BidirectionalSequenceRNNOptions.decode(reader, position);
  412. case 71: return $root.circle.UnidirectionalSequenceLSTMOptions.decode(reader, position);
  413. case 72: return $root.circle.FloorModOptions.decode(reader, position);
  414. case 73: return $root.circle.RangeOptions.decode(reader, position);
  415. case 74: return $root.circle.ResizeNearestNeighborOptions.decode(reader, position);
  416. case 75: return $root.circle.LeakyReluOptions.decode(reader, position);
  417. case 76: return $root.circle.SquaredDifferenceOptions.decode(reader, position);
  418. case 77: return $root.circle.MirrorPadOptions.decode(reader, position);
  419. case 78: return $root.circle.AbsOptions.decode(reader, position);
  420. case 79: return $root.circle.SplitVOptions.decode(reader, position);
  421. case 80: return $root.circle.UniqueOptions.decode(reader, position);
  422. case 81: return $root.circle.ReverseV2Options.decode(reader, position);
  423. case 82: return $root.circle.AddNOptions.decode(reader, position);
  424. case 83: return $root.circle.GatherNdOptions.decode(reader, position);
  425. case 84: return $root.circle.CosOptions.decode(reader, position);
  426. case 85: return $root.circle.WhereOptions.decode(reader, position);
  427. case 86: return $root.circle.RankOptions.decode(reader, position);
  428. case 87: return $root.circle.ReverseSequenceOptions.decode(reader, position);
  429. case 88: return $root.circle.MatrixDiagOptions.decode(reader, position);
  430. case 89: return $root.circle.QuantizeOptions.decode(reader, position);
  431. case 90: return $root.circle.MatrixSetDiagOptions.decode(reader, position);
  432. case 91: return $root.circle.HardSwishOptions.decode(reader, position);
  433. case 92: return $root.circle.IfOptions.decode(reader, position);
  434. case 93: return $root.circle.WhileOptions.decode(reader, position);
  435. case 94: return $root.circle.DepthToSpaceOptions.decode(reader, position);
  436. case 95: return $root.circle.NonMaxSuppressionV4Options.decode(reader, position);
  437. case 96: return $root.circle.NonMaxSuppressionV5Options.decode(reader, position);
  438. case 97: return $root.circle.ScatterNdOptions.decode(reader, position);
  439. case 98: return $root.circle.SelectV2Options.decode(reader, position);
  440. case 99: return $root.circle.DensifyOptions.decode(reader, position);
  441. case 100: return $root.circle.SegmentSumOptions.decode(reader, position);
  442. case 101: return $root.circle.BatchMatMulOptions.decode(reader, position);
  443. case 102: return $root.circle.CumsumOptions.decode(reader, position);
  444. case 103: return $root.circle.CallOnceOptions.decode(reader, position);
  445. case 104: return $root.circle.BroadcastToOptions.decode(reader, position);
  446. case 105: return $root.circle.Rfft2dOptions.decode(reader, position);
  447. case 106: return $root.circle.Conv3DOptions.decode(reader, position);
  448. case 107: return $root.circle.HashtableOptions.decode(reader, position);
  449. case 108: return $root.circle.HashtableFindOptions.decode(reader, position);
  450. case 109: return $root.circle.HashtableImportOptions.decode(reader, position);
  451. case 110: return $root.circle.HashtableSizeOptions.decode(reader, position);
  452. case 111: return $root.circle.VarHandleOptions.decode(reader, position);
  453. case 112: return $root.circle.ReadVariableOptions.decode(reader, position);
  454. case 113: return $root.circle.AssignVariableOptions.decode(reader, position);
  455. case 114: return $root.circle.RandomOptions.decode(reader, position);
  456. case 252: return $root.circle.BCQGatherOptions.decode(reader, position);
  457. case 253: return $root.circle.BCQFullyConnectedOptions.decode(reader, position);
  458. case 254: return $root.circle.InstanceNormOptions.decode(reader, position);
  459. default: return undefined;
  460. }
  461. }
  462. static decodeText(reader, json, type) {
  463. switch (type) {
  464. case 'Conv2DOptions': return $root.circle.Conv2DOptions.decodeText(reader, json);
  465. case 'DepthwiseConv2DOptions': return $root.circle.DepthwiseConv2DOptions.decodeText(reader, json);
  466. case 'ConcatEmbeddingsOptions': return $root.circle.ConcatEmbeddingsOptions.decodeText(reader, json);
  467. case 'LSHProjectionOptions': return $root.circle.LSHProjectionOptions.decodeText(reader, json);
  468. case 'Pool2DOptions': return $root.circle.Pool2DOptions.decodeText(reader, json);
  469. case 'SVDFOptions': return $root.circle.SVDFOptions.decodeText(reader, json);
  470. case 'RNNOptions': return $root.circle.RNNOptions.decodeText(reader, json);
  471. case 'FullyConnectedOptions': return $root.circle.FullyConnectedOptions.decodeText(reader, json);
  472. case 'SoftmaxOptions': return $root.circle.SoftmaxOptions.decodeText(reader, json);
  473. case 'ConcatenationOptions': return $root.circle.ConcatenationOptions.decodeText(reader, json);
  474. case 'AddOptions': return $root.circle.AddOptions.decodeText(reader, json);
  475. case 'L2NormOptions': return $root.circle.L2NormOptions.decodeText(reader, json);
  476. case 'LocalResponseNormalizationOptions': return $root.circle.LocalResponseNormalizationOptions.decodeText(reader, json);
  477. case 'LSTMOptions': return $root.circle.LSTMOptions.decodeText(reader, json);
  478. case 'ResizeBilinearOptions': return $root.circle.ResizeBilinearOptions.decodeText(reader, json);
  479. case 'CallOptions': return $root.circle.CallOptions.decodeText(reader, json);
  480. case 'ReshapeOptions': return $root.circle.ReshapeOptions.decodeText(reader, json);
  481. case 'SkipGramOptions': return $root.circle.SkipGramOptions.decodeText(reader, json);
  482. case 'SpaceToDepthOptions': return $root.circle.SpaceToDepthOptions.decodeText(reader, json);
  483. case 'EmbeddingLookupSparseOptions': return $root.circle.EmbeddingLookupSparseOptions.decodeText(reader, json);
  484. case 'MulOptions': return $root.circle.MulOptions.decodeText(reader, json);
  485. case 'PadOptions': return $root.circle.PadOptions.decodeText(reader, json);
  486. case 'GatherOptions': return $root.circle.GatherOptions.decodeText(reader, json);
  487. case 'BatchToSpaceNDOptions': return $root.circle.BatchToSpaceNDOptions.decodeText(reader, json);
  488. case 'SpaceToBatchNDOptions': return $root.circle.SpaceToBatchNDOptions.decodeText(reader, json);
  489. case 'TransposeOptions': return $root.circle.TransposeOptions.decodeText(reader, json);
  490. case 'ReducerOptions': return $root.circle.ReducerOptions.decodeText(reader, json);
  491. case 'SubOptions': return $root.circle.SubOptions.decodeText(reader, json);
  492. case 'DivOptions': return $root.circle.DivOptions.decodeText(reader, json);
  493. case 'SqueezeOptions': return $root.circle.SqueezeOptions.decodeText(reader, json);
  494. case 'SequenceRNNOptions': return $root.circle.SequenceRNNOptions.decodeText(reader, json);
  495. case 'StridedSliceOptions': return $root.circle.StridedSliceOptions.decodeText(reader, json);
  496. case 'ExpOptions': return $root.circle.ExpOptions.decodeText(reader, json);
  497. case 'TopKV2Options': return $root.circle.TopKV2Options.decodeText(reader, json);
  498. case 'SplitOptions': return $root.circle.SplitOptions.decodeText(reader, json);
  499. case 'LogSoftmaxOptions': return $root.circle.LogSoftmaxOptions.decodeText(reader, json);
  500. case 'CastOptions': return $root.circle.CastOptions.decodeText(reader, json);
  501. case 'DequantizeOptions': return $root.circle.DequantizeOptions.decodeText(reader, json);
  502. case 'MaximumMinimumOptions': return $root.circle.MaximumMinimumOptions.decodeText(reader, json);
  503. case 'ArgMaxOptions': return $root.circle.ArgMaxOptions.decodeText(reader, json);
  504. case 'LessOptions': return $root.circle.LessOptions.decodeText(reader, json);
  505. case 'NegOptions': return $root.circle.NegOptions.decodeText(reader, json);
  506. case 'PadV2Options': return $root.circle.PadV2Options.decodeText(reader, json);
  507. case 'GreaterOptions': return $root.circle.GreaterOptions.decodeText(reader, json);
  508. case 'GreaterEqualOptions': return $root.circle.GreaterEqualOptions.decodeText(reader, json);
  509. case 'LessEqualOptions': return $root.circle.LessEqualOptions.decodeText(reader, json);
  510. case 'SelectOptions': return $root.circle.SelectOptions.decodeText(reader, json);
  511. case 'SliceOptions': return $root.circle.SliceOptions.decodeText(reader, json);
  512. case 'TransposeConvOptions': return $root.circle.TransposeConvOptions.decodeText(reader, json);
  513. case 'SparseToDenseOptions': return $root.circle.SparseToDenseOptions.decodeText(reader, json);
  514. case 'TileOptions': return $root.circle.TileOptions.decodeText(reader, json);
  515. case 'ExpandDimsOptions': return $root.circle.ExpandDimsOptions.decodeText(reader, json);
  516. case 'EqualOptions': return $root.circle.EqualOptions.decodeText(reader, json);
  517. case 'NotEqualOptions': return $root.circle.NotEqualOptions.decodeText(reader, json);
  518. case 'ShapeOptions': return $root.circle.ShapeOptions.decodeText(reader, json);
  519. case 'PowOptions': return $root.circle.PowOptions.decodeText(reader, json);
  520. case 'ArgMinOptions': return $root.circle.ArgMinOptions.decodeText(reader, json);
  521. case 'FakeQuantOptions': return $root.circle.FakeQuantOptions.decodeText(reader, json);
  522. case 'PackOptions': return $root.circle.PackOptions.decodeText(reader, json);
  523. case 'LogicalOrOptions': return $root.circle.LogicalOrOptions.decodeText(reader, json);
  524. case 'OneHotOptions': return $root.circle.OneHotOptions.decodeText(reader, json);
  525. case 'LogicalAndOptions': return $root.circle.LogicalAndOptions.decodeText(reader, json);
  526. case 'LogicalNotOptions': return $root.circle.LogicalNotOptions.decodeText(reader, json);
  527. case 'UnpackOptions': return $root.circle.UnpackOptions.decodeText(reader, json);
  528. case 'FloorDivOptions': return $root.circle.FloorDivOptions.decodeText(reader, json);
  529. case 'SquareOptions': return $root.circle.SquareOptions.decodeText(reader, json);
  530. case 'ZerosLikeOptions': return $root.circle.ZerosLikeOptions.decodeText(reader, json);
  531. case 'FillOptions': return $root.circle.FillOptions.decodeText(reader, json);
  532. case 'BidirectionalSequenceLSTMOptions': return $root.circle.BidirectionalSequenceLSTMOptions.decodeText(reader, json);
  533. case 'BidirectionalSequenceRNNOptions': return $root.circle.BidirectionalSequenceRNNOptions.decodeText(reader, json);
  534. case 'UnidirectionalSequenceLSTMOptions': return $root.circle.UnidirectionalSequenceLSTMOptions.decodeText(reader, json);
  535. case 'FloorModOptions': return $root.circle.FloorModOptions.decodeText(reader, json);
  536. case 'RangeOptions': return $root.circle.RangeOptions.decodeText(reader, json);
  537. case 'ResizeNearestNeighborOptions': return $root.circle.ResizeNearestNeighborOptions.decodeText(reader, json);
  538. case 'LeakyReluOptions': return $root.circle.LeakyReluOptions.decodeText(reader, json);
  539. case 'SquaredDifferenceOptions': return $root.circle.SquaredDifferenceOptions.decodeText(reader, json);
  540. case 'MirrorPadOptions': return $root.circle.MirrorPadOptions.decodeText(reader, json);
  541. case 'AbsOptions': return $root.circle.AbsOptions.decodeText(reader, json);
  542. case 'SplitVOptions': return $root.circle.SplitVOptions.decodeText(reader, json);
  543. case 'UniqueOptions': return $root.circle.UniqueOptions.decodeText(reader, json);
  544. case 'ReverseV2Options': return $root.circle.ReverseV2Options.decodeText(reader, json);
  545. case 'AddNOptions': return $root.circle.AddNOptions.decodeText(reader, json);
  546. case 'GatherNdOptions': return $root.circle.GatherNdOptions.decodeText(reader, json);
  547. case 'CosOptions': return $root.circle.CosOptions.decodeText(reader, json);
  548. case 'WhereOptions': return $root.circle.WhereOptions.decodeText(reader, json);
  549. case 'RankOptions': return $root.circle.RankOptions.decodeText(reader, json);
  550. case 'ReverseSequenceOptions': return $root.circle.ReverseSequenceOptions.decodeText(reader, json);
  551. case 'MatrixDiagOptions': return $root.circle.MatrixDiagOptions.decodeText(reader, json);
  552. case 'QuantizeOptions': return $root.circle.QuantizeOptions.decodeText(reader, json);
  553. case 'MatrixSetDiagOptions': return $root.circle.MatrixSetDiagOptions.decodeText(reader, json);
  554. case 'HardSwishOptions': return $root.circle.HardSwishOptions.decodeText(reader, json);
  555. case 'IfOptions': return $root.circle.IfOptions.decodeText(reader, json);
  556. case 'WhileOptions': return $root.circle.WhileOptions.decodeText(reader, json);
  557. case 'DepthToSpaceOptions': return $root.circle.DepthToSpaceOptions.decodeText(reader, json);
  558. case 'NonMaxSuppressionV4Options': return $root.circle.NonMaxSuppressionV4Options.decodeText(reader, json);
  559. case 'NonMaxSuppressionV5Options': return $root.circle.NonMaxSuppressionV5Options.decodeText(reader, json);
  560. case 'ScatterNdOptions': return $root.circle.ScatterNdOptions.decodeText(reader, json);
  561. case 'SelectV2Options': return $root.circle.SelectV2Options.decodeText(reader, json);
  562. case 'DensifyOptions': return $root.circle.DensifyOptions.decodeText(reader, json);
  563. case 'SegmentSumOptions': return $root.circle.SegmentSumOptions.decodeText(reader, json);
  564. case 'BatchMatMulOptions': return $root.circle.BatchMatMulOptions.decodeText(reader, json);
  565. case 'CumsumOptions': return $root.circle.CumsumOptions.decodeText(reader, json);
  566. case 'CallOnceOptions': return $root.circle.CallOnceOptions.decodeText(reader, json);
  567. case 'BroadcastToOptions': return $root.circle.BroadcastToOptions.decodeText(reader, json);
  568. case 'Rfft2dOptions': return $root.circle.Rfft2dOptions.decodeText(reader, json);
  569. case 'Conv3DOptions': return $root.circle.Conv3DOptions.decodeText(reader, json);
  570. case 'HashtableOptions': return $root.circle.HashtableOptions.decodeText(reader, json);
  571. case 'HashtableFindOptions': return $root.circle.HashtableFindOptions.decodeText(reader, json);
  572. case 'HashtableImportOptions': return $root.circle.HashtableImportOptions.decodeText(reader, json);
  573. case 'HashtableSizeOptions': return $root.circle.HashtableSizeOptions.decodeText(reader, json);
  574. case 'VarHandleOptions': return $root.circle.VarHandleOptions.decodeText(reader, json);
  575. case 'ReadVariableOptions': return $root.circle.ReadVariableOptions.decodeText(reader, json);
  576. case 'AssignVariableOptions': return $root.circle.AssignVariableOptions.decodeText(reader, json);
  577. case 'RandomOptions': return $root.circle.RandomOptions.decodeText(reader, json);
  578. case 'BCQGatherOptions': return $root.circle.BCQGatherOptions.decodeText(reader, json);
  579. case 'BCQFullyConnectedOptions': return $root.circle.BCQFullyConnectedOptions.decodeText(reader, json);
  580. case 'InstanceNormOptions': return $root.circle.InstanceNormOptions.decodeText(reader, json);
  581. default: return undefined;
  582. }
  583. }
  584. };
  585. $root.circle.Padding = {
  586. SAME: 0,
  587. VALID: 1
  588. };
  589. $root.circle.ActivationFunctionType = {
  590. NONE: 0,
  591. RELU: 1,
  592. RELU_N1_TO_1: 2,
  593. RELU6: 3,
  594. TANH: 4,
  595. SIGN_BIT: 5
  596. };
  597. $root.circle.Conv2DOptions = class Conv2DOptions {
  598. static decode(reader, position) {
  599. const $ = new $root.circle.Conv2DOptions();
  600. $.padding = reader.int8_(position, 4, 0);
  601. $.stride_w = reader.int32_(position, 6, 0);
  602. $.stride_h = reader.int32_(position, 8, 0);
  603. $.fused_activation_function = reader.int8_(position, 10, 0);
  604. $.dilation_w_factor = reader.int32_(position, 12, 1);
  605. $.dilation_h_factor = reader.int32_(position, 14, 1);
  606. return $;
  607. }
  608. static decodeText(reader, json) {
  609. const $ = new $root.circle.Conv2DOptions();
  610. $.padding = $root.circle.Padding[json.padding];
  611. $.stride_w = reader.value(json.stride_w, 0);
  612. $.stride_h = reader.value(json.stride_h, 0);
  613. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  614. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  615. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  616. return $;
  617. }
  618. };
  619. $root.circle.Conv3DOptions = class Conv3DOptions {
  620. static decode(reader, position) {
  621. const $ = new $root.circle.Conv3DOptions();
  622. $.padding = reader.int8_(position, 4, 0);
  623. $.stride_d = reader.int32_(position, 6, 0);
  624. $.stride_w = reader.int32_(position, 8, 0);
  625. $.stride_h = reader.int32_(position, 10, 0);
  626. $.fused_activation_function = reader.int8_(position, 12, 0);
  627. $.dilation_d_factor = reader.int32_(position, 14, 1);
  628. $.dilation_w_factor = reader.int32_(position, 16, 1);
  629. $.dilation_h_factor = reader.int32_(position, 18, 1);
  630. return $;
  631. }
  632. static decodeText(reader, json) {
  633. const $ = new $root.circle.Conv3DOptions();
  634. $.padding = $root.circle.Padding[json.padding];
  635. $.stride_d = reader.value(json.stride_d, 0);
  636. $.stride_w = reader.value(json.stride_w, 0);
  637. $.stride_h = reader.value(json.stride_h, 0);
  638. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  639. $.dilation_d_factor = reader.value(json.dilation_d_factor, 1);
  640. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  641. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  642. return $;
  643. }
  644. };
  645. $root.circle.Pool2DOptions = class Pool2DOptions {
  646. static decode(reader, position) {
  647. const $ = new $root.circle.Pool2DOptions();
  648. $.padding = reader.int8_(position, 4, 0);
  649. $.stride_w = reader.int32_(position, 6, 0);
  650. $.stride_h = reader.int32_(position, 8, 0);
  651. $.filter_width = reader.int32_(position, 10, 0);
  652. $.filter_height = reader.int32_(position, 12, 0);
  653. $.fused_activation_function = reader.int8_(position, 14, 0);
  654. return $;
  655. }
  656. static decodeText(reader, json) {
  657. const $ = new $root.circle.Pool2DOptions();
  658. $.padding = $root.circle.Padding[json.padding];
  659. $.stride_w = reader.value(json.stride_w, 0);
  660. $.stride_h = reader.value(json.stride_h, 0);
  661. $.filter_width = reader.value(json.filter_width, 0);
  662. $.filter_height = reader.value(json.filter_height, 0);
  663. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  664. return $;
  665. }
  666. };
  667. $root.circle.DepthwiseConv2DOptions = class DepthwiseConv2DOptions {
  668. static decode(reader, position) {
  669. const $ = new $root.circle.DepthwiseConv2DOptions();
  670. $.padding = reader.int8_(position, 4, 0);
  671. $.stride_w = reader.int32_(position, 6, 0);
  672. $.stride_h = reader.int32_(position, 8, 0);
  673. $.depth_multiplier = reader.int32_(position, 10, 0);
  674. $.fused_activation_function = reader.int8_(position, 12, 0);
  675. $.dilation_w_factor = reader.int32_(position, 14, 1);
  676. $.dilation_h_factor = reader.int32_(position, 16, 1);
  677. return $;
  678. }
  679. static decodeText(reader, json) {
  680. const $ = new $root.circle.DepthwiseConv2DOptions();
  681. $.padding = $root.circle.Padding[json.padding];
  682. $.stride_w = reader.value(json.stride_w, 0);
  683. $.stride_h = reader.value(json.stride_h, 0);
  684. $.depth_multiplier = reader.value(json.depth_multiplier, 0);
  685. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  686. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  687. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  688. return $;
  689. }
  690. };
  691. $root.circle.ConcatEmbeddingsOptions = class ConcatEmbeddingsOptions {
  692. static decode(reader, position) {
  693. const $ = new $root.circle.ConcatEmbeddingsOptions();
  694. $.num_channels = reader.int32_(position, 4, 0);
  695. $.num_columns_per_channel = reader.typedArray(position, 6, Int32Array);
  696. $.embedding_dim_per_channel = reader.typedArray(position, 8, Int32Array);
  697. return $;
  698. }
  699. static decodeText(reader, json) {
  700. const $ = new $root.circle.ConcatEmbeddingsOptions();
  701. $.num_channels = reader.value(json.num_channels, 0);
  702. $.num_columns_per_channel = reader.typedArray(json.num_columns_per_channel, Int32Array);
  703. $.embedding_dim_per_channel = reader.typedArray(json.embedding_dim_per_channel, Int32Array);
  704. return $;
  705. }
  706. };
  707. $root.circle.LSHProjectionType = {
  708. UNKNOWN: 0,
  709. SPARSE: 1,
  710. DENSE: 2
  711. };
  712. $root.circle.LSHProjectionOptions = class LSHProjectionOptions {
  713. static decode(reader, position) {
  714. const $ = new $root.circle.LSHProjectionOptions();
  715. $.type = reader.int8_(position, 4, 0);
  716. return $;
  717. }
  718. static decodeText(reader, json) {
  719. const $ = new $root.circle.LSHProjectionOptions();
  720. $.type = $root.circle.LSHProjectionType[json.type];
  721. return $;
  722. }
  723. };
  724. $root.circle.SVDFOptions = class SVDFOptions {
  725. static decode(reader, position) {
  726. const $ = new $root.circle.SVDFOptions();
  727. $.rank = reader.int32_(position, 4, 0);
  728. $.fused_activation_function = reader.int8_(position, 6, 0);
  729. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  730. return $;
  731. }
  732. static decodeText(reader, json) {
  733. const $ = new $root.circle.SVDFOptions();
  734. $.rank = reader.value(json.rank, 0);
  735. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  736. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  737. return $;
  738. }
  739. };
  740. $root.circle.RNNOptions = class RNNOptions {
  741. static decode(reader, position) {
  742. const $ = new $root.circle.RNNOptions();
  743. $.fused_activation_function = reader.int8_(position, 4, 0);
  744. $.asymmetric_quantize_inputs = reader.bool_(position, 6, false);
  745. return $;
  746. }
  747. static decodeText(reader, json) {
  748. const $ = new $root.circle.RNNOptions();
  749. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  750. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  751. return $;
  752. }
  753. };
  754. $root.circle.SequenceRNNOptions = class SequenceRNNOptions {
  755. static decode(reader, position) {
  756. const $ = new $root.circle.SequenceRNNOptions();
  757. $.time_major = reader.bool_(position, 4, false);
  758. $.fused_activation_function = reader.int8_(position, 6, 0);
  759. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  760. return $;
  761. }
  762. static decodeText(reader, json) {
  763. const $ = new $root.circle.SequenceRNNOptions();
  764. $.time_major = reader.value(json.time_major, false);
  765. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  766. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  767. return $;
  768. }
  769. };
  770. $root.circle.BidirectionalSequenceRNNOptions = class BidirectionalSequenceRNNOptions {
  771. static decode(reader, position) {
  772. const $ = new $root.circle.BidirectionalSequenceRNNOptions();
  773. $.time_major = reader.bool_(position, 4, false);
  774. $.fused_activation_function = reader.int8_(position, 6, 0);
  775. $.merge_outputs = reader.bool_(position, 8, false);
  776. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  777. return $;
  778. }
  779. static decodeText(reader, json) {
  780. const $ = new $root.circle.BidirectionalSequenceRNNOptions();
  781. $.time_major = reader.value(json.time_major, false);
  782. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  783. $.merge_outputs = reader.value(json.merge_outputs, false);
  784. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  785. return $;
  786. }
  787. };
  788. $root.circle.FullyConnectedOptionsWeightsFormat = {
  789. DEFAULT: 0,
  790. SHUFFLED4x16INT8: 1,
  791. SHUFFLED16x1FLOAT32: 127
  792. };
  793. $root.circle.FullyConnectedOptions = class FullyConnectedOptions {
  794. static decode(reader, position) {
  795. const $ = new $root.circle.FullyConnectedOptions();
  796. $.fused_activation_function = reader.int8_(position, 4, 0);
  797. $.weights_format = reader.int8_(position, 6, 0);
  798. $.keep_num_dims = reader.bool_(position, 8, false);
  799. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  800. return $;
  801. }
  802. static decodeText(reader, json) {
  803. const $ = new $root.circle.FullyConnectedOptions();
  804. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  805. $.weights_format = $root.circle.FullyConnectedOptionsWeightsFormat[json.weights_format];
  806. $.keep_num_dims = reader.value(json.keep_num_dims, false);
  807. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  808. return $;
  809. }
  810. };
  811. $root.circle.SoftmaxOptions = class SoftmaxOptions {
  812. static decode(reader, position) {
  813. const $ = new $root.circle.SoftmaxOptions();
  814. $.beta = reader.float32_(position, 4, 0);
  815. return $;
  816. }
  817. static decodeText(reader, json) {
  818. const $ = new $root.circle.SoftmaxOptions();
  819. $.beta = reader.value(json.beta, 0);
  820. return $;
  821. }
  822. };
  823. $root.circle.ConcatenationOptions = class ConcatenationOptions {
  824. static decode(reader, position) {
  825. const $ = new $root.circle.ConcatenationOptions();
  826. $.axis = reader.int32_(position, 4, 0);
  827. $.fused_activation_function = reader.int8_(position, 6, 0);
  828. return $;
  829. }
  830. static decodeText(reader, json) {
  831. const $ = new $root.circle.ConcatenationOptions();
  832. $.axis = reader.value(json.axis, 0);
  833. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  834. return $;
  835. }
  836. };
  837. $root.circle.AddOptions = class AddOptions {
  838. static decode(reader, position) {
  839. const $ = new $root.circle.AddOptions();
  840. $.fused_activation_function = reader.int8_(position, 4, 0);
  841. $.pot_scale_int16 = reader.bool_(position, 6, true);
  842. return $;
  843. }
  844. static decodeText(reader, json) {
  845. const $ = new $root.circle.AddOptions();
  846. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  847. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  848. return $;
  849. }
  850. };
  851. $root.circle.MulOptions = class MulOptions {
  852. static decode(reader, position) {
  853. const $ = new $root.circle.MulOptions();
  854. $.fused_activation_function = reader.int8_(position, 4, 0);
  855. return $;
  856. }
  857. static decodeText(reader, json) {
  858. const $ = new $root.circle.MulOptions();
  859. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  860. return $;
  861. }
  862. };
  863. $root.circle.L2NormOptions = class L2NormOptions {
  864. static decode(reader, position) {
  865. const $ = new $root.circle.L2NormOptions();
  866. $.fused_activation_function = reader.int8_(position, 4, 0);
  867. return $;
  868. }
  869. static decodeText(reader, json) {
  870. const $ = new $root.circle.L2NormOptions();
  871. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  872. return $;
  873. }
  874. };
  875. $root.circle.LocalResponseNormalizationOptions = class LocalResponseNormalizationOptions {
  876. static decode(reader, position) {
  877. const $ = new $root.circle.LocalResponseNormalizationOptions();
  878. $.radius = reader.int32_(position, 4, 0);
  879. $.bias = reader.float32_(position, 6, 0);
  880. $.alpha = reader.float32_(position, 8, 0);
  881. $.beta = reader.float32_(position, 10, 0);
  882. return $;
  883. }
  884. static decodeText(reader, json) {
  885. const $ = new $root.circle.LocalResponseNormalizationOptions();
  886. $.radius = reader.value(json.radius, 0);
  887. $.bias = reader.value(json.bias, 0);
  888. $.alpha = reader.value(json.alpha, 0);
  889. $.beta = reader.value(json.beta, 0);
  890. return $;
  891. }
  892. };
  893. $root.circle.LSTMKernelType = {
  894. FULL: 0,
  895. BASIC: 1
  896. };
  897. $root.circle.LSTMOptions = class LSTMOptions {
  898. static decode(reader, position) {
  899. const $ = new $root.circle.LSTMOptions();
  900. $.fused_activation_function = reader.int8_(position, 4, 0);
  901. $.cell_clip = reader.float32_(position, 6, 0);
  902. $.proj_clip = reader.float32_(position, 8, 0);
  903. $.kernel_type = reader.int8_(position, 10, 0);
  904. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  905. return $;
  906. }
  907. static decodeText(reader, json) {
  908. const $ = new $root.circle.LSTMOptions();
  909. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  910. $.cell_clip = reader.value(json.cell_clip, 0);
  911. $.proj_clip = reader.value(json.proj_clip, 0);
  912. $.kernel_type = $root.circle.LSTMKernelType[json.kernel_type];
  913. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  914. return $;
  915. }
  916. };
  917. $root.circle.UnidirectionalSequenceLSTMOptions = class UnidirectionalSequenceLSTMOptions {
  918. static decode(reader, position) {
  919. const $ = new $root.circle.UnidirectionalSequenceLSTMOptions();
  920. $.fused_activation_function = reader.int8_(position, 4, 0);
  921. $.cell_clip = reader.float32_(position, 6, 0);
  922. $.proj_clip = reader.float32_(position, 8, 0);
  923. $.time_major = reader.bool_(position, 10, false);
  924. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  925. return $;
  926. }
  927. static decodeText(reader, json) {
  928. const $ = new $root.circle.UnidirectionalSequenceLSTMOptions();
  929. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  930. $.cell_clip = reader.value(json.cell_clip, 0);
  931. $.proj_clip = reader.value(json.proj_clip, 0);
  932. $.time_major = reader.value(json.time_major, false);
  933. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  934. return $;
  935. }
  936. };
  937. $root.circle.BidirectionalSequenceLSTMOptions = class BidirectionalSequenceLSTMOptions {
  938. static decode(reader, position) {
  939. const $ = new $root.circle.BidirectionalSequenceLSTMOptions();
  940. $.fused_activation_function = reader.int8_(position, 4, 0);
  941. $.cell_clip = reader.float32_(position, 6, 0);
  942. $.proj_clip = reader.float32_(position, 8, 0);
  943. $.merge_outputs = reader.bool_(position, 10, false);
  944. $.time_major = reader.bool_(position, 12, true);
  945. $.asymmetric_quantize_inputs = reader.bool_(position, 14, false);
  946. return $;
  947. }
  948. static decodeText(reader, json) {
  949. const $ = new $root.circle.BidirectionalSequenceLSTMOptions();
  950. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  951. $.cell_clip = reader.value(json.cell_clip, 0);
  952. $.proj_clip = reader.value(json.proj_clip, 0);
  953. $.merge_outputs = reader.value(json.merge_outputs, false);
  954. $.time_major = reader.value(json.time_major, true);
  955. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  956. return $;
  957. }
  958. };
  959. $root.circle.ResizeBilinearOptions = class ResizeBilinearOptions {
  960. static decode(reader, position) {
  961. const $ = new $root.circle.ResizeBilinearOptions();
  962. $.new_height = reader.int32_(position, 4, 0);
  963. $.new_width = reader.int32_(position, 6, 0);
  964. $.align_corners = reader.bool_(position, 8, false);
  965. $.half_pixel_centers = reader.bool_(position, 10, false);
  966. return $;
  967. }
  968. static decodeText(reader, json) {
  969. const $ = new $root.circle.ResizeBilinearOptions();
  970. $.new_height = reader.value(json.new_height, 0);
  971. $.new_width = reader.value(json.new_width, 0);
  972. $.align_corners = reader.value(json.align_corners, false);
  973. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  974. return $;
  975. }
  976. };
  977. $root.circle.ResizeNearestNeighborOptions = class ResizeNearestNeighborOptions {
  978. static decode(reader, position) {
  979. const $ = new $root.circle.ResizeNearestNeighborOptions();
  980. $.align_corners = reader.bool_(position, 4, false);
  981. $.half_pixel_centers = reader.bool_(position, 6, false);
  982. return $;
  983. }
  984. static decodeText(reader, json) {
  985. const $ = new $root.circle.ResizeNearestNeighborOptions();
  986. $.align_corners = reader.value(json.align_corners, false);
  987. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  988. return $;
  989. }
  990. };
  991. $root.circle.CallOptions = class CallOptions {
  992. static decode(reader, position) {
  993. const $ = new $root.circle.CallOptions();
  994. $.subgraph = reader.uint32_(position, 4, 0);
  995. return $;
  996. }
  997. static decodeText(reader, json) {
  998. const $ = new $root.circle.CallOptions();
  999. $.subgraph = reader.value(json.subgraph, 0);
  1000. return $;
  1001. }
  1002. };
  1003. $root.circle.PadOptions = class PadOptions {
  1004. static decode(/* reader, position */) {
  1005. const $ = new $root.circle.PadOptions();
  1006. return $;
  1007. }
  1008. static decodeText(/* reader, json */) {
  1009. const $ = new $root.circle.PadOptions();
  1010. return $;
  1011. }
  1012. };
  1013. $root.circle.PadV2Options = class PadV2Options {
  1014. static decode(/* reader, position */) {
  1015. const $ = new $root.circle.PadV2Options();
  1016. return $;
  1017. }
  1018. static decodeText(/* reader, json */) {
  1019. const $ = new $root.circle.PadV2Options();
  1020. return $;
  1021. }
  1022. };
  1023. $root.circle.ReshapeOptions = class ReshapeOptions {
  1024. static decode(reader, position) {
  1025. const $ = new $root.circle.ReshapeOptions();
  1026. $.new_shape = reader.typedArray(position, 4, Int32Array);
  1027. return $;
  1028. }
  1029. static decodeText(reader, json) {
  1030. const $ = new $root.circle.ReshapeOptions();
  1031. $.new_shape = reader.typedArray(json.new_shape, Int32Array);
  1032. return $;
  1033. }
  1034. };
  1035. $root.circle.SpaceToBatchNDOptions = class SpaceToBatchNDOptions {
  1036. static decode(/* reader, position */) {
  1037. const $ = new $root.circle.SpaceToBatchNDOptions();
  1038. return $;
  1039. }
  1040. static decodeText(/* reader, json */) {
  1041. const $ = new $root.circle.SpaceToBatchNDOptions();
  1042. return $;
  1043. }
  1044. };
  1045. $root.circle.BatchToSpaceNDOptions = class BatchToSpaceNDOptions {
  1046. static decode(/* reader, position */) {
  1047. const $ = new $root.circle.BatchToSpaceNDOptions();
  1048. return $;
  1049. }
  1050. static decodeText(/* reader, json */) {
  1051. const $ = new $root.circle.BatchToSpaceNDOptions();
  1052. return $;
  1053. }
  1054. };
  1055. $root.circle.SkipGramOptions = class SkipGramOptions {
  1056. static decode(reader, position) {
  1057. const $ = new $root.circle.SkipGramOptions();
  1058. $.ngram_size = reader.int32_(position, 4, 0);
  1059. $.max_skip_size = reader.int32_(position, 6, 0);
  1060. $.include_all_ngrams = reader.bool_(position, 8, false);
  1061. return $;
  1062. }
  1063. static decodeText(reader, json) {
  1064. const $ = new $root.circle.SkipGramOptions();
  1065. $.ngram_size = reader.value(json.ngram_size, 0);
  1066. $.max_skip_size = reader.value(json.max_skip_size, 0);
  1067. $.include_all_ngrams = reader.value(json.include_all_ngrams, false);
  1068. return $;
  1069. }
  1070. };
  1071. $root.circle.SpaceToDepthOptions = class SpaceToDepthOptions {
  1072. static decode(reader, position) {
  1073. const $ = new $root.circle.SpaceToDepthOptions();
  1074. $.block_size = reader.int32_(position, 4, 0);
  1075. return $;
  1076. }
  1077. static decodeText(reader, json) {
  1078. const $ = new $root.circle.SpaceToDepthOptions();
  1079. $.block_size = reader.value(json.block_size, 0);
  1080. return $;
  1081. }
  1082. };
  1083. $root.circle.DepthToSpaceOptions = class DepthToSpaceOptions {
  1084. static decode(reader, position) {
  1085. const $ = new $root.circle.DepthToSpaceOptions();
  1086. $.block_size = reader.int32_(position, 4, 0);
  1087. return $;
  1088. }
  1089. static decodeText(reader, json) {
  1090. const $ = new $root.circle.DepthToSpaceOptions();
  1091. $.block_size = reader.value(json.block_size, 0);
  1092. return $;
  1093. }
  1094. };
  1095. $root.circle.SubOptions = class SubOptions {
  1096. static decode(reader, position) {
  1097. const $ = new $root.circle.SubOptions();
  1098. $.fused_activation_function = reader.int8_(position, 4, 0);
  1099. $.pot_scale_int16 = reader.bool_(position, 6, true);
  1100. return $;
  1101. }
  1102. static decodeText(reader, json) {
  1103. const $ = new $root.circle.SubOptions();
  1104. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  1105. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  1106. return $;
  1107. }
  1108. };
  1109. $root.circle.DivOptions = class DivOptions {
  1110. static decode(reader, position) {
  1111. const $ = new $root.circle.DivOptions();
  1112. $.fused_activation_function = reader.int8_(position, 4, 0);
  1113. return $;
  1114. }
  1115. static decodeText(reader, json) {
  1116. const $ = new $root.circle.DivOptions();
  1117. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  1118. return $;
  1119. }
  1120. };
  1121. $root.circle.TopKV2Options = class TopKV2Options {
  1122. static decode(/* reader, position */) {
  1123. const $ = new $root.circle.TopKV2Options();
  1124. return $;
  1125. }
  1126. static decodeText(/* reader, json */) {
  1127. const $ = new $root.circle.TopKV2Options();
  1128. return $;
  1129. }
  1130. };
  1131. $root.circle.CombinerType = {
  1132. SUM: 0,
  1133. MEAN: 1,
  1134. SQRTN: 2
  1135. };
  1136. $root.circle.EmbeddingLookupSparseOptions = class EmbeddingLookupSparseOptions {
  1137. static decode(reader, position) {
  1138. const $ = new $root.circle.EmbeddingLookupSparseOptions();
  1139. $.combiner = reader.int8_(position, 4, 0);
  1140. return $;
  1141. }
  1142. static decodeText(reader, json) {
  1143. const $ = new $root.circle.EmbeddingLookupSparseOptions();
  1144. $.combiner = $root.circle.CombinerType[json.combiner];
  1145. return $;
  1146. }
  1147. };
  1148. $root.circle.GatherOptions = class GatherOptions {
  1149. static decode(reader, position) {
  1150. const $ = new $root.circle.GatherOptions();
  1151. $.axis = reader.int32_(position, 4, 0);
  1152. $.batch_dims = reader.int32_(position, 6, 0);
  1153. return $;
  1154. }
  1155. static decodeText(reader, json) {
  1156. const $ = new $root.circle.GatherOptions();
  1157. $.axis = reader.value(json.axis, 0);
  1158. $.batch_dims = reader.value(json.batch_dims, 0);
  1159. return $;
  1160. }
  1161. };
  1162. $root.circle.TransposeOptions = class TransposeOptions {
  1163. static decode(/* reader, position */) {
  1164. const $ = new $root.circle.TransposeOptions();
  1165. return $;
  1166. }
  1167. static decodeText(/* reader, json */) {
  1168. const $ = new $root.circle.TransposeOptions();
  1169. return $;
  1170. }
  1171. };
  1172. $root.circle.ExpOptions = class ExpOptions {
  1173. static decode(/* reader, position */) {
  1174. const $ = new $root.circle.ExpOptions();
  1175. return $;
  1176. }
  1177. static decodeText(/* reader, json */) {
  1178. const $ = new $root.circle.ExpOptions();
  1179. return $;
  1180. }
  1181. };
  1182. $root.circle.CosOptions = class CosOptions {
  1183. static decode(/* reader, position */) {
  1184. const $ = new $root.circle.CosOptions();
  1185. return $;
  1186. }
  1187. static decodeText(/* reader, json */) {
  1188. const $ = new $root.circle.CosOptions();
  1189. return $;
  1190. }
  1191. };
  1192. $root.circle.ReducerOptions = class ReducerOptions {
  1193. static decode(reader, position) {
  1194. const $ = new $root.circle.ReducerOptions();
  1195. $.keep_dims = reader.bool_(position, 4, false);
  1196. return $;
  1197. }
  1198. static decodeText(reader, json) {
  1199. const $ = new $root.circle.ReducerOptions();
  1200. $.keep_dims = reader.value(json.keep_dims, false);
  1201. return $;
  1202. }
  1203. };
  1204. $root.circle.SqueezeOptions = class SqueezeOptions {
  1205. static decode(reader, position) {
  1206. const $ = new $root.circle.SqueezeOptions();
  1207. $.squeeze_dims = reader.typedArray(position, 4, Int32Array);
  1208. return $;
  1209. }
  1210. static decodeText(reader, json) {
  1211. const $ = new $root.circle.SqueezeOptions();
  1212. $.squeeze_dims = reader.typedArray(json.squeeze_dims, Int32Array);
  1213. return $;
  1214. }
  1215. };
  1216. $root.circle.SplitOptions = class SplitOptions {
  1217. static decode(reader, position) {
  1218. const $ = new $root.circle.SplitOptions();
  1219. $.num_splits = reader.int32_(position, 4, 0);
  1220. return $;
  1221. }
  1222. static decodeText(reader, json) {
  1223. const $ = new $root.circle.SplitOptions();
  1224. $.num_splits = reader.value(json.num_splits, 0);
  1225. return $;
  1226. }
  1227. };
  1228. $root.circle.SplitVOptions = class SplitVOptions {
  1229. static decode(reader, position) {
  1230. const $ = new $root.circle.SplitVOptions();
  1231. $.num_splits = reader.int32_(position, 4, 0);
  1232. return $;
  1233. }
  1234. static decodeText(reader, json) {
  1235. const $ = new $root.circle.SplitVOptions();
  1236. $.num_splits = reader.value(json.num_splits, 0);
  1237. return $;
  1238. }
  1239. };
  1240. $root.circle.StridedSliceOptions = class StridedSliceOptions {
  1241. static decode(reader, position) {
  1242. const $ = new $root.circle.StridedSliceOptions();
  1243. $.begin_mask = reader.int32_(position, 4, 0);
  1244. $.end_mask = reader.int32_(position, 6, 0);
  1245. $.ellipsis_mask = reader.int32_(position, 8, 0);
  1246. $.new_axis_mask = reader.int32_(position, 10, 0);
  1247. $.shrink_axis_mask = reader.int32_(position, 12, 0);
  1248. return $;
  1249. }
  1250. static decodeText(reader, json) {
  1251. const $ = new $root.circle.StridedSliceOptions();
  1252. $.begin_mask = reader.value(json.begin_mask, 0);
  1253. $.end_mask = reader.value(json.end_mask, 0);
  1254. $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
  1255. $.new_axis_mask = reader.value(json.new_axis_mask, 0);
  1256. $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
  1257. return $;
  1258. }
  1259. };
  1260. $root.circle.LogSoftmaxOptions = class LogSoftmaxOptions {
  1261. static decode(/* reader, position */) {
  1262. const $ = new $root.circle.LogSoftmaxOptions();
  1263. return $;
  1264. }
  1265. static decodeText(/* reader, json */) {
  1266. const $ = new $root.circle.LogSoftmaxOptions();
  1267. return $;
  1268. }
  1269. };
  1270. $root.circle.CastOptions = class CastOptions {
  1271. static decode(reader, position) {
  1272. const $ = new $root.circle.CastOptions();
  1273. $.in_data_type = reader.int8_(position, 4, 0);
  1274. $.out_data_type = reader.int8_(position, 6, 0);
  1275. return $;
  1276. }
  1277. static decodeText(reader, json) {
  1278. const $ = new $root.circle.CastOptions();
  1279. $.in_data_type = $root.circle.TensorType[json.in_data_type];
  1280. $.out_data_type = $root.circle.TensorType[json.out_data_type];
  1281. return $;
  1282. }
  1283. };
  1284. $root.circle.DequantizeOptions = class DequantizeOptions {
  1285. static decode(/* reader, position */) {
  1286. const $ = new $root.circle.DequantizeOptions();
  1287. return $;
  1288. }
  1289. static decodeText(/* reader, json */) {
  1290. const $ = new $root.circle.DequantizeOptions();
  1291. return $;
  1292. }
  1293. };
  1294. $root.circle.MaximumMinimumOptions = class MaximumMinimumOptions {
  1295. static decode(/* reader, position */) {
  1296. const $ = new $root.circle.MaximumMinimumOptions();
  1297. return $;
  1298. }
  1299. static decodeText(/* reader, json */) {
  1300. const $ = new $root.circle.MaximumMinimumOptions();
  1301. return $;
  1302. }
  1303. };
  1304. $root.circle.TileOptions = class TileOptions {
  1305. static decode(/* reader, position */) {
  1306. const $ = new $root.circle.TileOptions();
  1307. return $;
  1308. }
  1309. static decodeText(/* reader, json */) {
  1310. const $ = new $root.circle.TileOptions();
  1311. return $;
  1312. }
  1313. };
  1314. $root.circle.ArgMaxOptions = class ArgMaxOptions {
  1315. static decode(reader, position) {
  1316. const $ = new $root.circle.ArgMaxOptions();
  1317. $.output_type = reader.int8_(position, 4, 0);
  1318. return $;
  1319. }
  1320. static decodeText(reader, json) {
  1321. const $ = new $root.circle.ArgMaxOptions();
  1322. $.output_type = $root.circle.TensorType[json.output_type];
  1323. return $;
  1324. }
  1325. };
  1326. $root.circle.ArgMinOptions = class ArgMinOptions {
  1327. static decode(reader, position) {
  1328. const $ = new $root.circle.ArgMinOptions();
  1329. $.output_type = reader.int8_(position, 4, 0);
  1330. return $;
  1331. }
  1332. static decodeText(reader, json) {
  1333. const $ = new $root.circle.ArgMinOptions();
  1334. $.output_type = $root.circle.TensorType[json.output_type];
  1335. return $;
  1336. }
  1337. };
  1338. $root.circle.GreaterOptions = class GreaterOptions {
  1339. static decode(/* reader, position */) {
  1340. const $ = new $root.circle.GreaterOptions();
  1341. return $;
  1342. }
  1343. static decodeText(/* reader, json */) {
  1344. const $ = new $root.circle.GreaterOptions();
  1345. return $;
  1346. }
  1347. };
  1348. $root.circle.GreaterEqualOptions = class GreaterEqualOptions {
  1349. static decode(/* reader, position */) {
  1350. const $ = new $root.circle.GreaterEqualOptions();
  1351. return $;
  1352. }
  1353. static decodeText(/* reader, json */) {
  1354. const $ = new $root.circle.GreaterEqualOptions();
  1355. return $;
  1356. }
  1357. };
  1358. $root.circle.LessOptions = class LessOptions {
  1359. static decode(/* reader, position */) {
  1360. const $ = new $root.circle.LessOptions();
  1361. return $;
  1362. }
  1363. static decodeText(/* reader, json */) {
  1364. const $ = new $root.circle.LessOptions();
  1365. return $;
  1366. }
  1367. };
  1368. $root.circle.LessEqualOptions = class LessEqualOptions {
  1369. static decode(/* reader, position */) {
  1370. const $ = new $root.circle.LessEqualOptions();
  1371. return $;
  1372. }
  1373. static decodeText(/* reader, json */) {
  1374. const $ = new $root.circle.LessEqualOptions();
  1375. return $;
  1376. }
  1377. };
  1378. $root.circle.NegOptions = class NegOptions {
  1379. static decode(/* reader, position */) {
  1380. const $ = new $root.circle.NegOptions();
  1381. return $;
  1382. }
  1383. static decodeText(/* reader, json */) {
  1384. const $ = new $root.circle.NegOptions();
  1385. return $;
  1386. }
  1387. };
  1388. $root.circle.SelectOptions = class SelectOptions {
  1389. static decode(/* reader, position */) {
  1390. const $ = new $root.circle.SelectOptions();
  1391. return $;
  1392. }
  1393. static decodeText(/* reader, json */) {
  1394. const $ = new $root.circle.SelectOptions();
  1395. return $;
  1396. }
  1397. };
  1398. $root.circle.SliceOptions = class SliceOptions {
  1399. static decode(/* reader, position */) {
  1400. const $ = new $root.circle.SliceOptions();
  1401. return $;
  1402. }
  1403. static decodeText(/* reader, json */) {
  1404. const $ = new $root.circle.SliceOptions();
  1405. return $;
  1406. }
  1407. };
  1408. $root.circle.TransposeConvOptions = class TransposeConvOptions {
  1409. static decode(reader, position) {
  1410. const $ = new $root.circle.TransposeConvOptions();
  1411. $.padding = reader.int8_(position, 4, 0);
  1412. $.stride_w = reader.int32_(position, 6, 0);
  1413. $.stride_h = reader.int32_(position, 8, 0);
  1414. return $;
  1415. }
  1416. static decodeText(reader, json) {
  1417. const $ = new $root.circle.TransposeConvOptions();
  1418. $.padding = $root.circle.Padding[json.padding];
  1419. $.stride_w = reader.value(json.stride_w, 0);
  1420. $.stride_h = reader.value(json.stride_h, 0);
  1421. return $;
  1422. }
  1423. };
  1424. $root.circle.ExpandDimsOptions = class ExpandDimsOptions {
  1425. static decode(/* reader, position */) {
  1426. const $ = new $root.circle.ExpandDimsOptions();
  1427. return $;
  1428. }
  1429. static decodeText(/* reader, json */) {
  1430. const $ = new $root.circle.ExpandDimsOptions();
  1431. return $;
  1432. }
  1433. };
  1434. $root.circle.SparseToDenseOptions = class SparseToDenseOptions {
  1435. static decode(reader, position) {
  1436. const $ = new $root.circle.SparseToDenseOptions();
  1437. $.validate_indices = reader.bool_(position, 4, false);
  1438. return $;
  1439. }
  1440. static decodeText(reader, json) {
  1441. const $ = new $root.circle.SparseToDenseOptions();
  1442. $.validate_indices = reader.value(json.validate_indices, false);
  1443. return $;
  1444. }
  1445. };
  1446. $root.circle.EqualOptions = class EqualOptions {
  1447. static decode(/* reader, position */) {
  1448. const $ = new $root.circle.EqualOptions();
  1449. return $;
  1450. }
  1451. static decodeText(/* reader, json */) {
  1452. const $ = new $root.circle.EqualOptions();
  1453. return $;
  1454. }
  1455. };
  1456. $root.circle.NotEqualOptions = class NotEqualOptions {
  1457. static decode(/* reader, position */) {
  1458. const $ = new $root.circle.NotEqualOptions();
  1459. return $;
  1460. }
  1461. static decodeText(/* reader, json */) {
  1462. const $ = new $root.circle.NotEqualOptions();
  1463. return $;
  1464. }
  1465. };
  1466. $root.circle.ShapeOptions = class ShapeOptions {
  1467. static decode(reader, position) {
  1468. const $ = new $root.circle.ShapeOptions();
  1469. $.out_type = reader.int8_(position, 4, 0);
  1470. return $;
  1471. }
  1472. static decodeText(reader, json) {
  1473. const $ = new $root.circle.ShapeOptions();
  1474. $.out_type = $root.circle.TensorType[json.out_type];
  1475. return $;
  1476. }
  1477. };
  1478. $root.circle.RankOptions = class RankOptions {
  1479. static decode(/* reader, position */) {
  1480. const $ = new $root.circle.RankOptions();
  1481. return $;
  1482. }
  1483. static decodeText(/* reader, json */) {
  1484. const $ = new $root.circle.RankOptions();
  1485. return $;
  1486. }
  1487. };
  1488. $root.circle.PowOptions = class PowOptions {
  1489. static decode(/* reader, position */) {
  1490. const $ = new $root.circle.PowOptions();
  1491. return $;
  1492. }
  1493. static decodeText(/* reader, json */) {
  1494. const $ = new $root.circle.PowOptions();
  1495. return $;
  1496. }
  1497. };
  1498. $root.circle.FakeQuantOptions = class FakeQuantOptions {
  1499. static decode(reader, position) {
  1500. const $ = new $root.circle.FakeQuantOptions();
  1501. $.min = reader.float32_(position, 4, 0);
  1502. $.max = reader.float32_(position, 6, 0);
  1503. $.num_bits = reader.int32_(position, 8, 0);
  1504. $.narrow_range = reader.bool_(position, 10, false);
  1505. return $;
  1506. }
  1507. static decodeText(reader, json) {
  1508. const $ = new $root.circle.FakeQuantOptions();
  1509. $.min = reader.value(json.min, 0);
  1510. $.max = reader.value(json.max, 0);
  1511. $.num_bits = reader.value(json.num_bits, 0);
  1512. $.narrow_range = reader.value(json.narrow_range, false);
  1513. return $;
  1514. }
  1515. };
  1516. $root.circle.PackOptions = class PackOptions {
  1517. static decode(reader, position) {
  1518. const $ = new $root.circle.PackOptions();
  1519. $.values_count = reader.int32_(position, 4, 0);
  1520. $.axis = reader.int32_(position, 6, 0);
  1521. return $;
  1522. }
  1523. static decodeText(reader, json) {
  1524. const $ = new $root.circle.PackOptions();
  1525. $.values_count = reader.value(json.values_count, 0);
  1526. $.axis = reader.value(json.axis, 0);
  1527. return $;
  1528. }
  1529. };
  1530. $root.circle.LogicalOrOptions = class LogicalOrOptions {
  1531. static decode(/* reader, position */) {
  1532. const $ = new $root.circle.LogicalOrOptions();
  1533. return $;
  1534. }
  1535. static decodeText(/* reader, json */) {
  1536. const $ = new $root.circle.LogicalOrOptions();
  1537. return $;
  1538. }
  1539. };
  1540. $root.circle.OneHotOptions = class OneHotOptions {
  1541. static decode(reader, position) {
  1542. const $ = new $root.circle.OneHotOptions();
  1543. $.axis = reader.int32_(position, 4, 0);
  1544. return $;
  1545. }
  1546. static decodeText(reader, json) {
  1547. const $ = new $root.circle.OneHotOptions();
  1548. $.axis = reader.value(json.axis, 0);
  1549. return $;
  1550. }
  1551. };
  1552. $root.circle.AbsOptions = class AbsOptions {
  1553. static decode(/* reader, position */) {
  1554. const $ = new $root.circle.AbsOptions();
  1555. return $;
  1556. }
  1557. static decodeText(/* reader, json */) {
  1558. const $ = new $root.circle.AbsOptions();
  1559. return $;
  1560. }
  1561. };
  1562. $root.circle.HardSwishOptions = class HardSwishOptions {
  1563. static decode(/* reader, position */) {
  1564. const $ = new $root.circle.HardSwishOptions();
  1565. return $;
  1566. }
  1567. static decodeText(/* reader, json */) {
  1568. const $ = new $root.circle.HardSwishOptions();
  1569. return $;
  1570. }
  1571. };
  1572. $root.circle.LogicalAndOptions = class LogicalAndOptions {
  1573. static decode(/* reader, position */) {
  1574. const $ = new $root.circle.LogicalAndOptions();
  1575. return $;
  1576. }
  1577. static decodeText(/* reader, json */) {
  1578. const $ = new $root.circle.LogicalAndOptions();
  1579. return $;
  1580. }
  1581. };
  1582. $root.circle.LogicalNotOptions = class LogicalNotOptions {
  1583. static decode(/* reader, position */) {
  1584. const $ = new $root.circle.LogicalNotOptions();
  1585. return $;
  1586. }
  1587. static decodeText(/* reader, json */) {
  1588. const $ = new $root.circle.LogicalNotOptions();
  1589. return $;
  1590. }
  1591. };
  1592. $root.circle.UnpackOptions = class UnpackOptions {
  1593. static decode(reader, position) {
  1594. const $ = new $root.circle.UnpackOptions();
  1595. $.num = reader.int32_(position, 4, 0);
  1596. $.axis = reader.int32_(position, 6, 0);
  1597. return $;
  1598. }
  1599. static decodeText(reader, json) {
  1600. const $ = new $root.circle.UnpackOptions();
  1601. $.num = reader.value(json.num, 0);
  1602. $.axis = reader.value(json.axis, 0);
  1603. return $;
  1604. }
  1605. };
  1606. $root.circle.FloorDivOptions = class FloorDivOptions {
  1607. static decode(/* reader, position */) {
  1608. const $ = new $root.circle.FloorDivOptions();
  1609. return $;
  1610. }
  1611. static decodeText(/* reader, json */) {
  1612. const $ = new $root.circle.FloorDivOptions();
  1613. return $;
  1614. }
  1615. };
  1616. $root.circle.SquareOptions = class SquareOptions {
  1617. static decode(/* reader, position */) {
  1618. const $ = new $root.circle.SquareOptions();
  1619. return $;
  1620. }
  1621. static decodeText(/* reader, json */) {
  1622. const $ = new $root.circle.SquareOptions();
  1623. return $;
  1624. }
  1625. };
  1626. $root.circle.ZerosLikeOptions = class ZerosLikeOptions {
  1627. static decode(/* reader, position */) {
  1628. const $ = new $root.circle.ZerosLikeOptions();
  1629. return $;
  1630. }
  1631. static decodeText(/* reader, json */) {
  1632. const $ = new $root.circle.ZerosLikeOptions();
  1633. return $;
  1634. }
  1635. };
  1636. $root.circle.FillOptions = class FillOptions {
  1637. static decode(/* reader, position */) {
  1638. const $ = new $root.circle.FillOptions();
  1639. return $;
  1640. }
  1641. static decodeText(/* reader, json */) {
  1642. const $ = new $root.circle.FillOptions();
  1643. return $;
  1644. }
  1645. };
  1646. $root.circle.FloorModOptions = class FloorModOptions {
  1647. static decode(/* reader, position */) {
  1648. const $ = new $root.circle.FloorModOptions();
  1649. return $;
  1650. }
  1651. static decodeText(/* reader, json */) {
  1652. const $ = new $root.circle.FloorModOptions();
  1653. return $;
  1654. }
  1655. };
  1656. $root.circle.RangeOptions = class RangeOptions {
  1657. static decode(/* reader, position */) {
  1658. const $ = new $root.circle.RangeOptions();
  1659. return $;
  1660. }
  1661. static decodeText(/* reader, json */) {
  1662. const $ = new $root.circle.RangeOptions();
  1663. return $;
  1664. }
  1665. };
  1666. $root.circle.LeakyReluOptions = class LeakyReluOptions {
  1667. static decode(reader, position) {
  1668. const $ = new $root.circle.LeakyReluOptions();
  1669. $.alpha = reader.float32_(position, 4, 0);
  1670. return $;
  1671. }
  1672. static decodeText(reader, json) {
  1673. const $ = new $root.circle.LeakyReluOptions();
  1674. $.alpha = reader.value(json.alpha, 0);
  1675. return $;
  1676. }
  1677. };
  1678. $root.circle.SquaredDifferenceOptions = class SquaredDifferenceOptions {
  1679. static decode(/* reader, position */) {
  1680. const $ = new $root.circle.SquaredDifferenceOptions();
  1681. return $;
  1682. }
  1683. static decodeText(/* reader, json */) {
  1684. const $ = new $root.circle.SquaredDifferenceOptions();
  1685. return $;
  1686. }
  1687. };
  1688. $root.circle.MirrorPadMode = {
  1689. REFLECT: 0,
  1690. SYMMETRIC: 1
  1691. };
  1692. $root.circle.MirrorPadOptions = class MirrorPadOptions {
  1693. static decode(reader, position) {
  1694. const $ = new $root.circle.MirrorPadOptions();
  1695. $.mode = reader.int8_(position, 4, 0);
  1696. return $;
  1697. }
  1698. static decodeText(reader, json) {
  1699. const $ = new $root.circle.MirrorPadOptions();
  1700. $.mode = $root.circle.MirrorPadMode[json.mode];
  1701. return $;
  1702. }
  1703. };
  1704. $root.circle.UniqueOptions = class UniqueOptions {
  1705. static decode(reader, position) {
  1706. const $ = new $root.circle.UniqueOptions();
  1707. $.idx_out_type = reader.int8_(position, 4, 2);
  1708. return $;
  1709. }
  1710. static decodeText(reader, json) {
  1711. const $ = new $root.circle.UniqueOptions();
  1712. $.idx_out_type = $root.circle.TensorType[json.idx_out_type];
  1713. return $;
  1714. }
  1715. };
  1716. $root.circle.ReverseV2Options = class ReverseV2Options {
  1717. static decode(/* reader, position */) {
  1718. const $ = new $root.circle.ReverseV2Options();
  1719. return $;
  1720. }
  1721. static decodeText(/* reader, json */) {
  1722. const $ = new $root.circle.ReverseV2Options();
  1723. return $;
  1724. }
  1725. };
  1726. $root.circle.AddNOptions = class AddNOptions {
  1727. static decode(/* reader, position */) {
  1728. const $ = new $root.circle.AddNOptions();
  1729. return $;
  1730. }
  1731. static decodeText(/* reader, json */) {
  1732. const $ = new $root.circle.AddNOptions();
  1733. return $;
  1734. }
  1735. };
  1736. $root.circle.GatherNdOptions = class GatherNdOptions {
  1737. static decode(/* reader, position */) {
  1738. const $ = new $root.circle.GatherNdOptions();
  1739. return $;
  1740. }
  1741. static decodeText(/* reader, json */) {
  1742. const $ = new $root.circle.GatherNdOptions();
  1743. return $;
  1744. }
  1745. };
  1746. $root.circle.WhereOptions = class WhereOptions {
  1747. static decode(/* reader, position */) {
  1748. const $ = new $root.circle.WhereOptions();
  1749. return $;
  1750. }
  1751. static decodeText(/* reader, json */) {
  1752. const $ = new $root.circle.WhereOptions();
  1753. return $;
  1754. }
  1755. };
  1756. $root.circle.ReverseSequenceOptions = class ReverseSequenceOptions {
  1757. static decode(reader, position) {
  1758. const $ = new $root.circle.ReverseSequenceOptions();
  1759. $.seq_dim = reader.int32_(position, 4, 0);
  1760. $.batch_dim = reader.int32_(position, 6, 0);
  1761. return $;
  1762. }
  1763. static decodeText(reader, json) {
  1764. const $ = new $root.circle.ReverseSequenceOptions();
  1765. $.seq_dim = reader.value(json.seq_dim, 0);
  1766. $.batch_dim = reader.value(json.batch_dim, 0);
  1767. return $;
  1768. }
  1769. };
  1770. $root.circle.MatrixDiagOptions = class MatrixDiagOptions {
  1771. static decode(/* reader, position */) {
  1772. const $ = new $root.circle.MatrixDiagOptions();
  1773. return $;
  1774. }
  1775. static decodeText(/* reader, json */) {
  1776. const $ = new $root.circle.MatrixDiagOptions();
  1777. return $;
  1778. }
  1779. };
  1780. $root.circle.QuantizeOptions = class QuantizeOptions {
  1781. static decode(/* reader, position */) {
  1782. const $ = new $root.circle.QuantizeOptions();
  1783. return $;
  1784. }
  1785. static decodeText(/* reader, json */) {
  1786. const $ = new $root.circle.QuantizeOptions();
  1787. return $;
  1788. }
  1789. };
  1790. $root.circle.MatrixSetDiagOptions = class MatrixSetDiagOptions {
  1791. static decode(/* reader, position */) {
  1792. const $ = new $root.circle.MatrixSetDiagOptions();
  1793. return $;
  1794. }
  1795. static decodeText(/* reader, json */) {
  1796. const $ = new $root.circle.MatrixSetDiagOptions();
  1797. return $;
  1798. }
  1799. };
  1800. $root.circle.IfOptions = class IfOptions {
  1801. static decode(reader, position) {
  1802. const $ = new $root.circle.IfOptions();
  1803. $.then_subgraph_index = reader.int32_(position, 4, 0);
  1804. $.else_subgraph_index = reader.int32_(position, 6, 0);
  1805. return $;
  1806. }
  1807. static decodeText(reader, json) {
  1808. const $ = new $root.circle.IfOptions();
  1809. $.then_subgraph_index = reader.value(json.then_subgraph_index, 0);
  1810. $.else_subgraph_index = reader.value(json.else_subgraph_index, 0);
  1811. return $;
  1812. }
  1813. };
  1814. $root.circle.CallOnceOptions = class CallOnceOptions {
  1815. static decode(reader, position) {
  1816. const $ = new $root.circle.CallOnceOptions();
  1817. $.init_subgraph_index = reader.int32_(position, 4, 0);
  1818. return $;
  1819. }
  1820. static decodeText(reader, json) {
  1821. const $ = new $root.circle.CallOnceOptions();
  1822. $.init_subgraph_index = reader.value(json.init_subgraph_index, 0);
  1823. return $;
  1824. }
  1825. };
  1826. $root.circle.WhileOptions = class WhileOptions {
  1827. static decode(reader, position) {
  1828. const $ = new $root.circle.WhileOptions();
  1829. $.cond_subgraph_index = reader.int32_(position, 4, 0);
  1830. $.body_subgraph_index = reader.int32_(position, 6, 0);
  1831. return $;
  1832. }
  1833. static decodeText(reader, json) {
  1834. const $ = new $root.circle.WhileOptions();
  1835. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  1836. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  1837. return $;
  1838. }
  1839. };
  1840. $root.circle.NonMaxSuppressionV4Options = class NonMaxSuppressionV4Options {
  1841. static decode(/* reader, position */) {
  1842. const $ = new $root.circle.NonMaxSuppressionV4Options();
  1843. return $;
  1844. }
  1845. static decodeText(/* reader, json */) {
  1846. const $ = new $root.circle.NonMaxSuppressionV4Options();
  1847. return $;
  1848. }
  1849. };
  1850. $root.circle.NonMaxSuppressionV5Options = class NonMaxSuppressionV5Options {
  1851. static decode(/* reader, position */) {
  1852. const $ = new $root.circle.NonMaxSuppressionV5Options();
  1853. return $;
  1854. }
  1855. static decodeText(/* reader, json */) {
  1856. const $ = new $root.circle.NonMaxSuppressionV5Options();
  1857. return $;
  1858. }
  1859. };
  1860. $root.circle.ScatterNdOptions = class ScatterNdOptions {
  1861. static decode(/* reader, position */) {
  1862. const $ = new $root.circle.ScatterNdOptions();
  1863. return $;
  1864. }
  1865. static decodeText(/* reader, json */) {
  1866. const $ = new $root.circle.ScatterNdOptions();
  1867. return $;
  1868. }
  1869. };
  1870. $root.circle.SelectV2Options = class SelectV2Options {
  1871. static decode(/* reader, position */) {
  1872. const $ = new $root.circle.SelectV2Options();
  1873. return $;
  1874. }
  1875. static decodeText(/* reader, json */) {
  1876. const $ = new $root.circle.SelectV2Options();
  1877. return $;
  1878. }
  1879. };
  1880. $root.circle.DensifyOptions = class DensifyOptions {
  1881. static decode(/* reader, position */) {
  1882. const $ = new $root.circle.DensifyOptions();
  1883. return $;
  1884. }
  1885. static decodeText(/* reader, json */) {
  1886. const $ = new $root.circle.DensifyOptions();
  1887. return $;
  1888. }
  1889. };
  1890. $root.circle.SegmentSumOptions = class SegmentSumOptions {
  1891. static decode(/* reader, position */) {
  1892. const $ = new $root.circle.SegmentSumOptions();
  1893. return $;
  1894. }
  1895. static decodeText(/* reader, json */) {
  1896. const $ = new $root.circle.SegmentSumOptions();
  1897. return $;
  1898. }
  1899. };
  1900. $root.circle.BatchMatMulOptions = class BatchMatMulOptions {
  1901. static decode(reader, position) {
  1902. const $ = new $root.circle.BatchMatMulOptions();
  1903. $.adjoint_lhs = reader.bool_(position, 4, false);
  1904. $.adjoint_rhs = reader.bool_(position, 6, false);
  1905. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  1906. return $;
  1907. }
  1908. static decodeText(reader, json) {
  1909. const $ = new $root.circle.BatchMatMulOptions();
  1910. $.adjoint_lhs = reader.value(json.adjoint_lhs, false);
  1911. $.adjoint_rhs = reader.value(json.adjoint_rhs, false);
  1912. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1913. return $;
  1914. }
  1915. };
  1916. $root.circle.CumsumOptions = class CumsumOptions {
  1917. static decode(reader, position) {
  1918. const $ = new $root.circle.CumsumOptions();
  1919. $.exclusive = reader.bool_(position, 4, false);
  1920. $.reverse = reader.bool_(position, 6, false);
  1921. return $;
  1922. }
  1923. static decodeText(reader, json) {
  1924. const $ = new $root.circle.CumsumOptions();
  1925. $.exclusive = reader.value(json.exclusive, false);
  1926. $.reverse = reader.value(json.reverse, false);
  1927. return $;
  1928. }
  1929. };
  1930. $root.circle.BroadcastToOptions = class BroadcastToOptions {
  1931. static decode(/* reader, position */) {
  1932. const $ = new $root.circle.BroadcastToOptions();
  1933. return $;
  1934. }
  1935. static decodeText(/* reader, json */) {
  1936. const $ = new $root.circle.BroadcastToOptions();
  1937. return $;
  1938. }
  1939. };
  1940. $root.circle.Rfft2dOptions = class Rfft2dOptions {
  1941. static decode(/* reader, position */) {
  1942. const $ = new $root.circle.Rfft2dOptions();
  1943. return $;
  1944. }
  1945. static decodeText(/* reader, json */) {
  1946. const $ = new $root.circle.Rfft2dOptions();
  1947. return $;
  1948. }
  1949. };
  1950. $root.circle.HashtableOptions = class HashtableOptions {
  1951. static decode(reader, position) {
  1952. const $ = new $root.circle.HashtableOptions();
  1953. $.table_id = reader.int32_(position, 4, 0);
  1954. $.key_dtype = reader.int8_(position, 6, 0);
  1955. $.value_dtype = reader.int8_(position, 8, 0);
  1956. return $;
  1957. }
  1958. static decodeText(reader, json) {
  1959. const $ = new $root.circle.HashtableOptions();
  1960. $.table_id = reader.value(json.table_id, 0);
  1961. $.key_dtype = $root.circle.TensorType[json.key_dtype];
  1962. $.value_dtype = $root.circle.TensorType[json.value_dtype];
  1963. return $;
  1964. }
  1965. };
  1966. $root.circle.HashtableFindOptions = class HashtableFindOptions {
  1967. static decode(/* reader, position */) {
  1968. const $ = new $root.circle.HashtableFindOptions();
  1969. return $;
  1970. }
  1971. static decodeText(/* reader, json */) {
  1972. const $ = new $root.circle.HashtableFindOptions();
  1973. return $;
  1974. }
  1975. };
  1976. $root.circle.HashtableImportOptions = class HashtableImportOptions {
  1977. static decode(/* reader, position */) {
  1978. const $ = new $root.circle.HashtableImportOptions();
  1979. return $;
  1980. }
  1981. static decodeText(/* reader, json */) {
  1982. const $ = new $root.circle.HashtableImportOptions();
  1983. return $;
  1984. }
  1985. };
  1986. $root.circle.HashtableSizeOptions = class HashtableSizeOptions {
  1987. static decode(/* reader, position */) {
  1988. const $ = new $root.circle.HashtableSizeOptions();
  1989. return $;
  1990. }
  1991. static decodeText(/* reader, json */) {
  1992. const $ = new $root.circle.HashtableSizeOptions();
  1993. return $;
  1994. }
  1995. };
  1996. $root.circle.VarHandleOptions = class VarHandleOptions {
  1997. static decode(reader, position) {
  1998. const $ = new $root.circle.VarHandleOptions();
  1999. $.container = reader.string_(position, 4, null);
  2000. $.shared_name = reader.string_(position, 6, null);
  2001. return $;
  2002. }
  2003. static decodeText(reader, json) {
  2004. const $ = new $root.circle.VarHandleOptions();
  2005. $.container = reader.value(json.container, null);
  2006. $.shared_name = reader.value(json.shared_name, null);
  2007. return $;
  2008. }
  2009. };
  2010. $root.circle.ReadVariableOptions = class ReadVariableOptions {
  2011. static decode(/* reader, position */) {
  2012. const $ = new $root.circle.ReadVariableOptions();
  2013. return $;
  2014. }
  2015. static decodeText(/* reader, json */) {
  2016. const $ = new $root.circle.ReadVariableOptions();
  2017. return $;
  2018. }
  2019. };
  2020. $root.circle.AssignVariableOptions = class AssignVariableOptions {
  2021. static decode(/* reader, position */) {
  2022. const $ = new $root.circle.AssignVariableOptions();
  2023. return $;
  2024. }
  2025. static decodeText(/* reader, json */) {
  2026. const $ = new $root.circle.AssignVariableOptions();
  2027. return $;
  2028. }
  2029. };
  2030. $root.circle.RandomOptions = class RandomOptions {
  2031. static decode(reader, position) {
  2032. const $ = new $root.circle.RandomOptions();
  2033. $.seed = reader.int32_(position, 4, 0);
  2034. $.seed2 = reader.int32_(position, 6, 0);
  2035. return $;
  2036. }
  2037. static decodeText(reader, json) {
  2038. const $ = new $root.circle.RandomOptions();
  2039. $.seed = reader.value(json.seed, 0);
  2040. $.seed2 = reader.value(json.seed2, 0);
  2041. return $;
  2042. }
  2043. };
  2044. $root.circle.BCQGatherOptions = class BCQGatherOptions {
  2045. static decode(reader, position) {
  2046. const $ = new $root.circle.BCQGatherOptions();
  2047. $.input_hidden_size = reader.int32_(position, 4, 0);
  2048. $.axis = reader.int32_(position, 6, 0);
  2049. return $;
  2050. }
  2051. static decodeText(reader, json) {
  2052. const $ = new $root.circle.BCQGatherOptions();
  2053. $.input_hidden_size = reader.value(json.input_hidden_size, 0);
  2054. $.axis = reader.value(json.axis, 0);
  2055. return $;
  2056. }
  2057. };
  2058. $root.circle.BCQFullyConnectedOptions = class BCQFullyConnectedOptions {
  2059. static decode(reader, position) {
  2060. const $ = new $root.circle.BCQFullyConnectedOptions();
  2061. $.weights_hidden_size = reader.int32_(position, 4, 0);
  2062. $.fused_activation_function = reader.int8_(position, 6, 0);
  2063. return $;
  2064. }
  2065. static decodeText(reader, json) {
  2066. const $ = new $root.circle.BCQFullyConnectedOptions();
  2067. $.weights_hidden_size = reader.value(json.weights_hidden_size, 0);
  2068. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  2069. return $;
  2070. }
  2071. };
  2072. $root.circle.InstanceNormOptions = class InstanceNormOptions {
  2073. static decode(reader, position) {
  2074. const $ = new $root.circle.InstanceNormOptions();
  2075. $.epsilon = reader.float32_(position, 4, 0);
  2076. $.fused_activation_function = reader.int8_(position, 6, 0);
  2077. return $;
  2078. }
  2079. static decodeText(reader, json) {
  2080. const $ = new $root.circle.InstanceNormOptions();
  2081. $.epsilon = reader.value(json.epsilon, 0);
  2082. $.fused_activation_function = $root.circle.ActivationFunctionType[json.fused_activation_function];
  2083. return $;
  2084. }
  2085. };
  2086. $root.circle.OperatorCode = class OperatorCode {
  2087. static decode(reader, position) {
  2088. const $ = new $root.circle.OperatorCode();
  2089. $.deprecated_builtin_code = reader.int8_(position, 4, 0);
  2090. $.custom_code = reader.string_(position, 6, null);
  2091. $.version = reader.int32_(position, 8, 1);
  2092. $.builtin_code = reader.int32_(position, 10, 0);
  2093. return $;
  2094. }
  2095. static decodeText(reader, json) {
  2096. const $ = new $root.circle.OperatorCode();
  2097. $.deprecated_builtin_code = reader.value(json.deprecated_builtin_code, 0);
  2098. $.custom_code = reader.value(json.custom_code, null);
  2099. $.version = reader.value(json.version, 1);
  2100. $.builtin_code = $root.circle.BuiltinOperator[json.builtin_code];
  2101. return $;
  2102. }
  2103. };
  2104. $root.circle.CustomOptionsFormat = {
  2105. FLEXBUFFERS: 0
  2106. };
  2107. $root.circle.DataFormat = {
  2108. CHANNELS_LAST: 0,
  2109. CHANNELS_FIRST: 1
  2110. };
  2111. $root.circle.Operator = class Operator {
  2112. static decode(reader, position) {
  2113. const $ = new $root.circle.Operator();
  2114. $.opcode_index = reader.uint32_(position, 4, 0);
  2115. $.inputs = reader.typedArray(position, 6, Int32Array);
  2116. $.outputs = reader.typedArray(position, 8, Int32Array);
  2117. $.builtin_options = reader.union(position, 10, $root.circle.BuiltinOptions.decode);
  2118. $.custom_options = reader.typedArray(position, 14, Uint8Array);
  2119. $.custom_options_format = reader.int8_(position, 16, 0);
  2120. $.mutating_variable_inputs = reader.bools_(position, 18);
  2121. $.intermediates = reader.typedArray(position, 20, Int32Array);
  2122. return $;
  2123. }
  2124. static decodeText(reader, json) {
  2125. const $ = new $root.circle.Operator();
  2126. $.opcode_index = reader.value(json.opcode_index, 0);
  2127. $.inputs = reader.typedArray(json.inputs, Int32Array);
  2128. $.outputs = reader.typedArray(json.outputs, Int32Array);
  2129. $.builtin_options = $root.circle.BuiltinOptions.decodeText(reader, json.builtin_options, json.builtin_options_type);
  2130. $.custom_options = reader.typedArray(json.custom_options, Uint8Array);
  2131. $.custom_options_format = $root.circle.CustomOptionsFormat[json.custom_options_format];
  2132. $.mutating_variable_inputs = reader.array(json.mutating_variable_inputs);
  2133. $.intermediates = reader.typedArray(json.intermediates, Int32Array);
  2134. return $;
  2135. }
  2136. };
  2137. $root.circle.SubGraph = class SubGraph {
  2138. static decode(reader, position) {
  2139. const $ = new $root.circle.SubGraph();
  2140. $.tensors = reader.tableArray(position, 4, $root.circle.Tensor.decode);
  2141. $.inputs = reader.typedArray(position, 6, Int32Array);
  2142. $.outputs = reader.typedArray(position, 8, Int32Array);
  2143. $.operators = reader.tableArray(position, 10, $root.circle.Operator.decode);
  2144. $.name = reader.string_(position, 12, null);
  2145. $.data_format = reader.int8_(position, 14, 0);
  2146. return $;
  2147. }
  2148. static decodeText(reader, json) {
  2149. const $ = new $root.circle.SubGraph();
  2150. $.tensors = reader.objectArray(json.tensors, $root.circle.Tensor.decodeText);
  2151. $.inputs = reader.typedArray(json.inputs, Int32Array);
  2152. $.outputs = reader.typedArray(json.outputs, Int32Array);
  2153. $.operators = reader.objectArray(json.operators, $root.circle.Operator.decodeText);
  2154. $.name = reader.value(json.name, null);
  2155. $.data_format = $root.circle.DataFormat[json.data_format];
  2156. return $;
  2157. }
  2158. };
  2159. $root.circle.Buffer = class Buffer {
  2160. static decode(reader, position) {
  2161. const $ = new $root.circle.Buffer();
  2162. $.data = reader.typedArray(position, 4, Uint8Array);
  2163. return $;
  2164. }
  2165. static decodeText(reader, json) {
  2166. const $ = new $root.circle.Buffer();
  2167. $.data = reader.typedArray(json.data, Uint8Array);
  2168. return $;
  2169. }
  2170. };
  2171. $root.circle.Metadata = class Metadata {
  2172. static decode(reader, position) {
  2173. const $ = new $root.circle.Metadata();
  2174. $.name = reader.string_(position, 4, null);
  2175. $.buffer = reader.uint32_(position, 6, 0);
  2176. return $;
  2177. }
  2178. static decodeText(reader, json) {
  2179. const $ = new $root.circle.Metadata();
  2180. $.name = reader.value(json.name, null);
  2181. $.buffer = reader.value(json.buffer, 0);
  2182. return $;
  2183. }
  2184. };
  2185. $root.circle.TensorMap = class TensorMap {
  2186. static decode(reader, position) {
  2187. const $ = new $root.circle.TensorMap();
  2188. $.name = reader.string_(position, 4, null);
  2189. $.tensor_index = reader.uint32_(position, 6, 0);
  2190. return $;
  2191. }
  2192. static decodeText(reader, json) {
  2193. const $ = new $root.circle.TensorMap();
  2194. $.name = reader.value(json.name, null);
  2195. $.tensor_index = reader.value(json.tensor_index, 0);
  2196. return $;
  2197. }
  2198. };
  2199. $root.circle.SignatureDef = class SignatureDef {
  2200. static decode(reader, position) {
  2201. const $ = new $root.circle.SignatureDef();
  2202. $.inputs = reader.tableArray(position, 4, $root.circle.TensorMap.decode);
  2203. $.outputs = reader.tableArray(position, 6, $root.circle.TensorMap.decode);
  2204. $.signature_key = reader.string_(position, 8, null);
  2205. $.deprecated_tag = reader.string_(position, 10, null);
  2206. $.subgraph_index = reader.uint32_(position, 12, 0);
  2207. return $;
  2208. }
  2209. static decodeText(reader, json) {
  2210. const $ = new $root.circle.SignatureDef();
  2211. $.inputs = reader.objectArray(json.inputs, $root.circle.TensorMap.decodeText);
  2212. $.outputs = reader.objectArray(json.outputs, $root.circle.TensorMap.decodeText);
  2213. $.signature_key = reader.value(json.signature_key, null);
  2214. $.deprecated_tag = reader.value(json.deprecated_tag, null);
  2215. $.subgraph_index = reader.value(json.subgraph_index, 0);
  2216. return $;
  2217. }
  2218. };
  2219. $root.circle.Model = class Model {
  2220. static identifier(reader) {
  2221. return reader.identifier === 'CIR0';
  2222. }
  2223. static create(reader) {
  2224. return $root.circle.Model.decode(reader, reader.root);
  2225. }
  2226. static createText(reader) {
  2227. return $root.circle.Model.decodeText(reader, reader.root);
  2228. }
  2229. static decode(reader, position) {
  2230. const $ = new $root.circle.Model();
  2231. $.version = reader.uint32_(position, 4, 0);
  2232. $.operator_codes = reader.tableArray(position, 6, $root.circle.OperatorCode.decode);
  2233. $.subgraphs = reader.tableArray(position, 8, $root.circle.SubGraph.decode);
  2234. $.description = reader.string_(position, 10, null);
  2235. $.buffers = reader.tableArray(position, 12, $root.circle.Buffer.decode);
  2236. $.metadata_buffer = reader.typedArray(position, 14, Int32Array);
  2237. $.metadata = reader.tableArray(position, 16, $root.circle.Metadata.decode);
  2238. $.signature_defs = reader.tableArray(position, 18, $root.circle.SignatureDef.decode);
  2239. return $;
  2240. }
  2241. static decodeText(reader, json) {
  2242. const $ = new $root.circle.Model();
  2243. $.version = reader.value(json.version, 0);
  2244. $.operator_codes = reader.objectArray(json.operator_codes, $root.circle.OperatorCode.decodeText);
  2245. $.subgraphs = reader.objectArray(json.subgraphs, $root.circle.SubGraph.decodeText);
  2246. $.description = reader.value(json.description, null);
  2247. $.buffers = reader.objectArray(json.buffers, $root.circle.Buffer.decodeText);
  2248. $.metadata_buffer = reader.typedArray(json.metadata_buffer, Int32Array);
  2249. $.metadata = reader.objectArray(json.metadata, $root.circle.Metadata.decodeText);
  2250. $.signature_defs = reader.objectArray(json.signature_defs, $root.circle.SignatureDef.decodeText);
  2251. return $;
  2252. }
  2253. };