mindspore.dataset.vision.py_transforms.MixUp
- class mindspore.dataset.vision.py_transforms.MixUp(batch_size, alpha, is_single=True)[source]
Apply mix up transformation to the input image and label. Make one input data combined with others.
- Parameters
Examples
>>> import mindspore.dataset.vision.py_transforms as py_vision >>> >>> # Setup multi-batch mixup transformation >>> transform = [py_vision.MixUp(batch_size=16, alpha=0.2, is_single=False)] >>> # Apply the transform to the dataset through dataset.map() >>> dataset = dataset.map(input_columns="image", operations=transform())