Reader small image

You're reading from  Machine Learning for Developers

Product typeBook
Published inOct 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781786469878
Edition1st Edition
Languages
Right arrow
Authors (2):
Rodolfo Bonnin
Rodolfo Bonnin
author image
Rodolfo Bonnin

Rodolfo Bonnin is a systems engineer and Ph.D. student at Universidad Tecnolgica Nacional, Argentina. He has also pursued parallel programming and image understanding postgraduate courses at Universitt Stuttgart, Germany. He has been doing research on high-performance computing since 2005 and began studying and implementing convolutional neural networks in 2008, writing a CPU- and GPU-supporting neural network feedforward stage. More recently he's been working in the field of fraud pattern detection with Neural Networks and is currently working on signal classification using machine learning techniques. He is also the author of Building Machine Learning Projects with Tensorflow and Machine Learning for Developers by Packt Publishing.
Read more about Rodolfo Bonnin

View More author details
Right arrow

Convolutional Neural Networks

Well, now things are getting fun! Our models can now learn more complex functions, and we are now ready for a wonderful tour around the more contemporary and surprisingly effective models

After piling layers of neurons became the most popular solution to improving models, new ideas for richer nodes appeared, starting with models based on human vision. They started as little more than research themes, and after the image datasets and more processing power became available, they allowed researchers to reach almost human accuracy in classification challenges, and we are now ready to leverage that power in our projects.

The topics we will cover in this chapter are as follows:

  • Origins of convolutional neural networks
  • Simple implementation of discrete convolution
  • Other operation types: pooling, dropout
  • Transfer learning
...

Origin of convolutional neural networks

Convolutional neural networks (CNNs) have a remote origin. They developed while multi-layer perceptrons were perfected, and the first concrete example is the neocognitron.

The neocognitron is a hierarchical, multilayered Artificial Neural Network (ANN), and was introduced in a 1980 paper by Prof. Fukushima and has the following principal features:

  • Self-organizing
  • Tolerant to shifts and deformation in the input

This original idea appeared again in 1986 in the book version of the original backpropagation paper, and was also employed in 1988 for temporal signals in speech recognition.

The design was improved in 1998, with a paper from Ian LeCun, Gradient-Based Learning Aapplied to Document Recognition, presenting the LeNet-5 network, an architecture used to classify handwritten digits. The model showed increased performance compared to other...

Deep neural networks

Now that we have a rich number of layers, it's time to start a tour of how the neural architectures have evolved over time. Starting in 2012, a rapid succession of new and increasingly powerful combinations of layers began, and it has been unstoppable. This new set of architectures adopted the term deep learning, and we can approximately define them as complex neural architectures that involve at least three layers. They also tend to include more advanced layers than the Single Layer Perceptrons, like convolutional ones.

Deep convolutional network architectures through time

Deep learning architectures date from 20 years ago and have evolved, guided for the most part by the challenge of solving the...

Deploying a deep neural network with Keras

In this exercise, we will generate an instance of the previously described Inception model, provided by the Keras application library. First of all, we will import all the required libraries, including the Keras model handling, the image preprocessing library, the gradient descent used to optimize the variables, and several Inception utilities. Additionally, we will use OpenCV libraries to adjust the new input images, and the common NumPy and matplotlib libraries:

from keras.models import Model
from keras.preprocessing import image
from keras.optimizers import SGD
from keras.applications.inception_v3 import InceptionV3, decode_predictions, preprocess_input

import matplotlib.pyplot as plt
import numpy as np
import cv2

Using TensorFlow backend.

Keras makes it really simple to load a model. You just have to invoke a new instance of the...

Exploring a convolutional model with Quiver

In this practical example, we will load one of the models we have previously studied (in this case, Vgg19) with the help of the Keras library and Quiver. Then we will observe the different stages of the architecture, and how the different layers work, with a certain input.

Exploring a convolutional network with Quiver

Quiver (https://github.com/keplr-io/quiver) is a recent and very convenient tool used to explore models with the help of Keras. It creates a server that can be accessed by a contemporary web browser and allows the visualization of a model's structure and the evaluation of input images from the input layers until the final predictions.

With the following code snippet...

References

  • Fukushima, Kunihiko, and Sei Miyake, Neocognitron: A Self-Organizing Neural Network Model for a Mechanism of Visual Pattern Recognition. Competition and cooperation in neural nets. Springer, Berlin, Heidelberg, 1982. 267-285.
  • LeCun, Yann, et al. Gradient-based learning applied to document recognition. Proceedings of the IEEE 86.11 (1998): 2278-2324.
  • Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton, ImageNet Classification with Deep Convolutional Neural Networks. Advances in neural information processing systems. 2012.
  • Hinton, Geoffrey E., et al, Improving Neural Networks by Preventing Co-Adaptation of Feature Detectors. arXiv preprint arXiv:1207.0580 (2012).
  • Simonyan, Karen, and Andrew Zisserman, Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv preprint arXiv:1409.1556 (2014).
  • Srivastava, Nitish, et al. Dropout: A Simple Way to Prevent...

Summary

This chapter provides important insights into one of the technologies responsible for the amazing new applications you see in the media every day. Also, with the practical example provided, you will even be able to create new customized solutions.

As our models won't be enough to solve very complex problems, in the following chapter, our scope will expand even more, adding the important dimension of time to the set of elements included in our generalization.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Machine Learning for Developers
Published in: Oct 2017Publisher: PacktISBN-13: 9781786469878
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Rodolfo Bonnin

Rodolfo Bonnin is a systems engineer and Ph.D. student at Universidad Tecnolgica Nacional, Argentina. He has also pursued parallel programming and image understanding postgraduate courses at Universitt Stuttgart, Germany. He has been doing research on high-performance computing since 2005 and began studying and implementing convolutional neural networks in 2008, writing a CPU- and GPU-supporting neural network feedforward stage. More recently he's been working in the field of fraud pattern detection with Neural Networks and is currently working on signal classification using machine learning techniques. He is also the author of Building Machine Learning Projects with Tensorflow and Machine Learning for Developers by Packt Publishing.
Read more about Rodolfo Bonnin