The tanh function is a common activation function used in neural networks. It is also known as the hyperbolic tangent function.
$$\sigma(x) = \frac{e{x}-e{-x}}{e{x}+e{-x}}$$
Advantages
Disadvantages ## looks into this
import numpy as np def tanh(x): return np.tanh(x)
tanh <- function(x) { return(tanh(x)) }
function tanh(x) return(tanh(x)) end
import tensorflow as tf def tanh(x): return tf.math.tanh(x)
import torch def tanh(x): return torch.tanh(x)