tflite-metadata.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. [
  2. {
  3. "name": "Conv2D",
  4. "schema": {
  5. "category": "Layer",
  6. "inputs": [
  7. { "name": "input", "description": "4D tensor" },
  8. { "name": "filter" },
  9. { "name": "bias", "description":"(optional)" }
  10. ],
  11. "outputs": [
  12. { "name": "output", "description": "result of 2D convolution of the input tensor" }
  13. ],
  14. "attributes": [
  15. { "name": "padding", "type": "Padding", "default": "SAME", "description": "`SAME`|`VALID`" },
  16. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE", "description": "`NONE`|`RELU`|`RELU6`" },
  17. { "name": "stride_w", "type": "int32", "default": 1, "description": "stride of the filter window" },
  18. { "name": "stride_h", "type": "int32", "default": 1, "description": "stride of the filter window" },
  19. { "name": "dilation_w_factor", "type": "int32", "default": 1 },
  20. { "name": "dilation_h_factor", "type": "int32", "default": 1 }
  21. ]
  22. }
  23. },
  24. {
  25. "name": "LSTM",
  26. "schema": {
  27. "category": "Layer",
  28. "inputs": [
  29. { "name": "input", "type": "T", "description": "Input tensor." },
  30. { "name": "input_input_weights", "type": "T", "option": "optional", "description": "Input to input weights tensor.", "visible": false },
  31. { "name": "input_forget_weights", "type": "T", "description": "Input to forget weights tensor.", "visible": false },
  32. { "name": "input_cell_weights", "type": "T", "description": "Input to cell weights tensor.", "visible": false },
  33. { "name": "input_output_weights", "type": "T", "description": "Input to output weights tensor.", "visible": false },
  34. { "name": "recurrent_input_weights", "type": "T", "option": "optional", "description": "Recurrent to input weights tensor.", "visible": false },
  35. { "name": "recurrent_forget_weights", "type": "T", "description": "Recurrent to forget weights tensor.", "visible": false },
  36. { "name": "recurrent_cell_weights", "type": "T", "description": "Recurrent to cell weights tensor.", "visible": false },
  37. { "name": "recurrent_output_weights", "type": "T", "description": "Recurrent to output weights tensor.", "visible": false },
  38. { "name": "cell_input_weights", "type": "T", "option": "optional", "description": "Cell to input weights tensor.", "visible": false },
  39. { "name": "cell_forget_weights", "type": "T", "option": "optional", "description": "Cell to forget weights tensor.", "visible": false },
  40. { "name": "cell_output_weights", "type": "T", "option": "optional", "description": "Cell to output weights tensor.", "visible": false },
  41. { "name": "input_bias", "type": "T", "option": "optional", "description": "Input gate bias tensor.", "visible": false },
  42. { "name": "forget_bias", "type": "T", "description": "Forget gate bias tensor.", "visible": false },
  43. { "name": "cell_bias", "type": "T", "description": "Cell gate bias tensor.", "visible": false },
  44. { "name": "output_bias", "type": "T", "description": "Output gate bias tensor.", "visible": false },
  45. { "name": "projection_weights", "type": "T", "option": "optional", "description": "Projection weights tensor.", "visible": false },
  46. { "name": "projection_bias", "type": "T", "option": "optional", "description": "Projection bias tensor.", "visible": false }
  47. ],
  48. "outputs": [
  49. { "name": "scratch", "type": "T" },
  50. { "name": "output_state", "type": "T" },
  51. { "name": "cell_state", "type": "T" },
  52. { "name": "output", "type": "T" }
  53. ],
  54. "attributes": [
  55. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
  56. { "name": "cell_clip", "type": "float32", "default": 0.0 },
  57. { "name": "proj_clip", "type": "float32", "default": 0.0 },
  58. { "name": "kernel_type", "type": "LSTMKernelType", "default": "FULL" }
  59. ]
  60. }
  61. },
  62. {
  63. "name": "RNN",
  64. "schema": {
  65. "category": "Layer",
  66. "inputs": [
  67. { "name": "X", "type": "T" },
  68. { "name": "W", "type": "T" },
  69. { "name": "R", "type": "T" },
  70. { "name": "b", "type": "T" }
  71. ],
  72. "outputs": [
  73. { "name": "hidden", "type": "T" },
  74. { "name": "output", "type": "T" }
  75. ],
  76. "attributes": [
  77. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  78. ]
  79. }
  80. },
  81. {
  82. "name": "FullyConnected",
  83. "schema": {
  84. "category": "Layer",
  85. "inputs": [
  86. { "name": "input", "type": "T" },
  87. { "name": "weights", "type": "T" },
  88. { "name": "bias", "type": "T" }
  89. ],
  90. "outputs": [
  91. { "name": "output", "type": "T" }
  92. ],
  93. "attributes": [
  94. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
  95. { "name": "weights_format", "type": "FullyConnectedOptionsWeightsFormat", "default": "DEFAULT" },
  96. { "name": "keep_num_dims", "type": "boolean" }
  97. ]
  98. }
  99. },
  100. {
  101. "name": "DepthwiseConv2D",
  102. "schema": {
  103. "category": "Layer",
  104. "inputs": [
  105. { "name": "input", "type": "T" },
  106. { "name": "weights", "type": "T" },
  107. { "name": "bias", "type": "T" }
  108. ],
  109. "outputs": [
  110. { "name": "output", "type": "T" }
  111. ],
  112. "attributes": [
  113. { "name": "padding", "type": "Padding", "default": "SAME" },
  114. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
  115. { "name": "stride_w", "type": "int32", "default": 1 },
  116. { "name": "stride_h", "type": "int32", "default": 1 },
  117. { "name": "depth_multiplier", "type": "int32", "default": 1 },
  118. { "name": "dilation_w_factor", "type": "int32", "default": 1 },
  119. { "name": "dilation_h_factor", "type": "int32", "default": 1 }
  120. ]
  121. }
  122. },
  123. {
  124. "name": "AveragePool2D",
  125. "schema": {
  126. "category": "Pool",
  127. "inputs": [
  128. { "name": "input", "type": "T" }
  129. ],
  130. "outputs": [
  131. { "name": "output", "type": "T" }
  132. ],
  133. "attributes": [
  134. { "name": "padding", "type": "Padding", "default": "SAME" },
  135. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
  136. { "name": "stride_w", "type": "int32" },
  137. { "name": "stride_h", "type": "int32" },
  138. { "name": "filter_width", "type": "int32" },
  139. { "name": "filter_height", "type": "int32" }
  140. ]
  141. }
  142. },
  143. {
  144. "name": "Softmax",
  145. "schema": {
  146. "category": "Activation",
  147. "inputs": [
  148. { "name": "input", "type": "T" }
  149. ],
  150. "outputs": [
  151. { "name": "output", "type": "T" }
  152. ]
  153. }
  154. },
  155. {
  156. "name": "LogSoftmax",
  157. "schema": {
  158. "category": "Activation",
  159. "inputs": [
  160. { "name": "input", "type": "T" }
  161. ],
  162. "outputs": [
  163. { "name": "output", "type": "T" }
  164. ]
  165. }
  166. },
  167. {
  168. "name": "Relu",
  169. "schema": {
  170. "category": "Activation",
  171. "inputs": [
  172. { "name": "input", "type": "T" }
  173. ],
  174. "outputs": [
  175. { "name": "output", "type": "T" }
  176. ]
  177. }
  178. },
  179. {
  180. "name": "Relu6",
  181. "schema": {
  182. "category": "Activation",
  183. "inputs": [
  184. { "name": "input", "type": "T" }
  185. ],
  186. "outputs": [
  187. { "name": "output", "type": "T" }
  188. ]
  189. }
  190. },
  191. {
  192. "name": "Prelu",
  193. "schema": {
  194. "category": "Activation",
  195. "inputs": [
  196. { "name": "input", "type": "T" },
  197. { "name": "slope", "type": "T" }
  198. ],
  199. "outputs": [
  200. { "name": "output", "type": "T" }
  201. ]
  202. }
  203. },
  204. {
  205. "name": "Tanh",
  206. "schema": {
  207. "category": "Activation",
  208. "inputs": [
  209. { "name": "input", "type": "T" }
  210. ],
  211. "outputs": [
  212. { "name": "output", "type": "T" }
  213. ]
  214. }
  215. },
  216. {
  217. "name": "Reshape",
  218. "schema": {
  219. "category": "Shape",
  220. "attributes": [
  221. { "name": "new_shape", "type": "shape"}
  222. ],
  223. "inputs": [
  224. { "name": "data", "type": "T" },
  225. { "name": "shape", "type": "T" }
  226. ],
  227. "outputs": [
  228. { "name": "reshaped", "type": "T" }
  229. ]
  230. }
  231. },
  232. {
  233. "name": "MaxPool2D",
  234. "schema": {
  235. "category": "Pool",
  236. "inputs": [
  237. { "name": "input", "type": "T" }
  238. ],
  239. "outputs": [
  240. { "name": "output", "type": "T" }
  241. ],
  242. "attributes": [
  243. { "name": "padding", "type": "Padding", "default": "SAME" },
  244. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" },
  245. { "name": "stride_w", "type": "int32" },
  246. { "name": "stride_h", "type": "int32" },
  247. { "name": "filter_width", "type": "int32" },
  248. { "name": "filter_height", "type": "int32" }
  249. ]
  250. }
  251. },
  252. {
  253. "name": "LSHProjection",
  254. "schema": {
  255. "inputs": [
  256. { "name": "hash" },
  257. { "name": "input" },
  258. { "name": "weight" }
  259. ],
  260. "outputs": [
  261. { "name": "output" }
  262. ],
  263. "attributes": [
  264. { "name": "type", "type": "LSHProjectionType" }
  265. ]
  266. }
  267. },
  268. {
  269. "name": "Normalize",
  270. "schema": {
  271. "category": "Normalization",
  272. "inputs": [
  273. { "name": "input" }
  274. ],
  275. "outputs": [
  276. { "name": "output" }
  277. ]
  278. }
  279. },
  280. {
  281. "name": "LocalResponseNormalization",
  282. "schema": {
  283. "category": "Normalization",
  284. "attributes": [
  285. { "name": "radius", "type": "int32", "default": 5 },
  286. { "name": "bias", "type": "float32", "default": 1 },
  287. { "name": "alpha", "type": "float32", "default": 1 },
  288. { "name": "beta", "type": "float32", "default": 0.5 }
  289. ],
  290. "inputs": [
  291. { "name": "input" }
  292. ],
  293. "outputs": [
  294. { "name": "output" }
  295. ]
  296. }
  297. },
  298. {
  299. "name": "Predict",
  300. "schema": {
  301. "inputs": [
  302. { "name": "hashes" },
  303. { "name": "keys" },
  304. { "name": "labels" },
  305. { "name": "weights" }
  306. ],
  307. "outputs": [
  308. { "name": "label" },
  309. { "name": "weight" }
  310. ]
  311. }
  312. },
  313. {
  314. "name": "HashtableLookup",
  315. "schema": {
  316. "inputs": [
  317. { "name": "key" },
  318. { "name": "keys" },
  319. { "name": "values" }
  320. ],
  321. "outputs": [
  322. { "name": "value" },
  323. { "name": "hits" }
  324. ]
  325. }
  326. },
  327. {
  328. "name": "ExtractFeatures",
  329. "schema": {
  330. "inputs": [
  331. { "name": "ngrams" }
  332. ],
  333. "outputs": [
  334. { "name": "features" },
  335. { "name": "weights" }
  336. ]
  337. }
  338. },
  339. {
  340. "name": "SkipGram",
  341. "schema": {
  342. "inputs": [
  343. { "name": "inputs" }
  344. ],
  345. "outputs": [
  346. { "name": "ngrams" }
  347. ]
  348. }
  349. },
  350. {
  351. "name": "Concatenation",
  352. "schema": {
  353. "category": "Tensor",
  354. "inputs": [
  355. { "name": "inputs", "option": "variadic" }
  356. ],
  357. "outputs": [
  358. { "name": "output" }
  359. ],
  360. "attributes": [
  361. { "name": "axis", "type": "int32" },
  362. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  363. ]
  364. }
  365. },
  366. {
  367. "name": "Pad",
  368. "schema": {
  369. "category": "Tensor",
  370. "inputs": [
  371. { "name": "input" },
  372. { "name": "paddings" }
  373. ],
  374. "outputs": [
  375. { "name": "output" }
  376. ]
  377. }
  378. },
  379. {
  380. "name": "Split",
  381. "schema": {
  382. "category": "Tensor",
  383. "inputs": [
  384. { "name": "axis" },
  385. { "name": "input" }
  386. ],
  387. "outputs": [
  388. { "name": "output" }
  389. ]
  390. }
  391. },
  392. {
  393. "name": "Squeeze",
  394. "schema": {
  395. "category": "Transform",
  396. "inputs": [
  397. { "name": "input" }
  398. ],
  399. "outputs": [
  400. { "name": "output" }
  401. ]
  402. }
  403. },
  404. {
  405. "name": "StridedSlice",
  406. "schema": {
  407. "category": "Tensor",
  408. "inputs": [
  409. { "name": "input" },
  410. { "name": "begin" },
  411. { "name": "end" },
  412. { "name": "strides" }
  413. ],
  414. "outputs": [
  415. { "name": "output" }
  416. ]
  417. }
  418. },
  419. {
  420. "name": "SVDF",
  421. "schema": {
  422. "category": "Layer",
  423. "inputs": [
  424. { "name": "input", "type": "T" },
  425. { "name": "feature", "type": "T" },
  426. { "name": "time", "type": "T" },
  427. { "name": "bias", "type": "T" }
  428. ],
  429. "outputs": [
  430. { "name": "state", "type": "T" },
  431. { "name": "output", "type": "T" }
  432. ],
  433. "attributes": [
  434. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  435. ]
  436. }
  437. },
  438. {
  439. "name": "Add",
  440. "schema": {
  441. "inputs": [
  442. { "name": "A", "type": "T" },
  443. { "name": "B", "type": "T" }
  444. ],
  445. "outputs": [
  446. { "name": "C", "type": "T" }
  447. ],
  448. "attributes": [
  449. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  450. ]
  451. }
  452. },
  453. {
  454. "name": "Sub",
  455. "schema": {
  456. "inputs": [
  457. { "name": "A", "type": "T" },
  458. { "name": "B", "type": "T" }
  459. ],
  460. "outputs": [
  461. { "name": "C", "type": "T" }
  462. ],
  463. "attributes": [
  464. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  465. ]
  466. }
  467. },
  468. {
  469. "name": "Mul",
  470. "schema": {
  471. "inputs": [
  472. { "name": "A", "type": "T" },
  473. { "name": "B", "type": "T" }
  474. ],
  475. "outputs": [
  476. { "name": "C", "type": "T" }
  477. ],
  478. "attributes": [
  479. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  480. ]
  481. }
  482. },
  483. {
  484. "name": "Div",
  485. "schema": {
  486. "inputs": [
  487. { "name": "A", "type": "T" },
  488. { "name": "B", "type": "T" }
  489. ],
  490. "outputs": [
  491. { "name": "C", "type": "T" }
  492. ],
  493. "attributes": [
  494. { "name": "fused_activation_function", "type": "ActivationFunctionType", "default": "NONE" }
  495. ]
  496. }
  497. },
  498. {
  499. "name": "Sum",
  500. "schema": {
  501. "inputs": [
  502. { "name": "input", "type": "T" },
  503. { "name": "axis", "type": "T" }
  504. ],
  505. "outputs": [
  506. { "name": "output", "type": "T" }
  507. ],
  508. "attributes": [
  509. { "name": "keep_dims", "type": "boolean" }
  510. ]
  511. }
  512. },
  513. {
  514. "name": "ReduceMax",
  515. "schema": {
  516. "inputs": [
  517. { "name": "input", "type": "T" },
  518. { "name": "axis", "type": "T" }
  519. ],
  520. "outputs": [
  521. { "name": "output", "type": "T" }
  522. ],
  523. "attributes": [
  524. { "name": "keep_dims", "type": "boolean" }
  525. ]
  526. }
  527. },
  528. {
  529. "name": "ReduceMin",
  530. "schema": {
  531. "inputs": [
  532. { "name": "input", "type": "T" },
  533. { "name": "axis", "type": "T" }
  534. ],
  535. "outputs": [
  536. { "name": "output", "type": "T" }
  537. ],
  538. "attributes": [
  539. { "name": "keep_dims", "type": "boolean" }
  540. ]
  541. }
  542. },
  543. {
  544. "name": "Mean",
  545. "schema": {
  546. "inputs": [
  547. { "name": "input", "type": "T" },
  548. { "name": "axis", "type": "T" }
  549. ],
  550. "outputs": [
  551. { "name": "output", "type": "T" }
  552. ],
  553. "attributes": [
  554. { "name": "keep_dims", "type": "boolean" }
  555. ]
  556. }
  557. },
  558. {
  559. "name": "Logistic",
  560. "schema": {
  561. "inputs": [
  562. { "name": "input" }
  563. ],
  564. "outputs": [
  565. { "name": "output" }
  566. ]
  567. }
  568. },
  569. {
  570. "name": "ResizeBilinear",
  571. "schema": {
  572. "attributes": [
  573. { "name": "align_corners", "default": false }
  574. ],
  575. "inputs": [
  576. { "name": "input" },
  577. { "name": "size" }
  578. ],
  579. "outputs": [
  580. { "name": "output" }
  581. ]
  582. }
  583. },
  584. {
  585. "name": "Gather",
  586. "schema": {
  587. "attributes": [
  588. { "name": "axis", "default": 0 }
  589. ],
  590. "inputs": [
  591. { "name": "input" },
  592. { "name": "positions" }
  593. ],
  594. "outputs": [
  595. { "name": "output" }
  596. ]
  597. }
  598. },
  599. {
  600. "name": "Cast",
  601. "schema": {
  602. "attributes": [
  603. { "name": "in_data_type", "type": "TensorType" },
  604. { "name": "out_data_type", "type": "TensorType" }
  605. ],
  606. "inputs": [
  607. { "name": "input" }
  608. ],
  609. "outputs": [
  610. { "name": "output" }
  611. ]
  612. }
  613. },
  614. {
  615. "name": "ArgMax",
  616. "schema": {
  617. "attributes": [
  618. { "name": "output_type", "type": "TensorType" }
  619. ]
  620. }
  621. },
  622. {
  623. "name": "ArgMin",
  624. "schema": {
  625. "attributes": [
  626. { "name": "output_type", "type": "TensorType" }
  627. ]
  628. }
  629. },
  630. {
  631. "name": "TransposeConv",
  632. "schema": {
  633. "category": "Layer",
  634. "attributes": [
  635. { "name": "padding", "type": "Padding" },
  636. { "name": "stride_w", "type": "int32" },
  637. { "name": "stride_h", "type": "int32" }
  638. ],
  639. "inputs": [
  640. { "name": "output_shape" },
  641. { "name": "weights" },
  642. { "name": "input" }
  643. ],
  644. "outputs": [
  645. { "name": "output" }
  646. ]
  647. }
  648. },
  649. {
  650. "name": "Shape",
  651. "schema": {
  652. "attributes": [
  653. { "name": "out_type", "type": "TensorType" }
  654. ]
  655. }
  656. },
  657. {
  658. "name": "Unique",
  659. "schema": {
  660. "attributes": [
  661. { "name": "idx_out_type", "type": "TensorType", "default": "int32" }
  662. ]
  663. }
  664. },
  665. {
  666. "name": "Slice",
  667. "schema": {
  668. "category": "Tensor",
  669. "inputs": [
  670. { "name": "input" },
  671. { "name": "begin" },
  672. { "name": "size" }
  673. ],
  674. "outputs": [
  675. { "name": "output" }
  676. ]
  677. }
  678. },
  679. {
  680. "name": "Transpose",
  681. "schema": {
  682. "category": "Transform",
  683. "inputs": [
  684. { "name": "input" },
  685. { "name": "perm" }
  686. ],
  687. "outputs": [
  688. { "name": "output" }
  689. ]
  690. }
  691. },
  692. {
  693. "name": "Quantize",
  694. "schema": {
  695. "inputs": [
  696. { "name": "input" }
  697. ],
  698. "outputs": [
  699. { "name": "output" }
  700. ]
  701. }
  702. },
  703. {
  704. "name": "Dequantize",
  705. "schema": {
  706. "inputs": [
  707. { "name": "input" }
  708. ],
  709. "outputs": [
  710. { "name": "output" }
  711. ]
  712. }
  713. },
  714. {
  715. "name": "Minimum",
  716. "schema": {
  717. "inputs": [
  718. { "name": "input1" },
  719. { "name": "input2" }
  720. ],
  721. "outputs": [
  722. { "name": "output" }
  723. ]
  724. }
  725. },
  726. {
  727. "name": "Maximum",
  728. "schema": {
  729. "inputs": [
  730. { "name": "input1" },
  731. { "name": "input2" }
  732. ],
  733. "outputs": [
  734. { "name": "output" }
  735. ]
  736. }
  737. },
  738. {
  739. "name": "HardSwish",
  740. "schema": {
  741. "category": "Activation",
  742. "inputs": [
  743. { "name": "input" }
  744. ],
  745. "outputs": [
  746. { "name": "output" }
  747. ]
  748. }
  749. }
  750. ]