tensorflow/models · error · ValueError
dtype {!r} is not supported!
Error message
dtype {!r} is not supported! What it means
Error "dtype {!r} is not supported!" thrown in tensorflow/models.
Source
Thrown at official/vision/dataloaders/classification_input.py:124
range. The default area range is (0.08, 1.0).
https://arxiv.org/abs/2204.07118.
center_crop_fraction: center_crop_fraction.
tf_resize_method: A `str`, interpolation method for resizing image.
three_augment: A bool, whether to apply three augmentations.
"""
self._output_size = output_size
self._aug_rand_hflip = aug_rand_hflip
self._aug_crop = aug_crop
self._num_classes = num_classes
self._image_field_key = image_field_key
if dtype == 'float32':
self._dtype = tf.float32
elif dtype == 'float16':
self._dtype = tf.float16
elif dtype == 'bfloat16':
self._dtype = tf.bfloat16
else:
raise ValueError('dtype {!r} is not supported!'.format(dtype))
if aug_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)
elif aug_type.type == 'randaug':
self._augmenter = augment.RandAugment(
num_layers=aug_type.randaug.num_layers,
magnitude=aug_type.randaug.magnitude,
cutout_const=aug_type.randaug.cutout_const,
translate_const=aug_type.randaug.translate_const,
prob_to_apply=aug_type.randaug.prob_to_apply,
exclude_ops=aug_type.randaug.exclude_ops)
else:
raise ValueError('Augmentation policy {} not supported.'.format(
aug_type.type))
else:View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/vision/dataloaders/classification_input.py:124 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/0e4f5ee44b816cf1.
Report an issue: GitHub.