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 <[email protected]> Authored: Thu Oct 12 14:04:26 2017 +0800 Committer: Wentong-DST <[email protected]> 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 '''
