[AutoKeras] Why is AutoKeras failing in this case?

I have no clue why this minimal autokeras test program is failing.

Can you tell me why this program is failing?

# File: test_installation_autokeras.py
import tensorflow as tf
from tensorflow.keras.datasets import mnist
import autokeras as ak

# Load MNIST dataset
(x_train, y_train), (x_test, y_test) = mnist.load_data()

# Normalize pixel values (between 0 and 1)
x_train = x_train.astype('float32') / 255.
x_test = x_test.astype('float32') / 255.

# Reshape the data to have shape (batch_size, height, width, channels)
x_train = x_train.reshape(-1, 28, 28, 1)
x_test = x_test.reshape(-1, 28, 28, 1)

# Initialize the image classifier.
clf = ak.ImageClassifier(max_trials=1)

# Search for the best model.
clf.fit(x_train, y_train, epochs=1)

# Evaluate on the testing data.
print('Test accuracy: ', clf.evaluate(x_test, y_test))
my_user_name@192:~$ python3 -m pip show tensorflow autokeras
Name: tensorflow
Version: 2.13.1
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/my_user_name/.local/lib/python3.8/site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, libclang, numpy, opt-einsum, packaging, protobuf, setuptools, six, tensorboard, tensorflow-estimator, tensorflow-io-gcs-filesystem, termcolor, typing-extensions, wrapt
Required-by: autokeras, tensorflow-text, tf-models-official
---
Name: autokeras
Version: 1.1.0
Summary: AutoML for deep learning
Home-page: http://autokeras.com
Author: DATA Lab, Keras Team
Author-email: jhfjhfj1@gmail.com
License: Apache License 2.0
Location: /home/my_user_name/.local/lib/python3.8/site-packages
Requires: keras-nlp, keras-tuner, packaging, pandas, tensorflow
Required-by:
my_user_name@192:~$
my_user_name@192:~$ python3 test_installation_autokeras.py
2023-12-03 17:49:07.783657: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Using TensorFlow backend
2023-12-03 17:49:11.353912: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 2354 MB memory:  -> device: 0, name: NVIDIA GeForce GTX 780, pci bus id: 0000:03:00.0, compute capability: 3.5
2023-12-03 17:49:11.354742: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 2364 MB memory:  -> device: 1, name: NVIDIA GeForce GTX 780, pci bus id: 0000:84:00.0, compute capability: 3.5

Search: Running Trial #1

Hyperparameter    |Value             |Best Value So Far
image_block_1/b...|vanilla           |?
image_block_1/n...|True              |?
image_block_1/a...|False             |?
image_block_1/c...|3                 |?
image_block_1/c...|1                 |?
image_block_1/c...|2                 |?
image_block_1/c...|True              |?
image_block_1/c...|False             |?
image_block_1/c...|0.25              |?
image_block_1/c...|32                |?
image_block_1/c...|64                |?
classification_...|flatten           |?
classification_...|0.5               |?
optimizer         |adam              |?
learning_rate     |0.001             |?

2023-12-03 17:49:19.724654: E tensorflow/core/grappler/optimizers/meta_optimizer.cc:954] layout failed: INVALID_ARGUMENT: Size of values 0 does not match size of permutation 4 @ fanin shape inmodel/dropout/dropout/SelectV2-2-TransposeNHWCToNCHW-LayoutOptimizer
2023-12-03 17:49:19.862432: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:437] Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED
2023-12-03 17:49:19.862550: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:441] Memory usage: 524222464 bytes free, 3167551488 bytes total.
2023-12-03 17:49:19.862608: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:451] Possibly insufficient driver version: 470.223.2
2023-12-03 17:49:19.862632: W tensorflow/core/framework/op_kernel.cc:1828] OP_REQUIRES failed at conv_ops_fused_impl.h:625 : UNIMPLEMENTED: DNN library is not found.
Traceback (most recent call last):
  File "test_installation_autokeras.py", line 20, in <module>
    clf.fit(x_train, y_train, epochs=1)
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/tasks/image.py", line 165, in fit
    history = super().fit(
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/auto_model.py", line 292, in fit
    history = self.tuner.search(
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/engine/tuner.py", line 193, in search
    super().search(
  File "/home/my_user_name/.local/lib/python3.8/site-packages/keras_tuner/engine/base_tuner.py", line 179, in search
    results = self.run_trial(trial, *fit_args, **fit_kwargs)
  File "/home/my_user_name/.local/lib/python3.8/site-packages/keras_tuner/engine/tuner.py", line 304, in run_trial
    obj_value = self._build_and_fit_model(trial, *args, **copied_kwargs)
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/engine/tuner.py", line 101, in _build_and_fit_model
    _, history = utils.fit_with_adaptive_batch_size(
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 88, in fit_with_adaptive_batch_size
    history = run_with_adaptive_batch_size(
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 101, in run_with_adaptive_batch_size
    history = func(x=x, validation_data=validation_data, **fit_kwargs)
  File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 89, in <lambda>
    batch_size, lambda **kwargs: model.fit(**kwargs), **fit_kwargs
  File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/my_user_name/.local/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 53, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.UnimplementedError: Graph execution error:

Detected at node 'model/conv2d/Relu' defined at (most recent call last):
    File "test_installation_autokeras.py", line 20, in <module>
      clf.fit(x_train, y_train, epochs=1)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/tasks/image.py", line 165, in fit
      history = super().fit(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/auto_model.py", line 292, in fit
      history = self.tuner.search(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/engine/tuner.py", line 193, in search
      super().search(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras_tuner/engine/base_tuner.py", line 179, in search
      results = self.run_trial(trial, *fit_args, **fit_kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras_tuner/engine/tuner.py", line 304, in run_trial
      obj_value = self._build_and_fit_model(trial, *args, **copied_kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/engine/tuner.py", line 101, in _build_and_fit_model
      _, history = utils.fit_with_adaptive_batch_size(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 88, in fit_with_adaptive_batch_size
      history = run_with_adaptive_batch_size(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 101, in run_with_adaptive_batch_size
      history = func(x=x, validation_data=validation_data, **fit_kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/autokeras/utils/utils.py", line 89, in <lambda>
      batch_size, lambda **kwargs: model.fit(**kwargs), **fit_kwargs
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 1742, in fit
      tmp_logs = self.train_function(iterator)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 1338, in train_function
      return step_function(self, iterator)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 1322, in step_function
      outputs = model.distribute_strategy.run(run_step, args=(data,))
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 1303, in run_step
      outputs = model.train_step(data)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 1080, in train_step
      y_pred = self(x, training=True)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/training.py", line 569, in __call__
      return super().__call__(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/base_layer.py", line 1150, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 96, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/functional.py", line 512, in call
      return self._run_internal_graph(inputs, training=training, mask=mask)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/functional.py", line 669, in _run_internal_graph
      outputs = node.layer(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 65, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/engine/base_layer.py", line 1150, in __call__
      outputs = call_fn(inputs, *args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/utils/traceback_utils.py", line 96, in error_handler
      return fn(*args, **kwargs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/layers/convolutional/base_conv.py", line 321, in call
      return self.activation(outputs)
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/activations.py", line 321, in relu
      return backend.relu(
    File "/home/my_user_name/.local/lib/python3.8/site-packages/keras/src/backend.py", line 5397, in relu
      x = tf.nn.relu(x)
Node: 'model/conv2d/Relu'
DNN library is not found.
         [[{{node model/conv2d/Relu}}]] [Op:__inference_train_function_13294]
my_user_name@192:~$

Hi @South_Asia, I have executed the above code in colab using Tensorflow 2.15 and did not face any error please refer to this gist for working code. Thank You.