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

24 lines
752 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.lerp
==================
.. py:function:: mindspore.ops.lerp(input, end, weight)
基于权重参数计算两个tensor之间的线性插值。
.. math::
output_{i} = input_{i} + weight_{i} * (end_{i} - input_{i})
.. note::
- 输入 `input``end` 的shape必须是可广播的。
- 如果 `weight` 为tensor`weight``input``end` 的shape必须是可广播的。
- 在Ascend平台上`weight` 为浮点数,则 `input``end` 类型应为float32。
参数:
- **input** (Tensor) - 起始点。
- **end** (Tensor) - 终止点。
- **weight** (Union[float, Tensor]) - 线性插值公式的权重参数。
返回:
Tensor