Skip to Content
Neural Networks with R
book

Neural Networks with R

by Balaji Venkateswaran, Giuseppe Ciaburro
September 2017
Beginner to intermediate
270 pages
5h 53m
English
Packt Publishing
Content preview from Neural Networks with R

Hyperbolic tangent

Another very popular and widely used activation feature is the tanh function. If you look at the figure that follows, you can notice that it looks very similar to sigmoid; in fact, it is a scaled sigmoid function. This is a nonlinear function, defined in the range of values (-1, 1), so you need not worry about activations blowing up. One thing to clarify is that the gradient is stronger for tanh than sigmoid (the derivatives are more steep). Deciding between sigmoid and tanh will depend on your gradient strength requirement. Like the sigmoid, tanh also has the missing slope problem. The function is defined by the following formula:

 

In the following figure is shown a hyberbolic tangent activation function:

This looks ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Deep Learning with R

Deep Learning with R

J.J. Allaire
Advanced Machine Learning with R

Advanced Machine Learning with R

Cory Lesmeister, Dr. Sunil Kumar Chinnamgari

Publisher Resources

ISBN: 9781788397872Supplemental Content