mindspore.dataset.vision.py_transforms.Cutout
- class mindspore.dataset.vision.py_transforms.Cutout(length, num_patches=1)[source]
Randomly cut (mask) out a given number of square patches from the input NumPy image array.
Terrance DeVries and Graham W. Taylor ‘Improved Regularization of Convolutional Neural Networks with Cutout’ 2017 See https://arxiv.org/pdf/1708.04552.pdf
- Parameters
Examples
>>> import mindspore.dataset.vision.py_transforms as py_vision >>> from mindspore.dataset.transforms.py_transforms import Compose >>> >>> Compose([py_vision.Decode(), >>> py_vision.ToTensor(), >>> py_vision.Cutout(80)])