Calculates the hyperbolic tangent of the given input tensor element-wise. Args: x (Tensor): Input tensor Returns: Tensor, the output
(x)
| 1953 | |
| 1954 | |
| 1955 | def tanh(x): |
| 1956 | """ |
| 1957 | Calculates the hyperbolic tangent of the given input tensor element-wise. |
| 1958 | Args: |
| 1959 | x (Tensor): Input tensor |
| 1960 | Returns: |
| 1961 | Tensor, the output |
| 1962 | """ |
| 1963 | return Tanh()(x)[0] |
| 1964 | |
| 1965 | |
| 1966 | class Cos(Operator): |