svdf_template.json 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {
  2. "version": 3,
  3. "operator_codes": [
  4. {
  5. "deprecated_builtin_code": 27,
  6. "version": 1
  7. }
  8. ],
  9. "subgraphs": [
  10. {
  11. "tensors": [
  12. {
  13. "shape": [
  14. batches,
  15. input_size
  16. ],
  17. "type": "INT8",
  18. "buffer": 0,
  19. "name": "tensor_input",
  20. "quantization": {
  21. "scale": [
  22. input_scale
  23. ],
  24. "zero_point": [
  25. input_zp
  26. ],
  27. "quantized_dimension": 0
  28. },
  29. "is_variable": false
  30. },
  31. {
  32. "shape": [
  33. number_filters,
  34. input_size
  35. ],
  36. "type": "INT8",
  37. "buffer": 1,
  38. "name": "tensor_weight_1",
  39. "quantization": {
  40. "scale": [
  41. w_1_scale
  42. ],
  43. "zero_point": [
  44. w_1_zp
  45. ],
  46. "quantized_dimension": 0
  47. },
  48. "is_variable": false
  49. },
  50. {
  51. "shape": [
  52. number_filters,
  53. memory_size
  54. ],
  55. "type": "INT16",
  56. "buffer": 2,
  57. "name": "tensor_weight_2",
  58. "quantization": {
  59. "scale": [
  60. w_2_scale
  61. ],
  62. "zero_point": [
  63. w_2_zp
  64. ],
  65. "quantized_dimension": 0
  66. },
  67. "is_variable": false
  68. },
  69. {
  70. "shape": [
  71. number_units
  72. ],
  73. "type": "INT32",
  74. "buffer": 3,
  75. "name": "tensor_bias",
  76. "quantization": {
  77. "scale": [
  78. bias_scale
  79. ],
  80. "zero_point": [
  81. bias_zp
  82. ],
  83. "quantized_dimension": 0
  84. },
  85. "is_variable": false
  86. },
  87. {
  88. "shape": [
  89. batches,
  90. memory_sizeXnumber_filters
  91. ],
  92. "type": "INT16",
  93. "buffer": 4,
  94. "name": "tensor_state",
  95. "quantization": {
  96. "scale": [
  97. state_scale
  98. ],
  99. "zero_point": [
  100. state_zp
  101. ],
  102. "quantized_dimension": 0
  103. },
  104. "is_variable": true
  105. },
  106. {
  107. "shape": [
  108. batches,
  109. number_units
  110. ],
  111. "type": "INT8",
  112. "buffer": 5,
  113. "name": "tensor_output",
  114. "quantization": {
  115. "scale": [
  116. output_scale
  117. ],
  118. "zero_point": [
  119. output_zp
  120. ],
  121. "quantized_dimension": 0
  122. },
  123. "is_variable": false
  124. }
  125. ],
  126. "inputs": [
  127. 0
  128. ],
  129. "outputs": [
  130. 5
  131. ],
  132. "operators": [
  133. {
  134. "opcode_index": 0,
  135. "inputs": [
  136. 0,
  137. 1,
  138. 2,
  139. 3,
  140. 4
  141. ],
  142. "outputs": [
  143. 5
  144. ],
  145. "builtin_options_type": "SVDFOptions",
  146. "builtin_options": {
  147. "rank": rank_value,
  148. "fused_activation_function": "RELU"
  149. },
  150. "custom_options_format": "FLEXBUFFERS"
  151. }
  152. ]
  153. }
  154. ],
  155. "description": "CMSIS-NN unit test model",
  156. "buffers": [
  157. {},
  158. {
  159. "data": []
  160. },
  161. {
  162. "data": []
  163. },
  164. {
  165. "data": []
  166. },
  167. {
  168. "data": []
  169. },
  170. {
  171. "data": []
  172. }
  173. ]
  174. }