Support for tensordot
shijie-wu
<SCODE>import torch
import numpy as np

M = torch.randn(3, 3, 4)
v = torch.randn(2, 2, 3)

out = torch.Tensor(np.tensordot(v.numpy(), M.numpy(), axes=[[2], [0]]))
<ECODE> Not as concise, but it’s there.
neverfox
Not exactly true, because if you want to backprop through it, you will break the graph…
miguelvr
Ah, yes, that’s true and that would be important under most circumstances.
neverfox
So, is there any workaround for tensordot in pytorch?
ajeetk
deanmark
tom