torch.atan2¶
- torch.atan2(input, other, *, out=None) 张量 ¶
逐元素的反正切值 考虑到象限。返回一个包含向量 和向量 之间以弧度表示的有符号角度的新的张量。(注意 ,第二个参数,是x坐标,而 ,第一个参数,是y坐标。)
The shapes of
input
andother
must be 可广播的.示例:
>>> a = torch.randn(4) >>> a 张量([ 0.9041, 0.0196, -0.3108, -2.4423]) >>> torch.atan2(a, torch.randn(4)) 张量([ 0.9833, 0.0811, -1.9743, -1.4151])