MODEL 1 : 3 Layers with 1 Convolution layer
model_1 = keras .models .Sequential ([
keras .layers .Conv2D (32 , (3 ,3 ), activation = 'relu' , input_shape = (28 , 28 ,1 )), # layer 1
keras .layers .MaxPool2D ((2 ,2 )), # layer 2
keras .layers .Flatten (),
keras .layers .Dense (10 , activation = 'softmax' )]) # layer 3
2. Training with Training loss
model_1 .fit (train_images , train_labels , epochs = 5 )
Perform Test with Test data
4. Images and corresponding probability that predicted Right
5. Images and corresponding probability that predicted Wrong
MODEL 2 : 5 Layers with 2 Convolution layer
model_2 = keras .models .Sequential ([
keras .layers .Conv2D (32 , (3 ,3 ), activation = 'relu' , input_shape = (28 ,28 ,1 )), # layer 1
keras .layers .MaxPool2D ((2 ,2 )), # layer 2
keras .layers .Conv2D (64 , (3 ,3 ), activation = 'relu' ), # layer 3
keras .layers .MaxPool2D ((2 ,2 )), # layer 4
keras .layers .Flatten (),
keras .layers .Dense (10 , activation = 'softmax' )]) # layer 5
2. Training with Training loss
model_2 .fit (train_images , train_labels , epochs = 5 )
Perform Test with Test data
4. Images and corresponding probability that predicted Right
5. Images and corresponding probability that predicted Wrong
MODEL 3 : 7 Layers with 4 Convolution layer
model_3 = keras .models .Sequential ([
keras .layers .Conv2D (32 , (3 ,3 ), activation = 'relu' , input_shape = (28 , 28 ,1 )), # layer 1
keras .layers .MaxPool2D ((2 ,2 )), # layer 2
keras .layers .Conv2D (64 , (3 ,3 ), activation = 'relu' ), # layer 3
keras .layers .Conv2D (64 , (3 ,3 ), activation = 'relu' ), # layer 4
keras .layers .MaxPool2D ((2 ,2 )), # layer 5
keras .layers .Conv2D (128 , (3 ,3 ), activation = 'relu' ), # layer 6
keras .layers .Flatten (),
keras .layers .Dense (10 , activation = 'softmax' )])
2. Training with Training loss
model_3 .fit (train_images , train_labels , epochs = 5 )
Perform Test with Test data
4. Images and corresponding probability that predicted Right
5. Images and corresponding probability that predicted Wrong