$ python demo.py Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz 11493376/11490434 [==============================] - 7s 1us/step 11501568/11490434 [==============================] - 7s 1us/step Metal device set to: Apple M1
systemMemory: 16.00 GB maxCacheSize: 5.33 GB
2022-01-05 11:20:21.920404: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:305] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support. 2022-01-05 11:20:21.920545: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:271] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: <undefined>) 2022-01-05 11:20:22.484838: W tensorflow/core/platform/profile_utils/cpu_utils.cc:128] Failed to get CPU frequency: 0 Hz Epoch 1/5 2022-01-05 11:20:22.682840: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:112] Plugin optimizer for device_type GPU is enabled. 1875/1875 [==============================] - 11s 5ms/step - loss: 0.2896 - accuracy: 0.9160 Epoch 2/5 1875/1875 [==============================] - 9s 5ms/step - loss: 0.1391 - accuracy: 0.9585 Epoch 3/5 1875/1875 [==============================] - 9s 5ms/step - loss: 0.1036 - accuracy: 0.9684 Epoch 4/5 1875/1875 [==============================] - 8s 4ms/step - loss: 0.0844 - accuracy: 0.9739 Epoch 5/5 1875/1875 [==============================] - 8s 4ms/step - loss: 0.0715 - accuracy: 0.9776 2022-01-05 11:21:07.206209: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:112] Plugin optimizer for device_type GPU is enabled. 313/313 [==============================] - 2s 5ms/step - loss: 0.0738 - accuracy: 0.9784