Skip to content

Instantly share code, notes, and snippets.

@vipul79321
Created June 22, 2019 12:15
Show Gist options
  • Save vipul79321/f6fcc32d88365acea8f71cd22d2a993b to your computer and use it in GitHub Desktop.
Save vipul79321/f6fcc32d88365acea8f71cd22d2a993b to your computer and use it in GitHub Desktop.
model = Sequential()
model.add(Conv2D(30, (5, 5), input_shape=(1 , 28, 28), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Conv2D(15, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.2))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dense(50, activation='relu'))
model.add(Dense(13, activation='softmax'))
# Compile model
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment