torch.foreach.div#
- torch.foreach.div(inputs: TensorList, other: ScalarList, /) tuple[Tensor, ...][source]#
- torch.foreach.div(inputs: TensorList, other: Tensor, /) tuple[Tensor, ...]
- torch.foreach.div(inputs: TensorList, other: TensorList, /) tuple[Tensor, ...]
- torch.foreach.div(inputs: TensorList, other: Scalar, /) tuple[Tensor, ...]
Applies
torch.div()to every tensor ininputs.This is semantically equivalent to applying
torch.div()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.
A shared
Tensoroperand must be a 0-D scalar tensor.The
rounding_modeargument is not supported.