Full integer quantization converts both model weights and activations to INT8. The TFLite converter estimates activation ranges from representative inputs, which you provide as a Python generator; the converter runs calibration internally. section 6.3
Listing 6.5 Representative dataset generator for calibration
def make_representative_dataset(images, num_calibration=200):
def generator(): #A
indices = np.random.RandomState(42).choice(
len(images), size=min(num_calibration, len(images)),
replace=False
)
for i in indices:
yield [images[i:i+1].astype(np.float32)] #B
return generator #CUse a representative dataset generator to supply sample inputs for calibration. section 6.3
On MobileNetV2, full integer quantization produced 3.48× compression and a 1.58 percentage-point accuracy loss. It was slightly larger than dynamic range quantization (3.68×), partly because activation quantization parameters add metadata. For CNN mobile or edge deployment, the decision guide recommends full integer for static INT8 on NNAPI, Coral, or XNNPACK; use strict integer I/O for integer-only hardware. section 6.3
