Update m1_tf_test.py

This commit is contained in:
Smiril
2022-07-10 21:34:02 +02:00
committed by GitHub
parent ab52799622
commit 003264fcc4

View File

@@ -14,11 +14,11 @@ 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=tf.nn.softmax),
tf.keras.layers.Dense(128,activation='selu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10,activation=tf.nn.softmax),
tf.keras.layers.Dense(10,activation='tanh'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(2,activation=tf.nn.softmax),
tf.keras.layers.Dense(2,activation='sigmoid'),
tf.keras.layers.Dropout(0.2)
])
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)