ypxie
(Y)
1
import torch
from torch.autograd import Variable
inputs = Variable(torch.randn(4,5), requires_grad = True)
#inputs = torch.randn(4,5)
cum_out = torch.cumprod(inputs, dim =0)
print(cum_out)
RuntimeError Traceback (most recent call last)
<ipython-input-6-427be1ef1fd7> in <module>()
4 #inputs = torch.randn(4,5)
5
----> 6 cum_out = torch.cumprod(inputs, dim =0)
7
8 print(cum_out)
RuntimeError: Type Variable doesn't implement stateless method cumprod
apaszke
(Adam Paszke)
2
Yes I think it’s not implemented yet. It’s tracked in this issue.
2 Likes
Same for torch.var
method. I hope it will implement, soon!