tensorflow/models · error · ValueError
Currently only supports FPN.
Error message
Currently only supports FPN.
What it means
Error "Currently only supports FPN." thrown in tensorflow/models.
Source
Thrown at official/projects/qat/vision/modeling/factory.py:173
model=model,
**model.checkpoint_items)
status = ckpt.read(original_checkpoint)
status.expect_partial().assert_existing_objects_matched()
scope_dict = {
'L2': tf_keras.regularizers.l2,
'BatchNormalizationWrapper': qat_nn_layers.BatchNormalizationWrapper,
}
with tfmot.quantization.keras.quantize_scope(scope_dict):
annotated_backbone = tfmot.quantization.keras.quantize_annotate_model(
model.backbone)
optimized_backbone = tfmot.quantization.keras.quantize_apply(
annotated_backbone,
scheme=schemes.Default8BitQuantizeScheme())
decoder = model.decoder
if quantization.quantize_detection_decoder:
if not isinstance(decoder, fpn.FPN):
raise ValueError('Currently only supports FPN.')
decoder = tf_keras.models.clone_model(
decoder,
clone_function=_clone_function_for_fpn,
)
decoder = tfmot.quantization.keras.quantize_apply(decoder)
decoder = tfmot.quantization.keras.remove_input_range(decoder)
head = model.head
if quantization.quantize_detection_head:
if not isinstance(head, dense_prediction_heads.RetinaNetHead):
raise ValueError('Currently only supports RetinaNetHead.')
head = (
dense_prediction_heads_qat.RetinaNetHeadQuantized.from_config(
head.get_config()))
optimized_model = retinanet_model.RetinaNetModel(
backbone=optimized_backbone,View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/qat/vision/modeling/factory.py:173 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/ed39c5581e8ebd42.
Report an issue: GitHub.