Rate this Page

torch.foreach.pow#

torch.foreach.pow(input: Scalar, exponent: TensorList, /) tuple[Tensor, ...][source]#
torch.foreach.pow(input: TensorList, exponent: Scalar, /) tuple[Tensor, ...]
torch.foreach.pow(input: TensorList, exponent: ScalarList, /) tuple[Tensor, ...]
torch.foreach.pow(input: TensorList, exponent: TensorList, /) tuple[Tensor, ...]

Applies torch.pow() at each list position.

This is semantically equivalent to applying torch.pow() independently at every list position. Does not mutate its arguments and returns a tuple of result tensors.

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.

Parameters:
Returns:

a tuple containing one result tensor per list position.