The image can be a PIL Image or a torch Tensor, in which case it is expected to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions

transform_random_vertical_flip(img, p = 0.5)

Arguments

img

A magick-image, array or torch_tensor.

p

(float): probability of the image being flipped. Default value is 0.5

See also