Skip to contents

It is defined as: tanh(x) = sinh(x) / cosh(x), i.e. tanh(x) = ((exp(x) - exp(-x)) / (exp(x) + exp(-x))).

Usage

activation_tanh(x)

Arguments

x

Input tensor.

Value

A tensor, the result from applying the activation to the input tensor x.