Questions tagged [keras-tuner]

166 questions
1
vote
1 answer

Expected the return value of HyperModel.fit() to be a single float when `objective` is left unspecified

I am training my LSTM model using keras tuner. I am getting an error Expected the return value of HyperModel.fit() to be a single float when objective is left unspecified. Recevied return value:
1
vote
1 answer

Keras Tuner returning an empty list when calling get_best_hyperparameters() and get_best_models(num_models=1)?

I am trying to use Keras Tuner to tune hyperparameters but I am running into trouble. After I run tuner.search() with well-formed inputs and the search successfully runs, tuner.get_best_hyperparameters() and tuner.get_best_models(num_models=1) both…
Anonymous
  • 93
  • 8
1
vote
0 answers

What is the correct way to define conditional hyperparameters in Keras Tuner

I want to create autoencoder and optimize its hyperparameters using Keras Tuner. I want it to contain from 1 to 3 layers in encoder part and each layer to contain less neurons than the previous layer (but more than latent dimensionality, which is…
xdrm
  • 11
  • 2
1
vote
1 answer

Keras Tuner hyperband epoch

I am running Keras Tuner(Hyperband) since Random search does not find optimal solution, I would like to know how we can control the number of models and epochs to run. In Randomsearch we can clearly give it in max trials and execution per trial but…
Jegatheesan
  • 105
  • 2
  • 8
1
vote
1 answer

KerasTuneR only printing output of first trial

The fit_tuner function in KerasTuneR, when used in Rstudio, only prints its progress for the first trial. The simplified code below library(tidyverse) library(tensorflow) library(keras) library(kerastuneR) library(ggplot2) x_data <- matrix(data =…
Mas
  • 329
  • 2
  • 13
1
vote
1 answer

KerastuneR does not install properly on Rtudio

I am trying to install the kerastuneR packages on Rstudio. I use the normal Cran command ("install.packages(kerastuneR)"), and it installs something, but when I run "library(kerastuneR)" I am met with: Error: package or namespace load failed for…
Gevezo
  • 364
  • 3
  • 17
1
vote
1 answer

Keras Tuner get_best_hyperparameters()

Is there any way to have the best hyperparameters get returned as a list that I can access in other parts of my code? I don't want the entire model, I just want to be able to extract the values of the optimal hyperparameters it finds and use it in a…
blinkjisoo
  • 11
  • 1
  • 3
1
vote
0 answers

TypeError: Missing required positional argument. When using KerasTuner to tune ANN deep learning model

I was doing hyperparameter tuning for my Artificial Neural Network (ANN) model just now using KerasTuner where I want to use it to do binary classification. Below is my codes: import tensorflow as tf from tensorflow import keras from keras import…
1
vote
0 answers

Is it possible to view multiple tuner runs at once on tensorboard hparams tab?

I'm using Keras tuner to do hyperparameter optimization on a particular hypermodel which is then trained for different cases (i.e. different houses). My goal for now is to get an easy, straightforward visualisation of what generally works, and what…
1
vote
1 answer

Keras Tuner - Chief running trials instead of the workers

Setup keras-tuner==1.1.0 tensorflow==2.8.0 Python 3.10.2 Chief and Tuner0 running on one machine Tuner1 running on another machine Hyperband initialization: hp = Hyperband( hypermodel=em.get_model, objective='val_accuracy', …
1
vote
1 answer

got nan in keras tuner but it works when I train it

I trained my network several times and I already got some results. Then I found out about the Keras tuner and wanted to find the best hyperparameters with it. but the loss in tuner always becomes nan ( it won't get nan if you train it regularly).…
parsa
  • 370
  • 4
  • 13
1
vote
0 answers

Unable to import keras-tuner: AttributeError: module 'tensorflow.keras.layers.experimental.preprocessing' has no attribute 'RandomRotation'

I followed the following steps: Installed Ananconda Created a conda environment for my project in PyCharm with Python 3.6 Installed packages in PyCharm Used conda install -n env_name -c conda-forge keras-tuner in Anaconda prompt to install keras…
K_D
  • 147
  • 8
1
vote
2 answers

No module named 'keras_tuner' even though i installed it

i'm working on a classifier that uses CNN and i need to use the keras tuner so i can find the best CNN architecture i executed this command "pip install keras-tuner" and it was installed successfully but when i import it "import keras_tuner as kt"…
Jood jindy
  • 320
  • 4
  • 18
1
vote
1 answer

How can i use tf.keras.callbacks.ModelCheckpoint in Keras Tuner?

So i want to use tf.keras.callbacks.ModelCheckpoint in Keras Tuner, but The way you choose the path where to save the checkpoints, doesn't allow you to save it as a file with a certain name, a name associated to the trial and execution of that…
1
vote
1 answer

Dependent hyperparameters with keras tuner

My goal is to tune over possible network architectures that meet the following criteria: Layer 1 can have any number of hidden units from this list: [32, 64, 128, 256, 512] Then, the number of hidden units to be explored for the rest of the layers…