tensorflow/models · error · ValueError

Unsupported model type please select from {yolo_model.YOLO_M

Error message

Unsupported model type please select from {yolo_model.YOLO_MODELS[decoder_cfg.version].keys()}or specify a custom decoder config using YoloDecoder.

What it means

Error "Unsupported model type please select from {yolo_model.YOLO_MODELS[decoder_cfg.version].keys()}or specify a custom decoder config using YoloDecoder." thrown in tensorflow/models.

Source

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

  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]

  base_dict = dict(
      activation=activation,
      use_spatial_attention=decoder_cfg.use_spatial_attention,
      use_separable_conv=decoder_cfg.use_separable_conv,
      use_sync_bn=norm_activation_config.use_sync_bn,
      norm_momentum=norm_activation_config.norm_momentum,
      norm_epsilon=norm_activation_config.norm_epsilon,
      kernel_regularizer=l2_regularizer)

View on GitHub (pinned to e006f5f0d5)

When it happens

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