tensorflow/models · error · ValueError

Unsupported model version please select from {v3, v4}, or sp

Error message

Unsupported model version please select from {v3, v4}, or specify a custom decoder config using YoloDecoder in you yaml

What it means

Error "Unsupported model version please select from {v3, v4}, or specify a custom decoder config using YoloDecoder in you yaml" thrown in tensorflow/models.

Source

Thrown at official/projects/yolo/modeling/decoders/yolo_decoder.py:604

    l2_regularizer: A `tf_keras.regularizers.Regularizer` instance. Default to
      None.
    **kwargs: Additional kwargs arguments.

  Returns:
    A `tf_keras.Model` instance of the Yolo FPN/PAN decoder.
  """
  decoder_cfg = model_config.decoder.get()
  norm_activation_config = model_config.norm_activation

  activation = (
      decoder_cfg.activation if decoder_cfg.activation != 'same' else
      norm_activation_config.activation)

  if decoder_cfg.version is None:  # custom yolo
    raise ValueError('Decoder version cannot be None, specify v3 or v4.')

  if decoder_cfg.version not in YOLO_MODELS:
    raise ValueError(
        'Unsupported model version please select from {v3, v4}, '
        'or specify a custom decoder config using YoloDecoder in you yaml')

  if decoder_cfg.type is None:
    decoder_cfg.type = 'regular'

  if decoder_cfg.type not in YOLO_MODELS[decoder_cfg.version]:
    raise ValueError('Unsupported model type please select from '
                     '{yolo_model.YOLO_MODELS[decoder_cfg.version].keys()}'
                     'or specify a custom decoder config using YoloDecoder.')

  base_model = YOLO_MODELS[decoder_cfg.version][decoder_cfg.type].copy()

  cfg_dict = decoder_cfg.as_dict()
  for key in base_model:
    if cfg_dict[key] is not None:
      base_model[key] = cfg_dict[key]

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/yolo/modeling/decoders/yolo_decoder.py:604 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/845dbfa607767925. Report an issue: GitHub.