Comments (notebook):
- Adding more Neurons we have to do more calculations, slowing down the process, but get more accurate.
- The first layer in your network should be the same shape as your data.
- The number of neurons in the last layer should match the number of classes you are classifying for.
- Extra layers are often necessary.
- Flatten as the name implies, converts your multidimensional matrices (
Batch.Size x Img.W x Img.H x Kernel.Size
) to a nice single 2-dimensional matrix: (Batch.Size x (Img.W x Img.H x Kernel.Size)
). During backpropagation it also converts back your delta of size (Batch.Size x (Img.W x Img.H x Kernel.Size)
) to the original (Batch.Size x Img.W x Img.H x Kernel.Size
).
- Dense layer is of course the standard fully connected layer.
Refs:
- Kernel in image processing: examples with images.
- Pooling layer: non-linear down-sampling.
More?
- Image Filtering — Lode's Computer Graphics Tutorial
- Applying Convolutions on top of our Deep neural network will make training → It depends on many factors. It might make your training faster or slower, and a poorly designed Convolutional layer may even be less efficient than a plain DNN!
- What is a Convolution? → A technique to isolate features in images
- What is a Pooling? → A technique to reduce the information in an image while maintaining features
- How do Convolutions improve image recognition? → They isolate features in images
- After passing a 3x3 conv filter over a 28x28 image, how big will the output be? → 26x26{:.img-30}
- After max pooling a 26x26 image with a 2x2 filter, how big will the output be? → 13x13
Using layer API, something like below, check more in the notebook.
An example of classifying horses and humans!
More docs: