On this page
torch.Tensor.where
Tensor.where(condition, y) → Tensor
-
self.where(condition, y)
is equivalent totorch.where(condition, self, y)
. Seetorch.where()
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.Tensor.where.html