CHAPTER 5Advanced Deep Learning
In the previous chapter, we started building deep neural network models for analyzing images using Keras and TensorFlow. Now in this chapter we will start building models that extract complex visual patterns. We will go beyond the MLP into Convolutional Neural Networks (CNN) and show how they are much more effective in building deep models specifically for image analysis. We will use different data in this chapter—a fashion items images dataset. Hopefully it will be interesting and you can try on some of your own image data.
The Rise of Deep Learning Models
In the previous chapter, we saw one type of neural network called the multi‐layered perceptron (MLP). These were the most common types of neural network used in the 1990s. However, these networks have many limitations.
MLP is good for a limited set of features, such as the less than one thousand in our example. As the number of features increases, since all neurons in dense layers are connected to all neurons in the next layer, the weights become very large. This makes the model difficult to train and requires a lot of processing power. As we add more layers with neurons in MLP, we don't see the effect of these layers much in the accuracy. So, adding more dense layers adds to complexity and training time, but doesn't really provide much benefit.
Also, we saw in our example that a 28×28 image was changed into a one‐dimensional 784‐element vector. This became the input layer for our network. ...
Get Keras to Kubernetes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.