Cos
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference products | √ |
| Atlas training products | √ |
Function Description
-
Interface function: performs the cosine operation on each element in the input matrix and outputs the result.
-
Computation formula:
outi=cos(inputi)out_{i}=cos(input_{i})
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| input | Input | Input parameter for the cos computation, which is input_i in the formula. | FLOAT, FLOAT16, BFLOAT16 | ND |
| out | Output | Output parameter for the cos computation, which is out_i in the formula. | FLOAT, FLOAT16, BFLOAT16 | ND |
- Atlas 200I/500 A2 inference products, Atlas inference products, and Atlas training products: the data type BFLOAT16 is not supported.
Constraint Description
None
Invocation Description
| Invocation Method | Invocation Sample | Description |
|---|---|---|
| aclnn invocation | test_aclnn_cos | Invokes the Cos operator through the aclnnCos API. |