Skip to content

Instantly share code, notes, and snippets.

@ocinpp
Last active February 17, 2019 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ocinpp/198c7359ada70d77cd4d7e53305ca563 to your computer and use it in GitHub Desktop.
Save ocinpp/198c7359ada70d77cd4d7e53305ca563 to your computer and use it in GitHub Desktop.
Dog Breed - Simple CNN
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D
from keras.layers import Dropout, Flatten, Dense
from keras.models import Sequential
model = Sequential()
### TODO: Define your architecture.
# image is 224×224x3 pixels
model.add(Conv2D(filters=16, kernel_size=(2,2), activation='relu', input_shape=(224,224,3)))
model.add(MaxPooling2D(pool_size=(2, 2), strides=None, padding='same', data_format=None))
model.add(Conv2D(filters=32, kernel_size=(2,2), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=None, padding='same', data_format=None))
model.add(Conv2D(filters=64, kernel_size=(2,2), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=None, padding='same', data_format=None))
model.add(GlobalAveragePooling2D(data_format=None))
model.add(Dense(units=133, activation='softmax'))
model.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment