Update m1_tf_test.py

This commit is contained in:
Smiril
2022-07-10 21:58:42 +02:00
committed by GitHub
parent 003264fcc4
commit 6d22c27902
+3 -1
View File
@@ -9,6 +9,8 @@
import tensorflow as tf
tf.__version__
tf.config.list_physical_devices()
logits = [[4.0, 2.0, 1.0], [0.0, 5.0, 1.0]]
model = tf.keras.models.load_model('model')
mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
@@ -27,5 +29,5 @@ model.compile(optimizer='adam',
metrics=['accuracy'])
model.fit(x_train, y_train, epochs=10)
model.build()
model.save('model')
model.summary()