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/02/25 05:11:35 UTC

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

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 3f7fb82  update comments for class Compose
     new d6c7375  Merge pull request #926 from wannature/singa_v3
3f7fb82 is described below

commit 3f7fb8245444d623427645ccf5a64688c811e868
Author: wenqiao zhang <we...@zju.edu.cn>
AuthorDate: Fri Feb 25 11:23:07 2022 +0800

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

diff --git a/examples/demos/Classification/BloodMnist/transforms.py b/examples/demos/Classification/BloodMnist/transforms.py
index 59dc099..54d9d12 100644
--- a/examples/demos/Classification/BloodMnist/transforms.py
+++ b/examples/demos/Classification/BloodMnist/transforms.py
@@ -26,33 +26,6 @@ import numbers
 
 
 class Compose:
-    """Composes several transforms together. This transform does not support torchscript.
-    Please, see the note below.
-
-    Args:
-        transforms (list of ``Transform`` objects): list of transforms to compose.
-
-    Example:
-        >>> transforms.Compose([
-        >>>     transforms.CenterCrop(10),
-        >>>     transforms.PILToTensor(),
-        >>>     transforms.ConvertImageDtype(torch.float),
-        >>> ])
-
-    .. note::
-        In order to script the transformations, please use ``torch.nn.Sequential`` as below.
-
-        >>> transforms = torch.nn.Sequential(
-        >>>     transforms.CenterCrop(10),
-        >>>     transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)),
-        >>> )
-        >>> scripted_transforms = torch.jit.script(transforms)
-
-        Make sure to use only scriptable transformations, i.e. that work with ``torch.Tensor``, does not require
-        `lambda` functions or ``PIL.Image``.
-
-    """
-
     def __init__(self, transforms):
         self.transforms = transforms