Skip to content

Instantly share code, notes, and snippets.

@alonlavian
Created May 14, 2019 19:06
Show Gist options
  • Save alonlavian/04b7df45bdcd4808e226e1b4a4d47000 to your computer and use it in GitHub Desktop.
Save alonlavian/04b7df45bdcd4808e226e1b4a4d47000 to your computer and use it in GitHub Desktop.
model = tf.keras.models.Sequential([
tf.keras.layers.Conv2D(16, (3,3), activation='relu', input_shape=(HEIGHT, WIDTH, 3)),
tf.keras.layers.MaxPooling2D(2, 2),
tf.keras.layers.Conv2D(32, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(1024, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(1, activation='sigmoid')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment