7 Evolutionary convolutional neural networks

 

This chapter covers

  • Convolutional neural networks with a Keras primer
  • Defining a neural network architecture with a gene sequence
  • Building a custom crossover operator
  • Applying a custom mutation operator
  • Evolving the best convolutional network architecture for a given dataset

The last chapter showed us the limits of evolutionary algorithms when applied to a complex problem like parameter search. As we have seen, genetic algorithms can provide excellent results on a certain class of problems. However, they fail to deliver when employed for larger image classification networks.

In this chapter, we continue looking at larger networks for image classification. However, this time instead of optimizing parameter weights or model hyperparameters, we look at improving network architecture. More specifically, we cover the network architecture of convolutional neural networks (CNNs).

CNNs were instrumental to the adoption of DL for image classification and other tasks. They are a fantastic tool in the DL practitioner’s toolbelt but are often misunderstood and under-utilized. In the next section, we review CNN models and how they are built in TensorFlow and Keras.

7.1 Reviewing convolutional neural networks in Keras

This section’s project is a review of constructing CNN models for image classification with Keras. While we cover some of the basics of CNN, our focus is more on the details of what makes building these types of networks difficult.

7.1.1 Understanding CNN layer problems

7.1.2 Learning exercises

7.2 Encoding a network architecture in genes

7.2.1 Learning exercises

7.3 Creating the mating crossover operation

7.4 Developing a custom mutation operator

7.5 Evolving convolutional network architecture

7.5.1 Learning exercises

Summary