You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by lx...@apache.org on 2017/07/07 15:58:51 UTC

[38/50] [abbrv] incubator-mxnet-test git commit: convert to long int for direct comparison (#6869)

convert to long int for direct comparison (#6869)

* convert to long int for direct comparison

```self._data_shapes[0].shape``` is ```int``` based shape, and ```data_batch.data``` is ```long int``` base shape result.
The change converts both shape variables into ```long int``` for direct comparison.

* Update module.py


Project: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/commit/2c7f1d85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/tree/2c7f1d85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/diff/2c7f1d85

Branch: refs/heads/master
Commit: 2c7f1d85e0734fd0fa53638ae0b83069e35aea6a
Parents: e9cc791
Author: Liangfu Chen <ch...@gmail.com>
Authored: Wed Jul 5 03:20:09 2017 +0800
Committer: Eric Junyuan Xie <pi...@users.noreply.github.com>
Committed: Tue Jul 4 12:20:09 2017 -0700

----------------------------------------------------------------------
 python/mxnet/module/module.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mxnet-test/blob/2c7f1d85/python/mxnet/module/module.py
----------------------------------------------------------------------
diff --git a/python/mxnet/module/module.py b/python/mxnet/module/module.py
index 1b5ecbc..7520129 100644
--- a/python/mxnet/module/module.py
+++ b/python/mxnet/module/module.py
@@ -560,8 +560,8 @@ class Module(BaseModule):
             raise RuntimeError("If you are trying to do inference, rebind module "
                                "with 'force_rebind=True' and 'for_training=False'")
 
-        curr_data_shapes = (i.shape for i in self._data_shapes)
-        new_data_shapes = (i.shape for i in data_batch.data)
+        curr_data_shapes = tuple(i.shape for i in self._data_shapes)
+        new_data_shapes = tuple(i.shape for i in data_batch.data)
 
         if curr_data_shapes != new_data_shapes:
             if hasattr(data_batch, "provide_data") and data_batch.provide_data: