From a55c1d523d4cf7416621a18a2f8afaf8f7567bed Mon Sep 17 00:00:00 2001 From: Baiyu Zhao Date: Thu, 23 Nov 2017 15:00:39 +0800 Subject: [PATCH] a small error in docstring of transforms.Normalize The std sequence should be (S1, ..., Sn). --- torchvision/transforms/transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/transforms/transforms.py b/torchvision/transforms/transforms.py index 903e2b6cf5b..310baf14938 100644 --- a/torchvision/transforms/transforms.py +++ b/torchvision/transforms/transforms.py @@ -94,7 +94,7 @@ def __call__(self, pic): class Normalize(object): """Normalize an tensor image with mean and standard deviation. - Given mean: ``(M1,...,Mn)`` and std: ``(M1,..,Mn)`` for ``n`` channels, this transform + Given mean: ``(M1,...,Mn)`` and std: ``(S1,..,Sn)`` for ``n`` channels, this transform will normalize each channel of the input ``torch.*Tensor`` i.e. ``input[channel] = (input[channel] - mean[channel]) / std[channel]``