Skip to content

Instantly share code, notes, and snippets.

@Bennykillua
Created July 2, 2022 09:34
Show Gist options
  • Save Bennykillua/b07fa6616fd0106547a21c36aed1839c to your computer and use it in GitHub Desktop.
Save Bennykillua/b07fa6616fd0106547a21c36aed1839c to your computer and use it in GitHub Desktop.
Keras Open Source
import tensorflow as tf
from tensorflow import keras
#load dataset
mnist = tf.keras.datasets.mnist
#Build a machine learning model
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(100, activation='relu'),
tf.keras.layers.Dropout(0.5),
tf.keras.layers.Dense(10)
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment