projects
/
pytorch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37fd567
)
Update.
author
François Fleuret
<francois@fleuret.org>
Wed, 24 May 2023 15:32:02 +0000
(17:32 +0200)
committer
François Fleuret
<francois@fleuret.org>
Wed, 24 May 2023 15:32:02 +0000
(17:32 +0200)
eingather.py
patch
|
blob
|
history
diff --git
a/eingather.py
b/eingather.py
index
588aacb
..
e73e63f
100755
(executable)
--- a/
eingather.py
+++ b/
eingather.py
@@
-47,7
+47,7
@@
src = torch.rand(3, 5, 7, 11)
index1 = torch.randint(src.size(2), (src.size(3), src.size(1), src.size(3)))
index2 = torch.randint(src.size(3), (src.size(1),))
-# I want result[a, c, e] = src[c, a, index1[e, a, e], index2[a]
, e
]
+# I want result[a, c, e] = src[c, a, index1[e, a, e], index2[a]]
result = eingather("ca(eae)(a) -> ace", src, index1, index2)