1{
2  "version": 3,
3  "operator_codes": [
4    {
5      "deprecated_builtin_code": 3,
6      "version": 1,
7      "builtin_code": "CONV_2D"
8    }
9  ],
10  "subgraphs": [
11    {
12      "tensors": [
13        {
14          "shape": [
15            batch_size,
16            input_h,
17            input_w,
18            in_ch
19          ],
20          "type": "INT8",
21          "buffer": 0,
22          "name": "tensor_input",
23          "quantization": {
24            "scale": [
25              input_scale
26            ],
27            "zero_point": [
28              input_zp
29            ],
30            "quantized_dimension": 0
31          },
32          "is_variable": false
33        },
34        {
35          "shape": [
36            out_ch,
37            filter_y,
38            filter_x,
39            in_ch
40          ],
41          "type": "INT4",
42          "buffer": 1,
43          "name": "tensor_weight",
44          "quantization": {
45            "scale": w_scale,
46            "zero_point": w_zp,
47            "details_type": "NONE",
48            "quantized_dimension": 0
49          },
50          "is_variable": false
51        },
52        {
53          "shape": [
54            batch_size,
55            output_h,
56            output_w,
57            out_ch
58          ],
59          "type": "INT8",
60          "name": "tensor_output",
61          "buffer": 2,
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": "Conv2DOptions",
92          "builtin_options": {
93            "padding": padding,
94            "stride_w": stride_x,
95            "stride_h": stride_y,
96            "fused_activation_function": "NONE",
97            "dilation_w_factor": dilation_x,
98            "dilation_h_factor": dilation_y
99          },
100          "custom_options_format": "FLEXBUFFERS"
101        }
102      ]
103    }
104  ],
105  "buffers": [
106    {},
107    {
108        "data": [
109            input_weights
110        ]
111    },
112    {}
113  ]
114}
115