The hyperbolic tangent (tanh) is an activation function that squashes any real value into the interval (-1, 1) with zero-centred output, which removes the systematic gradient bias seen with sigmoid. It is the standard activation inside the LSTM and GRU memory cells used in recurrent networks.
The sigmoid function maps any real number to a value between 0 and 1, which makes it the natural activation function for expressing probabilities in a neural network. It is differentiable across its whole domain, though it suffers from saturation and vanishing gradients in deep networks, so today it is mostly reserved for the output layer.
4 min7874.2
We use first- and third-party cookies to analyze site traffic. You can accept them, reject them, or configure your choice.
Learn more about cookies
Cookie preferences
NecessaryEssential for the site to work. Always on.
AnalyticsHelp us understand how the site is used (Google Analytics).