Keras; image augmentation; Convolutional Neural Network (CNN); ten-class
classifier for CIFAR-10 dataset:
a) Use cifar10 function in tensorflow.keras.datasets to load CIFAR-10 dataset. Split it
into the training and testing sets. Define a validation set by randomly selecting 20%
of the training images along with their corresponding labels. This will be the
"validation_data".
b) Scale the pixel values of the images in all the sets to a value between 0 and 1.
Perform this process by dividing the image values with 255. Note: No need to flatten
the images.
c) Convert the label vectors for all the sets to binary class matrices using
to_categorical() Keras function.
d) Using Keras library, build a CNN with the following design: 2 convolutional blocks,
1 flattening layer,1 FC layer with 512 nodes, and 1output layer. Each convolutional
block consists of two back-to-back Conv layers followed by max pooling. The filter
size is 3x3x image_depth. The number of filters is 32 in the first convolutional block
and 64 in the second block. Use the following network architecture as a reference:
use picture