this is the code (h5 was made by colab)
import tensorflow as tf
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
new_model = tf.keras.models.load_model('mnist.h5')
new_model.evaluate(x_train,y_train, verbose=2)
output:
2023-02-12 19:51:53.162567: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcudart.so.10.2'; dlerror: libcudart.so.10.2: cannot open shared object file: No such file or directory
2023-02-12 19:51:53.162680: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2023-02-12 19:52:04.767710: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1019] ARM64 does not support NUMA - returning NUMA node zero
2023-02-12 19:52:04.768078: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcudart.so.10.2'; dlerror: libcudart.so.10.2: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.768396: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcublas.so.10'; dlerror: libcublas.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.768708: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcublasLt.so.10'; dlerror: libcublasLt.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.769022: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.769460: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.769849: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.770194: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcusparse.so.10'; dlerror: libcusparse.so.10: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.770540: W tensorflow/stream_executor/platform/default/dso_loader.cc:65] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory
2023-02-12 19:52:04.770637: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2023-02-12 19:52:05.392525: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 188160000 exceeds 10% of free system memory.
WARNING:tensorflow:AutoGraph could not transform <function Model.make_test_function.<locals>.test_function at 0x7f7e1532f0> and will run it as-is.
Please report this to the TensorFlow team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output.
Cause: 'arguments' object has no attribute 'posonlyargs'
To silence this warning, decorate the function with @tf.autograph.experimental.do_not_convert
1875/1875 - 6s - loss: 0.5090 - accuracy: 0.8504 - 6s/epoch - 3ms/step
It works. But it doesn’t seem to be using the GPU.
I am using JetPack 4.6.3