Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Checking the Quantization Zero Point After a Model Change Shifts Inspection Scores | Crystal & Oscillator Handbook

After a model update, a synthetic neutral background raises inspection scores even though processing speed and the board's 24 MHz reference look unchanged. Compare image preprocessing with the active model's quantization parameters. In an eight-bit tensor, integer zero need not represent real zero. Models can accept integer arrays of the same size while using different scales and zero points. Old padding, normalization or copy logic can produce successful inference with results that disagree with the reference runner. This example uses offline synthetic images of parts, without people.

Integer inputs can use different numerical meanings

Mapping real values into a finite integer range requires a scale and an integer code for real zero. A common convention is real value = scale × (integer − zero point). The zero point may be a nonzero integer. Signed eight-bit input does not establish a zero point of zero. Symmetric weight quantization can coexist with asymmetric input activation quantization. Weight parameters cannot be reused for input.

An image file pixel also need not equal the input value before quantization. Preprocessing may reorder channels, transform ranges or crop. Real zero is the mathematics at the quantization stage. It is not necessarily a black pixel or neutral value for every channel. If the design pads with real zero after normalization, encode it using the tensor's parameters rather than zero-filling memory unconditionally.

Worked example: a zero point of −7 changes every uncorrected value

Suppose one signed eight-bit input has scale 0.02 and zero point −7. All example values fit and lie on quantization grid points. The real value is 0.02 × (integer − (−7)).

OperationInteger sentReal value interpreted by the modelMeaning
Padding needs real zero−70.00The integer zero point represents real zero
Program fills with integer zero00.14Introduces a fixed positive input offset
Encode real 0.60 correctly230.60Divide by scale and add the zero point
Program omits the zero point and writes 30300.74Adds 0.14 to the interpreted input

An offset of 0.14 at the input does not establish a 0.14 score increase. Nonlinear layers can change the sign or size of the effect. Near a decision boundary an output class can change, while another input can be unaffected. The calculation verifies the numerical representation, not system accuracy. Test rounding, saturation and any distinct quantization ranges under the actual model convention.

Isolate preprocessing, inference output and hardware behavior

Fix a numbered synthetic tile and record model, software, tensor type and quantization metadata. In an approved offline comparison, export a few selected values at the end of preprocessing. Compare expected real and integer values. Include a zero-valued edge or background and a nonzero area with a hand-checkable result. Record which file supplied parameters and which model version loaded. A final screenshot or a successful function return is insufficient.

Feed both processing paths the same synthetic tensor under comparable conditions. If inputs differ between the reference runner and the device, check type, scale, zero point, channel order and transform order. If inputs match but outputs differ, check runtime, kernels, acceleration and output dequantization. Change only the model or only preprocessing when possible to isolate the cause.

Then consider clock evidence. A stable error with identical input and a reproducible preprocessing mismatch points to the input contract. If resets, scheduling or sampling anomalies or an out-of-range reference appear independently, check supply and clock paths. Successful inference does not qualify clock performance across conditions. Reference frequency does not establish valid model input. Keep both acceptance records.

Specify the delivered model and system configuration

Shenzhen SCTF lists SX2M24.000E20F30THN as a 24 MHz active CMOS oscillator. It is an inquiry example for the board and does not identify a fitted product part. Frequency cannot define an input zero point. Verify full code, supply, output and receiver conditions. The system or software supplier should supply the delivered model, data definitions and a repeatable synthetic case. The clock report cannot qualify end-to-end data correctness.

Record the real range after preprocessing, actual integer encoding and tested sample IDs with expected results. Reuse the same tiles after changes to model, quantization or runtime. If the expected result changes by design, retain the new expectation and reason. Matching image size screens interface compatibility but does not qualify numerical representation or use.

Check whether scores are quantized as well. Applying the wrong output scale or zero point can misstate the model's integer result. Retain the input tensor, raw output and converted report value separately. Keep parameters tied to the correct boundary. If definitions are missing, retain raw values and mark interpretation pending.

Frequently asked questions

If a model's zero point is zero, does it still need documenting? Yes. Record it for that tensor alongside scale, type and preprocessing. A later model can differ.

Can score error tell us the missing zero point? Too many stages can affect a score. Obtain the actual input integers and metadata, then verify the arithmetic at that boundary.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.