A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.pytorch.org/docs/stable/generated/torch.atan2.html below:

torch.atan2 — PyTorch 2.8 documentation

torch.atan2#
torch.atan2(input: Tensor, other: Tensor, *, out: Optional[Tensor]) Tensor#

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

The shapes of input and other must be broadcastable.

Parameters
  • input (Tensor) – the first input tensor

  • other (Tensor) – the second input tensor

Keyword Arguments

out (Tensor, optional) – the output tensor.

Example:

>>> a = torch.randn(4)
>>> a
tensor([ 0.9041,  0.0196, -0.3108, -2.4423])
>>> torch.atan2(a, torch.randn(4))
tensor([ 0.9833,  0.0811, -1.9743, -1.4151])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4