% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transforms-generics.R
\name{transform_normalize}
\alias{transform_normalize}
\title{Normalize a tensor image with mean and standard deviation}
\usage{
transform_normalize(img, mean, std, inplace = FALSE)
}
\arguments{
\item{img}{A \code{magick-image}, \code{array} or \code{torch_tensor}.}

\item{mean}{(sequence): Sequence of means for each channel.}

\item{std}{(sequence): Sequence of standard deviations for each channel.}

\item{inplace}{(bool,optional): Bool to make this operation in-place.}
}
\description{
Given mean: \verb{(mean[1],...,mean[n])} and std: \verb{(std[1],..,std[n])} for \code{n}
channels, this transform will normalize each channel of the input
\code{torch_tensor} i.e.,
\code{output[channel] = (input[channel] - mean[channel]) / std[channel]}
}
\note{
This transform acts out of place, i.e., it does not mutate the input tensor.
}
\seealso{
Other unitary_transforms: 
\code{\link{transform_adjust_brightness}()},
\code{\link{transform_adjust_contrast}()},
\code{\link{transform_adjust_gamma}()},
\code{\link{transform_adjust_hue}()},
\code{\link{transform_adjust_saturation}()},
\code{\link{transform_affine}()},
\code{\link{transform_center_crop}()},
\code{\link{transform_convert_image_dtype}()},
\code{\link{transform_crop}()},
\code{\link{transform_grayscale}()},
\code{\link{transform_hflip}()},
\code{\link{transform_linear_transformation}()},
\code{\link{transform_pad}()},
\code{\link{transform_perspective}()},
\code{\link{transform_resize}()},
\code{\link{transform_rgb_to_grayscale}()},
\code{\link{transform_rotate}()},
\code{\link{transform_to_tensor}()},
\code{\link{transform_vflip}()}
}
\concept{unitary_transforms}
