diff --git a/m1_tf_test.py b/m1_tf_test.py index 8afb513..c6fd3fa 100644 --- a/m1_tf_test.py +++ b/m1_tf_test.py @@ -14,11 +14,12 @@ mnist = tf.keras.datasets.mnist x_train, x_test = x_train / 255.0, x_test / 255.0 model = tf.keras.models.Sequential([ tf.keras.layers.Flatten(input_shape=(28, 28)), - tf.keras.layers.Dense(128, activation='relu'), + tf.keras.layers.Dense(128,activation=tf.nn.softmax), tf.keras.layers.Dropout(0.2), - tf.keras.layers.Dense(10), + tf.keras.layers.Dense(10,activation=tf.nn.softmax), tf.keras.layers.Dropout(0.2), - tf.keras.layers.Dense(2,activation=tf.nn.softmax) + tf.keras.layers.Dense(2,activation=tf.nn.softmax), + tf.keras.layers.Dropout(0.2) ]) loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True) model.compile(optimizer='adam',