Tanh Function And Its Derivative

Pratikbais
2 min readDec 14, 2021

Activation functions are functions used in a neural network to cipher the weighted sum of inputs and impulses, which is in turn used to decide whether a neuron can be actuated or not. It manipulates the presented data and produces an affair for the neural network that contains the parameters in the data. The tanh activation function are also appertained to as transfer functions in some literature. These can either be direct or nonlinear
depending on the function it represents and is used to control the affair of neural networks across different disciplines.

For a linear model, a linear mapping of an input function to output is played in the hide layers before the last prediction for each and every label is provide. The input vector x transformation is given by

f(x) = wT . x + b

where, x = input, w = weight, and b = bias.

Linear results are produced from the mappings of the above equation and the need for the activation function arises here, first is to convert these linear outputs into non-linear output for next calculation, and then to learn the patterns in the data. The output of these models are given by

y = (w1 x1 + w2 x2 + … + wn xn + b)

These outputs of each layer are fed into the next subsequent layer for multilayered networks until the last output is obtained, but they are linear by default. The expected output is said to determine the type of activation function that has to be deployed in a given network.

However, since the outputs are linear in nature, the nonlinear activation functions are required to convert these linear inputs to non-linear outputs. These transfer functions, applied to the outputs of the linear models to produce the transformed non-linear outputs are ready for further processing. The non-linear output after the application of the activation function is given by

y = α (w1 x1 + w2 x2 + … + wn xn + b)

where α is the activation function.

InsideAIML is the platform where you can learn AI and ML easily.

--

--