Hypot
torch_hypot(self, other)
self
: (Tensor) the first input tensorother
: (Tensor) the second input tensorGiven the legs of a right triangle, return its hypotenuse.
The shapes of input
and other
must be broadcastable .
if (torch_is_installed()) { torch_hypot(torch_tensor(c(4.0)), torch_tensor(c(3.0, 4.0, 5.0))) }
Useful links