mindspore/docs/api/api_python/ops/mindspore.ops.func_ldexp.rst

25 lines
747 B
ReStructuredText
Raw Normal View History

2022-11-06 17:53:59 +08:00
mindspore.ops.ldexp
====================
.. py:function:: mindspore.ops.ldexp(x, other)
2022-12-23 14:57:06 +08:00
将输入乘以 :math:`2^{other}`
2022-11-06 17:53:59 +08:00
.. math::
out_{i} = x_{i} * ( 2_{i} ^{other} )
.. note::
通常,该函数可以通过将输入中的尾数乘以 `other` 中的指数的整数2的幂来创建浮点数。
参数:
- **x** (Tensor) - 输入的一个Tensor。
- **other** (Tensor) - 指数Tensor通常为整数。
返回:
Tensor返回计算的结果。
异常:
- **TypeError** - 如果 `x` 不是Tensor。
- **TypeError** - 如果 `other` 不是Tensor。
- **ValueError** - 如果 `x``other` 在非单数维的size不相同或不等于1。