mindspore/docs/api/api_python/mint/mindspore.mint.func_logsume...

23 lines
669 B
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.mint.logsumexp
========================
.. py:function:: mindspore.mint.logsumexp(input, dim, keepdim=False)
计算tensor在指定维度上的指数和的对数。
.. math::
logsumexp(input) = \log(\sum(e^{input-input_{max}})) + input_{max}
.. warning::
这是一个实验性API后续可能修改或删除。
参数:
- **input** (Tensor) - 输入tensor。
- **dim** (Union[int, tuple(int), list(int)]) - 指定维度。如果为 ``()`` ,计算 `input` 中的所有元素。
- **keepdim** (bool可选) - 输出tensor是否保留维度。默认 ``False``
返回:
Tensor