torch.hypot
-
torch.hypot(input, other, *, out=None) → Tensor -
Дано два катета прямоугольного треугольника, верните его гипотенузу.
Формы
inputиotherдолжны быть совместимы для векторизации.- Параметры
- Ключевые аргументы
-
out (Тензор, необязательно) – выходной тензор.
Пример:
>>> a = torch.hypot(torch.tensor([4.0]), torch.tensor([3.0, 4.0, 5.0])) tensor([5.0000, 5.6569, 6.4031])
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.hypot.html