Created
May 6, 2020 11:35
-
-
Save Praveenk8051/3e8fecf55d8d1174cf60536851d69f3d to your computer and use it in GitHub Desktop.
cnn_mnist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = Sequential() | |
model.add(Conv2D(filters = 32, kernel_size = (5,5),padding = 'Same', | |
activation ='relu', input_shape = (28,28,1))) | |
model.add(Conv2D(filters = 32, kernel_size = (5,5),padding = 'Same', | |
activation ='relu')) | |
model.add(MaxPool2D(pool_size=(2,2))) | |
model.add(Dropout(0.25)) | |
model.add(Conv2D(filters = 64, kernel_size = (3,3),padding = 'Same', | |
activation ='relu')) | |
model.add(Conv2D(filters = 64, kernel_size = (3,3),padding = 'Same', | |
activation ='relu')) | |
model.add(Conv2D(filters = 64, kernel_size = (3,3),padding = 'Same', | |
activation ='relu')) | |
model.add(MaxPool2D(pool_size=(2,2), strides=(2,2))) | |
model.add(Dropout(0.25)) | |
model.add(Flatten()) | |
model.add(Dense(256, activation = "relu")) | |
model.add(Dropout(0.5)) | |
model.add(Dense(10, activation = "softmax")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment