View source: R/gen-namespace.R
torch_hypot | R Documentation |
Hypot
torch_hypot(self, other)
self |
(Tensor) the first input tensor |
other |
(Tensor) the second input tensor |
Given the legs of a right triangle, return its hypotenuse.
\mbox{out}_{i} = \sqrt{\mbox{input}_{i}^{2} + \mbox{other}_{i}^{2}}
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)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.