We have layer configurations in place. Now, we need to train the CNN to make it suitable for predictions. In a CNN, filter values will be adjusted during the training process. The network will learn by itself how to choose proper filters (feature maps) to produce the best results. We will also see that the efficiency and performance of the CNN becomes a challenging task because of the complexity involved in computation. In this recipe, we will train and evaluate our CNN model.
Training images and evaluating CNN output
How to do it...
- Load and initialize the training data using ImageRecordReader:
ImageRecordReader imageRecordReader = new ImageRecordReader(imageHeight,imageWidth,channels,parentPathLabelGenerator);
imageRecordReader...