Skip to content

Instantly share code, notes, and snippets.

@KananMahammadli
Created August 29, 2021 22:12
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 KananMahammadli/a67d6b7979d507e7e852b69bf34f6792 to your computer and use it in GitHub Desktop.
Save KananMahammadli/a67d6b7979d507e7e852b69bf34f6792 to your computer and use it in GitHub Desktop.
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense, Flatten
model = tf.keras.Sequential([
Conv2D(8, (3, 3), input_shape=(X_train.shape[1], X_train.shape[2], X_train.shape[3]), activation='relu', padding='same'),
MaxPooling2D((2, 2), padding='same'),
Conv2D(16, (3, 3), activation='relu', padding='same'),
MaxPooling2D((2, 2), padding='same'),
Conv2D(32, (3, 3), activation='relu', padding='same'),
MaxPooling2D((2, 2), padding='same'),
Flatten(),
Dense(40, activation='relu'),
Dense(10, activation='softmax')
])
model.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment