Skip to content

Instantly share code, notes, and snippets.

@uds5501
Created August 27, 2018 04:20
Show Gist options
  • Save uds5501/01f574958d156de10bee9ed07625d08c to your computer and use it in GitHub Desktop.
Save uds5501/01f574958d156de10bee9ed07625d08c to your computer and use it in GitHub Desktop.
for fashion mnist blog
model = Sequential()
# Tier one
model.add(Conv2D(32, kernel_size=5, input_shape = (28, 28, 1), activation='relu', padding = 'Same' ))
model.add(Conv2D(64, kernel_size=5, activation='relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size = (2, 2)))
model.add(Dropout(0.33))
model.add(Conv2D(128, kernel_size=3, activation='relu'))
model.add(Conv2D(256, kernel_size=3, activation = 'relu'))
model.add(BatchNormalization())
model.add(MaxPooling2D(pool_size= (2,2)))
model.add(Dropout(0.2))
model.add(Flatten())
model.add(Dense(1024, activation='relu'))
model.add(Dropout(0.33))
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.33))
model.add(Dense(units = 10, activation ='softmax'))
model.compile(optimizer = 'adam', loss = 'categorical_crossentropy', metrics = ['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment