Chapter 10: Introduction to Artificial Neural Networks with Keras
A Review of Hands-On Machine Learning with Scikit-Learn, Keras & Tensorflow by Aurélien Géron
Summary
Artificial Neural Networks are the technology often used at the cutting edge of complex Machine Learning problems. Inspired by and named after the structures of the brain Artificial Neural Networks were originally created to attempt to replicate the human brain in computing. While many of the similarities between brain and Neural Networks have faded away the terminology still remains.
When people think about Machine Learning they often think about tasks that are accomplished by Neural Networks. Some examples of possible tasks include self-driving cars, tumor detection, and facial recognition. Each of these involves some sort of computer vision but Neural Networks can do far more including speech analysis like Siri, or game playing with AlphaGo or AlphaZero (though AlphaZero uses much more Reinforcement Learning now). The applications for this sort of technology are diverse and highly accurate which are currently propelling the world forward.
In this book we are going to use the integrated Keras Api through Tensorflow 2.0. While Keras is the most popular api for neural networks there are many ways to create them including writing your own or creating them through PyTorch.
The Inspiration for Neural Networks
Like I stated above Neural Networks were inspired by the biological neurons in the human brain. Just like in biological neurons neural networks are organized by connected layers that process data as they pass from one neuron to the next neuron.
At the advent of Neural Networks (which were originally theorized in the 1940’s) neurons were just binary switches. This means that they could either exist in an on or an off state (a 0 or 1). This allows for Boolean algebra but did not support the complex computation that you see in modern neural networks.
The Perceptron
The perceptron is the base unit of a neural network. Unlike the neurons discussed in the previous paragraph that were essentially binary switches modern perceptrons are the combination of a neuron (but one which stores numbers and a step function) and it’s input and output value. This is a value where I pass in a value like .85 which is then run through a function like relu, stochastic gradient descent (sgd), or adam. These perceptrons can either be used alone for simple transformations or in large groups and layers to create neural networks.
Multilayer Perceptron
A multilayer perception (neural network) is the stacking of multiple perceptrons between an input layer and an output layer. This layer (or multiple layers) of perceptrons are called the Hidden Layer in our network and can include non-function neurons called bias neurons that add a numerical bias to other neurons in the hidden layer. These multilayer perceptrons use back propagation to change the individual weights and biases of neurons to accomplish the desired task of the neural net as a whole. More on this in future chapters.
My Thoughts
This chapter was the first chapter in the second part of Hands on Machine Learning that focuses on Neural Networks and Deep Learning compared to the first part of the book which was focused on the fundamentals of machine learning. So, it was more so an introduction into what neural networks were and described some of its base capabilities rather than diving deep into any singular topic like the later chapters will. But, with this base I am excited to learn more about neural networks and eventually more about deep neural networks and how they can be used.
Thanks for reading!
If you have any questions or feedback please reach out to me on twitter @wtothdev or leave a comment!
Additionally, I wanted to give a huge thanks to Aurélien Géron for writing such an excellent book. You can purchase said book here (non-affiliate).
Disclaimer: I don’t make any money from any of the services referenced and chose to read and review this book under my own free will.