Atan2
torch_atan2(self, other)
self
: (Tensor) the first input tensorother
: (Tensor) the second input tensorElement-wise arctangent of
with consideration of the quadrant. Returns a new tensor with the signed angles in radians between vector
and vector . (Note that , the second parameter, is the x-coordinate, while , the first parameter, is the y-coordinate.)
The shapes of input
and other
must be broadcastable .
if (torch_is_installed()) { a = torch_randn(c(4)) a torch_atan2(a, torch_randn(c(4))) }
Useful links