circle-schema.js 118 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458
  1. export const circle = {};
  2. circle.TensorType = {
  3. FLOAT32: 0,
  4. FLOAT16: 1,
  5. INT32: 2,
  6. UINT8: 3,
  7. INT64: 4,
  8. STRING: 5,
  9. BOOL: 6,
  10. INT16: 7,
  11. COMPLEX64: 8,
  12. INT8: 9,
  13. FLOAT64: 10,
  14. COMPLEX128: 11,
  15. UINT64: 12,
  16. RESOURCE: 13,
  17. VARIANT: 14,
  18. UINT32: 15,
  19. UINT16: 16,
  20. INT4: 17
  21. };
  22. circle.CustomQuantization = class CustomQuantization {
  23. static decode(reader, position) {
  24. const $ = new circle.CustomQuantization();
  25. $.custom = reader.typedArray(position, 4, Uint8Array);
  26. return $;
  27. }
  28. static decodeText(reader, json) {
  29. const $ = new circle.CustomQuantization();
  30. $.custom = reader.typedArray(json.custom, Uint8Array);
  31. return $;
  32. }
  33. };
  34. circle.QuantizationDetails = class {
  35. static decode(reader, position, type) {
  36. switch (type) {
  37. case 1: return circle.CustomQuantization.decode(reader, position);
  38. default: return undefined;
  39. }
  40. }
  41. static decodeText(reader, json, type) {
  42. switch (type) {
  43. case 'CustomQuantization': return circle.CustomQuantization.decodeText(reader, json);
  44. default: return undefined;
  45. }
  46. }
  47. };
  48. circle.QuantizationParameters = class QuantizationParameters {
  49. static decode(reader, position) {
  50. const $ = new circle.QuantizationParameters();
  51. $.min = reader.typedArray(position, 4, Float32Array);
  52. $.max = reader.typedArray(position, 6, Float32Array);
  53. $.scale = reader.typedArray(position, 8, Float32Array);
  54. $.zero_point = reader.int64s_(position, 10);
  55. $.details = reader.union(position, 12, circle.QuantizationDetails.decode);
  56. $.quantized_dimension = reader.int32_(position, 16, 0);
  57. return $;
  58. }
  59. static decodeText(reader, json) {
  60. const $ = new circle.QuantizationParameters();
  61. $.min = reader.typedArray(json.min, Float32Array);
  62. $.max = reader.typedArray(json.max, Float32Array);
  63. $.scale = reader.typedArray(json.scale, Float32Array);
  64. $.zero_point = reader.array(json.zero_point);
  65. $.details = circle.QuantizationDetails.decodeText(reader, json.details, json.details_type);
  66. $.quantized_dimension = reader.value(json.quantized_dimension, 0);
  67. return $;
  68. }
  69. };
  70. circle.DimensionType = {
  71. DENSE: 0,
  72. SPARSE_CSR: 1
  73. };
  74. circle.Int32Vector = class Int32Vector {
  75. static decode(reader, position) {
  76. const $ = new circle.Int32Vector();
  77. $.values = reader.typedArray(position, 4, Int32Array);
  78. return $;
  79. }
  80. static decodeText(reader, json) {
  81. const $ = new circle.Int32Vector();
  82. $.values = reader.typedArray(json.values, Int32Array);
  83. return $;
  84. }
  85. };
  86. circle.Uint16Vector = class Uint16Vector {
  87. static decode(reader, position) {
  88. const $ = new circle.Uint16Vector();
  89. $.values = reader.typedArray(position, 4, Uint16Array);
  90. return $;
  91. }
  92. static decodeText(reader, json) {
  93. const $ = new circle.Uint16Vector();
  94. $.values = reader.typedArray(json.values, Uint16Array);
  95. return $;
  96. }
  97. };
  98. circle.Uint8Vector = class Uint8Vector {
  99. static decode(reader, position) {
  100. const $ = new circle.Uint8Vector();
  101. $.values = reader.typedArray(position, 4, Uint8Array);
  102. return $;
  103. }
  104. static decodeText(reader, json) {
  105. const $ = new circle.Uint8Vector();
  106. $.values = reader.typedArray(json.values, Uint8Array);
  107. return $;
  108. }
  109. };
  110. circle.SparseIndexVector = class {
  111. static decode(reader, position, type) {
  112. switch (type) {
  113. case 1: return circle.Int32Vector.decode(reader, position);
  114. case 2: return circle.Uint16Vector.decode(reader, position);
  115. case 3: return circle.Uint8Vector.decode(reader, position);
  116. default: return undefined;
  117. }
  118. }
  119. static decodeText(reader, json, type) {
  120. switch (type) {
  121. case 'Int32Vector': return circle.Int32Vector.decodeText(reader, json);
  122. case 'Uint16Vector': return circle.Uint16Vector.decodeText(reader, json);
  123. case 'Uint8Vector': return circle.Uint8Vector.decodeText(reader, json);
  124. default: return undefined;
  125. }
  126. }
  127. };
  128. circle.DimensionMetadata = class DimensionMetadata {
  129. static decode(reader, position) {
  130. const $ = new circle.DimensionMetadata();
  131. $.format = reader.int8_(position, 4, 0);
  132. $.dense_size = reader.int32_(position, 6, 0);
  133. $.array_segments = reader.union(position, 8, circle.SparseIndexVector.decode);
  134. $.array_indices = reader.union(position, 12, circle.SparseIndexVector.decode);
  135. return $;
  136. }
  137. static decodeText(reader, json) {
  138. const $ = new circle.DimensionMetadata();
  139. $.format = circle.DimensionType[json.format];
  140. $.dense_size = reader.value(json.dense_size, 0);
  141. $.array_segments = circle.SparseIndexVector.decodeText(reader, json.array_segments, json.array_segments_type);
  142. $.array_indices = circle.SparseIndexVector.decodeText(reader, json.array_indices, json.array_indices_type);
  143. return $;
  144. }
  145. };
  146. circle.SparsityParameters = class SparsityParameters {
  147. static decode(reader, position) {
  148. const $ = new circle.SparsityParameters();
  149. $.traversal_order = reader.typedArray(position, 4, Int32Array);
  150. $.block_map = reader.typedArray(position, 6, Int32Array);
  151. $.dim_metadata = reader.tableArray(position, 8, circle.DimensionMetadata.decode);
  152. return $;
  153. }
  154. static decodeText(reader, json) {
  155. const $ = new circle.SparsityParameters();
  156. $.traversal_order = reader.typedArray(json.traversal_order, Int32Array);
  157. $.block_map = reader.typedArray(json.block_map, Int32Array);
  158. $.dim_metadata = reader.objectArray(json.dim_metadata, circle.DimensionMetadata.decodeText);
  159. return $;
  160. }
  161. };
  162. circle.VariantSubType = class VariantSubType {
  163. static decode(reader, position) {
  164. const $ = new circle.VariantSubType();
  165. $.shape = reader.typedArray(position, 4, Int32Array);
  166. $.type = reader.int8_(position, 6, 0);
  167. $.has_rank = reader.bool_(position, 8, false);
  168. return $;
  169. }
  170. static decodeText(reader, json) {
  171. const $ = new circle.VariantSubType();
  172. $.shape = reader.typedArray(json.shape, Int32Array);
  173. $.type = circle.TensorType[json.type];
  174. $.has_rank = reader.value(json.has_rank, false);
  175. return $;
  176. }
  177. };
  178. circle.Tensor = class Tensor {
  179. static decode(reader, position) {
  180. const $ = new circle.Tensor();
  181. $.shape = reader.typedArray(position, 4, Int32Array);
  182. $.type = reader.int8_(position, 6, 0);
  183. $.buffer = reader.uint32_(position, 8, 0);
  184. $.name = reader.string_(position, 10, null);
  185. $.quantization = reader.table(position, 12, circle.QuantizationParameters.decode);
  186. $.is_variable = reader.bool_(position, 14, false);
  187. $.sparsity = reader.table(position, 16, circle.SparsityParameters.decode);
  188. $.shape_signature = reader.typedArray(position, 18, Int32Array);
  189. $.has_rank = reader.bool_(position, 20, false);
  190. $.variant_tensors = reader.tableArray(position, 22, circle.VariantSubType.decode);
  191. return $;
  192. }
  193. static decodeText(reader, json) {
  194. const $ = new circle.Tensor();
  195. $.shape = reader.typedArray(json.shape, Int32Array);
  196. $.type = circle.TensorType[json.type];
  197. $.buffer = reader.value(json.buffer, 0);
  198. $.name = reader.value(json.name, null);
  199. $.quantization = reader.object(json.quantization, circle.QuantizationParameters.decodeText);
  200. $.is_variable = reader.value(json.is_variable, false);
  201. $.sparsity = reader.object(json.sparsity, circle.SparsityParameters.decodeText);
  202. $.shape_signature = reader.typedArray(json.shape_signature, Int32Array);
  203. $.has_rank = reader.value(json.has_rank, false);
  204. $.variant_tensors = reader.objectArray(json.variant_tensors, circle.VariantSubType.decodeText);
  205. return $;
  206. }
  207. };
  208. circle.BuiltinOperator = {
  209. BCQ_GATHER: -4,
  210. BCQ_FULLY_CONNECTED: -3,
  211. INSTANCE_NORM: -2,
  212. ADD: 0,
  213. AVERAGE_POOL_2D: 1,
  214. CONCATENATION: 2,
  215. CONV_2D: 3,
  216. DEPTHWISE_CONV_2D: 4,
  217. DEPTH_TO_SPACE: 5,
  218. DEQUANTIZE: 6,
  219. EMBEDDING_LOOKUP: 7,
  220. FLOOR: 8,
  221. FULLY_CONNECTED: 9,
  222. HASHTABLE_LOOKUP: 10,
  223. L2_NORMALIZATION: 11,
  224. L2_POOL_2D: 12,
  225. LOCAL_RESPONSE_NORMALIZATION: 13,
  226. LOGISTIC: 14,
  227. LSH_PROJECTION: 15,
  228. LSTM: 16,
  229. MAX_POOL_2D: 17,
  230. MUL: 18,
  231. RELU: 19,
  232. RELU_N1_TO_1: 20,
  233. RELU6: 21,
  234. RESHAPE: 22,
  235. RESIZE_BILINEAR: 23,
  236. RNN: 24,
  237. SOFTMAX: 25,
  238. SPACE_TO_DEPTH: 26,
  239. SVDF: 27,
  240. TANH: 28,
  241. CONCAT_EMBEDDINGS: 29,
  242. SKIP_GRAM: 30,
  243. CALL: 31,
  244. CUSTOM: 32,
  245. EMBEDDING_LOOKUP_SPARSE: 33,
  246. PAD: 34,
  247. UNIDIRECTIONAL_SEQUENCE_RNN: 35,
  248. GATHER: 36,
  249. BATCH_TO_SPACE_ND: 37,
  250. SPACE_TO_BATCH_ND: 38,
  251. TRANSPOSE: 39,
  252. MEAN: 40,
  253. SUB: 41,
  254. DIV: 42,
  255. SQUEEZE: 43,
  256. UNIDIRECTIONAL_SEQUENCE_LSTM: 44,
  257. STRIDED_SLICE: 45,
  258. BIDIRECTIONAL_SEQUENCE_RNN: 46,
  259. EXP: 47,
  260. TOPK_V2: 48,
  261. SPLIT: 49,
  262. LOG_SOFTMAX: 50,
  263. DELEGATE: 51,
  264. BIDIRECTIONAL_SEQUENCE_LSTM: 52,
  265. CAST: 53,
  266. PRELU: 54,
  267. MAXIMUM: 55,
  268. ARG_MAX: 56,
  269. MINIMUM: 57,
  270. LESS: 58,
  271. NEG: 59,
  272. PADV2: 60,
  273. GREATER: 61,
  274. GREATER_EQUAL: 62,
  275. LESS_EQUAL: 63,
  276. SELECT: 64,
  277. SLICE: 65,
  278. SIN: 66,
  279. TRANSPOSE_CONV: 67,
  280. SPARSE_TO_DENSE: 68,
  281. TILE: 69,
  282. EXPAND_DIMS: 70,
  283. EQUAL: 71,
  284. NOT_EQUAL: 72,
  285. LOG: 73,
  286. SUM: 74,
  287. SQRT: 75,
  288. RSQRT: 76,
  289. SHAPE: 77,
  290. POW: 78,
  291. ARG_MIN: 79,
  292. FAKE_QUANT: 80,
  293. REDUCE_PROD: 81,
  294. REDUCE_MAX: 82,
  295. PACK: 83,
  296. LOGICAL_OR: 84,
  297. ONE_HOT: 85,
  298. LOGICAL_AND: 86,
  299. LOGICAL_NOT: 87,
  300. UNPACK: 88,
  301. REDUCE_MIN: 89,
  302. FLOOR_DIV: 90,
  303. REDUCE_ANY: 91,
  304. SQUARE: 92,
  305. ZEROS_LIKE: 93,
  306. FILL: 94,
  307. FLOOR_MOD: 95,
  308. RANGE: 96,
  309. RESIZE_NEAREST_NEIGHBOR: 97,
  310. LEAKY_RELU: 98,
  311. SQUARED_DIFFERENCE: 99,
  312. MIRROR_PAD: 100,
  313. ABS: 101,
  314. SPLIT_V: 102,
  315. UNIQUE: 103,
  316. CEIL: 104,
  317. REVERSE_V2: 105,
  318. ADD_N: 106,
  319. GATHER_ND: 107,
  320. COS: 108,
  321. WHERE: 109,
  322. RANK: 110,
  323. ELU: 111,
  324. REVERSE_SEQUENCE: 112,
  325. MATRIX_DIAG: 113,
  326. QUANTIZE: 114,
  327. MATRIX_SET_DIAG: 115,
  328. ROUND: 116,
  329. HARD_SWISH: 117,
  330. IF: 118,
  331. WHILE: 119,
  332. NON_MAX_SUPPRESSION_V4: 120,
  333. NON_MAX_SUPPRESSION_V5: 121,
  334. SCATTER_ND: 122,
  335. SELECT_V2: 123,
  336. DENSIFY: 124,
  337. SEGMENT_SUM: 125,
  338. BATCH_MATMUL: 126,
  339. PLACEHOLDER_FOR_GREATER_OP_CODES: 127,
  340. CUMSUM: 128,
  341. CALL_ONCE: 129,
  342. BROADCAST_TO: 130,
  343. RFFT2D: 131,
  344. CONV_3D: 132,
  345. IMAG: 133,
  346. REAL: 134,
  347. COMPLEX_ABS: 135,
  348. HASHTABLE: 136,
  349. HASHTABLE_FIND: 137,
  350. HASHTABLE_IMPORT: 138,
  351. HASHTABLE_SIZE: 139,
  352. REDUCE_ALL: 140,
  353. CONV_3D_TRANSPOSE: 141,
  354. VAR_HANDLE: 142,
  355. READ_VARIABLE: 143,
  356. ASSIGN_VARIABLE: 144,
  357. BROADCAST_ARGS: 145,
  358. RANDOM_STANDARD_NORMAL: 146,
  359. BUCKETIZE: 147,
  360. RANDOM_UNIFORM: 148,
  361. MULTINOMIAL: 149,
  362. GELU: 150,
  363. DYNAMIC_UPDATE_SLICE: 151,
  364. RELU_0_TO_1: 152,
  365. UNSORTED_SEGMENT_PROD: 153,
  366. UNSORTED_SEGMENT_MAX: 154,
  367. UNSORTED_SEGMENT_SUM: 155,
  368. ATAN2: 156,
  369. UNSORTED_SEGMENT_MIN: 157,
  370. SIGN: 158,
  371. BITCAST: 159,
  372. BITWISE_XOR: 160,
  373. RIGHT_SHIFT: 161,
  374. STABLEHLO_LOGISTIC: 162,
  375. STABLEHLO_ADD: 163,
  376. STABLEHLO_DIVIDE: 164,
  377. STABLEHLO_MULTIPLY: 165,
  378. STABLEHLO_MAXIMUM: 166,
  379. STABLEHLO_RESHAPE: 167,
  380. STABLEHLO_CLAMP: 168,
  381. STABLEHLO_CONCATENATE: 169,
  382. STABLEHLO_BROADCAST_IN_DIM: 170,
  383. STABLEHLO_CONVOLUTION: 171,
  384. STABLEHLO_SLICE: 172,
  385. STABLEHLO_CUSTOM_CALL: 173,
  386. STABLEHLO_REDUCE: 174,
  387. STABLEHLO_ABS: 175,
  388. STABLEHLO_AND: 176,
  389. STABLEHLO_COSINE: 177,
  390. STABLEHLO_EXPONENTIAL: 178,
  391. STABLEHLO_FLOOR: 179,
  392. STABLEHLO_LOG: 180,
  393. STABLEHLO_MINIMUM: 181,
  394. STABLEHLO_NEGATE: 182,
  395. STABLEHLO_OR: 183,
  396. STABLEHLO_POWER: 184,
  397. STABLEHLO_REMAINDER: 185,
  398. STABLEHLO_RSQRT: 186,
  399. STABLEHLO_SELECT: 187,
  400. STABLEHLO_SUBTRACT: 188,
  401. STABLEHLO_TANH: 189,
  402. STABLEHLO_SCATTER: 190,
  403. STABLEHLO_COMPARE: 191,
  404. STABLEHLO_CONVERT: 192,
  405. STABLEHLO_DYNAMIC_SLICE: 193,
  406. STABLEHLO_DYNAMIC_UPDATE_SLICE: 194,
  407. STABLEHLO_PAD: 195,
  408. STABLEHLO_IOTA: 196,
  409. STABLEHLO_DOT_GENERAL: 197,
  410. STABLEHLO_REDUCE_WINDOW: 198,
  411. STABLEHLO_SORT: 199,
  412. STABLEHLO_WHILE: 200,
  413. STABLEHLO_GATHER: 201,
  414. STABLEHLO_TRANSPOSE: 202,
  415. DILATE: 203,
  416. STABLEHLO_RNG_BIT_GENERATOR: 204,
  417. REDUCE_WINDOW: 205
  418. };
  419. circle.BuiltinOptions = class {
  420. static decode(reader, position, type) {
  421. switch (type) {
  422. case 1: return circle.Conv2DOptions.decode(reader, position);
  423. case 2: return circle.DepthwiseConv2DOptions.decode(reader, position);
  424. case 3: return circle.ConcatEmbeddingsOptions.decode(reader, position);
  425. case 4: return circle.LSHProjectionOptions.decode(reader, position);
  426. case 5: return circle.Pool2DOptions.decode(reader, position);
  427. case 6: return circle.SVDFOptions.decode(reader, position);
  428. case 7: return circle.RNNOptions.decode(reader, position);
  429. case 8: return circle.FullyConnectedOptions.decode(reader, position);
  430. case 9: return circle.SoftmaxOptions.decode(reader, position);
  431. case 10: return circle.ConcatenationOptions.decode(reader, position);
  432. case 11: return circle.AddOptions.decode(reader, position);
  433. case 12: return circle.L2NormOptions.decode(reader, position);
  434. case 13: return circle.LocalResponseNormalizationOptions.decode(reader, position);
  435. case 14: return circle.LSTMOptions.decode(reader, position);
  436. case 15: return circle.ResizeBilinearOptions.decode(reader, position);
  437. case 16: return circle.CallOptions.decode(reader, position);
  438. case 17: return circle.ReshapeOptions.decode(reader, position);
  439. case 18: return circle.SkipGramOptions.decode(reader, position);
  440. case 19: return circle.SpaceToDepthOptions.decode(reader, position);
  441. case 20: return circle.EmbeddingLookupSparseOptions.decode(reader, position);
  442. case 21: return circle.MulOptions.decode(reader, position);
  443. case 22: return circle.PadOptions.decode(reader, position);
  444. case 23: return circle.GatherOptions.decode(reader, position);
  445. case 24: return circle.BatchToSpaceNDOptions.decode(reader, position);
  446. case 25: return circle.SpaceToBatchNDOptions.decode(reader, position);
  447. case 26: return circle.TransposeOptions.decode(reader, position);
  448. case 27: return circle.ReducerOptions.decode(reader, position);
  449. case 28: return circle.SubOptions.decode(reader, position);
  450. case 29: return circle.DivOptions.decode(reader, position);
  451. case 30: return circle.SqueezeOptions.decode(reader, position);
  452. case 31: return circle.SequenceRNNOptions.decode(reader, position);
  453. case 32: return circle.StridedSliceOptions.decode(reader, position);
  454. case 33: return circle.ExpOptions.decode(reader, position);
  455. case 34: return circle.TopKV2Options.decode(reader, position);
  456. case 35: return circle.SplitOptions.decode(reader, position);
  457. case 36: return circle.LogSoftmaxOptions.decode(reader, position);
  458. case 37: return circle.CastOptions.decode(reader, position);
  459. case 38: return circle.DequantizeOptions.decode(reader, position);
  460. case 39: return circle.MaximumMinimumOptions.decode(reader, position);
  461. case 40: return circle.ArgMaxOptions.decode(reader, position);
  462. case 41: return circle.LessOptions.decode(reader, position);
  463. case 42: return circle.NegOptions.decode(reader, position);
  464. case 43: return circle.PadV2Options.decode(reader, position);
  465. case 44: return circle.GreaterOptions.decode(reader, position);
  466. case 45: return circle.GreaterEqualOptions.decode(reader, position);
  467. case 46: return circle.LessEqualOptions.decode(reader, position);
  468. case 47: return circle.SelectOptions.decode(reader, position);
  469. case 48: return circle.SliceOptions.decode(reader, position);
  470. case 49: return circle.TransposeConvOptions.decode(reader, position);
  471. case 50: return circle.SparseToDenseOptions.decode(reader, position);
  472. case 51: return circle.TileOptions.decode(reader, position);
  473. case 52: return circle.ExpandDimsOptions.decode(reader, position);
  474. case 53: return circle.EqualOptions.decode(reader, position);
  475. case 54: return circle.NotEqualOptions.decode(reader, position);
  476. case 55: return circle.ShapeOptions.decode(reader, position);
  477. case 56: return circle.PowOptions.decode(reader, position);
  478. case 57: return circle.ArgMinOptions.decode(reader, position);
  479. case 58: return circle.FakeQuantOptions.decode(reader, position);
  480. case 59: return circle.PackOptions.decode(reader, position);
  481. case 60: return circle.LogicalOrOptions.decode(reader, position);
  482. case 61: return circle.OneHotOptions.decode(reader, position);
  483. case 62: return circle.LogicalAndOptions.decode(reader, position);
  484. case 63: return circle.LogicalNotOptions.decode(reader, position);
  485. case 64: return circle.UnpackOptions.decode(reader, position);
  486. case 65: return circle.FloorDivOptions.decode(reader, position);
  487. case 66: return circle.SquareOptions.decode(reader, position);
  488. case 67: return circle.ZerosLikeOptions.decode(reader, position);
  489. case 68: return circle.FillOptions.decode(reader, position);
  490. case 69: return circle.BidirectionalSequenceLSTMOptions.decode(reader, position);
  491. case 70: return circle.BidirectionalSequenceRNNOptions.decode(reader, position);
  492. case 71: return circle.UnidirectionalSequenceLSTMOptions.decode(reader, position);
  493. case 72: return circle.FloorModOptions.decode(reader, position);
  494. case 73: return circle.RangeOptions.decode(reader, position);
  495. case 74: return circle.ResizeNearestNeighborOptions.decode(reader, position);
  496. case 75: return circle.LeakyReluOptions.decode(reader, position);
  497. case 76: return circle.SquaredDifferenceOptions.decode(reader, position);
  498. case 77: return circle.MirrorPadOptions.decode(reader, position);
  499. case 78: return circle.AbsOptions.decode(reader, position);
  500. case 79: return circle.SplitVOptions.decode(reader, position);
  501. case 80: return circle.UniqueOptions.decode(reader, position);
  502. case 81: return circle.ReverseV2Options.decode(reader, position);
  503. case 82: return circle.AddNOptions.decode(reader, position);
  504. case 83: return circle.GatherNdOptions.decode(reader, position);
  505. case 84: return circle.CosOptions.decode(reader, position);
  506. case 85: return circle.WhereOptions.decode(reader, position);
  507. case 86: return circle.RankOptions.decode(reader, position);
  508. case 87: return circle.ReverseSequenceOptions.decode(reader, position);
  509. case 88: return circle.MatrixDiagOptions.decode(reader, position);
  510. case 89: return circle.QuantizeOptions.decode(reader, position);
  511. case 90: return circle.MatrixSetDiagOptions.decode(reader, position);
  512. case 91: return circle.HardSwishOptions.decode(reader, position);
  513. case 92: return circle.IfOptions.decode(reader, position);
  514. case 93: return circle.WhileOptions.decode(reader, position);
  515. case 94: return circle.DepthToSpaceOptions.decode(reader, position);
  516. case 95: return circle.NonMaxSuppressionV4Options.decode(reader, position);
  517. case 96: return circle.NonMaxSuppressionV5Options.decode(reader, position);
  518. case 97: return circle.ScatterNdOptions.decode(reader, position);
  519. case 98: return circle.SelectV2Options.decode(reader, position);
  520. case 99: return circle.DensifyOptions.decode(reader, position);
  521. case 100: return circle.SegmentSumOptions.decode(reader, position);
  522. case 101: return circle.BatchMatMulOptions.decode(reader, position);
  523. case 102: return circle.CumsumOptions.decode(reader, position);
  524. case 103: return circle.CallOnceOptions.decode(reader, position);
  525. case 104: return circle.BroadcastToOptions.decode(reader, position);
  526. case 105: return circle.Rfft2dOptions.decode(reader, position);
  527. case 106: return circle.Conv3DOptions.decode(reader, position);
  528. case 107: return circle.HashtableOptions.decode(reader, position);
  529. case 108: return circle.HashtableFindOptions.decode(reader, position);
  530. case 109: return circle.HashtableImportOptions.decode(reader, position);
  531. case 110: return circle.HashtableSizeOptions.decode(reader, position);
  532. case 111: return circle.VarHandleOptions.decode(reader, position);
  533. case 112: return circle.ReadVariableOptions.decode(reader, position);
  534. case 113: return circle.AssignVariableOptions.decode(reader, position);
  535. case 114: return circle.RandomOptions.decode(reader, position);
  536. case 115: return circle.BucketizeOptions.decode(reader, position);
  537. case 116: return circle.GeluOptions.decode(reader, position);
  538. case 117: return circle.DynamicUpdateSliceOptions.decode(reader, position);
  539. case 118: return circle.UnsortedSegmentProdOptions.decode(reader, position);
  540. case 119: return circle.UnsortedSegmentMaxOptions.decode(reader, position);
  541. case 120: return circle.UnsortedSegmentMinOptions.decode(reader, position);
  542. case 121: return circle.UnsortedSegmentSumOptions.decode(reader, position);
  543. case 122: return circle.ATan2Options.decode(reader, position);
  544. case 123: return circle.SignOptions.decode(reader, position);
  545. case 124: return circle.BitcastOptions.decode(reader, position);
  546. case 125: return circle.BitwiseXorOptions.decode(reader, position);
  547. case 126: return circle.RightShiftOptions.decode(reader, position);
  548. case 252: return circle.BCQGatherOptions.decode(reader, position);
  549. case 253: return circle.BCQFullyConnectedOptions.decode(reader, position);
  550. case 254: return circle.InstanceNormOptions.decode(reader, position);
  551. default: return undefined;
  552. }
  553. }
  554. static decodeText(reader, json, type) {
  555. switch (type) {
  556. case 'Conv2DOptions': return circle.Conv2DOptions.decodeText(reader, json);
  557. case 'DepthwiseConv2DOptions': return circle.DepthwiseConv2DOptions.decodeText(reader, json);
  558. case 'ConcatEmbeddingsOptions': return circle.ConcatEmbeddingsOptions.decodeText(reader, json);
  559. case 'LSHProjectionOptions': return circle.LSHProjectionOptions.decodeText(reader, json);
  560. case 'Pool2DOptions': return circle.Pool2DOptions.decodeText(reader, json);
  561. case 'SVDFOptions': return circle.SVDFOptions.decodeText(reader, json);
  562. case 'RNNOptions': return circle.RNNOptions.decodeText(reader, json);
  563. case 'FullyConnectedOptions': return circle.FullyConnectedOptions.decodeText(reader, json);
  564. case 'SoftmaxOptions': return circle.SoftmaxOptions.decodeText(reader, json);
  565. case 'ConcatenationOptions': return circle.ConcatenationOptions.decodeText(reader, json);
  566. case 'AddOptions': return circle.AddOptions.decodeText(reader, json);
  567. case 'L2NormOptions': return circle.L2NormOptions.decodeText(reader, json);
  568. case 'LocalResponseNormalizationOptions': return circle.LocalResponseNormalizationOptions.decodeText(reader, json);
  569. case 'LSTMOptions': return circle.LSTMOptions.decodeText(reader, json);
  570. case 'ResizeBilinearOptions': return circle.ResizeBilinearOptions.decodeText(reader, json);
  571. case 'CallOptions': return circle.CallOptions.decodeText(reader, json);
  572. case 'ReshapeOptions': return circle.ReshapeOptions.decodeText(reader, json);
  573. case 'SkipGramOptions': return circle.SkipGramOptions.decodeText(reader, json);
  574. case 'SpaceToDepthOptions': return circle.SpaceToDepthOptions.decodeText(reader, json);
  575. case 'EmbeddingLookupSparseOptions': return circle.EmbeddingLookupSparseOptions.decodeText(reader, json);
  576. case 'MulOptions': return circle.MulOptions.decodeText(reader, json);
  577. case 'PadOptions': return circle.PadOptions.decodeText(reader, json);
  578. case 'GatherOptions': return circle.GatherOptions.decodeText(reader, json);
  579. case 'BatchToSpaceNDOptions': return circle.BatchToSpaceNDOptions.decodeText(reader, json);
  580. case 'SpaceToBatchNDOptions': return circle.SpaceToBatchNDOptions.decodeText(reader, json);
  581. case 'TransposeOptions': return circle.TransposeOptions.decodeText(reader, json);
  582. case 'ReducerOptions': return circle.ReducerOptions.decodeText(reader, json);
  583. case 'SubOptions': return circle.SubOptions.decodeText(reader, json);
  584. case 'DivOptions': return circle.DivOptions.decodeText(reader, json);
  585. case 'SqueezeOptions': return circle.SqueezeOptions.decodeText(reader, json);
  586. case 'SequenceRNNOptions': return circle.SequenceRNNOptions.decodeText(reader, json);
  587. case 'StridedSliceOptions': return circle.StridedSliceOptions.decodeText(reader, json);
  588. case 'ExpOptions': return circle.ExpOptions.decodeText(reader, json);
  589. case 'TopKV2Options': return circle.TopKV2Options.decodeText(reader, json);
  590. case 'SplitOptions': return circle.SplitOptions.decodeText(reader, json);
  591. case 'LogSoftmaxOptions': return circle.LogSoftmaxOptions.decodeText(reader, json);
  592. case 'CastOptions': return circle.CastOptions.decodeText(reader, json);
  593. case 'DequantizeOptions': return circle.DequantizeOptions.decodeText(reader, json);
  594. case 'MaximumMinimumOptions': return circle.MaximumMinimumOptions.decodeText(reader, json);
  595. case 'ArgMaxOptions': return circle.ArgMaxOptions.decodeText(reader, json);
  596. case 'LessOptions': return circle.LessOptions.decodeText(reader, json);
  597. case 'NegOptions': return circle.NegOptions.decodeText(reader, json);
  598. case 'PadV2Options': return circle.PadV2Options.decodeText(reader, json);
  599. case 'GreaterOptions': return circle.GreaterOptions.decodeText(reader, json);
  600. case 'GreaterEqualOptions': return circle.GreaterEqualOptions.decodeText(reader, json);
  601. case 'LessEqualOptions': return circle.LessEqualOptions.decodeText(reader, json);
  602. case 'SelectOptions': return circle.SelectOptions.decodeText(reader, json);
  603. case 'SliceOptions': return circle.SliceOptions.decodeText(reader, json);
  604. case 'TransposeConvOptions': return circle.TransposeConvOptions.decodeText(reader, json);
  605. case 'SparseToDenseOptions': return circle.SparseToDenseOptions.decodeText(reader, json);
  606. case 'TileOptions': return circle.TileOptions.decodeText(reader, json);
  607. case 'ExpandDimsOptions': return circle.ExpandDimsOptions.decodeText(reader, json);
  608. case 'EqualOptions': return circle.EqualOptions.decodeText(reader, json);
  609. case 'NotEqualOptions': return circle.NotEqualOptions.decodeText(reader, json);
  610. case 'ShapeOptions': return circle.ShapeOptions.decodeText(reader, json);
  611. case 'PowOptions': return circle.PowOptions.decodeText(reader, json);
  612. case 'ArgMinOptions': return circle.ArgMinOptions.decodeText(reader, json);
  613. case 'FakeQuantOptions': return circle.FakeQuantOptions.decodeText(reader, json);
  614. case 'PackOptions': return circle.PackOptions.decodeText(reader, json);
  615. case 'LogicalOrOptions': return circle.LogicalOrOptions.decodeText(reader, json);
  616. case 'OneHotOptions': return circle.OneHotOptions.decodeText(reader, json);
  617. case 'LogicalAndOptions': return circle.LogicalAndOptions.decodeText(reader, json);
  618. case 'LogicalNotOptions': return circle.LogicalNotOptions.decodeText(reader, json);
  619. case 'UnpackOptions': return circle.UnpackOptions.decodeText(reader, json);
  620. case 'FloorDivOptions': return circle.FloorDivOptions.decodeText(reader, json);
  621. case 'SquareOptions': return circle.SquareOptions.decodeText(reader, json);
  622. case 'ZerosLikeOptions': return circle.ZerosLikeOptions.decodeText(reader, json);
  623. case 'FillOptions': return circle.FillOptions.decodeText(reader, json);
  624. case 'BidirectionalSequenceLSTMOptions': return circle.BidirectionalSequenceLSTMOptions.decodeText(reader, json);
  625. case 'BidirectionalSequenceRNNOptions': return circle.BidirectionalSequenceRNNOptions.decodeText(reader, json);
  626. case 'UnidirectionalSequenceLSTMOptions': return circle.UnidirectionalSequenceLSTMOptions.decodeText(reader, json);
  627. case 'FloorModOptions': return circle.FloorModOptions.decodeText(reader, json);
  628. case 'RangeOptions': return circle.RangeOptions.decodeText(reader, json);
  629. case 'ResizeNearestNeighborOptions': return circle.ResizeNearestNeighborOptions.decodeText(reader, json);
  630. case 'LeakyReluOptions': return circle.LeakyReluOptions.decodeText(reader, json);
  631. case 'SquaredDifferenceOptions': return circle.SquaredDifferenceOptions.decodeText(reader, json);
  632. case 'MirrorPadOptions': return circle.MirrorPadOptions.decodeText(reader, json);
  633. case 'AbsOptions': return circle.AbsOptions.decodeText(reader, json);
  634. case 'SplitVOptions': return circle.SplitVOptions.decodeText(reader, json);
  635. case 'UniqueOptions': return circle.UniqueOptions.decodeText(reader, json);
  636. case 'ReverseV2Options': return circle.ReverseV2Options.decodeText(reader, json);
  637. case 'AddNOptions': return circle.AddNOptions.decodeText(reader, json);
  638. case 'GatherNdOptions': return circle.GatherNdOptions.decodeText(reader, json);
  639. case 'CosOptions': return circle.CosOptions.decodeText(reader, json);
  640. case 'WhereOptions': return circle.WhereOptions.decodeText(reader, json);
  641. case 'RankOptions': return circle.RankOptions.decodeText(reader, json);
  642. case 'ReverseSequenceOptions': return circle.ReverseSequenceOptions.decodeText(reader, json);
  643. case 'MatrixDiagOptions': return circle.MatrixDiagOptions.decodeText(reader, json);
  644. case 'QuantizeOptions': return circle.QuantizeOptions.decodeText(reader, json);
  645. case 'MatrixSetDiagOptions': return circle.MatrixSetDiagOptions.decodeText(reader, json);
  646. case 'HardSwishOptions': return circle.HardSwishOptions.decodeText(reader, json);
  647. case 'IfOptions': return circle.IfOptions.decodeText(reader, json);
  648. case 'WhileOptions': return circle.WhileOptions.decodeText(reader, json);
  649. case 'DepthToSpaceOptions': return circle.DepthToSpaceOptions.decodeText(reader, json);
  650. case 'NonMaxSuppressionV4Options': return circle.NonMaxSuppressionV4Options.decodeText(reader, json);
  651. case 'NonMaxSuppressionV5Options': return circle.NonMaxSuppressionV5Options.decodeText(reader, json);
  652. case 'ScatterNdOptions': return circle.ScatterNdOptions.decodeText(reader, json);
  653. case 'SelectV2Options': return circle.SelectV2Options.decodeText(reader, json);
  654. case 'DensifyOptions': return circle.DensifyOptions.decodeText(reader, json);
  655. case 'SegmentSumOptions': return circle.SegmentSumOptions.decodeText(reader, json);
  656. case 'BatchMatMulOptions': return circle.BatchMatMulOptions.decodeText(reader, json);
  657. case 'CumsumOptions': return circle.CumsumOptions.decodeText(reader, json);
  658. case 'CallOnceOptions': return circle.CallOnceOptions.decodeText(reader, json);
  659. case 'BroadcastToOptions': return circle.BroadcastToOptions.decodeText(reader, json);
  660. case 'Rfft2dOptions': return circle.Rfft2dOptions.decodeText(reader, json);
  661. case 'Conv3DOptions': return circle.Conv3DOptions.decodeText(reader, json);
  662. case 'HashtableOptions': return circle.HashtableOptions.decodeText(reader, json);
  663. case 'HashtableFindOptions': return circle.HashtableFindOptions.decodeText(reader, json);
  664. case 'HashtableImportOptions': return circle.HashtableImportOptions.decodeText(reader, json);
  665. case 'HashtableSizeOptions': return circle.HashtableSizeOptions.decodeText(reader, json);
  666. case 'VarHandleOptions': return circle.VarHandleOptions.decodeText(reader, json);
  667. case 'ReadVariableOptions': return circle.ReadVariableOptions.decodeText(reader, json);
  668. case 'AssignVariableOptions': return circle.AssignVariableOptions.decodeText(reader, json);
  669. case 'RandomOptions': return circle.RandomOptions.decodeText(reader, json);
  670. case 'BucketizeOptions': return circle.BucketizeOptions.decodeText(reader, json);
  671. case 'GeluOptions': return circle.GeluOptions.decodeText(reader, json);
  672. case 'DynamicUpdateSliceOptions': return circle.DynamicUpdateSliceOptions.decodeText(reader, json);
  673. case 'UnsortedSegmentProdOptions': return circle.UnsortedSegmentProdOptions.decodeText(reader, json);
  674. case 'UnsortedSegmentMaxOptions': return circle.UnsortedSegmentMaxOptions.decodeText(reader, json);
  675. case 'UnsortedSegmentMinOptions': return circle.UnsortedSegmentMinOptions.decodeText(reader, json);
  676. case 'UnsortedSegmentSumOptions': return circle.UnsortedSegmentSumOptions.decodeText(reader, json);
  677. case 'ATan2Options': return circle.ATan2Options.decodeText(reader, json);
  678. case 'SignOptions': return circle.SignOptions.decodeText(reader, json);
  679. case 'BitcastOptions': return circle.BitcastOptions.decodeText(reader, json);
  680. case 'BitwiseXorOptions': return circle.BitwiseXorOptions.decodeText(reader, json);
  681. case 'RightShiftOptions': return circle.RightShiftOptions.decodeText(reader, json);
  682. case 'BCQGatherOptions': return circle.BCQGatherOptions.decodeText(reader, json);
  683. case 'BCQFullyConnectedOptions': return circle.BCQFullyConnectedOptions.decodeText(reader, json);
  684. case 'InstanceNormOptions': return circle.InstanceNormOptions.decodeText(reader, json);
  685. default: return undefined;
  686. }
  687. }
  688. };
  689. circle.BuiltinOptions2 = class {
  690. static decode(reader, position, type) {
  691. switch (type) {
  692. case 1: return circle.StablehloConcatenateOptions.decode(reader, position);
  693. case 2: return circle.StablehloBroadcastInDimOptions.decode(reader, position);
  694. case 3: return circle.StablehloSliceOptions.decode(reader, position);
  695. case 4: return circle.StablehloConvolutionOptions.decode(reader, position);
  696. case 5: return circle.StablehloCustomCallOptions.decode(reader, position);
  697. case 6: return circle.StablehloReduceOptions.decode(reader, position);
  698. case 7: return circle.StablehloScatterOptions.decode(reader, position);
  699. case 8: return circle.StablehloCompareOptions.decode(reader, position);
  700. case 9: return circle.StablehloDynamicSliceOptions.decode(reader, position);
  701. case 10: return circle.StablehloPadOptions.decode(reader, position);
  702. case 11: return circle.StablehloIotaOptions.decode(reader, position);
  703. case 12: return circle.StablehloDotGeneralOptions.decode(reader, position);
  704. case 13: return circle.StablehloReduceWindowOptions.decode(reader, position);
  705. case 14: return circle.StablehloSortOptions.decode(reader, position);
  706. case 15: return circle.StablehloWhileOptions.decode(reader, position);
  707. case 16: return circle.StablehloGatherOptions.decode(reader, position);
  708. case 17: return circle.StablehloTransposeOptions.decode(reader, position);
  709. case 18: return circle.DilateOptions.decode(reader, position);
  710. case 19: return circle.StablehloRngBitGeneratorOptions.decode(reader, position);
  711. case 20: return circle.ReduceWindowOptions.decode(reader, position);
  712. default: return undefined;
  713. }
  714. }
  715. static decodeText(reader, json, type) {
  716. switch (type) {
  717. case 'StablehloConcatenateOptions': return circle.StablehloConcatenateOptions.decodeText(reader, json);
  718. case 'StablehloBroadcastInDimOptions': return circle.StablehloBroadcastInDimOptions.decodeText(reader, json);
  719. case 'StablehloSliceOptions': return circle.StablehloSliceOptions.decodeText(reader, json);
  720. case 'StablehloConvolutionOptions': return circle.StablehloConvolutionOptions.decodeText(reader, json);
  721. case 'StablehloCustomCallOptions': return circle.StablehloCustomCallOptions.decodeText(reader, json);
  722. case 'StablehloReduceOptions': return circle.StablehloReduceOptions.decodeText(reader, json);
  723. case 'StablehloScatterOptions': return circle.StablehloScatterOptions.decodeText(reader, json);
  724. case 'StablehloCompareOptions': return circle.StablehloCompareOptions.decodeText(reader, json);
  725. case 'StablehloDynamicSliceOptions': return circle.StablehloDynamicSliceOptions.decodeText(reader, json);
  726. case 'StablehloPadOptions': return circle.StablehloPadOptions.decodeText(reader, json);
  727. case 'StablehloIotaOptions': return circle.StablehloIotaOptions.decodeText(reader, json);
  728. case 'StablehloDotGeneralOptions': return circle.StablehloDotGeneralOptions.decodeText(reader, json);
  729. case 'StablehloReduceWindowOptions': return circle.StablehloReduceWindowOptions.decodeText(reader, json);
  730. case 'StablehloSortOptions': return circle.StablehloSortOptions.decodeText(reader, json);
  731. case 'StablehloWhileOptions': return circle.StablehloWhileOptions.decodeText(reader, json);
  732. case 'StablehloGatherOptions': return circle.StablehloGatherOptions.decodeText(reader, json);
  733. case 'StablehloTransposeOptions': return circle.StablehloTransposeOptions.decodeText(reader, json);
  734. case 'DilateOptions': return circle.DilateOptions.decodeText(reader, json);
  735. case 'StablehloRngBitGeneratorOptions': return circle.StablehloRngBitGeneratorOptions.decodeText(reader, json);
  736. case 'ReduceWindowOptions': return circle.ReduceWindowOptions.decodeText(reader, json);
  737. default: return undefined;
  738. }
  739. }
  740. };
  741. circle.StablehloGatherOptions = class StablehloGatherOptions {
  742. static decode(reader, position) {
  743. const $ = new circle.StablehloGatherOptions();
  744. $.offset_dims = reader.int64s_(position, 4);
  745. $.collapsed_slice_dims = reader.int64s_(position, 6);
  746. $.start_index_map = reader.int64s_(position, 8);
  747. $.index_vector_dim = reader.int64_(position, 10, 0);
  748. $.slice_sizes = reader.int64s_(position, 12);
  749. $.indices_are_sorted = reader.bool_(position, 14, false);
  750. return $;
  751. }
  752. static decodeText(reader, json) {
  753. const $ = new circle.StablehloGatherOptions();
  754. $.offset_dims = reader.array(json.offset_dims);
  755. $.collapsed_slice_dims = reader.array(json.collapsed_slice_dims);
  756. $.start_index_map = reader.array(json.start_index_map);
  757. $.index_vector_dim = reader.value(json.index_vector_dim, 0);
  758. $.slice_sizes = reader.array(json.slice_sizes);
  759. $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
  760. return $;
  761. }
  762. };
  763. circle.StablehloTransposeOptions = class StablehloTransposeOptions {
  764. static decode(reader, position) {
  765. const $ = new circle.StablehloTransposeOptions();
  766. $.permutation = reader.int64s_(position, 4);
  767. return $;
  768. }
  769. static decodeText(reader, json) {
  770. const $ = new circle.StablehloTransposeOptions();
  771. $.permutation = reader.array(json.permutation);
  772. return $;
  773. }
  774. };
  775. circle.StablehloPrecisionConfig = {
  776. DEFAULT: 0,
  777. HIGH: 1,
  778. HIGHEST: 2
  779. };
  780. circle.StablehloDotGeneralOptions = class StablehloDotGeneralOptions {
  781. static decode(reader, position) {
  782. const $ = new circle.StablehloDotGeneralOptions();
  783. $.lhs_batching_dimensions = reader.int64s_(position, 4);
  784. $.rhs_batching_dimensions = reader.int64s_(position, 6);
  785. $.lhs_contracting_dimensions = reader.int64s_(position, 8);
  786. $.rhs_contracting_dimensions = reader.int64s_(position, 10);
  787. $.precision_config = reader.typedArray(position, 12, Uint32Array);
  788. return $;
  789. }
  790. static decodeText(reader, json) {
  791. const $ = new circle.StablehloDotGeneralOptions();
  792. $.lhs_batching_dimensions = reader.array(json.lhs_batching_dimensions);
  793. $.rhs_batching_dimensions = reader.array(json.rhs_batching_dimensions);
  794. $.lhs_contracting_dimensions = reader.array(json.lhs_contracting_dimensions);
  795. $.rhs_contracting_dimensions = reader.array(json.rhs_contracting_dimensions);
  796. $.precision_config = reader.objectArray(json.precision_config, circle.StablehloPrecisionConfig.decodeText);
  797. return $;
  798. }
  799. };
  800. circle.StablehloReduceWindowOptions = class StablehloReduceWindowOptions {
  801. static decode(reader, position) {
  802. const $ = new circle.StablehloReduceWindowOptions();
  803. $.window_dimensions = reader.int64s_(position, 4);
  804. $.window_strides = reader.int64s_(position, 6);
  805. $.base_dilations = reader.int64s_(position, 8);
  806. $.window_dilations = reader.int64s_(position, 10);
  807. $.padding = reader.int64s_(position, 12);
  808. $.body_subgraph_index = reader.int32_(position, 14, 0);
  809. return $;
  810. }
  811. static decodeText(reader, json) {
  812. const $ = new circle.StablehloReduceWindowOptions();
  813. $.window_dimensions = reader.array(json.window_dimensions);
  814. $.window_strides = reader.array(json.window_strides);
  815. $.base_dilations = reader.array(json.base_dilations);
  816. $.window_dilations = reader.array(json.window_dilations);
  817. $.padding = reader.array(json.padding);
  818. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  819. return $;
  820. }
  821. };
  822. circle.StablehloWhileOptions = class StablehloWhileOptions {
  823. static decode(reader, position) {
  824. const $ = new circle.StablehloWhileOptions();
  825. $.cond_subgraph_index = reader.int32_(position, 4, 0);
  826. $.body_subgraph_index = reader.int32_(position, 6, 0);
  827. return $;
  828. }
  829. static decodeText(reader, json) {
  830. const $ = new circle.StablehloWhileOptions();
  831. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  832. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  833. return $;
  834. }
  835. };
  836. circle.StablehloSortOptions = class StablehloSortOptions {
  837. static decode(reader, position) {
  838. const $ = new circle.StablehloSortOptions();
  839. $.dimension = reader.int64_(position, 4, 0);
  840. $.is_stable = reader.bool_(position, 6, false);
  841. $.comparator_subgraph_index = reader.int32_(position, 8, 0);
  842. return $;
  843. }
  844. static decodeText(reader, json) {
  845. const $ = new circle.StablehloSortOptions();
  846. $.dimension = reader.value(json.dimension, 0);
  847. $.is_stable = reader.value(json.is_stable, false);
  848. $.comparator_subgraph_index = reader.value(json.comparator_subgraph_index, 0);
  849. return $;
  850. }
  851. };
  852. circle.StablehloConcatenateOptions = class StablehloConcatenateOptions {
  853. static decode(reader, position) {
  854. const $ = new circle.StablehloConcatenateOptions();
  855. $.dimension = reader.int64_(position, 4, 0);
  856. return $;
  857. }
  858. static decodeText(reader, json) {
  859. const $ = new circle.StablehloConcatenateOptions();
  860. $.dimension = reader.value(json.dimension, 0);
  861. return $;
  862. }
  863. };
  864. circle.StablehloBroadcastInDimOptions = class StablehloBroadcastInDimOptions {
  865. static decode(reader, position) {
  866. const $ = new circle.StablehloBroadcastInDimOptions();
  867. $.broadcast_dimensions = reader.int64s_(position, 4);
  868. return $;
  869. }
  870. static decodeText(reader, json) {
  871. const $ = new circle.StablehloBroadcastInDimOptions();
  872. $.broadcast_dimensions = reader.array(json.broadcast_dimensions);
  873. return $;
  874. }
  875. };
  876. circle.StablehloComparisonDirection = {
  877. STABLEHLO_COMPARISON_DIRECTION_EQ: 0,
  878. STABLEHLO_COMPARISON_DIRECTION_NE: 1,
  879. STABLEHLO_COMPARISON_DIRECTION_GE: 2,
  880. STABLEHLO_COMPARISON_DIRECTION_GT: 3,
  881. STABLEHLO_COMPARISON_DIRECTION_LE: 4,
  882. STABLEHLO_COMPARISON_DIRECTION_LT: 5
  883. };
  884. circle.StablehloComparisonType = {
  885. STABLEHLO_COMPARISON_TYPE_NOTYPE: 0,
  886. STABLEHLO_COMPARISON_TYPE_FLOAT: 1,
  887. STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER: 2,
  888. STABLEHLO_COMPARISON_TYPE_SIGNED: 3,
  889. STABLEHLO_COMPARISON_TYPE_UNSIGNED: 4
  890. };
  891. circle.StablehloCompareOptions = class StablehloCompareOptions {
  892. static decode(reader, position) {
  893. const $ = new circle.StablehloCompareOptions();
  894. $.comparison_direction = reader.uint32_(position, 4, 0);
  895. $.compare_type = reader.uint32_(position, 6, 0);
  896. return $;
  897. }
  898. static decodeText(reader, json) {
  899. const $ = new circle.StablehloCompareOptions();
  900. $.comparison_direction = circle.StablehloComparisonDirection[json.comparison_direction];
  901. $.compare_type = circle.StablehloComparisonType[json.compare_type];
  902. return $;
  903. }
  904. };
  905. circle.StablehloDynamicSliceOptions = class StablehloDynamicSliceOptions {
  906. static decode(reader, position) {
  907. const $ = new circle.StablehloDynamicSliceOptions();
  908. $.slice_sizes = reader.int64s_(position, 4);
  909. return $;
  910. }
  911. static decodeText(reader, json) {
  912. const $ = new circle.StablehloDynamicSliceOptions();
  913. $.slice_sizes = reader.array(json.slice_sizes);
  914. return $;
  915. }
  916. };
  917. circle.StablehloPadOptions = class StablehloPadOptions {
  918. static decode(reader, position) {
  919. const $ = new circle.StablehloPadOptions();
  920. $.edge_padding_low = reader.int64s_(position, 4);
  921. $.edge_padding_high = reader.int64s_(position, 6);
  922. $.interior_padding = reader.int64s_(position, 8);
  923. return $;
  924. }
  925. static decodeText(reader, json) {
  926. const $ = new circle.StablehloPadOptions();
  927. $.edge_padding_low = reader.array(json.edge_padding_low);
  928. $.edge_padding_high = reader.array(json.edge_padding_high);
  929. $.interior_padding = reader.array(json.interior_padding);
  930. return $;
  931. }
  932. };
  933. circle.StablehloIotaOptions = class StablehloIotaOptions {
  934. static decode(reader, position) {
  935. const $ = new circle.StablehloIotaOptions();
  936. $.iota_dimension = reader.int64_(position, 4, 0);
  937. return $;
  938. }
  939. static decodeText(reader, json) {
  940. const $ = new circle.StablehloIotaOptions();
  941. $.iota_dimension = reader.value(json.iota_dimension, 0);
  942. return $;
  943. }
  944. };
  945. circle.StablehloCustomCallOptions = class StablehloCustomCallOptions {
  946. static decode(reader, position) {
  947. const $ = new circle.StablehloCustomCallOptions();
  948. $.call_target_name = reader.string_(position, 4, null);
  949. $.has_side_effect = reader.bool_(position, 6, false);
  950. $.backend_config = reader.string_(position, 8, null);
  951. $.api_version = reader.int32_(position, 10, 0);
  952. $.called_computations = reader.typedArray(position, 12, Int32Array);
  953. $.custom_attributes = reader.typedArray(position, 14, Uint8Array);
  954. return $;
  955. }
  956. static decodeText(reader, json) {
  957. const $ = new circle.StablehloCustomCallOptions();
  958. $.call_target_name = reader.value(json.call_target_name, null);
  959. $.has_side_effect = reader.value(json.has_side_effect, false);
  960. $.backend_config = reader.value(json.backend_config, null);
  961. $.api_version = reader.value(json.api_version, 0);
  962. $.called_computations = reader.typedArray(json.called_computations, Int32Array);
  963. $.custom_attributes = reader.typedArray(json.custom_attributes, Uint8Array);
  964. return $;
  965. }
  966. };
  967. circle.StablehloReduceOptions = class StablehloReduceOptions {
  968. static decode(reader, position) {
  969. const $ = new circle.StablehloReduceOptions();
  970. $.dimensions = reader.int64s_(position, 4);
  971. $.body_subgraph_index = reader.int32_(position, 6, 0);
  972. return $;
  973. }
  974. static decodeText(reader, json) {
  975. const $ = new circle.StablehloReduceOptions();
  976. $.dimensions = reader.array(json.dimensions);
  977. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  978. return $;
  979. }
  980. };
  981. circle.StablehloSliceOptions = class StablehloSliceOptions {
  982. static decode(reader, position) {
  983. const $ = new circle.StablehloSliceOptions();
  984. $.start_indices = reader.int64s_(position, 4);
  985. $.limit_indices = reader.int64s_(position, 6);
  986. $.strides = reader.int64s_(position, 8);
  987. return $;
  988. }
  989. static decodeText(reader, json) {
  990. const $ = new circle.StablehloSliceOptions();
  991. $.start_indices = reader.array(json.start_indices);
  992. $.limit_indices = reader.array(json.limit_indices);
  993. $.strides = reader.array(json.strides);
  994. return $;
  995. }
  996. };
  997. circle.StablehloConvolutionOptions = class StablehloConvolutionOptions {
  998. static decode(reader, position) {
  999. const $ = new circle.StablehloConvolutionOptions();
  1000. $.window_strides = reader.int64s_(position, 4);
  1001. $.padding = reader.int64s_(position, 6);
  1002. $.lhs_dilation = reader.int64s_(position, 8);
  1003. $.rhs_dilation = reader.int64s_(position, 10);
  1004. $.window_reversal = reader.bools_(position, 12);
  1005. $.input_batch_dimension = reader.int64_(position, 14, 0);
  1006. $.input_feature_dimension = reader.int64_(position, 16, 0);
  1007. $.input_spatial_dimensions = reader.int64s_(position, 18);
  1008. $.kernel_input_feature_dimension = reader.int64_(position, 20, 0);
  1009. $.kernel_output_feature_dimension = reader.int64_(position, 22, 0);
  1010. $.kernel_spatial_dimensions = reader.int64s_(position, 24);
  1011. $.output_batch_dimension = reader.int64_(position, 26, 0);
  1012. $.output_feature_dimension = reader.int64_(position, 28, 0);
  1013. $.output_spatial_dimensions = reader.int64s_(position, 30);
  1014. $.feature_group_count = reader.int64_(position, 32, 0);
  1015. $.batch_group_count = reader.int64_(position, 34, 0);
  1016. $.precision_config = reader.typedArray(position, 36, Uint32Array);
  1017. return $;
  1018. }
  1019. static decodeText(reader, json) {
  1020. const $ = new circle.StablehloConvolutionOptions();
  1021. $.window_strides = reader.array(json.window_strides);
  1022. $.padding = reader.array(json.padding);
  1023. $.lhs_dilation = reader.array(json.lhs_dilation);
  1024. $.rhs_dilation = reader.array(json.rhs_dilation);
  1025. $.window_reversal = reader.array(json.window_reversal);
  1026. $.input_batch_dimension = reader.value(json.input_batch_dimension, 0);
  1027. $.input_feature_dimension = reader.value(json.input_feature_dimension, 0);
  1028. $.input_spatial_dimensions = reader.array(json.input_spatial_dimensions);
  1029. $.kernel_input_feature_dimension = reader.value(json.kernel_input_feature_dimension, 0);
  1030. $.kernel_output_feature_dimension = reader.value(json.kernel_output_feature_dimension, 0);
  1031. $.kernel_spatial_dimensions = reader.array(json.kernel_spatial_dimensions);
  1032. $.output_batch_dimension = reader.value(json.output_batch_dimension, 0);
  1033. $.output_feature_dimension = reader.value(json.output_feature_dimension, 0);
  1034. $.output_spatial_dimensions = reader.array(json.output_spatial_dimensions);
  1035. $.feature_group_count = reader.value(json.feature_group_count, 0);
  1036. $.batch_group_count = reader.value(json.batch_group_count, 0);
  1037. $.precision_config = reader.objectArray(json.precision_config, circle.StablehloPrecisionConfig.decodeText);
  1038. return $;
  1039. }
  1040. };
  1041. circle.StablehloScatterOptions = class StablehloScatterOptions {
  1042. static decode(reader, position) {
  1043. const $ = new circle.StablehloScatterOptions();
  1044. $.indices_are_sorted = reader.bool_(position, 4, false);
  1045. $.update_window_dims = reader.int64s_(position, 6);
  1046. $.inserted_window_dims = reader.int64s_(position, 8);
  1047. $.scatter_dims_to_operand_dims = reader.int64s_(position, 10);
  1048. $.index_vector_dim = reader.int64_(position, 12, 0);
  1049. $.unique_indices = reader.bool_(position, 14, false);
  1050. $.update_computation_subgraph_index = reader.int32_(position, 16, 0);
  1051. return $;
  1052. }
  1053. static decodeText(reader, json) {
  1054. const $ = new circle.StablehloScatterOptions();
  1055. $.indices_are_sorted = reader.value(json.indices_are_sorted, false);
  1056. $.update_window_dims = reader.array(json.update_window_dims);
  1057. $.inserted_window_dims = reader.array(json.inserted_window_dims);
  1058. $.scatter_dims_to_operand_dims = reader.array(json.scatter_dims_to_operand_dims);
  1059. $.index_vector_dim = reader.value(json.index_vector_dim, 0);
  1060. $.unique_indices = reader.value(json.unique_indices, false);
  1061. $.update_computation_subgraph_index = reader.value(json.update_computation_subgraph_index, 0);
  1062. return $;
  1063. }
  1064. };
  1065. circle.RngAlgorithm = {
  1066. DEFAULT: 0,
  1067. PHILOX: 1,
  1068. THREEFRY: 2
  1069. };
  1070. circle.StablehloRngBitGeneratorOptions = class StablehloRngBitGeneratorOptions {
  1071. static decode(reader, position) {
  1072. const $ = new circle.StablehloRngBitGeneratorOptions();
  1073. $.algorithm = reader.int8_(position, 4, 0);
  1074. return $;
  1075. }
  1076. static decodeText(reader, json) {
  1077. const $ = new circle.StablehloRngBitGeneratorOptions();
  1078. $.algorithm = circle.RngAlgorithm[json.algorithm];
  1079. return $;
  1080. }
  1081. };
  1082. circle.Padding = {
  1083. SAME: 0,
  1084. VALID: 1
  1085. };
  1086. circle.ActivationFunctionType = {
  1087. NONE: 0,
  1088. RELU: 1,
  1089. RELU_N1_TO_1: 2,
  1090. RELU6: 3,
  1091. TANH: 4,
  1092. SIGN_BIT: 5
  1093. };
  1094. circle.Conv2DOptions = class Conv2DOptions {
  1095. static decode(reader, position) {
  1096. const $ = new circle.Conv2DOptions();
  1097. $.padding = reader.int8_(position, 4, 0);
  1098. $.stride_w = reader.int32_(position, 6, 0);
  1099. $.stride_h = reader.int32_(position, 8, 0);
  1100. $.fused_activation_function = reader.int8_(position, 10, 0);
  1101. $.dilation_w_factor = reader.int32_(position, 12, 1);
  1102. $.dilation_h_factor = reader.int32_(position, 14, 1);
  1103. $.quantized_bias_type = reader.int8_(position, 16, 0);
  1104. return $;
  1105. }
  1106. static decodeText(reader, json) {
  1107. const $ = new circle.Conv2DOptions();
  1108. $.padding = circle.Padding[json.padding];
  1109. $.stride_w = reader.value(json.stride_w, 0);
  1110. $.stride_h = reader.value(json.stride_h, 0);
  1111. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1112. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1113. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1114. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  1115. return $;
  1116. }
  1117. };
  1118. circle.Conv3DOptions = class Conv3DOptions {
  1119. static decode(reader, position) {
  1120. const $ = new circle.Conv3DOptions();
  1121. $.padding = reader.int8_(position, 4, 0);
  1122. $.stride_d = reader.int32_(position, 6, 0);
  1123. $.stride_w = reader.int32_(position, 8, 0);
  1124. $.stride_h = reader.int32_(position, 10, 0);
  1125. $.fused_activation_function = reader.int8_(position, 12, 0);
  1126. $.dilation_d_factor = reader.int32_(position, 14, 1);
  1127. $.dilation_w_factor = reader.int32_(position, 16, 1);
  1128. $.dilation_h_factor = reader.int32_(position, 18, 1);
  1129. return $;
  1130. }
  1131. static decodeText(reader, json) {
  1132. const $ = new circle.Conv3DOptions();
  1133. $.padding = circle.Padding[json.padding];
  1134. $.stride_d = reader.value(json.stride_d, 0);
  1135. $.stride_w = reader.value(json.stride_w, 0);
  1136. $.stride_h = reader.value(json.stride_h, 0);
  1137. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1138. $.dilation_d_factor = reader.value(json.dilation_d_factor, 1);
  1139. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1140. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1141. return $;
  1142. }
  1143. };
  1144. circle.Pool2DOptions = class Pool2DOptions {
  1145. static decode(reader, position) {
  1146. const $ = new circle.Pool2DOptions();
  1147. $.padding = reader.int8_(position, 4, 0);
  1148. $.stride_w = reader.int32_(position, 6, 0);
  1149. $.stride_h = reader.int32_(position, 8, 0);
  1150. $.filter_width = reader.int32_(position, 10, 0);
  1151. $.filter_height = reader.int32_(position, 12, 0);
  1152. $.fused_activation_function = reader.int8_(position, 14, 0);
  1153. return $;
  1154. }
  1155. static decodeText(reader, json) {
  1156. const $ = new circle.Pool2DOptions();
  1157. $.padding = circle.Padding[json.padding];
  1158. $.stride_w = reader.value(json.stride_w, 0);
  1159. $.stride_h = reader.value(json.stride_h, 0);
  1160. $.filter_width = reader.value(json.filter_width, 0);
  1161. $.filter_height = reader.value(json.filter_height, 0);
  1162. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1163. return $;
  1164. }
  1165. };
  1166. circle.DepthwiseConv2DOptions = class DepthwiseConv2DOptions {
  1167. static decode(reader, position) {
  1168. const $ = new circle.DepthwiseConv2DOptions();
  1169. $.padding = reader.int8_(position, 4, 0);
  1170. $.stride_w = reader.int32_(position, 6, 0);
  1171. $.stride_h = reader.int32_(position, 8, 0);
  1172. $.depth_multiplier = reader.int32_(position, 10, 0);
  1173. $.fused_activation_function = reader.int8_(position, 12, 0);
  1174. $.dilation_w_factor = reader.int32_(position, 14, 1);
  1175. $.dilation_h_factor = reader.int32_(position, 16, 1);
  1176. return $;
  1177. }
  1178. static decodeText(reader, json) {
  1179. const $ = new circle.DepthwiseConv2DOptions();
  1180. $.padding = circle.Padding[json.padding];
  1181. $.stride_w = reader.value(json.stride_w, 0);
  1182. $.stride_h = reader.value(json.stride_h, 0);
  1183. $.depth_multiplier = reader.value(json.depth_multiplier, 0);
  1184. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1185. $.dilation_w_factor = reader.value(json.dilation_w_factor, 1);
  1186. $.dilation_h_factor = reader.value(json.dilation_h_factor, 1);
  1187. return $;
  1188. }
  1189. };
  1190. circle.ConcatEmbeddingsOptions = class ConcatEmbeddingsOptions {
  1191. static decode(reader, position) {
  1192. const $ = new circle.ConcatEmbeddingsOptions();
  1193. $.num_channels = reader.int32_(position, 4, 0);
  1194. $.num_columns_per_channel = reader.typedArray(position, 6, Int32Array);
  1195. $.embedding_dim_per_channel = reader.typedArray(position, 8, Int32Array);
  1196. return $;
  1197. }
  1198. static decodeText(reader, json) {
  1199. const $ = new circle.ConcatEmbeddingsOptions();
  1200. $.num_channels = reader.value(json.num_channels, 0);
  1201. $.num_columns_per_channel = reader.typedArray(json.num_columns_per_channel, Int32Array);
  1202. $.embedding_dim_per_channel = reader.typedArray(json.embedding_dim_per_channel, Int32Array);
  1203. return $;
  1204. }
  1205. };
  1206. circle.LSHProjectionType = {
  1207. UNKNOWN: 0,
  1208. SPARSE: 1,
  1209. DENSE: 2
  1210. };
  1211. circle.LSHProjectionOptions = class LSHProjectionOptions {
  1212. static decode(reader, position) {
  1213. const $ = new circle.LSHProjectionOptions();
  1214. $.type = reader.int8_(position, 4, 0);
  1215. return $;
  1216. }
  1217. static decodeText(reader, json) {
  1218. const $ = new circle.LSHProjectionOptions();
  1219. $.type = circle.LSHProjectionType[json.type];
  1220. return $;
  1221. }
  1222. };
  1223. circle.SVDFOptions = class SVDFOptions {
  1224. static decode(reader, position) {
  1225. const $ = new circle.SVDFOptions();
  1226. $.rank = reader.int32_(position, 4, 0);
  1227. $.fused_activation_function = reader.int8_(position, 6, 0);
  1228. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  1229. return $;
  1230. }
  1231. static decodeText(reader, json) {
  1232. const $ = new circle.SVDFOptions();
  1233. $.rank = reader.value(json.rank, 0);
  1234. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1235. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1236. return $;
  1237. }
  1238. };
  1239. circle.RNNOptions = class RNNOptions {
  1240. static decode(reader, position) {
  1241. const $ = new circle.RNNOptions();
  1242. $.fused_activation_function = reader.int8_(position, 4, 0);
  1243. $.asymmetric_quantize_inputs = reader.bool_(position, 6, false);
  1244. return $;
  1245. }
  1246. static decodeText(reader, json) {
  1247. const $ = new circle.RNNOptions();
  1248. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1249. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1250. return $;
  1251. }
  1252. };
  1253. circle.SequenceRNNOptions = class SequenceRNNOptions {
  1254. static decode(reader, position) {
  1255. const $ = new circle.SequenceRNNOptions();
  1256. $.time_major = reader.bool_(position, 4, false);
  1257. $.fused_activation_function = reader.int8_(position, 6, 0);
  1258. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  1259. return $;
  1260. }
  1261. static decodeText(reader, json) {
  1262. const $ = new circle.SequenceRNNOptions();
  1263. $.time_major = reader.value(json.time_major, false);
  1264. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1265. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1266. return $;
  1267. }
  1268. };
  1269. circle.BidirectionalSequenceRNNOptions = class BidirectionalSequenceRNNOptions {
  1270. static decode(reader, position) {
  1271. const $ = new circle.BidirectionalSequenceRNNOptions();
  1272. $.time_major = reader.bool_(position, 4, false);
  1273. $.fused_activation_function = reader.int8_(position, 6, 0);
  1274. $.merge_outputs = reader.bool_(position, 8, false);
  1275. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  1276. return $;
  1277. }
  1278. static decodeText(reader, json) {
  1279. const $ = new circle.BidirectionalSequenceRNNOptions();
  1280. $.time_major = reader.value(json.time_major, false);
  1281. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1282. $.merge_outputs = reader.value(json.merge_outputs, false);
  1283. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1284. return $;
  1285. }
  1286. };
  1287. circle.FullyConnectedOptionsWeightsFormat = {
  1288. DEFAULT: 0,
  1289. SHUFFLED4x16INT8: 1,
  1290. SHUFFLED16x1FLOAT32: 127
  1291. };
  1292. circle.FullyConnectedOptions = class FullyConnectedOptions {
  1293. static decode(reader, position) {
  1294. const $ = new circle.FullyConnectedOptions();
  1295. $.fused_activation_function = reader.int8_(position, 4, 0);
  1296. $.weights_format = reader.int8_(position, 6, 0);
  1297. $.keep_num_dims = reader.bool_(position, 8, false);
  1298. $.asymmetric_quantize_inputs = reader.bool_(position, 10, false);
  1299. $.quantized_bias_type = reader.int8_(position, 12, 0);
  1300. return $;
  1301. }
  1302. static decodeText(reader, json) {
  1303. const $ = new circle.FullyConnectedOptions();
  1304. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1305. $.weights_format = circle.FullyConnectedOptionsWeightsFormat[json.weights_format];
  1306. $.keep_num_dims = reader.value(json.keep_num_dims, false);
  1307. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1308. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  1309. return $;
  1310. }
  1311. };
  1312. circle.SoftmaxOptions = class SoftmaxOptions {
  1313. static decode(reader, position) {
  1314. const $ = new circle.SoftmaxOptions();
  1315. $.beta = reader.float32_(position, 4, 0);
  1316. return $;
  1317. }
  1318. static decodeText(reader, json) {
  1319. const $ = new circle.SoftmaxOptions();
  1320. $.beta = reader.value(json.beta, 0);
  1321. return $;
  1322. }
  1323. };
  1324. circle.ConcatenationOptions = class ConcatenationOptions {
  1325. static decode(reader, position) {
  1326. const $ = new circle.ConcatenationOptions();
  1327. $.axis = reader.int32_(position, 4, 0);
  1328. $.fused_activation_function = reader.int8_(position, 6, 0);
  1329. return $;
  1330. }
  1331. static decodeText(reader, json) {
  1332. const $ = new circle.ConcatenationOptions();
  1333. $.axis = reader.value(json.axis, 0);
  1334. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1335. return $;
  1336. }
  1337. };
  1338. circle.AddOptions = class AddOptions {
  1339. static decode(reader, position) {
  1340. const $ = new circle.AddOptions();
  1341. $.fused_activation_function = reader.int8_(position, 4, 0);
  1342. $.pot_scale_int16 = reader.bool_(position, 6, true);
  1343. return $;
  1344. }
  1345. static decodeText(reader, json) {
  1346. const $ = new circle.AddOptions();
  1347. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1348. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  1349. return $;
  1350. }
  1351. };
  1352. circle.MulOptions = class MulOptions {
  1353. static decode(reader, position) {
  1354. const $ = new circle.MulOptions();
  1355. $.fused_activation_function = reader.int8_(position, 4, 0);
  1356. return $;
  1357. }
  1358. static decodeText(reader, json) {
  1359. const $ = new circle.MulOptions();
  1360. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1361. return $;
  1362. }
  1363. };
  1364. circle.L2NormOptions = class L2NormOptions {
  1365. static decode(reader, position) {
  1366. const $ = new circle.L2NormOptions();
  1367. $.fused_activation_function = reader.int8_(position, 4, 0);
  1368. return $;
  1369. }
  1370. static decodeText(reader, json) {
  1371. const $ = new circle.L2NormOptions();
  1372. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1373. return $;
  1374. }
  1375. };
  1376. circle.LocalResponseNormalizationOptions = class LocalResponseNormalizationOptions {
  1377. static decode(reader, position) {
  1378. const $ = new circle.LocalResponseNormalizationOptions();
  1379. $.radius = reader.int32_(position, 4, 0);
  1380. $.bias = reader.float32_(position, 6, 0);
  1381. $.alpha = reader.float32_(position, 8, 0);
  1382. $.beta = reader.float32_(position, 10, 0);
  1383. return $;
  1384. }
  1385. static decodeText(reader, json) {
  1386. const $ = new circle.LocalResponseNormalizationOptions();
  1387. $.radius = reader.value(json.radius, 0);
  1388. $.bias = reader.value(json.bias, 0);
  1389. $.alpha = reader.value(json.alpha, 0);
  1390. $.beta = reader.value(json.beta, 0);
  1391. return $;
  1392. }
  1393. };
  1394. circle.LSTMKernelType = {
  1395. FULL: 0,
  1396. BASIC: 1
  1397. };
  1398. circle.LSTMOptions = class LSTMOptions {
  1399. static decode(reader, position) {
  1400. const $ = new circle.LSTMOptions();
  1401. $.fused_activation_function = reader.int8_(position, 4, 0);
  1402. $.cell_clip = reader.float32_(position, 6, 0);
  1403. $.proj_clip = reader.float32_(position, 8, 0);
  1404. $.kernel_type = reader.int8_(position, 10, 0);
  1405. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  1406. return $;
  1407. }
  1408. static decodeText(reader, json) {
  1409. const $ = new circle.LSTMOptions();
  1410. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1411. $.cell_clip = reader.value(json.cell_clip, 0);
  1412. $.proj_clip = reader.value(json.proj_clip, 0);
  1413. $.kernel_type = circle.LSTMKernelType[json.kernel_type];
  1414. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1415. return $;
  1416. }
  1417. };
  1418. circle.UnidirectionalSequenceLSTMOptions = class UnidirectionalSequenceLSTMOptions {
  1419. static decode(reader, position) {
  1420. const $ = new circle.UnidirectionalSequenceLSTMOptions();
  1421. $.fused_activation_function = reader.int8_(position, 4, 0);
  1422. $.cell_clip = reader.float32_(position, 6, 0);
  1423. $.proj_clip = reader.float32_(position, 8, 0);
  1424. $.time_major = reader.bool_(position, 10, false);
  1425. $.asymmetric_quantize_inputs = reader.bool_(position, 12, false);
  1426. $.diagonal_recurrent_tensors = reader.bool_(position, 14, false);
  1427. return $;
  1428. }
  1429. static decodeText(reader, json) {
  1430. const $ = new circle.UnidirectionalSequenceLSTMOptions();
  1431. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1432. $.cell_clip = reader.value(json.cell_clip, 0);
  1433. $.proj_clip = reader.value(json.proj_clip, 0);
  1434. $.time_major = reader.value(json.time_major, false);
  1435. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1436. $.diagonal_recurrent_tensors = reader.value(json.diagonal_recurrent_tensors, false);
  1437. return $;
  1438. }
  1439. };
  1440. circle.BidirectionalSequenceLSTMOptions = class BidirectionalSequenceLSTMOptions {
  1441. static decode(reader, position) {
  1442. const $ = new circle.BidirectionalSequenceLSTMOptions();
  1443. $.fused_activation_function = reader.int8_(position, 4, 0);
  1444. $.cell_clip = reader.float32_(position, 6, 0);
  1445. $.proj_clip = reader.float32_(position, 8, 0);
  1446. $.merge_outputs = reader.bool_(position, 10, false);
  1447. $.time_major = reader.bool_(position, 12, true);
  1448. $.asymmetric_quantize_inputs = reader.bool_(position, 14, false);
  1449. return $;
  1450. }
  1451. static decodeText(reader, json) {
  1452. const $ = new circle.BidirectionalSequenceLSTMOptions();
  1453. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1454. $.cell_clip = reader.value(json.cell_clip, 0);
  1455. $.proj_clip = reader.value(json.proj_clip, 0);
  1456. $.merge_outputs = reader.value(json.merge_outputs, false);
  1457. $.time_major = reader.value(json.time_major, true);
  1458. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  1459. return $;
  1460. }
  1461. };
  1462. circle.ResizeBilinearOptions = class ResizeBilinearOptions {
  1463. static decode(reader, position) {
  1464. const $ = new circle.ResizeBilinearOptions();
  1465. $.new_height = reader.int32_(position, 4, 0);
  1466. $.new_width = reader.int32_(position, 6, 0);
  1467. $.align_corners = reader.bool_(position, 8, false);
  1468. $.half_pixel_centers = reader.bool_(position, 10, false);
  1469. return $;
  1470. }
  1471. static decodeText(reader, json) {
  1472. const $ = new circle.ResizeBilinearOptions();
  1473. $.new_height = reader.value(json.new_height, 0);
  1474. $.new_width = reader.value(json.new_width, 0);
  1475. $.align_corners = reader.value(json.align_corners, false);
  1476. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  1477. return $;
  1478. }
  1479. };
  1480. circle.ResizeNearestNeighborOptions = class ResizeNearestNeighborOptions {
  1481. static decode(reader, position) {
  1482. const $ = new circle.ResizeNearestNeighborOptions();
  1483. $.align_corners = reader.bool_(position, 4, false);
  1484. $.half_pixel_centers = reader.bool_(position, 6, false);
  1485. return $;
  1486. }
  1487. static decodeText(reader, json) {
  1488. const $ = new circle.ResizeNearestNeighborOptions();
  1489. $.align_corners = reader.value(json.align_corners, false);
  1490. $.half_pixel_centers = reader.value(json.half_pixel_centers, false);
  1491. return $;
  1492. }
  1493. };
  1494. circle.CallOptions = class CallOptions {
  1495. static decode(reader, position) {
  1496. const $ = new circle.CallOptions();
  1497. $.subgraph = reader.uint32_(position, 4, 0);
  1498. return $;
  1499. }
  1500. static decodeText(reader, json) {
  1501. const $ = new circle.CallOptions();
  1502. $.subgraph = reader.value(json.subgraph, 0);
  1503. return $;
  1504. }
  1505. };
  1506. circle.PadOptions = class PadOptions {
  1507. static decode(/* reader, position */) {
  1508. const $ = new circle.PadOptions();
  1509. return $;
  1510. }
  1511. static decodeText(/* reader, json */) {
  1512. const $ = new circle.PadOptions();
  1513. return $;
  1514. }
  1515. };
  1516. circle.PadV2Options = class PadV2Options {
  1517. static decode(/* reader, position */) {
  1518. const $ = new circle.PadV2Options();
  1519. return $;
  1520. }
  1521. static decodeText(/* reader, json */) {
  1522. const $ = new circle.PadV2Options();
  1523. return $;
  1524. }
  1525. };
  1526. circle.ReshapeOptions = class ReshapeOptions {
  1527. static decode(reader, position) {
  1528. const $ = new circle.ReshapeOptions();
  1529. $.new_shape = reader.typedArray(position, 4, Int32Array);
  1530. return $;
  1531. }
  1532. static decodeText(reader, json) {
  1533. const $ = new circle.ReshapeOptions();
  1534. $.new_shape = reader.typedArray(json.new_shape, Int32Array);
  1535. return $;
  1536. }
  1537. };
  1538. circle.SpaceToBatchNDOptions = class SpaceToBatchNDOptions {
  1539. static decode(/* reader, position */) {
  1540. const $ = new circle.SpaceToBatchNDOptions();
  1541. return $;
  1542. }
  1543. static decodeText(/* reader, json */) {
  1544. const $ = new circle.SpaceToBatchNDOptions();
  1545. return $;
  1546. }
  1547. };
  1548. circle.BatchToSpaceNDOptions = class BatchToSpaceNDOptions {
  1549. static decode(/* reader, position */) {
  1550. const $ = new circle.BatchToSpaceNDOptions();
  1551. return $;
  1552. }
  1553. static decodeText(/* reader, json */) {
  1554. const $ = new circle.BatchToSpaceNDOptions();
  1555. return $;
  1556. }
  1557. };
  1558. circle.SkipGramOptions = class SkipGramOptions {
  1559. static decode(reader, position) {
  1560. const $ = new circle.SkipGramOptions();
  1561. $.ngram_size = reader.int32_(position, 4, 0);
  1562. $.max_skip_size = reader.int32_(position, 6, 0);
  1563. $.include_all_ngrams = reader.bool_(position, 8, false);
  1564. return $;
  1565. }
  1566. static decodeText(reader, json) {
  1567. const $ = new circle.SkipGramOptions();
  1568. $.ngram_size = reader.value(json.ngram_size, 0);
  1569. $.max_skip_size = reader.value(json.max_skip_size, 0);
  1570. $.include_all_ngrams = reader.value(json.include_all_ngrams, false);
  1571. return $;
  1572. }
  1573. };
  1574. circle.SpaceToDepthOptions = class SpaceToDepthOptions {
  1575. static decode(reader, position) {
  1576. const $ = new circle.SpaceToDepthOptions();
  1577. $.block_size = reader.int32_(position, 4, 0);
  1578. return $;
  1579. }
  1580. static decodeText(reader, json) {
  1581. const $ = new circle.SpaceToDepthOptions();
  1582. $.block_size = reader.value(json.block_size, 0);
  1583. return $;
  1584. }
  1585. };
  1586. circle.DepthToSpaceOptions = class DepthToSpaceOptions {
  1587. static decode(reader, position) {
  1588. const $ = new circle.DepthToSpaceOptions();
  1589. $.block_size = reader.int32_(position, 4, 0);
  1590. return $;
  1591. }
  1592. static decodeText(reader, json) {
  1593. const $ = new circle.DepthToSpaceOptions();
  1594. $.block_size = reader.value(json.block_size, 0);
  1595. return $;
  1596. }
  1597. };
  1598. circle.SubOptions = class SubOptions {
  1599. static decode(reader, position) {
  1600. const $ = new circle.SubOptions();
  1601. $.fused_activation_function = reader.int8_(position, 4, 0);
  1602. $.pot_scale_int16 = reader.bool_(position, 6, true);
  1603. return $;
  1604. }
  1605. static decodeText(reader, json) {
  1606. const $ = new circle.SubOptions();
  1607. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1608. $.pot_scale_int16 = reader.value(json.pot_scale_int16, true);
  1609. return $;
  1610. }
  1611. };
  1612. circle.DivOptions = class DivOptions {
  1613. static decode(reader, position) {
  1614. const $ = new circle.DivOptions();
  1615. $.fused_activation_function = reader.int8_(position, 4, 0);
  1616. return $;
  1617. }
  1618. static decodeText(reader, json) {
  1619. const $ = new circle.DivOptions();
  1620. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1621. return $;
  1622. }
  1623. };
  1624. circle.TopKV2Options = class TopKV2Options {
  1625. static decode(/* reader, position */) {
  1626. const $ = new circle.TopKV2Options();
  1627. return $;
  1628. }
  1629. static decodeText(/* reader, json */) {
  1630. const $ = new circle.TopKV2Options();
  1631. return $;
  1632. }
  1633. };
  1634. circle.CombinerType = {
  1635. SUM: 0,
  1636. MEAN: 1,
  1637. SQRTN: 2
  1638. };
  1639. circle.EmbeddingLookupSparseOptions = class EmbeddingLookupSparseOptions {
  1640. static decode(reader, position) {
  1641. const $ = new circle.EmbeddingLookupSparseOptions();
  1642. $.combiner = reader.int8_(position, 4, 0);
  1643. return $;
  1644. }
  1645. static decodeText(reader, json) {
  1646. const $ = new circle.EmbeddingLookupSparseOptions();
  1647. $.combiner = circle.CombinerType[json.combiner];
  1648. return $;
  1649. }
  1650. };
  1651. circle.GatherOptions = class GatherOptions {
  1652. static decode(reader, position) {
  1653. const $ = new circle.GatherOptions();
  1654. $.axis = reader.int32_(position, 4, 0);
  1655. $.batch_dims = reader.int32_(position, 6, 0);
  1656. return $;
  1657. }
  1658. static decodeText(reader, json) {
  1659. const $ = new circle.GatherOptions();
  1660. $.axis = reader.value(json.axis, 0);
  1661. $.batch_dims = reader.value(json.batch_dims, 0);
  1662. return $;
  1663. }
  1664. };
  1665. circle.TransposeOptions = class TransposeOptions {
  1666. static decode(/* reader, position */) {
  1667. const $ = new circle.TransposeOptions();
  1668. return $;
  1669. }
  1670. static decodeText(/* reader, json */) {
  1671. const $ = new circle.TransposeOptions();
  1672. return $;
  1673. }
  1674. };
  1675. circle.ExpOptions = class ExpOptions {
  1676. static decode(/* reader, position */) {
  1677. const $ = new circle.ExpOptions();
  1678. return $;
  1679. }
  1680. static decodeText(/* reader, json */) {
  1681. const $ = new circle.ExpOptions();
  1682. return $;
  1683. }
  1684. };
  1685. circle.CosOptions = class CosOptions {
  1686. static decode(/* reader, position */) {
  1687. const $ = new circle.CosOptions();
  1688. return $;
  1689. }
  1690. static decodeText(/* reader, json */) {
  1691. const $ = new circle.CosOptions();
  1692. return $;
  1693. }
  1694. };
  1695. circle.ReducerOptions = class ReducerOptions {
  1696. static decode(reader, position) {
  1697. const $ = new circle.ReducerOptions();
  1698. $.keep_dims = reader.bool_(position, 4, false);
  1699. return $;
  1700. }
  1701. static decodeText(reader, json) {
  1702. const $ = new circle.ReducerOptions();
  1703. $.keep_dims = reader.value(json.keep_dims, false);
  1704. return $;
  1705. }
  1706. };
  1707. circle.SqueezeOptions = class SqueezeOptions {
  1708. static decode(reader, position) {
  1709. const $ = new circle.SqueezeOptions();
  1710. $.squeeze_dims = reader.typedArray(position, 4, Int32Array);
  1711. return $;
  1712. }
  1713. static decodeText(reader, json) {
  1714. const $ = new circle.SqueezeOptions();
  1715. $.squeeze_dims = reader.typedArray(json.squeeze_dims, Int32Array);
  1716. return $;
  1717. }
  1718. };
  1719. circle.SplitOptions = class SplitOptions {
  1720. static decode(reader, position) {
  1721. const $ = new circle.SplitOptions();
  1722. $.num_splits = reader.int32_(position, 4, 0);
  1723. return $;
  1724. }
  1725. static decodeText(reader, json) {
  1726. const $ = new circle.SplitOptions();
  1727. $.num_splits = reader.value(json.num_splits, 0);
  1728. return $;
  1729. }
  1730. };
  1731. circle.SplitVOptions = class SplitVOptions {
  1732. static decode(reader, position) {
  1733. const $ = new circle.SplitVOptions();
  1734. $.num_splits = reader.int32_(position, 4, 0);
  1735. return $;
  1736. }
  1737. static decodeText(reader, json) {
  1738. const $ = new circle.SplitVOptions();
  1739. $.num_splits = reader.value(json.num_splits, 0);
  1740. return $;
  1741. }
  1742. };
  1743. circle.StridedSliceOptions = class StridedSliceOptions {
  1744. static decode(reader, position) {
  1745. const $ = new circle.StridedSliceOptions();
  1746. $.begin_mask = reader.int32_(position, 4, 0);
  1747. $.end_mask = reader.int32_(position, 6, 0);
  1748. $.ellipsis_mask = reader.int32_(position, 8, 0);
  1749. $.new_axis_mask = reader.int32_(position, 10, 0);
  1750. $.shrink_axis_mask = reader.int32_(position, 12, 0);
  1751. $.offset = reader.bool_(position, 14, false);
  1752. return $;
  1753. }
  1754. static decodeText(reader, json) {
  1755. const $ = new circle.StridedSliceOptions();
  1756. $.begin_mask = reader.value(json.begin_mask, 0);
  1757. $.end_mask = reader.value(json.end_mask, 0);
  1758. $.ellipsis_mask = reader.value(json.ellipsis_mask, 0);
  1759. $.new_axis_mask = reader.value(json.new_axis_mask, 0);
  1760. $.shrink_axis_mask = reader.value(json.shrink_axis_mask, 0);
  1761. $.offset = reader.value(json.offset, false);
  1762. return $;
  1763. }
  1764. };
  1765. circle.LogSoftmaxOptions = class LogSoftmaxOptions {
  1766. static decode(/* reader, position */) {
  1767. const $ = new circle.LogSoftmaxOptions();
  1768. return $;
  1769. }
  1770. static decodeText(/* reader, json */) {
  1771. const $ = new circle.LogSoftmaxOptions();
  1772. return $;
  1773. }
  1774. };
  1775. circle.CastOptions = class CastOptions {
  1776. static decode(reader, position) {
  1777. const $ = new circle.CastOptions();
  1778. $.in_data_type = reader.int8_(position, 4, 0);
  1779. $.out_data_type = reader.int8_(position, 6, 0);
  1780. return $;
  1781. }
  1782. static decodeText(reader, json) {
  1783. const $ = new circle.CastOptions();
  1784. $.in_data_type = circle.TensorType[json.in_data_type];
  1785. $.out_data_type = circle.TensorType[json.out_data_type];
  1786. return $;
  1787. }
  1788. };
  1789. circle.DequantizeOptions = class DequantizeOptions {
  1790. static decode(/* reader, position */) {
  1791. const $ = new circle.DequantizeOptions();
  1792. return $;
  1793. }
  1794. static decodeText(/* reader, json */) {
  1795. const $ = new circle.DequantizeOptions();
  1796. return $;
  1797. }
  1798. };
  1799. circle.MaximumMinimumOptions = class MaximumMinimumOptions {
  1800. static decode(/* reader, position */) {
  1801. const $ = new circle.MaximumMinimumOptions();
  1802. return $;
  1803. }
  1804. static decodeText(/* reader, json */) {
  1805. const $ = new circle.MaximumMinimumOptions();
  1806. return $;
  1807. }
  1808. };
  1809. circle.TileOptions = class TileOptions {
  1810. static decode(/* reader, position */) {
  1811. const $ = new circle.TileOptions();
  1812. return $;
  1813. }
  1814. static decodeText(/* reader, json */) {
  1815. const $ = new circle.TileOptions();
  1816. return $;
  1817. }
  1818. };
  1819. circle.ArgMaxOptions = class ArgMaxOptions {
  1820. static decode(reader, position) {
  1821. const $ = new circle.ArgMaxOptions();
  1822. $.output_type = reader.int8_(position, 4, 0);
  1823. return $;
  1824. }
  1825. static decodeText(reader, json) {
  1826. const $ = new circle.ArgMaxOptions();
  1827. $.output_type = circle.TensorType[json.output_type];
  1828. return $;
  1829. }
  1830. };
  1831. circle.ArgMinOptions = class ArgMinOptions {
  1832. static decode(reader, position) {
  1833. const $ = new circle.ArgMinOptions();
  1834. $.output_type = reader.int8_(position, 4, 0);
  1835. return $;
  1836. }
  1837. static decodeText(reader, json) {
  1838. const $ = new circle.ArgMinOptions();
  1839. $.output_type = circle.TensorType[json.output_type];
  1840. return $;
  1841. }
  1842. };
  1843. circle.GreaterOptions = class GreaterOptions {
  1844. static decode(/* reader, position */) {
  1845. const $ = new circle.GreaterOptions();
  1846. return $;
  1847. }
  1848. static decodeText(/* reader, json */) {
  1849. const $ = new circle.GreaterOptions();
  1850. return $;
  1851. }
  1852. };
  1853. circle.GreaterEqualOptions = class GreaterEqualOptions {
  1854. static decode(/* reader, position */) {
  1855. const $ = new circle.GreaterEqualOptions();
  1856. return $;
  1857. }
  1858. static decodeText(/* reader, json */) {
  1859. const $ = new circle.GreaterEqualOptions();
  1860. return $;
  1861. }
  1862. };
  1863. circle.LessOptions = class LessOptions {
  1864. static decode(/* reader, position */) {
  1865. const $ = new circle.LessOptions();
  1866. return $;
  1867. }
  1868. static decodeText(/* reader, json */) {
  1869. const $ = new circle.LessOptions();
  1870. return $;
  1871. }
  1872. };
  1873. circle.LessEqualOptions = class LessEqualOptions {
  1874. static decode(/* reader, position */) {
  1875. const $ = new circle.LessEqualOptions();
  1876. return $;
  1877. }
  1878. static decodeText(/* reader, json */) {
  1879. const $ = new circle.LessEqualOptions();
  1880. return $;
  1881. }
  1882. };
  1883. circle.NegOptions = class NegOptions {
  1884. static decode(/* reader, position */) {
  1885. const $ = new circle.NegOptions();
  1886. return $;
  1887. }
  1888. static decodeText(/* reader, json */) {
  1889. const $ = new circle.NegOptions();
  1890. return $;
  1891. }
  1892. };
  1893. circle.SelectOptions = class SelectOptions {
  1894. static decode(/* reader, position */) {
  1895. const $ = new circle.SelectOptions();
  1896. return $;
  1897. }
  1898. static decodeText(/* reader, json */) {
  1899. const $ = new circle.SelectOptions();
  1900. return $;
  1901. }
  1902. };
  1903. circle.SliceOptions = class SliceOptions {
  1904. static decode(/* reader, position */) {
  1905. const $ = new circle.SliceOptions();
  1906. return $;
  1907. }
  1908. static decodeText(/* reader, json */) {
  1909. const $ = new circle.SliceOptions();
  1910. return $;
  1911. }
  1912. };
  1913. circle.TransposeConvOptions = class TransposeConvOptions {
  1914. static decode(reader, position) {
  1915. const $ = new circle.TransposeConvOptions();
  1916. $.padding = reader.int8_(position, 4, 0);
  1917. $.stride_w = reader.int32_(position, 6, 0);
  1918. $.stride_h = reader.int32_(position, 8, 0);
  1919. $.fused_activation_function = reader.int8_(position, 10, 0);
  1920. $.quantized_bias_type = reader.int8_(position, 12, 0);
  1921. return $;
  1922. }
  1923. static decodeText(reader, json) {
  1924. const $ = new circle.TransposeConvOptions();
  1925. $.padding = circle.Padding[json.padding];
  1926. $.stride_w = reader.value(json.stride_w, 0);
  1927. $.stride_h = reader.value(json.stride_h, 0);
  1928. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  1929. $.quantized_bias_type = circle.TensorType[json.quantized_bias_type];
  1930. return $;
  1931. }
  1932. };
  1933. circle.ExpandDimsOptions = class ExpandDimsOptions {
  1934. static decode(/* reader, position */) {
  1935. const $ = new circle.ExpandDimsOptions();
  1936. return $;
  1937. }
  1938. static decodeText(/* reader, json */) {
  1939. const $ = new circle.ExpandDimsOptions();
  1940. return $;
  1941. }
  1942. };
  1943. circle.SparseToDenseOptions = class SparseToDenseOptions {
  1944. static decode(reader, position) {
  1945. const $ = new circle.SparseToDenseOptions();
  1946. $.validate_indices = reader.bool_(position, 4, false);
  1947. return $;
  1948. }
  1949. static decodeText(reader, json) {
  1950. const $ = new circle.SparseToDenseOptions();
  1951. $.validate_indices = reader.value(json.validate_indices, false);
  1952. return $;
  1953. }
  1954. };
  1955. circle.EqualOptions = class EqualOptions {
  1956. static decode(/* reader, position */) {
  1957. const $ = new circle.EqualOptions();
  1958. return $;
  1959. }
  1960. static decodeText(/* reader, json */) {
  1961. const $ = new circle.EqualOptions();
  1962. return $;
  1963. }
  1964. };
  1965. circle.NotEqualOptions = class NotEqualOptions {
  1966. static decode(/* reader, position */) {
  1967. const $ = new circle.NotEqualOptions();
  1968. return $;
  1969. }
  1970. static decodeText(/* reader, json */) {
  1971. const $ = new circle.NotEqualOptions();
  1972. return $;
  1973. }
  1974. };
  1975. circle.ShapeOptions = class ShapeOptions {
  1976. static decode(reader, position) {
  1977. const $ = new circle.ShapeOptions();
  1978. $.out_type = reader.int8_(position, 4, 0);
  1979. return $;
  1980. }
  1981. static decodeText(reader, json) {
  1982. const $ = new circle.ShapeOptions();
  1983. $.out_type = circle.TensorType[json.out_type];
  1984. return $;
  1985. }
  1986. };
  1987. circle.RankOptions = class RankOptions {
  1988. static decode(/* reader, position */) {
  1989. const $ = new circle.RankOptions();
  1990. return $;
  1991. }
  1992. static decodeText(/* reader, json */) {
  1993. const $ = new circle.RankOptions();
  1994. return $;
  1995. }
  1996. };
  1997. circle.PowOptions = class PowOptions {
  1998. static decode(/* reader, position */) {
  1999. const $ = new circle.PowOptions();
  2000. return $;
  2001. }
  2002. static decodeText(/* reader, json */) {
  2003. const $ = new circle.PowOptions();
  2004. return $;
  2005. }
  2006. };
  2007. circle.FakeQuantOptions = class FakeQuantOptions {
  2008. static decode(reader, position) {
  2009. const $ = new circle.FakeQuantOptions();
  2010. $.min = reader.float32_(position, 4, 0);
  2011. $.max = reader.float32_(position, 6, 0);
  2012. $.num_bits = reader.int32_(position, 8, 0);
  2013. $.narrow_range = reader.bool_(position, 10, false);
  2014. return $;
  2015. }
  2016. static decodeText(reader, json) {
  2017. const $ = new circle.FakeQuantOptions();
  2018. $.min = reader.value(json.min, 0);
  2019. $.max = reader.value(json.max, 0);
  2020. $.num_bits = reader.value(json.num_bits, 0);
  2021. $.narrow_range = reader.value(json.narrow_range, false);
  2022. return $;
  2023. }
  2024. };
  2025. circle.PackOptions = class PackOptions {
  2026. static decode(reader, position) {
  2027. const $ = new circle.PackOptions();
  2028. $.values_count = reader.int32_(position, 4, 0);
  2029. $.axis = reader.int32_(position, 6, 0);
  2030. return $;
  2031. }
  2032. static decodeText(reader, json) {
  2033. const $ = new circle.PackOptions();
  2034. $.values_count = reader.value(json.values_count, 0);
  2035. $.axis = reader.value(json.axis, 0);
  2036. return $;
  2037. }
  2038. };
  2039. circle.LogicalOrOptions = class LogicalOrOptions {
  2040. static decode(/* reader, position */) {
  2041. const $ = new circle.LogicalOrOptions();
  2042. return $;
  2043. }
  2044. static decodeText(/* reader, json */) {
  2045. const $ = new circle.LogicalOrOptions();
  2046. return $;
  2047. }
  2048. };
  2049. circle.OneHotOptions = class OneHotOptions {
  2050. static decode(reader, position) {
  2051. const $ = new circle.OneHotOptions();
  2052. $.axis = reader.int32_(position, 4, 0);
  2053. return $;
  2054. }
  2055. static decodeText(reader, json) {
  2056. const $ = new circle.OneHotOptions();
  2057. $.axis = reader.value(json.axis, 0);
  2058. return $;
  2059. }
  2060. };
  2061. circle.AbsOptions = class AbsOptions {
  2062. static decode(/* reader, position */) {
  2063. const $ = new circle.AbsOptions();
  2064. return $;
  2065. }
  2066. static decodeText(/* reader, json */) {
  2067. const $ = new circle.AbsOptions();
  2068. return $;
  2069. }
  2070. };
  2071. circle.HardSwishOptions = class HardSwishOptions {
  2072. static decode(/* reader, position */) {
  2073. const $ = new circle.HardSwishOptions();
  2074. return $;
  2075. }
  2076. static decodeText(/* reader, json */) {
  2077. const $ = new circle.HardSwishOptions();
  2078. return $;
  2079. }
  2080. };
  2081. circle.LogicalAndOptions = class LogicalAndOptions {
  2082. static decode(/* reader, position */) {
  2083. const $ = new circle.LogicalAndOptions();
  2084. return $;
  2085. }
  2086. static decodeText(/* reader, json */) {
  2087. const $ = new circle.LogicalAndOptions();
  2088. return $;
  2089. }
  2090. };
  2091. circle.LogicalNotOptions = class LogicalNotOptions {
  2092. static decode(/* reader, position */) {
  2093. const $ = new circle.LogicalNotOptions();
  2094. return $;
  2095. }
  2096. static decodeText(/* reader, json */) {
  2097. const $ = new circle.LogicalNotOptions();
  2098. return $;
  2099. }
  2100. };
  2101. circle.UnpackOptions = class UnpackOptions {
  2102. static decode(reader, position) {
  2103. const $ = new circle.UnpackOptions();
  2104. $.num = reader.int32_(position, 4, 0);
  2105. $.axis = reader.int32_(position, 6, 0);
  2106. return $;
  2107. }
  2108. static decodeText(reader, json) {
  2109. const $ = new circle.UnpackOptions();
  2110. $.num = reader.value(json.num, 0);
  2111. $.axis = reader.value(json.axis, 0);
  2112. return $;
  2113. }
  2114. };
  2115. circle.FloorDivOptions = class FloorDivOptions {
  2116. static decode(/* reader, position */) {
  2117. const $ = new circle.FloorDivOptions();
  2118. return $;
  2119. }
  2120. static decodeText(/* reader, json */) {
  2121. const $ = new circle.FloorDivOptions();
  2122. return $;
  2123. }
  2124. };
  2125. circle.SquareOptions = class SquareOptions {
  2126. static decode(/* reader, position */) {
  2127. const $ = new circle.SquareOptions();
  2128. return $;
  2129. }
  2130. static decodeText(/* reader, json */) {
  2131. const $ = new circle.SquareOptions();
  2132. return $;
  2133. }
  2134. };
  2135. circle.ZerosLikeOptions = class ZerosLikeOptions {
  2136. static decode(/* reader, position */) {
  2137. const $ = new circle.ZerosLikeOptions();
  2138. return $;
  2139. }
  2140. static decodeText(/* reader, json */) {
  2141. const $ = new circle.ZerosLikeOptions();
  2142. return $;
  2143. }
  2144. };
  2145. circle.FillOptions = class FillOptions {
  2146. static decode(/* reader, position */) {
  2147. const $ = new circle.FillOptions();
  2148. return $;
  2149. }
  2150. static decodeText(/* reader, json */) {
  2151. const $ = new circle.FillOptions();
  2152. return $;
  2153. }
  2154. };
  2155. circle.FloorModOptions = class FloorModOptions {
  2156. static decode(/* reader, position */) {
  2157. const $ = new circle.FloorModOptions();
  2158. return $;
  2159. }
  2160. static decodeText(/* reader, json */) {
  2161. const $ = new circle.FloorModOptions();
  2162. return $;
  2163. }
  2164. };
  2165. circle.RangeOptions = class RangeOptions {
  2166. static decode(/* reader, position */) {
  2167. const $ = new circle.RangeOptions();
  2168. return $;
  2169. }
  2170. static decodeText(/* reader, json */) {
  2171. const $ = new circle.RangeOptions();
  2172. return $;
  2173. }
  2174. };
  2175. circle.LeakyReluOptions = class LeakyReluOptions {
  2176. static decode(reader, position) {
  2177. const $ = new circle.LeakyReluOptions();
  2178. $.alpha = reader.float32_(position, 4, 0);
  2179. return $;
  2180. }
  2181. static decodeText(reader, json) {
  2182. const $ = new circle.LeakyReluOptions();
  2183. $.alpha = reader.value(json.alpha, 0);
  2184. return $;
  2185. }
  2186. };
  2187. circle.SquaredDifferenceOptions = class SquaredDifferenceOptions {
  2188. static decode(/* reader, position */) {
  2189. const $ = new circle.SquaredDifferenceOptions();
  2190. return $;
  2191. }
  2192. static decodeText(/* reader, json */) {
  2193. const $ = new circle.SquaredDifferenceOptions();
  2194. return $;
  2195. }
  2196. };
  2197. circle.MirrorPadMode = {
  2198. REFLECT: 0,
  2199. SYMMETRIC: 1
  2200. };
  2201. circle.MirrorPadOptions = class MirrorPadOptions {
  2202. static decode(reader, position) {
  2203. const $ = new circle.MirrorPadOptions();
  2204. $.mode = reader.int8_(position, 4, 0);
  2205. return $;
  2206. }
  2207. static decodeText(reader, json) {
  2208. const $ = new circle.MirrorPadOptions();
  2209. $.mode = circle.MirrorPadMode[json.mode];
  2210. return $;
  2211. }
  2212. };
  2213. circle.UniqueOptions = class UniqueOptions {
  2214. static decode(reader, position) {
  2215. const $ = new circle.UniqueOptions();
  2216. $.idx_out_type = reader.int8_(position, 4, 2);
  2217. return $;
  2218. }
  2219. static decodeText(reader, json) {
  2220. const $ = new circle.UniqueOptions();
  2221. $.idx_out_type = circle.TensorType[json.idx_out_type];
  2222. return $;
  2223. }
  2224. };
  2225. circle.ReverseV2Options = class ReverseV2Options {
  2226. static decode(/* reader, position */) {
  2227. const $ = new circle.ReverseV2Options();
  2228. return $;
  2229. }
  2230. static decodeText(/* reader, json */) {
  2231. const $ = new circle.ReverseV2Options();
  2232. return $;
  2233. }
  2234. };
  2235. circle.AddNOptions = class AddNOptions {
  2236. static decode(/* reader, position */) {
  2237. const $ = new circle.AddNOptions();
  2238. return $;
  2239. }
  2240. static decodeText(/* reader, json */) {
  2241. const $ = new circle.AddNOptions();
  2242. return $;
  2243. }
  2244. };
  2245. circle.GatherNdOptions = class GatherNdOptions {
  2246. static decode(/* reader, position */) {
  2247. const $ = new circle.GatherNdOptions();
  2248. return $;
  2249. }
  2250. static decodeText(/* reader, json */) {
  2251. const $ = new circle.GatherNdOptions();
  2252. return $;
  2253. }
  2254. };
  2255. circle.WhereOptions = class WhereOptions {
  2256. static decode(/* reader, position */) {
  2257. const $ = new circle.WhereOptions();
  2258. return $;
  2259. }
  2260. static decodeText(/* reader, json */) {
  2261. const $ = new circle.WhereOptions();
  2262. return $;
  2263. }
  2264. };
  2265. circle.ReverseSequenceOptions = class ReverseSequenceOptions {
  2266. static decode(reader, position) {
  2267. const $ = new circle.ReverseSequenceOptions();
  2268. $.seq_dim = reader.int32_(position, 4, 0);
  2269. $.batch_dim = reader.int32_(position, 6, 0);
  2270. return $;
  2271. }
  2272. static decodeText(reader, json) {
  2273. const $ = new circle.ReverseSequenceOptions();
  2274. $.seq_dim = reader.value(json.seq_dim, 0);
  2275. $.batch_dim = reader.value(json.batch_dim, 0);
  2276. return $;
  2277. }
  2278. };
  2279. circle.MatrixDiagOptions = class MatrixDiagOptions {
  2280. static decode(/* reader, position */) {
  2281. const $ = new circle.MatrixDiagOptions();
  2282. return $;
  2283. }
  2284. static decodeText(/* reader, json */) {
  2285. const $ = new circle.MatrixDiagOptions();
  2286. return $;
  2287. }
  2288. };
  2289. circle.QuantizeOptions = class QuantizeOptions {
  2290. static decode(/* reader, position */) {
  2291. const $ = new circle.QuantizeOptions();
  2292. return $;
  2293. }
  2294. static decodeText(/* reader, json */) {
  2295. const $ = new circle.QuantizeOptions();
  2296. return $;
  2297. }
  2298. };
  2299. circle.MatrixSetDiagOptions = class MatrixSetDiagOptions {
  2300. static decode(/* reader, position */) {
  2301. const $ = new circle.MatrixSetDiagOptions();
  2302. return $;
  2303. }
  2304. static decodeText(/* reader, json */) {
  2305. const $ = new circle.MatrixSetDiagOptions();
  2306. return $;
  2307. }
  2308. };
  2309. circle.IfOptions = class IfOptions {
  2310. static decode(reader, position) {
  2311. const $ = new circle.IfOptions();
  2312. $.then_subgraph_index = reader.int32_(position, 4, 0);
  2313. $.else_subgraph_index = reader.int32_(position, 6, 0);
  2314. return $;
  2315. }
  2316. static decodeText(reader, json) {
  2317. const $ = new circle.IfOptions();
  2318. $.then_subgraph_index = reader.value(json.then_subgraph_index, 0);
  2319. $.else_subgraph_index = reader.value(json.else_subgraph_index, 0);
  2320. return $;
  2321. }
  2322. };
  2323. circle.CallOnceOptions = class CallOnceOptions {
  2324. static decode(reader, position) {
  2325. const $ = new circle.CallOnceOptions();
  2326. $.init_subgraph_index = reader.int32_(position, 4, 0);
  2327. return $;
  2328. }
  2329. static decodeText(reader, json) {
  2330. const $ = new circle.CallOnceOptions();
  2331. $.init_subgraph_index = reader.value(json.init_subgraph_index, 0);
  2332. return $;
  2333. }
  2334. };
  2335. circle.WhileOptions = class WhileOptions {
  2336. static decode(reader, position) {
  2337. const $ = new circle.WhileOptions();
  2338. $.cond_subgraph_index = reader.int32_(position, 4, 0);
  2339. $.body_subgraph_index = reader.int32_(position, 6, 0);
  2340. return $;
  2341. }
  2342. static decodeText(reader, json) {
  2343. const $ = new circle.WhileOptions();
  2344. $.cond_subgraph_index = reader.value(json.cond_subgraph_index, 0);
  2345. $.body_subgraph_index = reader.value(json.body_subgraph_index, 0);
  2346. return $;
  2347. }
  2348. };
  2349. circle.NonMaxSuppressionV4Options = class NonMaxSuppressionV4Options {
  2350. static decode(/* reader, position */) {
  2351. const $ = new circle.NonMaxSuppressionV4Options();
  2352. return $;
  2353. }
  2354. static decodeText(/* reader, json */) {
  2355. const $ = new circle.NonMaxSuppressionV4Options();
  2356. return $;
  2357. }
  2358. };
  2359. circle.NonMaxSuppressionV5Options = class NonMaxSuppressionV5Options {
  2360. static decode(/* reader, position */) {
  2361. const $ = new circle.NonMaxSuppressionV5Options();
  2362. return $;
  2363. }
  2364. static decodeText(/* reader, json */) {
  2365. const $ = new circle.NonMaxSuppressionV5Options();
  2366. return $;
  2367. }
  2368. };
  2369. circle.ScatterNdOptions = class ScatterNdOptions {
  2370. static decode(/* reader, position */) {
  2371. const $ = new circle.ScatterNdOptions();
  2372. return $;
  2373. }
  2374. static decodeText(/* reader, json */) {
  2375. const $ = new circle.ScatterNdOptions();
  2376. return $;
  2377. }
  2378. };
  2379. circle.SelectV2Options = class SelectV2Options {
  2380. static decode(/* reader, position */) {
  2381. const $ = new circle.SelectV2Options();
  2382. return $;
  2383. }
  2384. static decodeText(/* reader, json */) {
  2385. const $ = new circle.SelectV2Options();
  2386. return $;
  2387. }
  2388. };
  2389. circle.DensifyOptions = class DensifyOptions {
  2390. static decode(/* reader, position */) {
  2391. const $ = new circle.DensifyOptions();
  2392. return $;
  2393. }
  2394. static decodeText(/* reader, json */) {
  2395. const $ = new circle.DensifyOptions();
  2396. return $;
  2397. }
  2398. };
  2399. circle.SegmentSumOptions = class SegmentSumOptions {
  2400. static decode(/* reader, position */) {
  2401. const $ = new circle.SegmentSumOptions();
  2402. return $;
  2403. }
  2404. static decodeText(/* reader, json */) {
  2405. const $ = new circle.SegmentSumOptions();
  2406. return $;
  2407. }
  2408. };
  2409. circle.BatchMatMulOptions = class BatchMatMulOptions {
  2410. static decode(reader, position) {
  2411. const $ = new circle.BatchMatMulOptions();
  2412. $.adjoint_lhs = reader.bool_(position, 4, false);
  2413. $.adjoint_rhs = reader.bool_(position, 6, false);
  2414. $.asymmetric_quantize_inputs = reader.bool_(position, 8, false);
  2415. return $;
  2416. }
  2417. static decodeText(reader, json) {
  2418. const $ = new circle.BatchMatMulOptions();
  2419. $.adjoint_lhs = reader.value(json.adjoint_lhs, false);
  2420. $.adjoint_rhs = reader.value(json.adjoint_rhs, false);
  2421. $.asymmetric_quantize_inputs = reader.value(json.asymmetric_quantize_inputs, false);
  2422. return $;
  2423. }
  2424. };
  2425. circle.CumsumOptions = class CumsumOptions {
  2426. static decode(reader, position) {
  2427. const $ = new circle.CumsumOptions();
  2428. $.exclusive = reader.bool_(position, 4, false);
  2429. $.reverse = reader.bool_(position, 6, false);
  2430. return $;
  2431. }
  2432. static decodeText(reader, json) {
  2433. const $ = new circle.CumsumOptions();
  2434. $.exclusive = reader.value(json.exclusive, false);
  2435. $.reverse = reader.value(json.reverse, false);
  2436. return $;
  2437. }
  2438. };
  2439. circle.BroadcastToOptions = class BroadcastToOptions {
  2440. static decode(/* reader, position */) {
  2441. const $ = new circle.BroadcastToOptions();
  2442. return $;
  2443. }
  2444. static decodeText(/* reader, json */) {
  2445. const $ = new circle.BroadcastToOptions();
  2446. return $;
  2447. }
  2448. };
  2449. circle.Rfft2dOptions = class Rfft2dOptions {
  2450. static decode(/* reader, position */) {
  2451. const $ = new circle.Rfft2dOptions();
  2452. return $;
  2453. }
  2454. static decodeText(/* reader, json */) {
  2455. const $ = new circle.Rfft2dOptions();
  2456. return $;
  2457. }
  2458. };
  2459. circle.HashtableOptions = class HashtableOptions {
  2460. static decode(reader, position) {
  2461. const $ = new circle.HashtableOptions();
  2462. $.table_id = reader.int32_(position, 4, 0);
  2463. $.key_dtype = reader.int8_(position, 6, 0);
  2464. $.value_dtype = reader.int8_(position, 8, 0);
  2465. return $;
  2466. }
  2467. static decodeText(reader, json) {
  2468. const $ = new circle.HashtableOptions();
  2469. $.table_id = reader.value(json.table_id, 0);
  2470. $.key_dtype = circle.TensorType[json.key_dtype];
  2471. $.value_dtype = circle.TensorType[json.value_dtype];
  2472. return $;
  2473. }
  2474. };
  2475. circle.HashtableFindOptions = class HashtableFindOptions {
  2476. static decode(/* reader, position */) {
  2477. const $ = new circle.HashtableFindOptions();
  2478. return $;
  2479. }
  2480. static decodeText(/* reader, json */) {
  2481. const $ = new circle.HashtableFindOptions();
  2482. return $;
  2483. }
  2484. };
  2485. circle.HashtableImportOptions = class HashtableImportOptions {
  2486. static decode(/* reader, position */) {
  2487. const $ = new circle.HashtableImportOptions();
  2488. return $;
  2489. }
  2490. static decodeText(/* reader, json */) {
  2491. const $ = new circle.HashtableImportOptions();
  2492. return $;
  2493. }
  2494. };
  2495. circle.HashtableSizeOptions = class HashtableSizeOptions {
  2496. static decode(/* reader, position */) {
  2497. const $ = new circle.HashtableSizeOptions();
  2498. return $;
  2499. }
  2500. static decodeText(/* reader, json */) {
  2501. const $ = new circle.HashtableSizeOptions();
  2502. return $;
  2503. }
  2504. };
  2505. circle.VarHandleOptions = class VarHandleOptions {
  2506. static decode(reader, position) {
  2507. const $ = new circle.VarHandleOptions();
  2508. $.container = reader.string_(position, 4, null);
  2509. $.shared_name = reader.string_(position, 6, null);
  2510. return $;
  2511. }
  2512. static decodeText(reader, json) {
  2513. const $ = new circle.VarHandleOptions();
  2514. $.container = reader.value(json.container, null);
  2515. $.shared_name = reader.value(json.shared_name, null);
  2516. return $;
  2517. }
  2518. };
  2519. circle.ReadVariableOptions = class ReadVariableOptions {
  2520. static decode(/* reader, position */) {
  2521. const $ = new circle.ReadVariableOptions();
  2522. return $;
  2523. }
  2524. static decodeText(/* reader, json */) {
  2525. const $ = new circle.ReadVariableOptions();
  2526. return $;
  2527. }
  2528. };
  2529. circle.AssignVariableOptions = class AssignVariableOptions {
  2530. static decode(/* reader, position */) {
  2531. const $ = new circle.AssignVariableOptions();
  2532. return $;
  2533. }
  2534. static decodeText(/* reader, json */) {
  2535. const $ = new circle.AssignVariableOptions();
  2536. return $;
  2537. }
  2538. };
  2539. circle.RandomOptions = class RandomOptions {
  2540. static decode(reader, position) {
  2541. const $ = new circle.RandomOptions();
  2542. $.seed = reader.int64_(position, 4, 0);
  2543. $.seed2 = reader.int64_(position, 6, 0);
  2544. return $;
  2545. }
  2546. static decodeText(reader, json) {
  2547. const $ = new circle.RandomOptions();
  2548. $.seed = reader.value(json.seed, 0);
  2549. $.seed2 = reader.value(json.seed2, 0);
  2550. return $;
  2551. }
  2552. };
  2553. circle.BucketizeOptions = class BucketizeOptions {
  2554. static decode(reader, position) {
  2555. const $ = new circle.BucketizeOptions();
  2556. $.boundaries = reader.typedArray(position, 4, Float32Array);
  2557. return $;
  2558. }
  2559. static decodeText(reader, json) {
  2560. const $ = new circle.BucketizeOptions();
  2561. $.boundaries = reader.typedArray(json.boundaries, Float32Array);
  2562. return $;
  2563. }
  2564. };
  2565. circle.GeluOptions = class GeluOptions {
  2566. static decode(reader, position) {
  2567. const $ = new circle.GeluOptions();
  2568. $.approximate = reader.bool_(position, 4, false);
  2569. return $;
  2570. }
  2571. static decodeText(reader, json) {
  2572. const $ = new circle.GeluOptions();
  2573. $.approximate = reader.value(json.approximate, false);
  2574. return $;
  2575. }
  2576. };
  2577. circle.DynamicUpdateSliceOptions = class DynamicUpdateSliceOptions {
  2578. static decode(/* reader, position */) {
  2579. const $ = new circle.DynamicUpdateSliceOptions();
  2580. return $;
  2581. }
  2582. static decodeText(/* reader, json */) {
  2583. const $ = new circle.DynamicUpdateSliceOptions();
  2584. return $;
  2585. }
  2586. };
  2587. circle.UnsortedSegmentProdOptions = class UnsortedSegmentProdOptions {
  2588. static decode(/* reader, position */) {
  2589. const $ = new circle.UnsortedSegmentProdOptions();
  2590. return $;
  2591. }
  2592. static decodeText(/* reader, json */) {
  2593. const $ = new circle.UnsortedSegmentProdOptions();
  2594. return $;
  2595. }
  2596. };
  2597. circle.UnsortedSegmentMaxOptions = class UnsortedSegmentMaxOptions {
  2598. static decode(/* reader, position */) {
  2599. const $ = new circle.UnsortedSegmentMaxOptions();
  2600. return $;
  2601. }
  2602. static decodeText(/* reader, json */) {
  2603. const $ = new circle.UnsortedSegmentMaxOptions();
  2604. return $;
  2605. }
  2606. };
  2607. circle.UnsortedSegmentSumOptions = class UnsortedSegmentSumOptions {
  2608. static decode(/* reader, position */) {
  2609. const $ = new circle.UnsortedSegmentSumOptions();
  2610. return $;
  2611. }
  2612. static decodeText(/* reader, json */) {
  2613. const $ = new circle.UnsortedSegmentSumOptions();
  2614. return $;
  2615. }
  2616. };
  2617. circle.ATan2Options = class ATan2Options {
  2618. static decode(/* reader, position */) {
  2619. const $ = new circle.ATan2Options();
  2620. return $;
  2621. }
  2622. static decodeText(/* reader, json */) {
  2623. const $ = new circle.ATan2Options();
  2624. return $;
  2625. }
  2626. };
  2627. circle.UnsortedSegmentMinOptions = class UnsortedSegmentMinOptions {
  2628. static decode(/* reader, position */) {
  2629. const $ = new circle.UnsortedSegmentMinOptions();
  2630. return $;
  2631. }
  2632. static decodeText(/* reader, json */) {
  2633. const $ = new circle.UnsortedSegmentMinOptions();
  2634. return $;
  2635. }
  2636. };
  2637. circle.SignOptions = class SignOptions {
  2638. static decode(/* reader, position */) {
  2639. const $ = new circle.SignOptions();
  2640. return $;
  2641. }
  2642. static decodeText(/* reader, json */) {
  2643. const $ = new circle.SignOptions();
  2644. return $;
  2645. }
  2646. };
  2647. circle.BitcastOptions = class BitcastOptions {
  2648. static decode(/* reader, position */) {
  2649. const $ = new circle.BitcastOptions();
  2650. return $;
  2651. }
  2652. static decodeText(/* reader, json */) {
  2653. const $ = new circle.BitcastOptions();
  2654. return $;
  2655. }
  2656. };
  2657. circle.BitwiseXorOptions = class BitwiseXorOptions {
  2658. static decode(/* reader, position */) {
  2659. const $ = new circle.BitwiseXorOptions();
  2660. return $;
  2661. }
  2662. static decodeText(/* reader, json */) {
  2663. const $ = new circle.BitwiseXorOptions();
  2664. return $;
  2665. }
  2666. };
  2667. circle.RightShiftOptions = class RightShiftOptions {
  2668. static decode(/* reader, position */) {
  2669. const $ = new circle.RightShiftOptions();
  2670. return $;
  2671. }
  2672. static decodeText(/* reader, json */) {
  2673. const $ = new circle.RightShiftOptions();
  2674. return $;
  2675. }
  2676. };
  2677. circle.DilateOptions = class DilateOptions {
  2678. static decode(/* reader, position */) {
  2679. const $ = new circle.DilateOptions();
  2680. return $;
  2681. }
  2682. static decodeText(/* reader, json */) {
  2683. const $ = new circle.DilateOptions();
  2684. return $;
  2685. }
  2686. };
  2687. circle.ReduceWindowFunction = {
  2688. UNSUPPORTED: 0,
  2689. ADD: 1,
  2690. MUL: 2,
  2691. MINIMUM: 3,
  2692. MAXIMUM: 4,
  2693. ALL: 5,
  2694. ANY: 6
  2695. };
  2696. circle.ReduceWindowOptions = class ReduceWindowOptions {
  2697. static decode(reader, position) {
  2698. const $ = new circle.ReduceWindowOptions();
  2699. $.reduce_function = reader.int32_(position, 4, 0);
  2700. return $;
  2701. }
  2702. static decodeText(reader, json) {
  2703. const $ = new circle.ReduceWindowOptions();
  2704. $.reduce_function = circle.ReduceWindowFunction[json.reduce_function];
  2705. return $;
  2706. }
  2707. };
  2708. circle.BCQGatherOptions = class BCQGatherOptions {
  2709. static decode(reader, position) {
  2710. const $ = new circle.BCQGatherOptions();
  2711. $.input_hidden_size = reader.int32_(position, 4, 0);
  2712. $.axis = reader.int32_(position, 6, 0);
  2713. return $;
  2714. }
  2715. static decodeText(reader, json) {
  2716. const $ = new circle.BCQGatherOptions();
  2717. $.input_hidden_size = reader.value(json.input_hidden_size, 0);
  2718. $.axis = reader.value(json.axis, 0);
  2719. return $;
  2720. }
  2721. };
  2722. circle.BCQFullyConnectedOptions = class BCQFullyConnectedOptions {
  2723. static decode(reader, position) {
  2724. const $ = new circle.BCQFullyConnectedOptions();
  2725. $.weights_hidden_size = reader.int32_(position, 4, 0);
  2726. $.fused_activation_function = reader.int8_(position, 6, 0);
  2727. return $;
  2728. }
  2729. static decodeText(reader, json) {
  2730. const $ = new circle.BCQFullyConnectedOptions();
  2731. $.weights_hidden_size = reader.value(json.weights_hidden_size, 0);
  2732. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2733. return $;
  2734. }
  2735. };
  2736. circle.InstanceNormOptions = class InstanceNormOptions {
  2737. static decode(reader, position) {
  2738. const $ = new circle.InstanceNormOptions();
  2739. $.epsilon = reader.float32_(position, 4, 0);
  2740. $.fused_activation_function = reader.int8_(position, 6, 0);
  2741. return $;
  2742. }
  2743. static decodeText(reader, json) {
  2744. const $ = new circle.InstanceNormOptions();
  2745. $.epsilon = reader.value(json.epsilon, 0);
  2746. $.fused_activation_function = circle.ActivationFunctionType[json.fused_activation_function];
  2747. return $;
  2748. }
  2749. };
  2750. circle.OperatorCode = class OperatorCode {
  2751. static decode(reader, position) {
  2752. const $ = new circle.OperatorCode();
  2753. $.deprecated_builtin_code = reader.int8_(position, 4, 0);
  2754. $.custom_code = reader.string_(position, 6, null);
  2755. $.version = reader.int32_(position, 8, 1);
  2756. $.builtin_code = reader.int32_(position, 10, 0);
  2757. return $;
  2758. }
  2759. static decodeText(reader, json) {
  2760. const $ = new circle.OperatorCode();
  2761. $.deprecated_builtin_code = reader.value(json.deprecated_builtin_code, 0);
  2762. $.custom_code = reader.value(json.custom_code, null);
  2763. $.version = reader.value(json.version, 1);
  2764. $.builtin_code = circle.BuiltinOperator[json.builtin_code];
  2765. return $;
  2766. }
  2767. };
  2768. circle.CustomOptionsFormat = {
  2769. FLEXBUFFERS: 0
  2770. };
  2771. circle.DataFormat = {
  2772. CHANNELS_LAST: 0,
  2773. CHANNELS_FIRST: 1
  2774. };
  2775. circle.Operator = class Operator {
  2776. static decode(reader, position) {
  2777. const $ = new circle.Operator();
  2778. $.opcode_index = reader.uint32_(position, 4, 0);
  2779. $.inputs = reader.typedArray(position, 6, Int32Array);
  2780. $.outputs = reader.typedArray(position, 8, Int32Array);
  2781. $.builtin_options = reader.union(position, 10, circle.BuiltinOptions.decode);
  2782. $.custom_options = reader.typedArray(position, 14, Uint8Array);
  2783. $.custom_options_format = reader.int8_(position, 16, 0);
  2784. $.mutating_variable_inputs = reader.bools_(position, 18);
  2785. $.intermediates = reader.typedArray(position, 20, Int32Array);
  2786. $.large_custom_options_offset = reader.uint64_(position, 22, 0);
  2787. $.large_custom_options_size = reader.uint64_(position, 24, 0);
  2788. $.builtin_options_2 = reader.union(position, 26, circle.BuiltinOptions2.decode);
  2789. return $;
  2790. }
  2791. static decodeText(reader, json) {
  2792. const $ = new circle.Operator();
  2793. $.opcode_index = reader.value(json.opcode_index, 0);
  2794. $.inputs = reader.typedArray(json.inputs, Int32Array);
  2795. $.outputs = reader.typedArray(json.outputs, Int32Array);
  2796. $.builtin_options = circle.BuiltinOptions.decodeText(reader, json.builtin_options, json.builtin_options_type);
  2797. $.custom_options = reader.typedArray(json.custom_options, Uint8Array);
  2798. $.custom_options_format = circle.CustomOptionsFormat[json.custom_options_format];
  2799. $.mutating_variable_inputs = reader.array(json.mutating_variable_inputs);
  2800. $.intermediates = reader.typedArray(json.intermediates, Int32Array);
  2801. $.large_custom_options_offset = reader.value(json.large_custom_options_offset, 0);
  2802. $.large_custom_options_size = reader.value(json.large_custom_options_size, 0);
  2803. $.builtin_options_2 = circle.BuiltinOptions2.decodeText(reader, json.builtin_options_2, json.builtin_options_2_type);
  2804. return $;
  2805. }
  2806. };
  2807. circle.SubGraph = class SubGraph {
  2808. static decode(reader, position) {
  2809. const $ = new circle.SubGraph();
  2810. $.tensors = reader.tableArray(position, 4, circle.Tensor.decode);
  2811. $.inputs = reader.typedArray(position, 6, Int32Array);
  2812. $.outputs = reader.typedArray(position, 8, Int32Array);
  2813. $.operators = reader.tableArray(position, 10, circle.Operator.decode);
  2814. $.name = reader.string_(position, 12, null);
  2815. $.deprecated_data_format = reader.int8_(position, 14, 0);
  2816. return $;
  2817. }
  2818. static decodeText(reader, json) {
  2819. const $ = new circle.SubGraph();
  2820. $.tensors = reader.objectArray(json.tensors, circle.Tensor.decodeText);
  2821. $.inputs = reader.typedArray(json.inputs, Int32Array);
  2822. $.outputs = reader.typedArray(json.outputs, Int32Array);
  2823. $.operators = reader.objectArray(json.operators, circle.Operator.decodeText);
  2824. $.name = reader.value(json.name, null);
  2825. $.deprecated_data_format = circle.DataFormat[json.deprecated_data_format];
  2826. return $;
  2827. }
  2828. };
  2829. circle.Buffer = class Buffer {
  2830. static decode(reader, position) {
  2831. const $ = new circle.Buffer();
  2832. $.data = reader.typedArray(position, 4, Uint8Array);
  2833. $.offset = reader.uint64_(position, 6, 0);
  2834. $.size = reader.uint64_(position, 8, 0);
  2835. return $;
  2836. }
  2837. static decodeText(reader, json) {
  2838. const $ = new circle.Buffer();
  2839. $.data = reader.typedArray(json.data, Uint8Array);
  2840. $.offset = reader.value(json.offset, 0);
  2841. $.size = reader.value(json.size, 0);
  2842. return $;
  2843. }
  2844. };
  2845. circle.Metadata = class Metadata {
  2846. static decode(reader, position) {
  2847. const $ = new circle.Metadata();
  2848. $.name = reader.string_(position, 4, null);
  2849. $.buffer = reader.uint32_(position, 6, 0);
  2850. return $;
  2851. }
  2852. static decodeText(reader, json) {
  2853. const $ = new circle.Metadata();
  2854. $.name = reader.value(json.name, null);
  2855. $.buffer = reader.value(json.buffer, 0);
  2856. return $;
  2857. }
  2858. };
  2859. circle.TensorMap = class TensorMap {
  2860. static decode(reader, position) {
  2861. const $ = new circle.TensorMap();
  2862. $.name = reader.string_(position, 4, null);
  2863. $.tensor_index = reader.uint32_(position, 6, 0);
  2864. return $;
  2865. }
  2866. static decodeText(reader, json) {
  2867. const $ = new circle.TensorMap();
  2868. $.name = reader.value(json.name, null);
  2869. $.tensor_index = reader.value(json.tensor_index, 0);
  2870. return $;
  2871. }
  2872. };
  2873. circle.SignatureDef = class SignatureDef {
  2874. static decode(reader, position) {
  2875. const $ = new circle.SignatureDef();
  2876. $.inputs = reader.tableArray(position, 4, circle.TensorMap.decode);
  2877. $.outputs = reader.tableArray(position, 6, circle.TensorMap.decode);
  2878. $.signature_key = reader.string_(position, 8, null);
  2879. $.deprecated_tag = reader.string_(position, 10, null);
  2880. $.subgraph_index = reader.uint32_(position, 12, 0);
  2881. return $;
  2882. }
  2883. static decodeText(reader, json) {
  2884. const $ = new circle.SignatureDef();
  2885. $.inputs = reader.objectArray(json.inputs, circle.TensorMap.decodeText);
  2886. $.outputs = reader.objectArray(json.outputs, circle.TensorMap.decodeText);
  2887. $.signature_key = reader.value(json.signature_key, null);
  2888. $.deprecated_tag = reader.value(json.deprecated_tag, null);
  2889. $.subgraph_index = reader.value(json.subgraph_index, 0);
  2890. return $;
  2891. }
  2892. };
  2893. circle.Model = class Model {
  2894. static identifier(reader) {
  2895. return reader.identifier === 'CIR0';
  2896. }
  2897. static create(reader) {
  2898. return circle.Model.decode(reader, reader.root);
  2899. }
  2900. static createText(reader) {
  2901. return circle.Model.decodeText(reader, reader.root);
  2902. }
  2903. static decode(reader, position) {
  2904. const $ = new circle.Model();
  2905. $.version = reader.uint32_(position, 4, 0);
  2906. $.operator_codes = reader.tableArray(position, 6, circle.OperatorCode.decode);
  2907. $.subgraphs = reader.tableArray(position, 8, circle.SubGraph.decode);
  2908. $.description = reader.string_(position, 10, null);
  2909. $.buffers = reader.tableArray(position, 12, circle.Buffer.decode);
  2910. $.metadata_buffer = reader.typedArray(position, 14, Int32Array);
  2911. $.metadata = reader.tableArray(position, 16, circle.Metadata.decode);
  2912. $.signature_defs = reader.tableArray(position, 18, circle.SignatureDef.decode);
  2913. return $;
  2914. }
  2915. static decodeText(reader, json) {
  2916. const $ = new circle.Model();
  2917. $.version = reader.value(json.version, 0);
  2918. $.operator_codes = reader.objectArray(json.operator_codes, circle.OperatorCode.decodeText);
  2919. $.subgraphs = reader.objectArray(json.subgraphs, circle.SubGraph.decodeText);
  2920. $.description = reader.value(json.description, null);
  2921. $.buffers = reader.objectArray(json.buffers, circle.Buffer.decodeText);
  2922. $.metadata_buffer = reader.typedArray(json.metadata_buffer, Int32Array);
  2923. $.metadata = reader.objectArray(json.metadata, circle.Metadata.decodeText);
  2924. $.signature_defs = reader.objectArray(json.signature_defs, circle.SignatureDef.decodeText);
  2925. return $;
  2926. }
  2927. };