torch.sqrt
-
torch.sqrt(input, *, out=None) → Tensor -
Возвращает новый тензор с квадратным корнем элементов
input.- Параметры
-
input (Тензор) – входной тензор.
- Ключевые аргументы
-
out (Тензор, необязательно) – выходной тензор.
Пример:
>>> a = torch.randn(4) >>> a tensor([-2.0755, 1.0226, 0.0831, 0.4806]) >>> torch.sqrt(a) tensor([ nan, 1.0112, 0.2883, 0.6933])
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.sqrt.html