Last chance! 50% off unlimited learning
Sale ends in
powered by
Logcumsumexp
torch_logcumsumexp(self, dim)
(Tensor) the input tensor.
(int) the dimension to do the operation over
Returns the logarithm of the cumulative summation of the exponentiation of elements of input in the dimension dim.
input
dim
For summation index \(j\) given by dim and other indices \(i\), the result is
$$ \mbox{logcumsumexp}(x)_{ij} = \log \sum\limits_{j=0}^{i} \exp(x_{ij}) $$
if (torch_is_installed()) { a <- torch_randn(c(10)) torch_logcumsumexp(a, dim=1) }
Run the code above in your browser using DataLab