You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@singa.apache.org by ka...@apache.org on 2017/10/13 13:20:08 UTC
incubator-singa git commit: SINGA-331 Fix the bug of tensor division
operation
Repository: incubator-singa
Updated Branches:
refs/heads/master 4e60fa2b2 -> f5af1c372
SINGA-331 Fix the bug of tensor division operation
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/f5af1c37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/f5af1c37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/f5af1c37
Branch: refs/heads/master
Commit: f5af1c37298ea4b5d3c8999e1a8f27a28494dfb6
Parents: 4e60fa2
Author: Wentong-DST <li...@gmail.com>
Authored: Thu Oct 12 14:04:26 2017 +0800
Committer: Wentong-DST <li...@gmail.com>
Committed: Thu Oct 12 14:04:26 2017 +0800
----------------------------------------------------------------------
python/singa/tensor.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f5af1c37/python/singa/tensor.py
----------------------------------------------------------------------
diff --git a/python/singa/tensor.py b/python/singa/tensor.py
index 10ff01b..2fcadb4 100644
--- a/python/singa/tensor.py
+++ b/python/singa/tensor.py
@@ -384,7 +384,7 @@ class Tensor(object):
if isinstance(x, Tensor):
self.singa_tensor /= x.singa_tensor
else:
- self.singa_tensor /= float(x)
+ self.__imul__(1/float(x))
return self
'''