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