tensorflow/models · error · ValueError

Unknown model name {}

Error message

Unknown model name {}

What it means

Error "Unknown model name {}" thrown in tensorflow/models.

Source

Thrown at official/legacy/image_classification/efficientnet/efficientnet_model.py:485

    Args:
      model_name: the predefined model name
      model_weights_path: the path to the weights (h5 file or saved model dir)
      weights_format: the model weights format. One of 'saved_model', 'h5', or
        'checkpoint'.
      overrides: (optional) a dict containing keys that can override config

    Returns:
      A constructed EfficientNet instance.
    """
    model_configs = dict(MODEL_CONFIGS)
    overrides = dict(overrides) if overrides else {}

    # One can define their own custom models if necessary
    model_configs.update(overrides.pop('model_config', {}))

    if model_name not in model_configs:
      raise ValueError('Unknown model name {}'.format(model_name))

    config = model_configs[model_name]

    model = cls(config=config, overrides=overrides)

    if model_weights_path:
      common_modules.load_weights(
          model, model_weights_path, weights_format=weights_format)

    return model

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/legacy/image_classification/efficientnet/efficientnet_model.py:485 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/a02ef6231feba940. Report an issue: GitHub.