RandomHorizontalFlip
- class torchvision.transforms.v2.RandomHorizontalFlip(p: float = 0.5)[source]
Horizontally flip the input with a given probability.
If the input is a
torch.Tensoror aTVTensor(e.g. , , etc.) it can have arbitrary number of leading batch dimensions. For example, the image can have shape. A bounding box can have shape.