FilesLast commitLast update
10 days ago
2 months ago
3 months ago
1 month ago
13 days ago
5 days ago
1 month ago
13 days ago
5 days ago
1 month ago
11 days ago
README

Tanh

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: activation function. Returns a tensor with the same shape as the input tensor, and performs the elementwise computation on the input tensor.

  • Computation formula:

    tanh(self)=eself−e−selfeself+e−selftanh(self)=\frac{e^{self}-e^{-self}}{e^{self} + e^{-self}}

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
self Input Input parameter for the tanh computation, which is self_i in the formula. FLOAT, FLOAT16, BOOL, UINT8, INT8, INT16, INT32, INT64, BFLOAT16 ND
out Output Output parameter for the tanh computation, which is out_i in the formula. FLOAT, FLOAT16, BFLOAT16 ND
  • Atlas training products and Atlas inference products: BFLOAT16 is not supported.

Constraint Description

None

Invocation Description

Invocation Method Invocation Sample Description
aclnn invocation test_aclnn_tanh Invokes the Tanh operator through the test_aclnn_tanh API.