torch.logcumsumexp#
- torch.logcumsumexp(input, dim, *, out=None) Tensor #
返回
input
在dim
维度上指数累加和的对数。对于由 dim 定义的累加和索引 和其他索引 ,结果为
示例
>>> a = torch.randn(10) >>> torch.logcumsumexp(a, dim=0) tensor([-0.42296738, -0.04462666, 0.86278635, 0.94622083, 1.05277811, 1.39202815, 1.83525007, 1.84492621, 2.06084887, 2.06844475]))