You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by zh...@apache.org on 2022/03/01 12:15:58 UTC

[singa] branch dev updated: update comments for ToTensor class

This is an automated email from the ASF dual-hosted git repository.

zhaojing pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/singa.git


The following commit(s) were added to refs/heads/dev by this push:
     new 33bbc71  update comments for ToTensor class
     new a27a054  Merge pull request #935 from wannature/singa_v9
33bbc71 is described below

commit 33bbc71d8b8b86105e529bbffabe735199f49e33
Author: wenqiao zhang <we...@zju.edu.cn>
AuthorDate: Tue Mar 1 19:35:16 2022 +0800

    update comments for ToTensor class
---
 examples/demos/Classification/BloodMnist/transforms.py | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/examples/demos/Classification/BloodMnist/transforms.py b/examples/demos/Classification/BloodMnist/transforms.py
index 54d9d12..19c4ec2 100644
--- a/examples/demos/Classification/BloodMnist/transforms.py
+++ b/examples/demos/Classification/BloodMnist/transforms.py
@@ -44,21 +44,6 @@ class Compose:
 
 
 class ToTensor:
-    """Convert a ``PIL Image`` to numpy.ndarray. This transform does not support torchscript.
-
-    Converts a PIL Image (H x W x C) in the range [0, 255] to a torch.FloatTensor of shape 
-    (H x W x C) in the range [0.0, 1.0]
-    if the PIL Image belongs to one of the modes (L, LA, P, I, F, RGB, YCbCr, RGBA, CMYK, 1)
-
-    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/main/references/segmentation
-    """
-
     def forward(self, pic):
         """
         Args: