From 51f512889f4264313ef7279ff2286b1a2bf42ab5 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 21 Jul 2022 17:23:19 +0300 Subject: [PATCH] Fix keras_tuner_cifar example raises DeprecationWarning and ValueError --- examples/frameworks/kerastuner/keras_tuner_cifar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/frameworks/kerastuner/keras_tuner_cifar.py b/examples/frameworks/kerastuner/keras_tuner_cifar.py index 5f23d740..79002a1d 100644 --- a/examples/frameworks/kerastuner/keras_tuner_cifar.py +++ b/examples/frameworks/kerastuner/keras_tuner_cifar.py @@ -1,6 +1,6 @@ """Keras Tuner CIFAR10 example for the TensorFlow blog post.""" -import kerastuner as kt +import keras_tuner as kt import tensorflow as tf import tensorflow_datasets as tfds from clearml.external.kerastuner import ClearmlTunerLogger @@ -9,6 +9,7 @@ from clearml import Task physical_devices = tf.config.list_physical_devices('GPU') if physical_devices: + tf.config.experimental.set_visible_devices(physical_devices[0], 'GPU') tf.config.experimental.set_memory_growth(physical_devices[0], True)