SINGA-347 Create a function that supports einsum
revise the example

Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/f548fa34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/f548fa34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/f548fa34

Branch: refs/heads/master
Commit: f548fa343d7057316b432ce36d743ec0c113c339
Parents: 4f5f902
Author: sheyujian <[email protected]>
Authored: Sun Apr 29 13:48:27 2018 +0800
Committer: sheyujian <[email protected]>
Committed: Sun Apr 29 13:48:27 2018 +0800

----------------------------------------------------------------------
 python/singa/tensor.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/f548fa34/python/singa/tensor.py
----------------------------------------------------------------------
diff --git a/python/singa/tensor.py b/python/singa/tensor.py
index 98a3db9..bca5b2f 100644
--- a/python/singa/tensor.py
+++ b/python/singa/tensor.py
@@ -1010,7 +1010,7 @@ def einsum(ops,*args):
 
     A_ = [0,1,2,3,4,5,6,7,8,9,10,11]
     A = A_.reshape(3,2,2)
-    Res = einsum('ki,kj->kij',A,A)
+    Res = einsum('kia,kja->kij',A,A)
     >>> [[[  1   3]
           [  3  13]]
 

Reply via email to