RandomVerticalFlip
-
class
torchvision.transforms.
RandomVerticalFlip
(p=0.5)[source] Vertically flip the given image randomly with a given probability. If the image is torch Tensor, it is expected to have […, H, W] shape, where … means an arbitrary number of leading dimensions
- Parameters
p (float) – probability of the image being flipped. Default value is 0.5
Examples using
RandomVerticalFlip
:-
forward
(img)[source] - Parameters
img (PIL Image or Tensor) – Image to be flipped.
- Returns
Randomly flipped image.
- Return type
PIL Image or Tensor