logsumexp

dragon.vm.torch.logsumexp(
  input,
  dim,
  keepdim=False,
  out=None
)[source]

Apply the composite of log, sum, and exp to input.

\[\text{out}_{i} = \log\sum_{j}\exp(\text{input}_{ij}) \]
Parameters:
  • input (dragon.vm.torch.Tensor) The input tensor.
  • dim (Union[int, Sequence[int]]) The dimension(s) to reduce.
  • keepdim (bool, optional, default=False) Whether the output tensor has dim retained or not.
  • out (dragon.vm.torch.Tensor, optional) The output tensor.
Returns:

dragon.vm.torch.Tensor The output tensor.