Skip to content

Instantly share code, notes, and snippets.

@MohanaRC
Created June 5, 2023 14:10
Show Gist options
  • Save MohanaRC/79dd88589244b9cfbd479e7f35561ed9 to your computer and use it in GitHub Desktop.
Save MohanaRC/79dd88589244b9cfbd479e7f35561ed9 to your computer and use it in GitHub Desktop.
### Define the model,
def base_model():
"""
Define the model architecture here
"""
inputs = tf.keras.Input(shape=(784,), name='digits')
x = tf.keras.layers.Dense(64, activation='relu', name='dense_1')(inputs)
x = tf.keras.layers.Dense(64, activation='relu', name='dense_2')(x)
outputs = tf.keras.layers.Dense(10, activation='softmax', name='predictions')(x)
model = tf.keras.Model(inputs=inputs, outputs=outputs)
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment