"apex/contrib/git@developer.sourcefind.cn:OpenDAS/apex.git" did not exist on "34df0f79d5fbb3665a3f55cedb7c2cffc2d2ecfd"
Unverified Commit 16636d7e authored by Hong Xu's avatar Hong Xu Committed by GitHub
Browse files

Use consistent symbols in the doc of Normalize to avoid confusion (#2181)

`Mn`, `Sn` are used as mean and std, but their suddenly turned to be
`mean[n]` and `std[n]` in about 10 words later
parent bd27e942
...@@ -136,8 +136,9 @@ class ToPILImage(object): ...@@ -136,8 +136,9 @@ class ToPILImage(object):
class Normalize(object): class Normalize(object):
"""Normalize a tensor image with mean and standard deviation. """Normalize a tensor image with mean and standard deviation.
Given mean: ``(M1,...,Mn)`` and std: ``(S1,..,Sn)`` for ``n`` channels, this transform Given mean: ``(mean[1],...,mean[n])`` and std: ``(std[1],..,std[n])`` for ``n``
will normalize each channel of the input ``torch.*Tensor`` i.e. channels, this transform will normalize each channel of the input
``torch.*Tensor`` i.e.,
``output[channel] = (input[channel] - mean[channel]) / std[channel]`` ``output[channel] = (input[channel] - mean[channel]) / std[channel]``
.. note:: .. note::
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment