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

torch_atan2

Atan2


Description

Atan2

Usage

torch_atan2(self, other)

Arguments

self

(Tensor) the first input tensor

other

(Tensor) the second input tensor

atan2(input, other, out=NULL) -> Tensor

Element-wise arctangent of \mbox{input}_{i} / \mbox{other}_{i} with consideration of the quadrant. Returns a new tensor with the signed angles in radians between vector (\mbox{other}_{i}, \mbox{input}_{i}) and vector (1, 0). (Note that \mbox{other}_{i}, the second parameter, is the x-coordinate, while \mbox{input}_{i}, the first parameter, is the y-coordinate.)

The shapes of input and other must be broadcastable .

Examples

if (torch_is_installed()) {

a = torch_randn(c(4))
a
torch_atan2(a, torch_randn(c(4)))
}

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.