tensorflow/models · error · ValueError

Invalid augmentation_name: {}

Error message

Invalid augmentation_name: {}

What it means

Error "Invalid augmentation_name: {}" thrown in tensorflow/models.

Source

Thrown at official/projects/unified_detector/data_loaders/autoaugment.py:641

  AutoAugment is from the paper: https://arxiv.org/abs/1805.09501.

  Args:
    image: `Tensor` of shape [height, width, 3] representing an image.
    augmentation_name: The name of the AutoAugment policy to use. The available
      options are `v0` and `test`. `v0` is the policy used for all of the
      results in the paper and was found to achieve the best results on the COCO
      dataset. `v1`, `v2` and `v3` are additional good policies found on the
      COCO dataset that have slight variation in what operations were used
      during the search procedure along with how many operations are applied in
      parallel to a single image (2 vs 3).

  Returns:
    A tuple containing the augmented versions of `image`.
  """
  available_policies = {'v0': policy_v0, 'test': policy_vtest}
  if augmentation_name not in available_policies:
    raise ValueError('Invalid augmentation_name: {}'.format(augmentation_name))

  policy = available_policies[augmentation_name]()
  # Hparams that will be used for AutoAugment.
  augmentation_hparams = dict(cutout_const=100, translate_const=250)

  return build_and_apply_nas_policy(policy, image, augmentation_hparams)


# Cutout is implemented separately.
_RAND_TRANSFORMS = [
    'AutoContrast',
    'Equalize',
    'Invert',
    'Rotate',
    'Posterize',
    'Solarize',
    'Color',
    'Contrast',

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/unified_detector/data_loaders/autoaugment.py:641 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/e19cc85ccfe54869. Report an issue: GitHub.