FilesLast commitLast update
22 days ago
2 months ago
1 month ago
16 days ago
7 days ago
3 months ago
16 days ago
7 days ago
1 month ago
14 days ago
README

NanToNum

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

  • Operator function: replaces the NaN, positive infinity, and negative infinity values in the input with the values specified by nan, posinf, and neginf, respectively.

  • Computation formula:

y={nanif x is NaNposinfif x is +∞neginfif x is −∞xotherwisey=\begin{cases} nan & \text{if } x \text{ is NaN} \\ posinf & \text{if } x \text{ is } +\infty \\ neginf & \text{if } x \text{ is } -\infty \\ x & \text{otherwise} \end{cases}

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
x Input Input parameter for the nan_to_num computation, which is x in the formula. BFLOAT16, FLOAT16, FLOAT ND
y Output Output parameter for the nan_to_num computation, which is y in the formula. BFLOAT16, FLOAT16, FLOAT ND
nan Attribute Value that replaces NaN elements in the tensor. FLOAT -
posinf Attribute Value that replaces positive infinity elements in the tensor. FLOAT -
neginf Attribute Value that replaces negative infinity elements in the tensor. FLOAT -

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_nan_to_num Invokes the NanToNum operator through the aclnnNanToNum API.