Training a CNN model
Training a CNN model involves four phases: compiling the model, loading the training data, loading the test data, and running the model through epochs of loss evaluation and parameter-updating cycles.
In this section, the choice of theme for the training dataset will be an example from the food-processing industry. The idea here is not only to recognize an object but to form a concept. We will explore concept learning neural networks further in Chapter 10, Conceptual Representation Learning. For the moment, let's train our model.
The goal
The primary goal of this model consists of detecting production efficiency flaws on a food-processing conveyor belt. The use of CIFAR-10 (images) and MNIST (a handwritten digit database) proves useful to understand and train some models. However, in this example, the goal is not to recognize objects but a concept.
The following image shows a section of the conveyor belt that contains an acceptable ...