RandAugmentTransform#
- class composer.algorithms.RandAugmentTransform(severity=9, depth=2, augmentation_set='all')[source]#
Wraps
randaugment_image()
in atorchvision
-compatible transform.See
RandAugment
or the Method Card for more details.Example
import torchvision.transforms as transforms from composer.algorithms.randaugment import RandAugmentTransform randaugment_transform = RandAugmentTransform( severity=9, depth=2, augmentation_set="all" ) composed = transforms.Compose([ randaugment_transform, transforms.RandomHorizontalFlip() ]) transformed_image = composed(image)
- Parameters
severity (int, optional) โ See
RandAugment
.depth (int, optional) โ See
RandAugment
.augmentation_set (str, optional) โ See
RandAugment
.