Unverified Commit 7fc47eaa authored by Areiser's avatar Areiser Committed by GitHub
Browse files

Clarify scaling of ToTensor transform for target masks in the documentation (#2507)



* Clarify scaling of ToTensor transform for target masks in the documentation

* Add link to the segmentation reference
Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
Co-authored-by: default avatarvfdev <vfdev.5@gmail.com>
parent 62e3fbd8
...@@ -72,6 +72,12 @@ class ToTensor(object): ...@@ -72,6 +72,12 @@ class ToTensor(object):
or if the numpy.ndarray has dtype = np.uint8 or if the numpy.ndarray has dtype = np.uint8
In the other cases, tensors are returned without scaling. In the other cases, tensors are returned without scaling.
.. note::
Because the input image is scaled to [0.0, 1.0], this transformation should not be used when
transforming target image masks. See the `references`_ for implementing the transforms for image masks.
.. _references: https://github.com/pytorch/vision/tree/master/references/segmentation
""" """
def __call__(self, pic): def __call__(self, pic):
......
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