| { |
| "format": "receipt_digit_reader_onnx_v1", |
| "opset": 18, |
| "inputs": [ |
| { |
| "name": "image", |
| "shape": [ |
| "batch", |
| 1, |
| 320, |
| 672 |
| ], |
| "dtype": "float32" |
| } |
| ], |
| "outputs": [ |
| { |
| "name": "slot_logits", |
| "shape": [ |
| "batch", |
| 16, |
| 11 |
| ], |
| "dtype": "float32" |
| } |
| ], |
| "decode": { |
| "slots_0_to_11": "phone digits, left aligned, read until blank", |
| "slots_12_to_15": "street-number digits, left aligned, read until blank", |
| "classes": "0-9 are digits, 10 is blank" |
| }, |
| "question_handling": "question_router.py, regex only; the graph never sees the question", |
| "report": { |
| "format": "receipt_digit_reader_onnx_v1", |
| "opset": 18, |
| "checkpoint": { |
| "name": "final_e100.pt", |
| "epoch": 100, |
| "params": 2457387, |
| "synth_val": { |
| "slot_acc": 0.999613601236476, |
| "phone_exact": 0.9984544049459042, |
| "street_exact": 0.9984544049459042 |
| } |
| }, |
| "fp32": { |
| "graph": { |
| "nodes": { |
| "Add": 25, |
| "Cast": 1, |
| "Concat": 2, |
| "Constant": 48, |
| "ConstantOfShape": 1, |
| "Conv": 11, |
| "Div": 3, |
| "Einsum": 6, |
| "Equal": 1, |
| "Expand": 1, |
| "Gather": 1, |
| "InstanceNormalization": 11, |
| "LayerNormalization": 1, |
| "MatMul": 7, |
| "Mul": 26, |
| "Pow": 1, |
| "Reshape": 24, |
| "Shape": 15, |
| "Sigmoid": 14, |
| "Slice": 2, |
| "Softmax": 3, |
| "Squeeze": 1, |
| "Transpose": 1, |
| "Unsqueeze": 1, |
| "Where": 1 |
| }, |
| "initializers": { |
| "FLOAT": 51 |
| } |
| }, |
| "torch_vs_onnx": { |
| "images": 64, |
| "max_abs_logit_diff": 7.653236389160156e-05, |
| "slot_argmax_agreement": 1.0, |
| "record_agreement": 1.0 |
| }, |
| "cpu_ms_1thread": 45.735501509625465, |
| "synth_val": { |
| "n": 528, |
| "phone_exact": 0.9943181818181818, |
| "street_exact": 0.9962121212121212 |
| } |
| }, |
| "int8_w8a8": { |
| "graph": { |
| "nodes": { |
| "Add": 25, |
| "Cast": 1, |
| "Concat": 2, |
| "Constant": 48, |
| "ConstantOfShape": 1, |
| "Conv": 11, |
| "DequantizeLinear": 33, |
| "Div": 3, |
| "Einsum": 6, |
| "Equal": 1, |
| "Expand": 1, |
| "Gather": 1, |
| "InstanceNormalization": 11, |
| "LayerNormalization": 1, |
| "MatMul": 7, |
| "Mul": 26, |
| "Pow": 1, |
| "QuantizeLinear": 22, |
| "Reshape": 24, |
| "Shape": 15, |
| "Sigmoid": 14, |
| "Slice": 2, |
| "Softmax": 3, |
| "Squeeze": 1, |
| "Transpose": 1, |
| "Unsqueeze": 1, |
| "Where": 1 |
| }, |
| "initializers": { |
| "FLOAT": 73, |
| "INT8": 22, |
| "UINT8": 22 |
| } |
| }, |
| "quantize_seconds": 20.909111709101126, |
| "quantize_linear_nodes": 22, |
| "dequantize_linear_nodes": 33, |
| "calibration_images": 512, |
| "quantized_op_types": [ |
| "Conv" |
| ], |
| "vs_fp32": { |
| "images": 64, |
| "slot_argmax_agreement": 0.96484375, |
| "record_agreement": 0.875 |
| }, |
| "cpu_ms_1thread": 33.94148655934259, |
| "synth_val": { |
| "n": 528, |
| "phone_exact": 0.9943181818181818, |
| "street_exact": 0.9962121212121212 |
| }, |
| "synth_val_drop_vs_fp32": { |
| "phone_exact": 0.0, |
| "street_exact": 0.0 |
| } |
| } |
| } |
| } |