Questions tagged [keras-tuner]
166 questions
0
votes
1 answer
How to hypertune input shape using keras tuner?
I am trying to hypertune the input shape of an LSTM model based on the different values of timesteps. However, I am facing an issue. While initializing the model, the default value of timesteps (which is 2) is chosen, and accordingly, the…

Srijan
- 1
- 4
0
votes
2 answers
In keras-tuner I got the valueError: `logits` and `labels` must have the same shape, received ((None, 2) vs (None, 1))
def build_model(hp):
model = keras.Sequential()
for i in range(hp.Int('input_shape', 2, 20)):
model.add(layers.Dense(units=hp.Int('units_' + str(i),
min_value=32,
…

Sahil Bhatti
- 1
- 1
0
votes
1 answer
No hparams data was found when using tensorboard with keras-tuner
versions: tensorboard==2.9.0, keras-tuner==1.1.2
Here is simple model of binary classification with hyperparameters to search added in the model by using keras-tuner.
def build_model(hp):
n_layers = 4
n_features = len(X_train.columns)
inputs =…

haneulkim
- 4,406
- 9
- 38
- 80
0
votes
1 answer
Missing val_loss and val_accuracy after overriding the fit function
Following Keras Tuner's documentation for implementing a custom objective function, the fit function of my model's class is as below:
class HyperAE(kt.HyperModel):
def build(self, hp):
...
def fit(self, hp, model, x, y, validation_data,…

Winston
- 601
- 1
- 9
- 29
0
votes
2 answers
Trouble with setting the objective function in BayesianOptimization tuner in keras_tuner
I'm trying to tune hyperparameters for an LSTM model in Keras using Keras tuner's BayesianOptimization tuner. I keep getting error messages that seem to object to what I put in the objective argument when I instantiate the tuner. Here's my code:
…

koiky71
- 3
- 2
0
votes
1 answer
Unclear scoring metric of keras-tuner's SklearnTuner
In the docs from keras-tuner's SklearnTuner, one can find:
"Note that for this Tuner, the objective for the Oracle should always be set to Objective('score', direction='max')"
When setting the argument…

Nick Janssen
- 13
- 3
0
votes
1 answer
Tuner search with Keras Tuner
I am using Keras Tuner package.I trying to make hyperparameter tunning with the example explained here https://www.tensorflow.org/tutorials/keras/keras_tuner.
Code is functioning very well but when I start code but when I try to start the second…

silent_hunter
- 2,224
- 1
- 12
- 30
0
votes
1 answer
the hyperband method from Keras Tuner throws an UnimplementedError
The hyperband method from Keras Tuner throws the following error:
UnimplementedError: ./untitled_project; Operation not supported
The following code generates the error:
def build_model(hp):
model = tf.keras.Sequential()
hp_units1 =…

Medha Chippa
- 65
- 6
0
votes
1 answer
raise ValueError("Shapes %s and %s are incompatible" % (self, other)) error while trying to get tuner.get_best_models()[0].summary() using keras-tuner
I am trying to optimze hyperparamter for 1D CNN model using keras-tuner. Everything looks perfect while trying to get the best parameter. But when I try to print tuner.get_best_models()[0].summary(), it gives me the following error:
raise…

Edy Ashton
- 45
- 3
0
votes
0 answers
Keep getting NaNs value for scoring when tuning on KerasRegressor
I am trying to tune hyperparameter on the KerasRegressor
However, i only get the result of NaN's which is shown below, may i know what cause the issue?
everything works fine when i try to compile my model... but the scoring for the best parameters…

Chuen Yik Kang
- 83
- 1
- 11
0
votes
0 answers
Keras Tuner not Utilising TPUs on Google Colabs
I'm at a complete loss with this one. I have implemented the following code, using the common pattern for defining a 'resolver' and the TPU Strategy.
However, when I run this, the tuner.search function is running at the speed of a regular CPU and I…

Larry125
- 25
- 1
- 4
0
votes
0 answers
object not created in function when tuning hyperparameters using keras tuner
I created a function build_model to tune hyperparameters. However, the function fails to create objects within it, the rlr object (ReduceLROnPlateau). I know the function has run because I tested it by inserting some print statements. Why are the…

lingyau lee
- 47
- 7
0
votes
2 answers
How to plot learning curves for each trial using the keras-tuner
I am using keras tuner for model selection for my neural network model for a regression task, I would like to plot the learning curves for loss and validation loss for each iteration of the random search. How could I do it?
This is my code
def…

JayJona
- 469
- 1
- 16
- 41
0
votes
1 answer
Module object is not callable (kerastuner)
I am trying to optimize my keras NN using kerastuner but for some reason its giving me a 'module' object is not callable error on the tuner=randomsearch line.
import pandas as pd
import numpy as np
from sklearn.preprocessing import scale
from…

Benuker
- 1
- 1
0
votes
1 answer
Can keras_tuner (Keras Tuner) be used for non model hyper parameters?
After looking at doc and tutorial, it seems to me it is very easy to define a hyper parameter for your model. This includes the code to construct it out of layers, as well as compile related ones such as learning rate. What I am looking for (also)…

kawingkelvin
- 3,649
- 2
- 30
- 50