RandAugmentTransform#

class composer.algorithms.RandAugmentTransform(severity=9, depth=2, augmentation_set='all')[source]#

Wraps randaugment_image() in a torchvision-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