Weights and Biases
In a CNN each neuron has weights and biases. The model is trained using these weights and biases. The system can then be used to classify the test data.
In a CNN, the weights and biases are the same for all neurons in a single hidden layer. This means that each hidden layer detects one feature in the images. This is really helpful, because translation of an image won't affect detection. For example, in our project when we resized and recolored the network, this will not affect the CNN. It will still be able to detect specific features of both cats and dogs.
Activation and Pooling
Activation is used to transform the output layers.
Pooling is used to reduce the dimensionality of the output layers to make it a single output.
Both of these are used to simplify the model, reducing the number of parameters needed to make a decision.
Together these three ideas allows us to create all the layers (input, hidden, and output) on the CNN.
Application
CNNs are a very important technique that we are using to classify cats and dogs. It not only covers concepts from within class (convolution, weights, and biases) but also goes further to introduce new topics such as hidden layers and neural systems in networks. We are using CNNs to increase the accuracy of our model, since they can detect multiple features even if an image has been translated, resized, and filtered.
One layer CNN Model
We started exploring CNN by using a simple single layer CNN with 32 filters followed by a max pooling layer modeled after VGG (Visual Geometry Group) architecture. We used a batch size of 64 images and 20 epochs. As you can see below, our one layer CNN model is built up of 32 3 x 3 convolution filters followed by a 2 x 2 max pooling layer. We then have a flattening layer and two "dense" activation layers.