Acos#
Domain:
ai.onnxSince version: 22
Computes the Acos value of the input tensor element-wise.
Inputs
input (T): Input tensor
Outputs
output (T): The arccosine of the input tensor computed element-wise
Type Constraints
T: Constrain input and output types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16).
Examples#
test_acos
Node:
Acos(x) -> (y)
Inputs:
x: shape=(3, 4, 5), dtype=float32
[[[0.5665616 , 0.7457818 , 0.97100276, 0.4443592 , 0.4442647 ],
[0.7628944 , 0.87734866, 0.5230672 , 0.2855087 , 0.79399663],
[0.40414217, 0.60542035, 0.4549379 , 0.530079 , 0.4359654 ],
[0.16703498, 0.64533466, 0.8153506 , 0.681705 , 0.88432455]],
[[0.06596019, 0.08141465, 0.49587995, 0.12310889, 0.28691137],
[0.04790118, 0.5155199 , 0.7137708 , 0.04374827, 0.9977479 ],
[0.5978522 , 0.5865951 , 0.39716926, 0.43898672, 0.25327316],
[0.5297574 , 0.5436708 , 0.74823534, 0.8180335 , 0.66857344]],
[[0.86182827, 0.70817924, 0.23636054, 0.6562355 , 0.86890894],
[0.8393313 , 0.32443324, 0.15917933, 0.893939 , 0.91269016],
[0.30185628, 0.13158494, 0.32568365, 0.9401739 , 0.39366215],
[0.08773083, 0.60704976, 0.1554775 , 0.9583321 , 0.8756153 ]]]
Outputs:
y: shape=(3, 4, 5), dtype=float32
[[[0.9684692 , 0.7290887 , 0.2414062 , 1.1103375 , 1.110443 ],
[0.7030181 , 0.5004877 , 1.0203506 , 1.2812592 , 0.653441 ],
[1.1547556 , 0.9205024 , 1.0984938 , 1.0121026 , 1.1196856 ],
[1.4029747 , 0.86933506, 0.61746186, 0.8207058 , 0.48575106]],
[[1.5047882 , 1.4892914 , 1.0519485 , 1.4473743 , 1.2797952 ],
[1.5228769 , 1.0291821 , 0.77592885, 1.527034 , 0.06712597],
[0.9299773 , 0.9439481 , 1.162366 , 1.1163257 , 1.3147341 ],
[1.0124818 , 0.99599177, 0.7253981 , 0.61281264, 0.83850753]],
[[0.531933 , 0.78388035, 1.3321778 , 0.8549775 , 0.5178026 ],
[0.5747443 , 1.2403839 , 1.410937 , 0.464738 , 0.4209769 ],
[1.2641572 , 1.4388287 , 1.2390616 , 0.3476559 , 1.1661843 ],
[1.4829526 , 0.9184536 , 1.4146855 , 0.28969124, 0.5040881 ]]]
test_acos_example
Node:
Acos(x) -> (y)
Inputs:
x: shape=(3,), dtype=float32
[-0.5, 0. , 0.5]
Outputs:
y: shape=(3,), dtype=float32
[2.0943952, 1.5707964, 1.0471976]
test_cc_acos
Node:
Acos(x) -> (y)
Inputs:
x: shape=(2, 3), dtype=float32
[[-1. , -0.5 , 0. ],
[ 0.25, 0.5 , 1. ]]
Outputs:
y: shape=(2, 3), dtype=float32
[[3.1415927, 2.0943952, 1.5707964],
[1.3181161, 1.0471976, 0. ]]
Differences with previous version (7)#
SchemaDiff: Acos (domain 'ai.onnx')
old version: 7
new version: 22
breaking: no
Type constraints:
changed ‘T’: added types: [‘tensor(bfloat16)’]