normalize(tensor: torch.Tensor, mean: List[float], std: List[float], inplace: bool = False) → torch.Tensor¶
Normalize a float tensor image with mean and standard deviation. This transform does not support PIL Image.
This transform acts out of place by default, i.e., it does not mutates the input tensor.
Normalizefor more details.
tensor (Tensor) – Float tensor image of size (C, H, W) or (B, C, H, W) to be normalized.
mean (sequence) – Sequence of means for each channel.
std (sequence) – Sequence of standard deviations for each channel.
inplace (bool,optional) – Bool to make this operation inplace.
Normalized Tensor image.
- Return type