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

Elu

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

  • Description: Calls the exponential linear unit activation function ELU on each element x in the input tensor self, and stores the obtained result in the output tensor out.

  • Formula:

    ELU(x)={scale∗x,x>0α∗scale∗(exp(x∗inputScale)−1),x≤0ELU(x) = \begin{cases} scale \ast x, \quad x > 0\\ \alpha \ast scale \ast (exp(x \ast inputScale)-1), \quad x \leq 0 \end{cases}

  • Parameters:

    Parameter name Input/Output Description Usage instructions Data type Data format Dimensions (shape) Non-contiguous tensor
    self Input Represents the input of the ELU activation function; it is x in the formula. Empty tensors are supported. FLOAT, FLOAT16, BFLOAT16 ND 0-8 √
    alpha Input Represents the activation coefficient of the ELU activation function; it is α in the formula. The data type must be a data type that can be converted to FLOAT. - - - -
    scale Input Represents the scaling coefficient of the ELU activation function; it is scale in the formula. The data type must be a data type that can be converted to FLOAT. - - - -
    inputScale Input Represents the scaling coefficient of the input of the ELU activation function; it is inputScale in the formula. The data type must be a data type that can be converted to FLOAT. - - - -
    out Output Represents the output of the ELU activation function. The shape must be consistent with that of self. FLOAT, FLOAT16, BFLOAT16 ND 0-8 √
    • Atlas training products: The supported data types are FLOAT and FLOAT16.

Constraints

None

Invocation Description

Invocation method Invocation sample Description
aclnn invocation test_aclnn_elu Invokes the Elu operator through the aclnnElu&aclnnInplaceElu interface.
aclnn invocation test_aclnn_inplace_elu Invokes the Elu operator through the aclnnElu&aclnnInplaceElu interface.