X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=eingather.py;h=5732a3cbc94e844d116e4c5f36ff39cbb3f777d8;hb=54925f168ea2c62630dd81e69ee6ebb8e3786e8c;hp=e73e63ff384640a8f5edec5f3e2f347c4a59d0e2;hpb=a5ee870f51cbe71921166fb6466a12f1382e670e;p=pytorch.git diff --git a/eingather.py b/eingather.py index e73e63f..5732a3c 100755 --- 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]] +# result[a, c, e] = src[c, a, index1[e, a, e], index2[a]] result = eingather("ca(eae)(a) -> ace", src, index1, index2)