import tensorflow as tf from tensorflow import keras
import numpy as np import matplotlib.pyplot as plt import random
print(tf.__version__)
2023-02-22 22:47:18.176362: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2.11.0
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/mnist.npz
11490434/11490434 [==============================] - 6s 0us/step
WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _update_step_xla while saving (showing 3 of 3). These functions will not be directly callable after loading.
INFO:tensorflow:Assets written to: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmp614pyr8m/assets
INFO:tensorflow:Assets written to: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmp614pyr8m/assets
Float model size = 437KBs
2023-02-22 23:22:07.283679: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:362] Ignored output_format.
2023-02-22 23:22:07.283696: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:365] Ignored drop_control_dependency.
2023-02-22 23:22:07.284211: I tensorflow/cc/saved_model/reader.cc:45] Reading SavedModel from: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmp614pyr8m
2023-02-22 23:22:07.285685: I tensorflow/cc/saved_model/reader.cc:89] Reading meta graph with tags { serve }
2023-02-22 23:22:07.285696: I tensorflow/cc/saved_model/reader.cc:130] Reading SavedModel debug info (if present) from: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmp614pyr8m
2023-02-22 23:22:07.289811: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:357] MLIR V1 optimization pass is not enabled
2023-02-22 23:22:07.290950: I tensorflow/cc/saved_model/loader.cc:229] Restoring SavedModel bundle.
2023-02-22 23:22:07.323036: I tensorflow/cc/saved_model/loader.cc:213] Running initialization op on SavedModel bundle at path: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmp614pyr8m
2023-02-22 23:22:07.331699: I tensorflow/cc/saved_model/loader.cc:305] SavedModel load for tags { serve }; Status: success: OK. Took 47489 microseconds.
2023-02-22 23:22:07.351673: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:268] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.
WARNING:absl:Found untraced functions such as _jit_compiled_convolution_op, _jit_compiled_convolution_op, _update_step_xla while saving (showing 3 of 3). These functions will not be directly callable after loading.
INFO:tensorflow:Assets written to: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmpio1p9wql/assets
INFO:tensorflow:Assets written to: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmpio1p9wql/assets
Quantized model size = 114KBs
2023-02-22 23:24:13.132530: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:362] Ignored output_format.
2023-02-22 23:24:13.132544: W tensorflow/compiler/mlir/lite/python/tf_tfl_flatbuffer_helpers.cc:365] Ignored drop_control_dependency.
2023-02-22 23:24:13.132644: I tensorflow/cc/saved_model/reader.cc:45] Reading SavedModel from: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmpio1p9wql
2023-02-22 23:24:13.134124: I tensorflow/cc/saved_model/reader.cc:89] Reading meta graph with tags { serve }
2023-02-22 23:24:13.134133: I tensorflow/cc/saved_model/reader.cc:130] Reading SavedModel debug info (if present) from: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmpio1p9wql
2023-02-22 23:24:13.138687: I tensorflow/cc/saved_model/loader.cc:229] Restoring SavedModel bundle.
2023-02-22 23:24:13.172666: I tensorflow/cc/saved_model/loader.cc:213] Running initialization op on SavedModel bundle at path: /var/folders/mp/n8hmdv6j5y1f9th2v0k78zz80000gp/T/tmpio1p9wql
2023-02-22 23:24:13.181701: I tensorflow/cc/saved_model/loader.cc:305] SavedModel load for tags { serve }; Status: success: OK. Took 49057 microseconds.