Created
March 20, 2021 15:07
-
-
Save theSLWayne/6e0cf0bcfbf42b523385222d31371ffa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
# Create the model | |
model = tf.keras.models.Sequential([ | |
tf.keras.layers.Conv2D(16, kernel_size = (3, 3), activation = 'relu', padding = 'same', input_shape = (244, 244, 3)), | |
tf.keras.layers.MaxPool2D(pool_size = (2, 2), strides = 2), | |
tf.keras.layers.Conv2D(32, kernel_size = (3, 3), activation = 'relu', padding = 'same'), | |
tf.keras.layers.MaxPool2D(pool_size = (2, 2), strides = 2), | |
tf.keras.layers.Flatten(), | |
tf.keras.layers.Dense(2, activation = 'softmax') | |
]) | |
# Save the model | |
model.save("keras_model.h5") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment