Rate this Page

torch.foreach.lerp_#

torch.foreach.lerp_(inputs: TensorList, end: TensorList, weight: Scalar, /) tuple[Tensor, ...] | list[Tensor][source]#
torch.foreach.lerp_(inputs: TensorList, end: TensorList, weight: ScalarList, /) tuple[Tensor, ...] | list[Tensor]
torch.foreach.lerp_(inputs: TensorList, end: TensorList, weight: TensorList, /) tuple[Tensor, ...] | list[Tensor]

In-place version of torch.foreach.lerp().

This is semantically equivalent to applying torch.lerp() independently at every list position. Mutates every tensor in inputs and returns the exact input container object.

Tensor-list arguments must be non-empty. Corresponding tensor or scalar lists must have the same length. An accelerated multi-tensor implementation is used only when supported by the inputs; otherwise the operation falls back to per-tensor execution.

weight may be one shared scalar, a scalar list or tuple, or a tensor list.

Parameters:
Returns:

the exact inputs list or tuple.