normalize — Torchvision 0.22 documentation (original) (raw)

torchvision.transforms.functional.normalize(tensor: Tensor, mean: List[float], std: List[float], inplace: bool = False) → Tensor[source]

Normalize a float tensor image with mean and standard deviation. This transform does not support PIL Image.

Note

This transform acts out of place by default, i.e., it does not mutates the input tensor.

See Normalize for more details.

Parameters:

Returns:

Normalized Tensor image.

Return type:

Tensor