Normalization is a crucial preprocessing step for a CNN, just like for any feed forward networks. Image data is complex. Each image has several pixels of information. Also, each pixel is a source of information. We need to normalize this pixel value so that the neural network will not overfit/underfit while training. Convolution/subsampling layers also need to be specified while designing input layers for CNN. In this recipe, we will normalize and then design input layers for the CNN.
Image preprocessing and the design of input layers
How to do it...
- Create ImagePreProcessingScaler for image normalization:
DataNormalization scaler = new ImagePreProcessingScaler(0,1);
- Create a neural network configuration and add default...