Skip to content

Instantly share code, notes, and snippets.

@Akash-Rawat
Last active July 13, 2021 05:52
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 Akash-Rawat/da2e7c0f1060bbe6875ada191ca68d64 to your computer and use it in GitHub Desktop.
Save Akash-Rawat/da2e7c0f1060bbe6875ada191ca68d64 to your computer and use it in GitHub Desktop.
model = models.Sequential()
model.add(layers.Conv2D(16, (3, 3), activation='relu', input_shape=(200, 200, 3)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(32, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Flatten())
model.add(layers.Dense(128, activation='relu'))
model.add(layers.Dense(2))
model.summary()
model.compile(optimizer='adam',
loss=tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True),
metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment