composer.algorithms.functional.colout

composer.algorithms.functional.colout(img, p_row, p_col)[source]

Drops random rows and columns from a single image.

Parameters
  • img (torch.Tensor or PIL Image) – An input image as a torch.Tensor or PIL image

  • p_row (float) – Fraction of rows to drop (drop along H).

  • p_col (float) – Fraction of columns to drop (drop along W).

Returns

torch.Tensor or PIL Image – A smaller image with rows and columns dropped

Return type

Union[torch.Tensor, PIL.Image.Image]