Questions tagged [keras-tuner]

166 questions
30
votes
1 answer

Keras-tuner Hyperband runing only 2 epochs

The code below is the same Hello-World example from kera-tuner website, but using Hyperband instead of RandomSearch. from tensorflow import keras from tensorflow.keras import layers from kerastuner.tuners import RandomSearch, Hyperband from…
Kleyson Rios
  • 2,597
  • 5
  • 40
  • 65
8
votes
10 answers

What does 'INFO:tensorflow:Oracle triggered exit' mean with keras tuner?

When I run Keras Tuner search, the code runs for some epochs and then says: 'INFO:tensorflow:Oracle triggered exit'. What does this mean? I am still able to extract best hyperparameters. Is it due to early stopping? I have tried both randomsearch…
endorphinus
  • 119
  • 1
  • 1
  • 8
7
votes
1 answer

Do the number of units in a layer need to be defined within a conditional scope when using keras tuner to setup a model?

According to the Keras Tuner examples here and here, if you want to define the number of layers and each layer's units in a deep learning model using hyper parameters you do something like this: for i in range(hp.Int('num_layers', 1, 10)): …
Joe
  • 418
  • 4
  • 12
6
votes
2 answers

How can I tune neural network architecture using KerasTuner?

I'm trying to use KerasTuner to automatically tune the neural network architecture, i.e., the number of hidden layers and the number of nodes in each hidden layer. Currently, the neural network architecture is defined using one parameter…
CathyQian
  • 1,081
  • 15
  • 30
6
votes
1 answer

How to skip problematic hyperparameter combinations when tuning models using Keras Tuner?

When using Keras Tuner, there doesn't seem to be a way to allow the skipping of a problematic combination of hyperparams. For example, the number of filters in a Conv1D layer may not be compatible with all values of pool size in the following…
George Liu
  • 3,601
  • 10
  • 43
  • 69
6
votes
1 answer

How to choose optimizer and learning rate for hyperparameter training in keras-tuner

I would like to do hyperparameter training using the kerastuner framework. How can I choose an optimizer and different learning rates which can be passed to the optimizers. This is my model.compile()method. model.compile( …
6
votes
2 answers

keras-tuner error in hyperparameter tuning

i am trying my first time to get a keras-tuner tuned deep learning model. My tuning code goes like below: def build_model_test(hp): model = models.Sequential() model.add(layers.InputLayer(input_shape=(100,28))) …
Tzikos
  • 111
  • 3
  • 10
5
votes
6 answers

Reload Keras-Tuner Trials from the directory

I'm trying to reload or access the Keras-Tuner Trials after the Tuner's search has completed for inspecting the results. I'm not able to find any documentation or answers related to this issue. For example, I set up BayesianOptimization to search…
Krishnang K Dalal
  • 2,322
  • 9
  • 34
  • 55
4
votes
1 answer

Keras-tuning can't find callback

I am using keras-tuner in order to obtain the best set of hyperparameters for my model. I can reproduce my problem for a random dataset: def generate_data(n_windows, n_timesteps): feature_vector_list = [] label_list = [] for i in…
DPM
  • 845
  • 7
  • 33
4
votes
1 answer

Sending parameters to Keras Tuner model- builder function

I want to send parameters to Keras Tuner's model-builder function to parameterize number of layers dense/dropout, number of neurons, activation, and optimizer for hyperparameter tuning. However, I'm not able to send parameters to model-builder…
4
votes
2 answers

Keras tuner and TPU in Google Colab

I have some problems with keras tuner and tpu. When I run the code below, everything works well and network training is fast. vocab_size = 5000 embedding_dim = 64 max_length = 2000 def create_model(): model = tf.keras.Sequential([ …
KarPaLex
  • 41
  • 2
3
votes
1 answer

How to interperet the 'num_layers' line when using Keras Tuner

I'm reading an article about tuning hyperparameters in keras tuner. It includes code to build a model that has this code: def build_model(hp): """ Builds model and sets up hyperparameter space to search. Parameters ---------- …
3
votes
2 answers

NaN for Keras Tuner score for RandomSearch

I am trying out Keras (2.8.0) autotuner for a regression problem. Here is my code: import pandas as pd from tensorflow import keras from keras import layers, losses from keras_tuner.tuners import RandomSearch df =…
rishi
  • 2,564
  • 6
  • 25
  • 47
3
votes
0 answers

Building the keras tuner best model with Sequential does not give the same results?

For my regression , these are the results of the best model that I obtained using keras-tuner. best_model.summary() Model: "sequential" _________________________________________________________________ Layer (type) Output Shape …
K_D
  • 147
  • 8
3
votes
1 answer

Unknown metric val_accuracy using Keras Tuner

I am trying to use keras tuner with fashion-mnist dataset in Google Colab, that's my code: !pip install keras-tuner import tensorflow as tf import kerastuner import numpy as np print("TensorFlow version: ", tf.__version__) (x_train, y_train) ,…
1
2 3
10 11