Rate this Page

torch.foreach.minimum_#

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

Applies torch.minimum() to every tensor in inputs.

This is semantically equivalent to applying torch.minimum() 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.

Scalar and ScalarList forms are semantically equivalent to torch.clamp() with only max specified.

Parameters:
Returns:

the exact input list or tuple.