Solved by albanD in post #4 
              
              
                You might want to try to do the multiplication by hand as I think the regular multiplication is already supported: 
# replace t = torch.prod(t, dim=1) by
dim = 1
res = t.select(dim, 0)
for i in range(1, t.size(dim)):
  res = res * t.select(dim, i)
t = res