You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by sk...@apache.org on 2018/09/18 18:07:05 UTC

[incubator-mxnet] branch master updated: Added comment to docs regarding ToTensor transform (#12186)

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

skm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 5d07a07  Added comment to docs regarding ToTensor transform (#12186)
5d07a07 is described below

commit 5d07a07bf60dcd9856b00285c314bce773f7c30c
Author: Thom Lane <th...@gmail.com>
AuthorDate: Tue Sep 18 11:06:53 2018 -0700

    Added comment to docs regarding ToTensor transform (#12186)
    
    * Corrections to profiling tutorial
    
    Corrected a race condition with stopping profiling. Added mx.nd.waitall to ensure all operations have completed, including GPU operations that might otherwise be missing.
    
    Also added alternative code for context selection GPU vs CPU, that had error before on machines with nvidia-smi.
    
    * Adding note in documentation regarding ToTensor transform.
    
    * Removed line to fix lint error.
    
    * Change to start CI build
---
 docs/api/python/gluon/data.md                | 2 +-
 python/mxnet/gluon/data/vision/transforms.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/api/python/gluon/data.md b/docs/api/python/gluon/data.md
index 3c6bb02..99e54c1 100644
--- a/docs/api/python/gluon/data.md
+++ b/docs/api/python/gluon/data.md
@@ -76,7 +76,7 @@ In the rest of this document, we list routines provided by the `gluon.data` pack
 ```
 
 Transforms can be used to augment input data during training. You
-can compose multiple transforms sequentially, for example:
+can compose multiple transforms sequentially (taking note of which functions should be applied before and after `ToTensor`).
 
 ```python
 from mxnet.gluon.data.vision import MNIST, transforms
diff --git a/python/mxnet/gluon/data/vision/transforms.py b/python/mxnet/gluon/data/vision/transforms.py
index 2e35a40..3523be4 100644
--- a/python/mxnet/gluon/data/vision/transforms.py
+++ b/python/mxnet/gluon/data/vision/transforms.py
@@ -245,6 +245,7 @@ class CenterCrop(Block):
 
 class Resize(Block):
     """Resize an image to the given size.
+    Should be applied before `mxnet.gluon.data.vision.transforms.ToTensor`.
 
     Parameters
     ----------