Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


torch (version 0.13.0)

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.

outi=inputi2+otheri2

The shapes of input and other must be broadcastable .

Examples

Run this code
if (torch_is_installed()) {

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

Run the code above in your browser using DataLab