Training an ANN classifier in multiple epochs
Let's create an ANN that attempts to classify animals based on three measurements: weight, length, and number of teeth. This is, of course, a mock scenario. Realistically, no one would describe an animal with just these three statistics. However, our intent is to improve our understanding of ANNs before we start applying them to image data.
Compared to the minimal example in the previous section, our animal classification mock-up will be more sophisticated in the following ways:
We will increase the number of neurons in the hidden layer.
We will use a larger training dataset. For convenience, we will generate this dataset pseudorandomly.
We will train the ANN in multiple epochs, meaning that we will train and retrain it multiple times with the same dataset each time.
The number of neurons in the hidden layer is an important parameter that needs to be tested in order to optimize the accuracy of any ANN. You will find that a larger hidden...