Note
All QNN enum/macro values are resolved in fields.
All input/output tensors are stored in “tensors” config section and the tensor names are later used for defining a node inputs/outputs. The only tensor defined in the node config is a tensor parameter.
Static input tensor data is not stored in the JSON.
{
"model.cpp": "<CPP filename goes here>",
"model.bin": "<BIN filename goes here if applicable else NA>",
"coverter_command": "<command line used goes here>",
"copyright_str": "<copyright str goes here if applicable else "">",
"op_types": ["list of unique op types found in graph"]
"Total parameters": "total parameter count in graph ( value in MB assuming single precision float)",
"Total MACs per inference": "total multiply and accumulates in graph count in M),
"graph": {
"tensors": {
"<tensor_name>: {
"id": <generated_id>,
"type": <tensor_type>,
"dataFormat": <tensor_memory_layout>,
"data_type": <tensor_data_type>,
"quant_params": {
"definition": <enum_value>,
"encoding": <enum_value>,
"scale_offset": {
"offset": <val>,
"scale": <val>
}
}
"current_dims": <list_val>,
"max_dims": <list_val>,
"params_count": <val> ("parameter count for node, along with value/total percentage. (only where applicable)")
},
"<tensor_name_with_axis_scale_offset_variant>: {
"id": <generated_id>,
"type": <tensor_type>,
"dataFormat": <tensor_memory_layout>,
"data_type": <tensor_data_type>,
"quant_params": {
"definition": <enum_value>,
"encoding": <enum_value>,
"axis_scale_offset": {
"axis": <val>,
"num_scale_offsets": <val>,
"scale_offsets": [
{
"scale": <val>,
"offset": <val>
},
...
]
}
}
"current_dims": <list_val>,
"max_dims": <list_val>
},
...
}
"nodes": {
"<node_name>: {
"package": <str_val>,
"type": <str_val>,
"tensor_params": {
"<param_name>": {
"<tensor_name_*>: {
"id": <generated_id>,
"type": <tensor_type>,
"dataFormat": <tensor_memory_layout>,
"data_type": <tensor_data_type>,
"quant_params": {
"definition": <enum_value>,
"encoding": <enum_value>,
"scale_offset": {
"offset": <val>,
"scale": <val>
}
"current_dims": <list_val>,
"max_dims": <list_val>,
"data": <list_val>
}
}
...
},
"scalar_params": {
"param_name": {
"param_data_type": <val>
}
...
},
"input_names": <list_str_val>,
"output_names": <list_str_val>,
"macs_per_inference": <val> ("multiply and accumulate value for node, along with value/total percentage. (only where applicable)")
}
...
}
}
}