Skip to content

Instantly share code, notes, and snippets.

@Praveenk8051
Created May 6, 2020 11:35
Show Gist options
  • Save Praveenk8051/3e8fecf55d8d1174cf60536851d69f3d to your computer and use it in GitHub Desktop.
Save Praveenk8051/3e8fecf55d8d1174cf60536851d69f3d to your computer and use it in GitHub Desktop.
cnn_mnist
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