tensorflow/models · error · ValueError

quantization type {quant_type} is not supported.

Error message

quantization type {quant_type} is not supported.

What it means

Error "quantization type {quant_type} is not supported." thrown in tensorflow/models.

Source

Thrown at official/vision/serving/export_tflite_lib.py:184

        debugger.run()
        return debugger.get_nondebug_quantized_model()

    elif quant_type == 'uint8':
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      converter.default_ranges_stats = (-10, 10)
      converter.inference_type = tf.uint8
      converter.quantized_input_stats = {'input_placeholder': (0., 1.)}
    elif quant_type == 'fp16':
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      converter.target_spec.supported_types = [tf.float16]
    elif quant_type in ('default', 'qat_fp32_io'):
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
    elif quant_type == 'qat':
      converter.optimizations = [tf.lite.Optimize.DEFAULT]
      converter.inference_input_type = tf.uint8  # or tf.int8
      converter.inference_output_type = tf.uint8  # or tf.int8
    else:
      raise ValueError(f'quantization type {quant_type} is not supported.')

  return converter.convert()

View on GitHub (pinned to e006f5f0d5)

Solutions

  1. Use a supported quantization type such as 'fp16', 'int8', or none.
  2. Check the quant_type value in the export config for typos.

When it happens

Trigger: Thrown at official/vision/serving/export_tflite_lib.py:184 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/d72d8d887d90b25a. Report an issue: GitHub.