{"record":{"id":"79c7f6704f592d4c","repo":"tensorflow/models","slug":"invalid-augmentation-name","errorCode":null,"errorMessage":"Invalid augmentation_name: {}","messagePattern":"Invalid augmentation_name: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/legacy/image_classification/augment.py","lineNumber":849,"sourceCode":"        applied in parallel to a single image (2 vs 3).\n      policies: list of lists of tuples in the form `(func, prob, level)`,\n        `func` is a string name of the augmentation function, `prob` is the\n        probability of applying the `func` operation, `level` is the input\n        argument for `func`.\n      cutout_const: multiplier for applying cutout.\n      translate_const: multiplier for applying translation.\n    \"\"\"\n    super(AutoAugment, self).__init__()\n\n    if policies is None:\n      self.available_policies = {\n          'v0': self.policy_v0(),\n          'test': self.policy_test(),\n          'simple': self.policy_simple(),\n      }\n\n    if augmentation_name not in self.available_policies:\n      raise ValueError(\n          'Invalid augmentation_name: {}'.format(augmentation_name))\n\n    self.augmentation_name = augmentation_name\n    self.policies = self.available_policies[augmentation_name]\n    self.cutout_const = float(cutout_const)\n    self.translate_const = float(translate_const)\n\n  def distort(self, image: tf.Tensor) -> tf.Tensor:\n    \"\"\"Applies the AutoAugment policy to `image`.\n\n    AutoAugment is from the paper: https://arxiv.org/abs/1805.09501.\n\n    Args:\n      image: `Tensor` of shape [height, width, 3] representing an image.\n\n    Returns:\n      A version of image that now has data augmentation applied to it based on\n      the `policies` pass into the function.","sourceCodeStart":831,"sourceCodeEnd":867,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/image_classification/augment.py#L831-L867","documentation":"Error \"Invalid augmentation_name: {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/legacy/image_classification/augment.py:849 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}