hello today we are going to mention one
of the most common activation function
hyperbolic tangent and this function is
also called as tanh function
and actually it's equal to sinh over cosh
sinh function is equal
to e to the power of X minus e to the
power of minus x over two. similarly a
cos H function is equal to e to the
power of X plus e to the power of minus
X
over 2. let's put these values here into the
power of X minus e to the power of minus
X over 2 over e to the power of X plus e
to the power of minus x over 2. we can
we can remove over two values and tanh
function is equal to e to the power of X
minus e to the power of minus x over e
to the power of X plus e to the power
minus X. I wondered the derivative of Y
with respect to the X. but before that
please remember quotient rule
quotient rule. it says if a function
h can be expressed as function f over
function G
then we can calculate the derivative of
function h like that: derivative of
F times a function G minus derivative of
function G times function f over
function G squared. let's apply this
but before that I need to calculate
the derivative of sinh and
derivative of cos H, too.
e to the power of X over derivative will be equal to
e to the power of x over 2 and e to the
power of minus X's derivative is also e
to the power of minus X.
its multiplier (over two term) remains same
but we need to calculate minus x
derivative here and it's equal to minus
1 and multiplying a minus 1 times minus
1 will be equal to plus 1
that's why a derivative of H would be
equal to e to the power of X plus e to
the power of minus x over 2
notice that this is equal to cos h value
similarly cos h value's derivative
would be equal to sin H let's prove that
e to the power of X over 2. its
derivative is equal to e to the power of
X over 2 and plus e to the power of X's derivative is e to the power of -x
times minus one over 2. write this is
equal to e to the power of X minus e to
the power of minus x over 2. notice that
that's the actual value of sin H. in
other words derivative of sin H is equal
to cos H and derivative of cos H is
equal to sin H value now we can apply a
quotient rule
to find the derivative of tan H value
I need to find the derivative of this
term
derivative of sin h times cos h minus
derivative of cos h times
sin h over cosh squared
let me clear this part of table. remember
sinh's derivative is equal to cos H
times cos H means cosh squared and cos
H's derivative is equal to sin H
and sin H times sin H will be equal to
sin H squared over cosh squared
we can separate these values as like that cos H
squared over cos H squared minus
sin H
/ cos h squared. this is equal to 1 and sin h over cos H value is equal to tanh
I mean that derivative of Y with respect
to the X in other words derivative of
tan H with respect to the X is equal to
one minus
Tan H squared and notice that tanh is
the y-value that's why we can express
this as
one - y squared. please remember
that demonstrating derivatives easily
is the first condition and calculating
them is second one. these preconditions
are this prerequisites makes activation
functions common and as seen the derivative of
hyperbolic tangent is easy to demonstrate
easy to calculate. and the function's graph
would be like that
this maximum value will be 1 at its
minimum value will be minus 1
thank you for watching and see you next time
