FilesLast commitLast update
4 months ago
1 month ago
3 days ago
6 months ago
3 months ago
3 days ago
1 month ago
18 days ago
README

ReluV2

English | 简体中文

Applicable Products

Product Support
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products ×
Atlas inference products √
Atlas training products √

Function

  • Operator function: Activation function that returns a tensor with the same shape as the input tensor. When a value in the tensor is greater than or equal to 0, the value is taken; when it is less than 0, 0 is taken.

  • Formula:

reluv2(self)={self,self>00,self≤0relu_v2(self) = \begin{cases} self, & self\gt 0 \\ 0, & self\le 0 \end{cases}

Parameters

Parameter name Input/Output/Attribute Description Data type Data format
x Input Input parameter of the ReluV2 computation, which is the input self in the formula. FLOAT, FLOAT16, BFLOAT16, INT8, INT32, UINT8 ND
y Output Output of the ReluV2 computation, which is relu_v2(self) in the formula. FLOAT, FLOAT16, INT8, INT32, INT64, BFLOAT16, UINT8 ND
mask Output Output of the ReluV2 computation. When the input value is greater than 0, the value is 1; when the input value is less than or equal to 0, the value is 0. UINT1 ND

Constraints

None

Invocation Description

Invocation method Invocation sample Description
Graph-mode invocation test_geir_relu_v2 Invokes the ReluV2 operator through graph construction with the operator IR.