{"record":{"id":"a038445169c20e2c","repo":"tensorflow/models","slug":"augmentation-policy-not-supported","errorCode":null,"errorMessage":"Augmentation policy {} not supported.","messagePattern":"Augmentation policy (.+?) not supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/maskconver/dataloaders/maskconver_segmentation_input.py","lineNumber":104,"sourceCode":"        aug_rand_hflip=aug_rand_hflip,\n        preserve_aspect_ratio=preserve_aspect_ratio,\n        aug_scale_min=aug_scale_min,\n        aug_scale_max=aug_scale_max)\n\n    self._num_classes = num_classes\n    self.level = level\n    self._gaussian_iou = gaussian_iou\n    self._max_num_stuff_centers = max_num_stuff_centers\n    self._max_num_instances = max_num_instances\n\n    if aug_type and aug_type.type:\n      if aug_type.type == 'autoaug':\n        self._augmenter = augment.AutoAugment(\n            augmentation_name=aug_type.autoaug.augmentation_name,\n            cutout_const=aug_type.autoaug.cutout_const,\n            translate_const=aug_type.autoaug.translate_const)\n      else:\n        raise ValueError('Augmentation policy {} not supported.'.format(\n            aug_type.type))\n    else:\n      self._augmenter = None\n\n  def _prepare_image_and_label(self, data, use_augment=False):\n    \"\"\"Prepare normalized image and label.\"\"\"\n    image = tf.io.decode_image(data['image/encoded'], channels=3)\n    label = tf.io.decode_image(data['image/segmentation/class/encoded'],\n                               channels=1)\n    height = data['image/height']\n    width = data['image/width']\n    image = tf.reshape(image, (height, width, 3))\n\n    label = tf.reshape(label, (1, height, width))\n    label = tf.cast(label, tf.float32)\n\n    if use_augment and self._augmenter is not None:\n      image = self._augmenter.distort(image)","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/maskconver/dataloaders/maskconver_segmentation_input.py#L86-L122","documentation":"Error \"Augmentation policy {} not supported.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/maskconver/dataloaders/maskconver_segmentation_input.py:104 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"}