AugmentAndMixTransform#

class composer.algorithms.AugmentAndMixTransform(severity=3, depth=- 1, width=3, alpha=1.0, augmentation_set='all')[source]#

Wrapper module for augmix_image() that can be passed to torchvision.transforms.Compose. See AugMix and the Method Card for details.

Example

import torchvision.transforms as transforms

from composer.algorithms.augmix import AugmentAndMixTransform

augmix_transform = AugmentAndMixTransform(
    severity=3,
    width=3,
    depth=-1,
    alpha=1.0,
    augmentation_set="all"
)
composed = transforms.Compose([
    augmix_transform,
    transforms.RandomHorizontalFlip()
])
transformed_image = composed(image)
Parameters