Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

torch_hypot

Hypot


Description

Hypot

Usage

torch_hypot(self, other)

Arguments

self

(Tensor) the first input tensor

other

(Tensor) the second input tensor

hypot(input, other, *, out=None) -> Tensor

Given the legs of a right triangle, return its hypotenuse.

\mbox{out}_{i} = √{\mbox{input}_{i}^{2} + \mbox{other}_{i}^{2}}

The shapes of input and other must be broadcastable .

Examples

if (torch_is_installed()) {

torch_hypot(torch_tensor(c(4.0)), torch_tensor(c(3.0, 4.0, 5.0)))
}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.