Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 9, 2021 08:15
Show Gist options
  • Save amankharwal/f68ee9302396cd63ab06d3bb549664a8 to your computer and use it in GitHub Desktop.
Save amankharwal/f68ee9302396cd63ab06d3bb549664a8 to your computer and use it in GitHub Desktop.
model = keras.Sequential()
model.add(layers.Conv2D(filters=6, kernel_size=(3, 3), activation='relu', input_shape=(32,32,1)))
model.add(layers.AveragePooling2D())
model.add(layers.Conv2D(filters=16, kernel_size=(3, 3), activation='relu'))
model.add(layers.AveragePooling2D())
model.add(layers.Flatten())
model.add(layers.Dense(units=120, activation='relu'))
model.add(layers.Dense(units=84, activation='relu'))
model.add(layers.Dense(units=10, activation = 'softmax'))
model.compile(loss=keras.losses.categorical_crossentropy, optimizer=keras.optimizers.Adam(), metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment