fc_weights_template_null_bias.json 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {
  2. "version": 3,
  3. "operator_codes": [
  4. {
  5. "deprecated_builtin_code": 9,
  6. "version": 4,
  7. "builtin_code": "FULLY_CONNECTED"
  8. }
  9. ],
  10. "subgraphs": [
  11. {
  12. "tensors": [
  13. {
  14. "shape": [
  15. batches,
  16. input_size
  17. ],
  18. "type": "INT8",
  19. "buffer": 0,
  20. "name" : "tensor_input",
  21. "quantization": {
  22. "scale": [
  23. input_scale
  24. ],
  25. "zero_point": [
  26. input_zp
  27. ],
  28. "quantized_dimension": 0
  29. },
  30. "is_variable": false,
  31. "has_rank": true
  32. },
  33. {
  34. "shape": [
  35. output_size,
  36. input_size
  37. ],
  38. "type": "w_type",
  39. "buffer": 1,
  40. "name" : "tensor_weight",
  41. "quantization": {
  42. "scale": [
  43. w_scale
  44. ],
  45. "zero_point": [
  46. w_zp
  47. ],
  48. "details_type": "NONE",
  49. "quantized_dimension": 0
  50. },
  51. "is_variable": false,
  52. "has_rank": true
  53. },
  54. {
  55. "shape": [
  56. batches,
  57. output_size
  58. ],
  59. "type": "INT8",
  60. "buffer": 2,
  61. "name": "tensor_output",
  62. "quantization": {
  63. "scale": [
  64. output_scale
  65. ],
  66. "zero_point": [
  67. output_zp
  68. ],
  69. "details_type": "NONE",
  70. "quantized_dimension": 0
  71. },
  72. "is_variable": false
  73. }
  74. ],
  75. "inputs": [
  76. 0
  77. ],
  78. "outputs": [
  79. 2
  80. ],
  81. "operators": [
  82. {
  83. "opcode_index": 0,
  84. "inputs": [
  85. 0,
  86. 1
  87. ],
  88. "outputs": [
  89. 2
  90. ],
  91. "builtin_options_type": "FullyConnectedOptions",
  92. "builtin_options": {
  93. "fused_activation_function": "NONE",
  94. "weights_format": "DEFAULT",
  95. "keep_num_dims": false,
  96. "asymmetric_quantize_inputs": false
  97. },
  98. "custom_options_format": "FLEXBUFFERS"
  99. }
  100. ]
  101. }
  102. ],
  103. "buffers": [
  104. {},
  105. {
  106. "data": []
  107. },
  108. {}
  109. ]
  110. }