Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions torchvision/transforms/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def to_pil_image(pic, mode=None):
def normalize(tensor, mean, std):
"""Normalize a tensor image with mean and standard deviation.

.. note::
This transform acts in-place, i.e., it mutates the input tensor.

See :class:`~torchvision.transforms.Normalize` for more details.

Args:
Expand Down
3 changes: 3 additions & 0 deletions torchvision/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ class Normalize(object):
will normalize each channel of the input ``torch.*Tensor`` i.e.
``input[channel] = (input[channel] - mean[channel]) / std[channel]``

.. note::
This transform acts in-place, i.e., it mutates the input tensor.

Args:
mean (sequence): Sequence of means for each channel.
std (sequence): Sequence of standard deviations for each channel.
Expand Down