tensorflow/models · error · ValueError
Augmentation policy {} not supported.
Error message
Augmentation policy {} not supported. What it means
Error "Augmentation policy {} not supported." thrown in tensorflow/models.
Source
Thrown at official/projects/maskconver/dataloaders/maskconver_segmentation_input.py:104
aug_rand_hflip=aug_rand_hflip,
preserve_aspect_ratio=preserve_aspect_ratio,
aug_scale_min=aug_scale_min,
aug_scale_max=aug_scale_max)
self._num_classes = num_classes
self.level = level
self._gaussian_iou = gaussian_iou
self._max_num_stuff_centers = max_num_stuff_centers
self._max_num_instances = max_num_instances
if aug_type and aug_type.type:
if aug_type.type == 'autoaug':
self._augmenter = augment.AutoAugment(
augmentation_name=aug_type.autoaug.augmentation_name,
cutout_const=aug_type.autoaug.cutout_const,
translate_const=aug_type.autoaug.translate_const)
else:
raise ValueError('Augmentation policy {} not supported.'.format(
aug_type.type))
else:
self._augmenter = None
def _prepare_image_and_label(self, data, use_augment=False):
"""Prepare normalized image and label."""
image = tf.io.decode_image(data['image/encoded'], channels=3)
label = tf.io.decode_image(data['image/segmentation/class/encoded'],
channels=1)
height = data['image/height']
width = data['image/width']
image = tf.reshape(image, (height, width, 3))
label = tf.reshape(label, (1, height, width))
label = tf.cast(label, tf.float32)
if use_augment and self._augmenter is not None:
image = self._augmenter.distort(image)View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/maskconver/dataloaders/maskconver_segmentation_input.py:104 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/a038445169c20e2c.
Report an issue: GitHub.