% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transforms-generics.R
\name{transform_random_horizontal_flip}
\alias{transform_random_horizontal_flip}
\title{Horizontally flip an image randomly with a given probability}
\usage{
transform_random_horizontal_flip(img, p = 0.5)
}
\arguments{
\item{img}{A \code{magick-image}, \code{array} or \code{torch_tensor}.}

\item{p}{(float): probability of the image being flipped.
Default value is 0.5}
}
\description{
Horizontally flip an image randomly with a given probability. The image can
be a Magick Image or a torch Tensor, in which case it is expected to have
\verb{[..., H, W]} shape, where ... means an arbitrary number of leading
dimensions
}
\seealso{
Other random_transforms: 
\code{\link{transform_color_jitter}()},
\code{\link{transform_random_affine}()},
\code{\link{transform_random_crop}()},
\code{\link{transform_random_erasing}()},
\code{\link{transform_random_grayscale}()},
\code{\link{transform_random_perspective}()},
\code{\link{transform_random_resized_crop}()},
\code{\link{transform_random_rotation}()},
\code{\link{transform_random_vertical_flip}()}
}
\concept{random_transforms}
