mindspore/docs/api/api_python/ops/mindspore.ops.func_logsumex...

19 lines
582 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.ops.logsumexp
=======================
.. py:function:: mindspore.ops.logsumexp(input, dim, keepdim=False)
计算tensor在指定维度上的指数和的对数。
.. math::
logsumexp(input) = \log(\sum(e^{input-input_{max}})) + input_{max}
参数:
- **input** (Tensor) - 输入tensor。
- **dim** (Union[int, tuple(int), list(int)]) - 指定维度。如果为 ``()`` ,计算 `input` 中的所有元素。
- **keepdim** (bool可选) - 输出tensor是否保留维度。默认 ``False``
返回:
Tensor