Skip to content

Instantly share code, notes, and snippets.

@islem-esi
Created February 14, 2021 22:34
Show Gist options
  • Save islem-esi/891d431e5c9a277b0ce6202ec7544744 to your computer and use it in GitHub Desktop.
Save islem-esi/891d431e5c9a277b0ce6202ec7544744 to your computer and use it in GitHub Desktop.
model instant
model = Sequential()
#Conv2D Layers
model.add(Conv2D(12, (25, 25), padding='same',input_shape=img_list.shape[1:], activation = 'relu'))
model.add(Conv2D(12, (25, 25), activation = 'relu'))
#Max Pooling Layer
model.add(MaxPooling2D(pool_size=(2, 2)))
#Conv2D Layer
model.add(Conv2D(12, (13, 13), padding='same', activation = 'relu'))
model.add(Conv2D(12, (13, 13), activation = 'relu'))
#Max Pooling
model.add(MaxPooling2D(pool_size=(2, 2)))
#Flattening Layer
model.add(Flatten())
#Dense Layer
model.add(Dense(1024, activation = 'relu'))
model.add(Dense(1, activation = 'sigmoid'))
model.compile(loss='binary_crossentropy',
optimizer='adam',
metrics=['binary_accuracy'])
model.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment