composer.algorithms.functional.cutout

composer.algorithms.functional.cutout(X, n_holes, length)[source]

Implements CutOut augmentation from https://arxiv.org/abs/1708.04552 on the batch level. Adapted from the implementation in https://github.com/uoguelph-mlrg/Cutout

Parameters
  • X (Tensor) – Batch Tensor image of size (B, C, H, W).

  • n_holes (int) – Integer number of holes to cut out

  • length (int) – Side length of the square hole to cut out.

Returns

X_cutout – Image with n_holes of dimension length x length cut out of it.

Return type

torch.Tensor