mindspore.ops.Lerp

class mindspore.ops.Lerp[source]

Computes the minimum of input tensors element-wise.

Refer to mindspore.ops.lerp() for more detail.

Supported Platforms:

Ascend GPU CPU

Examples

>>> from mindspore.ops.operations.math_ops import Lerp
>>> start = Tensor(np.array([1., 2., 3., 4.]), mindspore.float32)
>>> end = Tensor(np.array([10., 10., 10., 10.]), mindspore.float32)
>>> lerp = Lerp()
>>> output = lerp(start, end, 0.5)
>>> print(output)
[5.5 6. 6.5 7. ]